@onuraslan/sdd 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +184 -0
- package/bin/sdd.js +9 -0
- package/cli/index.js +74 -0
- package/cli/install.js +156 -0
- package/cli/prompts.js +98 -0
- package/cli/skills.js +56 -0
- package/cli/targets.js +69 -0
- package/package.json +23 -0
- package/sdd/plugin.json +10 -0
- package/sdd/skills/chicago-tdd/SKILL.md +26 -0
- package/sdd/skills/deep-spec/SKILL.md +69 -0
- package/sdd/skills/deep-spec/spec-format.md +32 -0
- package/sdd/skills/feature-implementer/SKILL.md +48 -0
- package/sdd/skills/feature-implementer/reference/task-implementer.md +5 -0
- package/sdd/skills/implementer/SKILL.md +11 -0
- package/sdd/skills/prd-test-writer/SKILL.md +86 -0
- package/sdd/skills/prd-test-writer/references/user-story-test-writer-prompt.md +12 -0
- package/sdd/skills/prd-to-task/SKILL.md +51 -0
- package/sdd/skills/prd-to-task/reference/ascii-mock-format.md +67 -0
- package/sdd/skills/prd-to-task/reference/feature-template.md +20 -0
- package/sdd/skills/prd-to-task/reference/task-template.md +63 -0
- package/sdd/skills/spec-to-prd/SKILL.md +76 -0
- package/sdd/skills/spec-to-prd/references/mapping-guide.md +95 -0
- package/sdd/skills/spec-to-prd/references/prd-format.md +122 -0
- package/sdd/skills/workflow-generator/SKILL.md +60 -0
- package/sdd/skills/workflow-generator/reference/workflow-bug-fix-backend.md +35 -0
- package/sdd/skills/workflow-generator/reference/workflow-bug-fix-frontend.md +34 -0
- package/sdd/skills/workflow-generator/reference/workflow-enhancement-backend.md +35 -0
- package/sdd/skills/workflow-generator/reference/workflow-enhancement-frontend.md +34 -0
- package/sdd/skills/workflow-generator/reference/workflow-feature-development-backend.md +105 -0
- package/sdd/skills/workflow-generator/reference/workflow-feature-frontend-development.md +78 -0
- package/sdd-backend/plugin.json +10 -0
- package/sdd-backend/skills/backend-enhancement/SKILL.md +54 -0
- package/sdd-backend/skills/bug-fix-backend/SKILL.md +21 -0
- package/sdd-backend/skills/verify-with-curl/SKILL.md +8 -0
- package/sdd-frontend/.mcp.json +8 -0
- package/sdd-frontend/plugin.json +10 -0
- package/sdd-frontend/skills/bug-fix-frontend/SKILL.md +15 -0
- package/sdd-frontend/skills/feature-e2e-verifier/SKILL.md +64 -0
- package/sdd-frontend/skills/feature-e2e-verifier/reference/e2e-verifier.md +17 -0
- package/sdd-frontend/skills/frontend-enhancement/SKILL.md +44 -0
- package/sdd-frontend/skills/git-cleanup-playwright-artifacts/SKILL.md +7 -0
- package/sdd-frontend/skills/ui-heuristic-click-audit/SKILL.md +168 -0
- package/sdd-frontend/skills/ui-heuristic-click-audit/references/checklist.md +72 -0
- package/sdd-frontend/skills/using-playwright-mcp/SKILL.md +7 -0
- package/sdd-frontend/skills/verify-with-playwright-mcp/SKILL.md +14 -0
- package/sdd-utility/plugin.json +10 -0
- package/sdd-utility/skills/ask-first/SKILL.md +30 -0
- package/sdd-utility/skills/buy-before-build/SKILL.md +11 -0
- package/sdd-utility/skills/code-slop-review/SKILL.md +134 -0
- package/sdd-utility/skills/code-slop-review/references/agent-prompt.md +110 -0
- package/sdd-utility/skills/code-slop-review/references/aggregate-and-report.md +62 -0
- package/sdd-utility/skills/code-slop-review/references/architecture-slop.md +126 -0
- package/sdd-utility/skills/code-slop-review/references/dead-code-slop.md +107 -0
- package/sdd-utility/skills/code-slop-review/references/error-handling-slop.md +101 -0
- package/sdd-utility/skills/code-slop-review/references/final-report-template.md +55 -0
- package/sdd-utility/skills/code-slop-review/references/fix-mode.md +68 -0
- package/sdd-utility/skills/code-slop-review/references/structural-slop.md +150 -0
- package/sdd-utility/skills/code-slop-review/references/test-slop.md +88 -0
- package/sdd-utility/skills/gap-analysis/SKILL.md +7 -0
- package/sdd-utility/skills/glossary-builder/SKILL.md +28 -0
- package/sdd-utility/skills/grounded-mode/SKILL.md +13 -0
- package/sdd-utility/skills/handoff/SKILL.md +67 -0
- package/sdd-utility/skills/handoff-resume/SKILL.md +15 -0
- package/sdd-utility/skills/init-feature/SKILL.md +63 -0
- package/sdd-utility/skills/init-feature/references/explorer-prompt.md +58 -0
- package/sdd-utility/skills/init-feature/references/prd-format.md +122 -0
- package/sdd-utility/skills/init-feature/references/prd-writer-prompt.md +23 -0
- package/sdd-utility/skills/using-glossary/SKILL.md +11 -0
package/sdd/plugin.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "sdd",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Automated workflows for feature development and bug fixing using plan-driven development. Spec-Driven Development (SDD) from planning to Jira export. Modular plugin structure with sdd-frontend, sdd-init, and sdd-utilty sub-plugins.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name":"Onur ASLAN"
|
|
7
|
+
},
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"homepage": "https://github.com/onur-aslan/sdd"
|
|
10
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: chicago-tdd
|
|
3
|
+
description: Apply Chicago School TDD with a strict red-green cycle.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
You are an expert software engineer who strictly adheres to the Chicago School of TDD (Classic TDD). Your mission is to apply Classic TDD to the Scenarios of a given task using a strict Red-Green cycle. Mock only external boundaries. No internal mocks. All codes must be written with best practices. Follow the workflow below and do not skip any step.
|
|
7
|
+
|
|
8
|
+
# IRON LAWS
|
|
9
|
+
- **Test before implementation - never write code without a failing test**
|
|
10
|
+
- **One test at a time.**
|
|
11
|
+
- **Test behavior, not internal implementation details.**
|
|
12
|
+
|
|
13
|
+
# WORKFLOW
|
|
14
|
+
|
|
15
|
+
## Step 1: Happy Path
|
|
16
|
+
- Write test for ONLY happy path scenario one at a time.
|
|
17
|
+
- Run RED: Verify the happy path test fails at runtime (no compile errors).
|
|
18
|
+
- Run GREEN: Write minimal code to make the happy path test pass.
|
|
19
|
+
|
|
20
|
+
## Step 2: Edge Cases
|
|
21
|
+
- Write tests for ALL remaining edge case scenarios one at a time
|
|
22
|
+
- Run RED: Verify all edge case tests fail at runtime (no compile errors).
|
|
23
|
+
- Run GREEN: Write minimal code to make ALL edge case tests pass
|
|
24
|
+
|
|
25
|
+
## Step 3: Done
|
|
26
|
+
- Update the task's Status in `feature.md` to Done
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deep-spec
|
|
3
|
+
description: Conducts an interview-driven design session using a multi-level zoom approach (L5:Domain to L1:Line), producing a structured spec.md under docs/sdd/features/. Use when user mentions "deep-spec", "spec-designer", or wants to design a new feature through guided questioning.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. Ask very detailed design questions. Expose hidden assumptions. Ask the questions one at a time. Do not use AskUserQuestion Tool. Do not implement, write code, or modify source files — this skill only creates the spec.
|
|
8
|
+
|
|
9
|
+
## Zoom & Tour Integration
|
|
10
|
+
|
|
11
|
+
**Zoom Levels:** L5:Domain → L4:System → L3:Component → L2:Function → L1:Line
|
|
12
|
+
|
|
13
|
+
**Tour Tracking:**
|
|
14
|
+
- Track `currentZoom` L{M}: {LevelName} (starts with optimal zoom level)
|
|
15
|
+
- Track `currentTour` number as {N} (starts at 1)
|
|
16
|
+
- Track `tourQuestions` count per tour
|
|
17
|
+
- Announce: `🎯 Tour {N} (L{M}: {LevelName}) — Question {K}`
|
|
18
|
+
|
|
19
|
+
After each design decision within a tour, continue questioning. Track current zoom level and announce it.
|
|
20
|
+
## Steps
|
|
21
|
+
|
|
22
|
+
**Step 1.** Announce: `🎯 Starting Tour {N} at L{M}: {LevelName}...`
|
|
23
|
+
Explore the codebase at current zoom level — only once per tour.
|
|
24
|
+
|
|
25
|
+
**Step 2.** Deep Think about next design question at current zoom level.
|
|
26
|
+
Announce: `🎯 Tour {N} (L{M}: {LevelName}) — Question {K}`
|
|
27
|
+
|
|
28
|
+
**Step 3.** Ask one design question with options, ASCII mock, and recommendation.
|
|
29
|
+
|
|
30
|
+
Format:
|
|
31
|
+
```
|
|
32
|
+
[Question text]?
|
|
33
|
+
|
|
34
|
+
A) [Option A title]
|
|
35
|
+
[ASCII mock for A]
|
|
36
|
+
|
|
37
|
+
B) [Option B title]
|
|
38
|
+
[ASCII mock for B]
|
|
39
|
+
|
|
40
|
+
C) [Option C title]
|
|
41
|
+
[ASCII mock for C]
|
|
42
|
+
|
|
43
|
+
✅ Recommended: [A/B/C] — [one-line reason]
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Step 4.** After user answers, keep the decision in context (do not write to file yet).
|
|
47
|
+
- If there are more design questions at this zoom level → Go To Step 2
|
|
48
|
+
- If no more meaningful questions at this level → Proceed to Step 5 (End of Tour)
|
|
49
|
+
|
|
50
|
+
**Step 5. End of Tour.** Announce current tour and zoom level. Ask:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
🎯 Tour {N} complete at L{M}: {LevelName}.
|
|
54
|
+
|
|
55
|
+
A) Zoom deeper — start Tour {N+1} at L{M-1} (implementation details)
|
|
56
|
+
B) Done — finalize spec
|
|
57
|
+
|
|
58
|
+
✅ Recommended: [A/B] — [one-line reason based on plan complexity]
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**If user selects A (Zoom deeper):** Announce `🎯 Starting Tour {N+1} at L{M-1}...`, keep `askedQuestions` intact (do not reset), and Go To Step 2. Probe only new, deeper questions that have not been asked before — never re-ask a question from an earlier tour.
|
|
62
|
+
|
|
63
|
+
**If user selects B (Done):** Read [spec-format.md](spec-format.md) and write `docs/sdd/features/<feature-name>/spec.md` directly with the collected decisions.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Next Step
|
|
68
|
+
|
|
69
|
+
**→ `/spec-to-prd`**
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Spec Format
|
|
2
|
+
|
|
3
|
+
Write the following file at `docs/sdd/features/<feature-name>/spec.md`.
|
|
4
|
+
|
|
5
|
+
Use the collected design decisions from all tours to fill it in. Nothing else.
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
# Feature: [Feature Name]
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
[One-paragraph summary of what this feature does, derived from the user's initial request and tour context.]
|
|
12
|
+
|
|
13
|
+
## Design Decisions
|
|
14
|
+
|
|
15
|
+
### [Category]
|
|
16
|
+
|
|
17
|
+
**Decision:** [What was chosen]
|
|
18
|
+
|
|
19
|
+
**Decision:** [What was chosen]
|
|
20
|
+
|
|
21
|
+
## Visual Mock
|
|
22
|
+
[If there are any visual/UI decisions, include visual mockups, wireframes, or layout descriptions here. If none, omit this section.]
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Rules
|
|
26
|
+
|
|
27
|
+
- Group decisions by logical category (UI, data, architecture, integration, etc.)
|
|
28
|
+
- Capture final decision and key reasoning if multiple rounds of discussion
|
|
29
|
+
- Include constraints and assumptions discovered during questioning
|
|
30
|
+
- Do NOT include any code
|
|
31
|
+
- Do NOT invent new decisions — only what was explicitly captured during tours
|
|
32
|
+
- Do NOT include task lists, vertical slices, priorities, or implementation plans — this file is decisions only
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: feature-implementer
|
|
3
|
+
description: Orchestrates feature implementation by sequentially delegating tasks to task-implementer agent based on feature.md task order.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
You are an orchestrator agent that implements features by sequentially delegating tasks to the task-implementer agent. Your role is to read a feature.md file, identify pending tasks, and invoke task-implementer for each task in the correct order.
|
|
7
|
+
|
|
8
|
+
# Workflow
|
|
9
|
+
|
|
10
|
+
## Step 1: Find Next Pending Task
|
|
11
|
+
|
|
12
|
+
From the Task Order table, find the **first** task that meets these criteria:
|
|
13
|
+
1. Status is `Todo` or `Pending`
|
|
14
|
+
2. All tasks it depends on have status `Done`
|
|
15
|
+
|
|
16
|
+
If no tasks are pending (all are `Done`), the feature implementation is complete. Report this to the user and stop.
|
|
17
|
+
|
|
18
|
+
Wait for user confirmation.
|
|
19
|
+
|
|
20
|
+
## Step 2: Invoke Task-Implementer
|
|
21
|
+
|
|
22
|
+
Spawn a fresh `general_purpose` subagent with prompt [reference/task-implementer.md](reference/task-implementer.md).
|
|
23
|
+
|
|
24
|
+
Wait for task-implementer to complete.
|
|
25
|
+
|
|
26
|
+
## Step 3: Verify and Continue
|
|
27
|
+
|
|
28
|
+
After task-implementer completes:
|
|
29
|
+
1. Update the task status to `Done` in feature.md
|
|
30
|
+
2. Check build and logs for any errors
|
|
31
|
+
|
|
32
|
+
If successful, return to **Step 2** to find the next pending task.
|
|
33
|
+
|
|
34
|
+
If failed, report the issue to the user and wait for guidance.
|
|
35
|
+
|
|
36
|
+
# Principles
|
|
37
|
+
|
|
38
|
+
- **Sequential execution**: Only one task at a time, respecting dependencies
|
|
39
|
+
- **No parallel tasks**: Wait for each task to complete before starting the next
|
|
40
|
+
- **Dependency-aware**: Never start a task before its dependencies are done
|
|
41
|
+
- **Minimal orchestration**: Delegate implementation to task-implementer, don't implement yourself
|
|
42
|
+
|
|
43
|
+
# Input
|
|
44
|
+
- Feature file: `docs/sdd/features/<feature>/feature.md`
|
|
45
|
+
|
|
46
|
+
# Output
|
|
47
|
+
- Updated feature.md with completed tasks
|
|
48
|
+
- Implemented code for each task
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
Task tool (general-purpose):
|
|
2
|
+
description: "Implement Task N: [task name]"
|
|
3
|
+
|
|
4
|
+
prompt:
|
|
5
|
+
Implement the task at `docs/sdd/features/<feature>/tasks/<task-name>.md`. Read the task definition, extract the Implementation Steps, and create a ToDoWrite task list with a parent task and child tasks for each step. Implement each step sequentially, running build/compile after each to verify and fix errors. Finally, perform a gap analysis comparing the implementation against the task requirements and acceptance criteria.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: implementer
|
|
3
|
+
description: Implement the current context into code and verify it builds cleanly.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Implement whatever has been defined in the current context by writing/modifying code. Run build/compile to verify no errors. Fix any build errors. Then perform a gap analysis comparing what was implemented against the original requirements.
|
|
8
|
+
|
|
9
|
+
## Out of scope
|
|
10
|
+
|
|
11
|
+
- Writing tests
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: prd-test-writer
|
|
3
|
+
description: Orchestrates test writing for each User Story's Acceptance Criteria (AC) in a PRD. Uses general-purpose Task Tool in parallel for each US. Orchestrator writes all reports from agent output.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# PRD Test Writer
|
|
8
|
+
|
|
9
|
+
Announce at start: "prd-test-writer: Analyzing PRD for User Stories and Acceptance Criteria..."
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Workflow
|
|
14
|
+
|
|
15
|
+
### Step 1. Read PRD and Extract User Stories
|
|
16
|
+
|
|
17
|
+
Read `docs/sdd/features/<feature-name>/prd.md` and extract:
|
|
18
|
+
- All User Stories from the User Stories table (Section 5)
|
|
19
|
+
- For each User Story: ID (US-01, US-02, etc.), description, and Acceptance Criteria list
|
|
20
|
+
|
|
21
|
+
**Validation:** If no User Stories found, exit with: "No User Stories found in PRD"
|
|
22
|
+
|
|
23
|
+
### Step 2. Spawn Task Tools in Parallel
|
|
24
|
+
|
|
25
|
+
For each User Story that needs tests, use the Task tool with `subagent_type=general-purpose`.
|
|
26
|
+
|
|
27
|
+
Read the template at [references/user-story-test-writer-prompt.md](references/user-story-test-writer-prompt.md) and replace placeholders:
|
|
28
|
+
|
|
29
|
+
| Placeholder | Value |
|
|
30
|
+
|---|---|
|
|
31
|
+
| `<us-id>` | e.g. US-01 |
|
|
32
|
+
| `<us-description>` | Full User Story text |
|
|
33
|
+
| `<ac-list>` | Bulleted Acceptance Criteria (one per line, each prefixed with `- `) |
|
|
34
|
+
|
|
35
|
+
**Announce:** "Launching <N> test-writer tasks in parallel..."
|
|
36
|
+
|
|
37
|
+
### Step 3. Wait for All Tasks to Complete
|
|
38
|
+
|
|
39
|
+
Wait for all parallel test-writer tasks to finish.
|
|
40
|
+
|
|
41
|
+
### Step 4. Aggregate Results
|
|
42
|
+
|
|
43
|
+
Collect results from all test-writer tasks:
|
|
44
|
+
- ✅ Passed: User Stories with tests written successfully
|
|
45
|
+
- ❌ Failed: User Stories where test writing failed
|
|
46
|
+
|
|
47
|
+
For each successful task, extract from the agent output:
|
|
48
|
+
- Test file path created (must start with `US_` prefix, e.g., `US_01-*.test.ts`)
|
|
49
|
+
- Test count
|
|
50
|
+
- AC coverage details
|
|
51
|
+
|
|
52
|
+
### Step 5. Generate Feature Test Report
|
|
53
|
+
|
|
54
|
+
Write `docs/sdd/features/<feature-name>/test-report.md`:
|
|
55
|
+
|
|
56
|
+
```markdown
|
|
57
|
+
# Feature Test Report: <feature-name>
|
|
58
|
+
|
|
59
|
+
| Metadata | Value |
|
|
60
|
+
|----------|-------|
|
|
61
|
+
| Feature | <feature-name> |
|
|
62
|
+
| PRD | docs/sdd/features/<feature-name>/prd.md |
|
|
63
|
+
| Total User Stories | <N> |
|
|
64
|
+
| Tests Written | <N> |
|
|
65
|
+
|
|
66
|
+
## User Story Results
|
|
67
|
+
|
|
68
|
+
| US-ID | Description | Test File | Status | Test Count |
|
|
69
|
+
|-------|-------------|-----------|--------|------------|
|
|
70
|
+
| US-01 | ... | US_01-*.test.ts | ✅ | 5 |
|
|
71
|
+
| US-02 | ... | US_02-*.test.ts | ✅ | 3 |
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Step 6. Finish
|
|
75
|
+
|
|
76
|
+
Announce completion with summary: feature name, user stories processed, tests written, and report location.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Principles
|
|
81
|
+
|
|
82
|
+
- **Parallel Execution**: All test-writer tasks run in parallel for speed
|
|
83
|
+
- **AC-Driven**: Tests are derived from Acceptance Criteria only
|
|
84
|
+
- **No Source Modifications**: This skill only writes tests, never modifies production code
|
|
85
|
+
- **Orchestrator Writes Reports**: Test-writer agents return results directly; the orchestrator writes all reports
|
|
86
|
+
- **Aggregated Report**: One feature-level report summarizes all results
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Task tool (general-purpose):
|
|
2
|
+
description: "Write unit tests for <us-id>"
|
|
3
|
+
|
|
4
|
+
prompt:
|
|
5
|
+
Write unit tests for the following User Story by analyzing the source code and following existing test patterns in the codebase. Write tests for EACH Acceptance Criterion, including happy path, edge cases, and error handling. Tests must be derived from Acceptance Criteria only — do not invent requirements. Each test should be isolated and deterministic. Prefer mocking external dependencies (APIs, databases) unless integration tests are requested. Use the existing test framework (Jest, Vitest, pytest, etc.). Do NOT modify any source code — only write tests.
|
|
6
|
+
|
|
7
|
+
**Naming Convention:** Test files MUST start with `US_` prefix followed by the US ID (e.g., `US_01-*.test.ts`, `US_02-*.test.ts`) to indicate they were generated by prd-test-writer.
|
|
8
|
+
|
|
9
|
+
## Input
|
|
10
|
+
<us-description>
|
|
11
|
+
|
|
12
|
+
<ac-list>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: prd-to-task
|
|
3
|
+
description: Convert a PRD into an ordered task list with explicit implementation steps.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
This skill processes workflow step by step. Each step must be done as if Steps are prompted by user then user see result and then prompt next step. You are like an orchestrator for user prompt. **Wait user confirmation at the end of each step**.
|
|
7
|
+
|
|
8
|
+
Gherkin Scenario outcomes (`Then` `And` blocks) must be **implementation-agnostic** and testable at the service/use-case boundary. Scenarios will serve as **integration test specifications** — structured for automated test generation. Avoid flakky test scenarios.
|
|
9
|
+
|
|
10
|
+
# Workflow
|
|
11
|
+
|
|
12
|
+
## Step 1. External Interface Analysis
|
|
13
|
+
|
|
14
|
+
Analyze the PRD to identify which external interfaces this feature uses.
|
|
15
|
+
|
|
16
|
+
1. **Identify Layers:** List all architectural layers this feature touches
|
|
17
|
+
2. **Identify Bottom-External-Interface:** Determine the lowest external interface
|
|
18
|
+
3. **Define Vertical-Slice Tasks:** Each vertical slice = one top interface component → one bottom-external-interface flow
|
|
19
|
+
4. **Generate ASCII Mock:** Create ASCII diagrams showing how vertical slices cut through layers
|
|
20
|
+
- First show the Layer Overview Diagram (all layers + components)
|
|
21
|
+
- Then show one Vertical Slice Detail Diagram per slice
|
|
22
|
+
- Follow format in [reference/ascii-mock-format.md](reference/ascii-mock-format.md)
|
|
23
|
+
|
|
24
|
+
**Wait for user confirmation.**
|
|
25
|
+
|
|
26
|
+
## Step 2. Define Happy-Path Scenario
|
|
27
|
+
|
|
28
|
+
Define only one end-to-end happy-path scenario for each [vertical-slice] task.
|
|
29
|
+
|
|
30
|
+
**Wait for user confirmation.**
|
|
31
|
+
|
|
32
|
+
## Step 3. Define Edge-Case Scenarios
|
|
33
|
+
|
|
34
|
+
Define only critical end-to-end scenarios other than the [happy-path-scenario] for each [vertical-slice]
|
|
35
|
+
|
|
36
|
+
**Wait for user confirmation.**
|
|
37
|
+
|
|
38
|
+
## Step 4. Define Task Dependencies
|
|
39
|
+
|
|
40
|
+
Map dependencies between [vertical-slice] tasks exclude [enabler] and [cross-cutting] Tasks since they are merged into [vertical-slice] tasks. Determine execution order. Generate an ASCII dependency graph.
|
|
41
|
+
|
|
42
|
+
**Wait for user confirmation.**
|
|
43
|
+
|
|
44
|
+
# Input
|
|
45
|
+
- prd.md
|
|
46
|
+
# Output
|
|
47
|
+
- Write feature.md file strictly following [reference/feature-template.md](reference/feature-template.md) format.
|
|
48
|
+
- Write ONLY [vertical-slice] tasks strictly following [reference/task-template.md](reference/task-template.md) format. Do not write [enabler] and [cross-cutting] tasks.
|
|
49
|
+
|
|
50
|
+
# Out Of Scope
|
|
51
|
+
- Test outcomes which can be verified by UI tests
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# ASCII Mock Format for Vertical Slices
|
|
2
|
+
|
|
3
|
+
## Layer Overview Diagram
|
|
4
|
+
|
|
5
|
+
Show all layers and their components at a glance:
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
LAYER DIAGRAM
|
|
9
|
+
┌────────────────────────────────────────────┐
|
|
10
|
+
│ PRESENTATION │
|
|
11
|
+
│ ┌────────┐ ┌────────┐ ┌────────┐ │
|
|
12
|
+
│ │ Screen │ │ Widget │ │ Dialog │ │
|
|
13
|
+
│ └───┬────┘ └───┬────┘ └───┬────┘ │
|
|
14
|
+
├──────┼──────────┼──────────┼──────────────┤
|
|
15
|
+
│ DOMAIN │ │ │
|
|
16
|
+
│ ┌───┴────┐ ┌──┴───┐ ┌──┴─────┐ │
|
|
17
|
+
│ │UseCase │ │Service│ │Manager │ │
|
|
18
|
+
│ └───┬────┘ └──┬───┘ └──┬─────┘ │
|
|
19
|
+
├──────┼──────────┼──────────┼──────────────┤
|
|
20
|
+
│ DATA │ │ │
|
|
21
|
+
│ ┌───┴────┐ ┌──┴───┐ ┌──┴─────┐ │
|
|
22
|
+
│ │ Repo │ │Gateway│ │ Store │ │
|
|
23
|
+
│ └───┬────┘ └──┬───┘ └──┬─────┘ │
|
|
24
|
+
├──────┼──────────┼──────────┼──────────────┤
|
|
25
|
+
│ EXTERNAL ▼ ▼ │
|
|
26
|
+
│ ┌────────┐ ┌────────┐ ┌────────┐ │
|
|
27
|
+
│ │REST API│ │ gRPC │ │ Queue │ │
|
|
28
|
+
│ └────────┘ └────────┘ └────────┘ │
|
|
29
|
+
└────────────────────────────────────────────┘
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Vertical Slice Detail Diagram
|
|
33
|
+
|
|
34
|
+
Create one diagram per vertical slice, showing how it cuts through all layers:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
VERTICAL SLICE 1: Read User Profile
|
|
38
|
+
────────────────────────────────────
|
|
39
|
+
|
|
40
|
+
┌──────────────┐
|
|
41
|
+
│ Screen │ ◄── ENTRY: User opens profile page
|
|
42
|
+
└──────┬───────┘
|
|
43
|
+
│
|
|
44
|
+
▼ ════════════════════════════
|
|
45
|
+
┌──────────────┐
|
|
46
|
+
│ UseCase │ ◄── Business logic: GetUserProfile
|
|
47
|
+
└──────┬───────┘
|
|
48
|
+
│
|
|
49
|
+
▼ ════════════════════════════
|
|
50
|
+
┌──────────────┐
|
|
51
|
+
│ Repository │ ◄── Data access layer
|
|
52
|
+
└──────┬───────┘
|
|
53
|
+
│
|
|
54
|
+
▼ ════════════════════════════
|
|
55
|
+
┌──────────────┐
|
|
56
|
+
│ REST API │ ◄── EXIT: GET /api/users/:id
|
|
57
|
+
└──────────────┘
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Rules
|
|
61
|
+
|
|
62
|
+
- Show each vertical slice as a separate diagram
|
|
63
|
+
- Use `▼` for flow direction
|
|
64
|
+
- Use `═══` marks to highlight the slice path through layers
|
|
65
|
+
- Label ENTRY (top) and EXIT (bottom) points clearly
|
|
66
|
+
- Include a one-line description at each layer (what happens at that step)
|
|
67
|
+
- Include a brief description of what the slice validates (in the title)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Feature Format
|
|
2
|
+
## Location
|
|
3
|
+
Path: `docs/sdd/features/<feature-name>/feature.md`
|
|
4
|
+
|
|
5
|
+
## Structure
|
|
6
|
+
```markdown
|
|
7
|
+
# Execution Plan
|
|
8
|
+
|
|
9
|
+
## Task Order
|
|
10
|
+
|
|
11
|
+
| # | Task | File | Status | Depends On |
|
|
12
|
+
|---|------|------|--------|------------|
|
|
13
|
+
| 1 | [Task name] | [task1_{task-name}.md](tasks/task1_{task-name}.md) | Pending | — |
|
|
14
|
+
| 2 | [Task name] | [task2_{task-name}.md](tasks/task2_{task-name}.md) | Pending | Task 1 |
|
|
15
|
+
| 3 | [Task name] | [task3_{task-name}.md](tasks/task3_{task-name}.md) | Pending | Task 1 |
|
|
16
|
+
| 4 | [Task name] | [task4_{task-name}.md](tasks/task4_{task-name}.md) | Pending | Task 2, Task 3 |
|
|
17
|
+
|
|
18
|
+
## Notes
|
|
19
|
+
[Sequencing decisions that are not obvious from the dependency graph. If empty, omit this section.]
|
|
20
|
+
```
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Task Definition Format
|
|
2
|
+
|
|
3
|
+
## Rules
|
|
4
|
+
|
|
5
|
+
- Task definition files must be self-contained — do not reference spec.md or prd.md. Copy all necessary context, decisions, and constraints into the task file
|
|
6
|
+
- No gap between the task files and prd. Cumulative tasks context must cover prd.
|
|
7
|
+
- All context must be in the task file to implement.
|
|
8
|
+
- If Gherkin applies: every task must have at least one happy path, one edge case, one negative path scenario — in that order
|
|
9
|
+
- Never invent quantitative or hardware constraint values — only use values explicitly stated in prd.md
|
|
10
|
+
|
|
11
|
+
## Location
|
|
12
|
+
Path: `docs/sdd/features/<feature-name>/tasks/<task-name>.md`
|
|
13
|
+
|
|
14
|
+
## Structure
|
|
15
|
+
```markdown
|
|
16
|
+
# [Task Name]
|
|
17
|
+
|
|
18
|
+
## Task-Meta
|
|
19
|
+
- Feature: <feature-name>
|
|
20
|
+
- Status: ⬜ Todo | 🔴 In Progress | ✅ Done
|
|
21
|
+
|
|
22
|
+
## Context
|
|
23
|
+
[2-3 sentences summarizing what this task does and why it matters. Written for executives/stakeholders who won't read the full document.]
|
|
24
|
+
|
|
25
|
+
## Design/Implementation Decisions
|
|
26
|
+
|
|
27
|
+
### [Category]
|
|
28
|
+
|
|
29
|
+
**Decision:** [What was chosen]
|
|
30
|
+
|
|
31
|
+
**Decision:** [What was chosen]
|
|
32
|
+
|
|
33
|
+
## Visual Mock
|
|
34
|
+
[If there are any visual/UI decisions, include visual mockups, wireframes, or layout descriptions here. If none, omit this section.]
|
|
35
|
+
|
|
36
|
+
## Implmenetation Steps
|
|
37
|
+
[Pre non-tdd task]
|
|
38
|
+
[A short implementations steps in order to do this task.]
|
|
39
|
+
|
|
40
|
+
## Out of Scopes
|
|
41
|
+
[Not to be done in this task]
|
|
42
|
+
|
|
43
|
+
## Scenarios
|
|
44
|
+
|
|
45
|
+
### ✅ [Happy Path]
|
|
46
|
+
> Story happy path — 1 only
|
|
47
|
+
**Given** [system state / precondition]
|
|
48
|
+
**When** `[call / action + exact input]`
|
|
49
|
+
**Then** `[expected result / return]`
|
|
50
|
+
**And** `[if critical]`
|
|
51
|
+
|
|
52
|
+
### ⬜ [Edge Case]
|
|
53
|
+
> AC: PROJ-10
|
|
54
|
+
**Given** [precondition]
|
|
55
|
+
**When** `[call + invalid / bad input]`
|
|
56
|
+
**Then** `[error / signal / rejection]`
|
|
57
|
+
**And** `[if critical]`
|
|
58
|
+
|
|
59
|
+
## Conventions
|
|
60
|
+
- Naming: `[test naming rule]`
|
|
61
|
+
- Mock: [what is replaced with what]
|
|
62
|
+
- Seed: [how initial state is set up]
|
|
63
|
+
```
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec-to-prd
|
|
3
|
+
description: Converts spec.md files into PRD (Product Requirements Document) format. Use when user says "spec-to-prd", "convert to PRD", "write PRD from spec", or wants to generate a product requirements document from an existing feature spec.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Spec to PRD Converter
|
|
8
|
+
|
|
9
|
+
Transforms `spec.md` (technical specification with design decisions) into `prd.md` suitable for stakeholder review and product planning.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Workflow
|
|
14
|
+
|
|
15
|
+
### Step 1: Locate and Read spec.md
|
|
16
|
+
|
|
17
|
+
**Announce:** "Step 1: Reading spec.md..."
|
|
18
|
+
|
|
19
|
+
Find and read `docs/sdd/features/<feature-name>/spec.md`. Extract:
|
|
20
|
+
- Feature name (from `# Feature: [Name]`)
|
|
21
|
+
- Overview/summary
|
|
22
|
+
- All design decisions with rationales
|
|
23
|
+
- Any visual mockups or UX notes
|
|
24
|
+
|
|
25
|
+
**Validation:** If spec.md does not exist, exit with error: "spec.md not found at docs/sdd/features/<feature-name>/spec.md"
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
### Step 2: Analyze for PRD Content
|
|
30
|
+
|
|
31
|
+
**Announce:** "Step 2: Analyzing spec for PRD content..."
|
|
32
|
+
- Explore the repo to understand the current state of codebase, if you haven't already.
|
|
33
|
+
- Read [references/mapping-guide.md](references/mapping-guide.md). Apply the mapping table and inference rules to extract PRD content from spec.md design decisions.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
### Step 3: Generate prd.md
|
|
38
|
+
|
|
39
|
+
**Announce:** "Step 3: Generating prd.md..."
|
|
40
|
+
|
|
41
|
+
- Read [references/prd-format.md](references/prd-format.md). Use strictly this format and write `docs/sdd/features/<feature-name>/prd.md` following the template structure.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
### Step 4: Report Output
|
|
46
|
+
|
|
47
|
+
**Announce:** "Step 4: PRD generation complete"
|
|
48
|
+
|
|
49
|
+
Report to the user:
|
|
50
|
+
1. Path to generated PRD: `docs/sdd/features/<feature-name>/prd.md`
|
|
51
|
+
2. Sections that need stakeholder input (marked as TBD)
|
|
52
|
+
3. Any gaps where spec.md lacked sufficient detail for PRD completeness
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Edge Cases
|
|
57
|
+
|
|
58
|
+
### Missing spec.md
|
|
59
|
+
**Error:** "spec.md not found. Run `deep-spec` or create spec.md at `docs/sdd/features/<feature-name>/spec.md` first."
|
|
60
|
+
|
|
61
|
+
### Incomplete spec.md
|
|
62
|
+
If spec.md exists but lacks sufficient detail:
|
|
63
|
+
- Generate PRD with all sections
|
|
64
|
+
- Mark incomplete sections clearly with "TBD - requires spec.md update"
|
|
65
|
+
- Report specific gaps: "Section 7.2 (Security) could not be populated - no security-related design decisions found in spec.md"
|
|
66
|
+
|
|
67
|
+
### Multiple features in one spec.md
|
|
68
|
+
If spec.md contains multiple distinct features:
|
|
69
|
+
- Report: "spec.md appears to contain multiple features. Consider splitting into separate spec.md files per feature for cleaner PRD generation."
|
|
70
|
+
- Generate a single PRD but note this in the report
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Next Step
|
|
75
|
+
|
|
76
|
+
**→ `/prd-to-task`**
|