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 | |
|---|---|
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 | |
run()
Run all checks (or filtered by category) and return result.
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 SKIP_FOR_* / REDIRECT_FOR_*
(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
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.