Inspect report reference
pyfcstm inspect has four output formats:
Format |
Contract |
Use case |
|---|---|---|
|
Text renderer for people. |
Local debugging, tutorials, and review comments. |
|
Full |
CI checks, dashboards, and exact structural inventory. |
|
Stable compact JSON for repair prompts. |
Automated LLM repair loops and bug-report attachments. |
|
Stable Markdown presentation of the LLM report. |
Human-readable repair handoff. |
The full JSON schema lives in pyfcstm/diagnostics/schema.json. The LLM
report schema lives in pyfcstm/diagnostics/inspect_llm_report_schema.json.
Invalid input is not represented as a successful report: syntax errors, unreadable
files, decode failures, model-validation errors, and forbidden verify policy are
CLI failures.
CLI options affecting reports
Option |
Applies to |
Contract |
|---|---|---|
|
stdout or |
Default renderer. ANSI color follows |
|
stdout or |
Emits full |
|
stdout or |
Emits stable LLM-oriented JSON, not the full structural report. |
|
stdout or |
Emits the same repair-oriented content as Markdown. |
|
|
Ignored by machine-readable formats. |
|
report diagnostics |
Adds inspect-eligible verify algorithms within the configured policy. |
|
verify policy |
Selects the highest structural or SMT-local complexity tier accepted by inspect. |
|
verify policy |
Selects the highest model-derived call-count scaling accepted by inspect. |
|
solver-backed verify |
|
Full JSON top-level fields
The full JSON report is produced from ModelInspect.to_json() and contains
these required top-level fields.
Field |
Meaning |
|---|---|
|
Dotted path of the root state. |
|
Array of |
|
Array of normal and expanded transition summaries. |
|
Array of variable summaries, including read/write and guard-affect facts. |
|
Event declarations and usage summaries. |
|
Lifecycle, aspect, abstract, and ref action summaries. |
|
Authored forced transitions and expansion counts. |
|
Generated combo transitions copied from |
|
Authored combo trigger provenance grouped by stable origin id. |
|
Aggregate counts, hierarchy depth, ratios, and inventories. |
|
Default inspect graph: guards ignored, composite initial edges followed. |
|
Event name to source states that can emit it. |
|
Variable name to read/write state paths. |
|
Composite path to descendant leaves reached by aspect actions. |
|
Named-action signature to referenced named-action signatures. |
|
Array of |
Nested object contracts
Object |
Required fields and notes |
|---|---|
|
|
|
|
|
|
|
Term index, role, consumed term flag, text, and transition/trigger/term/value/removal spans. |
|
Name, type, initial value, read/write state paths, guard-affect flags, abstract-action scope, and float-literal assignments. |
|
Qualified name, declaration scope, use sites, and declared/used booleans. |
|
Signature, state path, name, stage, aspect, ref target, and attachment flag. |
|
Owning state, source/target, trigger facts, original raw text, and expansion count. |
|
State/transition/event/variable counts, hierarchy depth, var-to-leaf ratio, aspect coverage, and abstract-action inventory. |
|
|
|
|
LLM report contract
llm-json and llm-md are presentation contracts for repair loops. They do
not replace the full report.
Field |
Meaning |
|---|---|
|
Constant |
|
Constant |
|
Overall status: |
|
Input path or |
|
Object with |
|
Counts for errors, warnings, infos, states, leaf states, transitions, variables, and root state. |
|
Compact diagnostic entries enriched with source excerpts and registry guidance. |
Field |
Meaning |
|---|---|
|
Same stable code identity as the full report. |
|
|
|
Anchor line, caret, and nearby context lines when source text is available. |
|
Structured payload copied from the diagnostic. |
|
|
|
|
|
Registry LLM summary for the diagnostic code. |
|
Registry guidance copied from |
|
Renderer-produced short guidance for the repair loop. |
Invalid input boundary
The inspect command first reads, decodes, parses, and validates the DSL. If any
of those steps fails, the command raises a controlled CLI error instead of
returning a normal inspect report. Treat this as an input failure, not as a
diagnostics array with an E_* code.