prjct-cli 0.12.1 → 0.13.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 (38) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/CLAUDE.md +18 -6
  3. package/bin/serve.js +12 -30
  4. package/core/data/index.ts +19 -5
  5. package/core/data/md-base-manager.ts +203 -0
  6. package/core/data/md-queue-manager.ts +179 -0
  7. package/core/data/md-state-manager.ts +133 -0
  8. package/core/serializers/index.ts +20 -0
  9. package/core/serializers/queue-serializer.ts +210 -0
  10. package/core/serializers/state-serializer.ts +136 -0
  11. package/core/utils/file-helper.ts +12 -0
  12. package/package.json +1 -1
  13. package/packages/web/app/api/projects/[id]/stats/route.ts +6 -29
  14. package/packages/web/app/project/[id]/page.tsx +34 -1
  15. package/packages/web/app/project/[id]/stats/page.tsx +11 -5
  16. package/packages/web/app/settings/page.tsx +2 -221
  17. package/packages/web/components/AppSidebar/AppSidebar.tsx +5 -3
  18. package/packages/web/components/BlockersCard/BlockersCard.tsx +67 -0
  19. package/packages/web/components/BlockersCard/BlockersCard.types.ts +11 -0
  20. package/packages/web/components/BlockersCard/index.ts +2 -0
  21. package/packages/web/components/CommandButton/CommandButton.tsx +10 -3
  22. package/packages/web/lib/projects.ts +28 -27
  23. package/packages/web/lib/services/projects.server.ts +25 -21
  24. package/packages/web/lib/services/stats.server.ts +355 -57
  25. package/packages/web/package.json +0 -2
  26. package/templates/commands/decision.md +226 -0
  27. package/templates/commands/done.md +100 -68
  28. package/templates/commands/feature.md +102 -103
  29. package/templates/commands/idea.md +41 -38
  30. package/templates/commands/now.md +94 -33
  31. package/templates/commands/pause.md +90 -30
  32. package/templates/commands/ship.md +179 -74
  33. package/templates/commands/sync.md +324 -200
  34. package/packages/web/app/api/migrate/route.ts +0 -46
  35. package/packages/web/app/api/settings/route.ts +0 -97
  36. package/packages/web/app/api/v2/projects/[id]/unified/route.ts +0 -57
  37. package/packages/web/lib/json-loader.ts +0 -630
  38. package/packages/web/lib/services/migration.server.ts +0 -600
@@ -2,29 +2,38 @@
2
2
  allowed-tools: [Read, Write, Bash]
3
3
  description: 'Complete current task with session metrics'
4
4
  timestamp-rule: 'GetTimestamp() for all timestamps'
5
- architecture: 'JSON-first - Write to data/*.json, views are generated'
5
+ architecture: 'MD-first - MD files are source of truth'
6
6
  ---
7
7
 
8
8
  # /p:done - Complete Current Task with Session Metrics
9
9
 
10
- ## Architecture: JSON-First
10
+ ## Architecture: MD-First
11
11
 
12
- **Source of Truth**: `data/state.json`, `data/queue.json`, `data/metrics.json`
13
- **Generated Views**: `views/now.md`, `views/next.md` (auto-generated)
12
+ **Source of Truth**: `core/now.md`, `core/next.md`, `progress/shipped.md`
14
13
 
15
- All writes go to JSON. After writing, views are auto-regenerated.
14
+ MD files are the source of truth. Write directly to MD files.
16
15
 
17
16
  ## Context Variables
18
17
  - `{projectId}`: From `.prjct/prjct.config.json`
19
18
  - `{globalPath}`: `~/.prjct-cli/projects/{projectId}`
20
- - `{dataPath}`: `{globalPath}/data`
21
- - `{statePath}`: `{dataPath}/state.json`
22
- - `{queuePath}`: `{dataPath}/queue.json`
23
- - `{metricsJsonPath}`: `{dataPath}/metrics.json`
19
+ - `{nowPath}`: `{globalPath}/core/now.md`
20
+ - `{nextPath}`: `{globalPath}/core/next.md`
24
21
  - `{sessionPath}`: `{globalPath}/sessions/current.json`
25
22
  - `{archiveDir}`: `{globalPath}/sessions/archive`
26
23
  - `{memoryPath}`: `{globalPath}/memory/context.jsonl`
27
24
 
25
+ ## Accuracy Calculation
26
+
27
+ When task had an estimate, calculate accuracy:
28
+ - `{accuracy}` = 100 - |((actual - estimate) / estimate) * 100|
29
+ - Cap accuracy at 100% (can't be more than 100%)
30
+ - If actual < estimate: bonus (under-budget)
31
+ - If actual > estimate: penalty (over-budget)
32
+
33
+ **Example:**
34
+ - Estimate: 2h (7200s), Actual: 2h 15m (8100s)
35
+ - Accuracy = 100 - |((8100-7200)/7200)*100| = 100 - 12.5 = 87.5%
36
+
28
37
  ## Step 1: Read Config
29
38
 
30
39
  READ: `.prjct/prjct.config.json`
@@ -36,11 +45,16 @@ IF file not found:
36
45
 
37
46
  ## Step 2: Check Session State
38
47
 
39
- ### Read state.json (source of truth)
40
- READ: `{statePath}`
48
+ ### Read now.md (source of truth)
49
+ READ: `{nowPath}`
41
50
 
42
- IF file exists AND has currentTask:
43
- EXTRACT: {task} = state.currentTask
51
+ IF file exists AND has task content:
52
+ PARSE MD format:
53
+ - Look for `**Task description**` (bold text = current task)
54
+ - Look for `Started: {timestamp}`
55
+ - Look for `Session: {sessionId}`
56
+ - Look for `Estimate: {estimate}` (optional)
57
+ EXTRACT: {task}, {startedAt}, {sessionId}, {estimate}
44
58
  GOTO Step 3 (Session Completion)
45
59
 
46
60
  ### Try structured session (for detailed metrics)
@@ -50,9 +64,9 @@ IF file exists:
50
64
  PARSE as JSON
51
65
  EXTRACT: {session} object
52
66
  ELSE:
53
- CREATE session from state.currentTask data
67
+ CREATE session from now.md data
54
68
 
55
- IF no currentTask in state.json:
69
+ IF no task in now.md:
56
70
  OUTPUT: "⚠️ No active task to complete. Use /p:now to start one."
57
71
  STOP
58
72
 
@@ -78,6 +92,15 @@ PARSE output for:
78
92
  - {linesAdded}: insertions
79
93
  - {linesRemoved}: deletions
80
94
 
95
+ ### Calculate Accuracy (if estimate exists)
96
+ IF {session.estimateSeconds} exists AND > 0:
97
+ {accuracy} = 100 - Math.abs(((duration - estimateSeconds) / estimateSeconds) * 100)
98
+ {accuracy} = Math.max(0, Math.min(100, {accuracy})) // Cap between 0-100
99
+ {accuracyLabel} = accuracy >= 80 ? "✅" : accuracy >= 50 ? "⚠️" : "❌"
100
+ ELSE:
101
+ {accuracy} = null
102
+ {accuracyLabel} = null
103
+
81
104
  ### Update Session Object
82
105
  ```json
83
106
  {
@@ -89,6 +112,9 @@ PARSE output for:
89
112
  "pausedAt": null,
90
113
  "completedAt": "{now}",
91
114
  "duration": {duration},
115
+ "estimate": "{session.estimate}",
116
+ "estimateSeconds": {session.estimateSeconds},
117
+ "accuracy": {accuracy},
92
118
  "metrics": {
93
119
  "filesChanged": {filesChanged},
94
120
  "linesAdded": {linesAdded},
@@ -115,20 +141,19 @@ BASH: `mkdir -p {archiveDir}/{yearMonth}`
115
141
  WRITE: `{archiveDir}/{yearMonth}/{session.id}.json`
116
142
  Content: Updated session object from Step 3
117
143
 
118
- ## Step 5: Clear Current State (JSON)
144
+ ## Step 5: Clear Current State (MD)
119
145
 
120
- ### Clear state.json (SOURCE OF TRUTH)
121
- READ: `{statePath}`
146
+ ### Clear now.md (SOURCE OF TRUTH)
122
147
 
123
- UPDATE state.json:
124
- ```json
125
- {
126
- "currentTask": null,
127
- "lastUpdated": "{now}"
128
- }
129
- ```
148
+ WRITE: `{nowPath}`
149
+
150
+ ```markdown
151
+ # NOW
130
152
 
131
- WRITE: `{statePath}`
153
+ _No active task_
154
+
155
+ Use `/p:now <task>` to start working.
156
+ ```
132
157
 
133
158
  ### Clear session.json
134
159
  WRITE: `{sessionPath}`
@@ -137,60 +162,46 @@ Content:
137
162
  {}
138
163
  ```
139
164
 
140
- ## Step 6: Update Metrics (JSON)
165
+ ## Step 6: Log Completion
141
166
 
142
- READ: `{metricsJsonPath}` (or create default if not exists)
143
-
144
- ### Update metrics.json
145
- ```json
146
- {
147
- "velocity": {
148
- "tasksPerDay": {calculated},
149
- "avgTaskDuration": {calculated}
150
- },
151
- "allTime": {
152
- "totalTasks": {increment by 1},
153
- "totalTime": {add duration},
154
- "daysActive": {recalculate}
155
- },
156
- "recentTasks": [
157
- {
158
- "task": "{session.task}",
159
- "duration": {duration},
160
- "completedAt": "{now}",
161
- "metrics": {
162
- "filesChanged": {filesChanged},
163
- "linesAdded": {linesAdded},
164
- "linesRemoved": {linesRemoved},
165
- "commits": {commits}
166
- }
167
- },
168
- ...existing recent tasks (keep last 10)
169
- ],
170
- "lastUpdated": "{now}"
171
- }
172
- ```
173
-
174
- WRITE: `{metricsJsonPath}`
175
-
176
- ## Step 7: Generate Views
177
-
178
- BASH: `cd {projectRoot} && npx prjct-generate-views --project={projectId}`
179
-
180
- Note: This regenerates views/now.md, views/next.md from JSON automatically.
167
+ Metrics are calculated from session history and memory log.
168
+ No separate metrics.json needed - all data is in MD files and JSONL logs.
181
169
 
182
170
  ## Step 8: Log to Memory
183
171
 
184
172
  APPEND to: `{memoryPath}`
185
173
 
186
174
  Single line (JSONL format):
175
+
176
+ IF {accuracy} exists:
177
+ ```json
178
+ {"timestamp":"{now}","action":"session_completed","sessionId":"{session.id}","task":"{session.task}","duration":{duration},"estimate":{estimateSeconds},"accuracy":{accuracy},"metrics":{"files":{filesChanged},"added":{linesAdded},"removed":{linesRemoved},"commits":{commits}}}
179
+ ```
180
+
181
+ ELSE:
187
182
  ```json
188
183
  {"timestamp":"{now}","action":"session_completed","sessionId":"{session.id}","task":"{session.task}","duration":{duration},"metrics":{"files":{filesChanged},"added":{linesAdded},"removed":{linesRemoved},"commits":{commits}}}
189
184
  ```
190
185
 
191
186
  ## Output
192
187
 
193
- SUCCESS:
188
+ SUCCESS (with estimate):
189
+ ```
190
+ ✅ {session.task} ({durationFormatted})
191
+
192
+ Estimate: {estimate} | Actual: {durationFormatted} | {accuracyLabel} Accuracy: {accuracy}%
193
+
194
+ Session: {session.id}
195
+ Files: {filesChanged} | +{linesAdded}/-{linesRemoved}
196
+ Commits: {commits}
197
+
198
+ Next:
199
+ • /p:now - Start next task
200
+ • /p:ship - Ship completed work
201
+ • /p:progress - View metrics
202
+ ```
203
+
204
+ SUCCESS (without estimate):
194
205
  ```
195
206
  ✅ {session.task} ({durationFormatted})
196
207
 
@@ -216,7 +227,7 @@ Next:
216
227
 
217
228
  ## Examples
218
229
 
219
- ### Example 1: Full Session Completion
230
+ ### Example 1: Full Session Completion (with estimate)
220
231
  **Session:**
221
232
  ```json
222
233
  {
@@ -224,6 +235,8 @@ Next:
224
235
  "task": "implement authentication",
225
236
  "status": "active",
226
237
  "startedAt": "2025-12-07T10:00:00.000Z",
238
+ "estimate": "2h",
239
+ "estimateSeconds": 7200,
227
240
  "timeline": [
228
241
  {"type": "start", "at": "2025-12-07T10:00:00.000Z"}
229
242
  ]
@@ -234,7 +247,26 @@ Next:
234
247
  - 3 commits
235
248
  - 5 files changed
236
249
  - +120/-30 lines
250
+ - Actual duration: 2h 15m (8100s)
251
+ - Accuracy: 100 - |((8100-7200)/7200)*100| = 87.5%
252
+
253
+ **Output:**
254
+ ```
255
+ ✅ implement authentication (2h 15m)
256
+
257
+ Estimate: 2h | Actual: 2h 15m | ✅ Accuracy: 88%
258
+
259
+ Session: sess_abc12345
260
+ Files: 5 | +120/-30
261
+ Commits: 3
262
+
263
+ Next:
264
+ • /p:now - Start next task
265
+ • /p:ship - Ship completed work
266
+ • /p:progress - View metrics
267
+ ```
237
268
 
269
+ ### Example 1b: Session Completion (without estimate)
238
270
  **Output:**
239
271
  ```
240
272
  ✅ implement authentication (2h 15m)
@@ -2,15 +2,16 @@
2
2
  allowed-tools: [Read, Write, Bash, Task, Glob]
3
3
  description: 'Value analysis + roadmap + task breakdown + auto-start'
4
4
  timestamp-rule: 'GetTimestamp() and GetDate() for ALL timestamps'
5
- architecture: 'JSON-first - Write to data/*.json, views are generated'
5
+ architecture: 'MD-first - MD files are source of truth'
6
6
  ---
7
7
 
8
8
  # /p:feature - Add Feature to Roadmap
9
9
 
10
- ## Architecture: JSON-First
10
+ ## Architecture: MD-First
11
11
 
12
- **Source of Truth**: `data/roadmap.json`, `data/queue.json`, `data/state.json`
13
- **Generated Views**: `views/roadmap.md`, `views/next.md`, `views/now.md` (auto-generated)
12
+ **Source of Truth**: `planning/roadmap.md`, `core/next.md`, `core/now.md`
13
+
14
+ MD files are the source of truth. Write directly to MD files.
14
15
 
15
16
  ## Agent Delegation (REQUIRED)
16
17
 
@@ -52,10 +53,9 @@ Task(
52
53
  ## Context Variables
53
54
  - `{projectId}`: From `.prjct/prjct.config.json`
54
55
  - `{globalPath}`: `~/.prjct-cli/projects/{projectId}`
55
- - `{dataPath}`: `{globalPath}/data`
56
- - `{roadmapPath}`: `{dataPath}/roadmap.json`
57
- - `{queuePath}`: `{dataPath}/queue.json`
58
- - `{statePath}`: `{dataPath}/state.json`
56
+ - `{roadmapPath}`: `{globalPath}/planning/roadmap.md`
57
+ - `{nextPath}`: `{globalPath}/core/next.md`
58
+ - `{nowPath}`: `{globalPath}/core/now.md`
59
59
  - `{memoryPath}`: `{globalPath}/memory/context.jsonl`
60
60
  - `{feature}`: User-provided feature description
61
61
 
@@ -149,138 +149,137 @@ For feature "add user authentication":
149
149
 
150
150
  GENERATE: {tasks} = list of task descriptions
151
151
 
152
- ## Step 5: Update Roadmap (JSON)
152
+ ## Step 5: Update Roadmap (MD)
153
153
 
154
154
  READ: `{roadmapPath}` (or create default if not exists)
155
155
 
156
156
  Default structure:
157
- ```json
158
- {
159
- "features": [],
160
- "backlog": [],
161
- "lastUpdated": ""
162
- }
157
+ ```markdown
158
+ # Roadmap
159
+
160
+ ## Active
161
+
162
+ _No active features_
163
+
164
+ ## Planned
165
+
166
+ _No planned features_
167
+
168
+ ## Shipped
169
+
170
+ _Nothing shipped yet_
163
171
  ```
164
172
 
165
173
  ### Generate Feature ID
166
174
  GENERATE: {featureId} = "feat_" + 8 random alphanumeric chars
167
175
  SET: {now} = GetTimestamp()
168
176
 
169
- ### Create Feature Entry
170
- ```json
171
- {
172
- "id": "{featureId}",
173
- "name": "{feature}",
174
- "impact": "{impact}",
175
- "effort": "{effort}",
176
- "status": "active",
177
- "progress": 0,
178
- "tasks": [
179
- {
180
- "id": "task_{8_random}",
181
- "description": "{task1}",
182
- "completed": false,
183
- "createdAt": "{now}"
184
- },
185
- {
186
- "id": "task_{8_random}",
187
- "description": "{task2}",
188
- "completed": false,
189
- "createdAt": "{now}"
190
- }
191
- ...
192
- ],
193
- "createdAt": "{now}"
194
- }
195
- ```
177
+ ### Update roadmap.md
196
178
 
197
- ### Update roadmap.json
198
- ```json
199
- {
200
- "features": [
201
- {new feature entry},
202
- ...existing features
203
- ],
204
- "backlog": [...existing],
205
- "lastUpdated": "{now}"
206
- }
179
+ Parse existing content and add new feature under "## Active" section:
180
+
181
+ ```markdown
182
+ # Roadmap
183
+
184
+ ## Active
185
+
186
+ ### {feature}
187
+ - **ID**: {featureId}
188
+ - **Impact**: {impact}
189
+ - **Effort**: {effort}
190
+ - **Started**: {now}
191
+ - **Tasks**:
192
+ - [ ] {task1}
193
+ - [ ] {task2}
194
+ - [ ] {task3}
195
+ ...
196
+
197
+ {...existing active features}
198
+
199
+ ## Planned
200
+
201
+ {...existing planned features}
202
+
203
+ ## Shipped
204
+
205
+ {...existing shipped features}
207
206
  ```
208
207
 
209
208
  WRITE: `{roadmapPath}`
210
209
 
211
- ## Step 6: Update Priority Queue (JSON)
210
+ ## Step 6: Update Priority Queue (MD)
212
211
 
213
- READ: `{queuePath}` (or create default if not exists)
212
+ READ: `{nextPath}` (or create default if not exists)
214
213
 
215
214
  Default structure:
216
- ```json
217
- {
218
- "tasks": [],
219
- "lastUpdated": ""
220
- }
215
+ ```markdown
216
+ # Next
217
+
218
+ ## High Priority
219
+
220
+ _No high priority tasks_
221
+
222
+ ## Normal Priority
223
+
224
+ _No tasks in queue_
225
+
226
+ ## Low Priority
227
+
228
+ _No low priority tasks_
221
229
  ```
222
230
 
223
231
  ### Add Tasks to Queue
224
- For each task in {tasks}:
225
- ```json
226
- {
227
- "id": "task_{8_random}",
228
- "description": "{task}",
229
- "priority": "medium",
230
- "featureId": "{featureId}",
231
- "completed": false,
232
- "createdAt": "{now}"
233
- }
234
- ```
235
232
 
236
- ### Update queue.json
237
- ```json
238
- {
239
- "tasks": [
240
- ...new tasks,
241
- ...existing tasks
242
- ],
243
- "lastUpdated": "{now}"
244
- }
233
+ For each task in {tasks}, add to appropriate priority section:
234
+
235
+ ```markdown
236
+ # Next
237
+
238
+ ## High Priority
239
+
240
+ {if high priority tasks}
241
+
242
+ ## Normal Priority
243
+
244
+ - [ ] {task1} @{featureId}
245
+ - [ ] {task2} @{featureId}
246
+ ...
247
+
248
+ {...existing tasks}
249
+
250
+ ## Low Priority
251
+
252
+ {...existing low priority tasks}
245
253
  ```
246
254
 
247
- WRITE: `{queuePath}`
255
+ WRITE: `{nextPath}`
248
256
 
249
- ## Step 7: Auto-Start First Task (JSON)
257
+ ## Step 7: Auto-Start First Task (MD)
250
258
 
251
- READ: `{statePath}` (or create default)
259
+ READ: `{nowPath}`
252
260
 
253
- IF currentTask is null:
261
+ IF file is empty OR contains "_No active task_":
254
262
  ### Start First Task
255
263
  {firstTask} = first item from {tasks}
256
264
  GENERATE: {sessionId} = "sess_" + 8 random alphanumeric chars
257
265
 
258
- ### Update state.json
259
- ```json
260
- {
261
- "currentTask": {
262
- "id": "task_{8_random}",
263
- "description": "{firstTask}",
264
- "startedAt": "{now}",
265
- "sessionId": "{sessionId}",
266
- "featureId": "{featureId}"
267
- },
268
- "lastUpdated": "{now}"
269
- }
266
+ ### Update now.md
267
+ ```markdown
268
+ # NOW
269
+
270
+ **{firstTask}**
271
+
272
+ Started: {now}
273
+ Session: {sessionId}
274
+ Feature: {featureId}
270
275
  ```
271
276
 
272
- WRITE: `{statePath}`
277
+ WRITE: `{nowPath}`
273
278
  {autoStarted} = true
274
279
  ELSE:
275
280
  {autoStarted} = false
276
281
 
277
- ## Step 8: Generate Views
278
-
279
- BASH: `cd {projectRoot} && npx prjct-generate-views --project={projectId}`
280
-
281
- Note: This regenerates views/roadmap.md, views/next.md, views/now.md from JSON automatically.
282
-
283
- ## Step 9: Log to Memory
282
+ ## Step 8: Log to Memory
284
283
 
285
284
  GET: {date} = GetDate()
286
285
  EXTRACT: {yearMonth} = YYYY-MM from {date}
@@ -2,21 +2,21 @@
2
2
  allowed-tools: [Read, Write, Bash, GetTimestamp, GetDate]
3
3
  description: 'Quick idea capture'
4
4
  timestamp-rule: 'GetTimestamp() and GetDate() for timestamps'
5
- architecture: 'JSON-first - Write to data/ideas.json, views are generated'
5
+ architecture: 'MD-first - MD files are source of truth'
6
6
  ---
7
7
 
8
8
  # /p:idea - Quick Idea Capture
9
9
 
10
- ## Architecture: JSON-First
10
+ ## Architecture: MD-First
11
11
 
12
- **Source of Truth**: `data/ideas.json`
13
- **Generated View**: `views/ideas.md` (auto-generated)
12
+ **Source of Truth**: `planning/ideas.md`
13
+
14
+ MD files are the source of truth. Write directly to MD files.
14
15
 
15
16
  ## Context Variables
16
17
  - `{projectId}`: From `.prjct/prjct.config.json`
17
18
  - `{globalPath}`: `~/.prjct-cli/projects/{projectId}`
18
- - `{dataPath}`: `{globalPath}/data`
19
- - `{ideasPath}`: `{dataPath}/ideas.json`
19
+ - `{ideasPath}`: `{globalPath}/planning/ideas.md`
20
20
  - `{memoryPath}`: `{globalPath}/memory/context.jsonl`
21
21
  - `{text}`: User-provided idea text
22
22
 
@@ -34,50 +34,53 @@ IF file not found:
34
34
  READ: `{ideasPath}` (or create default if not exists)
35
35
 
36
36
  Default structure:
37
- ```json
38
- {
39
- "ideas": [],
40
- "lastUpdated": ""
41
- }
37
+ ```markdown
38
+ # Ideas
39
+
40
+ ## Pending
41
+
42
+ _No ideas yet_
43
+
44
+ ## Implemented
45
+
46
+ _Nothing implemented yet_
42
47
  ```
43
48
 
44
- ## Step 3: Add New Idea (JSON)
49
+ ## Step 3: Add New Idea (MD)
45
50
 
46
51
  GENERATE: {ideaId} = "idea_" + 8 random alphanumeric chars
47
52
  SET: {now} = GetTimestamp()
48
53
 
49
54
  ### Analyze idea for tags
50
55
  Based on {text}, detect tags:
51
- - If mentions UI/design → add "ui" tag
52
- - If mentions performance → add "perf" tag
53
- - If mentions bug/fix → add "bug" tag
54
- - If mentions API/backend → add "api" tag
56
+ - If mentions UI/design → add `#ui` tag
57
+ - If mentions performance → add `#perf` tag
58
+ - If mentions bug/fix → add `#bug` tag
59
+ - If mentions API/backend → add `#api` tag
55
60
 
56
- ### Update ideas.json
57
- ```json
58
- {
59
- "ideas": [
60
- {
61
- "id": "{ideaId}",
62
- "text": "{text}",
63
- "priority": "medium",
64
- "status": "pending",
65
- "tags": [{detected_tags}],
66
- "createdAt": "{now}"
67
- },
68
- ...existing ideas
69
- ],
70
- "lastUpdated": "{now}"
71
- }
72
- ```
61
+ ### Update ideas.md
73
62
 
74
- WRITE: `{ideasPath}`
63
+ Parse existing content and add new idea under "## Pending" section:
64
+
65
+ ```markdown
66
+ # Ideas
67
+
68
+ ## Pending
69
+
70
+ - **{text}** #{detected_tags}
71
+ - ID: {ideaId}
72
+ - Added: {now}
75
73
 
76
- ## Step 4: Generate Views
74
+ {...existing pending ideas}
77
75
 
78
- BASH: `cd {projectRoot} && npx prjct-generate-views --project={projectId}`
76
+ ## Implemented
77
+
78
+ {...existing implemented ideas}
79
+ ```
80
+
81
+ WRITE: `{ideasPath}`
79
82
 
80
- ## Step 5: Log to Memory
83
+ ## Step 4: Log to Memory
81
84
 
82
85
  APPEND to: `{memoryPath}`
83
86
  ```json
@@ -86,4 +89,4 @@ APPEND to: `{memoryPath}`
86
89
 
87
90
  ## Response
88
91
 
89
- `💡 {text} | Saved | Start: /p:feature "{text}"`
92
+ `💡 {text} | Saved | Start: /p:feature "{text}"`