prjct-cli 0.5.1 → 0.6.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 +153 -1
- package/CLAUDE.md +43 -28
- package/README.md +1 -1
- package/bin/prjct +78 -63
- package/core/agent-generator.js +19 -10
- package/core/ascii-graphics.js +433 -0
- package/core/command-registry.js +553 -0
- package/core/commands.js +203 -4
- package/core/task-schema.js +342 -0
- package/package.json +2 -1
- package/templates/agents/AGENTS.md +79 -101
- package/templates/agents/be.template.md +14 -29
- package/templates/agents/coordinator.template.md +34 -0
- package/templates/agents/data.template.md +14 -28
- package/templates/agents/devops.template.md +14 -28
- package/templates/agents/fe.template.md +14 -29
- package/templates/agents/mobile.template.md +14 -28
- package/templates/agents/qa.template.md +14 -41
- package/templates/agents/scribe.template.md +15 -81
- package/templates/agents/security.template.md +14 -28
- package/templates/agents/ux.template.md +14 -36
- package/templates/commands/analyze.md +36 -239
- package/templates/commands/build.md +41 -0
- package/templates/commands/cleanup.md +24 -87
- package/templates/commands/context.md +24 -93
- package/templates/commands/design.md +20 -98
- package/templates/commands/done.md +16 -181
- package/templates/commands/fix.md +27 -66
- package/templates/commands/git.md +33 -60
- package/templates/commands/help.md +18 -52
- package/templates/commands/idea.md +11 -36
- package/templates/commands/init.md +30 -277
- package/templates/commands/next.md +20 -62
- package/templates/commands/now.md +18 -22
- package/templates/commands/progress.md +23 -78
- package/templates/commands/recap.md +22 -74
- package/templates/commands/roadmap.md +21 -90
- package/templates/commands/ship.md +26 -161
- package/templates/commands/status.md +40 -0
- package/templates/commands/stuck.md +21 -33
- package/templates/commands/sync.md +19 -209
- package/templates/commands/task.md +18 -80
- package/templates/commands/test.md +23 -72
- package/templates/commands/workflow.md +20 -212
- package/templates/agents/pm.template.md +0 -84
|
@@ -1,224 +1,32 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
allowed-tools: [Read, Write]
|
|
3
|
+
description: "Show workflow status"
|
|
4
|
+
---
|
|
2
5
|
|
|
3
|
-
|
|
4
|
-
Interactive agent workflows that orchestrate task execution with user guidance. When capabilities are missing, the system prompts for decisions rather than auto-skipping, and tracks all installation efforts as workflow tasks.
|
|
6
|
+
# /p:workflow
|
|
5
7
|
|
|
6
|
-
##
|
|
7
|
-
|
|
8
|
-
### 1. Automatic Workflow Detection
|
|
9
|
-
When a task is added via `/p:idea`, the system:
|
|
10
|
-
- Classifies task type: ui, api, bug, refactor, feature
|
|
11
|
-
- Detects project capabilities (design system, tests, docs)
|
|
12
|
-
- Marks steps that need user prompting when capabilities are missing
|
|
13
|
-
- Initializes workflow with all steps (required + optional with prompts)
|
|
14
|
-
|
|
15
|
-
### 2. Workflow Types
|
|
16
|
-
|
|
17
|
-
**UI Component** (ui):
|
|
18
|
-
- design (optional - needs design system)
|
|
19
|
-
- dev (required)
|
|
20
|
-
- test (optional - needs test framework)
|
|
21
|
-
- docs (optional - needs docs system)
|
|
22
|
-
|
|
23
|
-
**API Endpoint** (api):
|
|
24
|
-
- dev (required)
|
|
25
|
-
- test (optional - needs test framework)
|
|
26
|
-
- docs (optional - needs docs system)
|
|
27
|
-
|
|
28
|
-
**Bug Fix** (bug):
|
|
29
|
-
- analyze (required)
|
|
30
|
-
- fix (required)
|
|
31
|
-
- test (optional - needs test framework)
|
|
32
|
-
|
|
33
|
-
**Refactor** (refactor):
|
|
34
|
-
- refactor (required)
|
|
35
|
-
- test (optional - needs test framework)
|
|
36
|
-
|
|
37
|
-
**Feature** (feature):
|
|
38
|
-
- design (optional - needs design system)
|
|
39
|
-
- dev (required)
|
|
40
|
-
- test (optional - needs test framework)
|
|
41
|
-
- docs (optional - needs docs system)
|
|
42
|
-
|
|
43
|
-
### 3. Task Classification
|
|
44
|
-
|
|
45
|
-
Keywords that trigger specific workflows:
|
|
46
|
-
|
|
47
|
-
**UI**: button, form, modal, card, component, menu, nav, input
|
|
48
|
-
**API**: endpoint, api, service, route, controller
|
|
49
|
-
**Bug**: bug, fix, error, issue, broken
|
|
50
|
-
**Refactor**: refactor, improve, optimize, clean
|
|
51
|
-
**Feature**: feature, functionality, module
|
|
52
|
-
|
|
53
|
-
Default: ui
|
|
54
|
-
|
|
55
|
-
### 4. Capability Detection
|
|
56
|
-
|
|
57
|
-
The system detects capabilities by checking:
|
|
58
|
-
|
|
59
|
-
**Design System**:
|
|
60
|
-
- Folders: design/, designs/, .storybook/
|
|
61
|
-
- Dependencies: @storybook/react, @storybook/vue
|
|
62
|
-
- Files: *.figma
|
|
63
|
-
|
|
64
|
-
**Test Framework**:
|
|
65
|
-
- Dependencies: jest, vitest, mocha, @jest/core
|
|
66
|
-
- Files: *.test.*, *.spec.*
|
|
67
|
-
- Configs: jest.config.js, vitest.config.js
|
|
68
|
-
|
|
69
|
-
**Documentation**:
|
|
70
|
-
- Folders: docs/, documentation/
|
|
71
|
-
- Files: README.md
|
|
72
|
-
- Dependencies: typedoc, jsdoc
|
|
73
|
-
|
|
74
|
-
### 5. Interactive Workflow Execution
|
|
75
|
-
|
|
76
|
-
**When step requires missing capability:**
|
|
77
|
-
1. System pauses and prompts user with options:
|
|
78
|
-
- Install recommended tool (based on stack detection)
|
|
79
|
-
- Skip this step
|
|
80
|
-
- Continue without capability
|
|
81
|
-
- Pause workflow
|
|
82
|
-
|
|
83
|
-
2. If user chooses installation:
|
|
84
|
-
- Creates installation task (e.g., "Install Jest")
|
|
85
|
-
- Inserts task into workflow at current position
|
|
86
|
-
- Tracks installation effort as visible task
|
|
87
|
-
- Executes installation command
|
|
88
|
-
- Configures tool automatically
|
|
89
|
-
- Verifies capability is now available
|
|
90
|
-
- Continues to original step
|
|
91
|
-
|
|
92
|
-
**When `/p:done` is executed:**
|
|
93
|
-
- Marks current step as completed
|
|
94
|
-
- Checks if next step needs prompting
|
|
95
|
-
- Shows prompt if capability missing
|
|
96
|
-
- Advances to next step (or completes workflow)
|
|
97
|
-
- Updates now.md with next step details
|
|
98
|
-
- Assigns appropriate agent for next step
|
|
99
|
-
- Logs progress to memory
|
|
100
|
-
|
|
101
|
-
### 6. Step Structure
|
|
102
|
-
|
|
103
|
-
Each step has:
|
|
104
|
-
- **name**: Step identifier
|
|
105
|
-
- **agent**: Assigned AI agent specialist
|
|
106
|
-
- **action**: What to do
|
|
107
|
-
- **required**: Must execute (true) or optional (false)
|
|
108
|
-
- **needs**: Required capability (if optional)
|
|
109
|
-
- **prompt**: Should prompt user when capability missing
|
|
110
|
-
- **needsPrompt**: Flag set when step needs user decision
|
|
111
|
-
- **retry**: Max retry attempts (for test steps)
|
|
112
|
-
- **type**: 'install' for dynamically inserted installation tasks
|
|
113
|
-
|
|
114
|
-
## Commands
|
|
115
|
-
|
|
116
|
-
### View Workflow Status
|
|
8
|
+
## Usage
|
|
117
9
|
```
|
|
118
|
-
/p:workflow
|
|
10
|
+
/p:workflow # Show status
|
|
11
|
+
/p:workflow skip # Skip current step
|
|
119
12
|
```
|
|
120
|
-
Shows current workflow state, active step, progress.
|
|
121
13
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
Skips current optional step, moves to next.
|
|
127
|
-
|
|
128
|
-
## Example Workflows
|
|
129
|
-
|
|
130
|
-
### Full Stack (Has Everything)
|
|
131
|
-
```
|
|
132
|
-
/p:idea "Create login form"
|
|
133
|
-
→ Workflow: design→dev→test→docs
|
|
134
|
-
→ Execute each step with /p:done
|
|
135
|
-
```
|
|
14
|
+
## Flow
|
|
15
|
+
1. Read: `workflow/state.json`
|
|
16
|
+
2. Display: current step + progress
|
|
17
|
+
3. Check: capabilities for next steps
|
|
136
18
|
|
|
137
|
-
|
|
19
|
+
## Response
|
|
138
20
|
```
|
|
139
|
-
|
|
140
|
-
→ Workflow: dev→test→docs
|
|
141
|
-
→ /p:done (completes dev)
|
|
21
|
+
🔄 Workflow: {task_type}
|
|
142
22
|
|
|
143
|
-
|
|
23
|
+
Progress: {current}/{total}
|
|
24
|
+
Current: {step_name} ({agent})
|
|
25
|
+
Status: {status}
|
|
144
26
|
|
|
145
|
-
|
|
146
|
-
|
|
27
|
+
Next: {next_step}
|
|
28
|
+
{capability_prompt_if_needed}
|
|
147
29
|
|
|
148
|
-
|
|
149
|
-
1. Install recommended (npm install -D vitest @testing-library/react)
|
|
150
|
-
2. Skip this step
|
|
151
|
-
3. Continue without test
|
|
152
|
-
4. Pause workflow
|
|
153
|
-
|
|
154
|
-
→ User chooses: 1 (install)
|
|
155
|
-
→ System creates: "Install test framework" task
|
|
156
|
-
→ System executes: npm install -D vitest...
|
|
157
|
-
→ System configures: vitest.config.js created
|
|
158
|
-
→ Installation tracked as completed task
|
|
159
|
-
→ Continues to test step
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
### User Skips Missing Capability
|
|
30
|
+
/p:done | /p:workflow skip
|
|
163
31
|
```
|
|
164
|
-
/p:idea "Fix auth bug"
|
|
165
|
-
→ Workflow: analyze→fix→test
|
|
166
|
-
→ /p:done (completes fix)
|
|
167
|
-
|
|
168
|
-
⚠️ Missing test capability for "test" step
|
|
169
|
-
→ User chooses: 2 (skip)
|
|
170
|
-
→ Step skipped, workflow completes
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
### Installation Tracked as Task
|
|
174
|
-
```
|
|
175
|
-
When user installs missing tool:
|
|
176
|
-
1. "Install Jest" task inserted at current position
|
|
177
|
-
2. Installation runs: npm install -D jest
|
|
178
|
-
3. Configuration created: jest.config.js
|
|
179
|
-
4. Task marked complete with duration (e.g., 1.2 min)
|
|
180
|
-
5. Installation visible in workflow progress
|
|
181
|
-
6. Workflow continues to intended step
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
## Best Practices
|
|
185
|
-
|
|
186
|
-
1. **Never hallucinate capabilities** - Only use what exists
|
|
187
|
-
2. **Always prompt when capability missing** - Never auto-skip, ask user first
|
|
188
|
-
3. **Track all installation efforts** - Every tool install becomes a visible task
|
|
189
|
-
4. **Recommend based on stack** - Detect framework and suggest appropriate tools
|
|
190
|
-
5. **Clear handoffs** - Each step completes before next starts
|
|
191
|
-
6. **Agent assignment** - Right specialist for each step
|
|
192
|
-
7. **State tracking** - Workflow progress and installations logged to memory
|
|
193
|
-
|
|
194
|
-
## Error Handling
|
|
195
|
-
|
|
196
|
-
- If workflow init fails, task is still created (degrades gracefully)
|
|
197
|
-
- Missing capabilities = prompt user, don't auto-skip or fail
|
|
198
|
-
- Installation failures = notify user, offer alternatives or skip
|
|
199
|
-
- Test failures can retry up to configured limit
|
|
200
|
-
- Workflow can be cleared manually if needed
|
|
201
|
-
|
|
202
|
-
## State Management
|
|
203
|
-
|
|
204
|
-
Workflow state stored in:
|
|
205
|
-
```
|
|
206
|
-
~/.prjct-cli/projects/{id}/workflow/state.json
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
Contains:
|
|
210
|
-
- task: Task description
|
|
211
|
-
- type: Workflow type
|
|
212
|
-
- caps: Detected capabilities
|
|
213
|
-
- steps: All workflow steps (including dynamically inserted install tasks)
|
|
214
|
-
- missingCapabilities: Array of capabilities that need prompting
|
|
215
|
-
- current: Current step index
|
|
216
|
-
- active: Workflow active flag
|
|
217
|
-
- timestamps: Created, completed
|
|
218
32
|
|
|
219
|
-
Each step tracks:
|
|
220
|
-
- status: pending, in_progress, completed, skipped
|
|
221
|
-
- needsPrompt: Boolean flag for user decision required
|
|
222
|
-
- type: 'install' for installation tasks
|
|
223
|
-
- insertedAt: Timestamp for dynamically added tasks
|
|
224
|
-
- skipReason: Why step was skipped (if user chose skip)
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: p_agent_pm
|
|
3
|
-
description: Project Manager for [PROJECT_NAME]. Coordinates tasks, tracks progress, and maintains project documentation. Triggers on: "plan", "roadmap", "task", "progress", "coordinate".
|
|
4
|
-
tools: Read, Grep, Glob, Write, Bash
|
|
5
|
-
model: opus
|
|
6
|
-
color: cyan
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
You are a Project Manager for **[PROJECT_NAME]**.
|
|
10
|
-
|
|
11
|
-
## Project Context
|
|
12
|
-
- **Name**: [PROJECT_NAME]
|
|
13
|
-
- **Type**: [PROJECT_TYPE]
|
|
14
|
-
- **Stack**: [DETECTED_STACK]
|
|
15
|
-
- **Architecture**: [DETECTED_PATTERN]
|
|
16
|
-
|
|
17
|
-
## Your Role
|
|
18
|
-
As the Project Manager, you coordinate all aspects of the project:
|
|
19
|
-
- **Task Management**: Break down features into actionable tasks
|
|
20
|
-
- **Progress Tracking**: Monitor completion and blockers
|
|
21
|
-
- **Documentation**: Maintain project documentation and roadmaps
|
|
22
|
-
- **Coordination**: Facilitate communication between specialists
|
|
23
|
-
|
|
24
|
-
## Core Responsibilities
|
|
25
|
-
|
|
26
|
-
### 1. Task Breakdown
|
|
27
|
-
- Analyze feature requests and break them into concrete tasks
|
|
28
|
-
- Identify dependencies and proper sequencing
|
|
29
|
-
- Estimate complexity and time requirements
|
|
30
|
-
- Assign tasks to appropriate specialists (UX, FE, BE, QA)
|
|
31
|
-
|
|
32
|
-
### 2. Progress Monitoring
|
|
33
|
-
- Track task completion and project velocity
|
|
34
|
-
- Identify blockers and facilitate resolution
|
|
35
|
-
- Update roadmap with actual progress
|
|
36
|
-
- Maintain accurate project status
|
|
37
|
-
|
|
38
|
-
### 3. Documentation Management
|
|
39
|
-
- Keep README and project docs current
|
|
40
|
-
- Document architectural decisions
|
|
41
|
-
- Maintain changelog and release notes
|
|
42
|
-
- Ensure knowledge is captured
|
|
43
|
-
|
|
44
|
-
### 4. Quality Gates
|
|
45
|
-
- Ensure tasks meet definition of done
|
|
46
|
-
- Validate completeness before marking shipped
|
|
47
|
-
- Coordinate testing and QA processes
|
|
48
|
-
- Maintain quality standards
|
|
49
|
-
|
|
50
|
-
## NOT Your Expertise
|
|
51
|
-
- Detailed technical implementation (defer to specialists)
|
|
52
|
-
- UI/UX design decisions (defer to UX specialist)
|
|
53
|
-
- Code architecture patterns (defer to architects)
|
|
54
|
-
- Deployment specifics (defer to DevOps)
|
|
55
|
-
|
|
56
|
-
## Workflow Patterns
|
|
57
|
-
|
|
58
|
-
### Feature Planning
|
|
59
|
-
1. Understand feature requirements
|
|
60
|
-
2. Break into tasks (UX → FE → BE → QA → Docs)
|
|
61
|
-
3. Identify dependencies
|
|
62
|
-
4. Create actionable task list
|
|
63
|
-
5. Distribute to specialists
|
|
64
|
-
|
|
65
|
-
### Progress Updates
|
|
66
|
-
1. Review completed tasks
|
|
67
|
-
2. Update roadmap
|
|
68
|
-
3. Identify blockers
|
|
69
|
-
4. Adjust priorities as needed
|
|
70
|
-
5. Report status
|
|
71
|
-
|
|
72
|
-
### Quality Assurance
|
|
73
|
-
1. Verify task completion criteria
|
|
74
|
-
2. Ensure testing is done
|
|
75
|
-
3. Validate documentation
|
|
76
|
-
4. Approve for shipment
|
|
77
|
-
|
|
78
|
-
## Communication Style
|
|
79
|
-
- Clear and concise
|
|
80
|
-
- Action-oriented
|
|
81
|
-
- Status-focused
|
|
82
|
-
- Collaborative
|
|
83
|
-
|
|
84
|
-
Remember: You coordinate the work, specialists execute it. Your focus is on WHAT needs to be done and WHEN, not HOW to implement it.
|