Repository navigation
feat(implement): diagnose the work item before editing (#82) - #101
Conversation
cc-implement-issue now treats the work item's stated cause as a hypothesis, searches related work (basic always, widened on signals), reproduces a defect before editing, names the broken invariant, and ends in one decision. do_not_implement_in_isolation, stop_duplicate and needs_scope_decision stop as BLOCKED before any branch exists and comment on the work item; implement_root_fix lists the other items the fix addresses without closing them. The PR gains a Diagnosis section and the result an additive, closed-value diagnosis object, checked by the validator.
[CCR-20260925-001] · reviewer · openai/gpt-6-sol→? · high · schema:1SummaryReviewed the full accumulated diff from merge-base Findings[REV-001] · medium · open · - · blocks:yes — A non-reproduced defect has no valid diagnosis decisionPath: The procedure says to report why a defect could not be reproduced and not to fix it blindly. But [REV-002] · low · open · - · blocks:no — Validator accepts malformed diagnosis field valuesPath: The validator checks the diagnosis key set and the classification, decision, and search-depth tokens, but it does not check that Security triage
VerificationPreflight found a clean checkout at the reviewed HEAD; no database, service, or runtime configuration is required for these package changes. On that HEAD:
The live-agent work-item acceptance flow was not run. Windows was not run locally; the PR’s PowerShell CI checks passed. CIThe PR-triggered Residual risk and verdictRelated-work searches should remain within the configured project/workspace because their identifiers can appear in a public PR. The provider bootstrap is expected to supply scoped access, and the review did not observe a disclosure. Verdict: CHANGES_REQUESTED. Blocking finding: |
[CCT-20260925-001] · manual · anthropic/opus→? · high · triaged:d89606410a50e4755197cc352d105b72e481464c · schema:1Triage of the findings from [REV-001] · medium · open · valid · blocks:yes — A non-reproduced defect has no valid diagnosis decisionPath: Valid. The reproduction step forbids fixing blind, but no decision or classification covers a defect that could not be reproduced, and [REV-002] · low · open · valid · blocks:no — Validator accepts malformed diagnosis field valuesPath: Valid. The validator checks the tokens but not that |
REV-001: a defect that cannot be reproduced now classifies as not_reproduced and decides needs_evidence, which stops as BLOCKED before any branch and asks the work item for the missing evidence. Its result carries reproduced: false and cause_matches_issue: null. REV-002: the validator checks that reproduced and cause_matches_issue are boolean or null by type, that related_items is a list of identifiers, and that every decision has its own row in the decision table.
[CCR-20260925-001] · reviewer · openai/gpt-6-sol→? · high · schema:1[CCT-20260925-001] · manual · anthropic/opus→? · high · triaged:d89606410a50e4755197cc352d105b72e481464c · schema:1Resolution — RESOLVEDBoth findings from [REV-001] · medium · resolved · valid · blocks:yes — A non-reproduced defect has no valid diagnosis decisionPath: Added the classification [REV-002] · low · resolved · valid · blocks:no — Validator accepts malformed diagnosis field valuesPath:
While adding the Verification
CI on
|
[CCR-20260925-002] · reviewer · openai/gpt-6-sol→? · high · schema:1[CCR-20260925-001] · reviewer · openai/gpt-6-sol→? · high · schema:1[CCT-20260925-001] · manual · anthropic/opus→? · high · triaged:d89606410a50e4755197cc352d105b72e481464c · schema:1SummaryRereviewed PR 101’s full accumulated diff from merge-base The finding history was reconstructed from the trusted GitHub comments authored by Previous findings[REV-001] · medium · resolved · valid · blocks:yes — A non-reproduced defect has no valid diagnosis decisionPath: Corrected and verified by execution. The skill now assigns [REV-002] · low · resolved · valid · blocks:no — Validator accepts malformed diagnosis field valuesPath: Corrected and verified by execution. The validator now requires boolean-or-null reproduction fields and a list of nonempty identifier strings. Focused tests and direct malformed-value probes reject the cases reported previously. The disposition remains New finding[REV-003] · low · open · - · blocks:no — Validator accepts an invalid diagnosis decisionPath:
Security triage
VerificationPreflight found a clean checkout at the reviewed HEAD, with no database, service, migration, or runtime configuration needed. No repository or PR state was changed.
The live-agent acceptance scenario from issue 82, local Windows execution, and installer-network flows were not run in this pass. The local plugin validation and all PR CI checks did pass. CIAll four Residual risk and verdictKeep related-work searches within the configured project/workspace, and redact or summarize reproduction evidence before posting it when it could contain secrets or personal data. Neither risk was observed in this PR’s execution. Verdict: APPROVED. Both previous findings are corrected and verified; |
Closes #82 — #82
What changes in the skill's behaviour
cc-implement-issueworkflow step 4 no longer jumps from "smallest coherent change" to editing. A new Diagnose before editing section runs before any branch exists:isolated_defect,shared_cause,duplicate,superseded,already_resolved,feature_request,cause_mismatch.implement,implement_root_fix(PR lists the other items it addresses, without closing them), and three stops —do_not_implement_in_isolation,stop_duplicate,needs_scope_decision— that reportBLOCKEDbefore any branch and comment on the work item.The PR body gains a Diagnosis section; the structured result gains an additive
diagnosisobject with closed values only (related_search: basic|widened,reproduced/cause_matches_issuenullable). No new skill, status, routing, or telemetry field.Diagnosis
skills/cc-implement-issue/SKILL.mdstep 4.diagnosis,triage,root cause,cc-implement-issuein titles). cc-implement-issue: organise the change into work units with a stated rollback boundary #84 (work units and rollback boundary) touches the same skill but is a separate concern; not addressed here.feature_request/implement.Verification
python3 scripts/validate-package.py→VALID: 14 skills …python3 -m unittest discover -s tests→Ran 732 tests … OKclaude plugin validate .→✔ Validation passedcheck_implement_contractin the validator (section defines every token and both search depths; the result example is strict JSON with adiagnosisobject of known tokens) plus four negative tests; twotest_run_cycle.pycases pin that a scripted implement returningBLOCKEDwithstop_duplicate/do_not_implement_in_isolationstops before review with its reason shown. No driver change was needed.Environment: the tests use temporary directories and in-process fakes; the local run shares no global Git identity or credentials with CI.
Pending: the manual acceptance check — a live agent given a work item that shares a cause with two other open items ends in
implement_root_fixordo_not_implement_in_isolation— has not been run yet.