gsdd-cli 0.18.5 → 0.19.1
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 -21
- package/README.md +610 -608
- package/agents/DISTILLATION.md +421 -421
- package/agents/README.md +62 -62
- package/agents/approach-explorer.md +370 -361
- package/agents/debugger.md +82 -82
- package/agents/executor.md +473 -394
- package/agents/integration-checker.md +318 -318
- package/agents/mapper.md +103 -103
- package/agents/planner.md +342 -313
- package/agents/researcher.md +84 -84
- package/agents/roadmapper.md +296 -296
- package/agents/synthesizer.md +236 -236
- package/agents/verifier.md +337 -337
- package/bin/adapters/agents.mjs +34 -34
- package/bin/adapters/claude.mjs +193 -191
- package/bin/adapters/codex.mjs +85 -85
- package/bin/adapters/index.mjs +20 -20
- package/bin/adapters/opencode.mjs +280 -278
- package/bin/gsdd.mjs +123 -116
- package/bin/lib/cli-utils.mjs +28 -28
- package/bin/lib/evidence-contract.mjs +325 -112
- package/bin/lib/file-ops.mjs +186 -144
- package/bin/lib/health-truth.mjs +196 -178
- package/bin/lib/health.mjs +246 -226
- package/bin/lib/init-flow.mjs +247 -231
- package/bin/lib/init-prompts.mjs +248 -247
- package/bin/lib/init-runtime.mjs +193 -190
- package/bin/lib/init.mjs +17 -17
- package/bin/lib/lifecycle-preflight.mjs +760 -326
- package/bin/lib/lifecycle-state.mjs +356 -267
- package/bin/lib/manifest.mjs +116 -114
- package/bin/lib/models.mjs +411 -411
- package/bin/lib/phase.mjs +365 -358
- package/bin/lib/plan-constants.mjs +35 -30
- package/bin/lib/provenance.mjs +109 -106
- package/bin/lib/rendering.mjs +119 -83
- package/bin/lib/runtime-freshness.mjs +214 -214
- package/bin/lib/session-fingerprint.mjs +91 -14
- package/bin/lib/templates.mjs +225 -224
- package/bin/lib/workspace-root.mjs +2 -1
- package/distilled/DESIGN.md +2461 -2323
- package/distilled/EVIDENCE-INDEX.md +418 -392
- package/distilled/README.md +196 -193
- package/distilled/SKILL.md +86 -85
- package/distilled/templates/agents.block.md +21 -21
- package/distilled/templates/agents.md +6 -6
- package/distilled/templates/approach.md +272 -232
- package/distilled/templates/auth-matrix.md +78 -78
- package/distilled/templates/brownfield-change/CHANGE.md +99 -0
- package/distilled/templates/brownfield-change/HANDOFF.md +38 -0
- package/distilled/templates/brownfield-change/VERIFICATION.md +56 -0
- package/distilled/templates/codebase/architecture.md +110 -110
- package/distilled/templates/codebase/concerns.md +95 -95
- package/distilled/templates/codebase/conventions.md +193 -193
- package/distilled/templates/codebase/stack.md +96 -96
- package/distilled/templates/delegates/approach-explorer.md +28 -25
- package/distilled/templates/delegates/mapper-arch.md +26 -26
- package/distilled/templates/delegates/mapper-concerns.md +27 -27
- package/distilled/templates/delegates/mapper-quality.md +28 -28
- package/distilled/templates/delegates/mapper-tech.md +25 -25
- package/distilled/templates/delegates/plan-checker.md +78 -68
- package/distilled/templates/delegates/researcher-architecture.md +30 -30
- package/distilled/templates/delegates/researcher-features.md +30 -30
- package/distilled/templates/delegates/researcher-pitfalls.md +30 -30
- package/distilled/templates/delegates/researcher-stack.md +30 -30
- package/distilled/templates/delegates/researcher-synthesizer.md +31 -31
- package/distilled/templates/research/architecture.md +57 -57
- package/distilled/templates/research/features.md +23 -23
- package/distilled/templates/research/pitfalls.md +46 -46
- package/distilled/templates/research/stack.md +45 -45
- package/distilled/templates/research/summary.md +67 -67
- package/distilled/templates/roadmap.md +74 -62
- package/distilled/templates/spec.md +110 -110
- package/distilled/workflows/audit-milestone.md +303 -271
- package/distilled/workflows/complete-milestone.md +349 -332
- package/distilled/workflows/execute.md +457 -450
- package/distilled/workflows/map-codebase.md +253 -253
- package/distilled/workflows/new-milestone.md +242 -238
- package/distilled/workflows/new-project.md +398 -398
- package/distilled/workflows/pause.md +160 -156
- package/distilled/workflows/plan-milestone-gaps.md +183 -183
- package/distilled/workflows/plan.md +454 -448
- package/distilled/workflows/progress.md +227 -223
- package/distilled/workflows/quick.md +351 -347
- package/distilled/workflows/resume.md +220 -212
- package/distilled/workflows/verify-work.md +260 -260
- package/distilled/workflows/verify.md +431 -429
- package/docs/BROWNFIELD-PROOF.md +95 -95
- package/docs/RUNTIME-SUPPORT.md +80 -69
- package/docs/USER-GUIDE.md +394 -386
- package/docs/VERIFICATION-DISCIPLINE.md +59 -59
- package/docs/claude/context-monitor.md +98 -98
- package/docs/proof/consumer-node-cli/README.md +37 -37
- package/docs/proof/consumer-node-cli/ROADMAP.md +14 -14
- package/docs/proof/consumer-node-cli/SPEC.md +17 -17
- package/docs/proof/consumer-node-cli/brief.md +9 -9
- package/docs/proof/consumer-node-cli/phases/01-foundation/01-01-PLAN.md +34 -34
- package/docs/proof/consumer-node-cli/phases/01-foundation/01-01-SUMMARY.md +10 -10
- package/docs/proof/consumer-node-cli/phases/01-foundation/01-VERIFICATION.md +30 -30
- package/package.json +62 -61
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# AGENTS.md - GSDD Governance
|
|
2
|
-
|
|
3
|
-
<!-- BEGIN GSDD -->
|
|
4
|
-
{{GSDD_BLOCK}}
|
|
5
|
-
<!-- END GSDD -->
|
|
6
|
-
|
|
1
|
+
# AGENTS.md - GSDD Governance
|
|
2
|
+
|
|
3
|
+
<!-- BEGIN GSDD -->
|
|
4
|
+
{{GSDD_BLOCK}}
|
|
5
|
+
<!-- END GSDD -->
|
|
6
|
+
|
|
@@ -1,232 +1,272 @@
|
|
|
1
|
-
# Phase Approach Template
|
|
2
|
-
|
|
3
|
-
Template for `.planning/phases/XX-name/{phase_num}-APPROACH.md` — captures implementation decisions and validated assumptions for a phase.
|
|
4
|
-
|
|
5
|
-
**Purpose:** Document decisions that downstream agents need. Planner uses this to know WHAT choices are locked vs flexible. Plan-checker verifies plans honor these decisions.
|
|
6
|
-
|
|
7
|
-
**Key principle:** The top-level structure (`<domain>`, `<decisions>`, `<assumptions>`, `<deferred>`) is fixed. Section names WITHIN `<decisions>` emerge from what was actually discussed for THIS phase — a CLI phase has CLI-relevant sections, a UI phase has UI-relevant sections.
|
|
8
|
-
|
|
9
|
-
**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
[
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
###
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
- [
|
|
59
|
-
|
|
60
|
-
###
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
</
|
|
64
|
-
|
|
65
|
-
<
|
|
66
|
-
##
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
##
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
**
|
|
102
|
-
**
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
-
|
|
113
|
-
-
|
|
114
|
-
-
|
|
115
|
-
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
</
|
|
123
|
-
|
|
124
|
-
<
|
|
125
|
-
##
|
|
126
|
-
|
|
127
|
-
###
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
-
|
|
142
|
-
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
**
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
</
|
|
207
|
-
|
|
208
|
-
<
|
|
209
|
-
##
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
-
|
|
230
|
-
-
|
|
231
|
-
|
|
232
|
-
|
|
1
|
+
# Phase Approach Template
|
|
2
|
+
|
|
3
|
+
Template for `.planning/phases/XX-name/{phase_num}-APPROACH.md` — captures implementation decisions and validated assumptions for a phase.
|
|
4
|
+
|
|
5
|
+
**Purpose:** Document decisions that downstream agents need. Planner uses this to know WHAT choices are locked vs flexible. Plan-checker verifies plans honor these decisions.
|
|
6
|
+
|
|
7
|
+
**Key principle:** The top-level structure (`<domain>`, `<decisions>`, `<assumptions>`, `<deferred>`) is fixed. Section names WITHIN `<decisions>` emerge from what was actually discussed for THIS phase — a CLI phase has CLI-relevant sections, a UI phase has UI-relevant sections.
|
|
8
|
+
|
|
9
|
+
**Alignment proof:** When `.planning/config.json` has `workflow.discuss: true`, every APPROACH artifact must include an `## Alignment Proof` section before `<domain>`. It must record the canonical fields `alignment_status`, `alignment_method`, `user_confirmed_at`, `explicit_skip_approved`, `skip_scope`, `skip_rationale`, and `confirmed_decisions`. `Agent's Discretion` and agent-only "No questions needed" are not valid proof.
|
|
10
|
+
|
|
11
|
+
**Downstream consumers:**
|
|
12
|
+
- `planner` — Reads decisions to constrain implementation choices. Locked decisions must be implemented. Agent's Discretion items allow planner flexibility.
|
|
13
|
+
- `plan-checker` — Reads decisions to verify plans implement chosen approaches (approach_alignment dimension). Flags plans that contradict explicit user choices.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## File Template
|
|
18
|
+
|
|
19
|
+
```markdown
|
|
20
|
+
# Phase [X]: [Name] - Approach
|
|
21
|
+
|
|
22
|
+
**Explored:** [date]
|
|
23
|
+
**Status:** Ready for planning
|
|
24
|
+
|
|
25
|
+
## Alignment Proof
|
|
26
|
+
|
|
27
|
+
- `workflow.discuss`: [true | false]
|
|
28
|
+
- `alignment_status`: [user_confirmed | approved_skip | not_required]
|
|
29
|
+
- `alignment_method`: [conversation source, e.g. runtime command or user message]
|
|
30
|
+
- `user_confirmed_at`: [date or N/A]
|
|
31
|
+
- `explicit_skip_approved`: [true | false]
|
|
32
|
+
- `skip_scope`: [phase-wide / named gray area / N/A]
|
|
33
|
+
- `skip_rationale`: [why the user approved skipping discussion, or N/A]
|
|
34
|
+
- `confirmed_decisions`:
|
|
35
|
+
- [User-confirmed decision, or "N/A - approved skip"]
|
|
36
|
+
|
|
37
|
+
<domain>
|
|
38
|
+
## Phase Boundary
|
|
39
|
+
|
|
40
|
+
[Clear statement of what this phase delivers — the scope anchor. This comes from ROADMAP.md and is fixed. Discussion clarifies implementation within this boundary.]
|
|
41
|
+
|
|
42
|
+
</domain>
|
|
43
|
+
|
|
44
|
+
<decisions>
|
|
45
|
+
## Implementation Decisions
|
|
46
|
+
|
|
47
|
+
### [Gray Area 1 that was discussed]
|
|
48
|
+
**Chosen approach:** [name]
|
|
49
|
+
**Alternatives considered:** [Option B], [Option C]
|
|
50
|
+
**Why this one:** [reasoning from research + user preference]
|
|
51
|
+
- [Specific decision from questioning]
|
|
52
|
+
- [Another decision if applicable]
|
|
53
|
+
|
|
54
|
+
### [Gray Area 2 that was discussed]
|
|
55
|
+
**Chosen approach:** [name]
|
|
56
|
+
**Alternatives considered:** [Option B]
|
|
57
|
+
**Why this one:** [reasoning]
|
|
58
|
+
- [Specific decision]
|
|
59
|
+
|
|
60
|
+
### Agent's Discretion
|
|
61
|
+
[Areas where user explicitly said "you decide" — the agent has flexibility here during planning/implementation]
|
|
62
|
+
|
|
63
|
+
</decisions>
|
|
64
|
+
|
|
65
|
+
<assumptions>
|
|
66
|
+
## Validated Assumptions
|
|
67
|
+
|
|
68
|
+
### Confirmed
|
|
69
|
+
- [confident] [assumption confirmed by user]
|
|
70
|
+
|
|
71
|
+
### Accepted (not challenged)
|
|
72
|
+
- [assuming] [assumption user didn't challenge — planner should still honor but note it]
|
|
73
|
+
|
|
74
|
+
### Corrected
|
|
75
|
+
- [corrected] [original assumption] → [user's correction]
|
|
76
|
+
|
|
77
|
+
</assumptions>
|
|
78
|
+
|
|
79
|
+
<deferred>
|
|
80
|
+
## Deferred Ideas
|
|
81
|
+
|
|
82
|
+
[Ideas that came up during discussion but belong in other phases. Captured here so they're not lost, but explicitly out of scope for this phase.]
|
|
83
|
+
|
|
84
|
+
[If none: "None — discussion stayed within phase scope"]
|
|
85
|
+
|
|
86
|
+
</deferred>
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
*Phase: XX-name*
|
|
91
|
+
*Approach explored: [date]*
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Good Examples
|
|
95
|
+
|
|
96
|
+
**Example 1: Visual feature (Dashboard)**
|
|
97
|
+
|
|
98
|
+
```markdown
|
|
99
|
+
# Phase 3: Interactive Dashboard - Approach
|
|
100
|
+
|
|
101
|
+
**Explored:** 2026-03-22
|
|
102
|
+
**Status:** Ready for planning
|
|
103
|
+
|
|
104
|
+
## Alignment Proof
|
|
105
|
+
|
|
106
|
+
- `workflow.discuss`: true
|
|
107
|
+
- `alignment_status`: user_confirmed
|
|
108
|
+
- `alignment_method`: planning conversation
|
|
109
|
+
- `user_confirmed_at`: 2026-03-22
|
|
110
|
+
- `explicit_skip_approved`: false
|
|
111
|
+
- `skip_scope`: N/A
|
|
112
|
+
- `skip_rationale`: N/A
|
|
113
|
+
- `confirmed_decisions`:
|
|
114
|
+
- Use Recharts for chart rendering
|
|
115
|
+
- Use react-grid-layout for dashboard widgets
|
|
116
|
+
|
|
117
|
+
<domain>
|
|
118
|
+
## Phase Boundary
|
|
119
|
+
|
|
120
|
+
Build an interactive dashboard with configurable widgets. Users can view metrics and rearrange layout. Widget creation and custom data sources are separate phases.
|
|
121
|
+
|
|
122
|
+
</domain>
|
|
123
|
+
|
|
124
|
+
<decisions>
|
|
125
|
+
## Implementation Decisions
|
|
126
|
+
|
|
127
|
+
### Chart rendering
|
|
128
|
+
**Chosen approach:** Recharts
|
|
129
|
+
**Alternatives considered:** D3 + custom components, Chart.js
|
|
130
|
+
**Why this one:** React-native, SSR-friendly, good defaults. Matches existing React patterns. D3 would give more control but requires more code for standard charts.
|
|
131
|
+
- Bar charts and line charts for metrics — no pie charts in v1
|
|
132
|
+
- Charts should be interactive (hover tooltips) but not editable
|
|
133
|
+
- Responsive: charts resize with widget container
|
|
134
|
+
|
|
135
|
+
### Widget layout
|
|
136
|
+
**Chosen approach:** react-grid-layout
|
|
137
|
+
**Alternatives considered:** CSS Grid + custom drag, @dnd-kit grid
|
|
138
|
+
**Why this one:** Purpose-built for dashboard grids. Layout serialization to JSON for persistence. Mature production usage.
|
|
139
|
+
- Drag-to-reorder enabled
|
|
140
|
+
- Resize handles on bottom-right corner
|
|
141
|
+
- 12-column grid, responsive breakpoints
|
|
142
|
+
- Layout persisted to localStorage (not server)
|
|
143
|
+
|
|
144
|
+
### Agent's Discretion
|
|
145
|
+
- Loading skeleton design
|
|
146
|
+
- Exact spacing and typography within widgets
|
|
147
|
+
- Error state handling for failed data fetches
|
|
148
|
+
|
|
149
|
+
</decisions>
|
|
150
|
+
|
|
151
|
+
<assumptions>
|
|
152
|
+
## Validated Assumptions
|
|
153
|
+
|
|
154
|
+
### Confirmed
|
|
155
|
+
- [confident] Using existing Tailwind patterns from Phase 1-2
|
|
156
|
+
|
|
157
|
+
### Accepted (not challenged)
|
|
158
|
+
- [assuming] Dashboard data comes from static JSON for v1 (no real API)
|
|
159
|
+
|
|
160
|
+
### Corrected
|
|
161
|
+
- [corrected] Dashboard is read-only → Widgets DO need drag reorder
|
|
162
|
+
|
|
163
|
+
</assumptions>
|
|
164
|
+
|
|
165
|
+
<deferred>
|
|
166
|
+
## Deferred Ideas
|
|
167
|
+
|
|
168
|
+
- Real-time data updates — future phase
|
|
169
|
+
- Custom widget creation — add to backlog
|
|
170
|
+
- Dashboard sharing/export — out of scope for v1
|
|
171
|
+
|
|
172
|
+
</deferred>
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
*Phase: 03-dashboard*
|
|
177
|
+
*Approach explored: 2026-03-22*
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
**Example 2: API feature (Authentication)**
|
|
181
|
+
|
|
182
|
+
```markdown
|
|
183
|
+
# Phase 1: Authentication - Approach
|
|
184
|
+
|
|
185
|
+
**Explored:** 2026-03-22
|
|
186
|
+
**Status:** Ready for planning
|
|
187
|
+
|
|
188
|
+
## Alignment Proof
|
|
189
|
+
|
|
190
|
+
- `workflow.discuss`: true
|
|
191
|
+
- `alignment_status`: user_confirmed
|
|
192
|
+
- `alignment_method`: planning conversation
|
|
193
|
+
- `user_confirmed_at`: 2026-03-22
|
|
194
|
+
- `explicit_skip_approved`: false
|
|
195
|
+
- `skip_scope`: N/A
|
|
196
|
+
- `skip_rationale`: N/A
|
|
197
|
+
- `confirmed_decisions`:
|
|
198
|
+
- Use HTTP-only cookies with JWT
|
|
199
|
+
- Use structured JSON errors
|
|
200
|
+
|
|
201
|
+
<domain>
|
|
202
|
+
## Phase Boundary
|
|
203
|
+
|
|
204
|
+
Users can register and log in with email/password. Session management via JWT. OAuth and MFA are separate phases.
|
|
205
|
+
|
|
206
|
+
</domain>
|
|
207
|
+
|
|
208
|
+
<decisions>
|
|
209
|
+
## Implementation Decisions
|
|
210
|
+
|
|
211
|
+
### Session handling
|
|
212
|
+
**Chosen approach:** HTTP-only cookies with JWT
|
|
213
|
+
**Alternatives considered:** localStorage JWT, session-based (server-side)
|
|
214
|
+
**Why this one:** HTTP-only cookies prevent XSS token theft. JWT avoids server-side session storage. Standard pattern for Next.js apps.
|
|
215
|
+
- Access token: 15-minute expiry
|
|
216
|
+
- Refresh token: 7-day expiry, rotation on use
|
|
217
|
+
- Logout clears both tokens
|
|
218
|
+
|
|
219
|
+
### Error responses
|
|
220
|
+
**Chosen approach:** Structured JSON errors
|
|
221
|
+
**Alternatives considered:** Plain text errors, RFC 7807 Problem Details
|
|
222
|
+
**Why this one:** Consistent with existing API patterns. RFC 7807 is overkill for this project size.
|
|
223
|
+
- Always include: status code, error code, user-facing message
|
|
224
|
+
- Never include: stack traces, internal IDs
|
|
225
|
+
- Rate limit errors: include retry-after header
|
|
226
|
+
|
|
227
|
+
### Agent's Discretion
|
|
228
|
+
- Password hashing library (bcrypt vs argon2)
|
|
229
|
+
- Exact JWT payload structure
|
|
230
|
+
- Email validation regex vs library
|
|
231
|
+
|
|
232
|
+
</decisions>
|
|
233
|
+
|
|
234
|
+
<assumptions>
|
|
235
|
+
## Validated Assumptions
|
|
236
|
+
|
|
237
|
+
### Confirmed
|
|
238
|
+
- [confident] Email/password only for v1 (no OAuth)
|
|
239
|
+
|
|
240
|
+
### Accepted (not challenged)
|
|
241
|
+
- [assuming] No email verification required for v1
|
|
242
|
+
|
|
243
|
+
### Corrected
|
|
244
|
+
- [corrected] Single-device sessions → Allow multi-device (don't invalidate other sessions on login)
|
|
245
|
+
|
|
246
|
+
</assumptions>
|
|
247
|
+
|
|
248
|
+
<deferred>
|
|
249
|
+
## Deferred Ideas
|
|
250
|
+
|
|
251
|
+
- OAuth providers (Google, GitHub) — Phase 4
|
|
252
|
+
- MFA/2FA — add to backlog
|
|
253
|
+
|
|
254
|
+
</deferred>
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
*Phase: 01-authentication*
|
|
259
|
+
*Approach explored: 2026-03-22*
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
## Guidelines
|
|
263
|
+
|
|
264
|
+
**This template captures DECISIONS for downstream agents.**
|
|
265
|
+
|
|
266
|
+
The output should answer: "What choices are locked for the planner? Where does the planner have discretion?"
|
|
267
|
+
|
|
268
|
+
**After creation:**
|
|
269
|
+
- File lives in phase directory: `.planning/phases/XX-name/{phase_num}-APPROACH.md`
|
|
270
|
+
- Planner reads decisions to constrain implementation tasks
|
|
271
|
+
- Plan-checker verifies approach_alignment: plans must implement chosen approaches
|
|
272
|
+
- Downstream agents should NOT need to ask the user again about captured decisions
|