prjct-cli 0.13.2 → 0.15.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.
- package/CHANGELOG.md +106 -0
- package/bin/prjct +10 -13
- package/core/agentic/memory-system/semantic-memories.ts +2 -1
- package/core/agentic/plan-mode/plan-mode.ts +2 -1
- package/core/agentic/prompt-builder.ts +22 -43
- package/core/agentic/services.ts +5 -5
- package/core/agentic/smart-context.ts +7 -2
- package/core/command-registry/core-commands.ts +54 -29
- package/core/command-registry/optional-commands.ts +64 -0
- package/core/command-registry/setup-commands.ts +18 -3
- package/core/commands/analysis.ts +21 -68
- package/core/commands/analytics.ts +247 -213
- package/core/commands/base.ts +1 -1
- package/core/commands/index.ts +41 -36
- package/core/commands/maintenance.ts +300 -31
- package/core/commands/planning.ts +233 -22
- package/core/commands/setup.ts +3 -8
- package/core/commands/shipping.ts +14 -18
- package/core/commands/types.ts +8 -6
- package/core/commands/workflow.ts +105 -100
- package/core/context/generator.ts +317 -0
- package/core/context-sync.ts +7 -350
- package/core/data/index.ts +13 -32
- package/core/data/md-ideas-manager.ts +155 -0
- package/core/data/md-queue-manager.ts +4 -3
- package/core/data/md-shipped-manager.ts +90 -0
- package/core/data/md-state-manager.ts +11 -7
- package/core/domain/agent-generator.ts +23 -63
- package/core/events/index.ts +143 -0
- package/core/index.ts +17 -14
- package/core/infrastructure/capability-installer.ts +13 -149
- package/core/infrastructure/migrator/project-scanner.ts +2 -1
- package/core/infrastructure/path-manager.ts +4 -6
- package/core/infrastructure/setup.ts +3 -0
- package/core/infrastructure/uuid-migration.ts +750 -0
- package/core/outcomes/recorder.ts +2 -1
- package/core/plugin/loader.ts +4 -7
- package/core/plugin/registry.ts +3 -3
- package/core/schemas/index.ts +23 -25
- package/core/schemas/state.ts +1 -0
- package/core/serializers/ideas-serializer.ts +187 -0
- package/core/serializers/index.ts +16 -0
- package/core/serializers/shipped-serializer.ts +108 -0
- package/core/session/utils.ts +3 -9
- package/core/storage/ideas-storage.ts +273 -0
- package/core/storage/index.ts +204 -0
- package/core/storage/queue-storage.ts +297 -0
- package/core/storage/shipped-storage.ts +223 -0
- package/core/storage/state-storage.ts +235 -0
- package/core/storage/storage-manager.ts +175 -0
- package/package.json +1 -1
- package/packages/web/app/api/projects/[id]/momentum/route.ts +257 -0
- package/packages/web/app/api/sessions/current/route.ts +132 -0
- package/packages/web/app/api/sessions/history/route.ts +96 -14
- package/packages/web/app/globals.css +5 -0
- package/packages/web/app/layout.tsx +2 -0
- package/packages/web/app/project/[id]/code/layout.tsx +18 -0
- package/packages/web/app/project/[id]/code/page.tsx +408 -0
- package/packages/web/app/project/[id]/page.tsx +359 -389
- package/packages/web/app/project/[id]/reports/page.tsx +59 -0
- package/packages/web/app/project/[id]/reports/print/page.tsx +58 -0
- package/packages/web/components/ActivityTimeline/ActivityTimeline.tsx +0 -1
- package/packages/web/components/AgentsCard/AgentsCard.tsx +64 -34
- package/packages/web/components/AgentsCard/AgentsCard.types.ts +1 -0
- package/packages/web/components/AppSidebar/AppSidebar.tsx +135 -11
- package/packages/web/components/BentoCard/BentoCard.constants.ts +3 -3
- package/packages/web/components/BentoCard/BentoCard.tsx +2 -1
- package/packages/web/components/BentoGrid/BentoGrid.tsx +2 -2
- package/packages/web/components/BlockersCard/BlockersCard.tsx +65 -57
- package/packages/web/components/BlockersCard/BlockersCard.types.ts +1 -0
- package/packages/web/components/CommandBar/CommandBar.tsx +67 -0
- package/packages/web/components/CommandBar/index.ts +1 -0
- package/packages/web/components/DashboardContent/DashboardContent.tsx +35 -5
- package/packages/web/components/DateGroup/DateGroup.tsx +1 -1
- package/packages/web/components/EmptyState/EmptyState.tsx +39 -21
- package/packages/web/components/EmptyState/EmptyState.types.ts +1 -0
- package/packages/web/components/EventRow/EventRow.tsx +4 -4
- package/packages/web/components/EventRow/EventRow.utils.ts +3 -3
- package/packages/web/components/HeroSection/HeroSection.tsx +52 -15
- package/packages/web/components/HeroSection/HeroSection.types.ts +4 -4
- package/packages/web/components/HeroSection/HeroSection.utils.ts +7 -3
- package/packages/web/components/IdeasCard/IdeasCard.tsx +94 -27
- package/packages/web/components/IdeasCard/IdeasCard.types.ts +1 -0
- package/packages/web/components/MasonryGrid/MasonryGrid.tsx +18 -0
- package/packages/web/components/MasonryGrid/index.ts +1 -0
- package/packages/web/components/MomentumWidget/MomentumWidget.tsx +119 -0
- package/packages/web/components/MomentumWidget/MomentumWidget.types.ts +16 -0
- package/packages/web/components/MomentumWidget/index.ts +2 -0
- package/packages/web/components/NowCard/NowCard.tsx +81 -56
- package/packages/web/components/NowCard/NowCard.types.ts +1 -0
- package/packages/web/components/PageHeader/PageHeader.tsx +24 -0
- package/packages/web/components/PageHeader/index.ts +1 -0
- package/packages/web/components/ProgressRing/ProgressRing.constants.ts +2 -2
- package/packages/web/components/ProjectAvatar/ProjectAvatar.tsx +2 -2
- package/packages/web/components/ProjectColorDot/ProjectColorDot.tsx +37 -0
- package/packages/web/components/ProjectColorDot/index.ts +1 -0
- package/packages/web/components/ProjectSelectorModal/ProjectSelectorModal.tsx +104 -0
- package/packages/web/components/ProjectSelectorModal/index.ts +1 -0
- package/packages/web/components/Providers/Providers.tsx +4 -1
- package/packages/web/components/QueueCard/QueueCard.tsx +78 -25
- package/packages/web/components/QueueCard/QueueCard.types.ts +1 -0
- package/packages/web/components/QueueCard/QueueCard.utils.ts +3 -3
- package/packages/web/components/RecoverCard/RecoverCard.tsx +72 -0
- package/packages/web/components/RecoverCard/RecoverCard.types.ts +16 -0
- package/packages/web/components/RecoverCard/index.ts +2 -0
- package/packages/web/components/RoadmapCard/RoadmapCard.tsx +101 -33
- package/packages/web/components/RoadmapCard/RoadmapCard.types.ts +1 -0
- package/packages/web/components/ShipsCard/ShipsCard.tsx +71 -28
- package/packages/web/components/ShipsCard/ShipsCard.types.ts +2 -0
- package/packages/web/components/SparklineChart/SparklineChart.tsx +20 -18
- package/packages/web/components/StatsMasonry/StatsMasonry.tsx +95 -0
- package/packages/web/components/StatsMasonry/index.ts +1 -0
- package/packages/web/components/StreakCard/StreakCard.tsx +37 -35
- package/packages/web/components/TasksCounter/TasksCounter.tsx +1 -1
- package/packages/web/components/TechStackBadges/TechStackBadges.tsx +12 -4
- package/packages/web/components/TerminalDock/DockToggleTab.tsx +29 -0
- package/packages/web/components/TerminalDock/TerminalDock.tsx +386 -0
- package/packages/web/components/TerminalDock/TerminalDockTab.tsx +130 -0
- package/packages/web/components/TerminalDock/TerminalTabBar.tsx +142 -0
- package/packages/web/components/TerminalDock/index.ts +2 -0
- package/packages/web/components/VelocityBadge/VelocityBadge.tsx +8 -3
- package/packages/web/components/VelocityCard/VelocityCard.tsx +49 -47
- package/packages/web/components/WeeklyReports/PrintableReport.tsx +259 -0
- package/packages/web/components/WeeklyReports/ReportPreviewCard.tsx +187 -0
- package/packages/web/components/WeeklyReports/WeekCalendar.tsx +288 -0
- package/packages/web/components/WeeklyReports/WeeklyReports.tsx +149 -0
- package/packages/web/components/WeeklyReports/index.ts +4 -0
- package/packages/web/components/WeeklySparkline/WeeklySparkline.tsx +16 -4
- package/packages/web/components/WeeklySparkline/WeeklySparkline.types.ts +1 -0
- package/packages/web/components/charts/SessionsChart.tsx +6 -3
- package/packages/web/components/ui/dialog.tsx +143 -0
- package/packages/web/components/ui/drawer.tsx +135 -0
- package/packages/web/components/ui/select.tsx +187 -0
- package/packages/web/context/GlobalTerminalContext.tsx +538 -0
- package/packages/web/lib/commands.ts +81 -0
- package/packages/web/lib/generate-week-report.ts +285 -0
- package/packages/web/lib/parse-prjct-files.ts +56 -55
- package/packages/web/lib/project-colors.ts +58 -0
- package/packages/web/lib/projects.ts +58 -5
- package/packages/web/lib/services/projects.server.ts +11 -1
- package/packages/web/next-env.d.ts +1 -1
- package/packages/web/package.json +5 -1
- package/templates/commands/analyze.md +39 -3
- package/templates/commands/ask.md +58 -3
- package/templates/commands/bug.md +117 -26
- package/templates/commands/dash.md +95 -158
- package/templates/commands/done.md +130 -148
- package/templates/commands/feature.md +125 -103
- package/templates/commands/git.md +18 -3
- package/templates/commands/idea.md +121 -38
- package/templates/commands/init.md +124 -20
- package/templates/commands/migrate-all.md +63 -28
- package/templates/commands/migrate.md +140 -0
- package/templates/commands/next.md +115 -5
- package/templates/commands/now.md +146 -82
- package/templates/commands/pause.md +89 -74
- package/templates/commands/redo.md +6 -4
- package/templates/commands/resume.md +141 -59
- package/templates/commands/ship.md +103 -231
- package/templates/commands/spec.md +98 -8
- package/templates/commands/suggest.md +22 -2
- package/templates/commands/sync.md +192 -203
- package/templates/commands/undo.md +6 -4
- package/core/data/agents-manager.ts +0 -76
- package/core/data/analysis-manager.ts +0 -83
- package/core/data/base-manager.ts +0 -156
- package/core/data/ideas-manager.ts +0 -81
- package/core/data/outcomes-manager.ts +0 -96
- package/core/data/project-manager.ts +0 -75
- package/core/data/roadmap-manager.ts +0 -118
- package/core/data/shipped-manager.ts +0 -65
- package/core/data/state-manager.ts +0 -214
- package/core/state/index.ts +0 -25
- package/core/state/manager.ts +0 -376
- package/core/state/types.ts +0 -185
- package/core/utils/project-capabilities.ts +0 -156
- package/core/view-generator.ts +0 -536
- package/packages/web/app/project/[id]/stats/loading.tsx +0 -43
- package/packages/web/app/project/[id]/stats/page.tsx +0 -253
- package/templates/agent-assignment.md +0 -72
- package/templates/analysis/project-analysis.md +0 -78
- package/templates/checklists/accessibility.md +0 -33
- package/templates/commands/build.md +0 -17
- package/templates/commands/decision.md +0 -226
- package/templates/commands/fix.md +0 -79
- package/templates/commands/help.md +0 -61
- package/templates/commands/progress.md +0 -14
- package/templates/commands/recap.md +0 -14
- package/templates/commands/roadmap.md +0 -52
- package/templates/commands/status.md +0 -17
- package/templates/commands/task.md +0 -63
- package/templates/commands/work.md +0 -44
- package/templates/commands/workflow.md +0 -12
|
@@ -1,20 +1,56 @@
|
|
|
1
1
|
---
|
|
2
2
|
allowed-tools: [Read, Grep, Glob, Bash, TodoWrite]
|
|
3
3
|
description: 'Analyze repo + generate summary'
|
|
4
|
+
architecture: 'Write-Through (JSON → MD → Events)'
|
|
5
|
+
storage-layer: true
|
|
6
|
+
source-of-truth: 'storage/analysis.json'
|
|
7
|
+
claude-context: 'context/analysis.md'
|
|
4
8
|
---
|
|
5
9
|
|
|
6
|
-
# /p:analyze
|
|
10
|
+
# /p:analyze - Analyze Repository
|
|
11
|
+
|
|
12
|
+
## Architecture: Write-Through Pattern
|
|
13
|
+
|
|
14
|
+
**Source of Truth**: `storage/analysis.json`
|
|
15
|
+
**Claude Context**: `context/analysis.md` (generated)
|
|
16
|
+
|
|
17
|
+
## Context Variables
|
|
18
|
+
- `{projectId}`: From `.prjct/prjct.config.json`
|
|
19
|
+
- `{globalPath}`: `~/.prjct-cli/projects/{projectId}`
|
|
20
|
+
- `{analysisStoragePath}`: `{globalPath}/storage/analysis.json`
|
|
21
|
+
- `{analysisContextPath}`: `{globalPath}/context/analysis.md`
|
|
7
22
|
|
|
8
23
|
## Flow
|
|
24
|
+
|
|
9
25
|
1. Scan structure → Detect tech (package.json, Gemfile, etc.)
|
|
10
26
|
2. Analyze patterns → Git status
|
|
11
|
-
3.
|
|
27
|
+
3. Write `storage/analysis.json` (source of truth)
|
|
28
|
+
4. Generate `context/analysis.md` (for Claude)
|
|
12
29
|
|
|
13
30
|
## Report
|
|
31
|
+
|
|
14
32
|
- Overview: type, lang, framework
|
|
15
33
|
- Stack: technologies detected
|
|
16
34
|
- Architecture: patterns, entry points
|
|
17
35
|
- Agents: recommend specialists
|
|
18
36
|
|
|
37
|
+
## Storage Format
|
|
38
|
+
|
|
39
|
+
### storage/analysis.json
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"projectType": "web",
|
|
43
|
+
"languages": ["typescript", "javascript"],
|
|
44
|
+
"frameworks": ["react", "next.js"],
|
|
45
|
+
"entryPoints": ["src/index.ts"],
|
|
46
|
+
"patterns": ["component-based", "api-routes"],
|
|
47
|
+
"dependencies": {...},
|
|
48
|
+
"analyzedAt": "{timestamp}"
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
19
52
|
## Response
|
|
20
|
-
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
🔍 {project} | Stack: {tech} | Saved: context/analysis.md
|
|
56
|
+
```
|
|
@@ -1,18 +1,35 @@
|
|
|
1
1
|
---
|
|
2
2
|
allowed-tools: [Read]
|
|
3
3
|
description: 'Conversational intent to action translator - helps users understand what to do'
|
|
4
|
+
architecture: 'Write-Through (JSON → MD → Events)'
|
|
5
|
+
storage-layer: true
|
|
6
|
+
source-of-truth: 'storage/*.json'
|
|
4
7
|
---
|
|
5
8
|
|
|
6
|
-
# /p:ask
|
|
9
|
+
# /p:ask - Intent to Action Translator
|
|
10
|
+
|
|
11
|
+
## Architecture: Write-Through Pattern
|
|
12
|
+
|
|
13
|
+
Reads from **Storage (JSON)** as source of truth.
|
|
14
|
+
|
|
15
|
+
**Source of Truth**:
|
|
16
|
+
- `storage/state.json` - Current task
|
|
17
|
+
- `storage/queue.json` - Task queue
|
|
7
18
|
|
|
8
19
|
## Purpose
|
|
9
20
|
|
|
10
21
|
Translate natural language intent into actionable prjct command flows. Helps users who know WHAT they want but don't know HOW.
|
|
11
22
|
|
|
23
|
+
## Context Variables
|
|
24
|
+
- `{projectId}`: From `.prjct/prjct.config.json`
|
|
25
|
+
- `{globalPath}`: `~/.prjct-cli/projects/{projectId}`
|
|
26
|
+
- `{statePath}`: `{globalPath}/storage/state.json`
|
|
27
|
+
- `{queuePath}`: `{globalPath}/storage/queue.json`
|
|
28
|
+
|
|
12
29
|
## Flow
|
|
13
30
|
|
|
14
31
|
1. **Understand intent**: Parse user's natural language description
|
|
15
|
-
2. **Analyze context**: Read project state (`
|
|
32
|
+
2. **Analyze context**: Read project state (`storage/state.json`, `storage/queue.json`)
|
|
16
33
|
3. **Recommend flow**: Suggest specific command sequence with explanations
|
|
17
34
|
4. **Ask confirmation**: Interactive - don't execute automatically
|
|
18
35
|
|
|
@@ -31,7 +48,45 @@ Translate natural language intent into actionable prjct command flows. Helps use
|
|
|
31
48
|
→ `/p:design {target} --type {architecture|api|component|database|flow}` → `/p:feature "implement {design}"` → `/p:build 1`
|
|
32
49
|
|
|
33
50
|
**5. Lost/Confused**: "don't know", "help", "stuck", "what should"
|
|
34
|
-
→ `/p:suggest` (context-aware recommendations) OR `/p:
|
|
51
|
+
→ `/p:suggest` (context-aware recommendations) OR `/p:dash` (see status)
|
|
52
|
+
|
|
53
|
+
**6. Troubleshooting/Fixes**: "error", "broken", "not working", "fix", "stuck on"
|
|
54
|
+
→ Diagnose issue → Provide fix or guidance
|
|
55
|
+
|
|
56
|
+
## Troubleshooting Mode (absorbed from /p:fix)
|
|
57
|
+
|
|
58
|
+
When intent is troubleshooting, provide structured guidance:
|
|
59
|
+
|
|
60
|
+
### Auto-Fix (Technical Errors)
|
|
61
|
+
- **Dependencies**: `npm install` missing packages
|
|
62
|
+
- **Config**: Fix malformed JSON/YAML
|
|
63
|
+
- **Syntax**: ESLint/Prettier auto-fix
|
|
64
|
+
- **Tests**: Update snapshots, fix imports
|
|
65
|
+
- **Git**: Resolve merge conflicts
|
|
66
|
+
|
|
67
|
+
### Guidance (When Stuck)
|
|
68
|
+
| Issue Type | Approach |
|
|
69
|
+
|------------|----------|
|
|
70
|
+
| Bug | Check logs → Isolate → Search error → Test fix |
|
|
71
|
+
| Design | Define requirements → Start simple → Ship MVP → Iterate |
|
|
72
|
+
| Performance | Profile first → Fix slowest → Cache ops → Measure |
|
|
73
|
+
| Blocked | Break into tasks → Start smallest → Ship incrementally |
|
|
74
|
+
|
|
75
|
+
### Response Format (troubleshooting)
|
|
76
|
+
```
|
|
77
|
+
🔍 Diagnosed: {issue}
|
|
78
|
+
|
|
79
|
+
Suggested fixes:
|
|
80
|
+
1. {fix_option_1}
|
|
81
|
+
2. {fix_option_2}
|
|
82
|
+
3. {fix_option_3}
|
|
83
|
+
|
|
84
|
+
Let's break it down:
|
|
85
|
+
1. {subtask} (~{time})
|
|
86
|
+
2. {subtask} (~{time})
|
|
87
|
+
|
|
88
|
+
Start with: /p:now "{first_subtask}"
|
|
89
|
+
```
|
|
35
90
|
|
|
36
91
|
## Response Format
|
|
37
92
|
|
|
@@ -1,9 +1,33 @@
|
|
|
1
1
|
---
|
|
2
2
|
allowed-tools: [Read, Write, Task, Glob]
|
|
3
3
|
description: 'Report bug with auto-priority'
|
|
4
|
+
architecture: 'Write-Through (JSON → MD → Events)'
|
|
5
|
+
storage-layer: true
|
|
6
|
+
source-of-truth: 'storage/queue.json'
|
|
7
|
+
claude-context: 'context/next.md'
|
|
8
|
+
backend-sync: 'sync/pending.json'
|
|
4
9
|
---
|
|
5
10
|
|
|
6
|
-
# /p:bug
|
|
11
|
+
# /p:bug - Report Bug with Auto-Priority
|
|
12
|
+
|
|
13
|
+
## Architecture: Write-Through Pattern
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
User Action → Storage (JSON) → Context (MD) → Sync Events
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**Source of Truth**: `storage/queue.json`
|
|
20
|
+
**Claude Context**: `context/next.md` (generated)
|
|
21
|
+
**Backend Sync**: `sync/pending.json` (events)
|
|
22
|
+
|
|
23
|
+
## Context Variables
|
|
24
|
+
- `{projectId}`: From `.prjct/prjct.config.json`
|
|
25
|
+
- `{globalPath}`: `~/.prjct-cli/projects/{projectId}`
|
|
26
|
+
- `{queuePath}`: `{globalPath}/storage/queue.json`
|
|
27
|
+
- `{nextContextPath}`: `{globalPath}/context/next.md`
|
|
28
|
+
- `{syncPath}`: `{globalPath}/sync/pending.json`
|
|
29
|
+
- `{memoryPath}`: `{globalPath}/memory/events.jsonl`
|
|
30
|
+
- `{description}`: User-provided bug description
|
|
7
31
|
|
|
8
32
|
## Agent Delegation (REQUIRED)
|
|
9
33
|
|
|
@@ -11,36 +35,103 @@ Before fixing a bug, delegate to specialist agent:
|
|
|
11
35
|
|
|
12
36
|
1. **List agents**: `Glob("~/.prjct-cli/projects/{projectId}/agents/*.md")`
|
|
13
37
|
2. **Analyze bug domain**: frontend, backend, database, etc.
|
|
14
|
-
3. **Delegate via Task tool
|
|
38
|
+
3. **Delegate via Task tool**
|
|
15
39
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
40
|
+
## Severity Keywords
|
|
41
|
+
|
|
42
|
+
| Keywords | Severity | Queue Position |
|
|
43
|
+
|----------|----------|----------------|
|
|
44
|
+
| crash, down, broken, production | Critical | Top |
|
|
45
|
+
| error, fail, issue | High | Top |
|
|
46
|
+
| bug, incorrect, wrong | Medium | Normal |
|
|
47
|
+
| minor, typo, cosmetic | Low | Bottom |
|
|
22
48
|
|
|
23
|
-
|
|
24
|
-
|
|
49
|
+
## Flow
|
|
50
|
+
|
|
51
|
+
1. Parse description for severity keywords
|
|
52
|
+
2. Generate task ID (UUID)
|
|
53
|
+
3. Add to queue with appropriate priority
|
|
54
|
+
4. Generate context/next.md
|
|
55
|
+
5. Queue sync event
|
|
56
|
+
6. Log to memory
|
|
57
|
+
|
|
58
|
+
## Update Storage (SOURCE OF TRUTH)
|
|
25
59
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
60
|
+
GENERATE: {taskId} = UUID v4
|
|
61
|
+
SET: {now} = GetTimestamp()
|
|
62
|
+
|
|
63
|
+
### Create bug task
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"id": "{taskId}",
|
|
67
|
+
"description": "🐛 {description}",
|
|
68
|
+
"type": "bug",
|
|
69
|
+
"priority": "{severity}",
|
|
70
|
+
"section": "active",
|
|
71
|
+
"createdAt": "{now}"
|
|
72
|
+
}
|
|
32
73
|
```
|
|
33
74
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
75
|
+
### Update queue.json
|
|
76
|
+
READ: `{queuePath}`
|
|
77
|
+
IF severity is "critical" or "high":
|
|
78
|
+
INSERT at top of tasks array
|
|
79
|
+
ELSE:
|
|
80
|
+
APPEND to tasks array
|
|
81
|
+
WRITE: `{queuePath}`
|
|
39
82
|
|
|
40
|
-
##
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
83
|
+
## Queue Sync Event
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"type": "queue.task_added",
|
|
88
|
+
"path": ["queue"],
|
|
89
|
+
"data": {
|
|
90
|
+
"taskId": "{taskId}",
|
|
91
|
+
"description": "🐛 {description}",
|
|
92
|
+
"priority": "{severity}",
|
|
93
|
+
"type": "bug"
|
|
94
|
+
},
|
|
95
|
+
"timestamp": "{now}",
|
|
96
|
+
"projectId": "{projectId}"
|
|
97
|
+
}
|
|
98
|
+
```
|
|
44
99
|
|
|
45
100
|
## Response
|
|
46
|
-
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
🐛 [{severity}] {description}
|
|
104
|
+
|
|
105
|
+
Queued at position #{position}
|
|
106
|
+
Priority: {severity}
|
|
107
|
+
|
|
108
|
+
Start: /p:now "🐛 {description}"
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Examples
|
|
112
|
+
|
|
113
|
+
### Critical Bug
|
|
114
|
+
```
|
|
115
|
+
Input: /p:bug production server is down
|
|
116
|
+
|
|
117
|
+
Output:
|
|
118
|
+
🐛 [critical] production server is down
|
|
119
|
+
|
|
120
|
+
Queued at position #1
|
|
121
|
+
Priority: critical
|
|
122
|
+
|
|
123
|
+
Start: /p:now "🐛 production server is down"
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Normal Bug
|
|
127
|
+
```
|
|
128
|
+
Input: /p:bug login form validation not working
|
|
129
|
+
|
|
130
|
+
Output:
|
|
131
|
+
🐛 [medium] login form validation not working
|
|
132
|
+
|
|
133
|
+
Queued at position #3
|
|
134
|
+
Priority: medium
|
|
135
|
+
|
|
136
|
+
Start: /p:now "🐛 login form validation not working"
|
|
137
|
+
```
|
|
@@ -2,9 +2,23 @@
|
|
|
2
2
|
allowed-tools: [Read, GetTimestamp, GetDate]
|
|
3
3
|
description: 'Unified dashboard - project status, progress, and roadmap'
|
|
4
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'
|
|
5
9
|
---
|
|
6
10
|
|
|
7
|
-
# /p:dash
|
|
11
|
+
# /p:dash - Unified Dashboard
|
|
12
|
+
|
|
13
|
+
## Architecture: Write-Through Pattern
|
|
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
|
|
8
22
|
|
|
9
23
|
## Usage
|
|
10
24
|
|
|
@@ -16,15 +30,21 @@ timestamp-rule: 'ALWAYS use GetTimestamp() and GetDate() tools for timestamps'
|
|
|
16
30
|
/p:dash compact # Minimal status only
|
|
17
31
|
```
|
|
18
32
|
|
|
33
|
+
## Context Variables
|
|
34
|
+
- `{projectId}`: From `.prjct/prjct.config.json`
|
|
35
|
+
- `{globalPath}`: `~/.prjct-cli/projects/{projectId}`
|
|
36
|
+
- `{statePath}`: `{globalPath}/storage/state.json`
|
|
37
|
+
- `{queuePath}`: `{globalPath}/storage/queue.json`
|
|
38
|
+
- `{ideasPath}`: `{globalPath}/storage/ideas.json`
|
|
39
|
+
- `{shippedPath}`: `{globalPath}/storage/shipped.json`
|
|
40
|
+
|
|
19
41
|
## Flow
|
|
20
42
|
|
|
21
|
-
1. **Read all
|
|
22
|
-
- `
|
|
23
|
-
- `
|
|
24
|
-
- `
|
|
25
|
-
- `
|
|
26
|
-
- `planning/ideas.md` → Recent ideas
|
|
27
|
-
- `progress/metrics.md` → Velocity metrics
|
|
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
|
|
28
48
|
|
|
29
49
|
2. **Calculate metrics**:
|
|
30
50
|
- Current task and elapsed time
|
|
@@ -33,7 +53,6 @@ timestamp-rule: 'ALWAYS use GetTimestamp() and GetDate() tools for timestamps'
|
|
|
33
53
|
- Queue depth
|
|
34
54
|
- Days since last ship
|
|
35
55
|
- Velocity (tasks/week)
|
|
36
|
-
- Sprint progress percentage
|
|
37
56
|
|
|
38
57
|
3. **Generate view based on param**:
|
|
39
58
|
- Default → Balanced overview
|
|
@@ -51,33 +70,34 @@ timestamp-rule: 'ALWAYS use GetTimestamp() and GetDate() tools for timestamps'
|
|
|
51
70
|
├─────────────────────────────────────────┤
|
|
52
71
|
│ 🎯 Current Focus │
|
|
53
72
|
│ {active_task} │
|
|
54
|
-
│ Started: {time_ago} |
|
|
73
|
+
│ Started: {time_ago} | Session: {id} │
|
|
55
74
|
├─────────────────────────────────────────┤
|
|
56
|
-
│ ⏸️ Paused
|
|
57
|
-
│ 1. {task} (paused {time} ago) │
|
|
75
|
+
│ ⏸️ Paused: {paused_task or "None"} │
|
|
58
76
|
├─────────────────────────────────────────┤
|
|
59
|
-
│ 📋
|
|
60
|
-
│ • {next_task_1}
|
|
61
|
-
│ • {next_task_2}
|
|
62
|
-
│ • {next_task_3}
|
|
63
|
-
│ → /p:next for full queue │
|
|
77
|
+
│ 📋 Queue ({queue_count}) │
|
|
78
|
+
│ • {next_task_1} │
|
|
79
|
+
│ • {next_task_2} │
|
|
80
|
+
│ • {next_task_3} │
|
|
64
81
|
├─────────────────────────────────────────┤
|
|
65
|
-
│
|
|
66
|
-
│
|
|
67
|
-
│
|
|
68
|
-
│ Shipped: {M} features │
|
|
69
|
-
│ Velocity: {V} tasks/week │
|
|
82
|
+
│ 🚀 Recent Ships │
|
|
83
|
+
│ • {ship_1} - {date} │
|
|
84
|
+
│ • {ship_2} - {date} │
|
|
70
85
|
├─────────────────────────────────────────┤
|
|
71
|
-
│
|
|
72
|
-
│ {last_shipped_feature} │
|
|
73
|
-
├─────────────────────────────────────────┤
|
|
74
|
-
│ 🗺️ Roadmap Status │
|
|
75
|
-
│ Phase: {current_phase} ({progress}%) │
|
|
76
|
-
│ Next milestone: {milestone} │
|
|
86
|
+
│ 💡 Ideas ({ideas_count}) │
|
|
77
87
|
└─────────────────────────────────────────┘
|
|
78
88
|
|
|
79
|
-
|
|
80
|
-
|
|
89
|
+
Next: /p:now | /p:done | /p:ship
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Compact View
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
🎯 {active_task} ({time_elapsed})
|
|
96
|
+
📋 Queue: {queue_count} | ⏸️ Paused: {paused ? "Yes" : "No"}
|
|
97
|
+
🚀 Last ship: {days}d ago
|
|
98
|
+
💡 Ideas: {ideas_count}
|
|
99
|
+
|
|
100
|
+
→ /p:done | /p:next | /p:ship
|
|
81
101
|
```
|
|
82
102
|
|
|
83
103
|
### Weekly Progress View
|
|
@@ -85,157 +105,74 @@ timestamp-rule: 'ALWAYS use GetTimestamp() and GetDate() tools for timestamps'
|
|
|
85
105
|
```
|
|
86
106
|
📊 WEEKLY PROGRESS - Week of {week_start}
|
|
87
107
|
|
|
88
|
-
##
|
|
89
|
-
|
|
90
|
-
### Completed Tasks ({count})
|
|
108
|
+
## Completed Tasks ({count})
|
|
91
109
|
✅ {task_1} - {duration}
|
|
92
110
|
✅ {task_2} - {duration}
|
|
93
|
-
✅ {task_3} - {duration}
|
|
94
111
|
|
|
95
|
-
|
|
96
|
-
🚀 {feature_1} - {
|
|
97
|
-
🚀 {feature_2} - {complexity} - {date}
|
|
98
|
-
|
|
99
|
-
## 📈 Metrics
|
|
112
|
+
## Features Shipped ({count})
|
|
113
|
+
🚀 {feature_1} - {date}
|
|
100
114
|
|
|
115
|
+
## Metrics
|
|
101
116
|
**Velocity**: {tasks_per_day} tasks/day
|
|
102
117
|
**Focus Time**: {total_hours} hours
|
|
103
|
-
**Efficiency**: {completion_rate}%
|
|
104
|
-
**Interruptions**: {pause_count} pauses
|
|
105
|
-
|
|
106
|
-
## 🔄 Week-over-Week
|
|
107
|
-
|
|
108
|
-
Compared to last week:
|
|
109
|
-
• Tasks: {trend} ({percentage}%)
|
|
110
|
-
• Velocity: {trend} ({percentage}%)
|
|
111
|
-
• Ships: {trend} ({count_diff})
|
|
112
|
-
|
|
113
|
-
## 📋 Upcoming
|
|
114
|
-
|
|
115
|
-
Next week's priorities:
|
|
116
|
-
1. {priority_1}
|
|
117
|
-
2. {priority_2}
|
|
118
|
-
3. {priority_3}
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
### Roadmap View
|
|
122
|
-
|
|
123
118
|
```
|
|
124
|
-
🗺️ ROADMAP & PLANNING
|
|
125
119
|
|
|
126
|
-
##
|
|
127
|
-
Progress: [████████░░] {percentage}%
|
|
128
|
-
Timeline: {start_date} → {end_date}
|
|
129
|
-
Status: {on_track|at_risk|delayed}
|
|
120
|
+
## Data Sources
|
|
130
121
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
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[]` |
|
|
135
129
|
|
|
136
|
-
|
|
137
|
-
✅ {milestone_1} - {date}
|
|
138
|
-
✅ {milestone_2} - {date}
|
|
130
|
+
## Error Handling
|
|
139
131
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
**Phase 2**: {name} ({estimate})
|
|
147
|
-
- {key_feature_1}
|
|
148
|
-
- {key_feature_2}
|
|
149
|
-
|
|
150
|
-
**Phase 3**: {name} ({estimate})
|
|
151
|
-
- {key_feature_1}
|
|
152
|
-
- {key_feature_2}
|
|
153
|
-
|
|
154
|
-
## 💡 Recent Ideas ({count})
|
|
155
|
-
• {idea_1} - {priority}
|
|
156
|
-
• {idea_2} - {priority}
|
|
157
|
-
• {idea_3} - {priority}
|
|
158
|
-
|
|
159
|
-
→ /p:idea for new ideas
|
|
160
|
-
→ /p:feature to add to roadmap
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
### Compact View
|
|
164
|
-
|
|
165
|
-
```
|
|
166
|
-
🎯 {active_task} ({time_elapsed})
|
|
167
|
-
📋 Queue: {queue_count} | ⏸️ Paused: {paused_count}
|
|
168
|
-
📈 Week: {tasks_done} done | {velocity}/day
|
|
169
|
-
🚀 Last ship: {days}d ago
|
|
170
|
-
|
|
171
|
-
→ /p:done | /p:next | /p:ship
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
## Contextual Suggestions
|
|
175
|
-
|
|
176
|
-
Based on project state, suggest next actions:
|
|
177
|
-
|
|
178
|
-
### If no active task
|
|
179
|
-
```
|
|
180
|
-
💡 Start working:
|
|
181
|
-
→ /p:work 1 (from queue)
|
|
182
|
-
→ /p:resume (paused task)
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
### If haven't shipped recently
|
|
186
|
-
```
|
|
187
|
-
⚠️ {days} days since last ship!
|
|
188
|
-
→ /p:ship "{feature}"
|
|
189
|
-
→ Find quick win in /p:next
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
### If velocity dropping
|
|
193
|
-
```
|
|
194
|
-
📉 Velocity trend down
|
|
195
|
-
→ Check if tasks too complex
|
|
196
|
-
→ Consider breaking down with /p:feature
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
### If many paused tasks
|
|
200
|
-
```
|
|
201
|
-
⏸️ {count} tasks paused
|
|
202
|
-
→ Review with /p:stack
|
|
203
|
-
→ Consider completing or dropping
|
|
204
|
-
```
|
|
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 |
|
|
205
137
|
|
|
206
138
|
## Natural Language Support
|
|
207
139
|
|
|
208
140
|
Detect intent:
|
|
209
141
|
- "p. dashboard" → Full dashboard
|
|
210
|
-
- "p.
|
|
211
|
-
- "p.
|
|
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)
|
|
212
146
|
- "p. how am I doing" → Default view
|
|
213
|
-
- "p. roadmap" → Roadmap view
|
|
214
147
|
- "p. weekly" → Weekly progress
|
|
215
148
|
|
|
216
|
-
##
|
|
149
|
+
## Absorbed Commands
|
|
217
150
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
```
|
|
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`
|
|
224
156
|
|
|
225
|
-
|
|
157
|
+
## KPI Metrics (from /p:status)
|
|
158
|
+
|
|
159
|
+
Calculate and display:
|
|
226
160
|
```
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
161
|
+
Sprint: [████░] {%}
|
|
162
|
+
Tasks: {done}/{total}
|
|
163
|
+
Ship: {days} ago
|
|
164
|
+
Focus: {task}
|
|
231
165
|
```
|
|
232
166
|
|
|
233
|
-
##
|
|
167
|
+
## Progress Metrics (from /p:progress)
|
|
234
168
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
- `/p:roadmap` → Use `/p:dash roadmap`
|
|
169
|
+
For week/month views:
|
|
170
|
+
```
|
|
171
|
+
📈 {period} | 🚀 {N} shipped | ⚡ {velocity}/day | Trend: {↗%}
|
|
172
|
+
```
|
|
240
173
|
|
|
241
|
-
|
|
174
|
+
### Velocity Calculation
|
|
175
|
+
```
|
|
176
|
+
velocity = shipped_count / days_in_period
|
|
177
|
+
trend = (current_velocity - previous_velocity) / previous_velocity * 100
|
|
178
|
+
```
|