@specsafe/cli 2.1.0 → 2.2.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.
Files changed (59) hide show
  1. package/README.md +56 -18
  2. package/canonical/rules/.cursorrules.mdc +29 -6
  3. package/canonical/rules/.rules +28 -5
  4. package/canonical/rules/AGENTS.md +28 -5
  5. package/canonical/rules/CLAUDE.md +45 -22
  6. package/canonical/rules/CONVENTIONS.md +46 -15
  7. package/canonical/rules/GEMINI.md +28 -5
  8. package/canonical/rules/continue-config.yaml +1 -1
  9. package/canonical/skills/specsafe-architecture/workflow.md +2 -2
  10. package/canonical/skills/specsafe-brainstorm/SKILL.md +7 -0
  11. package/canonical/skills/specsafe-brainstorm/workflow.md +218 -0
  12. package/canonical/skills/specsafe-brief/workflow.md +1 -0
  13. package/canonical/skills/specsafe-code/workflow.md +3 -0
  14. package/canonical/skills/specsafe-party-mode/SKILL.md +7 -0
  15. package/canonical/skills/specsafe-party-mode/workflow.md +177 -0
  16. package/canonical/skills/specsafe-prd/workflow.md +2 -2
  17. package/canonical/skills/specsafe-principles/SKILL.md +7 -0
  18. package/canonical/skills/specsafe-principles/workflow.md +197 -0
  19. package/canonical/skills/specsafe-readiness/SKILL.md +7 -0
  20. package/canonical/skills/specsafe-readiness/workflow.md +247 -0
  21. package/canonical/skills/specsafe-skill-creator/workflow.md +8 -8
  22. package/canonical/skills/specsafe-test/workflow.md +3 -0
  23. package/canonical/skills/specsafe-ux/workflow.md +2 -2
  24. package/canonical/templates/claude-code-prompt-template.md +65 -0
  25. package/canonical/templates/specsafe-config-template.json +1 -2
  26. package/generators/dist/adapters/aider.js +41 -3
  27. package/generators/dist/adapters/aider.js.map +1 -1
  28. package/generators/dist/adapters/antigravity.js +1 -2
  29. package/generators/dist/adapters/antigravity.js.map +1 -1
  30. package/generators/dist/adapters/continue.js +1 -1
  31. package/generators/dist/adapters/continue.js.map +1 -1
  32. package/generators/dist/adapters/cursor.js +1 -2
  33. package/generators/dist/adapters/cursor.js.map +1 -1
  34. package/generators/dist/adapters/gemini.js +13 -3
  35. package/generators/dist/adapters/gemini.js.map +1 -1
  36. package/generators/dist/adapters/index.d.ts +7 -7
  37. package/generators/dist/adapters/index.js +11 -11
  38. package/generators/dist/adapters/index.js.map +1 -1
  39. package/generators/dist/adapters/opencode.js +1 -2
  40. package/generators/dist/adapters/opencode.js.map +1 -1
  41. package/generators/dist/adapters/types.d.ts +2 -2
  42. package/generators/dist/adapters/types.js.map +1 -1
  43. package/generators/dist/adapters/utils.js +4 -3
  44. package/generators/dist/adapters/utils.js.map +1 -1
  45. package/generators/dist/adapters/zed.js +43 -11
  46. package/generators/dist/adapters/zed.js.map +1 -1
  47. package/generators/dist/doctor.js +11 -7
  48. package/generators/dist/doctor.js.map +1 -1
  49. package/generators/dist/index.js +2 -2
  50. package/generators/dist/index.js.map +1 -1
  51. package/generators/dist/init.d.ts +0 -1
  52. package/generators/dist/init.js +14 -24
  53. package/generators/dist/init.js.map +1 -1
  54. package/generators/dist/install.js +6 -6
  55. package/generators/dist/install.js.map +1 -1
  56. package/generators/dist/registry.js.map +1 -1
  57. package/generators/dist/update.js +2 -2
  58. package/generators/dist/update.js.map +1 -1
  59. package/package.json +19 -16
package/README.md CHANGED
@@ -1,13 +1,37 @@
1
1
  # SpecSafe
2
2
 
3
- SpecSafe is a skills-first TDD framework for AI-assisted development. It provides a structured 5-stage workflow that keeps AI agents aligned with human intent through specifications, test-driven implementation, and QA gates — regardless of which AI coding tool you use.
3
+ SpecSafe is a two-phase software engineering framework for AI-assisted development. It provides structured planning workflows to reduce ambiguity, then enforces test-driven implementation through small spec slices — regardless of which AI coding tool you use.
4
4
 
5
- ## The 5-Stage Workflow
5
+ For the full canonical workflow, see [docs/SPECSAFE-CANONICAL-WORKFLOW.md](./docs/SPECSAFE-CANONICAL-WORKFLOW.md).
6
+
7
+ ## Two-Phase Workflow
6
8
 
7
9
  ```
8
- SPEC TEST → CODE → VERIFY → QA → COMPLETE
10
+ PHASE 1: PLANNING
11
+ brainstorm → principles → brief → PRD → UX → architecture → readiness
12
+
13
+ PHASE 2: DEVELOPMENT
14
+ spec slice → tests → implementation → verify/QA → complete (or loop back)
9
15
  ```
10
16
 
17
+ ## Phase 1: Planning
18
+
19
+ Planning removes ambiguity before implementation begins. Each planning skill produces an artifact that informs the next stage.
20
+
21
+ | Step | Skill | Description |
22
+ |------|-------|-------------|
23
+ | 1 | `specsafe-brainstorm` | Divergent exploration of possibilities |
24
+ | 2 | `specsafe-principles` | Product principles, non-goals, quality priorities |
25
+ | 3 | `specsafe-brief` | Concise product/business framing document |
26
+ | 4 | `specsafe-prd` | Testable requirements with user journeys and acceptance criteria |
27
+ | 5 | `specsafe-ux` | UX design: tokens, components, flows, accessibility |
28
+ | 6 | `specsafe-architecture` | System architecture with ADRs and technology decisions |
29
+ | 7 | `specsafe-readiness` | Pre-development coherence check: GO / NEEDS REVISION / BLOCKED |
30
+
31
+ ## Phase 2: Development
32
+
33
+ Development begins only after the change is understood well enough to be implemented as a small spec slice.
34
+
11
35
  | Stage | Skill | Persona | What happens |
12
36
  |-------|-------|---------|-------------|
13
37
  | **SPEC** | `specsafe-new`, `specsafe-spec` | Kai (Mason) | Create and refine a spec with requirements, acceptance criteria, scenarios |
@@ -16,16 +40,6 @@ SPEC → TEST → CODE → VERIFY → QA → COMPLETE
16
40
  | **VERIFY** | `specsafe-verify` | Lyra (Warden) | Run tests, validate against spec, loop back on failure |
17
41
  | **QA** | `specsafe-qa`, `specsafe-complete` | Lyra (Warden), Cass (Herald) | Full QA report with GO/NO-GO, then human approval gate |
18
42
 
19
- Additional utility skills:
20
-
21
- | Skill | Persona | Purpose |
22
- |-------|---------|---------|
23
- | `specsafe-init` | Cass (Herald) | Initialize a new SpecSafe project |
24
- | `specsafe-explore` | Elena (Scout) | Pre-spec exploration and research |
25
- | `specsafe-status` | Cass (Herald) | Project dashboard with spec counts and metrics |
26
- | `specsafe-doctor` | Cass (Herald) | Validate project health |
27
- | `specsafe-archive` | Cass (Herald) | Archive obsolete specs |
28
-
29
43
  ## Quick Start
30
44
 
31
45
  ```bash
@@ -46,12 +60,24 @@ specsafe doctor
46
60
 
47
61
  ## Skills Reference
48
62
 
49
- All 12 canonical skills:
63
+ 21 canonical skills:
64
+
65
+ ### Planning Skills
50
66
 
51
67
  | Skill | Description |
52
- |-------|------------|
53
- | `specsafe-init` | Initialize project creates dirs, config, PROJECT_STATE.md |
54
- | `specsafe-explore` | Pre-spec exploration and research mode |
68
+ |-------|-------------|
69
+ | `specsafe-brainstorm` | Divergent exploration before converging on a solution |
70
+ | `specsafe-principles` | Product principles, non-goals, and quality priorities |
71
+ | `specsafe-brief` | Create a concise product brief — problem, users, scope, success criteria |
72
+ | `specsafe-prd` | Expand brief into full PRD with user journeys, FRs, NFRs |
73
+ | `specsafe-ux` | UX design foundations — tokens, components, accessibility, flows |
74
+ | `specsafe-architecture` | System architecture — components, data model, ADRs, technology stack |
75
+ | `specsafe-readiness` | Pre-development coherence and readiness check |
76
+
77
+ ### Development Skills
78
+
79
+ | Skill | Description |
80
+ |-------|-------------|
55
81
  | `specsafe-new` | Create a new spec with unique ID and initial requirements |
56
82
  | `specsafe-spec` | Refine spec with detailed requirements, criteria, scenarios |
57
83
  | `specsafe-test` | Generate test files from spec scenarios (all tests start skipped) |
@@ -59,20 +85,31 @@ All 12 canonical skills:
59
85
  | `specsafe-verify` | Run tests, validate against spec, loop on failure |
60
86
  | `specsafe-qa` | Full QA validation with report and GO/NO-GO recommendation |
61
87
  | `specsafe-complete` | Human approval gate — moves spec to COMPLETE |
88
+
89
+ ### Utility Skills
90
+
91
+ | Skill | Description |
92
+ |-------|-------------|
93
+ | `specsafe-init` | Initialize project — creates dirs, config, PROJECT_STATE.md |
94
+ | `specsafe-explore` | Pre-spec exploration and research mode |
95
+ | `specsafe-context` | Gather and present project context for AI agents |
62
96
  | `specsafe-status` | Project dashboard with spec counts by stage |
63
97
  | `specsafe-archive` | Archive obsolete or abandoned specs |
64
98
  | `specsafe-doctor` | Validate project health and configuration |
99
+ | `specsafe-skill-creator` | Create new SpecSafe skills with proper structure and validation |
65
100
 
66
101
  ## Agent Personas
67
102
 
68
103
  | Persona | Role | Archetype | Stages |
69
104
  |---------|------|-----------|--------|
70
105
  | **Elena** | Exploration Lead | Scout | EXPLORE |
71
- | **Kai** | Spec Architect | Mason | SPEC |
106
+ | **Kai** | Spec Architect | Mason | SPEC, BRIEF, PRD |
72
107
  | **Reva** | Test Engineer | Forge | TEST |
73
108
  | **Zane** | Implementation Engineer | Bolt | CODE |
74
109
  | **Lyra** | QA Inspector | Warden | QA, VERIFY |
75
110
  | **Cass** | Release Manager | Herald | COMPLETE, STATUS, ARCHIVE, INIT, DOCTOR |
111
+ | **Aria** | UX Designer | Prism | UX |
112
+ | **Nolan** | System Architect | Sage | ARCHITECTURE |
76
113
 
77
114
  ## Supported Tools
78
115
 
@@ -127,5 +164,6 @@ Tracks the current state of all specs in the project:
127
164
 
128
165
  ## Further Reading
129
166
 
167
+ - [Canonical Workflow](./docs/SPECSAFE-CANONICAL-WORKFLOW.md) — source of truth for the two-phase model
130
168
  - [Tool Support Guide](./docs/tool-support.md) — per-tool setup details
131
169
  - [Persona Guide](./docs/personas.md) — how each persona works
@@ -1,16 +1,32 @@
1
1
  ---
2
- description: SpecSafe TDD workflow enforcement
2
+ description: SpecSafe two-phase workflow enforcement
3
3
  alwaysApply: true
4
4
  ---
5
5
 
6
- # SpecSafe — TDD Workflow Rules
6
+ # SpecSafe — Two-Phase Workflow Rules
7
7
 
8
- SpecSafe enforces a strict 5-stage TDD workflow for every feature: **SPEC TEST CODE QA COMPLETE**. No stage may be skipped. Each stage has a dedicated skill and persona.
8
+ SpecSafe is a two-phase software engineering framework. Phase 1 (Planning) reduces ambiguity before implementation. Phase 2 (Development) enforces strict test-driven execution through small spec slices. No stage may be skipped. Each stage has a dedicated skill and persona.
9
9
 
10
- ## Workflow Stages
10
+ ## Phase 1: Planning
11
+
12
+ Planning precedes development. Each step produces an artifact that informs the next.
13
+
14
+ | Step | Skill | What Happens |
15
+ |------|-------|--------------|
16
+ | 1 | `specsafe-brainstorm` | Divergent exploration of possibilities |
17
+ | 2 | `specsafe-principles` | Product principles, non-goals, quality priorities |
18
+ | 3 | `specsafe-brief` | Concise product/business framing document |
19
+ | 4 | `specsafe-prd` | Testable requirements with user journeys and acceptance criteria |
20
+ | 5 | `specsafe-ux` | UX design: tokens, components, flows, accessibility |
21
+ | 6 | `specsafe-architecture` | System architecture with ADRs and technology decisions |
22
+ | 7 | `specsafe-readiness` | Pre-development coherence check |
23
+
24
+ Canonical order: brainstorm → principles → brief → PRD → UX → architecture → readiness. UX always precedes architecture.
25
+
26
+ ## Phase 2: Development Stages
11
27
 
12
28
  | Stage | Skill | Persona | What Happens |
13
- |-------|-------|---------|--------------|
29
+ |-------|-------|---------|--------------|
14
30
  | SPEC | `specsafe-new`, `specsafe-spec` | Mason (Kai) | Create and refine specification with requirements and scenarios |
15
31
  | TEST | `specsafe-test` | Forge (Reva) | Generate test files from spec scenarios (all tests fail) |
16
32
  | CODE | `specsafe-code` | Bolt (Zane) | Implement code using TDD red-green-refactor |
@@ -31,6 +47,10 @@ SpecSafe enforces a strict 5-stage TDD workflow for every feature: **SPEC → TE
31
47
  |-------|-------------|
32
48
  | `specsafe-init` | Initialize a new SpecSafe project with directory structure and config |
33
49
  | `specsafe-explore` | Pre-spec research, spikes, and feasibility assessment |
50
+ | `specsafe-brief` | Create a concise product brief |
51
+ | `specsafe-prd` | Expand brief into full PRD with user journeys and requirements |
52
+ | `specsafe-ux` | UX design foundations — tokens, components, accessibility, flows |
53
+ | `specsafe-architecture` | System architecture — components, data model, ADRs |
34
54
  | `specsafe-new <name>` | Create a new spec from template with unique ID |
35
55
  | `specsafe-spec <id>` | Refine an existing spec with requirements and scenarios |
36
56
  | `specsafe-test <id>` | Generate test files from spec scenarios (SPEC → TEST) |
@@ -41,6 +61,8 @@ SpecSafe enforces a strict 5-stage TDD workflow for every feature: **SPEC → TE
41
61
  | `specsafe-status` | Show project dashboard with all specs and metrics |
42
62
  | `specsafe-archive <id>` | Archive an obsolete spec with reason |
43
63
  | `specsafe-doctor` | Validate project health and diagnose issues |
64
+ | `specsafe-context` | Gather and present project context for AI agents |
65
+ | `specsafe-skill-creator` | Create new SpecSafe skills with proper structure |
44
66
 
45
67
  ## Project Constraints
46
68
 
@@ -48,6 +70,7 @@ SpecSafe enforces a strict 5-stage TDD workflow for every feature: **SPEC → TE
48
70
  2. **Never modify `PROJECT_STATE.md` directly** — only update it through skill workflows
49
71
  3. **Tests define implementation** — code exists only to make tests pass
50
72
  4. **One spec at a time** — complete or park a spec before starting another
51
- 5. **No stage skipping** — every spec must progress through all 5 stages in order
73
+ 5. **No stage skipping** — every spec must progress through all 5 development stages in order
52
74
  6. **Evidence required** — QA verdicts require concrete test evidence, not assertions
53
75
  7. **Normative language** — specs use SHALL/MUST/SHOULD per RFC 2119
76
+ 8. **Planning precedes development** — reduce ambiguity before writing code
@@ -1,11 +1,27 @@
1
- # SpecSafe — TDD Workflow Rules
1
+ # SpecSafe — Two-Phase Workflow Rules
2
2
 
3
- SpecSafe enforces a strict 5-stage TDD workflow for every feature: **SPEC TEST CODE QA COMPLETE**. No stage may be skipped. Each stage has a dedicated skill and persona.
3
+ SpecSafe is a two-phase software engineering framework. Phase 1 (Planning) reduces ambiguity before implementation. Phase 2 (Development) enforces strict test-driven execution through small spec slices. No stage may be skipped. Each stage has a dedicated skill and persona.
4
4
 
5
- ## Workflow Stages
5
+ ## Phase 1: Planning
6
+
7
+ Planning precedes development. Each step produces an artifact that informs the next.
8
+
9
+ | Step | Skill | What Happens |
10
+ |------|-------|--------------|
11
+ | 1 | `specsafe-brainstorm` | Divergent exploration of possibilities |
12
+ | 2 | `specsafe-principles` | Product principles, non-goals, quality priorities |
13
+ | 3 | `specsafe-brief` | Concise product/business framing document |
14
+ | 4 | `specsafe-prd` | Testable requirements with user journeys and acceptance criteria |
15
+ | 5 | `specsafe-ux` | UX design: tokens, components, flows, accessibility |
16
+ | 6 | `specsafe-architecture` | System architecture with ADRs and technology decisions |
17
+ | 7 | `specsafe-readiness` | Pre-development coherence check |
18
+
19
+ Canonical order: brainstorm → principles → brief → PRD → UX → architecture → readiness. UX always precedes architecture.
20
+
21
+ ## Phase 2: Development Stages
6
22
 
7
23
  | Stage | Skill | Persona | What Happens |
8
- |-------|-------|---------|--------------|
24
+ |-------|-------|---------|--------------|
9
25
  | SPEC | `specsafe-new`, `specsafe-spec` | Mason (Kai) | Create and refine specification with requirements and scenarios |
10
26
  | TEST | `specsafe-test` | Forge (Reva) | Generate test files from spec scenarios (all tests fail) |
11
27
  | CODE | `specsafe-code` | Bolt (Zane) | Implement code using TDD red-green-refactor |
@@ -26,6 +42,10 @@ SpecSafe enforces a strict 5-stage TDD workflow for every feature: **SPEC → TE
26
42
  |-------|-------------|
27
43
  | `specsafe-init` | Initialize a new SpecSafe project with directory structure and config |
28
44
  | `specsafe-explore` | Pre-spec research, spikes, and feasibility assessment |
45
+ | `specsafe-brief` | Create a concise product brief |
46
+ | `specsafe-prd` | Expand brief into full PRD with user journeys and requirements |
47
+ | `specsafe-ux` | UX design foundations — tokens, components, accessibility, flows |
48
+ | `specsafe-architecture` | System architecture — components, data model, ADRs |
29
49
  | `specsafe-new <name>` | Create a new spec from template with unique ID |
30
50
  | `specsafe-spec <id>` | Refine an existing spec with requirements and scenarios |
31
51
  | `specsafe-test <id>` | Generate test files from spec scenarios (SPEC → TEST) |
@@ -36,6 +56,8 @@ SpecSafe enforces a strict 5-stage TDD workflow for every feature: **SPEC → TE
36
56
  | `specsafe-status` | Show project dashboard with all specs and metrics |
37
57
  | `specsafe-archive <id>` | Archive an obsolete spec with reason |
38
58
  | `specsafe-doctor` | Validate project health and diagnose issues |
59
+ | `specsafe-context` | Gather and present project context for AI agents |
60
+ | `specsafe-skill-creator` | Create new SpecSafe skills with proper structure |
39
61
 
40
62
  ## Project Constraints
41
63
 
@@ -43,6 +65,7 @@ SpecSafe enforces a strict 5-stage TDD workflow for every feature: **SPEC → TE
43
65
  2. **Never modify `PROJECT_STATE.md` directly** — only update it through skill workflows
44
66
  3. **Tests define implementation** — code exists only to make tests pass
45
67
  4. **One spec at a time** — complete or park a spec before starting another
46
- 5. **No stage skipping** — every spec must progress through all 5 stages in order
68
+ 5. **No stage skipping** — every spec must progress through all 5 development stages in order
47
69
  6. **Evidence required** — QA verdicts require concrete test evidence, not assertions
48
70
  7. **Normative language** — specs use SHALL/MUST/SHOULD per RFC 2119
71
+ 8. **Planning precedes development** — reduce ambiguity before writing code
@@ -1,11 +1,27 @@
1
- # SpecSafe — TDD Workflow Rules
1
+ # SpecSafe — Two-Phase Workflow Rules
2
2
 
3
- SpecSafe enforces a strict 5-stage TDD workflow for every feature: **SPEC TEST CODE QA COMPLETE**. No stage may be skipped. Each stage has a dedicated skill and persona.
3
+ SpecSafe is a two-phase software engineering framework. Phase 1 (Planning) reduces ambiguity before implementation. Phase 2 (Development) enforces strict test-driven execution through small spec slices. No stage may be skipped. Each stage has a dedicated skill and persona.
4
4
 
5
- ## Workflow Stages
5
+ ## Phase 1: Planning
6
+
7
+ Planning precedes development. Each step produces an artifact that informs the next.
8
+
9
+ | Step | Skill | What Happens |
10
+ |------|-------|--------------|
11
+ | 1 | `specsafe-brainstorm` | Divergent exploration of possibilities |
12
+ | 2 | `specsafe-principles` | Product principles, non-goals, quality priorities |
13
+ | 3 | `specsafe-brief` | Concise product/business framing document |
14
+ | 4 | `specsafe-prd` | Testable requirements with user journeys and acceptance criteria |
15
+ | 5 | `specsafe-ux` | UX design: tokens, components, flows, accessibility |
16
+ | 6 | `specsafe-architecture` | System architecture with ADRs and technology decisions |
17
+ | 7 | `specsafe-readiness` | Pre-development coherence check |
18
+
19
+ Canonical order: brainstorm → principles → brief → PRD → UX → architecture → readiness. UX always precedes architecture.
20
+
21
+ ## Phase 2: Development Stages
6
22
 
7
23
  | Stage | Skill | Persona | What Happens |
8
- |-------|-------|---------|--------------|
24
+ |-------|-------|---------|--------------|
9
25
  | SPEC | `specsafe-new`, `specsafe-spec` | Mason (Kai) | Create and refine specification with requirements and scenarios |
10
26
  | TEST | `specsafe-test` | Forge (Reva) | Generate test files from spec scenarios (all tests fail) |
11
27
  | CODE | `specsafe-code` | Bolt (Zane) | Implement code using TDD red-green-refactor |
@@ -26,6 +42,10 @@ SpecSafe enforces a strict 5-stage TDD workflow for every feature: **SPEC → TE
26
42
  |-------|-------------|
27
43
  | `specsafe-init` | Initialize a new SpecSafe project with directory structure and config |
28
44
  | `specsafe-explore` | Pre-spec research, spikes, and feasibility assessment |
45
+ | `specsafe-brief` | Create a concise product brief |
46
+ | `specsafe-prd` | Expand brief into full PRD with user journeys and requirements |
47
+ | `specsafe-ux` | UX design foundations — tokens, components, accessibility, flows |
48
+ | `specsafe-architecture` | System architecture — components, data model, ADRs |
29
49
  | `specsafe-new <name>` | Create a new spec from template with unique ID |
30
50
  | `specsafe-spec <id>` | Refine an existing spec with requirements and scenarios |
31
51
  | `specsafe-test <id>` | Generate test files from spec scenarios (SPEC → TEST) |
@@ -36,6 +56,8 @@ SpecSafe enforces a strict 5-stage TDD workflow for every feature: **SPEC → TE
36
56
  | `specsafe-status` | Show project dashboard with all specs and metrics |
37
57
  | `specsafe-archive <id>` | Archive an obsolete spec with reason |
38
58
  | `specsafe-doctor` | Validate project health and diagnose issues |
59
+ | `specsafe-context` | Gather and present project context for AI agents |
60
+ | `specsafe-skill-creator` | Create new SpecSafe skills with proper structure |
39
61
 
40
62
  ## Project Constraints
41
63
 
@@ -43,6 +65,7 @@ SpecSafe enforces a strict 5-stage TDD workflow for every feature: **SPEC → TE
43
65
  2. **Never modify `PROJECT_STATE.md` directly** — only update it through skill workflows
44
66
  3. **Tests define implementation** — code exists only to make tests pass
45
67
  4. **One spec at a time** — complete or park a spec before starting another
46
- 5. **No stage skipping** — every spec must progress through all 5 stages in order
68
+ 5. **No stage skipping** — every spec must progress through all 5 development stages in order
47
69
  6. **Evidence required** — QA verdicts require concrete test evidence, not assertions
48
70
  7. **Normative language** — specs use SHALL/MUST/SHOULD per RFC 2119
71
+ 8. **Planning precedes development** — reduce ambiguity before writing code
@@ -1,16 +1,32 @@
1
- # SpecSafe — TDD Workflow Rules
1
+ # SpecSafe — Two-Phase Workflow Rules
2
2
 
3
- SpecSafe enforces a strict 5-stage TDD workflow for every feature: **SPEC TEST CODE QA COMPLETE**. No stage may be skipped. Each stage has a dedicated skill and persona.
3
+ SpecSafe is a two-phase software engineering framework. Phase 1 (Planning) reduces ambiguity before implementation. Phase 2 (Development) enforces strict test-driven execution through small spec slices. No stage may be skipped. Each stage has a dedicated skill and persona.
4
4
 
5
- ## Workflow Stages
5
+ ## Phase 1: Planning
6
+
7
+ Planning precedes development. Each step produces an artifact that informs the next.
8
+
9
+ | Step | Skill | What Happens |
10
+ |------|-------|--------------|
11
+ | 1 | `specsafe-brainstorm` | Divergent exploration of possibilities |
12
+ | 2 | `specsafe-principles` | Product principles, non-goals, quality priorities |
13
+ | 3 | `specsafe-brief` | Concise product/business framing document |
14
+ | 4 | `specsafe-prd` | Testable requirements with user journeys and acceptance criteria |
15
+ | 5 | `specsafe-ux` | UX design: tokens, components, flows, accessibility |
16
+ | 6 | `specsafe-architecture` | System architecture with ADRs and technology decisions |
17
+ | 7 | `specsafe-readiness` | Pre-development coherence check |
18
+
19
+ Canonical order: brainstorm → principles → brief → PRD → UX → architecture → readiness. UX always precedes architecture.
20
+
21
+ ## Phase 2: Development Stages
6
22
 
7
23
  | Stage | Skill | Persona | What Happens |
8
- |-------|-------|---------|--------------|
9
- | SPEC | `/specsafe-new`, `/specsafe-spec` | Mason (Kai) | Create and refine specification with requirements and scenarios |
10
- | TEST | `/specsafe-test` | Forge (Reva) | Generate test files from spec scenarios (all tests fail) |
11
- | CODE | `/specsafe-code` | Bolt (Zane) | Implement code using TDD red-green-refactor |
12
- | QA | `/specsafe-verify`, `/specsafe-qa` | Warden (Lyra) | Validate tests pass, check coverage, generate QA report |
13
- | COMPLETE | `/specsafe-complete` | Herald (Cass) | Human approval gate, move to completed |
24
+ |-------|-------|---------|--------------|
25
+ | SPEC | `specsafe-new`, `specsafe-spec` | Mason (Kai) | Create and refine specification with requirements and scenarios |
26
+ | TEST | `specsafe-test` | Forge (Reva) | Generate test files from spec scenarios (all tests fail) |
27
+ | CODE | `specsafe-code` | Bolt (Zane) | Implement code using TDD red-green-refactor |
28
+ | QA | `specsafe-verify`, `specsafe-qa` | Warden (Lyra) | Validate tests pass, check coverage, generate QA report |
29
+ | COMPLETE | `specsafe-complete` | Herald (Cass) | Human approval gate, move to completed |
14
30
 
15
31
  ## Key Files
16
32
 
@@ -24,18 +40,24 @@ SpecSafe enforces a strict 5-stage TDD workflow for every feature: **SPEC → TE
24
40
 
25
41
  | Skill | Description |
26
42
  |-------|-------------|
27
- | `/specsafe-init` | Initialize a new SpecSafe project with directory structure and config |
28
- | `/specsafe-explore` | Pre-spec research, spikes, and feasibility assessment |
29
- | `/specsafe-new <name>` | Create a new spec from template with unique ID |
30
- | `/specsafe-spec <id>` | Refine an existing spec with requirements and scenarios |
31
- | `/specsafe-test <id>` | Generate test files from spec scenarios (SPEC TEST) |
32
- | `/specsafe-code <id>` | Implement code via TDD to pass tests (TEST → CODE) |
33
- | `/specsafe-verify <id>` | Run tests and validate against spec (CODE QA) |
34
- | `/specsafe-qa <id>` | Generate full QA report with GO/NO-GO recommendation |
35
- | `/specsafe-complete <id>` | Complete spec with human approval (QACOMPLETE) |
36
- | `/specsafe-status` | Show project dashboard with all specs and metrics |
37
- | `/specsafe-archive <id>` | Archive an obsolete spec with reason |
38
- | `/specsafe-doctor` | Validate project health and diagnose issues |
43
+ | `specsafe-init` | Initialize a new SpecSafe project with directory structure and config |
44
+ | `specsafe-explore` | Pre-spec research, spikes, and feasibility assessment |
45
+ | `specsafe-brief` | Create a concise product brief |
46
+ | `specsafe-prd` | Expand brief into full PRD with user journeys and requirements |
47
+ | `specsafe-ux` | UX design foundations tokens, components, accessibility, flows |
48
+ | `specsafe-architecture` | System architecture components, data model, ADRs |
49
+ | `specsafe-new <name>` | Create a new spec from template with unique ID |
50
+ | `specsafe-spec <id>` | Refine an existing spec with requirements and scenarios |
51
+ | `specsafe-test <id>` | Generate test files from spec scenarios (SPECTEST) |
52
+ | `specsafe-code <id>` | Implement code via TDD to pass tests (TEST → CODE) |
53
+ | `specsafe-verify <id>` | Run tests and validate against spec (CODE QA) |
54
+ | `specsafe-qa <id>` | Generate full QA report with GO/NO-GO recommendation |
55
+ | `specsafe-complete <id>` | Complete spec with human approval (QA → COMPLETE) |
56
+ | `specsafe-status` | Show project dashboard with all specs and metrics |
57
+ | `specsafe-archive <id>` | Archive an obsolete spec with reason |
58
+ | `specsafe-doctor` | Validate project health and diagnose issues |
59
+ | `specsafe-context` | Gather and present project context for AI agents |
60
+ | `specsafe-skill-creator` | Create new SpecSafe skills with proper structure |
39
61
 
40
62
  ## Project Constraints
41
63
 
@@ -43,6 +65,7 @@ SpecSafe enforces a strict 5-stage TDD workflow for every feature: **SPEC → TE
43
65
  2. **Never modify `PROJECT_STATE.md` directly** — only update it through skill workflows
44
66
  3. **Tests define implementation** — code exists only to make tests pass
45
67
  4. **One spec at a time** — complete or park a spec before starting another
46
- 5. **No stage skipping** — every spec must progress through all 5 stages in order
68
+ 5. **No stage skipping** — every spec must progress through all 5 development stages in order
47
69
  6. **Evidence required** — QA verdicts require concrete test evidence, not assertions
48
70
  7. **Normative language** — specs use SHALL/MUST/SHOULD per RFC 2119
71
+ 8. **Planning precedes development** — reduce ambiguity before writing code
@@ -1,6 +1,21 @@
1
1
  # SpecSafe Conventions
2
2
 
3
- ## TDD Workflow (5 Stages)
3
+ ## Two-Phase Workflow
4
+
5
+ SpecSafe uses a two-phase model: Planning reduces ambiguity, then Development enforces test-driven execution.
6
+
7
+ ### Phase 1: Planning
8
+
9
+ Canonical order: brainstorm → principles → brief → PRD → UX → architecture → readiness.
10
+
11
+ - **Brainstorm**: Divergent exploration- **Principles**: Product principles and non-goals- **Brief**: Concise product/business framing (`specsafe-brief`)
12
+ - **PRD**: Testable requirements with user journeys (`specsafe-prd`)
13
+ - **UX**: Design foundations, tokens, accessibility (`specsafe-ux`)
14
+ - **Architecture**: System design with ADRs (`specsafe-architecture`)
15
+ - **Readiness**: Pre-development coherence check
16
+ UX always precedes architecture. Planning precedes development.
17
+
18
+ ### Phase 2: Development (5 Stages)
4
19
 
5
20
  Every feature follows: **SPEC → TEST → CODE → QA → COMPLETE**. No skipping.
6
21
 
@@ -16,21 +31,36 @@ Every feature follows: **SPEC → TEST → CODE → QA → COMPLETE**. No skippi
16
31
  - `specs/active/` — Active specs. `specs/completed/` — Done. `specs/archive/` — Obsolete.
17
32
  - `specsafe.config.json` — Project config (test framework, language, tools).
18
33
 
19
- ## 12 Skills
20
-
21
- 1. `specsafe-init` — Initialize project
22
- 2. `specsafe-explore` — Pre-spec research
23
- 3. `specsafe-new <name>` Create new spec
24
- 4. `specsafe-spec <id>` Refine spec
25
- 5. `specsafe-test <id>` Generate tests (SPEC → TEST)
26
- 6. `specsafe-code <id>` — Implement via TDD (TEST → CODE)
27
- 7. `specsafe-verify <id>` — Validate implementation (CODE → QA)
28
- 8. `specsafe-qa <id>` — Full QA report
29
- 9. `specsafe-complete <id>` — Complete spec (QA → COMPLETE)
30
- 10. `specsafe-status`Project dashboard
31
- 11. `specsafe-archive <id>` — Archive obsolete spec
32
- 12. `specsafe-doctor` — Validate project health
34
+ ## 18 Skills
35
+
36
+ ### Planning
37
+ 1. `specsafe-brief` — Create product brief
38
+ 2. `specsafe-prd`Expand brief into PRD
39
+ 3. `specsafe-ux`UX design foundations
40
+ 4. `specsafe-architecture`System architecture
41
+
42
+ ### Development
43
+ 5. `specsafe-new <name>` — Create new spec
44
+ 6. `specsafe-spec <id>` — Refine spec
45
+ 7. `specsafe-test <id>` Generate tests (SPEC → TEST)
46
+ 8. `specsafe-code <id>` — Implement via TDD (TEST → CODE)
47
+ 9. `specsafe-verify <id>` — Validate implementation (CODE → QA)
48
+ 10. `specsafe-qa <id>` — Full QA report
49
+ 11. `specsafe-complete <id>` — Complete spec (QA → COMPLETE)
50
+
51
+ ### Utility
52
+ 12. `specsafe-init` — Initialize project
53
+ 13. `specsafe-explore` — Pre-spec research
54
+ 14. `specsafe-context` — Gather project context
55
+ 15. `specsafe-status` — Project dashboard
56
+ 16. `specsafe-archive <id>` — Archive obsolete spec
57
+ 17. `specsafe-doctor` — Validate project health
58
+ 18. `specsafe-skill-creator` — Create new skills
33
59
 
60
+ ### Planning (continued)
61
+ 19. `specsafe-brainstorm` — Divergent exploration
62
+ 20. `specsafe-principles` — Product principles
63
+ 21. `specsafe-readiness` — Pre-development coherence check
34
64
  ## Rules
35
65
 
36
66
  - Always read `PROJECT_STATE.md` before any operation
@@ -39,3 +69,4 @@ Every feature follows: **SPEC → TEST → CODE → QA → COMPLETE**. No skippi
39
69
  - One spec at a time
40
70
  - Evidence required for all QA verdicts
41
71
  - Requirements use SHALL/MUST/SHOULD (RFC 2119)
72
+ - Planning precedes development — reduce ambiguity before writing code
@@ -1,11 +1,27 @@
1
- # SpecSafe — TDD Workflow Rules
1
+ # SpecSafe — Two-Phase Workflow Rules
2
2
 
3
- SpecSafe enforces a strict 5-stage TDD workflow for every feature: **SPEC TEST CODE QA COMPLETE**. No stage may be skipped. Each stage has a dedicated skill and persona.
3
+ SpecSafe is a two-phase software engineering framework. Phase 1 (Planning) reduces ambiguity before implementation. Phase 2 (Development) enforces strict test-driven execution through small spec slices. No stage may be skipped. Each stage has a dedicated skill and persona.
4
4
 
5
- ## Workflow Stages
5
+ ## Phase 1: Planning
6
+
7
+ Planning precedes development. Each step produces an artifact that informs the next.
8
+
9
+ | Step | Skill | What Happens |
10
+ |------|-------|--------------|
11
+ | 1 | `specsafe-brainstorm` | Divergent exploration of possibilities |
12
+ | 2 | `specsafe-principles` | Product principles, non-goals, quality priorities |
13
+ | 3 | `specsafe-brief` | Concise product/business framing document |
14
+ | 4 | `specsafe-prd` | Testable requirements with user journeys and acceptance criteria |
15
+ | 5 | `specsafe-ux` | UX design: tokens, components, flows, accessibility |
16
+ | 6 | `specsafe-architecture` | System architecture with ADRs and technology decisions |
17
+ | 7 | `specsafe-readiness` | Pre-development coherence check |
18
+
19
+ Canonical order: brainstorm → principles → brief → PRD → UX → architecture → readiness. UX always precedes architecture.
20
+
21
+ ## Phase 2: Development Stages
6
22
 
7
23
  | Stage | Skill | Persona | What Happens |
8
- |-------|-------|---------|--------------|
24
+ |-------|-------|---------|--------------|
9
25
  | SPEC | `specsafe-new`, `specsafe-spec` | Mason (Kai) | Create and refine specification with requirements and scenarios |
10
26
  | TEST | `specsafe-test` | Forge (Reva) | Generate test files from spec scenarios (all tests fail) |
11
27
  | CODE | `specsafe-code` | Bolt (Zane) | Implement code using TDD red-green-refactor |
@@ -26,6 +42,10 @@ SpecSafe enforces a strict 5-stage TDD workflow for every feature: **SPEC → TE
26
42
  |-------|-------------|
27
43
  | `specsafe-init` | Initialize a new SpecSafe project with directory structure and config |
28
44
  | `specsafe-explore` | Pre-spec research, spikes, and feasibility assessment |
45
+ | `specsafe-brief` | Create a concise product brief |
46
+ | `specsafe-prd` | Expand brief into full PRD with user journeys and requirements |
47
+ | `specsafe-ux` | UX design foundations — tokens, components, accessibility, flows |
48
+ | `specsafe-architecture` | System architecture — components, data model, ADRs |
29
49
  | `specsafe-new <name>` | Create a new spec from template with unique ID |
30
50
  | `specsafe-spec <id>` | Refine an existing spec with requirements and scenarios |
31
51
  | `specsafe-test <id>` | Generate test files from spec scenarios (SPEC → TEST) |
@@ -36,6 +56,8 @@ SpecSafe enforces a strict 5-stage TDD workflow for every feature: **SPEC → TE
36
56
  | `specsafe-status` | Show project dashboard with all specs and metrics |
37
57
  | `specsafe-archive <id>` | Archive an obsolete spec with reason |
38
58
  | `specsafe-doctor` | Validate project health and diagnose issues |
59
+ | `specsafe-context` | Gather and present project context for AI agents |
60
+ | `specsafe-skill-creator` | Create new SpecSafe skills with proper structure |
39
61
 
40
62
  ## Project Constraints
41
63
 
@@ -43,8 +65,9 @@ SpecSafe enforces a strict 5-stage TDD workflow for every feature: **SPEC → TE
43
65
  2. **Never modify `PROJECT_STATE.md` directly** — only update it through skill workflows
44
66
  3. **Tests define implementation** — code exists only to make tests pass
45
67
  4. **One spec at a time** — complete or park a spec before starting another
46
- 5. **No stage skipping** — every spec must progress through all 5 stages in order
68
+ 5. **No stage skipping** — every spec must progress through all 5 development stages in order
47
69
  6. **Evidence required** — QA verdicts require concrete test evidence, not assertions
48
70
  7. **Normative language** — specs use SHALL/MUST/SHOULD per RFC 2119
71
+ 8. **Planning precedes development** — reduce ambiguity before writing code
49
72
 
50
73
  @import AGENTS.md
@@ -1,4 +1,4 @@
1
- name: SpecSafe TDD
1
+ name: SpecSafe Two-Phase Workflow
2
2
  version: 1.0.0
3
3
  schema: v1
4
4
  rules:
@@ -225,7 +225,7 @@ Summary:
225
225
  Architecture decisions: [count] ADRs
226
226
  Technology stack: [brief summary, e.g., "TypeScript + Next.js + PostgreSQL + Vercel"]
227
227
 
228
- Next: Run /specsafe-ux to define UX design principles, or /specsafe-new to start creating feature specs.
228
+ Next: Run /specsafe-readiness to validate planning coherence before development begins (or /specsafe-new if readiness is not yet available).
229
229
  ```
230
230
 
231
231
  ## State Changes
@@ -245,4 +245,4 @@ Next: Run /specsafe-ux to define UX design principles, or /specsafe-new to start
245
245
 
246
246
  ## Handoff
247
247
 
248
- Next skill: `/specsafe-ux` to define UX design principles, or `/specsafe-new` to start creating feature specs informed by the architecture.
248
+ Next skill: `/specsafe-readiness` to validate planning coherence before development begins (or `/specsafe-new` if readiness is not yet available). UX is upstream of architecture — it should already be complete before this skill runs.
@@ -0,0 +1,7 @@
1
+ ---
2
+ name: specsafe-brainstorm
3
+ description: Facilitate structured brainstorming sessions for product, feature, workflow, or system ideas. The entry point for ambiguous ideas before they become principles or briefs.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Read the file ./workflow.md now and follow every instruction in it step by step.