feat(mcp-server): add TDD execution continuity rules to prevent RED phase halt#467
Merged
JeremyDev87 merged 1 commit intomasterfrom Feb 17, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…hase halt (#463) Add 4-layer defense strategy ensuring AI agents treat RED→GREEN→REFACTOR as one atomic operation and never stop on expected TDD RED phase failures. - Add TDD_CONTINUITY_RULE override in .claude/rules/custom-instructions.md - Add TDD continuity to ACT base instructions in keyword-core.ts - Add TDD continuity to ACT enriched instructions in keyword.service.ts - Add failure classification to TDD cycle in core.md - Add tests for both base and enriched instruction paths
4d9d790 to
3e7897c
Compare
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
Closes #463
Adds a 4-layer defense strategy to prevent AI agents from halting implementation when encountering expected RED phase test failures during TDD workflow. The RED→GREEN→REFACTOR cycle is now treated as one atomic operation across all instruction layers.
Changes
.claude/rules/custom-instructions.md— AddTDD_CONTINUITY_RULEproject-level override with test failure classification table (Expected RED vs Unexpected Failure) and explicit plan execution step handling that overrides external skill's "STOP on test fail" ruleapps/mcp-server/src/shared/keyword-core.ts— Add TDD continuity guidance to ACT base instructions (single source of truth for standalone/serverless consumers)apps/mcp-server/src/keyword/keyword.service.ts— Add TDD continuity rule with stronger emphasis to ACT enriched instructions inDEFAULT_CONFIG(used as fallback when config loading fails)packages/rules/.ai-rules/rules/core.md— Expand TDD cycle description with failure classification rules, shared across all AI assistants (Cursor, Claude Code, Codex, Q, Kiro, Antigravity)apps/mcp-server/src/shared/keyword-core.spec.ts— Add test verifying ACT base instructions contain TDD continuity keywordsapps/mcp-server/src/keyword/keyword.service.spec.ts— Add test using fallback service (rejectedloadConfigFn) to verifyDEFAULT_CONFIGenriched instructions contain TDD continuity rule4-Layer Defense Strategy
.claude/rules/custom-instructions.mdkeyword-core.ts(base)keyword.service.ts(enriched)core.md(shared rules)Test Plan
keyword-core.spec.ts— ACT base instructions containRED phase test failures are expected,do not stop,atomic operationkeyword.service.spec.ts— ACT enriched instructions (via DEFAULT_CONFIG fallback) containRED phase test failures are EXPECTED,do NOT stop,atomic operationtsc --noEmittype check passes