prjct-cli 0.35.3 → 0.35.4
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/core/commands/analysis.ts +58 -32
- package/core/commands/command-data.ts +11 -50
- package/core/commands/commands.ts +18 -21
- package/core/commands/context.ts +238 -0
- package/core/commands/register.ts +7 -5
- package/core/commands/setup.ts +1 -17
- package/core/index.ts +2 -4
- package/core/services/index.ts +2 -0
- package/core/services/sync-service.ts +1080 -0
- package/core/types/commands.ts +0 -12
- package/core/types/index.ts +0 -1
- package/dist/bin/prjct.mjs +1215 -307
- package/package.json +2 -8
- package/templates/agentic/agent-routing.md +22 -88
- package/templates/agentic/agents/uxui.md +42 -197
- package/templates/agentic/context-filtering.md +14 -56
- package/templates/agentic/orchestrator.md +26 -302
- package/templates/agentic/skill-integration.md +37 -289
- package/templates/agentic/subagent-generation.md +31 -104
- package/templates/agentic/task-fragmentation.md +39 -273
- package/templates/agents/AGENTS.md +32 -188
- package/templates/commands/bug.md +22 -520
- package/templates/commands/dash.md +26 -161
- package/templates/commands/done.md +19 -250
- package/templates/commands/enrich.md +21 -732
- package/templates/commands/idea.md +18 -160
- package/templates/commands/init.md +20 -209
- package/templates/commands/merge.md +21 -185
- package/templates/commands/next.md +21 -103
- package/templates/commands/pause.md +21 -272
- package/templates/commands/resume.md +18 -411
- package/templates/commands/setup.md +0 -1
- package/templates/commands/ship.md +30 -627
- package/templates/commands/sync.md +11 -1448
- package/templates/commands/task.md +17 -439
- package/templates/commands/test.md +30 -259
- package/CLAUDE.md +0 -211
- package/packages/shared/package.json +0 -29
- package/packages/shared/src/index.ts +0 -10
- package/packages/shared/src/schemas.ts +0 -124
- package/packages/shared/src/types.ts +0 -187
- package/packages/shared/src/unified.ts +0 -174
- package/packages/shared/src/utils.ts +0 -148
- package/packages/shared/tsconfig.json +0 -18
|
@@ -1,178 +1,43 @@
|
|
|
1
1
|
---
|
|
2
|
-
allowed-tools: [Read
|
|
3
|
-
description: 'Unified dashboard - project status, progress, and roadmap'
|
|
4
|
-
timestamp-rule: 'ALWAYS use GetTimestamp() and GetDate() tools for timestamps'
|
|
5
|
-
architecture: 'Write-Through (JSON → MD → Events)'
|
|
6
|
-
storage-layer: true
|
|
7
|
-
source-of-truth: 'storage/*.json'
|
|
8
|
-
claude-context: 'context/*.md'
|
|
2
|
+
allowed-tools: [Read]
|
|
9
3
|
---
|
|
10
4
|
|
|
11
|
-
#
|
|
5
|
+
# p. dash
|
|
12
6
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Reads from **Storage (JSON)** as source of truth.
|
|
16
|
-
|
|
17
|
-
**Source of Truth**:
|
|
18
|
-
- `storage/state.json` - Current/paused tasks
|
|
19
|
-
- `storage/queue.json` - Task queue
|
|
20
|
-
- `storage/ideas.json` - Ideas list
|
|
21
|
-
- `storage/shipped.json` - Shipped features
|
|
22
|
-
|
|
23
|
-
## Usage
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
/p:dash # Full dashboard (default view)
|
|
27
|
-
/p:dash week # Weekly progress focus
|
|
28
|
-
/p:dash month # Monthly progress focus
|
|
29
|
-
/p:dash roadmap # Roadmap and planning focus
|
|
30
|
-
/p:dash compact # Minimal status only
|
|
7
|
+
```bash
|
|
8
|
+
prjct context dash
|
|
31
9
|
```
|
|
32
10
|
|
|
33
|
-
|
|
34
|
-
- `{
|
|
35
|
-
- `{globalPath}
|
|
36
|
-
- `{
|
|
37
|
-
- `{
|
|
38
|
-
- `{ideasPath}`: `{globalPath}/storage/ideas.json`
|
|
39
|
-
- `{shippedPath}`: `{globalPath}/storage/shipped.json`
|
|
40
|
-
|
|
41
|
-
## Flow
|
|
42
|
-
|
|
43
|
-
1. **Read all storage files**:
|
|
44
|
-
- `storage/state.json` → Active and paused tasks
|
|
45
|
-
- `storage/queue.json` → Priority queue
|
|
46
|
-
- `storage/shipped.json` → Recent ships
|
|
47
|
-
- `storage/ideas.json` → Recent ideas
|
|
48
|
-
|
|
49
|
-
2. **Calculate metrics**:
|
|
50
|
-
- Current task and elapsed time
|
|
51
|
-
- Tasks completed today/week/month
|
|
52
|
-
- Paused tasks count
|
|
53
|
-
- Queue depth
|
|
54
|
-
- Days since last ship
|
|
55
|
-
- Velocity (tasks/week)
|
|
56
|
-
|
|
57
|
-
3. **Generate view based on param**:
|
|
58
|
-
- Default → Balanced overview
|
|
59
|
-
- Week/Month → Progress focused
|
|
60
|
-
- Roadmap → Planning focused
|
|
61
|
-
- Compact → Just essentials
|
|
62
|
-
|
|
63
|
-
## Response Formats
|
|
64
|
-
|
|
65
|
-
### Default Dashboard
|
|
11
|
+
READ all storage files:
|
|
12
|
+
- `{globalPath}/storage/state.json` → current/paused task
|
|
13
|
+
- `{globalPath}/storage/queue.json` → queue
|
|
14
|
+
- `{globalPath}/storage/shipped.json` → ships
|
|
15
|
+
- `{globalPath}/storage/ideas.json` → ideas
|
|
66
16
|
|
|
17
|
+
**Output (default)**:
|
|
67
18
|
```
|
|
68
|
-
|
|
69
|
-
│ 📊 PROJECT DASHBOARD │
|
|
70
|
-
├─────────────────────────────────────────┤
|
|
71
|
-
│ 🎯 Current Focus │
|
|
72
|
-
│ {active_task} │
|
|
73
|
-
│ Started: {time_ago} | Session: {id} │
|
|
74
|
-
├─────────────────────────────────────────┤
|
|
75
|
-
│ ⏸️ Paused: {paused_task or "None"} │
|
|
76
|
-
├─────────────────────────────────────────┤
|
|
77
|
-
│ 📋 Queue ({queue_count}) │
|
|
78
|
-
│ • {next_task_1} │
|
|
79
|
-
│ • {next_task_2} │
|
|
80
|
-
│ • {next_task_3} │
|
|
81
|
-
├─────────────────────────────────────────┤
|
|
82
|
-
│ 🚀 Recent Ships │
|
|
83
|
-
│ • {ship_1} - {date} │
|
|
84
|
-
│ • {ship_2} - {date} │
|
|
85
|
-
├─────────────────────────────────────────┤
|
|
86
|
-
│ 💡 Ideas ({ideas_count}) │
|
|
87
|
-
└─────────────────────────────────────────┘
|
|
19
|
+
📊 DASHBOARD
|
|
88
20
|
|
|
89
|
-
|
|
90
|
-
|
|
21
|
+
🎯 Current: {task} ({elapsed})
|
|
22
|
+
⏸️ Paused: {paused_task or "None"}
|
|
91
23
|
|
|
92
|
-
|
|
24
|
+
📋 Queue ({count})
|
|
25
|
+
• {task_1}
|
|
26
|
+
• {task_2}
|
|
93
27
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
📋 Queue: {queue_count} | ⏸️ Paused: {paused ? "Yes" : "No"}
|
|
97
|
-
🚀 Last ship: {days}d ago
|
|
98
|
-
💡 Ideas: {ideas_count}
|
|
28
|
+
🚀 Recent: {last_ship} ({days}d ago)
|
|
29
|
+
💡 Ideas: {count}
|
|
99
30
|
|
|
100
|
-
|
|
31
|
+
Next:
|
|
32
|
+
- Finish → `p. done`
|
|
33
|
+
- Ship → `p. ship`
|
|
34
|
+
- Queue → `p. next`
|
|
101
35
|
```
|
|
102
36
|
|
|
103
|
-
|
|
104
|
-
|
|
37
|
+
**Compact** (`p. dash compact`):
|
|
105
38
|
```
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
## Completed Tasks ({count})
|
|
109
|
-
✅ {task_1} - {duration}
|
|
110
|
-
✅ {task_2} - {duration}
|
|
111
|
-
|
|
112
|
-
## Features Shipped ({count})
|
|
113
|
-
🚀 {feature_1} - {date}
|
|
114
|
-
|
|
115
|
-
## Metrics
|
|
116
|
-
**Velocity**: {tasks_per_day} tasks/day
|
|
117
|
-
**Focus Time**: {total_hours} hours
|
|
39
|
+
🎯 {task} | 📋 {queue} | 🚀 {days}d ago
|
|
118
40
|
```
|
|
119
41
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
| Data | Storage File | Field |
|
|
123
|
-
|------|--------------|-------|
|
|
124
|
-
| Current Task | `storage/state.json` | `currentTask` |
|
|
125
|
-
| Paused Task | `storage/state.json` | `pausedTask` |
|
|
126
|
-
| Queue Tasks | `storage/queue.json` | `tasks[]` |
|
|
127
|
-
| Ideas | `storage/ideas.json` | `ideas[]` |
|
|
128
|
-
| Shipped | `storage/shipped.json` | `shipped[]` |
|
|
129
|
-
|
|
130
|
-
## Error Handling
|
|
131
|
-
|
|
132
|
-
| Error | Response |
|
|
133
|
-
|-------|----------|
|
|
134
|
-
| No project | "No prjct project. Run /p:init first." |
|
|
135
|
-
| No storage files | Show empty dashboard |
|
|
136
|
-
| Parse error | Skip that section |
|
|
137
|
-
|
|
138
|
-
## Natural Language Support
|
|
139
|
-
|
|
140
|
-
Detect intent:
|
|
141
|
-
- "p. dashboard" → Full dashboard
|
|
142
|
-
- "p. dash" → Full dashboard
|
|
143
|
-
- "p. status" → Compact view (absorbed /p:status)
|
|
144
|
-
- "p. progress" → Weekly view (absorbed /p:progress)
|
|
145
|
-
- "p. recap" → Full dashboard (absorbed /p:recap)
|
|
146
|
-
- "p. how am I doing" → Default view
|
|
147
|
-
- "p. weekly" → Weekly progress
|
|
148
|
-
|
|
149
|
-
## Absorbed Commands
|
|
150
|
-
|
|
151
|
-
This command consolidates:
|
|
152
|
-
- `/p:status` → Use `/p:dash compact`
|
|
153
|
-
- `/p:progress` → Use `/p:dash week` or `/p:dash month`
|
|
154
|
-
- `/p:recap` → Use `/p:dash` (default)
|
|
155
|
-
- `/p:roadmap` → Use `/p:next roadmap`
|
|
156
|
-
|
|
157
|
-
## KPI Metrics (from /p:status)
|
|
158
|
-
|
|
159
|
-
Calculate and display:
|
|
160
|
-
```
|
|
161
|
-
Sprint: [████░] {%}
|
|
162
|
-
Tasks: {done}/{total}
|
|
163
|
-
Ship: {days} ago
|
|
164
|
-
Focus: {task}
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
## Progress Metrics (from /p:progress)
|
|
168
|
-
|
|
169
|
-
For week/month views:
|
|
170
|
-
```
|
|
171
|
-
📈 {period} | 🚀 {N} shipped | ⚡ {velocity}/day | Trend: {↗%}
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
### Velocity Calculation
|
|
175
|
-
```
|
|
176
|
-
velocity = shipped_count / days_in_period
|
|
177
|
-
trend = (current_velocity - previous_velocity) / previous_velocity * 100
|
|
178
|
-
```
|
|
42
|
+
**Week/Month** (`p. dash week`):
|
|
43
|
+
Show completed tasks, velocity, focus time
|
|
@@ -1,266 +1,35 @@
|
|
|
1
1
|
---
|
|
2
2
|
allowed-tools: [Read, Write, Bash, AskUserQuestion]
|
|
3
|
-
description: 'Complete subtask or mark implement phase done'
|
|
4
3
|
---
|
|
5
4
|
|
|
6
|
-
#
|
|
5
|
+
# p. done
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
**Note**: In workflow mode, p. done advances subtasks within the implement phase. To complete the full workflow:
|
|
11
|
-
```
|
|
12
|
-
p. task → (implement) → p. done (subtasks) → p. test → p. review → p. merge → p. ship → p. verify
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Usage
|
|
16
|
-
```
|
|
17
|
-
/p:done
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Flow
|
|
21
|
-
|
|
22
|
-
### Step 1: Validate
|
|
23
|
-
READ: `.prjct/prjct.config.json` → extract `projectId`
|
|
24
|
-
IF missing: "No prjct project. Run /p:init first." → STOP
|
|
25
|
-
|
|
26
|
-
SET: `{globalPath}` = `~/.prjct-cli/projects/{projectId}`
|
|
27
|
-
|
|
28
|
-
READ: `{globalPath}/storage/state.json`
|
|
29
|
-
IF no `currentTask` OR status != "active":
|
|
30
|
-
OUTPUT: "No active task. Use p. task to start one."
|
|
31
|
-
STOP
|
|
32
|
-
|
|
33
|
-
EXTRACT: `{task}` = currentTask.description
|
|
34
|
-
EXTRACT: `{startedAt}` = currentTask.startedAt
|
|
35
|
-
EXTRACT: `{sessionId}` = currentTask.sessionId
|
|
36
|
-
EXTRACT: `{estimate}` = currentTask.estimate (optional)
|
|
37
|
-
|
|
38
|
-
### Step 1.5: Handle Subtask Completion (AGENTIC)
|
|
39
|
-
|
|
40
|
-
IF currentTask.subtasks exists AND currentTask.subtasks.length > 0:
|
|
41
|
-
SET: {currentIndex} = currentTask.currentSubtaskIndex
|
|
42
|
-
SET: {currentSubtask} = currentTask.subtasks[{currentIndex}]
|
|
43
|
-
SET: {totalSubtasks} = currentTask.subtasks.length
|
|
44
|
-
SET: {nextIndex} = {currentIndex} + 1
|
|
45
|
-
SET: {hasMoreSubtasks} = {nextIndex} < {totalSubtasks}
|
|
46
|
-
|
|
47
|
-
IF {hasMoreSubtasks}:
|
|
48
|
-
SET: {nextSubtask} = currentTask.subtasks[{nextIndex}]
|
|
49
|
-
SET: {completedCount} = subtasks where status == "completed" + 1
|
|
50
|
-
SET: {remainingCount} = {totalSubtasks} - {completedCount}
|
|
51
|
-
|
|
52
|
-
USE AskUserQuestion:
|
|
53
|
-
```
|
|
54
|
-
question: "Subtask '{currentSubtask.description}' done. What's next?"
|
|
55
|
-
header: "Subtask Complete"
|
|
56
|
-
options:
|
|
57
|
-
- label: "Next: {nextSubtask.description}"
|
|
58
|
-
description: "{remainingCount} subtasks remaining"
|
|
59
|
-
- label: "Complete entire feature"
|
|
60
|
-
description: "Finish '{currentTask.parentDescription}' now"
|
|
61
|
-
- label: "More work needed"
|
|
62
|
-
description: "Continue on this subtask"
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
IF choice starts with "Next:":
|
|
66
|
-
SET: {now} = GetTimestamp()
|
|
67
|
-
# Mark current subtask complete
|
|
68
|
-
SET: currentTask.subtasks[{currentIndex}].status = "completed"
|
|
69
|
-
SET: currentTask.subtasks[{currentIndex}].completedAt = "{now}"
|
|
70
|
-
# Start next subtask
|
|
71
|
-
SET: currentTask.subtasks[{nextIndex}].status = "active"
|
|
72
|
-
SET: currentTask.currentSubtaskIndex = {nextIndex}
|
|
73
|
-
SET: currentTask.description = "{nextSubtask.description}"
|
|
74
|
-
|
|
75
|
-
WRITE: `{globalPath}/storage/state.json`
|
|
76
|
-
|
|
77
|
-
APPEND to `{globalPath}/memory/events.jsonl`:
|
|
78
|
-
{"timestamp":"{now}","action":"subtask_completed","subtaskId":"{currentSubtask.id}","nextSubtaskId":"{nextSubtask.id}"}
|
|
79
|
-
|
|
80
|
-
OUTPUT:
|
|
81
|
-
```
|
|
82
|
-
✅ {currentSubtask.description}
|
|
83
|
-
|
|
84
|
-
Now: {nextSubtask.description}
|
|
85
|
-
Progress: {completedCount}/{totalSubtasks} subtasks
|
|
86
|
-
|
|
87
|
-
p. done when finished
|
|
88
|
-
```
|
|
89
|
-
STOP
|
|
90
|
-
|
|
91
|
-
IF choice == "Complete entire feature":
|
|
92
|
-
# Mark all remaining as skipped, continue to normal done flow
|
|
93
|
-
FOR each subtask in currentTask.subtasks:
|
|
94
|
-
IF subtask.status == "pending":
|
|
95
|
-
SET: subtask.status = "skipped"
|
|
96
|
-
SET: currentTask.subtasks[{currentIndex}].status = "completed"
|
|
97
|
-
OUTPUT: "Completing feature: {currentTask.parentDescription}"
|
|
98
|
-
# Continue to Step 2
|
|
99
|
-
|
|
100
|
-
IF choice == "More work needed":
|
|
101
|
-
OUTPUT: "Continuing: {currentSubtask.description}"
|
|
102
|
-
STOP
|
|
103
|
-
|
|
104
|
-
ELSE:
|
|
105
|
-
# Last subtask - mark complete and continue to normal done flow
|
|
106
|
-
SET: {now} = GetTimestamp()
|
|
107
|
-
SET: currentTask.subtasks[{currentIndex}].status = "completed"
|
|
108
|
-
SET: currentTask.subtasks[{currentIndex}].completedAt = "{now}"
|
|
109
|
-
OUTPUT: "Final subtask done. Completing feature..."
|
|
110
|
-
# Continue to Step 2
|
|
111
|
-
|
|
112
|
-
### Step 2: Calculate Metrics
|
|
113
|
-
GET timestamp: `bun -e "console.log(new Date().toISOString())" 2>/dev/null || node -e "console.log(new Date().toISOString())"`
|
|
114
|
-
SET: `{now}` = result
|
|
115
|
-
|
|
116
|
-
CALCULATE: `{duration}` = time between startedAt and now
|
|
117
|
-
FORMAT: as "Xh Ym" or "Xm"
|
|
118
|
-
|
|
119
|
-
IF estimate exists:
|
|
120
|
-
CALCULATE: `{accuracy}` = 100 - |((actual - estimate) / estimate) * 100|
|
|
121
|
-
CAP at 0-100%
|
|
122
|
-
|
|
123
|
-
BASH: `git rev-list --count --since="{startedAt}" HEAD 2>/dev/null || echo "0"`
|
|
124
|
-
SET: `{commits}` = result
|
|
125
|
-
|
|
126
|
-
BASH: `git diff --stat HEAD~{commits} 2>/dev/null || git diff --stat`
|
|
127
|
-
EXTRACT: `{filesChanged}`, `{linesAdded}`, `{linesRemoved}`
|
|
128
|
-
|
|
129
|
-
### Step 3: Update Storage
|
|
130
|
-
Update `{globalPath}/storage/state.json`:
|
|
131
|
-
- Move currentTask to previousTask with status: "completed"
|
|
132
|
-
- Set currentTask = null
|
|
133
|
-
- Set lastUpdated = {now}
|
|
134
|
-
- Add completedAt, duration, accuracy, metrics
|
|
135
|
-
|
|
136
|
-
WRITE: `{globalPath}/storage/state.json`
|
|
137
|
-
|
|
138
|
-
### Step 4: Generate Context
|
|
139
|
-
WRITE: `{globalPath}/context/now.md`:
|
|
140
|
-
```markdown
|
|
141
|
-
# NOW
|
|
142
|
-
|
|
143
|
-
_No active task_
|
|
144
|
-
|
|
145
|
-
Use `/p:now <task>` to start working.
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
### Step 5: Log Events
|
|
149
|
-
APPEND to `{globalPath}/sync/pending.json`:
|
|
150
|
-
```json
|
|
151
|
-
{"type":"task.completed","data":{...},"timestamp":"{now}"}
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
APPEND to `{globalPath}/memory/events.jsonl`:
|
|
155
|
-
```json
|
|
156
|
-
{"timestamp":"{now}","action":"task_completed","task":"{task}","duration":{seconds}}
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
APPEND to `{globalPath}/progress/sessions/{YYYY-MM}/{date}.jsonl`:
|
|
160
|
-
```json
|
|
161
|
-
{"ts":"{now}","type":"task_complete","task":"{task}","duration":"{duration}"}
|
|
7
|
+
```bash
|
|
8
|
+
prjct context done
|
|
162
9
|
```
|
|
163
10
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
IF currentTask.type == "bug" AND state.interruptedTask exists:
|
|
167
|
-
USE AskUserQuestion:
|
|
168
|
-
```
|
|
169
|
-
question: "Bug fixed! Resume '{state.interruptedTask.description}'?"
|
|
170
|
-
header: "Bug Complete"
|
|
171
|
-
options:
|
|
172
|
-
- label: "Resume previous task"
|
|
173
|
-
description: "Return to '{state.interruptedTask.description}'"
|
|
174
|
-
- label: "Pick from queue"
|
|
175
|
-
description: "See what else is waiting"
|
|
176
|
-
- label: "Done for now"
|
|
177
|
-
description: "No active task"
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
IF choice == "Resume previous task":
|
|
181
|
-
SET: {now} = GetTimestamp()
|
|
182
|
-
SET: currentTask = state.interruptedTask
|
|
183
|
-
SET: currentTask.status = "active"
|
|
184
|
-
SET: currentTask.resumedAt = "{now}"
|
|
185
|
-
SET: state.interruptedTask = null
|
|
186
|
-
|
|
187
|
-
WRITE: `{globalPath}/storage/state.json`
|
|
188
|
-
|
|
189
|
-
APPEND to `{globalPath}/memory/events.jsonl`:
|
|
190
|
-
{"timestamp":"{now}","action":"task_resumed_from_interrupt","taskId":"{currentTask.id}"}
|
|
191
|
-
|
|
192
|
-
OUTPUT:
|
|
193
|
-
```
|
|
194
|
-
✅ Bug fixed ({duration})
|
|
195
|
-
|
|
196
|
-
Resumed: {currentTask.description}
|
|
197
|
-
|
|
198
|
-
p. done when finished
|
|
199
|
-
```
|
|
200
|
-
STOP
|
|
11
|
+
IF no `currentTask` → "No active task. Use p. task"
|
|
201
12
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
13
|
+
IF has subtasks AND more remaining:
|
|
14
|
+
Ask: "Next subtask?" | "Complete all?" | "Continue current?"
|
|
15
|
+
IF next → update `currentSubtaskIndex++`, output progress, STOP
|
|
16
|
+
IF continue → STOP
|
|
206
17
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
18
|
+
Mark complete:
|
|
19
|
+
- `currentTask.status = "completed"`
|
|
20
|
+
- `currentTask.completedAt = {now}`
|
|
21
|
+
- Move to `previousTask`, set `currentTask = null`
|
|
210
22
|
|
|
211
|
-
|
|
212
|
-
{FOR each in topTasks: "- {task.description}"}
|
|
23
|
+
WRITE `{globalPath}/storage/state.json`
|
|
213
24
|
|
|
214
|
-
|
|
215
|
-
```
|
|
216
|
-
STOP
|
|
217
|
-
|
|
218
|
-
IF choice == "Done for now":
|
|
219
|
-
OUTPUT:
|
|
220
|
-
```
|
|
221
|
-
✅ Bug fixed ({duration})
|
|
222
|
-
|
|
223
|
-
'{state.interruptedTask.description}' saved for later.
|
|
224
|
-
|
|
225
|
-
p. resume to return | p. task for new work
|
|
226
|
-
```
|
|
227
|
-
STOP
|
|
228
|
-
|
|
229
|
-
### Step 6: Output with Queue Suggestion
|
|
230
|
-
|
|
231
|
-
READ: `{globalPath}/storage/queue.json`
|
|
232
|
-
SET: {queueCount} = queue.tasks.length
|
|
233
|
-
SET: {topTask} = queue.tasks[0] if exists
|
|
234
|
-
|
|
235
|
-
WITH estimate:
|
|
25
|
+
**Output**:
|
|
236
26
|
```
|
|
237
27
|
✅ {task} ({duration})
|
|
238
28
|
|
|
239
|
-
|
|
240
|
-
Files: {filesChanged} | +{linesAdded}/-{linesRemoved} | Commits: {commits}
|
|
241
|
-
{IF queueCount > 0: "Queue: {queueCount} tasks | Next: {topTask.description}"}
|
|
242
|
-
|
|
243
|
-
p. task | p. ship | p. next
|
|
244
|
-
```
|
|
29
|
+
Files: {count} | Commits: {count}
|
|
245
30
|
|
|
246
|
-
|
|
31
|
+
Next:
|
|
32
|
+
- More work? → `p. task "description"`
|
|
33
|
+
- Ready to ship? → `p. ship`
|
|
34
|
+
- See queue → `p. next`
|
|
247
35
|
```
|
|
248
|
-
✅ {task} ({duration})
|
|
249
|
-
|
|
250
|
-
Files: {filesChanged} | +{linesAdded}/-{linesRemoved} | Commits: {commits}
|
|
251
|
-
{IF queueCount > 0: "Queue: {queueCount} tasks | Next: {topTask.description}"}
|
|
252
|
-
|
|
253
|
-
p. task | p. ship | p. next
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
## Error Handling
|
|
257
|
-
|
|
258
|
-
| Error | Response | Action |
|
|
259
|
-
|-------|----------|--------|
|
|
260
|
-
| No project | "No prjct project" | STOP |
|
|
261
|
-
| No active task | "No active task" | STOP |
|
|
262
|
-
| Git fails | Use zeros for metrics | CONTINUE |
|
|
263
|
-
|
|
264
|
-
## References
|
|
265
|
-
- Architecture: `~/.prjct-cli/docs/architecture.md`
|
|
266
|
-
- Validation: `~/.prjct-cli/docs/validation.md`
|