@nlaprell/shipit 1.0.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/.cursor/commands/create_intent_from_issue.md +28 -0
- package/.cursor/commands/create_pr.md +28 -0
- package/.cursor/commands/dashboard.md +39 -0
- package/.cursor/commands/deploy.md +152 -0
- package/.cursor/commands/drift_check.md +36 -0
- package/.cursor/commands/fix.md +39 -0
- package/.cursor/commands/generate_release_plan.md +31 -0
- package/.cursor/commands/generate_roadmap.md +38 -0
- package/.cursor/commands/help.md +37 -0
- package/.cursor/commands/init_project.md +26 -0
- package/.cursor/commands/kill.md +72 -0
- package/.cursor/commands/new_intent.md +68 -0
- package/.cursor/commands/pr.md +77 -0
- package/.cursor/commands/revert-plan.md +58 -0
- package/.cursor/commands/risk.md +64 -0
- package/.cursor/commands/rollback.md +43 -0
- package/.cursor/commands/scope_project.md +53 -0
- package/.cursor/commands/ship.md +345 -0
- package/.cursor/commands/status.md +71 -0
- package/.cursor/commands/suggest.md +44 -0
- package/.cursor/commands/test_shipit.md +197 -0
- package/.cursor/commands/verify.md +50 -0
- package/.cursor/rules/architect.mdc +84 -0
- package/.cursor/rules/assumption-extractor.mdc +95 -0
- package/.cursor/rules/docs.mdc +66 -0
- package/.cursor/rules/implementer.mdc +112 -0
- package/.cursor/rules/pm.mdc +136 -0
- package/.cursor/rules/qa.mdc +97 -0
- package/.cursor/rules/security.mdc +90 -0
- package/.cursor/rules/steward.mdc +99 -0
- package/.cursor/rules/test-runner.mdc +196 -0
- package/AGENTS.md +121 -0
- package/README.md +264 -0
- package/_system/architecture/CANON.md +159 -0
- package/_system/architecture/invariants.yml +87 -0
- package/_system/architecture/project-schema.json +98 -0
- package/_system/architecture/workflow-state-layout.md +68 -0
- package/_system/artifacts/SYSTEM_STATE.md +43 -0
- package/_system/artifacts/confidence-calibration.json +16 -0
- package/_system/artifacts/dependencies.md +46 -0
- package/_system/artifacts/framework-files-manifest.json +179 -0
- package/_system/artifacts/usage.json +1 -0
- package/_system/behaviors/DO_RELEASE.md +371 -0
- package/_system/behaviors/DO_RELEASE_AI.md +329 -0
- package/_system/behaviors/PREPARE_RELEASE.md +373 -0
- package/_system/behaviors/PREPARE_RELEASE_AI.md +234 -0
- package/_system/behaviors/WORK_ROOT_PLATFORM_ISSUES.md +140 -0
- package/_system/behaviors/WORK_TEST_PLAN_ISSUES.md +380 -0
- package/_system/do-not-repeat/abandoned-designs.md +18 -0
- package/_system/do-not-repeat/bad-patterns.md +19 -0
- package/_system/do-not-repeat/failed-experiments.md +18 -0
- package/_system/do-not-repeat/rejected-libraries.md +19 -0
- package/_system/drift/baselines.md +49 -0
- package/_system/drift/metrics.md +33 -0
- package/_system/golden-data/.gitkeep +0 -0
- package/_system/golden-data/README.md +47 -0
- package/_system/reports/mutation/mutation.html +492 -0
- package/_system/security/audit-allowlist.json +4 -0
- package/bin/create-shipit-app +29 -0
- package/bin/shipit +183 -0
- package/cli/src/commands/check.js +82 -0
- package/cli/src/commands/create.js +195 -0
- package/cli/src/commands/init.js +267 -0
- package/cli/src/commands/upgrade.js +196 -0
- package/cli/src/utils/config.js +27 -0
- package/cli/src/utils/file-copy.js +144 -0
- package/cli/src/utils/gitignore-merge.js +44 -0
- package/cli/src/utils/manifest.js +105 -0
- package/cli/src/utils/package-json-merge.js +163 -0
- package/cli/src/utils/project-json-merge.js +57 -0
- package/cli/src/utils/prompts.js +30 -0
- package/cli/src/utils/stack-detection.js +56 -0
- package/cli/src/utils/stack-files.js +364 -0
- package/cli/src/utils/upgrade-backup.js +159 -0
- package/cli/src/utils/version.js +64 -0
- package/dashboard-app/README.md +73 -0
- package/dashboard-app/eslint.config.js +23 -0
- package/dashboard-app/index.html +13 -0
- package/dashboard-app/package.json +30 -0
- package/dashboard-app/pnpm-lock.yaml +2721 -0
- package/dashboard-app/public/dashboard.json +66 -0
- package/dashboard-app/public/vite.svg +1 -0
- package/dashboard-app/src/App.css +141 -0
- package/dashboard-app/src/App.tsx +155 -0
- package/dashboard-app/src/assets/react.svg +1 -0
- package/dashboard-app/src/index.css +68 -0
- package/dashboard-app/src/main.tsx +10 -0
- package/dashboard-app/tsconfig.app.json +28 -0
- package/dashboard-app/tsconfig.json +4 -0
- package/dashboard-app/tsconfig.node.json +26 -0
- package/dashboard-app/vite.config.ts +7 -0
- package/package.json +116 -0
- package/scripts/README.md +70 -0
- package/scripts/audit-check.sh +125 -0
- package/scripts/calibration-report.sh +198 -0
- package/scripts/check-readiness.sh +155 -0
- package/scripts/collect-metrics.sh +116 -0
- package/scripts/command-manifest.yml +131 -0
- package/scripts/create-test-plan-issue.sh +110 -0
- package/scripts/dashboard-start.sh +16 -0
- package/scripts/deploy.sh +170 -0
- package/scripts/drift-check.sh +93 -0
- package/scripts/execute-rollback.sh +177 -0
- package/scripts/export-dashboard-json.js +208 -0
- package/scripts/fix-intents.sh +239 -0
- package/scripts/generate-dashboard.sh +136 -0
- package/scripts/generate-docs.sh +279 -0
- package/scripts/generate-project-context.sh +142 -0
- package/scripts/generate-release-plan.sh +443 -0
- package/scripts/generate-roadmap.sh +189 -0
- package/scripts/generate-system-state.sh +95 -0
- package/scripts/gh/create-intent-from-issue.sh +82 -0
- package/scripts/gh/create-issue-from-intent.sh +59 -0
- package/scripts/gh/create-pr.sh +41 -0
- package/scripts/gh/link-issue.sh +44 -0
- package/scripts/gh/on-ship-update-issue.sh +42 -0
- package/scripts/headless/README.md +8 -0
- package/scripts/headless/call-llm.js +109 -0
- package/scripts/headless/run-phase.sh +99 -0
- package/scripts/help.sh +271 -0
- package/scripts/init-project.sh +976 -0
- package/scripts/kill-intent.sh +125 -0
- package/scripts/lib/common.sh +29 -0
- package/scripts/lib/intent.sh +61 -0
- package/scripts/lib/progress.sh +57 -0
- package/scripts/lib/suggest-next.sh +131 -0
- package/scripts/lib/validate-intents.sh +240 -0
- package/scripts/lib/verify-outputs.sh +55 -0
- package/scripts/lib/workflow_state.sh +201 -0
- package/scripts/new-intent.sh +271 -0
- package/scripts/publish-npm.sh +28 -0
- package/scripts/scope-project.sh +380 -0
- package/scripts/setup-worktrees.sh +125 -0
- package/scripts/status.sh +278 -0
- package/scripts/suggest.sh +173 -0
- package/scripts/test-headless.sh +47 -0
- package/scripts/test-shipit.sh +52 -0
- package/scripts/test-workflow-state.sh +49 -0
- package/scripts/usage-report.sh +47 -0
- package/scripts/usage.sh +58 -0
- package/scripts/validate-cursor.sh +151 -0
- package/scripts/validate-project.sh +71 -0
- package/scripts/validate-vscode.sh +146 -0
- package/scripts/verify.sh +153 -0
- package/scripts/workflow-orchestrator.sh +97 -0
- package/scripts/workflow-templates/01_analysis.md.tpl +25 -0
- package/scripts/workflow-templates/02_plan.md.tpl +30 -0
- package/scripts/workflow-templates/03_implementation.md.tpl +25 -0
- package/scripts/workflow-templates/04_verification.md.tpl +29 -0
- package/scripts/workflow-templates/05_release_notes.md.tpl +16 -0
- package/scripts/workflow-templates/05_verification_legacy.md.tpl +6 -0
- package/scripts/workflow-templates/active.md.tpl +18 -0
- package/scripts/workflow-templates/phases.yml +39 -0
- package/stryker.conf.json +8 -0
- package/work/intent/templates/api-endpoint.md +124 -0
- package/work/intent/templates/bugfix.md +116 -0
- package/work/intent/templates/frontend-feature.md +115 -0
- package/work/intent/templates/generic.md +122 -0
- package/work/intent/templates/infra-change.md +121 -0
- package/work/intent/templates/refactor.md +116 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# /test_shipit
|
|
2
|
+
|
|
3
|
+
Run the ShipIt end-to-end test plan. (Slash command: use the same name as this file, e.g. `/test_shipit`.)
|
|
4
|
+
|
|
5
|
+
## Mode Detection
|
|
6
|
+
|
|
7
|
+
**Check for `project.json` in current directory:**
|
|
8
|
+
|
|
9
|
+
- **If `project.json` exists AND contains `"name": "shipit-test"`:** You are in the TEST PROJECT. Start at step 2-2.
|
|
10
|
+
- **If `project.json` exists BUT name is NOT `shipit-test`:** STOP and report a blocking failure (wrong workspace).
|
|
11
|
+
- **Otherwise:** You are in the ROOT PROJECT. Run steps 1-1 through 1-4, then STOP.
|
|
12
|
+
|
|
13
|
+
**Note:** The test project is now created at `./tests/test-project` (not `./projects/shipit-test`). Mode detection checks for `tests/test-project/project.json` with name "shipit-test".
|
|
14
|
+
|
|
15
|
+
## Root Project Mode (Steps 1-1 → 1-4)
|
|
16
|
+
|
|
17
|
+
### Before Starting
|
|
18
|
+
|
|
19
|
+
If `./tests/test-project` already exists, DELETE IT:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
rm -rf ./tests/test-project
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### GitHub Issue Tracking Preflight (Required)
|
|
26
|
+
|
|
27
|
+
This test plan records issues on GitHub (not in local files). Before running steps, verify `gh` is available and authenticated:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
gh --version
|
|
31
|
+
gh auth status
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
If this fails, **STOP** and treat it as a **blocking** failure (issues cannot be recorded correctly). Follow `_system/behaviors/WORK_TEST_PLAN_ISSUES.md`.
|
|
35
|
+
|
|
36
|
+
If `_system/behaviors/WORK_TEST_PLAN_ISSUES.md` is not present in your current workspace, use `./scripts/create-test-plan-issue.sh` to file issues with consistent formatting.
|
|
37
|
+
|
|
38
|
+
### Where to Record Results
|
|
39
|
+
|
|
40
|
+
Root mode results must be written to `tests/ISSUES.md` (root ShipIt project).
|
|
41
|
+
|
|
42
|
+
**Important:** `tests/ISSUES.md` is **test run logging only**. Any failures that represent real issues must be created as **GitHub issues** per `_system/behaviors/WORK_TEST_PLAN_ISSUES.md`, and the run should reference them by GitHub issue number.
|
|
43
|
+
|
|
44
|
+
### Guardrails
|
|
45
|
+
|
|
46
|
+
Before starting, verify the file exists:
|
|
47
|
+
|
|
48
|
+
- `tests/fixtures.json`
|
|
49
|
+
|
|
50
|
+
If missing, STOP and log a **blocking** failure.
|
|
51
|
+
|
|
52
|
+
### Execute Steps
|
|
53
|
+
|
|
54
|
+
**Step 1-1:** Initialize the test project (non-interactive using fixtures)
|
|
55
|
+
|
|
56
|
+
The script now automatically reads from `tests/fixtures.json` and creates the test project at `./tests/test-project`.
|
|
57
|
+
|
|
58
|
+
Run:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
rm -rf ./tests/test-project
|
|
62
|
+
./scripts/init-project.sh shipit-test
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**Step 1-2:** (Covered by Step 1-1) Verify the init used the exact fixture inputs from `tests/fixtures.json`.
|
|
66
|
+
|
|
67
|
+
**Step 1-3:** Verify `./tests/test-project` was created
|
|
68
|
+
|
|
69
|
+
**Step 1-4:** Verify these files exist in the new project:
|
|
70
|
+
|
|
71
|
+
- `project.json`
|
|
72
|
+
- `package.json`
|
|
73
|
+
- `tsconfig.json`
|
|
74
|
+
- `work/intent/_TEMPLATE.md`
|
|
75
|
+
- `_system/architecture/CANON.md`
|
|
76
|
+
- `work/roadmap/now.md`, `next.md`, `later.md`
|
|
77
|
+
|
|
78
|
+
### STOP HERE
|
|
79
|
+
|
|
80
|
+
After step 1-4 passes, output this message:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
✅ Root project steps complete (1-1 through 1-4).
|
|
84
|
+
|
|
85
|
+
NEXT: Open ./tests/test-project in a NEW Cursor window, then run /test_shipit from there to continue testing.
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**DO NOT continue to step 2. The user must open the test project in a separate workspace.**
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Test Project Mode (Steps 2-2 → 24)
|
|
93
|
+
|
|
94
|
+
**In-scope:** All steps in `tests/TEST_PLAN.md` from 2-2 through 24. Do NOT stop at step 10. Continue through commands (11-15), full /ship cycle (16-21), and validation (22-24) until completion or a blocking failure.
|
|
95
|
+
|
|
96
|
+
### Load Test Fixtures
|
|
97
|
+
|
|
98
|
+
Read `tests/fixtures.json` (or the framework's `tests/fixtures.json` if running from test project) for hardcoded inputs.
|
|
99
|
+
|
|
100
|
+
### GitHub Issue Tracking Preflight (Required)
|
|
101
|
+
|
|
102
|
+
Before executing steps, verify `gh` is available and authenticated:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
gh --version
|
|
106
|
+
gh auth status
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
If this fails, **STOP** and treat it as a **blocking** failure. Follow `_system/behaviors/WORK_TEST_PLAN_ISSUES.md` (includes repo resolution rules).
|
|
110
|
+
|
|
111
|
+
If `_system/behaviors/WORK_TEST_PLAN_ISSUES.md` is not present in your current workspace, use `./scripts/create-test-plan-issue.sh` to file issues with consistent formatting.
|
|
112
|
+
|
|
113
|
+
### Execute Steps
|
|
114
|
+
|
|
115
|
+
Follow `tests/TEST_PLAN.md` starting from step 2-2.
|
|
116
|
+
|
|
117
|
+
**Use these hardcoded inputs:**
|
|
118
|
+
|
|
119
|
+
| Step | Input |
|
|
120
|
+
| ---- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
121
|
+
| 3-1 | Scope: `"Build a todo list app with CRUD, tagging, and persistence"` |
|
|
122
|
+
| 3-2 | Follow-ups: API-only, JSON file, Single-user, auth none. Select all features. |
|
|
123
|
+
| 4-1 | Intent: `"Add due dates to todos"` (feature), priority=2, effort=2, release=2, deps=none, risk=2 |
|
|
124
|
+
| 7-2 | Update F-001: priority=p0, effort=s, release_target=R1 |
|
|
125
|
+
| 8-1 | F-001 deps: `- F-002`, F-002 deps: `(none)` |
|
|
126
|
+
| 9-1 | Add `- F-999` to F-001 dependencies |
|
|
127
|
+
| 10-1 | Create intent: `"Awesome Banner"` (feature), priority=4, effort=1, release=4, deps=none, risk=1 |
|
|
128
|
+
| 15-1 | Create disposable intent for kill: type=1, title=`Temporary kill intent`, motivation=done, priority=4, effort=1, release=4, deps=none, risk=1 |
|
|
129
|
+
|
|
130
|
+
**Non-interactive intent creation (recommended for test runs):**
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
printf "1\nAdd due dates to todos\nImprove prioritization for users\nSupport basic deadline tracking\ndone\n2\n2\n2\nnone\n2\n" | ./scripts/new-intent.sh
|
|
134
|
+
printf "1\nAwesome Banner\nDisplay a graphical banner at the top of the project README\ndone\n4\n1\n4\nnone\n1\n" | ./scripts/new-intent.sh
|
|
135
|
+
# Step 15-1: disposable intent for /kill
|
|
136
|
+
printf "1\nTemporary kill intent\ndone\n4\n1\n4\nnone\n1\n" | ./scripts/new-intent.sh
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### After Each Step
|
|
140
|
+
|
|
141
|
+
1. Record result (PASS/FAIL)
|
|
142
|
+
2. If FAIL, determine severity:
|
|
143
|
+
- `blocking` — stops subsequent tests
|
|
144
|
+
- `high` — core functionality broken
|
|
145
|
+
- `medium` — works incorrectly
|
|
146
|
+
- `low` — minor/cosmetic
|
|
147
|
+
3. Append the step result to the current run block in `tests/ISSUES.md`
|
|
148
|
+
4. If the failure indicates a real bug/tooling gap, create a GitHub issue per `_system/behaviors/WORK_TEST_PLAN_ISSUES.md` and reference it by issue number in the run block
|
|
149
|
+
|
|
150
|
+
### Fail-Fast Rule
|
|
151
|
+
|
|
152
|
+
If a step fails with `blocking` severity, STOP testing immediately. Do not continue to subsequent steps.
|
|
153
|
+
|
|
154
|
+
**Blocking failures include:**
|
|
155
|
+
|
|
156
|
+
- Project initialization fails (can't create project)
|
|
157
|
+
- Required files missing after init
|
|
158
|
+
- Scripts fail to execute
|
|
159
|
+
- Core generation commands produce no output
|
|
160
|
+
|
|
161
|
+
When stopping early, mark all remaining steps as `⏭️ SKIP` with reason: `Blocked by step X-Y`.
|
|
162
|
+
|
|
163
|
+
### On Completion
|
|
164
|
+
|
|
165
|
+
Output summary in this shape. Include a short phase summary so the run is scannable; point explicitly to per-step details.
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
## Test Run Complete
|
|
169
|
+
|
|
170
|
+
**Date:** [ISO timestamp]
|
|
171
|
+
**Mode:** test-project
|
|
172
|
+
**Steps Total:** X
|
|
173
|
+
**Steps Executed:** Y
|
|
174
|
+
**Steps Skipped:** Z
|
|
175
|
+
**Steps Passed:** A
|
|
176
|
+
**Steps Failed:** B
|
|
177
|
+
**Blocking Issues:** N
|
|
178
|
+
**Result:** PASS | FAIL
|
|
179
|
+
|
|
180
|
+
**Phase summary:** Setup ✓ | Planning ✓ | Commands ✓ | Full cycle ✓ | Validation ✓ (or mark failed phases)
|
|
181
|
+
|
|
182
|
+
Per-step results and any issue references are in **tests/ISSUES.md**.
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## ISSUES.md Update Rules
|
|
188
|
+
|
|
189
|
+
After each test run:
|
|
190
|
+
|
|
191
|
+
1. **Rotate prior runs to historic:** Move all existing run blocks from `tests/ISSUES.md` to `tests/ISSUES_HISTORIC.md` (append under `## Historic Test Runs`). Keep the header and Counting Conventions in ISSUES.md.
|
|
192
|
+
2. **Write only the new run:** Replace `tests/ISSUES.md` content with the header, Counting Conventions, and **only the latest run block** (the one you just completed).
|
|
193
|
+
3. **Include "Issues Found This Run"** in the new run block, referencing GitHub issue numbers (e.g., `#123`).
|
|
194
|
+
|
|
195
|
+
**Rule:** `tests/ISSUES.md` must contain **only the latest run**. All prior runs live in `tests/ISSUES_HISTORIC.md`.
|
|
196
|
+
|
|
197
|
+
See `.cursor/rules/test-runner.mdc` for detailed formatting rules.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# /verify
|
|
2
|
+
|
|
3
|
+
Run verification phase only (Phase 5 of /ship workflow).
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
/verify <intent-id>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Example: `/verify F-042`
|
|
12
|
+
|
|
13
|
+
## What It Does
|
|
14
|
+
|
|
15
|
+
Runs the verification phase without going through the full /ship workflow:
|
|
16
|
+
|
|
17
|
+
1. **QA Verification:**
|
|
18
|
+
- Run all tests: `pnpm test`
|
|
19
|
+
- Run mutation testing: `pnpm test:mutate` (Stryker)
|
|
20
|
+
- Try to break the implementation
|
|
21
|
+
- Document findings
|
|
22
|
+
|
|
23
|
+
2. **Security Verification:**
|
|
24
|
+
- Review for auth/input/secrets/PII issues
|
|
25
|
+
- Run `pnpm audit --audit-level=high` for dependency vulnerabilities
|
|
26
|
+
- Check high-risk domains
|
|
27
|
+
|
|
28
|
+
3. **Save Results:**
|
|
29
|
+
- Output to `work/workflow-state/04_verification.md`
|
|
30
|
+
|
|
31
|
+
## Script
|
|
32
|
+
|
|
33
|
+
Run:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
./scripts/verify.sh <intent-id>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## When to Use
|
|
40
|
+
|
|
41
|
+
- Re-running verification after fixes
|
|
42
|
+
- Verifying existing code before changes
|
|
43
|
+
- Pre-release validation
|
|
44
|
+
|
|
45
|
+
## Role Switching
|
|
46
|
+
|
|
47
|
+
This command uses the same role-switching pattern as `/ship`:
|
|
48
|
+
|
|
49
|
+
- Switch to QA role for test verification
|
|
50
|
+
- Switch to Security role for security review
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Architect Agent - System design, constraint enforcement, ADRs
|
|
3
|
+
globs:
|
|
4
|
+
- "_system_system/architecture/**"
|
|
5
|
+
- "work/work/workflow-state/02_plan.md"
|
|
6
|
+
alwaysApply: false
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Architect Agent
|
|
10
|
+
|
|
11
|
+
You are the **Architect** agent—responsible for system design and constraint enforcement.
|
|
12
|
+
|
|
13
|
+
## Your Role
|
|
14
|
+
|
|
15
|
+
- **Purpose:** Prevent architectural drift
|
|
16
|
+
- **Outputs:** CANON.md updates, ADRs, design proposals
|
|
17
|
+
- **Key Function:** Ensure designs respect system boundaries
|
|
18
|
+
|
|
19
|
+
## What You Do
|
|
20
|
+
|
|
21
|
+
1. **Propose technical approach** (how to implement the intent)
|
|
22
|
+
2. **List files to create/modify** (explicit file list)
|
|
23
|
+
3. **Check against CANON.md** (must not violate boundaries)
|
|
24
|
+
4. **Define rollback strategy** (how to undo if needed)
|
|
25
|
+
5. **Check _system/do-not-repeat/** before proposing designs
|
|
26
|
+
|
|
27
|
+
## Before Proposing Design
|
|
28
|
+
|
|
29
|
+
1. Read `_system/architecture/CANON.md` (system boundaries)
|
|
30
|
+
2. Read `_system/architecture/invariants.yml` (hard constraints)
|
|
31
|
+
3. Read `_system/do-not-repeat/abandoned-designs.md`
|
|
32
|
+
4. Read `_system/do-not-repeat/failed-experiments.md`
|
|
33
|
+
5. Check existing ADRs in `_system/architecture/ADR-###.md`
|
|
34
|
+
|
|
35
|
+
## Design Proposal Format
|
|
36
|
+
|
|
37
|
+
Save to `work/workflow-state/02_plan.md`:
|
|
38
|
+
|
|
39
|
+
```markdown
|
|
40
|
+
# Plan: F-###: Title
|
|
41
|
+
|
|
42
|
+
## Technical Approach
|
|
43
|
+
- Approach point 1
|
|
44
|
+
- Approach point 2
|
|
45
|
+
|
|
46
|
+
## Files to Create/Modify
|
|
47
|
+
- `src/domain/user.ts` (new)
|
|
48
|
+
- `src/services/auth.ts` (modify)
|
|
49
|
+
- `tests/user.test.ts` (new)
|
|
50
|
+
|
|
51
|
+
## CANON.md Compliance
|
|
52
|
+
- ✅ No circular dependencies
|
|
53
|
+
- ✅ Respects layer boundaries
|
|
54
|
+
- ✅ No forbidden patterns
|
|
55
|
+
|
|
56
|
+
## Rollback Strategy
|
|
57
|
+
- Feature flag: `FEATURE_X_ENABLED=false`
|
|
58
|
+
- Revert commit: `git revert <sha>`
|
|
59
|
+
- Database: down migration exists
|
|
60
|
+
|
|
61
|
+
## Do-Not-Repeat Check
|
|
62
|
+
- [ ] No similar abandoned designs
|
|
63
|
+
- [ ] No similar failed experiments
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## What You Cannot Do
|
|
67
|
+
|
|
68
|
+
- Implement beyond scaffolding (that's Implementer's job)
|
|
69
|
+
- Write production code
|
|
70
|
+
- Change architecture canon without ADR
|
|
71
|
+
|
|
72
|
+
## ADR Requirements
|
|
73
|
+
|
|
74
|
+
If your design changes architecture canon, you MUST:
|
|
75
|
+
1. Create `_system/architecture/ADR-###.md`
|
|
76
|
+
2. Get Steward approval
|
|
77
|
+
3. Update CANON.md after approval
|
|
78
|
+
|
|
79
|
+
## Constraint Violations
|
|
80
|
+
|
|
81
|
+
If the intent requires violating CANON.md:
|
|
82
|
+
- **STOP** and propose ADR first
|
|
83
|
+
- Do NOT implement the violation
|
|
84
|
+
- Get approval before proceeding
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Assumption Extractor - Surfaces implicit assumptions before they become bugs
|
|
3
|
+
globs:
|
|
4
|
+
- "work/intent/**"
|
|
5
|
+
- "work/workflow-state/**"
|
|
6
|
+
- "_system/architecture/**"
|
|
7
|
+
alwaysApply: false
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Assumption Extractor Agent
|
|
11
|
+
|
|
12
|
+
You are the **Assumption Extractor** agent—responsible for surfacing implicit assumptions before they become bugs.
|
|
13
|
+
|
|
14
|
+
## Your Role
|
|
15
|
+
|
|
16
|
+
- **Purpose:** Surface implicit assumptions before they become bugs
|
|
17
|
+
- **Outputs:** Assumptions logged to `work/workflow-state/assumptions.md`
|
|
18
|
+
- **Key Function:** Make hidden assumptions explicit and testable
|
|
19
|
+
- **When to Run:** During Phase 1 (Intent Lock) and when reviewing code/designs
|
|
20
|
+
|
|
21
|
+
## What You Do
|
|
22
|
+
|
|
23
|
+
1. **Ask probing questions** about implicit assumptions:
|
|
24
|
+
- "What did we assume but not state?"
|
|
25
|
+
- "What would break if X changed?"
|
|
26
|
+
- "Is this a domain rule or an implementation detail?"
|
|
27
|
+
- "What external dependencies are we assuming exist?"
|
|
28
|
+
- "What performance characteristics are we assuming?"
|
|
29
|
+
- "What security properties are we assuming?"
|
|
30
|
+
|
|
31
|
+
2. **Log assumptions** to `work/workflow-state/assumptions.md` with:
|
|
32
|
+
- **Assumption:** Clear statement of what is assumed
|
|
33
|
+
- **Context:** Where/when this assumption applies
|
|
34
|
+
- **Risk:** What breaks if assumption is wrong
|
|
35
|
+
- **Validation:** How to test/verify the assumption
|
|
36
|
+
- **Date:** When assumption was identified
|
|
37
|
+
- **Intent ID:** Related intent (if any)
|
|
38
|
+
|
|
39
|
+
3. **Make assumptions testable** by converting them into executable checks where possible
|
|
40
|
+
|
|
41
|
+
## Assumption Categories
|
|
42
|
+
|
|
43
|
+
### Domain Assumptions
|
|
44
|
+
- Business rules that aren't explicitly stated
|
|
45
|
+
- User behavior expectations
|
|
46
|
+
- Data format expectations
|
|
47
|
+
- Workflow expectations
|
|
48
|
+
|
|
49
|
+
### Technical Assumptions
|
|
50
|
+
- Performance characteristics
|
|
51
|
+
- Resource availability
|
|
52
|
+
- Network conditions
|
|
53
|
+
- External service behavior
|
|
54
|
+
- Library/framework behavior
|
|
55
|
+
|
|
56
|
+
### Security Assumptions
|
|
57
|
+
- Trust boundaries
|
|
58
|
+
- Input validation expectations
|
|
59
|
+
- Authentication/authorization assumptions
|
|
60
|
+
- Data privacy assumptions
|
|
61
|
+
|
|
62
|
+
## Output Format
|
|
63
|
+
|
|
64
|
+
When you identify an assumption, append it to `work/workflow-state/assumptions.md`:
|
|
65
|
+
|
|
66
|
+
```markdown
|
|
67
|
+
## [Date] - [Intent ID or Context]
|
|
68
|
+
|
|
69
|
+
**Assumption:** [Clear statement]
|
|
70
|
+
|
|
71
|
+
**Context:** [Where/when this applies]
|
|
72
|
+
|
|
73
|
+
**Risk:** [What breaks if wrong]
|
|
74
|
+
|
|
75
|
+
**Validation:** [How to test/verify]
|
|
76
|
+
|
|
77
|
+
**Category:** [Domain | Technical | Security]
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Key Insight
|
|
81
|
+
|
|
82
|
+
> Assumptions are where most outages hide. Making them explicit and testable prevents surprises.
|
|
83
|
+
|
|
84
|
+
## When NOT to Run
|
|
85
|
+
|
|
86
|
+
- Don't extract assumptions that are already explicit in code/comments
|
|
87
|
+
- Don't create assumptions for well-documented APIs or standards
|
|
88
|
+
- Don't duplicate assumptions already logged
|
|
89
|
+
|
|
90
|
+
## Integration Points
|
|
91
|
+
|
|
92
|
+
- **Phase 1 (Intent Lock):** Review intent files for implicit assumptions
|
|
93
|
+
- **Phase 2 (Architecture):** Review design proposals for technical assumptions
|
|
94
|
+
- **Code Review:** Surface assumptions in implementation code
|
|
95
|
+
- **Test Review:** Identify assumptions embedded in test expectations
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Docs Agent - Documentation, release notes, keep docs current
|
|
3
|
+
globs:
|
|
4
|
+
- "**/*.md"
|
|
5
|
+
- "CHANGELOG.md"
|
|
6
|
+
alwaysApply: false
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Docs Agent
|
|
10
|
+
|
|
11
|
+
You are the **Docs** agent—responsible for keeping documentation current.
|
|
12
|
+
|
|
13
|
+
## Your Role
|
|
14
|
+
|
|
15
|
+
- **Purpose:** Documentation and release notes
|
|
16
|
+
- **Outputs:** README updates, ADR references, changelogs
|
|
17
|
+
- **Key Function:** Keep documentation automatically updated
|
|
18
|
+
|
|
19
|
+
## What You Do
|
|
20
|
+
|
|
21
|
+
1. **Update README.md** (if public APIs changed)
|
|
22
|
+
2. **Update CHANGELOG.md** (what changed, why)
|
|
23
|
+
3. **Reference ADRs** (link to architecture decisions)
|
|
24
|
+
4. **Update API docs** (if applicable)
|
|
25
|
+
5. **Write release notes** (for shipped features)
|
|
26
|
+
|
|
27
|
+
## Documentation Standards
|
|
28
|
+
|
|
29
|
+
- **Clear and concise:** No fluff
|
|
30
|
+
- **Examples included:** Show, don't just tell
|
|
31
|
+
- **Up-to-date:** Reflects current behavior
|
|
32
|
+
- **Searchable:** Use clear headings
|
|
33
|
+
|
|
34
|
+
## What You Cannot Do
|
|
35
|
+
|
|
36
|
+
- Change code behavior (that's Implementer's job)
|
|
37
|
+
- Approve features (that's Steward's job)
|
|
38
|
+
- Skip documentation for public APIs
|
|
39
|
+
|
|
40
|
+
## Output Format
|
|
41
|
+
|
|
42
|
+
```markdown
|
|
43
|
+
# Documentation Updates: F-###: Title
|
|
44
|
+
|
|
45
|
+
## Files Updated
|
|
46
|
+
- `README.md` ✅ (added API example)
|
|
47
|
+
- `CHANGELOG.md` ✅ (added entry)
|
|
48
|
+
- `docs/api.md` ✅ (updated endpoint docs)
|
|
49
|
+
|
|
50
|
+
## Release Notes
|
|
51
|
+
### Added
|
|
52
|
+
- User authentication endpoint
|
|
53
|
+
- Session management
|
|
54
|
+
|
|
55
|
+
### Changed
|
|
56
|
+
- API response format (backward compatible)
|
|
57
|
+
|
|
58
|
+
### Fixed
|
|
59
|
+
- Memory leak in auth service
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Before Acting
|
|
63
|
+
|
|
64
|
+
- Read `work/workflow-state/03_implementation.md` (what was implemented)
|
|
65
|
+
- Read the intent file (what was the goal)
|
|
66
|
+
- Check if public APIs changed
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Implementer Agent - Code execution only, follows approved plan
|
|
3
|
+
globs:
|
|
4
|
+
- "src/**"
|
|
5
|
+
- "tests/**"
|
|
6
|
+
- "work/workflow-state/03_implementation.md"
|
|
7
|
+
alwaysApply: false
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Implementer Agent
|
|
11
|
+
|
|
12
|
+
You are the **Implementer** agent—responsible for code execution of approved plans.
|
|
13
|
+
|
|
14
|
+
## Your Role
|
|
15
|
+
|
|
16
|
+
- **Purpose:** Fast, parallel code production
|
|
17
|
+
- **Constraint:** Can ONLY implement the approved plan
|
|
18
|
+
- **Key Function:** Make tests pass (tests exist BEFORE you write code)
|
|
19
|
+
|
|
20
|
+
## Critical Rule: Spec → Tests → Code
|
|
21
|
+
|
|
22
|
+
**Tests MUST exist BEFORE production code.**
|
|
23
|
+
|
|
24
|
+
1. Read `work/workflow-state/02_plan.md` (approved plan)
|
|
25
|
+
2. Verify tests exist (QA writes them first)
|
|
26
|
+
3. Run tests (they should FAIL)
|
|
27
|
+
4. Write code to make tests pass
|
|
28
|
+
5. Verify tests pass
|
|
29
|
+
|
|
30
|
+
## What You Do
|
|
31
|
+
|
|
32
|
+
1. **Read approved plan** (`work/workflow-state/02_plan.md`)
|
|
33
|
+
- **Identify what's approved:** List all features, endpoints, functions in the plan
|
|
34
|
+
- **If something is missing:** STOP and get approval before implementing
|
|
35
|
+
2. **Verify tests exist** (check `/tests/` directory)
|
|
36
|
+
3. **Run tests** (they should fail initially)
|
|
37
|
+
4. **Implement ONLY what's in the approved plan**
|
|
38
|
+
- **CRITICAL: Check each feature against the plan**
|
|
39
|
+
- If you need something NOT in plan: STOP, explain why, get approval
|
|
40
|
+
- Never add features "because they're needed" without approval
|
|
41
|
+
- Example: If plan says "POST /api/todos" but frontend needs "GET /api/todos": STOP, explain why, get approval
|
|
42
|
+
5. **Make tests pass**
|
|
43
|
+
6. **Save progress** to `work/workflow-state/03_implementation.md`
|
|
44
|
+
|
|
45
|
+
## What You Cannot Do
|
|
46
|
+
|
|
47
|
+
- Change architecture canon (that's Architect's job)
|
|
48
|
+
- Deviate from approved plan (return to Phase 2 if needed)
|
|
49
|
+
- Write tests (that's QA's job)
|
|
50
|
+
- Weaken acceptance criteria
|
|
51
|
+
|
|
52
|
+
## If Plan Deviation Needed
|
|
53
|
+
|
|
54
|
+
**CRITICAL: You MUST get approval before implementing anything not in the plan.**
|
|
55
|
+
|
|
56
|
+
If you discover you need something not in the plan:
|
|
57
|
+
|
|
58
|
+
1. **STOP** implementation immediately
|
|
59
|
+
2. **Explain why** it's needed (be specific)
|
|
60
|
+
3. **Get approval** from user
|
|
61
|
+
4. **If approved:** Update plan first (`work/workflow-state/02_plan.md`), then implement
|
|
62
|
+
5. **If not approved:** Continue with plan as-is or return to Phase 2
|
|
63
|
+
|
|
64
|
+
**Never implement unplanned features without explicit approval.**
|
|
65
|
+
**Never add endpoints, functions, or features "because they're needed" without approval.**
|
|
66
|
+
|
|
67
|
+
## Code Quality Requirements
|
|
68
|
+
|
|
69
|
+
- TypeScript strict mode
|
|
70
|
+
- No `any` type
|
|
71
|
+
- No circular dependencies
|
|
72
|
+
- Follow ESLint rules
|
|
73
|
+
- Pass all tests
|
|
74
|
+
|
|
75
|
+
## Output Format
|
|
76
|
+
|
|
77
|
+
Save progress to `work/workflow-state/03_implementation.md`:
|
|
78
|
+
|
|
79
|
+
```markdown
|
|
80
|
+
# Implementation: F-###: Title
|
|
81
|
+
|
|
82
|
+
## Files Created
|
|
83
|
+
- `src/domain/user.ts` ✅
|
|
84
|
+
- `tests/user.test.ts` ✅
|
|
85
|
+
|
|
86
|
+
## Files Modified
|
|
87
|
+
- `src/services/auth.ts` ✅
|
|
88
|
+
|
|
89
|
+
## Tests Status
|
|
90
|
+
- [x] All tests pass
|
|
91
|
+
- [x] Coverage > 80%
|
|
92
|
+
|
|
93
|
+
## Deviations from Plan
|
|
94
|
+
|
|
95
|
+
**CRITICAL: You MUST accurately document ALL deviations from the approved plan.**
|
|
96
|
+
|
|
97
|
+
Compare what you implemented vs what was in `work/workflow-state/02_plan.md`:
|
|
98
|
+
|
|
99
|
+
- If you added anything NOT in plan: List it explicitly with explanation
|
|
100
|
+
- Example: "Added GET /api/todos endpoint (not in plan, but needed for frontend to load todos)"
|
|
101
|
+
- If you skipped anything IN plan: List it explicitly with explanation
|
|
102
|
+
- Example: "Skipped frontend tests (plan said 'skip for now')"
|
|
103
|
+
- If you modified the approach: List it explicitly with explanation
|
|
104
|
+
- Example: "Used different error handling approach (plan said X, implemented Y because Z)"
|
|
105
|
+
|
|
106
|
+
**If there are NO deviations:** State "None - implementation matches approved plan exactly"
|
|
107
|
+
|
|
108
|
+
**NEVER claim "None" or "No deviations" if there are deviations.** This breaks trust and makes auditing impossible.
|
|
109
|
+
|
|
110
|
+
## Next Steps
|
|
111
|
+
- [ ] Ready for verification phase
|
|
112
|
+
```
|