@specsafe/cli 0.8.0 → 2.0.3
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 +100 -279
- package/canonical/personas/bolt-zane.md +29 -0
- package/canonical/personas/forge-reva.md +29 -0
- package/canonical/personas/herald-cass.md +30 -0
- package/canonical/personas/mason-kai.md +30 -0
- package/canonical/personas/scout-elena.md +27 -0
- package/canonical/personas/warden-lyra.md +30 -0
- package/canonical/rules/.cursorrules.mdc +53 -0
- package/canonical/rules/.rules +48 -0
- package/canonical/rules/AGENTS.md +48 -0
- package/canonical/rules/CLAUDE.md +48 -0
- package/canonical/rules/CONVENTIONS.md +41 -0
- package/canonical/rules/GEMINI.md +50 -0
- package/canonical/rules/continue-config.yaml +5 -0
- package/canonical/skills/specsafe-archive/SKILL.md +63 -0
- package/canonical/skills/specsafe-code/SKILL.md +7 -0
- package/canonical/skills/specsafe-code/workflow.md +212 -0
- package/canonical/skills/specsafe-complete/SKILL.md +7 -0
- package/canonical/skills/specsafe-complete/workflow.md +130 -0
- package/canonical/skills/specsafe-doctor/SKILL.md +103 -0
- package/canonical/skills/specsafe-explore/SKILL.md +7 -0
- package/canonical/skills/specsafe-explore/workflow.md +100 -0
- package/canonical/skills/specsafe-init/SKILL.md +119 -0
- package/canonical/skills/specsafe-new/SKILL.md +7 -0
- package/canonical/skills/specsafe-new/workflow.md +156 -0
- package/canonical/skills/specsafe-qa/SKILL.md +7 -0
- package/canonical/skills/specsafe-qa/workflow.md +223 -0
- package/canonical/skills/specsafe-spec/SKILL.md +7 -0
- package/canonical/skills/specsafe-spec/workflow.md +158 -0
- package/canonical/skills/specsafe-status/SKILL.md +77 -0
- package/canonical/skills/specsafe-test/SKILL.md +7 -0
- package/canonical/skills/specsafe-test/workflow.md +210 -0
- package/canonical/skills/specsafe-verify/SKILL.md +7 -0
- package/canonical/skills/specsafe-verify/workflow.md +143 -0
- package/canonical/templates/project-state-template.md +33 -0
- package/canonical/templates/qa-report-template.md +55 -0
- package/canonical/templates/spec-template.md +52 -0
- package/canonical/templates/specsafe-config-template.json +10 -0
- package/generators/dist/adapters/aider.d.ts +2 -0
- package/generators/dist/adapters/aider.js +23 -0
- package/generators/dist/adapters/aider.js.map +1 -0
- package/generators/dist/adapters/antigravity.d.ts +2 -0
- package/generators/dist/adapters/antigravity.js +33 -0
- package/generators/dist/adapters/antigravity.js.map +1 -0
- package/generators/dist/adapters/claude-code.d.ts +2 -0
- package/generators/dist/adapters/claude-code.js +31 -0
- package/generators/dist/adapters/claude-code.js.map +1 -0
- package/generators/dist/adapters/continue.d.ts +2 -0
- package/generators/dist/adapters/continue.js +33 -0
- package/generators/dist/adapters/continue.js.map +1 -0
- package/generators/dist/adapters/cursor.d.ts +2 -0
- package/generators/dist/adapters/cursor.js +32 -0
- package/generators/dist/adapters/cursor.js.map +1 -0
- package/generators/dist/adapters/gemini.d.ts +2 -0
- package/generators/dist/adapters/gemini.js +36 -0
- package/generators/dist/adapters/gemini.js.map +1 -0
- package/generators/dist/adapters/index.d.ts +13 -0
- package/generators/dist/adapters/index.js +29 -0
- package/generators/dist/adapters/index.js.map +1 -0
- package/generators/dist/adapters/opencode.d.ts +2 -0
- package/generators/dist/adapters/opencode.js +32 -0
- package/generators/dist/adapters/opencode.js.map +1 -0
- package/generators/dist/adapters/types.d.ts +49 -0
- package/generators/dist/adapters/types.js +14 -0
- package/generators/dist/adapters/types.js.map +1 -0
- package/generators/dist/adapters/utils.d.ts +12 -0
- package/generators/dist/adapters/utils.js +68 -0
- package/generators/dist/adapters/utils.js.map +1 -0
- package/generators/dist/adapters/zed.d.ts +2 -0
- package/generators/dist/adapters/zed.js +31 -0
- package/generators/dist/adapters/zed.js.map +1 -0
- package/generators/dist/doctor.d.ts +10 -0
- package/generators/dist/doctor.js +123 -0
- package/generators/dist/doctor.js.map +1 -0
- package/generators/dist/index.d.ts +2 -0
- package/generators/dist/index.js +45 -0
- package/generators/dist/index.js.map +1 -0
- package/generators/dist/init.d.ts +9 -0
- package/generators/dist/init.js +167 -0
- package/generators/dist/init.js.map +1 -0
- package/generators/dist/install.d.ts +5 -0
- package/generators/dist/install.js +66 -0
- package/generators/dist/install.js.map +1 -0
- package/generators/dist/registry.d.ts +3 -0
- package/generators/dist/registry.js +8 -0
- package/generators/dist/registry.js.map +1 -0
- package/generators/dist/update.d.ts +5 -0
- package/generators/dist/update.js +40 -0
- package/generators/dist/update.js.map +1 -0
- package/package.json +31 -27
- package/dist/commands/apply.d.ts +0 -3
- package/dist/commands/apply.d.ts.map +0 -1
- package/dist/commands/apply.js +0 -182
- package/dist/commands/apply.js.map +0 -1
- package/dist/commands/archive.d.ts +0 -3
- package/dist/commands/archive.d.ts.map +0 -1
- package/dist/commands/archive.js +0 -99
- package/dist/commands/archive.js.map +0 -1
- package/dist/commands/capsule.d.ts +0 -8
- package/dist/commands/capsule.d.ts.map +0 -1
- package/dist/commands/capsule.js +0 -466
- package/dist/commands/capsule.js.map +0 -1
- package/dist/commands/complete.d.ts +0 -3
- package/dist/commands/complete.d.ts.map +0 -1
- package/dist/commands/complete.js +0 -140
- package/dist/commands/complete.js.map +0 -1
- package/dist/commands/constitution.d.ts +0 -3
- package/dist/commands/constitution.d.ts.map +0 -1
- package/dist/commands/constitution.js +0 -192
- package/dist/commands/constitution.js.map +0 -1
- package/dist/commands/create.d.ts +0 -10
- package/dist/commands/create.d.ts.map +0 -1
- package/dist/commands/create.js +0 -120
- package/dist/commands/create.js.map +0 -1
- package/dist/commands/delta.d.ts +0 -3
- package/dist/commands/delta.d.ts.map +0 -1
- package/dist/commands/delta.js +0 -82
- package/dist/commands/delta.js.map +0 -1
- package/dist/commands/diff.d.ts +0 -3
- package/dist/commands/diff.d.ts.map +0 -1
- package/dist/commands/diff.js +0 -102
- package/dist/commands/diff.js.map +0 -1
- package/dist/commands/doctor.d.ts +0 -3
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js +0 -204
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/done.d.ts +0 -3
- package/dist/commands/done.d.ts.map +0 -1
- package/dist/commands/done.js +0 -237
- package/dist/commands/done.js.map +0 -1
- package/dist/commands/explore.d.ts +0 -3
- package/dist/commands/explore.d.ts.map +0 -1
- package/dist/commands/explore.js +0 -236
- package/dist/commands/explore.js.map +0 -1
- package/dist/commands/export.d.ts +0 -7
- package/dist/commands/export.d.ts.map +0 -1
- package/dist/commands/export.js +0 -179
- package/dist/commands/export.js.map +0 -1
- package/dist/commands/extend.d.ts +0 -6
- package/dist/commands/extend.d.ts.map +0 -1
- package/dist/commands/extend.js +0 -167
- package/dist/commands/extend.js.map +0 -1
- package/dist/commands/init-old.d.ts +0 -3
- package/dist/commands/init-old.d.ts.map +0 -1
- package/dist/commands/init-old.js +0 -146
- package/dist/commands/init-old.js.map +0 -1
- package/dist/commands/init.d.ts +0 -3
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -298
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/list.d.ts +0 -3
- package/dist/commands/list.d.ts.map +0 -1
- package/dist/commands/list.js +0 -122
- package/dist/commands/list.js.map +0 -1
- package/dist/commands/memory.d.ts +0 -3
- package/dist/commands/memory.d.ts.map +0 -1
- package/dist/commands/memory.js +0 -166
- package/dist/commands/memory.js.map +0 -1
- package/dist/commands/new.d.ts +0 -3
- package/dist/commands/new.d.ts.map +0 -1
- package/dist/commands/new.js +0 -508
- package/dist/commands/new.js.map +0 -1
- package/dist/commands/qa.d.ts +0 -3
- package/dist/commands/qa.d.ts.map +0 -1
- package/dist/commands/qa.js +0 -179
- package/dist/commands/qa.js.map +0 -1
- package/dist/commands/rules.d.ts +0 -6
- package/dist/commands/rules.d.ts.map +0 -1
- package/dist/commands/rules.js +0 -232
- package/dist/commands/rules.js.map +0 -1
- package/dist/commands/shard.d.ts +0 -6
- package/dist/commands/shard.d.ts.map +0 -1
- package/dist/commands/shard.js +0 -199
- package/dist/commands/shard.js.map +0 -1
- package/dist/commands/spec.d.ts +0 -3
- package/dist/commands/spec.d.ts.map +0 -1
- package/dist/commands/spec.js +0 -302
- package/dist/commands/spec.js.map +0 -1
- package/dist/commands/status.d.ts +0 -3
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/status.js +0 -47
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/test-apply.d.ts +0 -3
- package/dist/commands/test-apply.d.ts.map +0 -1
- package/dist/commands/test-apply.js +0 -228
- package/dist/commands/test-apply.js.map +0 -1
- package/dist/commands/test-create.d.ts +0 -3
- package/dist/commands/test-create.d.ts.map +0 -1
- package/dist/commands/test-create.js +0 -183
- package/dist/commands/test-create.js.map +0 -1
- package/dist/commands/test-guide.d.ts +0 -3
- package/dist/commands/test-guide.d.ts.map +0 -1
- package/dist/commands/test-guide.js +0 -190
- package/dist/commands/test-guide.js.map +0 -1
- package/dist/commands/test-report.d.ts +0 -3
- package/dist/commands/test-report.d.ts.map +0 -1
- package/dist/commands/test-report.js +0 -196
- package/dist/commands/test-report.js.map +0 -1
- package/dist/commands/test-submit.d.ts +0 -6
- package/dist/commands/test-submit.d.ts.map +0 -1
- package/dist/commands/test-submit.js +0 -236
- package/dist/commands/test-submit.js.map +0 -1
- package/dist/commands/verify.d.ts +0 -3
- package/dist/commands/verify.d.ts.map +0 -1
- package/dist/commands/verify.js +0 -288
- package/dist/commands/verify.js.map +0 -1
- package/dist/config.d.ts +0 -23
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js +0 -44
- package/dist/config.js.map +0 -1
- package/dist/index.d.ts +0 -8
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -129
- package/dist/index.js.map +0 -1
- package/dist/rules/downloader.d.ts +0 -40
- package/dist/rules/downloader.d.ts.map +0 -1
- package/dist/rules/downloader.js +0 -253
- package/dist/rules/downloader.js.map +0 -1
- package/dist/rules/index.d.ts +0 -8
- package/dist/rules/index.d.ts.map +0 -1
- package/dist/rules/index.js +0 -8
- package/dist/rules/index.js.map +0 -1
- package/dist/rules/registry.d.ts +0 -45
- package/dist/rules/registry.d.ts.map +0 -1
- package/dist/rules/registry.js +0 -158
- package/dist/rules/registry.js.map +0 -1
- package/dist/rules/types.d.ts +0 -86
- package/dist/rules/types.d.ts.map +0 -1
- package/dist/rules/types.js +0 -6
- package/dist/rules/types.js.map +0 -1
- package/dist/utils/detectTools.d.ts +0 -15
- package/dist/utils/detectTools.d.ts.map +0 -1
- package/dist/utils/detectTools.js +0 -54
- package/dist/utils/detectTools.js.map +0 -1
- package/dist/utils/generateToolConfig.d.ts +0 -12
- package/dist/utils/generateToolConfig.d.ts.map +0 -1
- package/dist/utils/generateToolConfig.js +0 -1179
- package/dist/utils/generateToolConfig.js.map +0 -1
- package/dist/utils/testRunner.d.ts +0 -39
- package/dist/utils/testRunner.d.ts.map +0 -1
- package/dist/utils/testRunner.js +0 -325
- package/dist/utils/testRunner.js.map +0 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# SpecSafe — TDD Workflow Rules
|
|
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.
|
|
4
|
+
|
|
5
|
+
## Workflow Stages
|
|
6
|
+
|
|
7
|
+
| 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 |
|
|
14
|
+
|
|
15
|
+
## Key Files
|
|
16
|
+
|
|
17
|
+
- **`PROJECT_STATE.md`** — Single source of truth for all spec status and metrics. Read this first.
|
|
18
|
+
- **`specs/active/`** — Active spec markdown files
|
|
19
|
+
- **`specs/completed/`** — Completed specs with QA reports
|
|
20
|
+
- **`specs/archive/`** — Archived/obsolete specs
|
|
21
|
+
- **`specsafe.config.json`** — Project configuration (test framework, language, tools)
|
|
22
|
+
|
|
23
|
+
## Skills Reference
|
|
24
|
+
|
|
25
|
+
| Skill | Description |
|
|
26
|
+
|-------|-------------|
|
|
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 (QA → COMPLETE) |
|
|
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 |
|
|
39
|
+
|
|
40
|
+
## Project Constraints
|
|
41
|
+
|
|
42
|
+
1. **Always read `PROJECT_STATE.md` first** — before any skill invocation, check current state
|
|
43
|
+
2. **Never modify `PROJECT_STATE.md` directly** — only update it through skill workflows
|
|
44
|
+
3. **Tests define implementation** — code exists only to make tests pass
|
|
45
|
+
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
|
|
47
|
+
6. **Evidence required** — QA verdicts require concrete test evidence, not assertions
|
|
48
|
+
7. **Normative language** — specs use SHALL/MUST/SHOULD per RFC 2119
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# SpecSafe — TDD Workflow Rules
|
|
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.
|
|
4
|
+
|
|
5
|
+
## Workflow Stages
|
|
6
|
+
|
|
7
|
+
| 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 |
|
|
14
|
+
|
|
15
|
+
## Key Files
|
|
16
|
+
|
|
17
|
+
- **`PROJECT_STATE.md`** — Single source of truth for all spec status and metrics. Read this first.
|
|
18
|
+
- **`specs/active/`** — Active spec markdown files
|
|
19
|
+
- **`specs/completed/`** — Completed specs with QA reports
|
|
20
|
+
- **`specs/archive/`** — Archived/obsolete specs
|
|
21
|
+
- **`specsafe.config.json`** — Project configuration (test framework, language, tools)
|
|
22
|
+
|
|
23
|
+
## Skills Reference
|
|
24
|
+
|
|
25
|
+
| Skill | Description |
|
|
26
|
+
|-------|-------------|
|
|
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 (QA → COMPLETE) |
|
|
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 |
|
|
39
|
+
|
|
40
|
+
## Project Constraints
|
|
41
|
+
|
|
42
|
+
1. **Always read `PROJECT_STATE.md` first** — before any skill invocation, check current state
|
|
43
|
+
2. **Never modify `PROJECT_STATE.md` directly** — only update it through skill workflows
|
|
44
|
+
3. **Tests define implementation** — code exists only to make tests pass
|
|
45
|
+
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
|
|
47
|
+
6. **Evidence required** — QA verdicts require concrete test evidence, not assertions
|
|
48
|
+
7. **Normative language** — specs use SHALL/MUST/SHOULD per RFC 2119
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# SpecSafe — TDD Workflow Rules
|
|
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.
|
|
4
|
+
|
|
5
|
+
## Workflow Stages
|
|
6
|
+
|
|
7
|
+
| 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 |
|
|
14
|
+
|
|
15
|
+
## Key Files
|
|
16
|
+
|
|
17
|
+
- **`PROJECT_STATE.md`** — Single source of truth for all spec status and metrics. Read this first.
|
|
18
|
+
- **`specs/active/`** — Active spec markdown files
|
|
19
|
+
- **`specs/completed/`** — Completed specs with QA reports
|
|
20
|
+
- **`specs/archive/`** — Archived/obsolete specs
|
|
21
|
+
- **`specsafe.config.json`** — Project configuration (test framework, language, tools)
|
|
22
|
+
|
|
23
|
+
## Skills Reference
|
|
24
|
+
|
|
25
|
+
| Skill | Description |
|
|
26
|
+
|-------|-------------|
|
|
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 (QA → COMPLETE) |
|
|
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 |
|
|
39
|
+
|
|
40
|
+
## Project Constraints
|
|
41
|
+
|
|
42
|
+
1. **Always read `PROJECT_STATE.md` first** — before any skill invocation, check current state
|
|
43
|
+
2. **Never modify `PROJECT_STATE.md` directly** — only update it through skill workflows
|
|
44
|
+
3. **Tests define implementation** — code exists only to make tests pass
|
|
45
|
+
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
|
|
47
|
+
6. **Evidence required** — QA verdicts require concrete test evidence, not assertions
|
|
48
|
+
7. **Normative language** — specs use SHALL/MUST/SHOULD per RFC 2119
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# SpecSafe Conventions
|
|
2
|
+
|
|
3
|
+
## TDD Workflow (5 Stages)
|
|
4
|
+
|
|
5
|
+
Every feature follows: **SPEC → TEST → CODE → QA → COMPLETE**. No skipping.
|
|
6
|
+
|
|
7
|
+
- **SPEC**: Create spec with requirements (SHALL/MUST language) and GIVEN/WHEN/THEN scenarios
|
|
8
|
+
- **TEST**: Generate failing tests from spec scenarios — tests before code
|
|
9
|
+
- **CODE**: Implement using red-green-refactor — minimum code to pass each test
|
|
10
|
+
- **QA**: Validate all tests pass, coverage meets threshold, generate QA report
|
|
11
|
+
- **COMPLETE**: Human approval gate, move spec to completed
|
|
12
|
+
|
|
13
|
+
## Key Files
|
|
14
|
+
|
|
15
|
+
- `PROJECT_STATE.md` — Read first. Single source of truth for spec status.
|
|
16
|
+
- `specs/active/` — Active specs. `specs/completed/` — Done. `specs/archive/` — Obsolete.
|
|
17
|
+
- `specsafe.config.json` — Project config (test framework, language, tools).
|
|
18
|
+
|
|
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
|
|
33
|
+
|
|
34
|
+
## Rules
|
|
35
|
+
|
|
36
|
+
- Always read `PROJECT_STATE.md` before any operation
|
|
37
|
+
- Never modify `PROJECT_STATE.md` except through skill workflows
|
|
38
|
+
- Tests define implementation — code exists only to make tests pass
|
|
39
|
+
- One spec at a time
|
|
40
|
+
- Evidence required for all QA verdicts
|
|
41
|
+
- Requirements use SHALL/MUST/SHOULD (RFC 2119)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# SpecSafe — TDD Workflow Rules
|
|
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.
|
|
4
|
+
|
|
5
|
+
## Workflow Stages
|
|
6
|
+
|
|
7
|
+
| 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 |
|
|
14
|
+
|
|
15
|
+
## Key Files
|
|
16
|
+
|
|
17
|
+
- **`PROJECT_STATE.md`** — Single source of truth for all spec status and metrics. Read this first.
|
|
18
|
+
- **`specs/active/`** — Active spec markdown files
|
|
19
|
+
- **`specs/completed/`** — Completed specs with QA reports
|
|
20
|
+
- **`specs/archive/`** — Archived/obsolete specs
|
|
21
|
+
- **`specsafe.config.json`** — Project configuration (test framework, language, tools)
|
|
22
|
+
|
|
23
|
+
## Skills Reference
|
|
24
|
+
|
|
25
|
+
| Skill | Description |
|
|
26
|
+
|-------|-------------|
|
|
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 (QA → COMPLETE) |
|
|
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 |
|
|
39
|
+
|
|
40
|
+
## Project Constraints
|
|
41
|
+
|
|
42
|
+
1. **Always read `PROJECT_STATE.md` first** — before any skill invocation, check current state
|
|
43
|
+
2. **Never modify `PROJECT_STATE.md` directly** — only update it through skill workflows
|
|
44
|
+
3. **Tests define implementation** — code exists only to make tests pass
|
|
45
|
+
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
|
|
47
|
+
6. **Evidence required** — QA verdicts require concrete test evidence, not assertions
|
|
48
|
+
7. **Normative language** — specs use SHALL/MUST/SHOULD per RFC 2119
|
|
49
|
+
|
|
50
|
+
@import AGENTS.md
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: specsafe-archive
|
|
3
|
+
description: Archive an obsolete or abandoned spec with a reason. Moves spec out of active/completed into archive.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Archive — Cass the Release Manager
|
|
8
|
+
|
|
9
|
+
> **Persona:** Cass the Release Manager. Concise, checklist-driven, ceremony-aware.
|
|
10
|
+
> **Principles:** Nothing is deleted, only archived. Every archive has a reason. The record is preserved.
|
|
11
|
+
|
|
12
|
+
## Input
|
|
13
|
+
|
|
14
|
+
- Spec ID (e.g., `SPEC-20260402-001`)
|
|
15
|
+
- Reason for archiving (e.g., "requirements changed", "superseded by SPEC-20260410-001", "no longer needed")
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
### Step 1: Locate the Spec
|
|
20
|
+
|
|
21
|
+
1. Check `specs/active/<id>.md` — if found, note source as "active"
|
|
22
|
+
2. If not in active, check `specs/completed/<id>.md` — if found, note source as "completed"
|
|
23
|
+
3. If not found in either location, stop: "Spec `<id>` not found in specs/active/ or specs/completed/. Nothing to archive."
|
|
24
|
+
4. Also check for a QA report at `specs/active/<id>-qa-report.md` or `specs/completed/<id>-qa-report.md`
|
|
25
|
+
|
|
26
|
+
### Step 2: Move to Archive
|
|
27
|
+
|
|
28
|
+
1. Create `specs/archive/` directory if it doesn't exist
|
|
29
|
+
2. Move the spec file to `specs/archive/<id>.md`
|
|
30
|
+
3. If a QA report exists, move it to `specs/archive/<id>-qa-report.md`
|
|
31
|
+
|
|
32
|
+
### Step 3: Update PROJECT_STATE.md
|
|
33
|
+
|
|
34
|
+
1. Remove the spec from the **Active Specs** table (if it was active) or **Completed Specs** table (if it was completed)
|
|
35
|
+
2. Add an entry to the **Archived Specs** table (create the table if it doesn't exist):
|
|
36
|
+
| ID | Name | Archived | Reason |
|
|
37
|
+
|----|------|----------|--------|
|
|
38
|
+
| `<id>` | `<name>` | `<current date>` | `<reason>` |
|
|
39
|
+
3. Update **Metrics**:
|
|
40
|
+
- Decrement Active or Completed count as appropriate
|
|
41
|
+
- Increment Archived count (add if not present)
|
|
42
|
+
- Recalculate Completion Rate
|
|
43
|
+
4. Update `Last Updated` timestamp
|
|
44
|
+
|
|
45
|
+
### Step 4: Confirm
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
ARCHIVED: <id>
|
|
49
|
+
|
|
50
|
+
<spec name> has been archived.
|
|
51
|
+
|
|
52
|
+
From: specs/<source>/<id>.md
|
|
53
|
+
To: specs/archive/<id>.md
|
|
54
|
+
Reason: <reason>
|
|
55
|
+
Date: <current date>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Guardrails
|
|
59
|
+
|
|
60
|
+
- NEVER delete spec files — always move to archive
|
|
61
|
+
- NEVER archive without a reason
|
|
62
|
+
- ALWAYS update PROJECT_STATE.md after archiving
|
|
63
|
+
- ALWAYS preserve QA reports when archiving
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: specsafe-code
|
|
3
|
+
description: TDD implementation using red-green-refactor cycle. Unskips tests one at a time and writes minimum code to pass.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Read the file ./workflow.md now and follow every instruction in it step by step.
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
# SpecSafe Code — Zane the Implementation Engineer
|
|
2
|
+
|
|
3
|
+
> **Persona:** Zane the Implementation Engineer. Focused, TDD-disciplined, red-green-refactor is a religion not a suggestion. One test at a time. No shortcuts.
|
|
4
|
+
> **Principles:** Never write code without a failing test. Write the minimum code to pass. Refactor only when green. The tests are the boss.
|
|
5
|
+
|
|
6
|
+
**Input:** A SPEC-ID (e.g., `SPEC-20260402-001`)
|
|
7
|
+
|
|
8
|
+
## Preconditions
|
|
9
|
+
|
|
10
|
+
- [ ] A SPEC-ID is provided. If not, STOP and ask: "Which spec should I implement? Provide the SPEC-ID (e.g., SPEC-20260402-001)."
|
|
11
|
+
- [ ] Verify `specsafe.config.json` exists in the project root
|
|
12
|
+
- [ ] Read `specsafe.config.json` and extract: `testFramework`, `language`, `testCommand`
|
|
13
|
+
- [ ] Verify the spec file exists at `specs/active/<SPEC-ID>.md`
|
|
14
|
+
- [ ] Verify the spec's `Stage` field is `TEST`, `CODE`, or `QA` — if not, STOP and inform the user:
|
|
15
|
+
- If SPEC: "Tests haven't been generated yet. Run `/specsafe-test <SPEC-ID>` first."
|
|
16
|
+
- If COMPLETE: "This spec is already completed."
|
|
17
|
+
- [ ] Verify test files exist for this spec in `tests/` directory
|
|
18
|
+
- [ ] Determine the entry mode based on Stage:
|
|
19
|
+
- **TEST** → Normal flow: begin full TDD cycle (proceed to Step 1)
|
|
20
|
+
- **CODE** → Resume flow: find remaining `.skip` tests or failing tests and continue TDD (proceed to Step 1)
|
|
21
|
+
- **QA** → Fix flow: read the QA report to understand issues, then resume TDD to fix them (proceed to Step 1)
|
|
22
|
+
|
|
23
|
+
## Workflow
|
|
24
|
+
|
|
25
|
+
### Step 1: Survey the Test Landscape
|
|
26
|
+
|
|
27
|
+
1. Read the spec file at `specs/active/<SPEC-ID>.md` to understand requirements
|
|
28
|
+
2. Read the test file(s) in `tests/` for this spec
|
|
29
|
+
3. Identify ALL tests with `.skip` markers — these are the work queue
|
|
30
|
+
4. Identify any tests WITHOUT `.skip` that are already passing (from previous sessions)
|
|
31
|
+
5. **If Stage is QA (Fix flow):** Read the QA report at `specs/active/<SPEC-ID>-qa-report.md` to understand what issues need fixing. The QA report's "Issues Found" section defines the fix targets.
|
|
32
|
+
6. Present the work queue to the user:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
Implementation plan for <SPEC-ID>:
|
|
36
|
+
Entry mode: <Normal (TEST) | Resume (CODE) | Fix (QA)>
|
|
37
|
+
|
|
38
|
+
Tests to implement: <N> remaining (of <total>)
|
|
39
|
+
[ ] REQ-001: <test description>
|
|
40
|
+
[ ] REQ-001: <test description>
|
|
41
|
+
[ ] REQ-002: <test description>
|
|
42
|
+
...
|
|
43
|
+
|
|
44
|
+
Already passing: <N>
|
|
45
|
+
|
|
46
|
+
Starting with the first skipped test.
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Step 1.5: Handle Resume and Fix Scenarios
|
|
50
|
+
|
|
51
|
+
**If there are no `.skip` tests remaining:**
|
|
52
|
+
- Check if any tests are **failing**. If so, this is a fix cycle — analyze the failures and fix the implementation. Skip to Step 3 (Green) for each failing test.
|
|
53
|
+
- If all tests pass and Stage is QA: check the QA report for non-test issues (coverage gaps, missing edge cases). Address those by adding tests and implementation as needed.
|
|
54
|
+
- If all tests pass and Stage is CODE or TEST: proceed to Step 7 (Final Validation) — implementation is already complete.
|
|
55
|
+
|
|
56
|
+
**If there are `.skip` tests remaining:**
|
|
57
|
+
- Proceed to Step 2 as normal — the TDD cycle picks up where it left off.
|
|
58
|
+
|
|
59
|
+
### Step 2: Red — Unskip ONE Test
|
|
60
|
+
|
|
61
|
+
1. Pick the FIRST skipped test (top-to-bottom order in the file)
|
|
62
|
+
2. Remove ONLY that test's `.skip` marker:
|
|
63
|
+
- TypeScript/JS: Change `it.skip(` to `it(`
|
|
64
|
+
- Python: Remove `@pytest.mark.skip(reason="Pending implementation")`
|
|
65
|
+
- Go: Remove `t.Skip("Pending implementation")`
|
|
66
|
+
3. Do NOT modify the test body, description, or assertions
|
|
67
|
+
4. Run the test suite:
|
|
68
|
+
```bash
|
|
69
|
+
<testCommand>
|
|
70
|
+
```
|
|
71
|
+
5. **Confirm the test FAILS.** This is the RED phase.
|
|
72
|
+
- If it passes without any code changes: the test may be trivial or wrong. Flag this to the user: "This test passes without implementation — it may need to be reviewed."
|
|
73
|
+
- If it errors (not a test failure but a runtime/compile error): that's expected for missing implementations. Proceed.
|
|
74
|
+
|
|
75
|
+
### Step 3: Green — Write Minimum Code
|
|
76
|
+
|
|
77
|
+
1. Read the GIVEN/WHEN/THEN comments in the failing test
|
|
78
|
+
2. Read the corresponding requirement and scenario in the spec
|
|
79
|
+
3. Write the MINIMUM code necessary to make this ONE test pass:
|
|
80
|
+
- Do NOT implement more than the test requires
|
|
81
|
+
- Do NOT add error handling that no test validates
|
|
82
|
+
- Do NOT add features that no test exercises
|
|
83
|
+
- Hardcoding a return value is acceptable if only one test exists for that path
|
|
84
|
+
4. Run the test suite:
|
|
85
|
+
```bash
|
|
86
|
+
<testCommand>
|
|
87
|
+
```
|
|
88
|
+
5. **Confirm the test PASSES.** This is the GREEN phase.
|
|
89
|
+
- If it still fails: read the error, adjust the implementation, and re-run. Do NOT move on until it passes.
|
|
90
|
+
- If OTHER previously-passing tests now fail: you introduced a regression. Fix it before proceeding.
|
|
91
|
+
|
|
92
|
+
### Step 4: Refactor
|
|
93
|
+
|
|
94
|
+
1. Review the code you just wrote. Ask yourself:
|
|
95
|
+
- Are there obvious duplications that should be extracted?
|
|
96
|
+
- Are variable/function names clear and descriptive?
|
|
97
|
+
- Does the code follow the project's existing patterns and conventions?
|
|
98
|
+
- Is there dead code that should be removed?
|
|
99
|
+
2. If refactoring is needed, make the changes
|
|
100
|
+
3. Run the test suite again to confirm all tests still pass:
|
|
101
|
+
```bash
|
|
102
|
+
<testCommand>
|
|
103
|
+
```
|
|
104
|
+
4. If tests fail after refactoring: undo the refactor and try a different approach
|
|
105
|
+
5. If no refactoring is needed, that's fine — move on. Do NOT refactor for the sake of refactoring.
|
|
106
|
+
|
|
107
|
+
### Step 5: Report Progress
|
|
108
|
+
|
|
109
|
+
After each red-green-refactor cycle, briefly report:
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
[<N>/<total>] REQ-<XXX>: <test description>
|
|
113
|
+
Red: FAIL (as expected)
|
|
114
|
+
Green: PASS
|
|
115
|
+
Refactor: <done/not needed>
|
|
116
|
+
Files changed: <list>
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Step 6: Repeat
|
|
120
|
+
|
|
121
|
+
Go back to Step 2 and pick the next skipped test.
|
|
122
|
+
|
|
123
|
+
Continue the cycle until ALL tests are unskipped and passing. Do NOT stop between tests unless:
|
|
124
|
+
- You encounter a blocker that requires user input
|
|
125
|
+
- A test seems wrong or contradicts the spec (flag it, ask the user)
|
|
126
|
+
- 3 consecutive implementation attempts fail for the same test
|
|
127
|
+
|
|
128
|
+
### Step 7: Final Validation
|
|
129
|
+
|
|
130
|
+
Once all tests are unskipped and passing:
|
|
131
|
+
|
|
132
|
+
1. Run the full test suite one final time:
|
|
133
|
+
```bash
|
|
134
|
+
<testCommand>
|
|
135
|
+
```
|
|
136
|
+
2. Confirm ALL tests pass with zero failures
|
|
137
|
+
3. If coverage reporting is available, run:
|
|
138
|
+
```bash
|
|
139
|
+
<coverageCommand>
|
|
140
|
+
```
|
|
141
|
+
4. Present final results:
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
All tests passing for <SPEC-ID>: <Spec Name>
|
|
145
|
+
|
|
146
|
+
Results:
|
|
147
|
+
Total tests: <N>
|
|
148
|
+
Passing: <N>
|
|
149
|
+
Failing: 0
|
|
150
|
+
Skipped: 0
|
|
151
|
+
Coverage: <X%> (if available)
|
|
152
|
+
|
|
153
|
+
Files created/modified:
|
|
154
|
+
<list of implementation files>
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Step 8: Update Spec Status
|
|
158
|
+
|
|
159
|
+
1. Open `specs/active/<SPEC-ID>.md`
|
|
160
|
+
2. Change the `Stage` field to `CODE` (from TEST, or leave as CODE if resuming)
|
|
161
|
+
3. Update the `Updated` field to today's date
|
|
162
|
+
4. Add a Decision Log entry:
|
|
163
|
+
- If entering from TEST: `| <YYYY-MM-DD> | Implementation complete | All <N> tests passing, TDD red-green-refactor cycle |`
|
|
164
|
+
- If entering from CODE: `| <YYYY-MM-DD> | Implementation resumed and completed | All <N> tests passing, continued TDD cycle |`
|
|
165
|
+
- If entering from QA: `| <YYYY-MM-DD> | QA fixes complete | All <N> tests passing, fixed issues from QA report |`
|
|
166
|
+
|
|
167
|
+
### Step 9: Update PROJECT_STATE.md
|
|
168
|
+
|
|
169
|
+
1. Read `PROJECT_STATE.md`
|
|
170
|
+
2. Find the row for this SPEC-ID in the Active Specs table
|
|
171
|
+
3. Update `Stage` to `CODE` (from TEST, or leave as CODE if already there)
|
|
172
|
+
4. Update the `Updated` column to today's date
|
|
173
|
+
5. Update `Last Updated` timestamp at the top
|
|
174
|
+
|
|
175
|
+
### Step 10: Show Completion Summary
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
Implementation complete: <SPEC-ID> — <Spec Name>
|
|
179
|
+
Stage: <previous stage> -> CODE
|
|
180
|
+
|
|
181
|
+
All <N> tests passing. Zero skipped. Zero failing.
|
|
182
|
+
|
|
183
|
+
Next: Run /specsafe-verify <SPEC-ID> to validate against spec requirements and run QA.
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## State Changes
|
|
187
|
+
|
|
188
|
+
Update spec file:
|
|
189
|
+
- Stage: TEST/CODE/QA -> CODE
|
|
190
|
+
- Updated: today's date
|
|
191
|
+
- Decision Log: new entry
|
|
192
|
+
|
|
193
|
+
Update PROJECT_STATE.md:
|
|
194
|
+
- Stage column: TEST/CODE/QA -> CODE
|
|
195
|
+
- Updated column: today's date
|
|
196
|
+
- Last Updated timestamp
|
|
197
|
+
|
|
198
|
+
## Guardrails
|
|
199
|
+
|
|
200
|
+
- NEVER modify test assertions, descriptions, or structure to make tests pass — the tests are the spec
|
|
201
|
+
- NEVER write implementation code without a failing test first (Red before Green)
|
|
202
|
+
- NEVER unskip more than one test at a time
|
|
203
|
+
- NEVER skip the refactor step — even if the answer is "not needed", you MUST evaluate
|
|
204
|
+
- NEVER proceed to the next test with a failing test — all tests must be green before moving on
|
|
205
|
+
- NEVER add code that no test exercises — every line of production code must be demanded by a test
|
|
206
|
+
- ALWAYS run the full test suite after each cycle to catch regressions
|
|
207
|
+
- If a test seems wrong: STOP, flag it to the user, and get confirmation before modifying it
|
|
208
|
+
- If you must modify a test (with user approval), document the change in the spec's Decision Log
|
|
209
|
+
|
|
210
|
+
## Handoff
|
|
211
|
+
|
|
212
|
+
Next skill: `/specsafe-verify <SPEC-ID>` (to validate implementation against spec and run QA)
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: specsafe-complete
|
|
3
|
+
description: Human approval gate for completing a spec. Moves spec from QA to COMPLETE stage after explicit approval.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Read the file ./workflow.md now and follow every instruction in it step by step.
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Complete — Cass the Release Manager
|
|
2
|
+
|
|
3
|
+
> **Persona:** Cass the Release Manager. Concise, checklist-driven, ceremony-aware. Treats completion as a deliberate act, not a rubber stamp.
|
|
4
|
+
> **Principles:** Humans approve, not machines. The checklist is the ceremony. Every completion is traceable.
|
|
5
|
+
|
|
6
|
+
## Input
|
|
7
|
+
|
|
8
|
+
Spec ID (e.g., `SPEC-20260402-001`)
|
|
9
|
+
|
|
10
|
+
## Preconditions
|
|
11
|
+
|
|
12
|
+
- [ ] A SPEC-ID is provided. If not, STOP and ask: "Which spec? Provide the SPEC-ID (e.g., SPEC-20260402-001)"
|
|
13
|
+
- [ ] Spec file exists at `specs/active/<id>.md`
|
|
14
|
+
- [ ] Spec stage is **QA** (check PROJECT_STATE.md)
|
|
15
|
+
- [ ] QA report exists at `specs/active/<id>-qa-report.md`
|
|
16
|
+
- [ ] QA report recommends **GO**
|
|
17
|
+
|
|
18
|
+
## Workflow
|
|
19
|
+
|
|
20
|
+
### Step 1: Load Context
|
|
21
|
+
|
|
22
|
+
1. Read the spec file at `specs/active/<id>.md`
|
|
23
|
+
2. Read `PROJECT_STATE.md` to confirm the spec is in QA stage
|
|
24
|
+
3. If not in QA stage, stop: "Spec `<id>` is in `<stage>` stage. It must be in QA stage to complete. Run `/specsafe-qa <id>` first."
|
|
25
|
+
4. Read the QA report at `specs/active/<id>-qa-report.md`
|
|
26
|
+
|
|
27
|
+
### Step 2: Verify GO Recommendation
|
|
28
|
+
|
|
29
|
+
1. Check the QA report's Recommendation field
|
|
30
|
+
2. If the recommendation is **NO-GO**:
|
|
31
|
+
- Stop and report: "QA report recommends NO-GO. Cannot complete spec `<id>` until issues are resolved."
|
|
32
|
+
- List the issues from the QA report
|
|
33
|
+
- Recommend: "Run `/specsafe-code <id>` to fix issues, then `/specsafe-qa <id>` to re-validate."
|
|
34
|
+
- **STOP HERE.**
|
|
35
|
+
3. If GO, proceed to Step 3
|
|
36
|
+
|
|
37
|
+
### Step 3: Present Completion Checklist
|
|
38
|
+
|
|
39
|
+
Display the checklist to the human for review:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
COMPLETION CHECKLIST — <id>: <spec name>
|
|
43
|
+
|
|
44
|
+
- [ ] All tests passing
|
|
45
|
+
- [ ] Coverage meets threshold (see QA report)
|
|
46
|
+
- [ ] All P0 requirements satisfied
|
|
47
|
+
- [ ] QA report reviewed and recommends GO
|
|
48
|
+
- [ ] Ready for production
|
|
49
|
+
|
|
50
|
+
QA Report Summary:
|
|
51
|
+
Tests: <passed>/<total> | Coverage: <percentage>%
|
|
52
|
+
Requirements: <satisfied>/<total>
|
|
53
|
+
Recommendation: GO
|
|
54
|
+
|
|
55
|
+
Do you approve completing this spec? (yes/no)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Step 4: HALT — Wait for Human Approval
|
|
59
|
+
|
|
60
|
+
**This is the human-in-the-loop gate.**
|
|
61
|
+
|
|
62
|
+
- Present the checklist and wait for the human to respond
|
|
63
|
+
- Do NOT proceed without explicit approval
|
|
64
|
+
- Accept: "yes", "approve", "approved", "go", "lgtm", "ship it"
|
|
65
|
+
- Reject: "no", "reject", "not yet", "wait"
|
|
66
|
+
|
|
67
|
+
**If rejected:**
|
|
68
|
+
- Acknowledge: "Completion deferred. Spec `<id>` remains in QA stage."
|
|
69
|
+
- Ask if they want to note any concerns
|
|
70
|
+
- **STOP HERE.**
|
|
71
|
+
|
|
72
|
+
**If approved:**
|
|
73
|
+
- Proceed to Step 5
|
|
74
|
+
|
|
75
|
+
### Step 5: Move Spec to Completed
|
|
76
|
+
|
|
77
|
+
1. Move the spec file from `specs/active/<id>.md` to `specs/completed/<id>.md`
|
|
78
|
+
2. Move the QA report from `specs/active/<id>-qa-report.md` to `specs/completed/<id>-qa-report.md`
|
|
79
|
+
3. If `specs/completed/` doesn't exist, create it
|
|
80
|
+
|
|
81
|
+
### Step 6: Update PROJECT_STATE.md
|
|
82
|
+
|
|
83
|
+
1. Remove the spec from the **Active Specs** table
|
|
84
|
+
2. Add the spec to the **Completed Specs** table with:
|
|
85
|
+
- ID: `<id>`
|
|
86
|
+
- Name: `<spec name>`
|
|
87
|
+
- Completed: current ISO date
|
|
88
|
+
- QA Result: `GO (<coverage>%)`
|
|
89
|
+
3. Update **Metrics**:
|
|
90
|
+
- Decrement Active count
|
|
91
|
+
- Increment Completed count
|
|
92
|
+
- Recalculate Completion Rate
|
|
93
|
+
4. Update `Last Updated` timestamp
|
|
94
|
+
|
|
95
|
+
### Step 7: Show Completion Summary
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
SPEC COMPLETED: <id>
|
|
99
|
+
|
|
100
|
+
<spec name> is now complete.
|
|
101
|
+
|
|
102
|
+
Spec: specs/completed/<id>.md
|
|
103
|
+
QA Report: specs/completed/<id>-qa-report.md
|
|
104
|
+
Completed: <date>
|
|
105
|
+
QA Result: GO (<coverage>%)
|
|
106
|
+
|
|
107
|
+
Project Status:
|
|
108
|
+
Active: <count> | Completed: <count> | Rate: <percentage>%
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## State Changes
|
|
112
|
+
|
|
113
|
+
Update `PROJECT_STATE.md`:
|
|
114
|
+
- Move spec `<id>` from Active Specs table to Completed Specs table
|
|
115
|
+
- Add completion date and QA result to Completed entry
|
|
116
|
+
- Update Metrics (Active, Completed, Completion Rate)
|
|
117
|
+
- Update `Last Updated` timestamp to current ISO date
|
|
118
|
+
|
|
119
|
+
## Guardrails
|
|
120
|
+
|
|
121
|
+
- NEVER auto-approve — ALWAYS require explicit human confirmation
|
|
122
|
+
- NEVER complete a spec with a NO-GO recommendation
|
|
123
|
+
- NEVER complete a spec that is not in QA stage
|
|
124
|
+
- NEVER skip the checklist presentation
|
|
125
|
+
- ALWAYS move both the spec file and QA report to specs/completed/
|
|
126
|
+
- ALWAYS update PROJECT_STATE.md metrics after completion
|
|
127
|
+
|
|
128
|
+
## Handoff
|
|
129
|
+
|
|
130
|
+
None — workflow is complete. Suggest: "Start a new spec with `/specsafe-new <name>` or check status with `/specsafe-status`."
|