mindsystem-cc 3.19.0 → 3.21.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 (83) hide show
  1. package/README.md +5 -6
  2. package/agents/ms-designer.md +5 -2
  3. package/agents/ms-mockup-designer.md +1 -1
  4. package/agents/ms-plan-writer.md +8 -1
  5. package/agents/ms-product-researcher.md +69 -0
  6. package/agents/ms-research-synthesizer.md +1 -1
  7. package/agents/ms-researcher.md +8 -8
  8. package/agents/ms-roadmapper.md +9 -13
  9. package/bin/install.js +68 -5
  10. package/commands/ms/add-phase.md +30 -18
  11. package/commands/ms/adhoc.md +1 -1
  12. package/commands/ms/audit-milestone.md +12 -12
  13. package/commands/ms/complete-milestone.md +25 -22
  14. package/commands/ms/config.md +202 -0
  15. package/commands/ms/design-phase.md +34 -29
  16. package/commands/ms/discuss-phase.md +26 -22
  17. package/commands/ms/doctor.md +22 -202
  18. package/commands/ms/execute-phase.md +18 -7
  19. package/commands/ms/help.md +46 -39
  20. package/commands/ms/insert-phase.md +29 -17
  21. package/commands/ms/new-milestone.md +42 -19
  22. package/commands/ms/new-project.md +88 -103
  23. package/commands/ms/plan-milestone-gaps.md +4 -5
  24. package/commands/ms/plan-phase.md +5 -3
  25. package/commands/ms/progress.md +2 -4
  26. package/commands/ms/research-phase.md +7 -12
  27. package/commands/ms/research-project.md +12 -12
  28. package/mindsystem/references/continuation-format.md +3 -3
  29. package/mindsystem/references/plan-format.md +11 -1
  30. package/mindsystem/references/principles.md +1 -1
  31. package/mindsystem/references/questioning.md +50 -8
  32. package/mindsystem/references/routing/audit-result-routing.md +12 -11
  33. package/mindsystem/references/routing/between-milestones-routing.md +2 -2
  34. package/mindsystem/references/routing/milestone-complete-routing.md +1 -1
  35. package/mindsystem/references/routing/next-phase-routing.md +4 -2
  36. package/mindsystem/templates/context.md +7 -6
  37. package/mindsystem/templates/milestone-archive.md +5 -5
  38. package/mindsystem/templates/milestone-context.md +1 -1
  39. package/mindsystem/templates/milestone.md +9 -9
  40. package/mindsystem/templates/project.md +70 -64
  41. package/mindsystem/templates/research-subagent-prompt.md +3 -3
  42. package/mindsystem/templates/roadmap-milestone.md +14 -14
  43. package/mindsystem/templates/roadmap.md +9 -7
  44. package/mindsystem/workflows/adhoc.md +1 -1
  45. package/mindsystem/workflows/complete-milestone.md +66 -107
  46. package/mindsystem/workflows/discuss-phase.md +137 -65
  47. package/mindsystem/workflows/doctor-fixes.md +273 -0
  48. package/mindsystem/workflows/execute-phase.md +7 -3
  49. package/mindsystem/workflows/execute-plan.md +6 -5
  50. package/mindsystem/workflows/map-codebase.md +2 -2
  51. package/mindsystem/workflows/mockup-generation.md +1 -1
  52. package/mindsystem/workflows/plan-phase.md +28 -3
  53. package/mindsystem/workflows/transition.md +20 -25
  54. package/mindsystem/workflows/verify-work.md +1 -1
  55. package/package.json +1 -1
  56. package/scripts/__pycache__/ms-tools.cpython-314.pyc +0 -0
  57. package/scripts/__pycache__/test_ms_tools.cpython-314-pytest-9.0.2.pyc +0 -0
  58. package/scripts/fixtures/scan-context/.planning/ROADMAP.md +16 -0
  59. package/scripts/fixtures/scan-context/.planning/adhoc/20260220-fix-token-SUMMARY.md +12 -0
  60. package/scripts/fixtures/scan-context/.planning/config.json +3 -0
  61. package/scripts/fixtures/scan-context/.planning/debug/resolved/token-bug.md +11 -0
  62. package/scripts/fixtures/scan-context/.planning/knowledge/auth.md +11 -0
  63. package/scripts/fixtures/scan-context/.planning/phases/02-infra/02-1-SUMMARY.md +20 -0
  64. package/scripts/fixtures/scan-context/.planning/phases/04-setup/04-1-SUMMARY.md +21 -0
  65. package/scripts/fixtures/scan-context/.planning/phases/05-auth/05-1-SUMMARY.md +28 -0
  66. package/scripts/fixtures/scan-context/.planning/todos/done/setup-db.md +10 -0
  67. package/scripts/fixtures/scan-context/.planning/todos/pending/add-logout.md +10 -0
  68. package/scripts/fixtures/scan-context/expected-output.json +257 -0
  69. package/scripts/ms-tools.py +2139 -0
  70. package/scripts/test_ms_tools.py +836 -0
  71. package/commands/ms/list-phase-assumptions.md +0 -56
  72. package/mindsystem/workflows/list-phase-assumptions.md +0 -178
  73. package/scripts/__pycache__/compare_mockups.cpython-314.pyc +0 -0
  74. package/scripts/archive-milestone-files.sh +0 -68
  75. package/scripts/archive-milestone-phases.sh +0 -138
  76. package/scripts/doctor-scan.sh +0 -379
  77. package/scripts/gather-milestone-stats.sh +0 -179
  78. package/scripts/generate-adhoc-patch.sh +0 -79
  79. package/scripts/generate-phase-patch.sh +0 -169
  80. package/scripts/scan-artifact-subsystems.sh +0 -55
  81. package/scripts/scan-planning-context.py +0 -839
  82. package/scripts/update-state.sh +0 -59
  83. package/scripts/validate-execution-order.sh +0 -104
@@ -277,7 +277,7 @@ PHASE_NAME=$(grep -A2 "Phase ${PHASE}:" .planning/ROADMAP.md 2>/dev/null | head
277
277
  **2. Run context scanner:**
278
278
 
279
279
  ```bash
280
- uv run ~/.claude/mindsystem/scripts/scan-planning-context.py \
280
+ ms-tools scan-planning-context \
281
281
  --phase "${PHASE}" \
282
282
  --phase-name "${PHASE_NAME}" \
283
283
  ${SUBSYSTEM:+--subsystem="${SUBSYSTEM}"}
@@ -389,7 +389,9 @@ Standard tasks (remain in standard plans):
389
389
  → Yes: Mark as tdd_candidate=true
390
390
  → No: Standard task
391
391
 
392
- Read `~/.claude/mindsystem/references/tdd.md` now for TDD criteria and plan structure.
392
+ **If any tasks were marked tdd_candidate=true:** Read `~/.claude/mindsystem/references/tdd.md` for TDD plan structure guidance.
393
+
394
+ **If no TDD candidates:** Skip — the heuristic above is sufficient for detection.
393
395
 
394
396
  **Decisions:** If you identify a task that requires choosing between approaches (which auth provider, which database, etc.), use AskUserQuestion to resolve it now. Don't defer decisions to execution. For purely technical choices where the user hasn't expressed preference, make the decision and document it in the plan's objective.
395
397
 
@@ -450,6 +452,25 @@ The user may adjust, merge, or split plans. Once confirmed (or if the user proce
450
452
  **TDD plans are always standalone** — propose them as dedicated plans regardless of budget.
451
453
  </step>
452
454
 
455
+ <step name="discover_skills">
456
+ **Identify relevant project skills for this phase.**
457
+
458
+ After the user confirms the plan structure, check if project skills could improve plan quality.
459
+
460
+ **Scan:** Review the skill list in your system-reminder. Match skills against:
461
+ - The phase's technology stack (Flutter, React, Node.js, etc.)
462
+ - The domain of the tasks identified (UI patterns, API design, state management, etc.)
463
+ - Keywords from RESEARCH.md or CONTEXT.md if they exist
464
+
465
+ **If matches found:** Present via AskUserQuestion:
466
+ - List each matching skill with its description
467
+ - Always include an escape hatch option for the user to name skills manually or skip entirely
468
+
469
+ **If no matches:** Skip silently — no need to ask the user.
470
+
471
+ **Store result:** Keep the confirmed skill names (may be empty) for the handoff step.
472
+ </step>
473
+
453
474
  <step name="handoff_to_writer">
454
475
  **Spawn ms-plan-writer subagent with task list and context.**
455
476
 
@@ -500,6 +521,10 @@ Assemble handoff payload:
500
521
  {list of services detected in task breakdown}
501
522
  </external_services>
502
523
 
524
+ <confirmed_skills>
525
+ {comma-separated skill names confirmed by user, or "none"}
526
+ </confirmed_skills>
527
+
503
528
  <learnings>
504
529
  <!-- Flat list from read_project_history step 6. Omit if no matches found. -->
505
530
  <learning type="debug" source=".planning/debug/resolved/{slug}.md">{root_cause} — fix: {resolution}</learning>
@@ -699,7 +724,7 @@ Tasks are instructions for Claude, not Jira tickets.
699
724
  - [ ] Prior decisions, issues, concerns synthesized
700
725
  - [ ] Tasks identified with needs/creates dependencies
701
726
  - [ ] Plan grouping proposed and presented to user
702
- - [ ] Task list + proposed grouping handed off to ms-plan-writer
727
+ - [ ] Task list + proposed grouping + confirmed skills handed off to ms-plan-writer
703
728
  - [ ] PLAN files + EXECUTION-ORDER.md created (pure markdown, Must-Haves, follows proposed grouping)
704
729
  - [ ] Plans committed with maximized wave parallelism
705
730
  - [ ] Risk assessment presented (score + top factors)
@@ -141,16 +141,17 @@ cat .planning/phases/XX-current/*-SUMMARY.md
141
141
  **Assess requirement changes:**
142
142
 
143
143
  1. **Requirements validated?**
144
- - Any Active requirements shipped in this phase?
145
- - Move to Validated with phase reference: `- ✓ [Requirement] — Phase X`
144
+ - Any requirements shipped in this phase?
145
+ - Add to Validated with phase reference: `- ✓ [Requirement] — Phase X`
146
146
 
147
147
  2. **Requirements invalidated?**
148
- - Any Active requirements discovered to be unnecessary or wrong?
149
- - Move to Out of Scope with reason: `- [Requirement] — [why invalidated]`
148
+ - Any requirements discovered to be unnecessary or wrong?
149
+ - Add to Out of Scope with reason: `- [Requirement] — [why invalidated]`
150
150
 
151
- 3. **Requirements emerged?**
152
- - Any new requirements discovered during building?
153
- - Add to Active: `- [ ] [New requirement]`
151
+ 3. **Business context evolved?**
152
+ - Has understanding of audience, problem, or differentiation changed?
153
+ - Update Who It's For, Core Problem, or How It's Different if so
154
+ - New key flows emerged? → Update Key User Flows
154
155
 
155
156
  4. **Decisions to log?**
156
157
  - Extract decisions from SUMMARY.md files
@@ -174,13 +175,11 @@ Make the edits inline. Update "Last updated" footer:
174
175
  Before:
175
176
 
176
177
  ```markdown
177
- ### Active
178
+ ## Validated
178
179
 
179
- - [ ] JWT authentication
180
- - [ ] Real-time sync < 500ms
181
- - [ ] Offline mode
180
+ - Canvas drawing tools — Phase 1
182
181
 
183
- ### Out of Scope
182
+ ## Out of Scope
184
183
 
185
184
  - OAuth2 — complexity not needed for v1
186
185
  ```
@@ -188,27 +187,23 @@ Before:
188
187
  After (Phase 2 shipped JWT auth, discovered rate limiting needed):
189
188
 
190
189
  ```markdown
191
- ### Validated
190
+ ## Validated
192
191
 
192
+ - ✓ Canvas drawing tools — Phase 1
193
193
  - ✓ JWT authentication — Phase 2
194
194
 
195
- ### Active
196
-
197
- - [ ] Real-time sync < 500ms
198
- - [ ] Offline mode
199
- - [ ] Rate limiting on sync endpoint
200
-
201
- ### Out of Scope
195
+ ## Out of Scope
202
196
 
203
197
  - OAuth2 — complexity not needed for v1
198
+ - Offline mode — real-time is core value, discovered Phase 2
204
199
  ```
205
200
 
206
201
  **Step complete when:**
207
202
 
208
203
  - [ ] Phase summaries reviewed for learnings
209
- - [ ] Validated requirements moved from Active
210
- - [ ] Invalidated requirements moved to Out of Scope with reason
211
- - [ ] Emerged requirements added to Active
204
+ - [ ] Shipped requirements added to Validated
205
+ - [ ] Invalidated requirements added to Out of Scope with reason
206
+ - [ ] Business context sections reviewed (Who It's For, Core Problem, How It's Different, Key User Flows)
212
207
  - [ ] New decisions logged with rationale
213
208
  - [ ] "What This Is" updated if product changed
214
209
  - [ ] "Last updated" footer reflects this transition
@@ -405,12 +400,12 @@ Exit skill and invoke SlashCommand("/ms:plan-phase [X+1]")
405
400
  ```
406
401
  Phase {X} marked complete.
407
402
 
408
- 🎉 Milestone {version} is 100% complete — all {N} phases finished!
403
+ 🎉 Milestone is 100% complete — all {N} phases finished!
409
404
 
410
405
  ⚡ Auto-continuing: Complete milestone and archive
411
406
  ```
412
407
 
413
- Exit skill and invoke SlashCommand("/ms:complete-milestone {version}")
408
+ Exit skill and invoke SlashCommand("/ms:complete-milestone")
414
409
 
415
410
  </step>
416
411
 
@@ -580,7 +580,7 @@ Use `mocked_files` list from UAT.md frontmatter. Clear the list after reverting.
580
580
 
581
581
  **2. Generate UAT fixes patch (if fixes were made):**
582
582
  ```bash
583
- ~/.claude/mindsystem/scripts/generate-phase-patch.sh ${PHASE_NUMBER} --suffix=uat-fixes
583
+ ms-tools generate-phase-patch ${PHASE_NUMBER} --suffix=uat-fixes
584
584
  ```
585
585
  Output: `.planning/phases/{phase_dir}/{phase}-uat-fixes.patch`
586
586
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mindsystem-cc",
3
- "version": "3.19.0",
3
+ "version": "3.21.0",
4
4
  "description": "A meta-prompting, context engineering and spec-driven development system for Claude Code by TÂCHES.",
5
5
  "bin": {
6
6
  "mindsystem-cc": "bin/install.js"
@@ -0,0 +1,16 @@
1
+ # Roadmap
2
+
3
+ ## Phase 02: Infrastructure
4
+ Database setup and core infrastructure.
5
+
6
+ ## Phase 03: Core Models
7
+ Data models and schemas.
8
+
9
+ ## Phase 04: Setup
10
+ Project configuration and tooling.
11
+
12
+ ## Phase 05: Authentication
13
+ User auth with JWT tokens.
14
+
15
+ ## Phase 06: UI
16
+ Frontend components and screens.
@@ -0,0 +1,12 @@
1
+ ---
2
+ subsystem: auth
3
+ learnings:
4
+ - Token expiry must account for clock skew
5
+ - Always validate token signature before checking claims
6
+ related_phase: "05-auth"
7
+ tags: [jwt, tokens]
8
+ ---
9
+
10
+ # Fix Token Validation
11
+
12
+ Fixed edge case where expired tokens passed validation due to clock skew.
@@ -0,0 +1,3 @@
1
+ {
2
+ "subsystems": ["auth", "database", "api"]
3
+ }
@@ -0,0 +1,11 @@
1
+ ---
2
+ subsystem: auth
3
+ root_cause: Clock skew between servers caused token validation to fail intermittently
4
+ resolution: Added 30-second leeway to token expiry check
5
+ tags: [jwt, timing]
6
+ phase: "05-auth"
7
+ ---
8
+
9
+ # Token Validation Bug
10
+
11
+ Intermittent auth failures due to clock skew between API servers.
@@ -0,0 +1,11 @@
1
+ # Auth Subsystem Knowledge
2
+
3
+ ## Authentication Flow
4
+ 1. User submits credentials to POST /api/auth/login
5
+ 2. Server validates with bcrypt
6
+ 3. JWT issued as httpOnly cookie
7
+ 4. Middleware validates on subsequent requests
8
+
9
+ ## Key Patterns
10
+ - Token rotation on refresh
11
+ - Clock skew leeway of 30 seconds
@@ -0,0 +1,20 @@
1
+ ---
2
+ phase: "02-infra"
3
+ subsystem: database
4
+ affects: []
5
+ requires: []
6
+ tags: [postgres, migrations]
7
+ tech-stack:
8
+ added: [postgres]
9
+ patterns: []
10
+ patterns-established: []
11
+ key-files:
12
+ created: [db/schema.sql]
13
+ modified: []
14
+ key-decisions:
15
+ - Use PostgreSQL for primary store
16
+ ---
17
+
18
+ # Phase 02 Plan 1 Summary
19
+
20
+ Set up database infrastructure with migrations.
@@ -0,0 +1,21 @@
1
+ ---
2
+ phase: "04-setup"
3
+ subsystem: api
4
+ affects: []
5
+ requires: []
6
+ tags: [jwt, config]
7
+ tech-stack:
8
+ added: [dotenv]
9
+ patterns: [env-config]
10
+ patterns-established:
11
+ - Config loading pattern
12
+ key-files:
13
+ created: [src/config.ts]
14
+ modified: [package.json]
15
+ key-decisions:
16
+ - Use dotenv for configuration
17
+ ---
18
+
19
+ # Phase 04 Plan 1 Summary
20
+
21
+ Project setup and configuration with JWT support.
@@ -0,0 +1,28 @@
1
+ ---
2
+ phase: "05-auth"
3
+ subsystem: auth
4
+ affects: ["06-ui"]
5
+ requires: ["04-setup"]
6
+ tags: [jwt, auth, tokens]
7
+ tech-stack:
8
+ added: [jose, bcrypt]
9
+ patterns: [jwt-auth]
10
+ patterns-established:
11
+ - JWT token rotation
12
+ - Password hashing with bcrypt
13
+ key-files:
14
+ created: [src/auth/login.ts, src/auth/middleware.ts]
15
+ modified: [src/config.ts]
16
+ key-decisions:
17
+ - JWT with httpOnly cookies
18
+ - bcrypt for password hashing
19
+ ---
20
+
21
+ # Phase 05 Plan 1 Summary
22
+
23
+ Authentication system with JWT and bcrypt.
24
+
25
+ ## Next Phase Readiness
26
+
27
+ - UI phase needs auth context provider
28
+ - Token refresh endpoint not yet implemented
@@ -0,0 +1,10 @@
1
+ ---
2
+ title: Set up database migrations
3
+ subsystem: database
4
+ priority: high
5
+ phase_origin: "02-infra"
6
+ ---
7
+
8
+ # Set Up Database Migrations
9
+
10
+ Configure migration tooling for PostgreSQL.
@@ -0,0 +1,10 @@
1
+ ---
2
+ title: Add logout endpoint
3
+ subsystem: auth
4
+ priority: medium
5
+ phase_origin: "05-auth"
6
+ ---
7
+
8
+ # Add Logout Endpoint
9
+
10
+ Implement POST /api/auth/logout to invalidate tokens.
@@ -0,0 +1,257 @@
1
+ {
2
+ "success": true,
3
+ "target": {
4
+ "phase": "06",
5
+ "phase_name": "",
6
+ "subsystems": [
7
+ "auth"
8
+ ],
9
+ "keywords": [
10
+ "jwt",
11
+ "ui"
12
+ ]
13
+ },
14
+ "sources": {
15
+ "summaries": {
16
+ "dir": "<FIXTURE>/.planning/phases",
17
+ "scanned": 3,
18
+ "skipped": null
19
+ },
20
+ "debug_docs": {
21
+ "dir": "<FIXTURE>/.planning/debug/resolved",
22
+ "scanned": 1,
23
+ "skipped": null
24
+ },
25
+ "adhoc_summaries": {
26
+ "dir": "<FIXTURE>/.planning/adhoc",
27
+ "scanned": 1,
28
+ "skipped": null
29
+ },
30
+ "completed_todos": {
31
+ "dir": "<FIXTURE>/.planning/todos/done",
32
+ "scanned": 1,
33
+ "skipped": null
34
+ },
35
+ "pending_todos": {
36
+ "dir": "<FIXTURE>/.planning/todos/pending",
37
+ "scanned": 1,
38
+ "skipped": null
39
+ },
40
+ "knowledge_files": {
41
+ "dir": "<FIXTURE>/.planning/knowledge",
42
+ "scanned": 1,
43
+ "skipped": null
44
+ },
45
+ "parse_errors": []
46
+ },
47
+ "summaries": [
48
+ {
49
+ "path": "<FIXTURE>/.planning/phases/02-infra/02-1-SUMMARY.md",
50
+ "frontmatter": {
51
+ "phase": "02-infra",
52
+ "subsystem": "database",
53
+ "affects": [],
54
+ "requires": [],
55
+ "tags": [
56
+ "postgres",
57
+ "migrations"
58
+ ],
59
+ "tech-stack": {
60
+ "added": [
61
+ "postgres"
62
+ ],
63
+ "patterns": []
64
+ },
65
+ "patterns-established": [],
66
+ "key-files": {
67
+ "created": [
68
+ "db/schema.sql"
69
+ ],
70
+ "modified": []
71
+ },
72
+ "key-decisions": [
73
+ "Use PostgreSQL for primary store"
74
+ ]
75
+ },
76
+ "relevance": "LOW",
77
+ "match_reasons": [],
78
+ "has_readiness_warnings": false
79
+ },
80
+ {
81
+ "path": "<FIXTURE>/.planning/phases/04-setup/04-1-SUMMARY.md",
82
+ "frontmatter": {
83
+ "phase": "04-setup",
84
+ "subsystem": "api",
85
+ "affects": [],
86
+ "requires": [],
87
+ "tags": [
88
+ "jwt",
89
+ "config"
90
+ ],
91
+ "tech-stack": {
92
+ "added": [
93
+ "dotenv"
94
+ ],
95
+ "patterns": [
96
+ "env-config"
97
+ ]
98
+ },
99
+ "patterns-established": [
100
+ "Config loading pattern"
101
+ ],
102
+ "key-files": {
103
+ "created": [
104
+ "src/config.ts"
105
+ ],
106
+ "modified": [
107
+ "package.json"
108
+ ]
109
+ },
110
+ "key-decisions": [
111
+ "Use dotenv for configuration"
112
+ ]
113
+ },
114
+ "relevance": "HIGH",
115
+ "match_reasons": [
116
+ "overlapping tags: ['jwt']",
117
+ "adjacent phase (N-2)",
118
+ "in transitive requires chain"
119
+ ],
120
+ "has_readiness_warnings": false
121
+ },
122
+ {
123
+ "path": "<FIXTURE>/.planning/phases/05-auth/05-1-SUMMARY.md",
124
+ "frontmatter": {
125
+ "phase": "05-auth",
126
+ "subsystem": "auth",
127
+ "affects": [
128
+ "06-ui"
129
+ ],
130
+ "requires": [
131
+ "04-setup"
132
+ ],
133
+ "tags": [
134
+ "jwt",
135
+ "auth",
136
+ "tokens"
137
+ ],
138
+ "tech-stack": {
139
+ "added": [
140
+ "jose",
141
+ "bcrypt"
142
+ ],
143
+ "patterns": [
144
+ "jwt-auth"
145
+ ]
146
+ },
147
+ "patterns-established": [
148
+ "JWT token rotation",
149
+ "Password hashing with bcrypt"
150
+ ],
151
+ "key-files": {
152
+ "created": [
153
+ "src/auth/login.ts",
154
+ "src/auth/middleware.ts"
155
+ ],
156
+ "modified": [
157
+ "src/config.ts"
158
+ ]
159
+ },
160
+ "key-decisions": [
161
+ "JWT with httpOnly cookies",
162
+ "bcrypt for password hashing"
163
+ ]
164
+ },
165
+ "relevance": "HIGH",
166
+ "match_reasons": [
167
+ "affects contains '06'",
168
+ "same subsystem 'auth'",
169
+ "overlapping tags: ['jwt']",
170
+ "adjacent phase (N-1)"
171
+ ],
172
+ "has_readiness_warnings": true
173
+ }
174
+ ],
175
+ "debug_learnings": [
176
+ {
177
+ "path": "<FIXTURE>/.planning/debug/resolved/token-bug.md",
178
+ "slug": "token-bug",
179
+ "subsystem": "auth",
180
+ "root_cause": "Clock skew between servers caused token validation to fail intermittently",
181
+ "resolution": "Added 30-second leeway to token expiry check",
182
+ "tags": [
183
+ "jwt",
184
+ "timing"
185
+ ],
186
+ "phase": "05-auth"
187
+ }
188
+ ],
189
+ "adhoc_learnings": [
190
+ {
191
+ "path": "<FIXTURE>/.planning/adhoc/20260220-fix-token-SUMMARY.md",
192
+ "subsystem": "auth",
193
+ "learnings": [
194
+ "Token expiry must account for clock skew",
195
+ "Always validate token signature before checking claims"
196
+ ],
197
+ "related_phase": "05-auth",
198
+ "tags": [
199
+ "jwt",
200
+ "tokens"
201
+ ]
202
+ }
203
+ ],
204
+ "completed_todos": [
205
+ {
206
+ "path": "<FIXTURE>/.planning/todos/done/setup-db.md",
207
+ "title": "Set up database migrations",
208
+ "subsystem": "database",
209
+ "priority": "high",
210
+ "phase_origin": "02-infra"
211
+ }
212
+ ],
213
+ "pending_todos": [
214
+ {
215
+ "path": "<FIXTURE>/.planning/todos/pending/add-logout.md",
216
+ "title": "Add logout endpoint",
217
+ "subsystem": "auth",
218
+ "priority": "medium",
219
+ "phase_origin": "05-auth"
220
+ }
221
+ ],
222
+ "knowledge_files": [
223
+ {
224
+ "path": "<FIXTURE>/.planning/knowledge/auth.md",
225
+ "subsystem": "auth",
226
+ "matched": true
227
+ }
228
+ ],
229
+ "aggregated": {
230
+ "tech_stack_added": [
231
+ "bcrypt",
232
+ "dotenv",
233
+ "jose"
234
+ ],
235
+ "patterns_established": [
236
+ "Config loading pattern",
237
+ "JWT token rotation",
238
+ "Password hashing with bcrypt",
239
+ "env-config",
240
+ "jwt-auth"
241
+ ],
242
+ "key_files_created": [
243
+ "src/auth/login.ts",
244
+ "src/auth/middleware.ts",
245
+ "src/config.ts"
246
+ ],
247
+ "key_files_modified": [
248
+ "package.json",
249
+ "src/config.ts"
250
+ ],
251
+ "key_decisions": [
252
+ "Use dotenv for configuration",
253
+ "JWT with httpOnly cookies",
254
+ "bcrypt for password hashing"
255
+ ]
256
+ }
257
+ }