Repository navigation
fix(#921): spec recommendation handoff — resolve via structured comment marker - #925
Merged
admarble merged 2 commits intoAug 9, 2026
Merged
Conversation
…ent marker Adds a comment-marker → comment-prose → chat-text → label-fallback resolution chain (spec-recommendation.ts) so the durable SEQUANT_SPEC marker in the spec agent's GitHub comment is the primary source of truth, instead of only ever regexing ephemeral chat text. Fixes the #814 failure mode where a body-file-posted plan silently dropped the recommended testgen phase. - AC-1: spec Output Template emits SEQUANT_SPEC marker, synced 3 dirs - AC-2: Zod schema + registry validation, invalid markers fall through - AC-3: resolution chain reuses stripMarkdownCode from phase-detection - AC-4: IssueLogSchema.specRecommendation + LogWriter.setSpecRecommendation - AC-5: #814 motivating fixture (real captured comment + chat text) - AC-6: legacy no-marker comments resolve via comment-prose fallback
…mport (AC-7) Lint caught the unused import left over when resolveSpecRecommendation replaced the old two-branch fallback in batch-executor.ts.
admarble
deleted the
feature/921-fix-run-spec-recommendation-handoff-parses-eph
branch
August 9, 2026 16:54
This was referenced Aug 9, 2026
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
spec-recommendation.ts) sosequant runreads the spec agent's durable GitHub comment first, instead of only ever regexing its ephemeral chat text.gh issue comment --body-file, chat text has no## Recommended Workflowsection to match, and the run silently fell back to label-based detection — which can never producetestgenorsecurity-review.marker/comment-prose/chat/label-fallback) per issue in the run log (specRecommendationfield), making fallback frequency auditable instead of invisible./spec's Output Template now emits the<!-- SEQUANT_SPEC: {json} -->marker alongside the existing prose section, mirrored byte-identical across all 3 skill copies.AC Coverage
SEQUANT_SPECmarker, mirrored 3-dir.claude/skills/spec/SKILL.md+ 2 mirrors;check-skill-sync.tsreports 44/44 syncedspec-recommendation.ts:parseSpecMarker(SpecMarkerJsonSchema,phaseRegistry.has(),chalk.yellowwarnings)stripMarkdownCodespec-recommendation.ts:resolveSpecRecommendation;stripMarkdownCodeexported fromphase-detection.tsrun-log-schema.ts:SpecRecommendationSchemaonIssueLogSchema;LogWriter.setSpecRecommendationtestgenvia comment path__tests__/fixtures/spec-recommendation-814.json(real captured #814 comment) +spec-recommendation.test.ts; mutation-verified (see Test plan)spec-recommendation.test.ts"legacy comments without a marker"CHANGELOG.mdUnreleased → FixedMutation verification (CLAUDE.md gate-test rule)
__tests__/integration/spec-marker-skill-sync.integration.test.ts): deleted theSEQUANT_SPECmarker line from.claude/skills/spec/SKILL.md→ exactly the region-scoped marker assertion and thecheck-skill-sync3/3 assertion failed (2/7 tests), all 5 unrelated assertions stayed green. Restored, re-verified green.spec-recommendation.test.ts"fix(sync): plain sync overwrites CUSTOMIZABLE_FILES (constitution) — copyDir ignores force and never consults isCustomizableFile #814 motivating fixture"): removedtestgenfrom the fixture's captured fix(sync): plain sync overwrites CUSTOMIZABLE_FILES (constitution) — copyDir ignores force and never consults isCustomizableFile #814 comment body → exactly the one target test failed (expected [ 'exec', 'qa' ] to include 'testgen'), all 14 other tests in the file stayed green. Restored, re-verified green.Test plan
npm run build— cleannpm run lint— clean (0 errors, 0 warnings)npx vitest run src/lib/workflow/ __tests__/integration/spec-marker-skill-sync.integration.test.ts __tests__/integration/skill-sync.integration.test.ts— 1408 passed, 2 skipped, 73 filesnpx tsx scripts/check-skill-sync.ts— 44 synced, 0 diverged, 0 missingCloses #921