-
Notifications
You must be signed in to change notification settings - Fork 3
feat(prompts): add context verification markers to SDD workflow prompts #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Add emoji-based context verification markers (SDD1️⃣-SDD4️⃣) to all four SDD workflow prompts to detect context rot and instruction loss. This technique, shared by Lada Kesseler at AI Native Dev Con Fall 2025, provides immediate visual feedback when critical instructions are being followed versus falling off due to context rot or inefficient compaction. Changes: - Add SDD1️⃣ marker to generate-spec.md - Add SDD2️⃣ marker to generate-task-list-from-spec.md - Add SDD3️⃣ marker to manage-tasks.md - Add SDD4️⃣ marker to validate-spec-implementation.md - Add research documentation explaining context rot and the verification technique
WalkthroughAdds documentation and site content describing an emoji-based context verification technique and inserts new "Context Verification Marker" sections into four prompt files, requiring replies to begin with sequential markers SDD1️⃣–SDD4️⃣. No public API or code logic changes. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Author as Prompt / Doc Author
participant User as User
participant Assistant as Assistant
rect rgba(120,180,240,0.08)
note over Author,User: Prompts/docs include Context Verification Marker (SDDx)
Author->>User: Publish spec/prompt with required prefix SDDx
end
User->>Assistant: Send request referencing spec
alt Assistant includes required marker
Assistant->>Assistant: Prepend marker SDDx
Assistant->>User: Response starts with SDDx + body
else Marker omitted / verification fails
Assistant->>User: Response without SDDx or a verification-failure note
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🔇 Additional comments (7)
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 |
Remove 404 link to Medium article about context rot. Document still contains other valid sources including Chroma and Anthropic research.
Add comprehensive documentation explaining the context verification markers feature (SDD1️⃣-SDD4️⃣) across README, website homepage, and FAQ page. Changes: - Add context verification section to README.md explaining markers and context rot - Add FAQ section in common-questions.html with detailed Q&A about emoji markers - Add brief context verification section to index.html with link to FAQ - Update wording to clarify markers are indicators, not guarantees - Fix icon styling in FAQ cards
Why?
This PR addresses the silent failure mode known as context rot - a phenomenon where AI performance degrades as input context length increases, even when tasks remain simple. Research from Chroma and Anthropic demonstrates that even with long context windows (128K+ tokens), models can lose track of critical instructions without signaling errors.
Evidence:
6901e14adds emoji-based verification markers to all SDD workflow promptsdocs/emoji-context-verification-research.mdcites Chroma and Anthropic studies on context rotThe emoji verification technique, shared by Lada Kesseler at AI Native Dev Con Fall 2025, provides immediate visual feedback when critical instructions are being followed versus falling off due to context rot or inefficient compaction. This is essential for production AI workflows where silent instruction loss can cause significant issues.
What Changed?
Added context verification markers to all four SDD workflow prompts and comprehensive research documentation explaining the technique.
Key Changes:
SDD1️⃣marker togenerate-spec.mdpromptSDD2️⃣marker togenerate-task-list-from-spec.mdpromptSDD3️⃣marker tomanage-tasks.mdpromptSDD4️⃣marker tovalidate-spec-implementation.mdpromptdocs/emoji-context-verification-research.mdexplaining context rot and the verification techniqueFiles Modified:
prompts/generate-spec.mdprompts/generate-task-list-from-spec.mdprompts/manage-tasks.mdprompts/validate-spec-implementation.mddocs/emoji-context-verification-research.md(new file)Additional Notes
Context Rot Background
Context rot is the systematic degradation of AI performance as input context length increases, even when tasks remain simple. Key characteristics:
Research from Chroma demonstrates that performance degrades as context length increases, and Anthropic found that models struggle with "needle-in-a-haystack" tasks as context grows, even when the information is present.
Verification Technique
The emoji/character verification technique works by:
Why It Works:
Design Decision: No Concatenation Instructions
Rationale for excluding concatenation rules:
Each SDD workflow prompt is step-specific and used independently. The prompts are designed to be self-contained for their specific workflow step:
generate-spec.md→ Only usesSDD1️⃣generate-task-list-from-spec.md→ Only usesSDD2️⃣manage-tasks.md→ Only usesSDD3️⃣validate-spec-implementation.md→ Only usesSDD4️⃣Why concatenation examples were removed:
SDD1️⃣ SDD2️⃣ SDD3️⃣ SDD4️⃣could confuse the AI into thinking it should output all markers, even when only one step is activeIf concatenation becomes necessary in the future (e.g., for a unified prompt spanning multiple steps), it can be added back with clearer, more specific guidance.
Reliability Assessment
Note: Presence of marker doesn't guarantee all instructions were followed correctly, but absence is a clear signal of instruction loss.
Review Checklist
Summary by CodeRabbit
Documentation
Chores