mindsystem-cc 3.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/LICENSE +21 -0
- package/README.md +501 -0
- package/agents/ms-codebase-mapper.md +739 -0
- package/agents/ms-debugger.md +1184 -0
- package/agents/ms-designer.md +414 -0
- package/agents/ms-executor.md +760 -0
- package/agents/ms-integration-checker.md +423 -0
- package/agents/ms-milestone-auditor.md +448 -0
- package/agents/ms-mock-generator.md +182 -0
- package/agents/ms-plan-checker.md +746 -0
- package/agents/ms-research-synthesizer.md +248 -0
- package/agents/ms-researcher.md +962 -0
- package/agents/ms-roadmapper.md +606 -0
- package/agents/ms-verifier.md +779 -0
- package/agents/ms-verify-fixer.md +124 -0
- package/bin/install.js +296 -0
- package/commands/ms/add-phase.md +207 -0
- package/commands/ms/add-todo.md +182 -0
- package/commands/ms/audit-milestone.md +318 -0
- package/commands/ms/check-phase.md +162 -0
- package/commands/ms/check-todos.md +217 -0
- package/commands/ms/complete-milestone.md +137 -0
- package/commands/ms/create-roadmap.md +273 -0
- package/commands/ms/debug.md +149 -0
- package/commands/ms/define-requirements.md +121 -0
- package/commands/ms/design-phase.md +341 -0
- package/commands/ms/discuss-milestone.md +48 -0
- package/commands/ms/discuss-phase.md +60 -0
- package/commands/ms/do-work.md +90 -0
- package/commands/ms/execute-phase.md +289 -0
- package/commands/ms/help.md +623 -0
- package/commands/ms/insert-phase.md +227 -0
- package/commands/ms/list-phase-assumptions.md +50 -0
- package/commands/ms/map-codebase.md +71 -0
- package/commands/ms/new-milestone.md +193 -0
- package/commands/ms/new-project.md +338 -0
- package/commands/ms/pause-work.md +123 -0
- package/commands/ms/plan-milestone-gaps.md +285 -0
- package/commands/ms/plan-phase.md +105 -0
- package/commands/ms/progress.md +370 -0
- package/commands/ms/remove-phase.md +338 -0
- package/commands/ms/research-phase.md +175 -0
- package/commands/ms/research-project.md +339 -0
- package/commands/ms/resume-work.md +40 -0
- package/commands/ms/review-design.md +484 -0
- package/commands/ms/simplify-flutter.md +193 -0
- package/commands/ms/update.md +159 -0
- package/commands/ms/verify-work.md +92 -0
- package/commands/ms/whats-new.md +124 -0
- package/mindsystem/references/checkpoints.md +788 -0
- package/mindsystem/references/continuation-format.md +255 -0
- package/mindsystem/references/debugging/debugging-mindset.md +11 -0
- package/mindsystem/references/debugging/hypothesis-testing.md +11 -0
- package/mindsystem/references/debugging/investigation-techniques.md +11 -0
- package/mindsystem/references/debugging/verification-patterns.md +11 -0
- package/mindsystem/references/debugging/when-to-research.md +11 -0
- package/mindsystem/references/git-integration.md +254 -0
- package/mindsystem/references/goal-backward.md +286 -0
- package/mindsystem/references/mock-patterns.md +294 -0
- package/mindsystem/references/plan-format.md +473 -0
- package/mindsystem/references/principles.md +73 -0
- package/mindsystem/references/questioning.md +140 -0
- package/mindsystem/references/research-pitfalls.md +233 -0
- package/mindsystem/references/scope-estimation.md +256 -0
- package/mindsystem/references/tdd.md +263 -0
- package/mindsystem/references/verification-patterns.md +595 -0
- package/mindsystem/templates/DEBUG.md +159 -0
- package/mindsystem/templates/UAT.md +403 -0
- package/mindsystem/templates/adhoc-summary.md +153 -0
- package/mindsystem/templates/codebase/architecture.md +255 -0
- package/mindsystem/templates/codebase/concerns.md +310 -0
- package/mindsystem/templates/codebase/conventions.md +307 -0
- package/mindsystem/templates/codebase/integrations.md +280 -0
- package/mindsystem/templates/codebase/stack.md +186 -0
- package/mindsystem/templates/codebase/structure.md +285 -0
- package/mindsystem/templates/codebase/testing.md +480 -0
- package/mindsystem/templates/config.json +26 -0
- package/mindsystem/templates/context.md +140 -0
- package/mindsystem/templates/continue-here.md +78 -0
- package/mindsystem/templates/debug-subagent-prompt.md +91 -0
- package/mindsystem/templates/design-iteration.md +208 -0
- package/mindsystem/templates/design.md +417 -0
- package/mindsystem/templates/discovery.md +146 -0
- package/mindsystem/templates/milestone-archive.md +123 -0
- package/mindsystem/templates/milestone-context.md +93 -0
- package/mindsystem/templates/milestone.md +115 -0
- package/mindsystem/templates/phase-prompt.md +574 -0
- package/mindsystem/templates/project.md +184 -0
- package/mindsystem/templates/requirements.md +231 -0
- package/mindsystem/templates/research-project/ARCHITECTURE.md +204 -0
- package/mindsystem/templates/research-project/FEATURES.md +147 -0
- package/mindsystem/templates/research-project/PITFALLS.md +200 -0
- package/mindsystem/templates/research-project/STACK.md +120 -0
- package/mindsystem/templates/research-project/SUMMARY.md +170 -0
- package/mindsystem/templates/research-subagent-prompt.md +92 -0
- package/mindsystem/templates/research.md +529 -0
- package/mindsystem/templates/roadmap.md +214 -0
- package/mindsystem/templates/state.md +224 -0
- package/mindsystem/templates/summary.md +269 -0
- package/mindsystem/templates/user-setup.md +323 -0
- package/mindsystem/templates/verification-report.md +322 -0
- package/mindsystem/workflows/complete-milestone.md +759 -0
- package/mindsystem/workflows/create-milestone.md +203 -0
- package/mindsystem/workflows/debug.md +14 -0
- package/mindsystem/workflows/define-requirements.md +330 -0
- package/mindsystem/workflows/diagnose-issues.md +241 -0
- package/mindsystem/workflows/discovery-phase.md +293 -0
- package/mindsystem/workflows/discuss-milestone.md +310 -0
- package/mindsystem/workflows/discuss-phase.md +237 -0
- package/mindsystem/workflows/do-work.md +359 -0
- package/mindsystem/workflows/execute-phase.md +644 -0
- package/mindsystem/workflows/execute-plan.md +1828 -0
- package/mindsystem/workflows/generate-mocks.md +187 -0
- package/mindsystem/workflows/list-phase-assumptions.md +178 -0
- package/mindsystem/workflows/map-codebase.md +289 -0
- package/mindsystem/workflows/plan-phase.md +876 -0
- package/mindsystem/workflows/research-phase.md +17 -0
- package/mindsystem/workflows/research-project.md +23 -0
- package/mindsystem/workflows/resume-project.md +311 -0
- package/mindsystem/workflows/transition.md +564 -0
- package/mindsystem/workflows/verify-phase.md +629 -0
- package/mindsystem/workflows/verify-work.md +823 -0
- package/package.json +32 -0
- package/scripts/generate-phase-patch.sh +169 -0
- package/scripts/ms-lookup/README.md +112 -0
- package/scripts/ms-lookup/ms_lookup/__init__.py +3 -0
- package/scripts/ms-lookup/ms_lookup/__main__.py +6 -0
- package/scripts/ms-lookup/ms_lookup/backends/__init__.py +6 -0
- package/scripts/ms-lookup/ms_lookup/backends/context7.py +219 -0
- package/scripts/ms-lookup/ms_lookup/backends/perplexity.py +145 -0
- package/scripts/ms-lookup/ms_lookup/cache.py +48 -0
- package/scripts/ms-lookup/ms_lookup/cli.py +219 -0
- package/scripts/ms-lookup/ms_lookup/config.py +23 -0
- package/scripts/ms-lookup/ms_lookup/errors.py +24 -0
- package/scripts/ms-lookup/ms_lookup/output.py +49 -0
- package/scripts/ms-lookup/ms_lookup/tokens.py +56 -0
- package/scripts/ms-lookup/pyproject.toml +17 -0
- package/scripts/ms-lookup/uv.lock +207 -0
- package/scripts/ms-lookup-wrapper.sh +21 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# Debug Template
|
|
2
|
+
|
|
3
|
+
Template for `.planning/debug/[slug].md` — active debug session tracking.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## File Template
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
---
|
|
11
|
+
status: gathering | investigating | fixing | verifying | resolved
|
|
12
|
+
trigger: "[verbatim user input]"
|
|
13
|
+
created: [ISO timestamp]
|
|
14
|
+
updated: [ISO timestamp]
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Current Focus
|
|
18
|
+
<!-- OVERWRITE on each update - always reflects NOW -->
|
|
19
|
+
|
|
20
|
+
hypothesis: [current theory being tested]
|
|
21
|
+
test: [how testing it]
|
|
22
|
+
expecting: [what result means if true/false]
|
|
23
|
+
next_action: [immediate next step]
|
|
24
|
+
|
|
25
|
+
## Symptoms
|
|
26
|
+
<!-- Written during gathering, then immutable -->
|
|
27
|
+
|
|
28
|
+
expected: [what should happen]
|
|
29
|
+
actual: [what actually happens]
|
|
30
|
+
errors: [error messages if any]
|
|
31
|
+
reproduction: [how to trigger]
|
|
32
|
+
started: [when it broke / always broken]
|
|
33
|
+
|
|
34
|
+
## Eliminated
|
|
35
|
+
<!-- APPEND only - prevents re-investigating after /clear -->
|
|
36
|
+
|
|
37
|
+
- hypothesis: [theory that was wrong]
|
|
38
|
+
evidence: [what disproved it]
|
|
39
|
+
timestamp: [when eliminated]
|
|
40
|
+
|
|
41
|
+
## Evidence
|
|
42
|
+
<!-- APPEND only - facts discovered during investigation -->
|
|
43
|
+
|
|
44
|
+
- timestamp: [when found]
|
|
45
|
+
checked: [what was examined]
|
|
46
|
+
found: [what was observed]
|
|
47
|
+
implication: [what this means]
|
|
48
|
+
|
|
49
|
+
## Resolution
|
|
50
|
+
<!-- OVERWRITE as understanding evolves -->
|
|
51
|
+
|
|
52
|
+
root_cause: [empty until found]
|
|
53
|
+
fix: [empty until applied]
|
|
54
|
+
verification: [empty until verified]
|
|
55
|
+
files_changed: []
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
<section_rules>
|
|
61
|
+
|
|
62
|
+
**Frontmatter (status, trigger, timestamps):**
|
|
63
|
+
- `status`: OVERWRITE - reflects current phase
|
|
64
|
+
- `trigger`: IMMUTABLE - verbatim user input, never changes
|
|
65
|
+
- `created`: IMMUTABLE - set once
|
|
66
|
+
- `updated`: OVERWRITE - update on every change
|
|
67
|
+
|
|
68
|
+
**Current Focus:**
|
|
69
|
+
- OVERWRITE entirely on each update
|
|
70
|
+
- Always reflects what Claude is doing RIGHT NOW
|
|
71
|
+
- If Claude reads this after /clear, it knows exactly where to resume
|
|
72
|
+
- Fields: hypothesis, test, expecting, next_action
|
|
73
|
+
|
|
74
|
+
**Symptoms:**
|
|
75
|
+
- Written during initial gathering phase
|
|
76
|
+
- IMMUTABLE after gathering complete
|
|
77
|
+
- Reference point for what we're trying to fix
|
|
78
|
+
- Fields: expected, actual, errors, reproduction, started
|
|
79
|
+
|
|
80
|
+
**Eliminated:**
|
|
81
|
+
- APPEND only - never remove entries
|
|
82
|
+
- Prevents re-investigating dead ends after context reset
|
|
83
|
+
- Each entry: hypothesis, evidence that disproved it, timestamp
|
|
84
|
+
- Critical for efficiency across /clear boundaries
|
|
85
|
+
|
|
86
|
+
**Evidence:**
|
|
87
|
+
- APPEND only - never remove entries
|
|
88
|
+
- Facts discovered during investigation
|
|
89
|
+
- Each entry: timestamp, what checked, what found, implication
|
|
90
|
+
- Builds the case for root cause
|
|
91
|
+
|
|
92
|
+
**Resolution:**
|
|
93
|
+
- OVERWRITE as understanding evolves
|
|
94
|
+
- May update multiple times as fixes are tried
|
|
95
|
+
- Final state shows confirmed root cause and verified fix
|
|
96
|
+
- Fields: root_cause, fix, verification, files_changed
|
|
97
|
+
|
|
98
|
+
</section_rules>
|
|
99
|
+
|
|
100
|
+
<lifecycle>
|
|
101
|
+
|
|
102
|
+
**Creation:** Immediately when /ms:debug is called
|
|
103
|
+
- Create file with trigger from user input
|
|
104
|
+
- Set status to "gathering"
|
|
105
|
+
- Current Focus: next_action = "gather symptoms"
|
|
106
|
+
- Symptoms: empty, to be filled
|
|
107
|
+
|
|
108
|
+
**During symptom gathering:**
|
|
109
|
+
- Update Symptoms section as user answers questions
|
|
110
|
+
- Update Current Focus with each question
|
|
111
|
+
- When complete: status → "investigating"
|
|
112
|
+
|
|
113
|
+
**During investigation:**
|
|
114
|
+
- OVERWRITE Current Focus with each hypothesis
|
|
115
|
+
- APPEND to Evidence with each finding
|
|
116
|
+
- APPEND to Eliminated when hypothesis disproved
|
|
117
|
+
- Update timestamp in frontmatter
|
|
118
|
+
|
|
119
|
+
**During fixing:**
|
|
120
|
+
- status → "fixing"
|
|
121
|
+
- Update Resolution.root_cause when confirmed
|
|
122
|
+
- Update Resolution.fix when applied
|
|
123
|
+
- Update Resolution.files_changed
|
|
124
|
+
|
|
125
|
+
**During verification:**
|
|
126
|
+
- status → "verifying"
|
|
127
|
+
- Update Resolution.verification with results
|
|
128
|
+
- If verification fails: status → "investigating", try again
|
|
129
|
+
|
|
130
|
+
**On resolution:**
|
|
131
|
+
- status → "resolved"
|
|
132
|
+
- Move file to .planning/debug/resolved/
|
|
133
|
+
|
|
134
|
+
</lifecycle>
|
|
135
|
+
|
|
136
|
+
<resume_behavior>
|
|
137
|
+
|
|
138
|
+
When Claude reads this file after /clear:
|
|
139
|
+
|
|
140
|
+
1. Parse frontmatter → know status
|
|
141
|
+
2. Read Current Focus → know exactly what was happening
|
|
142
|
+
3. Read Eliminated → know what NOT to retry
|
|
143
|
+
4. Read Evidence → know what's been learned
|
|
144
|
+
5. Continue from next_action
|
|
145
|
+
|
|
146
|
+
The file IS the debugging brain. Claude should be able to resume perfectly from any interruption point.
|
|
147
|
+
|
|
148
|
+
</resume_behavior>
|
|
149
|
+
|
|
150
|
+
<size_constraint>
|
|
151
|
+
|
|
152
|
+
Keep debug files focused:
|
|
153
|
+
- Evidence entries: 1-2 lines each, just the facts
|
|
154
|
+
- Eliminated: brief - hypothesis + why it failed
|
|
155
|
+
- No narrative prose - structured data only
|
|
156
|
+
|
|
157
|
+
If evidence grows very large (10+ entries), consider whether you're going in circles. Check Eliminated to ensure you're not re-treading.
|
|
158
|
+
|
|
159
|
+
</size_constraint>
|
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
# UAT Template
|
|
2
|
+
|
|
3
|
+
Template for `.planning/phases/XX-name/{phase}-UAT.md` — persistent UAT session tracking with mock support and inline fixing.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## File Template
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
---
|
|
11
|
+
status: testing | fixing | complete
|
|
12
|
+
phase: XX-name
|
|
13
|
+
source: [list of SUMMARY.md files tested]
|
|
14
|
+
started: [ISO timestamp]
|
|
15
|
+
updated: [ISO timestamp]
|
|
16
|
+
current_batch: [N]
|
|
17
|
+
mock_stash: [stash name or null]
|
|
18
|
+
pre_work_stash: [stash name or null]
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Progress
|
|
22
|
+
|
|
23
|
+
total: [N]
|
|
24
|
+
tested: [N]
|
|
25
|
+
passed: [N]
|
|
26
|
+
issues: [N]
|
|
27
|
+
fixing: [N]
|
|
28
|
+
pending: [N]
|
|
29
|
+
skipped: [N]
|
|
30
|
+
|
|
31
|
+
## Current Batch
|
|
32
|
+
|
|
33
|
+
batch: [N] of [total]
|
|
34
|
+
name: "[batch name]"
|
|
35
|
+
mock_type: [type or null]
|
|
36
|
+
tests: [list of test numbers]
|
|
37
|
+
status: pending | testing | complete
|
|
38
|
+
|
|
39
|
+
## Tests
|
|
40
|
+
|
|
41
|
+
### 1. [Test Name]
|
|
42
|
+
expected: [observable behavior - what user should see]
|
|
43
|
+
mock_required: [true/false]
|
|
44
|
+
mock_type: [type or null]
|
|
45
|
+
result: [pending]
|
|
46
|
+
|
|
47
|
+
### 2. [Test Name]
|
|
48
|
+
expected: [observable behavior]
|
|
49
|
+
mock_required: false
|
|
50
|
+
mock_type: null
|
|
51
|
+
result: pass
|
|
52
|
+
|
|
53
|
+
### 3. [Test Name]
|
|
54
|
+
expected: [observable behavior]
|
|
55
|
+
mock_required: true
|
|
56
|
+
mock_type: error_state
|
|
57
|
+
result: issue
|
|
58
|
+
reported: "[verbatim user response]"
|
|
59
|
+
severity: major
|
|
60
|
+
fix_status: [investigating | applied | verified]
|
|
61
|
+
fix_commit: [hash or null]
|
|
62
|
+
retry_count: [0-2]
|
|
63
|
+
|
|
64
|
+
### 4. [Test Name]
|
|
65
|
+
expected: [observable behavior]
|
|
66
|
+
mock_required: false
|
|
67
|
+
mock_type: null
|
|
68
|
+
result: blocked
|
|
69
|
+
|
|
70
|
+
### 5. [Test Name]
|
|
71
|
+
expected: [observable behavior]
|
|
72
|
+
mock_required: true
|
|
73
|
+
mock_type: premium_user
|
|
74
|
+
result: skipped
|
|
75
|
+
reason: [why couldn't be tested]
|
|
76
|
+
|
|
77
|
+
...
|
|
78
|
+
|
|
79
|
+
## Fixes Applied
|
|
80
|
+
|
|
81
|
+
- commit: [hash]
|
|
82
|
+
test: [N]
|
|
83
|
+
description: "[what was fixed]"
|
|
84
|
+
files: [list of changed files]
|
|
85
|
+
|
|
86
|
+
- commit: [hash]
|
|
87
|
+
test: [N]
|
|
88
|
+
description: "[what was fixed]"
|
|
89
|
+
files: [list of changed files]
|
|
90
|
+
|
|
91
|
+
## Batches
|
|
92
|
+
|
|
93
|
+
### Batch 1: No Mocks Required
|
|
94
|
+
tests: [1, 2, 3]
|
|
95
|
+
status: complete
|
|
96
|
+
mock_type: null
|
|
97
|
+
passed: 3
|
|
98
|
+
issues: 0
|
|
99
|
+
|
|
100
|
+
### Batch 2: Error States
|
|
101
|
+
tests: [4, 5, 6, 7]
|
|
102
|
+
status: in_progress
|
|
103
|
+
mock_type: error_state
|
|
104
|
+
passed: 1
|
|
105
|
+
issues: 1
|
|
106
|
+
|
|
107
|
+
### Batch 3: Premium Features
|
|
108
|
+
tests: [8, 9, 10]
|
|
109
|
+
status: pending
|
|
110
|
+
mock_type: premium_user
|
|
111
|
+
|
|
112
|
+
### Batch 4: Empty States
|
|
113
|
+
tests: [11, 12]
|
|
114
|
+
status: pending
|
|
115
|
+
mock_type: empty_response
|
|
116
|
+
|
|
117
|
+
## Assumptions
|
|
118
|
+
|
|
119
|
+
- test: [N]
|
|
120
|
+
name: "[Test Name]"
|
|
121
|
+
expected: "[what should happen]"
|
|
122
|
+
reason: "[why it couldn't be tested]"
|
|
123
|
+
|
|
124
|
+
- test: [N]
|
|
125
|
+
name: "[Test Name]"
|
|
126
|
+
expected: "[what should happen]"
|
|
127
|
+
reason: "[user-provided reason when skipping batch]"
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
<section_rules>
|
|
133
|
+
|
|
134
|
+
**Frontmatter:**
|
|
135
|
+
- `status`: OVERWRITE - "testing", "fixing", or "complete"
|
|
136
|
+
- `phase`: IMMUTABLE - set on creation
|
|
137
|
+
- `source`: IMMUTABLE - SUMMARY files being tested
|
|
138
|
+
- `started`: IMMUTABLE - set on creation
|
|
139
|
+
- `updated`: OVERWRITE - update on every change
|
|
140
|
+
- `current_batch`: OVERWRITE - current batch number
|
|
141
|
+
- `mock_stash`: OVERWRITE - name of stashed mocks or null
|
|
142
|
+
- `pre_work_stash`: OVERWRITE - user's pre-existing work stash or null
|
|
143
|
+
|
|
144
|
+
**Progress:**
|
|
145
|
+
- OVERWRITE after each test result or fix
|
|
146
|
+
- Tracks: total, tested, passed, issues, fixing, pending, skipped
|
|
147
|
+
|
|
148
|
+
**Current Batch:**
|
|
149
|
+
- OVERWRITE entirely on batch transitions
|
|
150
|
+
- Shows which batch is active
|
|
151
|
+
|
|
152
|
+
**Tests:**
|
|
153
|
+
- Each test: OVERWRITE result/fix fields when status changes
|
|
154
|
+
- `result` values: [pending], pass, issue, blocked, skipped
|
|
155
|
+
- If issue: add `reported` (verbatim), `severity` (inferred), `fix_status`, `fix_commit`, `retry_count`
|
|
156
|
+
- If blocked: no additional fields (will be re-tested)
|
|
157
|
+
- If skipped: add `reason`
|
|
158
|
+
|
|
159
|
+
**Fixes Applied:**
|
|
160
|
+
- APPEND only when fix committed
|
|
161
|
+
- Records commit hash, test number, description, files
|
|
162
|
+
|
|
163
|
+
**Batches:**
|
|
164
|
+
- Each batch: OVERWRITE status and counts as batch progresses
|
|
165
|
+
- Tracks: tests, status, mock_type, passed, issues
|
|
166
|
+
|
|
167
|
+
**Assumptions:**
|
|
168
|
+
- APPEND when test is skipped
|
|
169
|
+
- Records test number, name, expected behavior, reason
|
|
170
|
+
|
|
171
|
+
</section_rules>
|
|
172
|
+
|
|
173
|
+
<fix_lifecycle>
|
|
174
|
+
|
|
175
|
+
**When issue reported:**
|
|
176
|
+
1. result → "issue"
|
|
177
|
+
2. Add `reported`, `severity`
|
|
178
|
+
3. Add `fix_status: investigating`, `retry_count: 0`
|
|
179
|
+
|
|
180
|
+
**When fix committed:**
|
|
181
|
+
4. `fix_status: applied`
|
|
182
|
+
5. `fix_commit: {hash}`
|
|
183
|
+
6. Append to "Fixes Applied" section
|
|
184
|
+
|
|
185
|
+
**When re-test passes:**
|
|
186
|
+
7. result → "pass"
|
|
187
|
+
8. `fix_status: verified`
|
|
188
|
+
|
|
189
|
+
**When re-test fails:**
|
|
190
|
+
9. Increment `retry_count`
|
|
191
|
+
10. If `retry_count >= 2`: offer skip/escalate options
|
|
192
|
+
11. If user chooses skip: result → "skipped", add reason
|
|
193
|
+
|
|
194
|
+
</fix_lifecycle>
|
|
195
|
+
|
|
196
|
+
<mock_lifecycle>
|
|
197
|
+
|
|
198
|
+
**When batch needs mocks:**
|
|
199
|
+
1. Generate mock files (uncommitted)
|
|
200
|
+
2. User enables mocks
|
|
201
|
+
3. Testing proceeds
|
|
202
|
+
|
|
203
|
+
**When fix needed:**
|
|
204
|
+
1. `git stash push -m "mocks-batch-N"`
|
|
205
|
+
2. Update `mock_stash` in frontmatter
|
|
206
|
+
3. Fix applied, committed
|
|
207
|
+
4. `git stash pop` to restore mocks
|
|
208
|
+
5. Clear `mock_stash` if no conflicts
|
|
209
|
+
|
|
210
|
+
**On batch transition (different mock_type):**
|
|
211
|
+
1. Discard old mocks: `git stash drop`
|
|
212
|
+
2. Generate new mocks for new batch
|
|
213
|
+
|
|
214
|
+
**On session complete:**
|
|
215
|
+
1. Discard all mocks: `git stash drop`
|
|
216
|
+
2. Restore pre_work_stash if exists
|
|
217
|
+
|
|
218
|
+
</mock_lifecycle>
|
|
219
|
+
|
|
220
|
+
<resume_behavior>
|
|
221
|
+
|
|
222
|
+
On `/ms:verify-work` with existing UAT.md:
|
|
223
|
+
|
|
224
|
+
1. Check `status`:
|
|
225
|
+
- "complete" → offer to re-run or view results
|
|
226
|
+
- "testing" or "fixing" → resume
|
|
227
|
+
|
|
228
|
+
2. Check `mock_stash`:
|
|
229
|
+
- If exists, offer to restore or discard
|
|
230
|
+
|
|
231
|
+
3. Check `current_batch`:
|
|
232
|
+
- Resume from that batch
|
|
233
|
+
|
|
234
|
+
4. Check for tests with `fix_status: investigating` or `fix_status: applied`:
|
|
235
|
+
- Resume fix/re-test flow for those
|
|
236
|
+
|
|
237
|
+
5. Present remaining tests in current batch
|
|
238
|
+
|
|
239
|
+
</resume_behavior>
|
|
240
|
+
|
|
241
|
+
<severity_guide>
|
|
242
|
+
|
|
243
|
+
Severity is INFERRED from user's natural language, never asked.
|
|
244
|
+
|
|
245
|
+
| User describes | Infer |
|
|
246
|
+
|----------------|-------|
|
|
247
|
+
| Crash, error, exception, fails completely, unusable | blocker |
|
|
248
|
+
| Doesn't work, nothing happens, wrong behavior, missing | major |
|
|
249
|
+
| Works but..., slow, weird, off, minor, small | minor |
|
|
250
|
+
| Color, font, spacing, alignment, looks off | cosmetic |
|
|
251
|
+
|
|
252
|
+
Default: **major** (safe default, user can clarify if wrong)
|
|
253
|
+
|
|
254
|
+
</severity_guide>
|
|
255
|
+
|
|
256
|
+
<good_example>
|
|
257
|
+
```markdown
|
|
258
|
+
---
|
|
259
|
+
status: fixing
|
|
260
|
+
phase: 04-comments
|
|
261
|
+
source: 04-01-SUMMARY.md, 04-02-SUMMARY.md
|
|
262
|
+
started: 2025-01-15T10:30:00Z
|
|
263
|
+
updated: 2025-01-15T11:15:00Z
|
|
264
|
+
current_batch: 2
|
|
265
|
+
mock_stash: mocks-batch-2
|
|
266
|
+
pre_work_stash: null
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## Progress
|
|
270
|
+
|
|
271
|
+
total: 12
|
|
272
|
+
tested: 7
|
|
273
|
+
passed: 5
|
|
274
|
+
issues: 1
|
|
275
|
+
fixing: 1
|
|
276
|
+
pending: 5
|
|
277
|
+
skipped: 0
|
|
278
|
+
|
|
279
|
+
## Current Batch
|
|
280
|
+
|
|
281
|
+
batch: 2 of 4
|
|
282
|
+
name: "Error States"
|
|
283
|
+
mock_type: error_state
|
|
284
|
+
tests: [4, 5, 6, 7]
|
|
285
|
+
status: testing
|
|
286
|
+
|
|
287
|
+
## Tests
|
|
288
|
+
|
|
289
|
+
### 1. View Comments on Post
|
|
290
|
+
expected: Comments section expands, shows count and comment list
|
|
291
|
+
mock_required: false
|
|
292
|
+
mock_type: null
|
|
293
|
+
result: pass
|
|
294
|
+
|
|
295
|
+
### 2. Create Top-Level Comment
|
|
296
|
+
expected: Submit comment via rich text editor, appears in list with author info
|
|
297
|
+
mock_required: false
|
|
298
|
+
mock_type: null
|
|
299
|
+
result: pass
|
|
300
|
+
|
|
301
|
+
### 3. Reply to a Comment
|
|
302
|
+
expected: Click Reply, inline composer appears, submit shows nested reply
|
|
303
|
+
mock_required: false
|
|
304
|
+
mock_type: null
|
|
305
|
+
result: pass
|
|
306
|
+
|
|
307
|
+
### 4. Login Error Message
|
|
308
|
+
expected: Invalid credentials show "Invalid email or password" message
|
|
309
|
+
mock_required: true
|
|
310
|
+
mock_type: error_state
|
|
311
|
+
result: issue
|
|
312
|
+
reported: "Shows 'Something went wrong' instead of specific error"
|
|
313
|
+
severity: major
|
|
314
|
+
fix_status: applied
|
|
315
|
+
fix_commit: abc123f
|
|
316
|
+
retry_count: 0
|
|
317
|
+
|
|
318
|
+
### 5. Network Error Handling
|
|
319
|
+
expected: No connection shows "Check your internet connection" with retry button
|
|
320
|
+
mock_required: true
|
|
321
|
+
mock_type: error_state
|
|
322
|
+
result: [pending]
|
|
323
|
+
|
|
324
|
+
### 6. Server Error Display
|
|
325
|
+
expected: 500 error shows "Try again later" message
|
|
326
|
+
mock_required: true
|
|
327
|
+
mock_type: error_state
|
|
328
|
+
result: [pending]
|
|
329
|
+
|
|
330
|
+
### 7. Rate Limit Message
|
|
331
|
+
expected: Too many requests shows "Too many attempts" with countdown
|
|
332
|
+
mock_required: true
|
|
333
|
+
mock_type: error_state
|
|
334
|
+
result: [pending]
|
|
335
|
+
|
|
336
|
+
### 8. Premium Badge Display
|
|
337
|
+
expected: Premium users show gold badge on profile
|
|
338
|
+
mock_required: true
|
|
339
|
+
mock_type: premium_user
|
|
340
|
+
result: [pending]
|
|
341
|
+
|
|
342
|
+
### 9. Premium Feature Access
|
|
343
|
+
expected: Premium features accessible, non-premium shows upgrade prompt
|
|
344
|
+
mock_required: true
|
|
345
|
+
mock_type: premium_user
|
|
346
|
+
result: [pending]
|
|
347
|
+
|
|
348
|
+
### 10. Subscription Status
|
|
349
|
+
expected: Account page shows current subscription tier and expiry
|
|
350
|
+
mock_required: true
|
|
351
|
+
mock_type: premium_user
|
|
352
|
+
result: [pending]
|
|
353
|
+
|
|
354
|
+
### 11. Empty Comments List
|
|
355
|
+
expected: Post with no comments shows "No comments yet" placeholder
|
|
356
|
+
mock_required: true
|
|
357
|
+
mock_type: empty_response
|
|
358
|
+
result: [pending]
|
|
359
|
+
|
|
360
|
+
### 12. Empty Search Results
|
|
361
|
+
expected: Search with no matches shows "No results found" with suggestions
|
|
362
|
+
mock_required: true
|
|
363
|
+
mock_type: empty_response
|
|
364
|
+
result: [pending]
|
|
365
|
+
|
|
366
|
+
## Fixes Applied
|
|
367
|
+
|
|
368
|
+
- commit: abc123f
|
|
369
|
+
test: 4
|
|
370
|
+
description: "Display actual error message from API response"
|
|
371
|
+
files: [src/components/ErrorBanner.tsx]
|
|
372
|
+
|
|
373
|
+
## Batches
|
|
374
|
+
|
|
375
|
+
### Batch 1: No Mocks Required
|
|
376
|
+
tests: [1, 2, 3]
|
|
377
|
+
status: complete
|
|
378
|
+
mock_type: null
|
|
379
|
+
passed: 3
|
|
380
|
+
issues: 0
|
|
381
|
+
|
|
382
|
+
### Batch 2: Error States
|
|
383
|
+
tests: [4, 5, 6, 7]
|
|
384
|
+
status: in_progress
|
|
385
|
+
mock_type: error_state
|
|
386
|
+
passed: 0
|
|
387
|
+
issues: 1
|
|
388
|
+
|
|
389
|
+
### Batch 3: Premium Features
|
|
390
|
+
tests: [8, 9, 10]
|
|
391
|
+
status: pending
|
|
392
|
+
mock_type: premium_user
|
|
393
|
+
|
|
394
|
+
### Batch 4: Empty States
|
|
395
|
+
tests: [11, 12]
|
|
396
|
+
status: pending
|
|
397
|
+
mock_type: empty_response
|
|
398
|
+
|
|
399
|
+
## Assumptions
|
|
400
|
+
|
|
401
|
+
[none yet]
|
|
402
|
+
```
|
|
403
|
+
</good_example>
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# Adhoc Summary Template
|
|
2
|
+
|
|
3
|
+
Template for `.planning/adhoc/{timestamp}-{slug}-SUMMARY.md` — documentation for small work items executed via `/ms:do-work`.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## File Template
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
---
|
|
11
|
+
type: adhoc
|
|
12
|
+
description: [user's original description]
|
|
13
|
+
completed: [ISO timestamp]
|
|
14
|
+
duration: [X min]
|
|
15
|
+
related_phase: [current phase from STATE.md, or "none"]
|
|
16
|
+
files_modified:
|
|
17
|
+
- [path/to/file1.ts]
|
|
18
|
+
- [path/to/file2.ts]
|
|
19
|
+
commit: [git hash]
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# Adhoc: [Description]
|
|
23
|
+
|
|
24
|
+
**[Substantive one-liner describing what was done]**
|
|
25
|
+
|
|
26
|
+
## What Was Done
|
|
27
|
+
|
|
28
|
+
- [Most important outcome]
|
|
29
|
+
- [Second accomplishment if applicable]
|
|
30
|
+
|
|
31
|
+
## Files Modified
|
|
32
|
+
|
|
33
|
+
- `[path/to/file.ts]`: [what changed]
|
|
34
|
+
- `[path/to/other.ts]`: [what changed]
|
|
35
|
+
|
|
36
|
+
## Verification
|
|
37
|
+
|
|
38
|
+
- [what was verified]: [result]
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
<purpose>
|
|
42
|
+
|
|
43
|
+
Adhoc summaries document small work items executed outside the normal phase workflow.
|
|
44
|
+
|
|
45
|
+
**Differences from phase SUMMARY.md:**
|
|
46
|
+
- Simplified frontmatter (no waves, depends_on, subsystem, tags)
|
|
47
|
+
- No dependency graph (adhoc work is isolated by design)
|
|
48
|
+
- No "Next Phase Readiness" (not part of phase sequence)
|
|
49
|
+
- No deviations section (adhoc work is already unplanned)
|
|
50
|
+
|
|
51
|
+
**Purpose:**
|
|
52
|
+
- Audit trail for quick fixes
|
|
53
|
+
- Context for future sessions (what was done between phases)
|
|
54
|
+
- Git commit documentation
|
|
55
|
+
|
|
56
|
+
</purpose>
|
|
57
|
+
|
|
58
|
+
<frontmatter_fields>
|
|
59
|
+
|
|
60
|
+
| Field | Required | Description |
|
|
61
|
+
|-------|----------|-------------|
|
|
62
|
+
| type | Yes | Always "adhoc" |
|
|
63
|
+
| description | Yes | User's original work description |
|
|
64
|
+
| completed | Yes | ISO timestamp when work completed |
|
|
65
|
+
| duration | Yes | Time spent (e.g., "12 min") |
|
|
66
|
+
| related_phase | Yes | Current phase from STATE.md, or "none" if between phases |
|
|
67
|
+
| files_modified | Yes | List of file paths changed |
|
|
68
|
+
| commit | Yes | Git commit hash |
|
|
69
|
+
|
|
70
|
+
</frontmatter_fields>
|
|
71
|
+
|
|
72
|
+
<one_liner_rules>
|
|
73
|
+
|
|
74
|
+
The one-liner MUST be substantive:
|
|
75
|
+
|
|
76
|
+
**Good:**
|
|
77
|
+
- "Added null check to prevent crash on empty user array"
|
|
78
|
+
- "Fixed auth token refresh by handling 401 in interceptor"
|
|
79
|
+
- "Added missing index on user_id for query performance"
|
|
80
|
+
|
|
81
|
+
**Bad:**
|
|
82
|
+
- "Fixed the bug"
|
|
83
|
+
- "Made it work"
|
|
84
|
+
- "Quick fix"
|
|
85
|
+
|
|
86
|
+
The one-liner should tell someone what actually changed.
|
|
87
|
+
|
|
88
|
+
</one_liner_rules>
|
|
89
|
+
|
|
90
|
+
<example>
|
|
91
|
+
|
|
92
|
+
```markdown
|
|
93
|
+
---
|
|
94
|
+
type: adhoc
|
|
95
|
+
description: Fix auth token not refreshing on 401
|
|
96
|
+
completed: 2026-01-20T14:32:00Z
|
|
97
|
+
duration: 8 min
|
|
98
|
+
related_phase: 03-user-dashboard
|
|
99
|
+
files_modified:
|
|
100
|
+
- src/lib/api-client.ts
|
|
101
|
+
- src/hooks/useAuth.ts
|
|
102
|
+
commit: abc123f
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
# Adhoc: Fix auth token not refreshing on 401
|
|
106
|
+
|
|
107
|
+
**Added 401 response interceptor to trigger token refresh before retrying failed request**
|
|
108
|
+
|
|
109
|
+
## What Was Done
|
|
110
|
+
|
|
111
|
+
- Added response interceptor in api-client.ts to catch 401 errors
|
|
112
|
+
- Integrated with useAuth hook to call refresh token endpoint
|
|
113
|
+
- Added retry logic for original request after successful refresh
|
|
114
|
+
|
|
115
|
+
## Files Modified
|
|
116
|
+
|
|
117
|
+
- `src/lib/api-client.ts`: Added response interceptor with 401 handling
|
|
118
|
+
- `src/hooks/useAuth.ts`: Exposed refreshToken function for interceptor use
|
|
119
|
+
|
|
120
|
+
## Verification
|
|
121
|
+
|
|
122
|
+
- Manually tested: Token expires → 401 → refresh triggered → request succeeds
|
|
123
|
+
- No console errors during token refresh flow
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
</example>
|
|
127
|
+
|
|
128
|
+
<guidelines>
|
|
129
|
+
|
|
130
|
+
**When to create:**
|
|
131
|
+
- After completing adhoc work via `/ms:do-work`
|
|
132
|
+
- Required output from do-work workflow
|
|
133
|
+
|
|
134
|
+
**Size:**
|
|
135
|
+
- Keep brief — adhoc work is small by definition
|
|
136
|
+
- 1-2 accomplishments typical
|
|
137
|
+
- 1-3 files typical
|
|
138
|
+
|
|
139
|
+
**Commit reference:**
|
|
140
|
+
- Always include commit hash in frontmatter
|
|
141
|
+
- Hash links summary to actual code changes
|
|
142
|
+
- Enables `git show [hash]` for full diff
|
|
143
|
+
|
|
144
|
+
**Related phase:**
|
|
145
|
+
- If during phase execution: use current phase (e.g., "03-user-dashboard")
|
|
146
|
+
- If between phases: use "none"
|
|
147
|
+
- Helps contextualize when this work happened
|
|
148
|
+
|
|
149
|
+
**After creation:**
|
|
150
|
+
- STATE.md updated with entry in "Recent Adhoc Work"
|
|
151
|
+
- File remains in `.planning/adhoc/` for audit trail
|
|
152
|
+
|
|
153
|
+
</guidelines>
|