Skip to content

Spec Driven Development Enforcement#521

Merged
kingargyle merged 3 commits intodevelopfrom
dac_spec_plan_generate_prompt
Feb 16, 2026
Merged

Spec Driven Development Enforcement#521
kingargyle merged 3 commits intodevelopfrom
dac_spec_plan_generate_prompt

Conversation

@kingargyle
Copy link
Copy Markdown
Contributor

@kingargyle kingargyle commented Feb 16, 2026

Creates a prompt to help wire up a project to enforce a Spec Driven Development methodolgy when requirements are uniquely vague.

Summary by CodeRabbit

  • Documentation
    • Introduced a Phased Spec-Driven Development (SDD) protocol with mandatory approval gates for complex tasks.
    • Added a SPEC Writer persona and phased workflow to enforce clearer, interview-driven specs before implementation.
    • Published a task-spec template and implementation plan to standardize goals, phases, and verification steps.
    • Updated agent communication guidance with a complexity threshold and an "always ask before starting" policy.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 16, 2026

Walkthrough

Added a Phased Spec-Driven Development (SDD) protocol and supporting artifacts: a SPEC_WRITER persona, a TASK_SPEC template, and an sdd_implementation plan. Agent guidance in AGENTS.md and COMMUNICATION.md was updated to require phased specs and a complexity threshold for multi-file or architectural tasks.

Changes

Cohort / File(s) Summary
Core SDD Docs
prompts/agents/SPEC_WRITER.md, prompts/plans/sdd_implementation_v1.md
Added SPEC_WRITER persona and a multi-phase Phased Spec-Driven Development plan (phases, verification, human approval gates).
Specification Template
prompts/templates/TASK_SPEC.md
Introduced a TASK_SPEC template with Goal, Context, phased Tasks, Verification steps, WAIT FOR APPROVAL markers, and final deliverables.
Agent Guidance Updates
AGENTS.md, prompts/agents/COMMUNICATION.md
Inserted Phased SDD references, added Complexity item to decision checklist, and a Complexity Threshold policy requiring phased specs for tasks affecting >2 files, architectural changes, or new libraries.

Sequence Diagram(s)

sequenceDiagram
  rect rgba(100,150,250,0.5)
    participant User
  end
  rect rgba(150,200,100,0.5)
    participant SpecWriter
  end
  rect rgba(250,200,100,0.5)
    participant Agent
  end
  rect rgba(200,100,150,0.5)
    participant HumanApprover
  end

  User->>SpecWriter: Request complex change / provide context
  SpecWriter->>User: Ask clarifying questions (if needed)
  SpecWriter->>Agent: Produce Phased GSD Spec (Goal, Steps, Deliverables)
  Agent->>HumanApprover: Execute Phase 1 tasks, create verification artifacts
  HumanApprover-->>Agent: Approve or request revisions (gate)
  Agent->>HumanApprover: Execute subsequent phases per spec until final validation
  HumanApprover-->>User: Final approval / deliverables
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐇 I hopped through specs and plans so bright,
Phase by phase we chase the light,
Ask, draft, wait, then code with care,
Approval gates hum in the air,
Hooray—no vibes, just tidy bytes! ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Merge Conflict Detection ⚠️ Warning ❌ Merge conflicts detected (2 files):

⚔️ AGENTS.md (content)
⚔️ prompts/agents/COMMUNICATION.md (content)

These conflicts must be resolved before merging into develop.
Resolve conflicts locally and push changes to this branch.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Spec Driven Development Enforcement' accurately reflects the main objective of the PR, which introduces a comprehensive SDD methodology with enforcement mechanisms across multiple files (AGENTS.md, SPEC_WRITER.md, COMMUNICATION.md, and new templates).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dac_spec_plan_generate_prompt
⚔️ Resolve merge conflicts (beta)
  • Auto-commit resolved conflicts to branch dac_spec_plan_generate_prompt
  • Create stacked PR with resolved conflicts
  • Post resolved changes as copyable diffs in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.21%. Comparing base (2803ad6) to head (124f3d4).
⚠️ Report is 5 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #521   +/-   ##
==========================================
  Coverage      53.21%   53.21%           
  Complexity       518      518           
==========================================
  Files             69       69           
  Lines           2302     2302           
  Branches         329      329           
==========================================
  Hits            1225     1225           
  Misses           911      911           
  Partials         166      166           
Flag Coverage Δ
unittests 53.21% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
Before applying any fix, first verify the finding against the current code and
decide whether a code change is actually needed. If the finding is not valid or
no change is required, do not modify code for that item and briefly explain why
it was skipped.

In `@AGENTS.md`:
- Line 46: Standardize the SPEC_WRITER.md reference in AGENTS.md: replace the
abbreviated reference '@SPEC_WRITER.md' with the full relative path
'@./prompts/agents/SPEC_WRITER.md' (or vice versa if you prefer the short form)
so all mentions of SPEC_WRITER.md use the same syntax; search for both
'@./prompts/agents/SPEC_WRITER.md' and '@SPEC_WRITER.md' in AGENTS.md and make
them identical, preserving existing link behavior and formatting.

In `@prompts/agents/COMMUNICATION.md`:
- Line 3: Update the "Complexity Threshold" line in COMMUNICATION.md to include
an explicit path to the SDD Protocol document (replace "see SDD Protocol" with a
concrete reference like "see SDD Protocol (docs/SDD_PROTOCOL.md)" or the
project's canonical path used in AGENTS.md); edit the phrase containing
"Complexity Threshold" so it matches AGENTS.md's referencing style and ensure
the link or path points to the SDD Protocol file name or section so readers can
navigate directly.

In `@prompts/agents/SPEC_WRITER.md`:
- Line 9: Update the file reference in prompts/agents/SPEC_WRITER.md to match
the project's documented convention used in AGENTS.md by replacing the
backticked relative path `prompts/templates/TASK_SPEC.md` with the prefixed form
`@./prompts/templates/TASK_SPEC.md`; locate the string in the line containing
"GENERATE a Phased GSD Spec" and make the substitution so documentation
references are consistent across files.

In `@prompts/plans/sdd_implementation_v1.md`:
- Around line 69-95: The embedded TASK_SPEC.md template in
prompts/plans/sdd_implementation_v1.md duplicates the canonical template and
risks drift; remove the inline markdown block under "Task 1.4: Create
`TASK_SPEC.md` Template" and replace it with a short reference pointing to the
single source of truth prompts/templates/TASK_SPEC.md (e.g., "See
prompts/templates/TASK_SPEC.md for template structure"), keeping the task
description and links intact and ensuring the checklist item (Task 1.4) still
clearly instructs to create/verify the template.
- Around line 2-3: The document's filename sdd_implementation_v1.md conflicts
with the internal metadata "Version: 1.6.0"; reconcile them by either updating
the metadata Version field to "1.0.0" (or "1.0.0" style you use for initial
releases) or renaming the file to match the declared version (e.g.,
sdd_implementation_v1.6.0.md); ensure the chosen change is applied consistently
and update any references to this file/version elsewhere if present.
🧹 Nitpick comments (4)
🤖 Fix all nitpicks with AI agents
Before applying any fix, first verify the finding against the current code and
decide whether a code change is actually needed. If the finding is not valid or
no change is required, do not modify code for that item and briefly explain why
it was skipped.

In `@AGENTS.md`:
- Line 46: Standardize the SPEC_WRITER.md reference in AGENTS.md: replace the
abbreviated reference '@SPEC_WRITER.md' with the full relative path
'@./prompts/agents/SPEC_WRITER.md' (or vice versa if you prefer the short form)
so all mentions of SPEC_WRITER.md use the same syntax; search for both
'@./prompts/agents/SPEC_WRITER.md' and '@SPEC_WRITER.md' in AGENTS.md and make
them identical, preserving existing link behavior and formatting.

In `@prompts/agents/COMMUNICATION.md`:
- Line 3: Update the "Complexity Threshold" line in COMMUNICATION.md to include
an explicit path to the SDD Protocol document (replace "see SDD Protocol" with a
concrete reference like "see SDD Protocol (docs/SDD_PROTOCOL.md)" or the
project's canonical path used in AGENTS.md); edit the phrase containing
"Complexity Threshold" so it matches AGENTS.md's referencing style and ensure
the link or path points to the SDD Protocol file name or section so readers can
navigate directly.

In `@prompts/agents/SPEC_WRITER.md`:
- Line 9: Update the file reference in prompts/agents/SPEC_WRITER.md to match
the project's documented convention used in AGENTS.md by replacing the
backticked relative path `prompts/templates/TASK_SPEC.md` with the prefixed form
`@./prompts/templates/TASK_SPEC.md`; locate the string in the line containing
"GENERATE a Phased GSD Spec" and make the substitution so documentation
references are consistent across files.

In `@prompts/plans/sdd_implementation_v1.md`:
- Around line 2-3: The document's filename sdd_implementation_v1.md conflicts
with the internal metadata "Version: 1.6.0"; reconcile them by either updating
the metadata Version field to "1.0.0" (or "1.0.0" style you use for initial
releases) or renaming the file to match the declared version (e.g.,
sdd_implementation_v1.6.0.md); ensure the chosen change is applied consistently
and update any references to this file/version elsewhere if present.
prompts/plans/sdd_implementation_v1.md (1)

2-3: Version number appears inconsistent with filename.

The filename sdd_implementation_v1.md suggests this is version 1, but the document metadata specifies Version: 1.6.0. Consider either updating the version to 1.0.0 for a first release or adjusting the filename to reflect the 1.6.0 version if that's intentional.

🤖 Prompt for AI Agents
Before applying any fix, first verify the finding against the current code and
decide whether a code change is actually needed. If the finding is not valid or
no change is required, do not modify code for that item and briefly explain why
it was skipped.
In `@prompts/plans/sdd_implementation_v1.md` around lines 2 - 3, The document's
filename sdd_implementation_v1.md conflicts with the internal metadata "Version:
1.6.0"; reconcile them by either updating the metadata Version field to "1.0.0"
(or "1.0.0" style you use for initial releases) or renaming the file to match
the declared version (e.g., sdd_implementation_v1.6.0.md); ensure the chosen
change is applied consistently and update any references to this file/version
elsewhere if present.
prompts/agents/COMMUNICATION.md (1)

3-3: Add explicit reference to the SDD Protocol documentation.

The line mentions "see SDD Protocol" but doesn't specify where to find it. For better navigation and consistency with AGENTS.md's referencing style, consider adding an explicit path reference.

📖 Proposed improvement
-- **Complexity Threshold**: Any task affecting more than 2 files, involving architectural changes, or adding new libraries REQUIRES a Phased GSD Spec (see SDD Protocol).
+- **Complexity Threshold**: Any task affecting more than 2 files, involving architectural changes, or adding new libraries REQUIRES a Phased GSD Spec (see @./AGENTS.md#phased-spec-driven-development-sdd or @./prompts/plans/sdd_implementation_v1.md).
🤖 Prompt for AI Agents
Before applying any fix, first verify the finding against the current code and
decide whether a code change is actually needed. If the finding is not valid or
no change is required, do not modify code for that item and briefly explain why
it was skipped.
In `@prompts/agents/COMMUNICATION.md` at line 3, Update the "Complexity Threshold"
line in COMMUNICATION.md to include an explicit path to the SDD Protocol
document (replace "see SDD Protocol" with a concrete reference like "see SDD
Protocol (docs/SDD_PROTOCOL.md)" or the project's canonical path used in
AGENTS.md); edit the phrase containing "Complexity Threshold" so it matches
AGENTS.md's referencing style and ensure the link or path points to the SDD
Protocol file name or section so readers can navigate directly.
AGENTS.md (1)

46-46: Inconsistent file reference syntax within the same document.

Line 15 references the SPEC_WRITER.md file as @./prompts/agents/SPEC_WRITER.md (full relative path), while line 46 uses @SPEC_WRITER.md (abbreviated). For consistency and clarity, consider using the same reference format throughout the document.

🔧 Proposed fix for consistency
-3. **Complexity**: Does it require a Phased GSD Spec? (See `@SPEC_WRITER.md`)
+3. **Complexity**: Does it require a Phased GSD Spec? (See @./prompts/agents/SPEC_WRITER.md)
🤖 Prompt for AI Agents
Before applying any fix, first verify the finding against the current code and
decide whether a code change is actually needed. If the finding is not valid or
no change is required, do not modify code for that item and briefly explain why
it was skipped.
In `@AGENTS.md` at line 46, Standardize the SPEC_WRITER.md reference in AGENTS.md:
replace the abbreviated reference '@SPEC_WRITER.md' with the full relative path
'@./prompts/agents/SPEC_WRITER.md' (or vice versa if you prefer the short form)
so all mentions of SPEC_WRITER.md use the same syntax; search for both
'@./prompts/agents/SPEC_WRITER.md' and '@SPEC_WRITER.md' in AGENTS.md and make
them identical, preserving existing link behavior and formatting.
prompts/agents/SPEC_WRITER.md (1)

9-9: Consider standardizing file reference syntax across the documentation.

This file uses backticks with relative paths (e.g., prompts/templates/TASK_SPEC.md), while AGENTS.md uses the @./ prefix (e.g., @./prompts/templates/TASK_SPEC.md). Standardizing the reference syntax across all documentation files would improve consistency and reduce potential confusion.

🤖 Prompt for AI Agents
Before applying any fix, first verify the finding against the current code and
decide whether a code change is actually needed. If the finding is not valid or
no change is required, do not modify code for that item and briefly explain why
it was skipped.
In `@prompts/agents/SPEC_WRITER.md` at line 9, Update the file reference in
prompts/agents/SPEC_WRITER.md to match the project's documented convention used
in AGENTS.md by replacing the backticked relative path
`prompts/templates/TASK_SPEC.md` with the prefixed form
`@./prompts/templates/TASK_SPEC.md`; locate the string in the line containing
"GENERATE a Phased GSD Spec" and make the substitution so documentation
references are consistent across files.

Comment thread prompts/plans/sdd_implementation_v1.md
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
Verify each finding against the current code and only fix it if needed.


In `@prompts/plans/sdd_implementation_v1.md`:
- Around line 114-116: Update the Task 2.2 file list so the platform name is
capitalized: in the bullet under "Task 2.2: Generate Agent-Specific
Configuration Files" replace the lowercase "github" reference with "GitHub"
(e.g., change the item to reference GitHub `.github/copilot-instructions.md` or
prefix the path with "GitHub: `.github/copilot-instructions.md`), ensuring the
platform name "GitHub" is used instead of "github" in the file list.

Comment thread prompts/plans/sdd_implementation_v1.md
@kingargyle kingargyle merged commit 0c0a6ce into develop Feb 16, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant