@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,25 @@
1
+ # Analysis: {{INTENT_ID}}
2
+
3
+ **Generated:** {{DATE_UTC}}
4
+ **Intent:** {{INTENT_ID}}
5
+
6
+ ## Requirements
7
+
8
+ [To be filled by PM agent]
9
+
10
+ ## Acceptance Criteria
11
+
12
+ [To be filled by PM agent]
13
+
14
+ ## Confidence Scores
15
+
16
+ - Requirements clarity: [0.0-1.0]
17
+ - Domain assumptions: [0.0-1.0]
18
+
19
+ ## Do-Not-Repeat Check
20
+
21
+ [Results from _system/do-not-repeat/ check]
22
+
23
+ ## Next Steps
24
+
25
+ Proceed to Planning phase.
@@ -0,0 +1,30 @@
1
+ # Plan: {{INTENT_ID}}
2
+
3
+ **Generated:** {{DATE_UTC}}
4
+ **Intent:** {{INTENT_ID}}
5
+
6
+ ## Technical Approach
7
+
8
+ [To be filled by Architect agent]
9
+
10
+ ## Files to Create/Modify
11
+
12
+ - [File list]
13
+
14
+ ## CANON.md Compliance
15
+
16
+ [Compliance check results]
17
+
18
+ ## Rollback Strategy
19
+
20
+ [Rollback plan]
21
+
22
+ ## Approval Status
23
+
24
+ - [ ] Human approval required
25
+ - [ ] Approved
26
+ - [ ] Blocked
27
+
28
+ ## Next Steps
29
+
30
+ Proceed to Test Writing phase.
@@ -0,0 +1,25 @@
1
+ # Implementation: {{INTENT_ID}}
2
+
3
+ **Generated:** {{DATE_UTC}}
4
+ **Intent:** {{INTENT_ID}}
5
+
6
+ ## Implementation Progress
7
+
8
+ [To be filled by Implementer agent]
9
+
10
+ ## Files Modified
11
+
12
+ - [List of files]
13
+
14
+ ## Tests Status
15
+
16
+ - [ ] All tests pass
17
+ - [ ] Coverage meets threshold
18
+
19
+ ## Deviations from Plan
20
+
21
+ [Any deviations and rationale]
22
+
23
+ ## Next Steps
24
+
25
+ Proceed to Verification phase.
@@ -0,0 +1,29 @@
1
+ # Verification: {{INTENT_ID}}
2
+
3
+ **Generated:** {{DATE_UTC}}
4
+ **Intent:** {{INTENT_ID}}
5
+
6
+ ## Test Results
7
+
8
+ [QA agent results]
9
+
10
+ ## Mutation Testing
11
+
12
+ [Mutation test results]
13
+
14
+ ## Security Review
15
+
16
+ [Security agent findings]
17
+
18
+ ## Dependency Audit
19
+
20
+ [Audit results]
21
+
22
+ ## Verification Status
23
+
24
+ - [ ] All checks pass
25
+ - [ ] Ready for release
26
+
27
+ ## Next Steps
28
+
29
+ Proceed to Release phase.
@@ -0,0 +1,16 @@
1
+ # Release Notes: {{INTENT_ID}}
2
+
3
+ **Generated:** {{DATE_UTC}}
4
+ **Intent:** {{INTENT_ID}}
5
+
6
+ ## Documentation Updates
7
+
8
+ [Docs agent updates]
9
+
10
+ ## Release Notes
11
+
12
+ [Release notes]
13
+
14
+ ## Approval Summary
15
+
16
+ [Steward decision and rationale]
@@ -0,0 +1,6 @@
1
+ # Verification (Legacy): {{INTENT_ID}}
2
+
3
+ **Generated:** {{DATE_UTC}}
4
+ **Intent:** {{INTENT_ID}}
5
+
6
+ This file is deprecated. Use `work/workflow-state/04_verification.md`.
@@ -0,0 +1,18 @@
1
+ # Active Intent
2
+
3
+ **Intent ID:** {{INTENT_ID}}
4
+ **Status:** active
5
+ **Current Phase:** [Phase name]
6
+ **Started:** {{DATE_UTC}}
7
+
8
+ ## Progress
9
+
10
+ - [ ] Phase 1: Analysis
11
+ - [ ] Phase 2: Planning
12
+ - [ ] Phase 3: Implementation
13
+ - [ ] Phase 4: Verification
14
+ - [ ] Phase 5: Release Notes
15
+
16
+ ## Assigned Agents
17
+
18
+ [Agent assignments]
@@ -0,0 +1,39 @@
1
+ # Workflow phase spec: single source of truth for workflow-orchestrator.
2
+ # Add a phase by adding an entry here and a matching .tpl file.
3
+
4
+ phases:
5
+ - id: analysis
6
+ output: 01_analysis.md
7
+ template: 01_analysis.md.tpl
8
+ name: Analysis
9
+ role: PM
10
+ - id: plan
11
+ output: 02_plan.md
12
+ template: 02_plan.md.tpl
13
+ name: Planning
14
+ role: Architect
15
+ - id: implementation
16
+ output: 03_implementation.md
17
+ template: 03_implementation.md.tpl
18
+ name: Implementation
19
+ role: Implementer
20
+ - id: verification
21
+ output: 04_verification.md
22
+ template: 04_verification.md.tpl
23
+ name: Verification
24
+ role: QA
25
+ - id: release
26
+ output: 05_release_notes.md
27
+ template: 05_release_notes.md.tpl
28
+ name: Release
29
+ role: Docs
30
+ - id: legacy_verification
31
+ output: 05_verification.md
32
+ template: 05_verification_legacy.md.tpl
33
+ name: Legacy Verification
34
+ role: null
35
+ - id: active
36
+ output: active.md
37
+ template: active.md.tpl
38
+ name: Active
39
+ role: null
@@ -0,0 +1,8 @@
1
+ {
2
+ "$schema": "./node_modules/@stryker-mutator/core/schema/stryker-schema.json",
3
+ "testRunner": "vitest",
4
+ "plugins": ["@stryker-mutator/vitest-runner"],
5
+ "reporters": ["progress", "clear-text", "html"],
6
+ "mutate": ["src/**/*.ts"],
7
+ "coverageAnalysis": "off"
8
+ }
@@ -0,0 +1,124 @@
1
+ # F-###: Title
2
+
3
+ ## Type
4
+
5
+ feature | bug | tech-debt
6
+
7
+ ## Status
8
+
9
+ planned | active | blocked | validating | shipped | killed
10
+
11
+ ## Priority
12
+
13
+ p0 | p1 | p2 | p3
14
+
15
+ ## Effort
16
+
17
+ s | m | l
18
+
19
+ ## Release Target
20
+
21
+ R1 | R2 | R3 | R4
22
+
23
+ ## Motivation
24
+
25
+ (Why it exists, 1–3 bullets)
26
+
27
+ ## Endpoint (API)
28
+
29
+ - Path: (e.g. `/api/v1/resources`)
30
+ - Method: GET | POST | PUT | PATCH | DELETE
31
+ - Request schema: (body/params)
32
+ - Response schema: (status codes, body)
33
+ - Auth: (none | API key | JWT | scope)
34
+ - Rate limit: (if applicable)
35
+
36
+ ## Confidence
37
+
38
+ Requirements: 0.0–1.0
39
+ Domain assumptions: 0.0–1.0
40
+ (If either < threshold, document why proceeding or request human interrupt)
41
+
42
+ ## Invariants (Hard Constraints)
43
+
44
+ Written in dual form: human-readable AND executable. For API: latency, backward compat.
45
+
46
+ Human-readable:
47
+
48
+ - p95 latency < 200ms (or project budget)
49
+ - Schema backward compatible for 3 versions
50
+ - (Add API-specific invariants)
51
+
52
+ Executable (add to \_system/architecture/invariants.yml):
53
+
54
+ ```yaml
55
+ invariants:
56
+ - p95_latency_ms: 200
57
+ - schema_backward_compat_versions: 3
58
+ success_metrics:
59
+ - test_pass_rate: 99.5
60
+ ```
61
+
62
+ ## Acceptance (Executable)
63
+
64
+ These are the ONLY criteria for "done." If it can't be checked automatically, it doesn't belong here.
65
+
66
+ - [ ] Contract tests: API response matches schema; status codes documented and tested
67
+ - [ ] CLI: `pnpm test` green
68
+ - [ ] CLI: `pnpm lint && pnpm typecheck` green
69
+ - [ ] Performance: p95 < budget (if applicable)
70
+ - [ ] (Add endpoint-specific checks)
71
+
72
+ ## Assumptions (MUST BE EXPLICIT)
73
+
74
+ Every assumption is a potential bug. List them and make them testable where possible.
75
+
76
+ - (ex: "Auth provider returns consistent claims" — add contract?)
77
+ - (ex: "Rate limiter is configured per endpoint" — add test?)
78
+
79
+ ## Risk Level
80
+
81
+ low | medium | high
82
+
83
+ Risk triggers:
84
+
85
+ - high: auth, money, data migration, permissions, infra, PII
86
+ - medium: new dependencies, API changes, performance-sensitive
87
+ - low: docs, refactors, tests, internal tooling
88
+
89
+ ## Kill Criteria (Stop Conditions)
90
+
91
+ If ANY of these trigger, the intent is KILLED (not paused, not reworked—killed):
92
+
93
+ - Cannot satisfy latency invariant without major redesign
94
+ - Requires breaking schema compatibility beyond allowed versions
95
+ - Conflicts with architecture canon
96
+ - (Add API-specific kill criteria)
97
+
98
+ ## Rollback Plan
99
+
100
+ REQUIRED before implementation begins.
101
+
102
+ - Feature flag or route toggle: disable endpoint
103
+ - Config revert: previous version
104
+ - Revert commit: clean revert possible without data loss
105
+
106
+ ## Dependencies
107
+
108
+ - (Other intent IDs that must ship first)
109
+ - (ADRs that must be approved)
110
+ - (External systems/APIs)
111
+
112
+ ## GitHub issue
113
+
114
+ (Optional) Link to a GitHub issue for tracking/collaboration. Single source of truth for the link is this intent file. Use `#123` (same repo) or `owner/repo#123`.
115
+
116
+ - (e.g. `#42` or leave blank)
117
+
118
+ ## Do Not Repeat Check
119
+
120
+ Before starting, verify this hasn't been tried before:
121
+
122
+ - [ ] Checked \_system/do-not-repeat/abandoned-designs.md
123
+ - [ ] Checked \_system/do-not-repeat/failed-experiments.md
124
+ - [ ] No similar rejected approaches exist
@@ -0,0 +1,116 @@
1
+ # F-###: Title
2
+
3
+ ## Type
4
+
5
+ feature | bug | tech-debt
6
+
7
+ ## Status
8
+
9
+ planned | active | blocked | validating | shipped | killed
10
+
11
+ ## Priority
12
+
13
+ p0 | p1 | p2 | p3
14
+
15
+ ## Effort
16
+
17
+ s | m | l
18
+
19
+ ## Release Target
20
+
21
+ R1 | R2 | R3 | R4
22
+
23
+ ## Motivation
24
+
25
+ (Why it exists, 1–3 bullets — e.g. "User-reported wrong result when X; impacts Y")
26
+
27
+ ## Reproduction
28
+
29
+ - (Steps to reproduce the bug)
30
+ - (Environment/version where it occurs)
31
+ - (Optional: link to issue or ticket)
32
+
33
+ ## Root Cause
34
+
35
+ - (Brief description of cause once known)
36
+ - (Where in code or design the fault is)
37
+
38
+ ## Fix Scope
39
+
40
+ - (What will change: files, behavior, config)
41
+ - (What will NOT change — avoid scope creep)
42
+
43
+ ## Confidence
44
+
45
+ Requirements: 0.0–1.0
46
+ Domain assumptions: 0.0–1.0
47
+ (If either < threshold, document why proceeding or request human interrupt)
48
+
49
+ ## Invariants (Hard Constraints)
50
+
51
+ - No new regressions: existing tests pass; new test captures the bug and passes after fix
52
+ - (Add any other hard constraints for this fix)
53
+
54
+ Executable (add to \_system/architecture/invariants.yml if applicable):
55
+
56
+ ```yaml
57
+ invariants:
58
+ - regression_test_added: true
59
+ success_metrics:
60
+ - test_pass_rate: 99.5
61
+ ```
62
+
63
+ ## Acceptance (Executable)
64
+
65
+ These are the ONLY criteria for "done." If it can't be checked automatically, it doesn't belong here.
66
+
67
+ - [ ] Test that failed before the bug and passes after: (describe or reference test name)
68
+ - [ ] CLI: `pnpm test` green
69
+ - [ ] CLI: `pnpm lint && pnpm typecheck` green
70
+ - [ ] No new regressions: full test suite (or relevant subset) passes
71
+ - [ ] (Add bug-specific checks: e.g. repro steps no longer fail)
72
+
73
+ ## Assumptions (MUST BE EXPLICIT)
74
+
75
+ - (ex: "Root cause is in component X" — confirm before broad change?)
76
+ - (ex: "Fix does not require API contract change" — verify?)
77
+
78
+ ## Risk Level
79
+
80
+ low | medium | high
81
+
82
+ Risk triggers:
83
+
84
+ - high: auth, money, data loss, permissions, infra, PII
85
+ - medium: new dependencies, behavior change in hot path
86
+ - low: docs, refactors, tests, internal tooling
87
+
88
+ ## Kill Criteria (Stop Conditions)
89
+
90
+ - Root cause is elsewhere; fix would be a workaround only
91
+ - Fix introduces unacceptable regression or complexity
92
+ - (Add bug-specific kill criteria)
93
+
94
+ ## Rollback Plan
95
+
96
+ - Revert commit: clean revert possible (preferred for bugfixes)
97
+ - (If config/feature flag: how to disable the fix)
98
+
99
+ ## Dependencies
100
+
101
+ - (Other intent IDs that must ship first)
102
+ - (Blocking issues or environment requirements)
103
+
104
+ ## GitHub issue
105
+
106
+ (Optional) Link to a GitHub issue. Use `#123` or `owner/repo#123`.
107
+
108
+ - (e.g. `#42` or leave blank)
109
+
110
+ ## Do Not Repeat Check
111
+
112
+ Before starting, verify this hasn't been tried before:
113
+
114
+ - [ ] Checked \_system/do-not-repeat/abandoned-designs.md
115
+ - [ ] Checked \_system/do-not-repeat/failed-experiments.md
116
+ - [ ] No similar rejected approaches exist
@@ -0,0 +1,115 @@
1
+ # F-###: Title
2
+
3
+ ## Type
4
+
5
+ feature | bug | tech-debt
6
+
7
+ ## Status
8
+
9
+ planned | active | blocked | validating | shipped | killed
10
+
11
+ ## Priority
12
+
13
+ p0 | p1 | p2 | p3
14
+
15
+ ## Effort
16
+
17
+ s | m | l
18
+
19
+ ## Release Target
20
+
21
+ R1 | R2 | R3 | R4
22
+
23
+ ## Motivation
24
+
25
+ (Why it exists, 1–3 bullets)
26
+
27
+ ## Screens / Components
28
+
29
+ - (List screens or components touched)
30
+ - User-facing flows: (brief description)
31
+
32
+ ## User Flows
33
+
34
+ - (Key flows: e.g. "User logs in → sees dashboard → clicks X → Y")
35
+ - (Optional: link to wireframes or figma)
36
+
37
+ ## Accessibility
38
+
39
+ - (a11y requirements: keyboard nav, ARIA, contrast, screen reader)
40
+ - (WCAG level if applicable)
41
+
42
+ ## Confidence
43
+
44
+ Requirements: 0.0–1.0
45
+ Domain assumptions: 0.0–1.0
46
+ (If either < threshold, document why proceeding or request human interrupt)
47
+
48
+ ## Invariants (Hard Constraints)
49
+
50
+ - No regressions on core flows (existing E2E or smoke tests still pass)
51
+ - (Add feature-specific invariants)
52
+
53
+ Executable (add to \_system/architecture/invariants.yml if applicable):
54
+
55
+ ```yaml
56
+ invariants:
57
+ - core_flows_e2e_pass: true
58
+ success_metrics:
59
+ - test_pass_rate: 99.5
60
+ ```
61
+
62
+ ## Acceptance (Executable)
63
+
64
+ These are the ONLY criteria for "done." If it can't be checked automatically, it doesn't belong here.
65
+
66
+ - [ ] E2E or component tests: cover new/changed flows
67
+ - [ ] Accessibility: a11y checks pass (e.g. axe, lint)
68
+ - [ ] CLI: `pnpm test` green
69
+ - [ ] CLI: `pnpm lint && pnpm typecheck` green
70
+ - [ ] No regressions: existing core-flow tests pass
71
+
72
+ ## Assumptions (MUST BE EXPLICIT)
73
+
74
+ - (ex: "Design system components are accessible" — verify?)
75
+ - (ex: "Target browsers support feature X" — add check?)
76
+
77
+ ## Risk Level
78
+
79
+ low | medium | high
80
+
81
+ Risk triggers:
82
+
83
+ - high: auth, money, permissions, PII
84
+ - medium: new dependencies, breaking UI changes
85
+ - low: docs, refactors, tests, internal tooling
86
+
87
+ ## Kill Criteria (Stop Conditions)
88
+
89
+ - Conflicts with architecture canon
90
+ - Core flows cannot be preserved
91
+ - (Add feature-specific kill criteria)
92
+
93
+ ## Rollback Plan
94
+
95
+ - Feature flag: disable feature in UI
96
+ - Revert commit: clean revert possible
97
+
98
+ ## Dependencies
99
+
100
+ - (Other intent IDs that must ship first)
101
+ - (Design/UX sign-off if required)
102
+
103
+ ## GitHub issue
104
+
105
+ (Optional) Link to a GitHub issue. Use `#123` or `owner/repo#123`.
106
+
107
+ - (e.g. `#42` or leave blank)
108
+
109
+ ## Do Not Repeat Check
110
+
111
+ Before starting, verify this hasn't been tried before:
112
+
113
+ - [ ] Checked \_system/do-not-repeat/abandoned-designs.md
114
+ - [ ] Checked \_system/do-not-repeat/failed-experiments.md
115
+ - [ ] No similar rejected approaches exist
@@ -0,0 +1,122 @@
1
+ # F-###: Title
2
+
3
+ ## Type
4
+
5
+ feature | bug | tech-debt
6
+
7
+ ## Status
8
+
9
+ planned | active | blocked | validating | shipped | killed
10
+
11
+ ## Priority
12
+
13
+ p0 | p1 | p2 | p3
14
+
15
+ ## Effort
16
+
17
+ s | m | l
18
+
19
+ ## Release Target
20
+
21
+ R1 | R2 | R3 | R4
22
+
23
+ ## Motivation
24
+
25
+ (Why it exists, 1–3 bullets)
26
+
27
+ ## Confidence
28
+
29
+ Requirements: 0.0–1.0
30
+ Domain assumptions: 0.0–1.0
31
+ (If either < threshold, document why proceeding or request human interrupt)
32
+
33
+ ## Invariants (Hard Constraints)
34
+
35
+ Written in dual form: human-readable AND executable
36
+
37
+ Human-readable:
38
+
39
+ - No PII stored unencrypted
40
+ - p95 latency < 200ms
41
+ - Schema backward compatible for 3 versions
42
+
43
+ Executable (add to \_system/architecture/invariants.yml):
44
+
45
+ ```yaml
46
+ invariants:
47
+ - no_pii_unencrypted
48
+ - p95_latency_ms: 200
49
+ - schema_backward_compat_versions: 3
50
+ success_metrics:
51
+ - test_pass_rate: 99.5
52
+ - zero_data_loss_on_replay: true
53
+ ```
54
+
55
+ ## Acceptance (Executable)
56
+
57
+ These are the ONLY criteria for "done." If it can't be checked automatically, it doesn't belong here.
58
+
59
+ - [ ] Tests: `<test_name>` added; fails before fix, passes after
60
+ - [ ] CLI: `pnpm test` green
61
+ - [ ] CLI: `pnpm lint && pnpm typecheck` green
62
+ - [ ] Observability: metric X emitted (if applicable)
63
+ - [ ] Contract: API response matches schema (if applicable)
64
+ - [ ] Performance: p95 < budget (if applicable)
65
+
66
+ ## Assumptions (MUST BE EXPLICIT)
67
+
68
+ Every assumption is a potential bug. List them and make them testable where possible.
69
+
70
+ - (ex: "User sessions never exceed 24h" — add test?)
71
+ - (ex: "Database connection pool size is sufficient" — add monitoring?)
72
+ - (ex: "This regex handles all Unicode correctly" — add property test?)
73
+
74
+ ## Risk Level
75
+
76
+ low | medium | high
77
+
78
+ Risk triggers:
79
+
80
+ - high: auth, money, data migration, permissions, infra, PII
81
+ - medium: new dependencies, API changes, performance-sensitive
82
+ - low: docs, refactors, tests, internal tooling
83
+
84
+ ## Kill Criteria (Stop Conditions)
85
+
86
+ If ANY of these trigger, the intent is KILLED (not paused, not reworked—killed):
87
+
88
+ - Cannot satisfy latency invariant without major redesign
89
+ - Requires breaking schema compatibility beyond allowed versions
90
+ - Adds >20% complexity to core execution path
91
+ - Conflicts with architecture canon
92
+ - Requires >N days without progress (define N)
93
+ - Cost exceeds budget by >X%
94
+
95
+ ## Rollback Plan
96
+
97
+ REQUIRED before implementation begins.
98
+
99
+ - Feature flag: `FEATURE_X_ENABLED=false`
100
+ - Config toggle: revert to previous config
101
+ - Database: migration has corresponding down migration
102
+ - Revert commit: clean revert possible without data loss
103
+
104
+ ## Dependencies
105
+
106
+ - (Other intent IDs that must ship first)
107
+ - (ADRs that must be approved)
108
+ - (External systems/APIs)
109
+
110
+ ## GitHub issue
111
+
112
+ (Optional) Link to a GitHub issue for tracking/collaboration. Single source of truth for the link is this intent file. Use `#123` (same repo) or `owner/repo#123`.
113
+
114
+ - (e.g. `#42` or leave blank)
115
+
116
+ ## Do Not Repeat Check
117
+
118
+ Before starting, verify this hasn't been tried before:
119
+
120
+ - [ ] Checked \_system/do-not-repeat/abandoned-designs.md
121
+ - [ ] Checked \_system/do-not-repeat/failed-experiments.md
122
+ - [ ] No similar rejected approaches exist