sddx-workflow 0.9.1 → 0.10.0
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/README.md +249 -63
- package/dist/cli.js +370 -129
- package/package.json +1 -1
- package/templates/AGENTS.md +38 -5
- package/templates/CLAUDE.md +76 -5
- package/templates/claude-commands/conventions-sync.md +3 -0
- package/templates/claude-commands/impl-gap.md +10 -0
- package/templates/claude-commands/research.md +7 -0
- package/templates/claude-commands/review.md +1 -1
- package/templates/claude-commands/scan.md +5 -0
- package/templates/claude-commands/spec-amend.md +7 -0
- package/templates/claude-commands/spec-analyze.md +5 -0
- package/templates/claude-commands/spec-clarify.md +5 -0
- package/templates/claude-commands/spec-conflicts.md +3 -0
- package/templates/claude-commands/spec-status.md +3 -0
- package/templates/claude-commands/spec-tasks.md +3 -3
- package/templates/claude-commands/verify.md +5 -0
- package/templates/codex-skills/conventions-sync/SKILL.md +8 -0
- package/templates/codex-skills/impl-gap/SKILL.md +10 -0
- package/templates/codex-skills/research/SKILL.md +10 -0
- package/templates/codex-skills/review/SKILL.md +2 -2
- package/templates/codex-skills/scan/SKILL.md +8 -0
- package/templates/codex-skills/spec-amend/SKILL.md +10 -0
- package/templates/codex-skills/spec-analyze/SKILL.md +8 -0
- package/templates/codex-skills/spec-clarify/SKILL.md +8 -0
- package/templates/codex-skills/spec-conflicts/SKILL.md +8 -0
- package/templates/codex-skills/spec-status/SKILL.md +8 -0
- package/templates/codex-skills/spec-tasks/SKILL.md +3 -3
- package/templates/codex-skills/verify/SKILL.md +8 -0
- package/templates/conventions/base.md +7 -0
- package/templates/copilot-instructions.md +35 -5
- package/templates/copilot-prompts/conventions-sync.prompt.md +8 -0
- package/templates/copilot-prompts/impl-gap.prompt.md +10 -0
- package/templates/copilot-prompts/research.prompt.md +10 -0
- package/templates/copilot-prompts/review.prompt.md +2 -2
- package/templates/copilot-prompts/scan.prompt.md +8 -0
- package/templates/copilot-prompts/spec-amend.prompt.md +10 -0
- package/templates/copilot-prompts/spec-analyze.prompt.md +8 -0
- package/templates/copilot-prompts/spec-clarify.prompt.md +8 -0
- package/templates/copilot-prompts/spec-conflicts.prompt.md +8 -0
- package/templates/copilot-prompts/spec-status.prompt.md +8 -0
- package/templates/copilot-prompts/spec-tasks.prompt.md +3 -3
- package/templates/copilot-prompts/verify.prompt.md +8 -0
- package/templates/cursor-rules/sddx-workflow.mdc +34 -5
- package/templates/gemini-commands/ask.toml +8 -0
- package/templates/gemini-commands/assume.toml +10 -0
- package/templates/gemini-commands/bootstrap.toml +9 -0
- package/templates/gemini-commands/bugfix.toml +10 -0
- package/templates/gemini-commands/conventions-sync.toml +6 -0
- package/templates/gemini-commands/finish.toml +8 -0
- package/templates/gemini-commands/impl-gap.toml +10 -0
- package/templates/gemini-commands/refactor.toml +8 -0
- package/templates/gemini-commands/research.toml +10 -0
- package/templates/gemini-commands/review.toml +8 -0
- package/templates/gemini-commands/scan.toml +6 -0
- package/templates/gemini-commands/spec-amend.toml +10 -0
- package/templates/gemini-commands/spec-analyze.toml +6 -0
- package/templates/gemini-commands/spec-clarify.toml +6 -0
- package/templates/gemini-commands/spec-conflicts.toml +6 -0
- package/templates/gemini-commands/spec-new.toml +7 -0
- package/templates/gemini-commands/spec-plan.toml +7 -0
- package/templates/gemini-commands/spec-status.toml +6 -0
- package/templates/gemini-commands/spec-tasks.toml +8 -0
- package/templates/gemini-commands/verify.toml +6 -0
- package/templates/gemini.md +37 -5
- package/templates/specs/_template/1-requirements.md +19 -0
- package/templates/specs/_template/2-plan.md +14 -0
- package/templates/specs/_template/2a-data-model.md +29 -0
- package/templates/specs/_template/2b-api-contracts.md +27 -0
- package/templates/specs/_template/2c-research.md +25 -0
- package/templates/specs/_template/3-tasks.md +2 -1
- package/templates/specs/_template/amendments.md +15 -0
- package/templates/specs/_template/analysis.md +49 -0
- package/templates/specs/_template/impl-gaps.md +15 -0
- package/templates/specs/_template/verify-report.md +43 -0
- package/templates/windsurf-rules/sddx-workflow.md +34 -5
- package/templates/windsurf-workflows/ask.md +9 -0
- package/templates/windsurf-workflows/assume.md +11 -0
- package/templates/windsurf-workflows/bootstrap.md +10 -0
- package/templates/windsurf-workflows/bugfix.md +11 -0
- package/templates/windsurf-workflows/conventions-sync.md +7 -0
- package/templates/windsurf-workflows/finish.md +9 -0
- package/templates/windsurf-workflows/impl-gap.md +9 -0
- package/templates/windsurf-workflows/refactor.md +9 -0
- package/templates/windsurf-workflows/research.md +9 -0
- package/templates/windsurf-workflows/review.md +9 -0
- package/templates/windsurf-workflows/scan.md +7 -0
- package/templates/windsurf-workflows/spec-amend.md +9 -0
- package/templates/windsurf-workflows/spec-analyze.md +9 -0
- package/templates/windsurf-workflows/spec-clarify.md +9 -0
- package/templates/windsurf-workflows/spec-conflicts.md +7 -0
- package/templates/windsurf-workflows/spec-new.md +10 -0
- package/templates/windsurf-workflows/spec-plan.md +10 -0
- package/templates/windsurf-workflows/spec-status.md +7 -0
- package/templates/windsurf-workflows/spec-tasks.md +11 -0
- package/templates/windsurf-workflows/verify.md +9 -0
- package/templates/workflow.md +319 -25
- package/templates/zed-rules/sddx-workflow.md +33 -5
|
@@ -5,23 +5,52 @@ alwaysApply: true
|
|
|
5
5
|
|
|
6
6
|
This project uses the SDD Protocol. Before starting any task, read:
|
|
7
7
|
|
|
8
|
-
1. `.sdd/workflow.md` — all commands,
|
|
8
|
+
1. `.sdd/workflow.md` — all commands, permissions, stop points, anti-patterns
|
|
9
9
|
2. `.sdd/project-overview.md` — what this app is, its non-goals, and domains
|
|
10
10
|
3. `.sdd/conventions.md` — project-specific conventions and patterns
|
|
11
11
|
|
|
12
12
|
## Available commands
|
|
13
13
|
|
|
14
|
+
### Project setup
|
|
15
|
+
| Command | Purpose |
|
|
16
|
+
|---|---|
|
|
17
|
+
| `/bootstrap` | Populate project context — interview or `--scan` |
|
|
18
|
+
| `/scan` | Discovery-only pass over an existing codebase |
|
|
19
|
+
| `/conventions-sync` | Refresh conventions, preserving manual sections |
|
|
20
|
+
|
|
21
|
+
### Exploration
|
|
14
22
|
| Command | Purpose |
|
|
15
23
|
|---|---|
|
|
16
|
-
| `/bootstrap` | Populate project context — interview or codebase scan |
|
|
17
24
|
| `/ask` | Research only — no code changes |
|
|
25
|
+
| `/research` | Non-binding research artifact |
|
|
18
26
|
| `/assume` | List assumptions and stop for confirmation |
|
|
19
|
-
|
|
20
|
-
|
|
27
|
+
|
|
28
|
+
### Feature flow
|
|
29
|
+
| Command | Purpose |
|
|
30
|
+
|---|---|
|
|
21
31
|
| `/spec-new` | Scaffold a spec folder |
|
|
32
|
+
| `/spec-clarify` | Pre-plan clarification |
|
|
22
33
|
| `/spec-plan` | Generate technical plan — stop for approval |
|
|
23
34
|
| `/spec-tasks` | Execute plan one task at a time, TDD-first |
|
|
24
|
-
| `/
|
|
35
|
+
| `/impl-gap` | Stop and report blocking ambiguity |
|
|
36
|
+
| `/spec-amend` | Documented Change Request |
|
|
37
|
+
| `/spec-analyze` | Cross-consistency analysis |
|
|
38
|
+
| `/verify` | Strict mechanical audit |
|
|
39
|
+
| `/review` | Lighter human-touch final pass |
|
|
25
40
|
| `/finish` | Stage files and generate commit message |
|
|
26
41
|
|
|
42
|
+
### Multi-spec
|
|
43
|
+
| Command | Purpose |
|
|
44
|
+
|---|---|
|
|
45
|
+
| `/spec-status` | Show all active specs and phase |
|
|
46
|
+
| `/spec-conflicts` | Detect file conflicts between specs |
|
|
47
|
+
|
|
48
|
+
### Other
|
|
49
|
+
| Command | Purpose |
|
|
50
|
+
|---|---|
|
|
51
|
+
| `/bugfix` | Reproduce → diagnose → fix → validate |
|
|
52
|
+
| `/refactor` | Restructure without behavior change |
|
|
53
|
+
|
|
54
|
+
Standard workflow: `/spec-new` → `/spec-clarify` → `/spec-plan` → `/spec-tasks` → `/verify` → `/review` → `/finish`.
|
|
55
|
+
|
|
27
56
|
Full definitions for each command are in `.sdd/workflow.md`.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
description = "Research and exploration — no code changes"
|
|
2
|
+
prompt = """
|
|
3
|
+
Execute the /ask command defined in .sdd/workflow.md.
|
|
4
|
+
|
|
5
|
+
Research and exploration only — do not modify any files. Read, analyze, and summarize findings with explicit options or recommendations.
|
|
6
|
+
|
|
7
|
+
Topic: {{args}}
|
|
8
|
+
"""
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
description = "Surface all assumptions before acting — stop for confirmation"
|
|
2
|
+
prompt = """
|
|
3
|
+
Execute the /assume command defined in .sdd/workflow.md.
|
|
4
|
+
|
|
5
|
+
List every assumption being made about the task, codebase state, and technical decisions.
|
|
6
|
+
For each: what you're assuming, why, and what changes if it's wrong.
|
|
7
|
+
Stop and wait for confirmation before proceeding.
|
|
8
|
+
|
|
9
|
+
Context: {{args}}
|
|
10
|
+
"""
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
description = "Populate project context via interview or codebase scan"
|
|
2
|
+
prompt = """
|
|
3
|
+
Execute the /bootstrap command defined in .sdd/workflow.md.
|
|
4
|
+
|
|
5
|
+
If the project already has code, scan the codebase first (read structure, package files, schema, routes), infer what you can, then ask only about what the code cannot answer.
|
|
6
|
+
If it's a new project, ask the 6 interview questions defined in workflow.md one at a time.
|
|
7
|
+
|
|
8
|
+
Present the full draft of .sdd/project-overview.md and .sdd/conventions.md for approval before writing any file.
|
|
9
|
+
"""
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
description = "Reproduce → diagnose → fix → validate"
|
|
2
|
+
prompt = """
|
|
3
|
+
Execute the /bugfix command defined in .sdd/workflow.md.
|
|
4
|
+
|
|
5
|
+
Follow the stages in order without skipping: Reproduce → Diagnose → Fix → Validate.
|
|
6
|
+
Stop after Reproduce if the bug cannot be confirmed with a test or repro case.
|
|
7
|
+
Escalate to /spec-new if the fix scope exceeds ~1 file or ~50 lines.
|
|
8
|
+
|
|
9
|
+
Bug or error: {{args}}
|
|
10
|
+
"""
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
description = "Refresh .sdd/conventions.md from current project state — preserves manual sections"
|
|
2
|
+
prompt = """
|
|
3
|
+
Execute the /conventions-sync command defined in .sdd/workflow.md.
|
|
4
|
+
|
|
5
|
+
Scan packages, structure, lint/format configs, ORM/router. Preserve sections marked `<!-- manual -->` verbatim; regenerate auto-sections. Present diff and STOP for approval before writing.
|
|
6
|
+
"""
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
description = "Stage files and generate a conventional commit message"
|
|
2
|
+
prompt = """
|
|
3
|
+
Execute the /finish command defined in .sdd/workflow.md.
|
|
4
|
+
|
|
5
|
+
Run git status and git diff. Stage all relevant files (exclude .env*, build artifacts, scratch files). Determine the commit type. Draft a conventional commit message following the format in workflow.md — one overview sentence, detailed bullets with reasoning, optional footer for non-obvious context.
|
|
6
|
+
|
|
7
|
+
Stop and present the staged file list and commit message for approval before committing.
|
|
8
|
+
"""
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
description = "Stop and report when a task is blocked by ambiguity or impossibility"
|
|
2
|
+
prompt = """
|
|
3
|
+
Execute the /impl-gap command defined in .sdd/workflow.md.
|
|
4
|
+
|
|
5
|
+
Usage: /impl-gap <feature>
|
|
6
|
+
|
|
7
|
+
STOP execution. Create specs/<feature>/impl-gaps.md from the template if missing, then append a GAP entry with current task, problem, impact, proposed resolution, action required, and resolution placeholder. Wait for human direction. If the gap requires changing the spec, escalate to /spec-amend.
|
|
8
|
+
|
|
9
|
+
Feature: {{args}}
|
|
10
|
+
"""
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
description = "Restructure without changing external behavior"
|
|
2
|
+
prompt = """
|
|
3
|
+
Execute the /refactor command defined in .sdd/workflow.md.
|
|
4
|
+
|
|
5
|
+
Run existing tests first to establish a green baseline. Implement in small steps — tests must stay green throughout. No new features or bug fixes mixed in.
|
|
6
|
+
|
|
7
|
+
Target: {{args}}
|
|
8
|
+
"""
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
description = "Targeted exploration with non-binding artifact — separates exploration from commitment"
|
|
2
|
+
prompt = """
|
|
3
|
+
Execute the /research command defined in .sdd/workflow.md.
|
|
4
|
+
|
|
5
|
+
Usage: /research <feature> <topic>
|
|
6
|
+
|
|
7
|
+
Investigate options for the topic. Read specs/<feature>/1-requirements.md and write a research artifact in the spec folder with options, pros/cons, current versions/maintenance status, and a non-binding recommendation. Do NOT modify 2-plan.md.
|
|
8
|
+
|
|
9
|
+
Spec and topic (e.g. "auth-refresh jwt-libraries"): {{args}}
|
|
10
|
+
"""
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
description = "Lighter human-touch final pass — runs after /verify"
|
|
2
|
+
prompt = """
|
|
3
|
+
Execute the /review command defined in .sdd/workflow.md.
|
|
4
|
+
|
|
5
|
+
Read the implementation qualitatively: clarity, naming, simplicity, leaky abstractions, copy-paste smell, comments that lie. Note minor follow-ups; don't enforce mechanical checks (that's /verify's job). If a structural issue is found, escalate to /spec-amend.
|
|
6
|
+
|
|
7
|
+
Spec: {{args}}
|
|
8
|
+
"""
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
description = "Discovery-only pass over an existing codebase — writes scan-report.md"
|
|
2
|
+
prompt = """
|
|
3
|
+
Execute the /scan command defined in .sdd/workflow.md.
|
|
4
|
+
|
|
5
|
+
Read package manifests, directory structure, lint/format configs, and observable conventions. Produce scan-report.md at repo root with findings. Do not modify any .sdd/ file.
|
|
6
|
+
"""
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
description = "Documented Change Request for post-approval spec changes"
|
|
2
|
+
prompt = """
|
|
3
|
+
Execute the /spec-amend command defined in .sdd/workflow.md.
|
|
4
|
+
|
|
5
|
+
Usage: /spec-amend <feature> <change-summary>
|
|
6
|
+
|
|
7
|
+
Create specs/<feature>/amendments.md from the template if missing, then append a CR entry with motive, requirement changes, plan changes, affected tasks, and status "Pending approval". Stop for explicit approval before propagating any change to 1-requirements.md or 2-plan.md.
|
|
8
|
+
|
|
9
|
+
Feature and change summary: {{args}}
|
|
10
|
+
"""
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
description = "Cross-consistency analysis (goal-task coverage, plan-task coverage, scope creep)"
|
|
2
|
+
prompt = """
|
|
3
|
+
Execute the /spec-analyze command defined in .sdd/workflow.md.
|
|
4
|
+
|
|
5
|
+
Check: every G-ID referenced by at least one task; every "Components Affected" entry referenced by at least one task; any task lacking a goal reference (scope creep). Write specs/{{args}}/analysis.md.
|
|
6
|
+
"""
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
description = "Pre-plan clarification — generates blocking and non-blocking questions"
|
|
2
|
+
prompt = """
|
|
3
|
+
Execute the /spec-clarify command defined in .sdd/workflow.md.
|
|
4
|
+
|
|
5
|
+
Generate categorized clarification questions for specs/{{args}}/1-requirements.md (blocking vs. non-blocking). Wait for answers. Append questions and answers to a Clarifications section of the requirements doc. No other section is modified.
|
|
6
|
+
"""
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
description = "Detect file-level conflicts between active specs — detection only"
|
|
2
|
+
prompt = """
|
|
3
|
+
Execute the /spec-conflicts command defined in .sdd/workflow.md.
|
|
4
|
+
|
|
5
|
+
Cross-reference "Components Affected" across all active specs. Report each file touched by two or more specs, naming the specs and suggesting sequencing. Do not modify any spec.
|
|
6
|
+
"""
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
description = "Scaffold a spec folder for a new feature"
|
|
2
|
+
prompt = """
|
|
3
|
+
Execute the /spec-new command defined in .sdd/workflow.md.
|
|
4
|
+
|
|
5
|
+
Create a specs/{{args}}/ folder by copying the three template files from specs/_template/.
|
|
6
|
+
Replace <Feature Name> in each file title with the actual feature name.
|
|
7
|
+
"""
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
description = "Generate technical plan — stops for approval before any code"
|
|
2
|
+
prompt = """
|
|
3
|
+
Execute the /spec-plan command defined in .sdd/workflow.md.
|
|
4
|
+
|
|
5
|
+
Read specs/{{args}}/1-requirements.md, run /assume to surface assumptions, then draft the technical plan in specs/{{args}}/2-plan.md.
|
|
6
|
+
Stop for explicit approval before writing any implementation code.
|
|
7
|
+
"""
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
description = "Show state of all active specs — phase, progress, outstanding CRs and gaps"
|
|
2
|
+
prompt = """
|
|
3
|
+
Execute the /spec-status command defined in .sdd/workflow.md.
|
|
4
|
+
|
|
5
|
+
List directories under specs/ excluding _template and _done. For each: feature name, current phase, progress (N/M tasks), outstanding CRs or unresolved gaps. Do not modify any file.
|
|
6
|
+
"""
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
description = "Execute approved plan one task at a time, TDD-first"
|
|
2
|
+
prompt = """
|
|
3
|
+
Execute the /spec-tasks command defined in .sdd/workflow.md.
|
|
4
|
+
|
|
5
|
+
Then read the approved specs/{{args}}/2-plan.md and execute tasks one at a time. Write the test first (red), implement until green, run the full suite, then move to the next task.
|
|
6
|
+
|
|
7
|
+
If a task is blocked by ambiguity, contradiction, or technical impossibility, STOP and run /impl-gap — never improvise. If the gap requires changing the spec, escalate to /spec-amend.
|
|
8
|
+
"""
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
description = "Strict mechanical audit — read-only; writes verify-report.md"
|
|
2
|
+
prompt = """
|
|
3
|
+
Execute the /verify command defined in .sdd/workflow.md.
|
|
4
|
+
|
|
5
|
+
Read-only mechanical audit. Check: all tasks marked complete, every goal has an artifact, every acceptance scenario has a passing test, full test suite green, no out-of-scope file changes, no unresolved /impl-gap entries, no pending CRs. Write specs/{{args}}/verify-report.md. Do not modify code or specs.
|
|
6
|
+
"""
|
package/templates/gemini.md
CHANGED
|
@@ -2,23 +2,55 @@
|
|
|
2
2
|
|
|
3
3
|
This project uses the SDD Protocol. Read these files before starting any task:
|
|
4
4
|
|
|
5
|
-
1. **[.sdd/workflow.md](.sdd/workflow.md)** — commands,
|
|
5
|
+
1. **[.sdd/workflow.md](.sdd/workflow.md)** — commands, permissions, stop points, anti-patterns
|
|
6
6
|
2. **[.sdd/project-overview.md](.sdd/project-overview.md)** — what this app is, its non-goals, domains, and definition of done
|
|
7
7
|
3. **[.sdd/conventions.md](.sdd/conventions.md)** — project-specific conventions and patterns
|
|
8
8
|
|
|
9
9
|
## Quick Reference
|
|
10
10
|
|
|
11
|
+
### Project setup
|
|
11
12
|
| Intent | Workflow |
|
|
12
13
|
|---|---|
|
|
13
|
-
| Initialize project context
|
|
14
|
-
|
|
|
14
|
+
| Initialize project context (new) | `bootstrap` |
|
|
15
|
+
| Initialize project context (existing codebase) | `bootstrap --scan` |
|
|
16
|
+
| Discovery-only scan of an existing codebase | `scan` |
|
|
17
|
+
| Refresh conventions from current project state | `conventions-sync` |
|
|
18
|
+
|
|
19
|
+
### Exploration
|
|
20
|
+
| Intent | Workflow |
|
|
21
|
+
|---|---|
|
|
22
|
+
| Research / ask without changing anything | `ask` |
|
|
23
|
+
| Non-binding research artifact for a topic | `research` |
|
|
15
24
|
| Surface and validate assumptions | `assume` |
|
|
25
|
+
|
|
26
|
+
### Feature flow
|
|
27
|
+
| Intent | Workflow |
|
|
28
|
+
|---|---|
|
|
29
|
+
| Scaffold a spec folder | `spec-new` |
|
|
30
|
+
| Clarify a draft before planning | `spec-clarify` |
|
|
31
|
+
| Generate technical plan (stops for approval) | `spec-plan` |
|
|
32
|
+
| Execute approved plan one task at a time | `spec-tasks` |
|
|
33
|
+
| Stop and report an implementation gap | `impl-gap` |
|
|
34
|
+
| Document a Change Request for spec edits | `spec-amend` |
|
|
35
|
+
| Cross-consistency analysis (goals / plan / tasks) | `spec-analyze` |
|
|
36
|
+
| Strict mechanical audit | `verify` |
|
|
37
|
+
| Lighter human-touch final pass | `review` |
|
|
38
|
+
| Stage and commit | `finish` |
|
|
39
|
+
|
|
40
|
+
### Multi-spec
|
|
41
|
+
| Intent | Workflow |
|
|
42
|
+
|---|---|
|
|
43
|
+
| Show state of all active specs | `spec-status` |
|
|
44
|
+
| Detect file-level conflicts between specs | `spec-conflicts` |
|
|
45
|
+
|
|
46
|
+
### Other
|
|
47
|
+
| Intent | Workflow |
|
|
48
|
+
|---|---|
|
|
16
49
|
| Fix a confirmed bug | `bugfix` → `finish` |
|
|
17
50
|
| Restructure without behavior change | `refactor` → `finish` |
|
|
18
|
-
| New feature | `spec-new` → `spec-plan` → `spec-tasks` → `review` → `finish` |
|
|
19
|
-
| Stage + commit after any work | `finish` |
|
|
20
51
|
|
|
21
52
|
Invoke any workflow by name (e.g., "run bootstrap", "start spec-new for auth-refresh").
|
|
53
|
+
Standard workflow: `spec-new` → `spec-clarify` → `spec-plan` → `spec-tasks` → `verify` → `review` → `finish`.
|
|
22
54
|
Full definitions are in `.sdd/workflow.md`.
|
|
23
55
|
|
|
24
56
|
## Active Specs
|
|
@@ -102,3 +102,22 @@ Scenario: <add one scenario per distinct behavior>
|
|
|
102
102
|
|
|
103
103
|
⚠️ Non-blocking — can be decided during planning with a reasonable default:
|
|
104
104
|
Should the timestamp be relative ("3 days ago") or absolute ("Apr 12, 14:30")? -->
|
|
105
|
+
|
|
106
|
+
## Clarifications
|
|
107
|
+
|
|
108
|
+
<!-- Populated by /spec-clarify (pre-plan) or appended by /spec-amend (post-approval).
|
|
109
|
+
|
|
110
|
+
Format — use checkboxes so /spec-plan can detect unanswered blocking questions:
|
|
111
|
+
- [ ] ⛔ BLOCKING — <question>
|
|
112
|
+
- [x] ⛔ BLOCKING — <question> → <answer>
|
|
113
|
+
- [ ] ⚠️ NON-BLOCKING — <question> (default if unanswered: <assumed default>)
|
|
114
|
+
- [x] ⚠️ NON-BLOCKING — <question> → <answer>
|
|
115
|
+
|
|
116
|
+
/spec-plan must stop if any "[ ] ⛔ BLOCKING" entry exists with no answer.
|
|
117
|
+
Non-blocking questions without an answer proceed with the stated default.
|
|
118
|
+
|
|
119
|
+
Example:
|
|
120
|
+
- [x] ⛔ BLOCKING — Does folder navigation count as "opening" a file? → No. Only files opened in the viewer count. Trigger surface stays narrow.
|
|
121
|
+
- [x] ⚠️ NON-BLOCKING — Timestamp format? → Relative ("3 days ago"); switch to absolute on hover.
|
|
122
|
+
-->
|
|
123
|
+
|
|
@@ -39,6 +39,13 @@
|
|
|
39
39
|
— rejected because it would bump updated_at on every read, corrupting
|
|
40
40
|
the 'modified' timestamp shown to users." -->
|
|
41
41
|
|
|
42
|
+
<!-- Optional artifacts: if this plan needs more depth in a specific area, /spec-plan
|
|
43
|
+
may produce additional files alongside this one — reference them here:
|
|
44
|
+
- 2a-data-model.md — when persistence is non-trivial (schemas, migrations, ER)
|
|
45
|
+
- 2b-api-contracts.md — when new external HTTP/RPC/event contracts are introduced
|
|
46
|
+
- 2c-research.md — when outstanding /research output belongs in the plan
|
|
47
|
+
If unused, just delete this comment. -->
|
|
48
|
+
|
|
42
49
|
## Tradeoffs
|
|
43
50
|
|
|
44
51
|
<!-- Conscious sacrifices the chosen approach makes. Only include if they exist.
|
|
@@ -104,6 +111,13 @@
|
|
|
104
111
|
since this plan was written, changing its interface
|
|
105
112
|
- A task requires touching files not listed here -->
|
|
106
113
|
|
|
114
|
+
## Gap Handling
|
|
115
|
+
|
|
116
|
+
<!-- Implementation-time ambiguities, contradictions, or technical impossibilities
|
|
117
|
+
are NOT recorded in this plan. Run /impl-gap and append to
|
|
118
|
+
specs/<feature>/impl-gaps.md. If the resolution changes requirements or plan,
|
|
119
|
+
escalate via /spec-amend before editing approved spec files. -->
|
|
120
|
+
|
|
107
121
|
## Verification
|
|
108
122
|
|
|
109
123
|
<!-- How to confirm each task is done. Link explicitly to scenarios in 1-requirements.md.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Data Model — <Feature Name>
|
|
2
|
+
|
|
3
|
+
> Optional artifact. Generated by /spec-plan when persistence changes are non-trivial.
|
|
4
|
+
> Referenced from `2-plan.md` §Approach. Delete this file if unused.
|
|
5
|
+
|
|
6
|
+
## Tables / Collections
|
|
7
|
+
|
|
8
|
+
<!-- For each new or modified table:
|
|
9
|
+
- **Name** — purpose, primary key
|
|
10
|
+
- **New columns:** name, type, nullable, default, constraint
|
|
11
|
+
- **Indexes added:** columns, unique/non-unique, reason
|
|
12
|
+
- **Relationships:** FK target, ON DELETE behavior, embedding, etc.
|
|
13
|
+
|
|
14
|
+
Example:
|
|
15
|
+
**recent_files** — stores per-user recently opened file list
|
|
16
|
+
- user_id: uuid, FK → users.id ON DELETE CASCADE
|
|
17
|
+
- file_path: text, not null
|
|
18
|
+
- opened_at: timestamptz, not null, default now()
|
|
19
|
+
- Index: (user_id, opened_at DESC) for timeline queries
|
|
20
|
+
-->
|
|
21
|
+
|
|
22
|
+
## Migrations
|
|
23
|
+
|
|
24
|
+
<!-- Migration strategy and order of operations.
|
|
25
|
+
Note zero-downtime constraints (add-column-then-backfill, rename-in-steps, etc.) -->
|
|
26
|
+
|
|
27
|
+
## ER Diagram (optional)
|
|
28
|
+
|
|
29
|
+
<!-- ASCII or Mermaid ER diagram if the relationships are non-obvious -->
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# API Contracts — <Feature Name>
|
|
2
|
+
|
|
3
|
+
> Optional artifact. Generated by /spec-plan when new external HTTP/RPC/event contracts are introduced.
|
|
4
|
+
> Referenced from `2-plan.md` §Approach. Delete this file if unused.
|
|
5
|
+
|
|
6
|
+
## HTTP Endpoints
|
|
7
|
+
|
|
8
|
+
<!-- For each new or modified endpoint:
|
|
9
|
+
Method + path | Auth required | Request body | Response | Error codes
|
|
10
|
+
|
|
11
|
+
Example:
|
|
12
|
+
**GET /api/recent-files**
|
|
13
|
+
- Auth: session cookie (user must be authenticated)
|
|
14
|
+
- Query params: limit (default 10, max 50)
|
|
15
|
+
- Response 200: { files: [{ path: string, openedAt: string }] }
|
|
16
|
+
- Response 401: { error: "unauthenticated" }
|
|
17
|
+
-->
|
|
18
|
+
|
|
19
|
+
## Events / Webhooks
|
|
20
|
+
|
|
21
|
+
<!-- For each new event or webhook:
|
|
22
|
+
Name | Payload schema | Trigger condition | Consumer(s) -->
|
|
23
|
+
|
|
24
|
+
## External APIs Consumed
|
|
25
|
+
|
|
26
|
+
<!-- Third-party APIs this feature calls:
|
|
27
|
+
Service | Endpoint | Auth method | Rate limits | Fallback behavior -->
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Research Summary — <Feature Name>
|
|
2
|
+
|
|
3
|
+
> Optional artifact. Carries over /research output that directly informs the plan.
|
|
4
|
+
> Referenced from `2-plan.md` §Approach. Delete this file if unused.
|
|
5
|
+
> Full research detail lives in `specs/<feature>/research-<topic>.md` files.
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
<!-- The option selected and the one-line rationale.
|
|
10
|
+
Example: "Using NextAuth with GitHub provider — OAuth2 support is built-in,
|
|
11
|
+
team already has a GitHub org, and it avoids a separate auth service." -->
|
|
12
|
+
|
|
13
|
+
## Alternatives Considered
|
|
14
|
+
|
|
15
|
+
<!-- Options evaluated and rejected, with rejection reason.
|
|
16
|
+
Prevents re-litigating the same debate in future PRs.
|
|
17
|
+
|
|
18
|
+
Example:
|
|
19
|
+
- **Passport.js** — rejected: requires manual session management; more boilerplate for no benefit here.
|
|
20
|
+
- **Auth0** — rejected: adds a paid third-party dependency; overkill for internal tooling. -->
|
|
21
|
+
|
|
22
|
+
## Open Questions
|
|
23
|
+
|
|
24
|
+
<!-- Research items not yet resolved.
|
|
25
|
+
Move blocking ones to `1-requirements.md` §Clarifications as ⛔ BLOCKING entries. -->
|
|
@@ -11,7 +11,7 @@ Plan approved: <!-- date -->
|
|
|
11
11
|
- One task at a time — finish it completely before moving on
|
|
12
12
|
- Write the test first — it must fail (red) before any implementation; implement until green; then run the full suite
|
|
13
13
|
- Each task touches only what's needed — no cleanup of adjacent code
|
|
14
|
-
- If a task reveals new scope, STOP and
|
|
14
|
+
- If a task reveals ambiguity, contradiction, impossibility, or new scope, STOP and run /impl-gap. If requirements or plan must change, escalate to /spec-amend before editing approved spec files.
|
|
15
15
|
|
|
16
16
|
---
|
|
17
17
|
|
|
@@ -49,5 +49,6 @@ Plan approved: <!-- date -->
|
|
|
49
49
|
|
|
50
50
|
- [ ] All tasks done
|
|
51
51
|
- [ ] Every acceptance scenario in 1-requirements.md covered by a passing test
|
|
52
|
+
- [ ] /verify completed
|
|
52
53
|
- [ ] /review completed
|
|
53
54
|
- [ ] Spec moved to `specs/_done/<name>/`
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Change Requests — <Feature Name>
|
|
2
|
+
|
|
3
|
+
<!-- Populated by /spec-amend. Never edit existing entries — append only.
|
|
4
|
+
CR numbering is per-spec and monotonic (CR-001, CR-002, …).
|
|
5
|
+
Rejected CRs stay with status "Rejected" and a one-line reason — never delete history.
|
|
6
|
+
|
|
7
|
+
Format:
|
|
8
|
+
## CR-NNN — YYYY-MM-DD
|
|
9
|
+
- **Trigger:** user-requested | gap-NNN | review-finding
|
|
10
|
+
- **Motive:** why this change is necessary
|
|
11
|
+
- **Change in requirements:** what sections of 1-requirements.md change, and how
|
|
12
|
+
- **Change in plan:** what sections of 2-plan.md change, and how
|
|
13
|
+
- **Affected tasks:** T-XX, T-YY (tasks that may need to redo work or whose verification changes)
|
|
14
|
+
- **Status:** Pending approval | Approved YYYY-MM-DD | Rejected — <reason>
|
|
15
|
+
-->
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Cross-Consistency Analysis — <Feature Name>
|
|
2
|
+
|
|
3
|
+
Date: <YYYY-MM-DD>
|
|
4
|
+
Re-runs overwrite this file. Output is advisory — the human decides whether to amend or accept each gap.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 1. Goal-to-Task Coverage
|
|
9
|
+
|
|
10
|
+
Every goal ID (G1, G2…) from `1-requirements.md` must appear in at least one task in `3-tasks.md`.
|
|
11
|
+
|
|
12
|
+
| Goal | Referenced in task(s) | Status |
|
|
13
|
+
|------|-----------------------|--------|
|
|
14
|
+
| G1 | | ✅ / ❌ |
|
|
15
|
+
|
|
16
|
+
### Missing goals
|
|
17
|
+
<!-- Goals with no referencing task — these are coverage gaps -->
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 2. Plan-to-Task Coverage
|
|
22
|
+
|
|
23
|
+
Every entry in "Components Affected" in `2-plan.md` must appear in at least one task's Changes field.
|
|
24
|
+
|
|
25
|
+
| Component | Referenced in task(s) | Status |
|
|
26
|
+
|-----------|-----------------------|--------|
|
|
27
|
+
| | | ✅ / ❌ |
|
|
28
|
+
|
|
29
|
+
### Missing components
|
|
30
|
+
<!-- Components with no referencing task — may indicate unplanned work or an incomplete task list -->
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 3. Scope Creep
|
|
35
|
+
|
|
36
|
+
Tasks that do not reference any goal ID may be out of scope.
|
|
37
|
+
|
|
38
|
+
| Task | Goals referenced |
|
|
39
|
+
|------|-----------------|
|
|
40
|
+
| | |
|
|
41
|
+
|
|
42
|
+
### Findings
|
|
43
|
+
<!-- Tasks with no goal reference — flag for human review. May be legitimate (housekeeping) or genuine scope creep. -->
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Conclusion
|
|
48
|
+
|
|
49
|
+
<!-- Advisory summary. For each miss: state whether to add a task, add a goal, or accept the gap as intentional. -->
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Implementation Gaps — <Feature Name>
|
|
2
|
+
|
|
3
|
+
<!-- Populated by /impl-gap during /spec-tasks. Never improvise — always stop and record.
|
|
4
|
+
GAP numbering is per-spec and monotonic (GAP-001, GAP-002, …).
|
|
5
|
+
Resolved entries include a Resolution field. If escalated to /spec-amend, include the CR reference.
|
|
6
|
+
|
|
7
|
+
Format:
|
|
8
|
+
## GAP-NNN — YYYY-MM-DD
|
|
9
|
+
- **Task:** T-XX (short description)
|
|
10
|
+
- **Problem:** what the spec says vs. what is blocking
|
|
11
|
+
- **Impact:** which other tasks are blocked
|
|
12
|
+
- **Proposed resolution:** agent's suggestion (non-binding)
|
|
13
|
+
- **Action required:** Approval | Escalate to /spec-amend
|
|
14
|
+
- **Resolution:** filled in after human direction (and CR-NNN reference if applicable)
|
|
15
|
+
-->
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Verify Report — <Feature Name>
|
|
2
|
+
|
|
3
|
+
Date: <YYYY-MM-DD>
|
|
4
|
+
Spec: specs/<feature>/
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Checks
|
|
9
|
+
|
|
10
|
+
| # | Check | Status | Evidence |
|
|
11
|
+
|---|-------|--------|----------|
|
|
12
|
+
| 1 | All tasks in `3-tasks.md` marked complete | | |
|
|
13
|
+
| 2 | Every goal (G1, G2…) has a referencing task and an observable artifact | | |
|
|
14
|
+
| 3 | Every acceptance scenario has a corresponding passing test | | |
|
|
15
|
+
| 4 | Full test suite passes | | |
|
|
16
|
+
| 5 | No files modified outside "Components Affected" in `2-plan.md` | | |
|
|
17
|
+
| 6 | No unresolved `/impl-gap` entries | | |
|
|
18
|
+
| 7 | No CRs in "Pending approval" status | | |
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Detail
|
|
23
|
+
|
|
24
|
+
### Tasks
|
|
25
|
+
<!-- List each task from 3-tasks.md and its completion artifact (file, test, route, etc.) -->
|
|
26
|
+
|
|
27
|
+
### Goals
|
|
28
|
+
<!-- List each G-ID from 1-requirements.md with the task(s) that implement it -->
|
|
29
|
+
|
|
30
|
+
### Scenarios
|
|
31
|
+
<!-- List each BDD scenario with its test file and pass/fail status -->
|
|
32
|
+
|
|
33
|
+
### Scope
|
|
34
|
+
<!-- List all modified files and confirm each appears in "Components Affected" -->
|
|
35
|
+
|
|
36
|
+
### Gaps and CRs
|
|
37
|
+
<!-- State of any open impl-gaps.md or amendments.md entries -->
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Conclusion
|
|
42
|
+
|
|
43
|
+
<!-- PASS or FAIL — one sentence. If FAIL, name each failing check and the artifact needed to resolve it. -->
|