Repository navigation
feat(#556): predict file-collision between PROCEED issues from body content - #577
Merged
admarble merged 2 commits intoMay 4, 2026
Conversation
…ontent `/assess` Step 5 now reads issue bodies of PROCEED candidates and predicts which pairs will modify the same file once both run in parallel worktrees, complementing the existing active-worktree overlap pass. Path extraction (`extractPathsFromIssueBody`): - Strips fenced code blocks and HTML comments before regex matching. - Captures backtick-quoted paths under .claude/, templates/, skills/, src/, bin/, docs/ ending in .md/.ts/.tsx/.json/.sh. - When the body signals "3-dir sync"/"across all three skill directories", expands bare `<name>/SKILL.md` references AND `/<skill>` slash-command mentions to all three skill-root mirrors. - Strips globally-shared paths (CHANGELOG.md, package-lock.json, yarn.lock, pnpm-lock.yaml) so they never trigger collisions on every batch. Collision detection (`detectFileCollisions`): - Pairwise file-path intersection across the PROCEED set. - Returns one CollisionResult per shared file, grouping all involved issues under that file. Output annotations (`formatCollisionAnnotations`): - Order: A → B (path) per collision. - ⚠ #N Modifies <path> (overlaps #M); land sequentially per issue. - Chain: suggestion when ≥3 issues collide on the same file (suggest-only — never auto-applied; same precedent as existing Chain: detection). Tunables — exclusion list, path regex, slash-command-skill derivation rule — live in `references/predicted-collision-detection.md` so they can change without skill-prose edits. Reference doc is 3-dir-mirrored alongside SKILL.md. Tests use the verbatim bodies of #551 and #552 (the issues that motivated this feature) plus synthetic fixtures for the false-positive guards (code-block-only, HTML-comment-only, CHANGELOG-only). Closes #556
8 tasks
The prior implementation expanded `qa/SKILL.md` references to all three skill-root mirrors at extraction time, then ran pairwise intersection on the qualified paths. When both #551 and #552 yielded the three mirrored paths via 3-dir-sync expansion, `detectFileCollisions` emitted three CollisionResult entries (one per mirror), which the formatter rendered as 3 Order: lines + 6 ⚠ warnings for a single logical conflict. Adversarial review against issue #556 AC-3's expected output — `Order: 551 → 552 (qa/SKILL.md)` (singular, bare path) — surfaced the gap. Fix: normalize skill-mirror prefixes (`.claude/skills/`, `templates/skills/`, `skills/`) to the canonical bare subpath at extraction time. Mirrored references collapse to one canonical entry, yielding one collision result per logical conflict and matching the issue's example output. Also: - Add AC-6's literal "one issue mentions qa/SKILL.md, the other only inside a code block → no overlap" test using #552 verbatim plus a synthetic code-block-only fixture (the previous test used src/lib/foo.ts, weakening the AC-6 fixture link). - Add Step 1 (Context Gathering) cross-reference to Step 5's predicted-collision detection so AC-1's "during Step 1" timing is explicit in the skill prose. - Update reference doc to document canonical-form normalization as the de-duplication mechanism. - Update CHANGELOG to reflect canonical-form output. All 2762 tests pass (was 2761; +1 new code-block-fixture test).
admarble
deleted the
feature/556-feat-assess-predict-file-collision-between-proceed-issues
branch
May 4, 2026 03:52
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
/assessStep 5 now reads issue bodies of PROCEED candidates and predicts which pairs will modify the same file once both run in parallel worktrees, complementing the existing active-worktree overlap pass. Closes #556.src/lib/assess-collision-detect.tswith three pure functions:extractPathsFromIssueBody,detectFileCollisions,formatCollisionAnnotations.assess/SKILL.mdextended (not replaced) with a "Predicted file-collision" sub-section that names the new functions and links the reference doc; mirrored across.claude/skills/,templates/skills/,skills/.references/predicted-collision-detection.mddocuments the path regex, exclusion list, and the slash-command-skill derivation rule. 3-dir-mirrored.Heuristics
.claude//templates//skills//src//bin//docs/ending in.md/.ts/.tsx/.json/.sh.<name>/SKILL.mdreferences AND/<skill>slash-command mentions are expanded to all three skill-root mirrors.CHANGELOG.md,package-lock.json,yarn.lock,pnpm-lock.yaml) are stripped so they never trigger collisions on every batch.Output
Order: A → B (path)per collision (3+:Order: A → B → C (path)).⚠ #N Modifies <path> (overlaps #M); land sequentiallyper affected issue per collision.Chain: npx sequant run A B C --chain --qa-gate -q # alternative — N issues modify <path>only when ≥3 issues collide on the same file (suggest-only — never auto-applied).Test plan
src/lib/__tests__/assess-collision-detect.test.ts): 13/13 pass — verbatim feat(qa): require detection-pattern verification for skill regex/grep/awk changes #551 + feat(spec,qa): detect behavior-rule implementations across skill+runtime touchpoints #552 fixtures cover positive overlap onqa/SKILL.md; synthetic fixtures cover code-block-only, HTML-comment-only, CHANGELOG-only, glob-pattern, and 3-issue Chain: cases.assess-skill.test.ts3-dir-sync test (byte-identical SKILL.md across all three roots).--chain --qa-gate -qexample uses only flags registered inbin/cli.ts./assessinvocation on a real batch of unstarted PROCEED issues (post-merge verification).