feat(verify): detect semantic planning residue - #1373
Conversation
📝 WalkthroughWalkthroughThe ChangesVerify relevance workflow
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Updated the branch against current main and resolved the template-parity conflict in afd700c. I also regenerated the committed openspec-verify-change skill and its parity hashes so the distributed skill matches the source template. Local validation: build passes, template parity 14/14, and the full suite passes 2253/2253 with telemetry disabled. This PR is now ready for review. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/core/templates/workflows/verify-change.ts`:
- Around line 119-122: Update the verify-change workflow to deterministically
discover and baseline the complete implementation-file diff before auditing
relevance, then use that file set when reviewing changed code. Apply the same
discovery instructions at src/core/templates/workflows/verify-change.ts lines
119-122 and 311-314, and regenerate skills/openspec-verify-change/SKILL.md lines
117-120 with the matching guidance.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: e98dae52-6848-42ee-abf6-f261f714e77e
📒 Files selected for processing (7)
docs/commands.mddocs/editing-changes.mddocs/reviewing-changes.mddocs/workflows.mdskills/openspec-verify-change/SKILL.mdsrc/core/templates/workflows/verify-change.tstest/core/templates/skill-templates-parity.test.ts
| - Review code introduced or changed for this change, focusing on implementation files identified in the earlier steps | ||
| - For each new API, function, type field, state value, helper, branch, or mapping, identify the requirement, task, design decision, or necessary enabling role it serves | ||
| - Look for residue from superseded planning assumptions: unused elements, unreachable branches, placeholder or mock code, duplicated mappings, and extension points disconnected from any requirement or task | ||
| - Trace references and data flow before flagging an element as residue |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Establish the current change’s implementation-file set before auditing relevance.
The earlier steps only search for requirement implementation evidence; they cannot discover disconnected changed code, so the new audit either misses planning residue or risks inspecting pre-existing debt. Add a deterministic changed-file discovery/baseline step before this audit.
src/core/templates/workflows/verify-change.ts#L119-L122: identify the complete implementation diff for the change before iterating elements.src/core/templates/workflows/verify-change.ts#L311-L314: add the same discovery step to the OPSX command template.skills/openspec-verify-change/SKILL.md#L117-L120: regenerate the skill with the same discovery instructions.
📍 Affects 2 files
src/core/templates/workflows/verify-change.ts#L119-L122(this comment)src/core/templates/workflows/verify-change.ts#L311-L314skills/openspec-verify-change/SKILL.md#L117-L120
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/core/templates/workflows/verify-change.ts` around lines 119 - 122, Update
the verify-change workflow to deterministically discover and baseline the
complete implementation-file diff before auditing relevance, then use that file
set when reviewing changed code. Apply the same discovery instructions at
src/core/templates/workflows/verify-change.ts lines 119-122 and 311-314, and
regenerate skills/openspec-verify-change/SKILL.md lines 117-120 with the
matching guidance.
What changed
openspec-verify-changeskill and/opsx:verifycommandWhy
Issue #1073 proposes an optional semantic cleanup checkpoint after implementation and before verification/archive. This draft integrates that checkpoint into the existing optional
/opsx:verifyworkflow rather than adding another command. It keeps the workflow surface small while placing the check immediately before archive.Impact
This changes generated verification instructions and documentation only. It does not automatically remove code or block archive; it reports evidence-backed warnings and suggestions for human review.
Validation
OPENSPEC_TELEMETRY=0 ./node_modules/.bin/vitest run— 100 test files, 1,876 tests passednode build.js./node_modules/.bin/eslint src/— 0 errorsgit diff --checkReview note
This is a draft specifically to confirm that extending
/opsx:verifyis preferable to introducing a separate checkpoint command.Prepared with Codex assistance and reviewed locally for scope and false-positive boundaries.
Addresses #1073
Summary by CodeRabbit
New Features
Documentation