docs: drop unimplemented risk_level claim from impact docs#592
Merged
Conversation
`ecp impact` (both `<name>` and `--baseline` modes) emits only the caller / callee set with file:line and counts — it never assigns a `risk_level` and no such field exists in the JSON payload (`impact_with_baseline` / `impact_by_name`). The help text, doc-comments, skill docs, and a "## Risk Levels" table all claimed a LOW/HIGH/CRITICAL label that the code does not produce. Replace the claims with the truthful contract: impact returns the raw blast radius; judge risk from caller breadth directly (caller counts are a lower bound — the resolver suppresses ambiguous bare calls, so a low count warrants a grep cross-check). Risk *classification* does exist, but in `ecp dev pr-analyze` (`Risk` enum, `classify_risk` by impact-set size) — left untouched; its doc-comment is accurate.
Contributor
ecp impact cache (0 symbols) — internal, used by
|
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.
Why
ecp impactis documented (help text, doc-comments, skill docs, a## Risk Levelstable) as returning arisk_levelof LOW / HIGH / CRITICAL. It does not. Verified by reading both emit paths:impact_by_name→{ status, target, direction, impact, ... }impact_with_baseline→{ status, baseline, changed_paths, changed_symbols, impact_by_symbol }Neither emits a
risk_levelfield, andecp find RiskLevel→found: false. The only real classification inimpact.rsisCoverageClass(Orphan/Uncovered/Partial/Covered), gated behind--test-coverage, and it grades test coverage, not risk.This is a doc-vs-code drift: the docs promise a label the binary never produces — exactly the "doc-comment inference ≠ verification" trap.
What
Replace every
risk_level/ "risk level" claim with the truthful contract — impact returns the raw caller/callee blast radius; the consumer judges risk from caller breadth, remembering caller counts are a lower bound (resolver suppresses ambiguous bare calls → low count warrants a grep cross-check).7 sites:
crates/ecp-cli/src/cli.rs—--helpsummarycrates/ecp-cli/src/commands/impact.rs— doc-commentdocs/skills/ecp/_shared/cli/impact.md— intro line + dropped## Risk Levelstable, replaced with "## Reading the blast radius"docs/skills/ecp/_shared/cli/processes.md— "caller-tree with risk levels"docs/skills/ecp/SKILL.md— command tabledocs/skills/ecp-onboard/_shared/cli/impact.mdskill_sample/claude/SKILL.md— "HIGH/CRITICAL risk_level → stop+confirm" guidance reworded to caller-breadthNot touched (deliberately)
Risk classification does exist — in
ecp dev pr-analyze(Riskenum Low/Medium/High,classify_risk(impact_size)thresholds 5/30, emitsecp:risk-*labels). That doc-comment (pr_analyze.rs:228) is accurate and is left as-is.docs/specs/+docs/superpowers/historical design notes also left as-is (they record intent, not a user-facing CLI contract).Verification
cargo build -p egent-code-plexus --bin ecppasses (only doc-comment + help-string text changed).