@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.
Files changed (160) hide show
  1. package/.cursor/commands/create_intent_from_issue.md +28 -0
  2. package/.cursor/commands/create_pr.md +28 -0
  3. package/.cursor/commands/dashboard.md +39 -0
  4. package/.cursor/commands/deploy.md +152 -0
  5. package/.cursor/commands/drift_check.md +36 -0
  6. package/.cursor/commands/fix.md +39 -0
  7. package/.cursor/commands/generate_release_plan.md +31 -0
  8. package/.cursor/commands/generate_roadmap.md +38 -0
  9. package/.cursor/commands/help.md +37 -0
  10. package/.cursor/commands/init_project.md +26 -0
  11. package/.cursor/commands/kill.md +72 -0
  12. package/.cursor/commands/new_intent.md +68 -0
  13. package/.cursor/commands/pr.md +77 -0
  14. package/.cursor/commands/revert-plan.md +58 -0
  15. package/.cursor/commands/risk.md +64 -0
  16. package/.cursor/commands/rollback.md +43 -0
  17. package/.cursor/commands/scope_project.md +53 -0
  18. package/.cursor/commands/ship.md +345 -0
  19. package/.cursor/commands/status.md +71 -0
  20. package/.cursor/commands/suggest.md +44 -0
  21. package/.cursor/commands/test_shipit.md +197 -0
  22. package/.cursor/commands/verify.md +50 -0
  23. package/.cursor/rules/architect.mdc +84 -0
  24. package/.cursor/rules/assumption-extractor.mdc +95 -0
  25. package/.cursor/rules/docs.mdc +66 -0
  26. package/.cursor/rules/implementer.mdc +112 -0
  27. package/.cursor/rules/pm.mdc +136 -0
  28. package/.cursor/rules/qa.mdc +97 -0
  29. package/.cursor/rules/security.mdc +90 -0
  30. package/.cursor/rules/steward.mdc +99 -0
  31. package/.cursor/rules/test-runner.mdc +196 -0
  32. package/AGENTS.md +121 -0
  33. package/README.md +264 -0
  34. package/_system/architecture/CANON.md +159 -0
  35. package/_system/architecture/invariants.yml +87 -0
  36. package/_system/architecture/project-schema.json +98 -0
  37. package/_system/architecture/workflow-state-layout.md +68 -0
  38. package/_system/artifacts/SYSTEM_STATE.md +43 -0
  39. package/_system/artifacts/confidence-calibration.json +16 -0
  40. package/_system/artifacts/dependencies.md +46 -0
  41. package/_system/artifacts/framework-files-manifest.json +179 -0
  42. package/_system/artifacts/usage.json +1 -0
  43. package/_system/behaviors/DO_RELEASE.md +371 -0
  44. package/_system/behaviors/DO_RELEASE_AI.md +329 -0
  45. package/_system/behaviors/PREPARE_RELEASE.md +373 -0
  46. package/_system/behaviors/PREPARE_RELEASE_AI.md +234 -0
  47. package/_system/behaviors/WORK_ROOT_PLATFORM_ISSUES.md +140 -0
  48. package/_system/behaviors/WORK_TEST_PLAN_ISSUES.md +380 -0
  49. package/_system/do-not-repeat/abandoned-designs.md +18 -0
  50. package/_system/do-not-repeat/bad-patterns.md +19 -0
  51. package/_system/do-not-repeat/failed-experiments.md +18 -0
  52. package/_system/do-not-repeat/rejected-libraries.md +19 -0
  53. package/_system/drift/baselines.md +49 -0
  54. package/_system/drift/metrics.md +33 -0
  55. package/_system/golden-data/.gitkeep +0 -0
  56. package/_system/golden-data/README.md +47 -0
  57. package/_system/reports/mutation/mutation.html +492 -0
  58. package/_system/security/audit-allowlist.json +4 -0
  59. package/bin/create-shipit-app +29 -0
  60. package/bin/shipit +183 -0
  61. package/cli/src/commands/check.js +82 -0
  62. package/cli/src/commands/create.js +195 -0
  63. package/cli/src/commands/init.js +267 -0
  64. package/cli/src/commands/upgrade.js +196 -0
  65. package/cli/src/utils/config.js +27 -0
  66. package/cli/src/utils/file-copy.js +144 -0
  67. package/cli/src/utils/gitignore-merge.js +44 -0
  68. package/cli/src/utils/manifest.js +105 -0
  69. package/cli/src/utils/package-json-merge.js +163 -0
  70. package/cli/src/utils/project-json-merge.js +57 -0
  71. package/cli/src/utils/prompts.js +30 -0
  72. package/cli/src/utils/stack-detection.js +56 -0
  73. package/cli/src/utils/stack-files.js +364 -0
  74. package/cli/src/utils/upgrade-backup.js +159 -0
  75. package/cli/src/utils/version.js +64 -0
  76. package/dashboard-app/README.md +73 -0
  77. package/dashboard-app/eslint.config.js +23 -0
  78. package/dashboard-app/index.html +13 -0
  79. package/dashboard-app/package.json +30 -0
  80. package/dashboard-app/pnpm-lock.yaml +2721 -0
  81. package/dashboard-app/public/dashboard.json +66 -0
  82. package/dashboard-app/public/vite.svg +1 -0
  83. package/dashboard-app/src/App.css +141 -0
  84. package/dashboard-app/src/App.tsx +155 -0
  85. package/dashboard-app/src/assets/react.svg +1 -0
  86. package/dashboard-app/src/index.css +68 -0
  87. package/dashboard-app/src/main.tsx +10 -0
  88. package/dashboard-app/tsconfig.app.json +28 -0
  89. package/dashboard-app/tsconfig.json +4 -0
  90. package/dashboard-app/tsconfig.node.json +26 -0
  91. package/dashboard-app/vite.config.ts +7 -0
  92. package/package.json +116 -0
  93. package/scripts/README.md +70 -0
  94. package/scripts/audit-check.sh +125 -0
  95. package/scripts/calibration-report.sh +198 -0
  96. package/scripts/check-readiness.sh +155 -0
  97. package/scripts/collect-metrics.sh +116 -0
  98. package/scripts/command-manifest.yml +131 -0
  99. package/scripts/create-test-plan-issue.sh +110 -0
  100. package/scripts/dashboard-start.sh +16 -0
  101. package/scripts/deploy.sh +170 -0
  102. package/scripts/drift-check.sh +93 -0
  103. package/scripts/execute-rollback.sh +177 -0
  104. package/scripts/export-dashboard-json.js +208 -0
  105. package/scripts/fix-intents.sh +239 -0
  106. package/scripts/generate-dashboard.sh +136 -0
  107. package/scripts/generate-docs.sh +279 -0
  108. package/scripts/generate-project-context.sh +142 -0
  109. package/scripts/generate-release-plan.sh +443 -0
  110. package/scripts/generate-roadmap.sh +189 -0
  111. package/scripts/generate-system-state.sh +95 -0
  112. package/scripts/gh/create-intent-from-issue.sh +82 -0
  113. package/scripts/gh/create-issue-from-intent.sh +59 -0
  114. package/scripts/gh/create-pr.sh +41 -0
  115. package/scripts/gh/link-issue.sh +44 -0
  116. package/scripts/gh/on-ship-update-issue.sh +42 -0
  117. package/scripts/headless/README.md +8 -0
  118. package/scripts/headless/call-llm.js +109 -0
  119. package/scripts/headless/run-phase.sh +99 -0
  120. package/scripts/help.sh +271 -0
  121. package/scripts/init-project.sh +976 -0
  122. package/scripts/kill-intent.sh +125 -0
  123. package/scripts/lib/common.sh +29 -0
  124. package/scripts/lib/intent.sh +61 -0
  125. package/scripts/lib/progress.sh +57 -0
  126. package/scripts/lib/suggest-next.sh +131 -0
  127. package/scripts/lib/validate-intents.sh +240 -0
  128. package/scripts/lib/verify-outputs.sh +55 -0
  129. package/scripts/lib/workflow_state.sh +201 -0
  130. package/scripts/new-intent.sh +271 -0
  131. package/scripts/publish-npm.sh +28 -0
  132. package/scripts/scope-project.sh +380 -0
  133. package/scripts/setup-worktrees.sh +125 -0
  134. package/scripts/status.sh +278 -0
  135. package/scripts/suggest.sh +173 -0
  136. package/scripts/test-headless.sh +47 -0
  137. package/scripts/test-shipit.sh +52 -0
  138. package/scripts/test-workflow-state.sh +49 -0
  139. package/scripts/usage-report.sh +47 -0
  140. package/scripts/usage.sh +58 -0
  141. package/scripts/validate-cursor.sh +151 -0
  142. package/scripts/validate-project.sh +71 -0
  143. package/scripts/validate-vscode.sh +146 -0
  144. package/scripts/verify.sh +153 -0
  145. package/scripts/workflow-orchestrator.sh +97 -0
  146. package/scripts/workflow-templates/01_analysis.md.tpl +25 -0
  147. package/scripts/workflow-templates/02_plan.md.tpl +30 -0
  148. package/scripts/workflow-templates/03_implementation.md.tpl +25 -0
  149. package/scripts/workflow-templates/04_verification.md.tpl +29 -0
  150. package/scripts/workflow-templates/05_release_notes.md.tpl +16 -0
  151. package/scripts/workflow-templates/05_verification_legacy.md.tpl +6 -0
  152. package/scripts/workflow-templates/active.md.tpl +18 -0
  153. package/scripts/workflow-templates/phases.yml +39 -0
  154. package/stryker.conf.json +8 -0
  155. package/work/intent/templates/api-endpoint.md +124 -0
  156. package/work/intent/templates/bugfix.md +116 -0
  157. package/work/intent/templates/frontend-feature.md +115 -0
  158. package/work/intent/templates/generic.md +122 -0
  159. package/work/intent/templates/infra-change.md +121 -0
  160. package/work/intent/templates/refactor.md +116 -0
@@ -0,0 +1,58 @@
1
+ # /revert-plan
2
+
3
+ Create or update a rollback plan for the current intent.
4
+
5
+ ## Usage
6
+
7
+ ```
8
+ /revert-plan <intent-id>
9
+ ```
10
+
11
+ Example: `/revert-plan F-042`
12
+
13
+ ## What It Does
14
+
15
+ Produces a rollback section to ensure changes are reversible.
16
+
17
+ ## Inputs
18
+
19
+ - `work/intent/**/<intent-id>.md` (commonly `work/intent/features/<intent-id>.md`)
20
+ - `work/workflow-state/02_plan.md`
21
+ - `work/workflow-state/03_implementation.md` (if present)
22
+
23
+ ## Output
24
+
25
+ Writes `work/workflow-state/rollback.md` with:
26
+
27
+ - Feature flags or toggles
28
+ - Config or migration rollback steps
29
+ - Revert commit guidance
30
+
31
+ ## Instructions
32
+
33
+ 1. Read the intent and plan to understand changes introduced.
34
+ 2. Identify toggles, config, or data migrations that need rollback.
35
+ 3. Document a step-by-step rollback procedure.
36
+ 4. Save to `work/workflow-state/rollback.md`.
37
+
38
+ ## Template
39
+
40
+ ```markdown
41
+ # Rollback Plan: <intent-id>
42
+
43
+ ## Feature Flags
44
+
45
+ - `FEATURE_X_ENABLED=false`
46
+
47
+ ## Config Rollback
48
+
49
+ - Restore previous config values in `config/...`
50
+
51
+ ## Data/Migrations
52
+
53
+ - Run down migration: `<migration_name>`
54
+
55
+ ## Code Revert
56
+
57
+ - `git revert <sha>`
58
+ ```
@@ -0,0 +1,64 @@
1
+ # /risk
2
+
3
+ Force a focused security/threat review for a specific intent.
4
+
5
+ ## Usage
6
+
7
+ ```
8
+ /risk <intent-id>
9
+ ```
10
+
11
+ Example: `/risk F-042`
12
+
13
+ ## What It Does
14
+
15
+ Performs a structured security skim and records findings.
16
+
17
+ ## Inputs
18
+
19
+ - `intent/**/<intent-id>.md` (commonly `intent/features/<intent-id>.md`)
20
+ - `work/workflow-state/02_plan.md`
21
+ - `work/workflow-state/03_implementation.md` (if present)
22
+ - `_system/architecture/invariants.yml`
23
+
24
+ ## Output
25
+
26
+ Writes `work/workflow-state/04_verification.md` (Security section within it) with:
27
+
28
+ - Threat model summary
29
+ - Findings (if any)
30
+ - Mitigations required
31
+ - High-risk check
32
+
33
+ ## Instructions
34
+
35
+ 1. Read the intent and plan to identify high-risk domains.
36
+ 2. Review for auth/input validation/secrets/PII concerns.
37
+ 3. Run dependency audit if applicable: `pnpm audit --audit-level=high`.
38
+ 4. Record findings and required mitigations in `work/workflow-state/04_verification.md`.
39
+
40
+ ## Template
41
+
42
+ ```markdown
43
+ # Security Review: <intent-id>
44
+
45
+ ## Threat Model
46
+
47
+ - Attack vector 1: ...
48
+ - Attack vector 2: ...
49
+
50
+ ## Vulnerabilities Found
51
+
52
+ - [ ] Finding 1
53
+ - [ ] Finding 2
54
+
55
+ ## Mitigations Required
56
+
57
+ - [ ] Mitigation 1
58
+ - [ ] Mitigation 2
59
+
60
+ ## High-Risk Check
61
+
62
+ - [ ] Not high-risk domain
63
+ - [ ] High-risk domain (human approval required)
64
+ ```
@@ -0,0 +1,43 @@
1
+ # /rollback
2
+
3
+ Execute rollback for an intent in guided mode. Reads the rollback plan produced by /revert-plan and walks through steps with confirmation.
4
+
5
+ ## Usage
6
+
7
+ ```
8
+ /rollback <intent-id>
9
+ ```
10
+
11
+ Example: `/rollback F-042`
12
+
13
+ Or from CLI: `pnpm execute-rollback F-042`
14
+
15
+ ## What It Does
16
+
17
+ 1. Resolves the rollback plan path per [workflow-state-layout.md](_system/architecture/workflow-state-layout.md):
18
+ - If `work/workflow-state/<intent-id>/` exists: read `rollback.md` or rollback section in `02_plan.md`
19
+ - Otherwise: read flat `work/workflow-state/rollback.md` or rollback section in `work/workflow-state/02_plan.md`
20
+ 2. Presents each step from the rollback plan
21
+ 3. **High-risk steps** (force, drop, delete, migration down, production, auth, secret): display only — user runs manually
22
+ 4. **Safe steps** (e.g. simple `git revert <sha>`): prompt "Run this? [y/N]", execute if user confirms
23
+ 5. Append outcomes to `work/workflow-state/rollback-log.md` (audit log)
24
+
25
+ ## Options
26
+
27
+ - `--dry-run`: Print steps and classification (auto vs manual) without executing
28
+
29
+ ## Safety
30
+
31
+ - No automatic force-push, no automatic data deletion
32
+ - Destructive steps are never auto-executed
33
+ - Before executing any step that touches production, infra, or data, the user must have reviewed the rollback plan
34
+ - Run rollback for one intent at a time; do not run parallel rollbacks
35
+
36
+ ## Prerequisites
37
+
38
+ Run `/revert-plan <intent-id>` first to create the rollback plan. If no plan exists, the command fails with "No rollback plan; run /revert-plan <intent-id> first."
39
+
40
+ ## When to Use
41
+
42
+ - After shipping an intent that needs to be reverted
43
+ - When a rollback plan exists and you want guided execution with confirmations
@@ -0,0 +1,53 @@
1
+ # /scope-project
2
+
3
+ Run the deterministic scoping script. **Nothing else.**
4
+
5
+ ## Usage
6
+
7
+ ```
8
+ /scope-project [project-description]
9
+ ```
10
+
11
+ ## What To Do
12
+
13
+ Run this command in the terminal:
14
+
15
+ ```bash
16
+ ./scripts/scope-project.sh "<project-description>"
17
+ ```
18
+
19
+ **CRITICAL: Show all script output**
20
+
21
+ - Display all script prompts and user responses in the chat
22
+ - Show any errors or warnings from the script
23
+ - Echo the interactive Q&A session as it happens
24
+ - After completion, read and display `project-scope.md` contents
25
+
26
+ That's it. The script handles everything:
27
+
28
+ - Asks follow-up questions
29
+ - Waits for user answers
30
+ - Collects feature candidates
31
+ - Prompts for intent selection
32
+ - Generates intent files
33
+ - Creates `project-scope.md`
34
+ - Runs roadmap and release plan generators
35
+
36
+ ## Hard Rules
37
+
38
+ 1. **RUN THE SCRIPT.** Do not scope manually.
39
+ 2. **DO NOT** assume answers or use defaults.
40
+ 3. **DO NOT** create intents without the script.
41
+ 4. **DO NOT** modify `src/`, `tests/`, or `README.md`.
42
+ 5. **DO NOT** edit intent files to force roadmap output.
43
+
44
+ If the script is missing, tell the user to re-run `/init-project`.
45
+
46
+ ## Output
47
+
48
+ After the script runs, verify these files exist:
49
+
50
+ - `project-scope.md` (with Q/A and intent selection)
51
+ - `work/intent/features/F-*.md` (generated intents)
52
+ - `work/roadmap/now.md`, `next.md`, `later.md`
53
+ - `work/release/plan.md`
@@ -0,0 +1,345 @@
1
+ # /ship
2
+
3
+ Orchestrated workflow for shipping features through ShipIt.
4
+
5
+ ## Usage
6
+
7
+ ```
8
+ /ship <intent-id>
9
+ ```
10
+
11
+ Example: `/ship F-042`
12
+
13
+ ## Prerequisites
14
+
15
+ - Project must be initialized (run `/init-project` first)
16
+ - `project.json` must exist and be valid
17
+ - Intent file must exist under `work/intent/**/<intent-id>.md` (commonly `work/intent/features/<intent-id>.md`)
18
+
19
+ ## Automated State Generation
20
+
21
+ Before starting, run:
22
+ \`\`\`bash
23
+ pnpm workflow-orchestrator <intent-id>
24
+ \`\`\`
25
+
26
+ This automatically creates all workflow state files for the 6 phases.
27
+
28
+ ## Important: Role Switching
29
+
30
+ Cursor doesn't have native "subagents." You will switch roles by:
31
+
32
+ 1. Reading the relevant rule file (e.g., `.cursor/rules/pm.mdc`)
33
+ 2. Adopting that role's constraints and output format
34
+ 3. Completing that role's tasks
35
+ 4. Switching to the next role
36
+
37
+ **Always explicitly state when switching roles:** "Switching to [ROLE] role."
38
+
39
+ ## Operational Transparency Requirements
40
+
41
+ **CRITICAL: You must show evidence of all operations:**
42
+
43
+ 1. **Script execution:** Display all prompts, responses, and errors from interactive scripts
44
+ 2. **Command results:** Show output from `pnpm test`, `git commit`, `npm audit`, etc.
45
+ 3. **Status updates:** Explicitly state:
46
+ - "Starting Phase X: [description]"
47
+ - "Phase X complete. Summary: [what was accomplished]"
48
+ - "Proceeding to Phase Y: [next steps]"
49
+ 4. **Next steps:** Always tell the user what to do next:
50
+ - "Waiting for APPROVE to proceed"
51
+ - "Review `work/workflow-state/02_plan.md` and confirm"
52
+ - "No action needed - proceeding automatically"
53
+
54
+ **Never proceed silently.** The user should never have to ask "did you finish?"
55
+
56
+ ## Content Display Rules (CRITICAL)
57
+
58
+ **To avoid transcript bloat, follow these rules:**
59
+
60
+ 1. **Show content ONCE when created:**
61
+ - When creating a new file: Show the full content
62
+ - When creating a plan: Show the full plan ONCE
63
+
64
+ 2. **Reference files later, don't re-display:**
65
+ - After initial creation: Reference the file instead of showing full content
66
+ - Use: "Updated `work/workflow-state/02_plan.md`" instead of showing entire plan again
67
+ - Use: "Modified `src/server.ts` - added DELETE route" instead of showing entire file
68
+
69
+ 3. **For updates, show diffs or summaries:**
70
+ - When updating existing files: Show what changed, not the entire file
71
+ - Use: "Added `deleteTodo()` function to `src/data/todoStore.ts`"
72
+ - Or show a diff: `+ export async function deleteTodo(...) { ... }`
73
+
74
+ 4. **Never duplicate:**
75
+ - Don't show the same code block multiple times
76
+ - Don't re-display plan documents after initial creation
77
+ - Don't show entire test files multiple times - reference them
78
+
79
+ **Exception:** If user explicitly asks to see the content, then show it.
80
+
81
+ ## Process
82
+
83
+ ### Phase 1: Analysis (PM Role)
84
+
85
+ **Status:** "Starting Phase 1: Analysis (PM Role)"
86
+
87
+ **Switch to PM role** (read `.cursor/rules/pm.mdc`):
88
+
89
+ 1. Read the intent file: `work/intent/**/<intent-id>.md` (commonly `work/intent/features/<intent-id>.md`)
90
+ 2. Restate requirements clearly (no ambiguity)
91
+ 3. Define acceptance criteria (executable, not subjective)
92
+ 4. Score confidence:
93
+ - Requirements clarity: 0.0-1.0
94
+ - Domain assumptions: 0.0-1.0
95
+ 5. Check `_system/do-not-repeat/` for similar failed approaches
96
+ 6. Save output to `work/workflow-state/01_analysis.md`
97
+ 7. **If confidence < 0.7, STOP and request human interrupt**
98
+
99
+ **Status:** "Phase 1 complete. Summary: [requirements clarified, X acceptance criteria defined, confidence: Y]. Proceeding to Phase 2: Planning."
100
+
101
+ ### Phase 2: Planning (Architect Role)
102
+
103
+ **Status:** "Starting Phase 2: Planning (Architect Role)"
104
+
105
+ **Switch to Architect role** (read `.cursor/rules/architect.mdc`):
106
+
107
+ 1. Read `work/workflow-state/01_analysis.md`
108
+ 2. Propose technical approach
109
+ 3. List files to create/modify (explicit file list)
110
+ 4. Check against `_system/architecture/CANON.md` (must not violate)
111
+ 5. Define rollback strategy
112
+ 6. Save output to `work/workflow-state/02_plan.md`
113
+ 7. **STOP: Present plan and ask for approval before any edits**
114
+
115
+ **Status:** "Phase 2 complete. Plan created: [X files to create, Y files to modify]. **WAITING FOR APPROVAL** - Review `work/workflow-state/02_plan.md` and type APPROVE to proceed."
116
+
117
+ **Gate:** Human approval required before proceeding.
118
+
119
+ ### Phase 3: Test Writing (QA Role - BEFORE Implementation)
120
+
121
+ **Status:** "Starting Phase 3: Test Writing (QA Role)"
122
+
123
+ **Phase Boundary:** This phase is for writing tests ONLY. Do NOT add dependencies or modify infrastructure files unless:
124
+
125
+ 1. Tests absolutely cannot run without them
126
+ 2. You STOP and get explicit approval
127
+ 3. You document the deviation
128
+
129
+ **Switch to QA role** (read `.cursor/rules/qa.mdc`):
130
+
131
+ 1. Read `work/workflow-state/01_analysis.md` (acceptance criteria)
132
+ 2. Write test cases for all acceptance criteria
133
+ 3. Write edge case tests
134
+ 4. Write property-based tests (using fast-check)
135
+ 5. **Verify tests FAIL** (nothing to pass yet)
136
+ - **CRITICAL: Show actual test output** - display the test failure messages, error stack traces, and test summary
137
+ - Don't just say "tests fail" - show the evidence
138
+ - **If tests need dependencies to run:** STOP, explain why, get approval, then add them
139
+ 6. Commit tests separately: `git commit -m "test: add tests for <intent-id>"`
140
+ - **CRITICAL: Show git command and confirmation** - display the actual `git commit` command and its output
141
+
142
+ **Status:** "Phase 3 complete. Summary: [X test cases written, tests verified to fail, tests committed]. Proceeding to Phase 4: Implementation."
143
+
144
+ **Critical:** Tests must exist BEFORE implementation.
145
+
146
+ ### Phase 4: Implementation (Implementer Role)
147
+
148
+ **Status:** "Starting Phase 4: Implementation (Implementer Role)"
149
+
150
+ **Phase Boundary:** This phase is for implementation ONLY. Add dependencies and modify infrastructure files as specified in the approved plan. Do NOT write new tests (they should already exist from Phase 3).
151
+
152
+ **CRITICAL: Strict Plan Compliance**
153
+
154
+ **You MUST implement ONLY what is in the approved plan (`work/workflow-state/02_plan.md`).**
155
+
156
+ - **If you need something NOT in plan:** STOP immediately, explain why it's needed, get approval
157
+ - **If approval granted:** Update plan first, then implement
158
+ - **Never implement unplanned features without approval**
159
+ - **Never add endpoints, functions, or features "because they're needed" without approval**
160
+
161
+ **Switch to Implementer role** (read `.cursor/rules/implementer.mdc`):
162
+
163
+ 1. Read `work/workflow-state/02_plan.md` (approved plan)
164
+ - **Check plan for:** Which files to modify, which dependencies to add, which infrastructure files to update
165
+ - **Identify what's in plan:** List all features, endpoints, functions that are approved
166
+ - **If something is missing:** STOP and get approval before implementing
167
+ 2. Verify tests exist (check `/tests/` directory)
168
+ 3. Run tests (they should fail initially)
169
+ - **CRITICAL: Show test output** - display failure messages
170
+ 4. **Add dependencies** (as specified in plan's "Modified Files" section)
171
+ - Only add dependencies listed in the plan
172
+ - If plan says "Add dependencies: X, Y" - add them now
173
+ - **If tests need dependencies not in plan:** STOP, explain why, get approval
174
+ 5. **Modify infrastructure files** (as specified in plan)
175
+ - Only modify files listed in plan (e.g., `.gitignore`, `package.json`)
176
+ - If plan says "Update `.gitignore`" - do it now
177
+ 6. **Implement ONLY what's in the approved plan**
178
+ - Check each feature/endpoint/function against the plan
179
+ - If it's not in plan: STOP and get approval
180
+ - Example: If plan says "POST /api/todos" but you need "GET /api/todos": STOP, explain why, get approval
181
+ 7. Make tests pass
182
+ - **CRITICAL: Show test output** - display pass/fail results
183
+ 8. Save progress to `work/workflow-state/03_implementation.md`
184
+ - **CRITICAL: Document ALL deviations from plan accurately**
185
+ - Compare what was implemented vs what was in the approved plan (`work/workflow-state/02_plan.md`)
186
+ - If you added anything not in plan: List it explicitly with explanation AND approval status
187
+ - If you skipped anything in plan: List it explicitly with explanation
188
+ - If you modified approach: List it explicitly with explanation
189
+ - **Never claim "No deviations" or "None" if there are deviations**
190
+ - Format: "Deviations from Plan: [list each deviation] OR None (if truly no deviations)"
191
+ - Example: "Deviations from Plan: Added GET /api/todos endpoint (not in plan, but needed for frontend to load todos)"
192
+ 9. **If plan deviation needed, STOP and return to Phase 2**
193
+
194
+ **Status:** "Phase 4 complete. Summary: [X files created, Y files modified, Z tests passing]. Deviations: [list any deviations or 'None']. Proceeding to Phase 5: Verification."
195
+
196
+ ### Phase 5: Verification (QA + Security Roles)
197
+
198
+ **Status:** "Starting Phase 5: Verification (QA + Security Roles)"
199
+
200
+ **Switch to QA role** (read `.cursor/rules/qa.mdc`):
201
+
202
+ 1. Run all tests: `pnpm test`
203
+ - **CRITICAL: Show test output** - display test results, pass/fail counts, coverage summary
204
+ 2. Run mutation testing: `pnpm test:mutate` (Stryker)
205
+ - **CRITICAL: Show mutation test results** - display mutation score, killed/survived mutants
206
+ 3. Try to break the implementation (adversarial mindset)
207
+ 4. Document findings
208
+ 5. **Provide status update:** "Phase 5 (Verification) complete. Summary: [X tests passed, Y mutations killed, Z vulnerabilities found]"
209
+
210
+ **Switch to Security role** (read `.cursor/rules/security.mdc`):
211
+
212
+ 1. Review for auth/input/secrets/PII issues
213
+ 2. Run `npm audit` for dependency vulnerabilities
214
+ - **CRITICAL: Show audit output** - display vulnerability counts and details
215
+ 3. Check high-risk domains (require human approval)
216
+ 4. Save results to `work/workflow-state/04_verification.md`
217
+ 5. **If verification fails repeatedly, escalate to Steward for kill review**
218
+ 6. **Provide status update:** "Security review complete. Findings: [summary]"
219
+
220
+ ### Phase 6: Release (Docs + Steward Roles)
221
+
222
+ **Status:** "Starting Phase 6: Release (Docs + Steward Roles)"
223
+
224
+ **Switch to Docs role** (read `.cursor/rules/docs.mdc`):
225
+
226
+ 1. Update README.md (if public APIs changed)
227
+ 2. Update CHANGELOG.md
228
+ 3. Write release notes
229
+ 4. Save to `work/workflow-state/05_release_notes.md`
230
+
231
+ **Status:** "Docs updates complete. Summary: [README updated, CHANGELOG updated, release notes written]"
232
+
233
+ **Switch to Steward role** (read `.cursor/rules/steward.mdc`):
234
+
235
+ 1. Final approval check:
236
+ - All acceptance criteria met
237
+ - No drift violations
238
+ - Confidence scores acceptable
239
+ 2. Make decision: APPROVE | BLOCK | KILL
240
+ - **CRITICAL: Show decision and rationale** - explicitly state the decision and why
241
+ 3. If APPROVE: Mark intent as `shipped` in intent file
242
+
243
+ **Status:** "Phase 6 complete. Steward decision: [APPROVE/BLOCK/KILL]. Rationale: [reason]. Workflow complete."
244
+
245
+ ## Phase Boundary Rules (CRITICAL)
246
+
247
+ **Each phase has strict boundaries. Do NOT perform actions assigned to other phases.**
248
+
249
+ ### Phase 1 (Analysis - PM Role)
250
+
251
+ **CAN DO:**
252
+
253
+ - Read intent files
254
+ - Write analysis documents
255
+ - Define acceptance criteria
256
+ - Score confidence
257
+
258
+ **CANNOT DO:**
259
+
260
+ - Modify source code
261
+ - Add dependencies
262
+ - Write tests
263
+ - Create/modify infrastructure files
264
+
265
+ ### Phase 2 (Planning - Architect Role)
266
+
267
+ **CAN DO:**
268
+
269
+ - Read analysis documents
270
+ - Write plan documents
271
+ - List files to create/modify
272
+ - Check CANON.md compliance
273
+
274
+ **CANNOT DO:**
275
+
276
+ - Modify source code
277
+ - Add dependencies
278
+ - Write tests
279
+ - Create/modify infrastructure files
280
+
281
+ ### Phase 3 (Test Writing - QA Role)
282
+
283
+ **CAN DO:**
284
+
285
+ - Write test files
286
+ - Run tests to verify they fail
287
+ - Commit test files
288
+
289
+ **CANNOT DO:**
290
+
291
+ - Add dependencies (unless tests absolutely require them - then STOP and get approval)
292
+ - Modify source code
293
+ - Modify infrastructure files (`.gitignore`, `package.json`, etc.) unless explicitly in plan for this phase
294
+ - Write production code
295
+
296
+ **If tests need dependencies:** STOP, explain why, get approval, then add them. Document the deviation.
297
+
298
+ ### Phase 4 (Implementation - Implementer Role)
299
+
300
+ **CAN DO:**
301
+
302
+ - Add dependencies (as specified in plan)
303
+ - Modify infrastructure files (`.gitignore`, `package.json`, etc. as specified in plan)
304
+ - Write/modify source code
305
+ - Make tests pass
306
+
307
+ **CANNOT DO:**
308
+
309
+ - Write new tests (tests should already exist from Phase 3)
310
+ - Modify plan without approval
311
+ - Add features not in approved plan
312
+
313
+ **If action needed in wrong phase:** STOP, explain why, get approval to deviate, or return to Phase 2 to update plan.
314
+
315
+ ## Rules
316
+
317
+ - **Small diffs:** Split large changes into multiple commits
318
+ - **Tests first:** If tests are missing, create them FIRST
319
+ - **No shortcuts:** If verification fails, fix or roll back—do not "explain it away"
320
+ - **Gates are blocking:** Never proceed past a gate without approval
321
+ - **Explicit role switching:** Always state when switching roles
322
+ - **Phase boundaries are strict:** Only perform actions assigned to current phase
323
+
324
+ ## Workflow State Files
325
+
326
+ All state is saved to `work/workflow-state/`:
327
+
328
+ - `01_analysis.md` - PM analysis
329
+ - `02_plan.md` - Architect plan (requires approval)
330
+ - `03_implementation.md` - Implementer progress
331
+ - `04_verification.md` - QA + Security results
332
+ - `05_release_notes.md` - Docs updates
333
+ - `active.md` - Current active intent (updated by Steward)
334
+
335
+ ## Parallel Work (Optional)
336
+
337
+ For large intents, you can split work into parallel tasks:
338
+
339
+ 1. Split work into 3–6 independent tasks
340
+ 2. Create worktrees: `git worktree add ../worktree-1 -b feature/task-1`
341
+ 3. Open each worktree in separate Cursor window
342
+ 4. Each worktree has its own `.agent-id` file
343
+ 5. Coordinate via `worktrees.json` in main repo
344
+
345
+ See `scripts/setup-worktrees.sh` for automation.
@@ -0,0 +1,71 @@
1
+ # /status
2
+
3
+ Show current ShipIt project status.
4
+
5
+ ## Usage
6
+
7
+ ```
8
+ /status
9
+ ```
10
+
11
+ ## What It Shows
12
+
13
+ - **Active Intent** - Current intent being worked on (if any)
14
+ - **Intent Status** - Counts of intents by status (planned, active, shipped, killed, etc.)
15
+ - **Workflow State** - Which workflow phase files exist
16
+ - **Recent Intents** - Last 5 intents created
17
+ - **Pending Approvals** - Any approvals waiting for human input
18
+ - **Quick Actions** - Suggested next steps
19
+
20
+ ## Example Output
21
+
22
+ ```
23
+ ════════════════════════════════════════
24
+ ShipIt Project Status
25
+ ════════════════════════════════════════
26
+
27
+ Project: my-project
28
+
29
+ Active Intent:
30
+ ID: F-001
31
+ Status: active
32
+ Phase: 02_planning
33
+
34
+ Intent Status:
35
+ Planned: 3
36
+ Active: 1
37
+ Blocked: 0
38
+ Validating: 0
39
+ Shipped: 2
40
+ Killed: 1
41
+ Total: 7
42
+
43
+ Workflow State:
44
+ ✓ 01_analysis
45
+ ✓ 02_plan
46
+ ○ 03_implementation (not started)
47
+ ○ 04_verification (not started)
48
+ ○ 05_release_notes (not started)
49
+ ○ 06_shipped (not started)
50
+
51
+ Recent Intents:
52
+ F-005: Add user authentication (planned)
53
+ F-004: Database migration (shipped)
54
+ F-003: API endpoint (shipped)
55
+ F-002: Data model (active)
56
+ F-001: Initial setup (killed)
57
+
58
+ ⚠ Pending Approval:
59
+ Plan approval required in work/workflow-state/02_plan.md
60
+
61
+ Quick Actions:
62
+ → Continue workflow for active intent
63
+ → Run /status to see current phase
64
+ ```
65
+
66
+ ## When to Use
67
+
68
+ - Check what's currently active in your project
69
+ - See how many intents are in each status
70
+ - Find out what phase you're in
71
+ - Get quick suggestions for next steps
@@ -0,0 +1,44 @@
1
+ # /suggest
2
+
3
+ Get suggested next actions based on current project state.
4
+
5
+ ## Usage
6
+
7
+ ```
8
+ /suggest
9
+ ```
10
+
11
+ ## What It Does
12
+
13
+ Analyzes your project state and suggests actionable next steps, such as:
14
+
15
+ - **No intents?** → Suggest scoping or creating first intent
16
+ - **Planned intents?** → Suggest starting work on one
17
+ - **Active intent?** → Suggest continuing workflow based on current phase
18
+ - **Pending approval?** → Remind you to approve the plan
19
+ - **Stale plans?** → Suggest regenerating release plan or roadmap
20
+
21
+ ## Example Output
22
+
23
+ ```
24
+ ShipIt Suggestions
25
+
26
+ 1. Start working on an intent: /ship F-001
27
+ 2. Update release plan: /generate-release-plan
28
+ 3. Update roadmap: /generate-roadmap
29
+
30
+ More help: /help [command]
31
+ Project status: /status
32
+ ```
33
+
34
+ ## When to Use
35
+
36
+ - You're not sure what to do next
37
+ - You want to see what needs attention
38
+ - You want actionable suggestions based on your project state
39
+ - You're onboarding to a new ShipIt project
40
+
41
+ ## Related Commands
42
+
43
+ - `/status` - See detailed project status
44
+ - `/help` - Get help on specific commands