Skip to main content

Module output

Module output 

Source
Expand description

Output renderers (validate + relationships surfaces), per PORT-CONTRACT.d/07: human text (code-point padding, TTY-gated ANSI), --json via pyjson::dumps_indent2, and SARIF 2.1.0.

Functions§

evidence_value
The search-match evidence dict exactly as decided find --json --explain serializes it: {field, terms, tier, score, components:{bm25, lexical_rank, graph_rank, inbound}}.
find_match_value
ResolvedArtifact.to_dict(include_evidence=…) — the search-match / resolved-artifact dict in pinned key order (id, type, title, path, [section], [snippet], [evidence], [recency], [tags]); conditional keys are absent, never null (except title). Shared by the CLI decided find renderers and the MCP tool payloads.
portfolio_summary_value
PortfolioSummary.to_dict() as a Value — shared by the portfolio JSON renderer and the index store’s portfolio segment (ADR-103/104), so the two cannot drift.
rac_version
The injectable version string (PORT-CONTRACT decision 6): DECIDED_RS_VERSION when set, otherwise the Cargo package version.
recency_value
The match recency dict: {last_committed, age_days, stale}, all three keys always present, each null when unknown.
render_agent_rules_human
render_agent_rules_json
json.dumps(result.to_dict(), indent=2) (ensure_ascii default).
render_coverage_human
Human decided coverage output (render_coverage_human).
render_coverage_json
JSON decided coverage output — json.dumps(report.to_dict(), indent=2, ensure_ascii=False).
render_decisions_for_human
Human decided decisions-for output: aligned id status title rows with the matching declared ## Applies To entry under each, or a valid empty result.
render_decisions_for_json
JSON decided decisions-for output — the same ScopeLookupResult payload the MCP find_decisions path argument serializes (ADR-031).
render_diff_human
render_diff_json
render_diff_json — fixed key order; old/new echo the raw argv paths.
render_dir_inspect_human
render_dir_inspect_json
render_doctor_human
render_doctor_json
json.dumps(..., indent=2, ensure_ascii=False) — raw UTF-8, unlike gate’s default-ASCII dump.
render_documents_jsonl
render_export_json
render_find_human
render_find_human — aligned match rows, or a valid empty result (PORT-CONTRACT.d/06 §13). {query!r} is Python string repr.
render_find_json
render_find_jsonSearchResult.to_dict(include_evidence=explain).
render_gate_human
render_gate_json
render_gate_sarif
One combined SARIF run over ALL gate findings, blocking and advisory alike; the intrinsic severity drives the level, the enforcement class lives only in the exit code. A relationship finding’s path is already the percent-encoded uri (shared builder), so it is quoted AGAIN here — exactly the oracle’s double quote() on that source.
render_graph_json
render_hook_install_human
Human decided hook install.
render_hook_install_json
JSON decided hook install.
render_hook_list_human
Human decided hook list: bold header, blank line, - <style ljust w> <desc> rows (style column width dynamic = 11 with the current set).
render_hook_list_json
JSON decided hook list (stable contract, ADR-007).
render_improve_human
render_improve_json
ImprovementResult.to_dict(){type, missing_required, missing_recommended, guidance}, sections snake_cased.
render_improve_template
Markdown templates for the missing sections (required first).
render_index_human
Human decided index output: the repository manifest (services/index.py).
render_index_json
JSON decided index output — json.dumps(index.to_dict(), indent=2) (ensure_ascii default; identity-only contract, ADR-007).
render_init_human
Human decided init: the established identity namespace. The idempotent verb carries its own colon (Already initialized:).
render_init_json
JSON decided init (stable contract, ADR-007).
render_inspect_human
render_inspect_json
InspectionResult.to_dict() — additive-friendly: decision metadata and relationships appear only when present.
render_inspect_verbose
Explainable single-file output: matches, misses, and the score math.
render_mcp_stats_human
Human decided mcp-stats output — what the local telemetry log says. An empty or missing log is a valid answer, rendered as guidance. Note First Event:/Last Event: print the Python value directly, so a populated log whose events all lack a string ts prints None.
render_mcp_stats_json
JSON decided mcp-stats output — json.dumps(to_dict(), indent=2), which is ensure_ascii=True (the ONLY ascii-escaped payload of the three state surfaces; usage --json and both share URLs use ensure_ascii=False).
render_migrate_human
Human decided migrate metadata: assigned IDs and what remains. The migrated path column is code-point ljust’d; the Skipped block appears only when unknowns exist.
render_migrate_json
JSON decided migrate metadata (stable contract, ADR-007).
render_new_human
Human decided new: what was created, its identity, and the next step. The path is the argv string VERBATIM (no pathlib normalization).
render_new_json
JSON decided new (stable contract, ADR-007) — note: NO bytes_written (in the oracle’s dataclass but not its to_dict).
render_portfolio_human
Human decided portfolio output (render_portfolio_human).
render_portfolio_json
JSON decided portfolio output — PortfolioSummary.to_dict() (ADR-007).
render_quickstart_human
Human decided quickstart: identity (Initialized/Using), first artifact, next step.
render_quickstart_json
JSON decided quickstart (stable contract, ADR-007) — nested artifact.
render_relationship_validation_human
render_relationship_validation_json
render_relationships_human
render_relationships_json
render_relationships_sarif
render_rename_human
Human decided rename plan: a reviewable diff-hunk preview (dry run) or a refusal (the CALLER routes refusals to stderr).
render_rename_json
JSON decided rename plan (stable additive contract, ADR-007) — emitted to STDOUT for refusals too (unlike the human refusal, which goes stderr).
render_rename_result_human
Human decided rename --apply outcome.
render_rename_result_json
JSON decided rename --apply outcome (no edits array).
render_resolve_human
render_resolve_human: the resolved-artifact card. Missing title renders (U+2014); the id is bold only on a tty.
render_resolve_json
render_resolve_jsonResolutionResult.to_dict() with indent=2.
render_retrieve_human
render_retrieve_human(payload) — the human decided retrieve block (ADR-113), rendered from the budget-shaped payload (post-truncation), so the human view reflects exactly what the JSON face carries.
render_review_human
render_review_json
render_review_sarif
render_schema_human
render_schema_json
render_schema_list_human
render_schema_list_json
render_schema_template
render_sentry_human
render_sentry_json
render_sentry_sarif
render_skill_install_human
Human decided skill install: one Installed <name> skill: <path> line per skill, blank line, the discovery blurb.
render_skill_install_json
JSON decided skill install — note: no bytes_written (it is in the oracle’s model but NOT in to_dict, skill brief landmine 4).
render_skill_list_human
Human decided skill list: bold header, blank line, - <name ljust w> <desc> rows in registry order; the name column width is computed dynamically as max(len(name)) (13 with the current set).
render_skill_list_json
JSON decided skill list (stable contract, ADR-007; ensure_ascii=True).
render_stats_human
render_stats_json
render_stdin_corpus_human
render_stdin_corpus_json
render_templates_human
render_templates_json
render_unknown_schema
render_usage_human
Human decided usage output — the unified CLI + Guide read-back (ADR-046). Two DIFFERENT error pluralizations by design: CLI rows use error/errors ('s' if errors != 1), Guide rows always error(s); both suffixes appear only when the count is nonzero, with the tool/command column left-justified to 16 code points.
render_usage_json
JSON decided usage output — the combined payload with ensure_ascii=False, indent=2 (raw UTF-8, unlike mcp-stats).
render_validate_dir_human
render_validate_dir_json
render_validate_sarif
render_validation_human
render_validation_json
render_watchkeeper_github
The Markdown step-summary report (decided watchkeeper --format github).
render_watchkeeper_human
Human-readable decided watchkeeper output (v0.12.0).
render_watchkeeper_json
JSON decided watchkeeper output (stable contract, ADR-007).
resolution_error_value
ResolutionResult.to_dict() for the failure outcomes — the decided resolve --json error body, also served as the MCP structured lookup error (errors.from_resolution, ADR-034).
search_result_value
SearchResult.to_dict(include_evidence=…){schema_version, query, type, match_count, matches}. Shared by render_find_json (which wraps it in indent=2 dumps) and the MCP search payloads (budget serializer).
watchkeeper_annotations
Workflow-command lines for the step log, one annotation per line. Recommendation triggers annotate as errors; other warnings as warnings; informational findings as notices. Deterministic order: delta-driven errors first, then findings in report order.