prjct-cli 0.8.6 → 0.9.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/CHANGELOG.md +216 -0
- package/CLAUDE.md +34 -0
- package/core/agentic/agent-router.js +482 -0
- package/core/agentic/command-executor.js +70 -15
- package/core/agentic/context-builder.js +4 -3
- package/core/agentic/context-filter.js +545 -0
- package/core/agentic/prompt-builder.js +48 -38
- package/core/agentic/tool-registry.js +35 -0
- package/core/command-registry.js +104 -164
- package/core/commands.js +84 -0
- package/core/domain/agent-generator.js +55 -44
- package/core/domain/architecture-generator.js +561 -0
- package/core/domain/task-stack.js +496 -0
- package/core/infrastructure/legacy-installer-detector.js +546 -0
- package/core/infrastructure/session-manager.js +14 -2
- package/core/infrastructure/setup.js +29 -11
- package/core/utils/jsonl-helper.js +137 -0
- package/package.json +1 -1
- package/scripts/install.sh +45 -8
- package/scripts/postinstall.js +5 -5
- package/templates/agents/AGENTS.md +3 -3
- package/templates/commands/analyze.md +10 -53
- package/templates/commands/ask.md +25 -338
- package/templates/commands/bug.md +11 -70
- package/templates/commands/build.md +8 -35
- package/templates/commands/cleanup.md +9 -32
- package/templates/commands/dash.md +241 -0
- package/templates/commands/design.md +5 -28
- package/templates/commands/done.md +6 -20
- package/templates/commands/feature.md +12 -225
- package/templates/commands/help.md +26 -313
- package/templates/commands/idea.md +7 -25
- package/templates/commands/init.md +15 -191
- package/templates/commands/migrate-all.md +25 -84
- package/templates/commands/next.md +6 -26
- package/templates/commands/now.md +6 -25
- package/templates/commands/pause.md +18 -0
- package/templates/commands/progress.md +5 -50
- package/templates/commands/recap.md +5 -54
- package/templates/commands/resume.md +97 -0
- package/templates/commands/ship.md +14 -135
- package/templates/commands/status.md +7 -32
- package/templates/commands/suggest.md +36 -495
- package/templates/commands/sync.md +7 -24
- package/templates/commands/work.md +44 -0
- package/templates/commands/workflow.md +3 -25
- package/templates/planning-methodology.md +195 -0
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
allowed-tools: [Read, Write, Bash]
|
|
3
|
+
description: 'Migrate all legacy projects to global storage architecture'
|
|
4
|
+
---
|
|
2
5
|
|
|
3
|
-
|
|
6
|
+
# /p:migrate-all
|
|
4
7
|
|
|
5
8
|
## Usage
|
|
6
9
|
|
|
@@ -8,113 +11,51 @@ Migrates all legacy prjct projects to the new global storage architecture.
|
|
|
8
11
|
/p:migrate-all [--deep-scan] [--remove-legacy] [--dry-run]
|
|
9
12
|
```
|
|
10
13
|
|
|
11
|
-
## What
|
|
14
|
+
## What It Does
|
|
12
15
|
|
|
13
|
-
1. **Scans
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
- Checks each project for old `.prjct/` directory structure
|
|
19
|
-
- Identifies projects that need migration
|
|
20
|
-
|
|
21
|
-
3. **Migrates Each Project**
|
|
22
|
-
- Moves data from local `.prjct/` to global `~/.prjct-cli/projects/{id}/`
|
|
23
|
-
- Creates new minimal local config (`.prjct/prjct.config.json`)
|
|
24
|
-
- Preserves all project data and history
|
|
25
|
-
|
|
26
|
-
4. **Cleanup (Optional)**
|
|
27
|
-
- Removes legacy `.prjct/` directories (with `--remove-legacy`)
|
|
28
|
-
- Keeps only the new minimal config file
|
|
29
|
-
|
|
30
|
-
5. **Reports Summary**
|
|
31
|
-
- Shows migrated, skipped, and failed projects
|
|
32
|
-
- Lists detailed errors for any failures
|
|
16
|
+
1. **Scans global storage** → Reads all project IDs from `~/.prjct-cli/projects/`
|
|
17
|
+
2. **Detects legacy structure** → Checks each project for old `.prjct/` directory
|
|
18
|
+
3. **Migrates each project** → Moves data from local `.prjct/` to global storage
|
|
19
|
+
4. **Cleanup (optional)** → Removes legacy `.prjct/` directories (with `--remove-legacy`)
|
|
20
|
+
5. **Reports summary** → Shows migrated, skipped, failed counts
|
|
33
21
|
|
|
34
22
|
## Options
|
|
35
23
|
|
|
36
24
|
- `--deep-scan`: Scan entire file system (slow but thorough)
|
|
37
|
-
- `--remove-legacy`: Delete old `.prjct/`
|
|
25
|
+
- `--remove-legacy`: Delete old `.prjct/` after successful migration
|
|
38
26
|
- `--dry-run`: Show what would be migrated without making changes
|
|
39
27
|
|
|
40
28
|
## When to Use
|
|
41
29
|
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
- **Troubleshooting**: If projects aren't working after update
|
|
30
|
+
- After major version updates (architecture changes)
|
|
31
|
+
- Upgrading from v0.7.x to v0.8.x (new global storage)
|
|
32
|
+
- Troubleshooting projects not working after update
|
|
46
33
|
|
|
47
|
-
## Migration
|
|
34
|
+
## Migration: Before → After
|
|
48
35
|
|
|
49
|
-
|
|
36
|
+
**Before (Legacy)**:
|
|
50
37
|
```
|
|
51
|
-
your-project/
|
|
52
|
-
|
|
53
|
-
core/
|
|
54
|
-
planning/
|
|
55
|
-
progress/
|
|
56
|
-
memory/
|
|
57
|
-
analysis/
|
|
58
|
-
prjct.config.json # Full config
|
|
38
|
+
your-project/.prjct/ # All data locally
|
|
39
|
+
core/, planning/, progress/, memory/, analysis/
|
|
59
40
|
```
|
|
60
41
|
|
|
61
|
-
|
|
42
|
+
**After (Global)**:
|
|
62
43
|
```
|
|
63
|
-
your-project/
|
|
64
|
-
.
|
|
65
|
-
prjct.config.json # Minimal (projectId + dataPath only)
|
|
66
|
-
|
|
67
|
-
~/.prjct-cli/projects/3a5667a5dedb/
|
|
68
|
-
core/
|
|
69
|
-
planning/
|
|
70
|
-
progress/
|
|
71
|
-
memory/
|
|
72
|
-
analysis/
|
|
73
|
-
agents/
|
|
74
|
-
project.json # System config (authors, version, etc.)
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
## Output Example
|
|
44
|
+
your-project/.prjct/
|
|
45
|
+
prjct.config.json # Minimal (projectId + dataPath only)
|
|
78
46
|
|
|
47
|
+
~/.prjct-cli/projects/{id}/
|
|
48
|
+
core/, planning/, progress/, memory/, analysis/, agents/
|
|
79
49
|
```
|
|
80
|
-
🔄 Scanning for legacy prjct projects...
|
|
81
|
-
|
|
82
|
-
📁 Found 3 projects in global storage
|
|
83
|
-
|
|
84
|
-
🔄 Migrating: /Users/jj/Apps/my-app
|
|
85
|
-
✅ Migrated successfully
|
|
86
|
-
|
|
87
|
-
🔄 Migrating: /Users/jj/Apps/other-project
|
|
88
|
-
⏭️ Already migrated
|
|
89
|
-
|
|
90
|
-
📊 Migration Summary:
|
|
91
|
-
✅ Migrated: 1
|
|
92
|
-
⏭️ Skipped: 1
|
|
93
|
-
❌ Failed: 0
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
## Error Handling
|
|
97
|
-
|
|
98
|
-
- **No global storage**: Creates directory structure
|
|
99
|
-
- **Missing project paths**: Skips projects with invalid paths
|
|
100
|
-
- **Permission errors**: Reports which projects couldn't be migrated
|
|
101
|
-
- **Already migrated**: Safely skips without changes
|
|
102
50
|
|
|
103
51
|
## Safety
|
|
104
52
|
|
|
105
53
|
- **Idempotent**: Safe to run multiple times
|
|
106
54
|
- **Non-destructive**: Original files only removed with `--remove-legacy`
|
|
107
|
-
- **Dry run
|
|
55
|
+
- **Dry run**: Test with `--dry-run` first
|
|
108
56
|
- **Automatic backup**: Legacy data preserved until explicitly removed
|
|
109
57
|
|
|
110
58
|
## Requirements
|
|
111
59
|
|
|
112
60
|
- Write permissions to `~/.prjct-cli/` and project directories
|
|
113
61
|
- Projects must have valid global config in `project.json`
|
|
114
|
-
|
|
115
|
-
## Notes
|
|
116
|
-
|
|
117
|
-
- This command does NOT require an initialized prjct project
|
|
118
|
-
- Migration is automatic on install (but manual execution is safer)
|
|
119
|
-
- Always test with `--dry-run` first for large migrations
|
|
120
|
-
- Can be safely interrupted and resumed
|
|
@@ -1,34 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
allowed-tools: [Read]
|
|
3
|
-
description: 'Show priority queue
|
|
3
|
+
description: 'Show priority queue'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# /p:next
|
|
7
7
|
|
|
8
8
|
## Flow
|
|
9
|
+
1. Check `core/now.md` → warn if active
|
|
10
|
+
2. Read `core/next.md` → top 5 non-blocked
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## Response (active task)
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
⚠️ Active: {current_task}
|
|
18
|
-
Started: {time_ago}
|
|
19
|
-
|
|
20
|
-
Complete first: /p:done
|
|
21
|
-
|
|
22
|
-
📋 Queue preview:
|
|
23
|
-
{top_5_numbered}
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Response (no active)
|
|
27
|
-
|
|
28
|
-
```
|
|
29
|
-
📋 Priority Queue
|
|
30
|
-
|
|
31
|
-
{numbered_tasks_1_to_5}
|
|
32
|
-
|
|
33
|
-
/p:build {1-5} | /p:build "{task}"
|
|
34
|
-
```
|
|
12
|
+
## Response
|
|
13
|
+
**Active**: `⚠️ Active: {task} | Complete: /p:done`
|
|
14
|
+
**Queue**: Show 1-5 → `/p:work {N}`
|
|
@@ -1,33 +1,14 @@
|
|
|
1
1
|
---
|
|
2
|
-
allowed-tools: [Read, Write]
|
|
3
|
-
description: '
|
|
2
|
+
allowed-tools: [Read, Write, GetTimestamp]
|
|
3
|
+
description: 'Current task'
|
|
4
|
+
timestamp-rule: 'GetTimestamp() for timestamps'
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# /p:now
|
|
7
8
|
|
|
8
|
-
## Usage
|
|
9
|
-
|
|
10
|
-
```
|
|
11
|
-
/p:now # Show
|
|
12
|
-
/p:now [task] # Set
|
|
13
|
-
```
|
|
14
|
-
|
|
15
9
|
## Flow
|
|
16
|
-
|
|
17
|
-
**
|
|
18
|
-
|
|
19
|
-
**Set**:
|
|
20
|
-
|
|
21
|
-
1. Write: `core/now.md` with task + timestamp
|
|
22
|
-
2. Update: `core/context.md`, `progress/metrics.md`
|
|
23
|
-
3. Log: `memory/context.jsonl`
|
|
10
|
+
**Show**: Read `core/now.md`
|
|
11
|
+
**Set**: Write now.md + {GetTimestamp()} → Log
|
|
24
12
|
|
|
25
13
|
## Response
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
🎯 {task}
|
|
29
|
-
Started: {time}
|
|
30
|
-
|
|
31
|
-
Done? → /p:done
|
|
32
|
-
Stuck? → /p:stuck
|
|
33
|
-
```
|
|
14
|
+
`🎯 {task} | Started: {time} | Done: /p:done`
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
allowed-tools: [Read, Write, GetTimestamp]
|
|
3
|
+
description: 'Pause task'
|
|
4
|
+
timestamp-rule: 'GetTimestamp() for paused'
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /p:pause
|
|
8
|
+
|
|
9
|
+
## Check
|
|
10
|
+
Requires active in `core/stack.jsonl`
|
|
11
|
+
|
|
12
|
+
## Flow
|
|
13
|
+
1. Find active → Set status='paused', paused={GetTimestamp()}
|
|
14
|
+
2. Update stack.jsonl + now.md
|
|
15
|
+
3. Log: `{"ts":"{GetTimestamp()}","type":"task_pause","task":"{t}"}`
|
|
16
|
+
|
|
17
|
+
## Response
|
|
18
|
+
`⏸️ {task} | Active: {duration} | Resume: /p:resume`
|
|
@@ -1,59 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
allowed-tools: [Read]
|
|
3
|
-
description: 'Progress metrics
|
|
3
|
+
description: 'Progress metrics'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# /p:progress
|
|
7
7
|
|
|
8
|
-
## Usage
|
|
9
|
-
|
|
10
|
-
```
|
|
11
|
-
/p:progress [day|week|month] # Default: week
|
|
12
|
-
```
|
|
13
|
-
|
|
14
8
|
## Flow
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
3. **Read sessions**: Query `progress/sessions/{YYYY-MM}/` for date range
|
|
19
|
-
4. **Aggregate**: Ships, tasks, duration from sessions
|
|
20
|
-
5. **Calculate**: Velocity, trends, quality metrics
|
|
21
|
-
6. Display: detailed metrics
|
|
22
|
-
|
|
23
|
-
## Session Queries by Period
|
|
24
|
-
|
|
25
|
-
```javascript
|
|
26
|
-
// Day: Today's sessions
|
|
27
|
-
const today = await readSessionFile('progress/sessions', today)
|
|
28
|
-
const shipped = today.filter(s => s.type === 'feature_ship')
|
|
29
|
-
|
|
30
|
-
// Week: Last 7 days
|
|
31
|
-
const weekSessions = await readSessions('progress/sessions', -7, 'now')
|
|
32
|
-
const velocity = weekSessions.filter(s => s.type === 'feature_ship').length / 7
|
|
33
|
-
|
|
34
|
-
// Month: Last 30 days
|
|
35
|
-
const monthSessions = await readSessions('progress/sessions', -30, 'now')
|
|
36
|
-
const totalTime = monthSessions
|
|
37
|
-
.filter(s => s.type === 'feature_ship')
|
|
38
|
-
.reduce((sum, s) => sum + parseTime(s.duration), 0)
|
|
39
|
-
```
|
|
9
|
+
1. Parse period (day/week/month, default: week)
|
|
10
|
+
2. Read sessions → filter by date range
|
|
11
|
+
3. Aggregate: ships, velocity, trends
|
|
40
12
|
|
|
41
13
|
## Response
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
📈 PROGRESS - This {period}
|
|
45
|
-
━━━━━━━━━━━━━━━━━━━━━
|
|
46
|
-
|
|
47
|
-
🚀 SHIPPED: {N} features
|
|
48
|
-
⚡ VELOCITY: {X.X} features/day
|
|
49
|
-
📊 TREND: {↗ +X%}
|
|
50
|
-
|
|
51
|
-
Recent ships:
|
|
52
|
-
• ✅ {feature} ({time_ago})
|
|
53
|
-
• ✅ {feature} ({time_ago})
|
|
54
|
-
|
|
55
|
-
🏆 Best day: {day} ({N} features)
|
|
56
|
-
🔥 Streak: {N} days
|
|
57
|
-
|
|
58
|
-
/p:ship | /p:status
|
|
59
|
-
```
|
|
14
|
+
`📈 {period} | 🚀 {N} shipped | ⚡ {velocity}/day | Trend: {↗%}`
|
|
@@ -1,63 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
allowed-tools: [Read]
|
|
3
|
-
description: 'Project
|
|
3
|
+
description: 'Project overview'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# /p:recap
|
|
7
7
|
|
|
8
|
-
## Usage
|
|
9
|
-
|
|
10
|
-
```
|
|
11
|
-
/p:recap # Full overview
|
|
12
|
-
/p:context # Alias for recap
|
|
13
|
-
```
|
|
14
|
-
|
|
15
8
|
## Flow
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
3. **Aggregate**: Metrics from sessions (features added, tasks done, ships)
|
|
20
|
-
4. **Display**: Comprehensive context and status
|
|
21
|
-
|
|
22
|
-
## Session Queries
|
|
23
|
-
|
|
24
|
-
```javascript
|
|
25
|
-
// Aggregate last 7 days activity
|
|
26
|
-
const recentSessions = await readSessions('*/sessions', -7, 'now')
|
|
27
|
-
const shipped = recentSessions.filter(s => s.type === 'feature_ship').length
|
|
28
|
-
const tasksComplete = recentSessions.filter(s => s.type === 'task_complete').length
|
|
29
|
-
const velocity = shipped / 7 // features per day
|
|
30
|
-
```
|
|
9
|
+
1. Read: core/, progress/, planning/ (30 days)
|
|
10
|
+
2. Read: sessions (7 days) → aggregate metrics
|
|
11
|
+
3. Show: project, focus, progress, activity
|
|
31
12
|
|
|
32
13
|
## Response
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
📊 PROJECT OVERVIEW
|
|
36
|
-
━━━━━━━━━━━━━━━━━━
|
|
37
|
-
|
|
38
|
-
📦 PROJECT
|
|
39
|
-
Type: {type}
|
|
40
|
-
Stack: {stack}
|
|
41
|
-
|
|
42
|
-
🎯 CURRENT FOCUS
|
|
43
|
-
Task: {task}
|
|
44
|
-
Started: {time_ago} ({duration})
|
|
45
|
-
|
|
46
|
-
📈 PROGRESS
|
|
47
|
-
Shipped: {X} this week
|
|
48
|
-
Velocity: {X.X} features/day
|
|
49
|
-
|
|
50
|
-
💡 PLANNING
|
|
51
|
-
Queue: {N} tasks
|
|
52
|
-
Ideas: {M} captured
|
|
53
|
-
Roadmap: {X}% complete
|
|
54
|
-
|
|
55
|
-
🔄 RECENT ACTIVITY
|
|
56
|
-
• {event}: {desc} ({time_ago})
|
|
57
|
-
• {event}: {desc} ({time_ago})
|
|
58
|
-
• {event}: {desc} ({time_ago})
|
|
59
|
-
|
|
60
|
-
{motivational_message}
|
|
61
|
-
|
|
62
|
-
/p:now | /p:status | /p:next
|
|
63
|
-
```
|
|
14
|
+
`📊 {project} | 🎯 {task} | 📈 {shipped}/week | Queue: {N}`
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
allowed-tools: [Read, Write, GetTimestamp]
|
|
3
|
+
description: 'Resume paused task'
|
|
4
|
+
timestamp-rule: 'GetTimestamp() for resumed'
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /p:resume
|
|
8
|
+
|
|
9
|
+
## Check
|
|
10
|
+
- Requires paused tasks
|
|
11
|
+
- Blocks if active exists
|
|
12
|
+
|
|
13
|
+
## Flow
|
|
14
|
+
1. Select: last/ID/# → Set status='active', resumed={GetTimestamp()}
|
|
15
|
+
2. Update stack.jsonl + now.md → Log resume
|
|
16
|
+
|
|
17
|
+
## Response
|
|
18
|
+
`▶️ {task} | Paused: {duration} | {agent} | Done: /p:done`
|
|
19
|
+
|
|
20
|
+
## Examples
|
|
21
|
+
|
|
22
|
+
### Resume last paused
|
|
23
|
+
```
|
|
24
|
+
/p:resume
|
|
25
|
+
→ Resumes most recently paused task
|
|
26
|
+
→ Picks up exactly where you left off
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Resume specific task
|
|
30
|
+
```
|
|
31
|
+
/p:resume task-1234567890
|
|
32
|
+
→ Resumes task by ID
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Resume by number
|
|
36
|
+
```
|
|
37
|
+
/p:resume 2
|
|
38
|
+
→ Resumes 2nd task from paused list
|
|
39
|
+
→ Useful when shown list by /p:stack
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Stack Display Format
|
|
43
|
+
|
|
44
|
+
When multiple paused tasks exist:
|
|
45
|
+
```
|
|
46
|
+
⏸️ Paused tasks (3):
|
|
47
|
+
|
|
48
|
+
1. Fix login validation bug
|
|
49
|
+
Paused 10m ago | Active time: 45m
|
|
50
|
+
|
|
51
|
+
2. Implement dark mode toggle
|
|
52
|
+
Paused 2h ago | Active time: 1h 20m
|
|
53
|
+
|
|
54
|
+
3. Update documentation
|
|
55
|
+
Paused yesterday | Active time: 30m
|
|
56
|
+
|
|
57
|
+
Resume: /p:resume {1-3}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Natural Language Support
|
|
61
|
+
|
|
62
|
+
Detect intent for resume:
|
|
63
|
+
- "p. resume" → Resume last paused
|
|
64
|
+
- "p. continue" → Resume last paused
|
|
65
|
+
- "p. back to {task}" → Resume matching task
|
|
66
|
+
- "p. resume 2" → Resume task #2
|
|
67
|
+
|
|
68
|
+
## Error Handling
|
|
69
|
+
|
|
70
|
+
### No paused tasks
|
|
71
|
+
```
|
|
72
|
+
❌ No paused tasks to resume
|
|
73
|
+
|
|
74
|
+
See what's in queue:
|
|
75
|
+
→ /p:next
|
|
76
|
+
|
|
77
|
+
Start new task:
|
|
78
|
+
→ /p:work "{task}"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Active task exists
|
|
82
|
+
```
|
|
83
|
+
❌ Already working on: {current_task}
|
|
84
|
+
|
|
85
|
+
Options:
|
|
86
|
+
→ /p:done (complete current)
|
|
87
|
+
→ /p:pause (pause current)
|
|
88
|
+
→ /p:switch {task_id} (atomic switch)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Invalid task ID
|
|
92
|
+
```
|
|
93
|
+
❌ Task {id} not found or not paused
|
|
94
|
+
|
|
95
|
+
See paused tasks:
|
|
96
|
+
→ /p:stack
|
|
97
|
+
```
|
|
@@ -1,148 +1,27 @@
|
|
|
1
1
|
---
|
|
2
|
-
allowed-tools: [Read, Write, Bash]
|
|
3
|
-
description: 'Ship feature
|
|
2
|
+
allowed-tools: [Read, Write, Bash, GetTimestamp, GetDate]
|
|
3
|
+
description: 'Ship feature workflow'
|
|
4
|
+
timestamp-rule: 'GetTimestamp() and GetDate() for timestamps'
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# /p:ship
|
|
7
8
|
|
|
8
|
-
##
|
|
9
|
+
## Workflow (non-blocking)
|
|
10
|
+
1. Lint → Tests → Docs update
|
|
11
|
+
2. Version bump → CHANGELOG
|
|
12
|
+
3. Commit + push (prjct footer)
|
|
13
|
+
4. Log: `progress/sessions/{YY-MM}/{DD}.jsonl`
|
|
14
|
+
5. Update: `progress/shipped.md` (30 days)
|
|
15
|
+
6. Recommend: compact
|
|
9
16
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/p:ship "<feature>" # Named feature
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Complete Workflow (Automated)
|
|
16
|
-
|
|
17
|
-
1. ✅ **Lint checks** → Run project linters
|
|
18
|
-
2. ✅ **Run tests** → Execute test suite (does NOT block if fail)
|
|
19
|
-
3. ✅ **Update docs** → Update relevant documentation
|
|
20
|
-
4. ✅ **Update version** → Bump version (patch/minor based on changes)
|
|
21
|
-
5. ✅ **Update CHANGELOG** → Add entry with changes
|
|
22
|
-
6. ✅ **Git commit** → Create commit with metadata
|
|
23
|
-
7. ✅ **Git push** → Push to remote
|
|
24
|
-
8. ✅ **Recommend compact** → Suggest conversation compacting
|
|
25
|
-
|
|
26
|
-
## Workflow Steps Detail
|
|
27
|
-
|
|
28
|
-
### Step 1: Lint Checks
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
npm run lint || yarn lint || pnpm lint
|
|
32
|
-
# If fails: Show errors but continue
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### Step 2: Run Tests
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
npm test || yarn test || pnpm test
|
|
39
|
-
# If fails: Show results but DO NOT block (no infinite loop)
|
|
40
|
-
# User decides if acceptable to ship
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### Step 3: Update Docs
|
|
44
|
-
|
|
45
|
-
- Update README if needed
|
|
46
|
-
- Update API docs if endpoints changed
|
|
47
|
-
- Update component docs if UI changed
|
|
17
|
+
## Data
|
|
18
|
+
Session: `{"ts":"{GetTimestamp()}","type":"feature_ship","name":"{f}","agent":"{a}","version":"{v}"}`
|
|
48
19
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
```json
|
|
52
|
-
// package.json
|
|
53
|
-
"version": "X.Y.Z" → "X.Y.(Z+1)" // patch for fixes
|
|
54
|
-
"version": "X.Y.Z" → "X.(Y+1).0" // minor for features
|
|
20
|
+
Commit footer:
|
|
55
21
|
```
|
|
56
|
-
|
|
57
|
-
### Step 5: Update CHANGELOG
|
|
58
|
-
|
|
59
|
-
```markdown
|
|
60
|
-
## [X.Y.Z] - YYYY-MM-DD
|
|
61
|
-
|
|
62
|
-
### Added / Changed / Fixed
|
|
63
|
-
|
|
64
|
-
- {feature_description}
|
|
65
|
-
- Agent: {agent}
|
|
66
|
-
- Time: {actual_time}
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### Step 6-7: Git Commit + Push
|
|
70
|
-
|
|
71
|
-
Auto-commit with metadata and push
|
|
72
|
-
|
|
73
|
-
### Step 8: Log to Session
|
|
74
|
-
|
|
75
|
-
Append to `progress/sessions/{YYYY-MM}/{YYYY-MM-DD}.jsonl`:
|
|
76
|
-
|
|
77
|
-
```jsonl
|
|
78
|
-
{"ts":"2025-10-04T18:00:00Z","type":"feature_ship","name":"{feature}","tasks_done":{N},"duration":"{Xh}","agent":"{agent}","version":"{X.Y.Z}"}
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
### Step 9: Update Index
|
|
82
|
-
|
|
83
|
-
Prepend to `progress/shipped.md` (keep only last 30 days):
|
|
84
|
-
|
|
85
|
-
```markdown
|
|
86
|
-
## 2025-10-04
|
|
87
|
-
- ✅ {feature_name} ({Xh}, {N} tasks, v{X.Y.Z})
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
If shipped.md has entries > 30 days old, archive to `progress/archive/shipped-{YYYY-MM}.md`
|
|
91
|
-
|
|
92
|
-
### Step 10: Update Roadmap
|
|
93
|
-
|
|
94
|
-
Mark feature as complete in `planning/roadmap.md`:
|
|
95
|
-
|
|
96
|
-
```markdown
|
|
97
|
-
## Completed
|
|
98
|
-
- [x] {feature_name} - Shipped 2025-10-04
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
### Step 11: Recommend Compact
|
|
102
|
-
|
|
103
|
-
Suggest compacting conversation after ship
|
|
104
|
-
|
|
105
|
-
## Commit Message Format
|
|
106
|
-
|
|
107
|
-
```
|
|
108
|
-
feat: {feature_name}
|
|
109
|
-
|
|
110
|
-
Agent: {agent}
|
|
111
|
-
Dev: @{github_dev}
|
|
112
|
-
Complexity: {complexity}
|
|
113
|
-
Time: {actual_time}
|
|
114
|
-
|
|
115
22
|
🤖 Generated with [p/](https://www.prjct.app/)
|
|
116
23
|
Designed for [Claude](https://www.anthropic.com/claude)
|
|
117
24
|
```
|
|
118
25
|
|
|
119
|
-
**IMPORTANT**: This footer format MUST be used in ALL commits made by prjct.
|
|
120
|
-
|
|
121
26
|
## Response
|
|
122
|
-
|
|
123
|
-
```
|
|
124
|
-
🚀 {feature} shipped!
|
|
125
|
-
|
|
126
|
-
Workflow completed:
|
|
127
|
-
✅ Lint checks: {pass/fail_continued}
|
|
128
|
-
✅ Tests: {pass/fail_continued}
|
|
129
|
-
✅ Docs: updated
|
|
130
|
-
✅ Version: {old} → {new}
|
|
131
|
-
✅ CHANGELOG: updated
|
|
132
|
-
✅ Git: committed + pushed
|
|
133
|
-
|
|
134
|
-
{agent_icon} {agent} • {actual_time}
|
|
135
|
-
|
|
136
|
-
💡 Recommendation: Compact conversation now
|
|
137
|
-
(Keeps context clean for next feature)
|
|
138
|
-
|
|
139
|
-
/p:feature | /p:done
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
## Important Notes
|
|
143
|
-
|
|
144
|
-
- **Tests/Lint failures DO NOT block shipping**
|
|
145
|
-
- User sees results and decides
|
|
146
|
-
- Prevents infinite loop of "fix → test → fail → fix"
|
|
147
|
-
- ALWAYS updates version and CHANGELOG
|
|
148
|
-
- ALWAYS commits and pushes if workflow completes
|
|
27
|
+
`🚀 {feature} | {agent} | {time} | v{version} | Next: compact`
|
|
@@ -1,42 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
allowed-tools: [Read]
|
|
3
|
-
description: 'KPI dashboard
|
|
3
|
+
description: 'KPI dashboard'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# /p:status
|
|
7
7
|
|
|
8
8
|
## Flow
|
|
9
|
+
Read metrics → Calculate KPIs → ASCII dashboard
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
2. Calculate: metrics (sprint %, tasks complete, days since ship, etc.)
|
|
12
|
-
3. Render: `ASCIIGraphics.createDashboard(data)`
|
|
13
|
-
|
|
14
|
-
## Data Structure
|
|
15
|
-
|
|
16
|
-
```js
|
|
17
|
-
{
|
|
18
|
-
sprintProgress: (complete / total) * 100,
|
|
19
|
-
tasksComplete: count,
|
|
20
|
-
tasksTotal: count,
|
|
21
|
-
ideasCount: count,
|
|
22
|
-
daysSinceShip: days,
|
|
23
|
-
currentTask: string,
|
|
24
|
-
taskTime: 'Xh Ym ago'
|
|
25
|
-
}
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## Output (Catppuccin Mocha)
|
|
29
|
-
|
|
11
|
+
## Display
|
|
30
12
|
```
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
│ Days Since Ship 3 │
|
|
36
|
-
├─ Current Focus ─────────────────┤
|
|
37
|
-
│ → {current_task} │
|
|
38
|
-
│ Started: {time_ago} │
|
|
39
|
-
└─────────────────────────────────┘
|
|
13
|
+
Sprint: [████░] {%}
|
|
14
|
+
Tasks: {done}/{total}
|
|
15
|
+
Ship: {days} ago
|
|
16
|
+
Focus: {task}
|
|
40
17
|
```
|
|
41
|
-
|
|
42
|
-
**Colors**: Mauve borders, Teal progress, Sapphire highlights, Green/Yellow/Red for status
|