Checker
checker
Check engine โ orchestrates all checks and produces ProjectResult.
CheckEngine
Orchestrates project checks and produces results.
Source code in packages/axm-init/src/axm_init/core/checker.py
| Python | |
|---|---|
512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
run()
Run all checks (or filtered by category) for the project's framework.
Source code in packages/axm-init/src/axm_init/core/checker.py
format_agent(result)
Agent-optimized output: passed_count=N, failed=full detail.
Minimizes tokens by replacing the full passed-check list with a count. Only failures carry actionable detail.
Source code in packages/axm-init/src/axm_init/core/checker.py
format_agent_text(result)
Agent-optimized text rendering of a check result.
Compact companion to :func:format_agent: a one-line header with score,
grade, context and pass/fail counts, then one block per failed check
carrying its message, every detail and the full fix verbatim. Passed
checks are summarized as a count (they carry no actionable remedy).
The structured :func:format_agent dict remains the source of truth for
programmatic consumers; this string is what the LLM reads.
Source code in packages/axm-init/src/axm_init/core/checker.py
format_json(result)
Format check result as JSON-serializable dict.
Source code in packages/axm-init/src/axm_init/core/checker.py
format_report(result, *, verbose=False)
Format check result as human-readable report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
result
|
ProjectResult
|
Project check result. |
required |
verbose
|
bool
|
If True, list every individual check. If False (default), only show summary for passing categories and detail for failures. |
False
|
Source code in packages/axm-init/src/axm_init/core/checker.py
get_check_name(fn)
Derive the canonical check name from the function's module + name.
This is THE single source of truth for check naming. The convention is
category.function_name_without_check_ (the module name is the
category). The same string is used by the context tables
SKIP_BY_CONTEXT / REDIRECT_BY_CONTEXT
(pre-run, on the function), by [tool.axm-init].exclude matching
(post-run, on the result), and as the displayed CheckResult.name โ
so a name shown in the report can always be excluded by config.
Source code in packages/axm-init/src/axm_init/core/checker.py
protocol_status(result)
Project explicit declared state independently of conformity verdicts.
Source code in packages/axm-init/src/axm_init/core/checker.py
resolve_exit_code(result)
Resolve the CLI process exit code for a check result.
A not-applicable verdict (no weighted checks ran for this context โ e.g.
a category that does not apply to the project) is a skip/success and
exits 0. An applicable run exits 0 only on a perfect score,
otherwise 1 โ so a real 0/100 Grade F still fails the process.
Source code in packages/axm-init/src/axm_init/core/checker.py
stamp_canonical_name(fn, result)
Re-stamp a result with the canonical name derived from its function.
Check functions historically hand-set CheckResult.name with ad-hoc
strings that sometimes dropped a redundant category prefix
(e.g. ci.workflow_exists instead of ci.ci_workflow_exists). To
keep ONE convention across SKIP / REDIRECT / exclude / display, every
result is re-stamped here with :func:get_check_name โ the same value
the skip/redirect filters key off. When the name cannot be inferred
(function not named check_*), the result's own name is kept.
Source code in packages/axm-init/src/axm_init/core/checker.py
validate_context_tables()
Check every context-table id against the discovered check registry.
Raises:
| Type | Description |
|---|---|
ValueError
|
if a table holds an id no registered check declares โ the message names every offending id. |