Repository navigation
feat(cli): add report, schema, config, doctor, and agent commands - #203
Merged
Merged
Conversation
Add the codeint schema subcommand to emit a deterministic JSON or TOON capability manifest derived directly from clap command metadata, built-in Metric definitions, built-in Language plugins, live MCP tool definitions, and CLI exit codes. Closes #186
Track default, file, and CLI provenance inside the configuration loader during merge and expose codeint config --resolved across text, JSON, and TOON formats. Closes #187
Add read-only offline diagnostics for Git repository status, codeint.json validity, $schema version compatibility, detected Language plugins, Workspace packages, and external Wasm Plugin paths and SHA-256 digests across text, JSON, and TOON formats. Closes #188
Add codeint report <INPUT> --format <toon|json|sarif|markdown|text> (supporting file paths and stdin via -) to re-render saved check and diff JSON reports losslessly without re-running analysis, failing with exit code 2 on malformed JSON or unsupported schema versions. Closes #185
Add codeint agent status and codeint agent install (--dry-run, --client, --config-root, --format text|toon|json) for Claude Code, Cursor, and Codex using atomic temp-file-then-rename updates that preserve existing settings and unrelated MCP servers. Closes #189
…gration branch
# Conflicts: # crates/cli/src/check.rs # crates/cli/src/lib.rs # crates/cli/src/mcp.rs # crates/config/src/lib.rs # crates/report/src/diff.rs # crates/report/src/lib.rs # docs/reference.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds five offline CI and coding-agent workflow commands to
codeint:codeint report(single-pass re-rendering of savedcheck/diffJSON to SARIF, Markdown, TOON, JSON, or text),codeint schema(live machine-readable CLI/MCP/Metric capability manifest),codeint config --resolved(merged configuration with per-field provenance),codeint doctor(read-only environment/config/Wasm Plugin diagnostics), andcodeint agent status/install(safe atomic idempotent MCP registration with--dry-runand--client).Closes #172
Closes #185
Closes #186
Closes #187
Closes #188
Closes #189
Tier
Tier 3 from the tier check:
crates/cli/tests/config.rstriggers the test-timeout pattern rule because it tests the--plugin-timeout-msCLI flag andplugin_limits.timeout_msprovenance.Task
Spec #172 and sub-issues #185, #186, #187, #188, #189:
codeint reportsingle-pass multi-format re-rendering forcheckanddiffJSON from file or stdin (-) with exit-2 validation (codeint report <saved.json>single-pass multi-format re-rendering #185)codeint schemalive capability manifest derived from CLI, built-in Metrics, Languages, and MCP registries (codeint schemamachine-readable CLI, MCP, and Metric capability manifest #186)codeint config --resolvedeffective configuration and per-field provenance (default,file,cli) tracked insidecrates/config(codeint config --resolvedeffective configuration and per-field provenance #187)codeint doctorread-only offline checks for config,$schemaversion, Git, languages, Workspace packages, and Wasm Plugin SHA-256 digests (codeint doctorread-only environment, config, and Wasm Plugin diagnostics #188)codeint agent statusandcodeint agent install(--dry-run,--client,--config-root, atomic non-destructive idempotent writes) (codeint agent statusandcodeint agent install(--dry-run,--client) #189)Fail-first test
crates/cli/tests/report.rs(rerenders_check_json_from_stdin_and_file_with_full_format_parity),crates/cli/tests/schema.rs(schema_matches_live_cli_commands_flags_metrics_formats_mcp_tools_version_and_exit_codes),crates/cli/tests/config.rs(config_resolved_merges_file_and_cli_overrides_with_per_field_provenance),crates/cli/tests/doctor.rs(doctor_reports_healthy_repo_in_text_json_and_toon_and_is_strictly_read_only), andcrates/cli/tests/agent.rs(agent_status_reports_detected_clients_and_registration_state)error: unrecognized subcommand 'report','schema','config','doctor','agent')Checks
cargo test --workspace --lockedcargo clippy --workspace --all-targets -- -D warningscargo fmt --checkcodeint diff fce5585lefthookpre-commit and commit-msgcargo run --package xtask -- merged-result)Safety proof
check,diff,trend,init,mcp,guard,trace,impact) remain backward-compatible,doctorperforms strictly read-only offline checks, andagent install --dry-runperforms zero filesystem writes whileagent installuses atomic temp-file writes preserving unrelated MCP servers and keys.crates/cli/tests/doctor.rssnapshots repo and cache trees before/after runs;crates/cli/tests/agent.rsverifies--dry-run, atomic writes, unrelated-key preservation, and idempotency in isolated temporary home directories;crates/cli/tests/report.rsverifies exact output parity with directcheck/diffinvocations.interrogate: Round 1 found 7 verified edge cases (file permission downgrade onagent install, symlink replacement instead of updating canonical target, integer overflow in Markdownleft_outtotals, partial write before multi-client validation, broken symlink misdiagnosis indoctor/config --resolved,boundariesprovenance & validation inconfig --resolved, andschemaexit code 1 description). All 7 were fixed with dedicated regression tests in4a4e223and merged cleanly withmain(9171c0d) at51bc6bb; clean rerun running on51bc6bb.Runtime evidence
End-to-end CLI integration tests executed the compiled
codeintbinary on revision0142dcdacross all five new subcommands (report,schema,config,doctor,agent) and existingreference/mcp/check/diffsuites (all passed, andcodeint diff fce5585exited 0 with zero regressions).Gaps