prjct-cli 0.25.2 → 0.27.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 +214 -0
- package/CLAUDE.md +109 -110
- package/core/infrastructure/command-installer.ts +27 -0
- package/package.json +1 -1
- package/templates/agentic/agents/uxui.md +8 -0
- package/templates/agentic/skill-integration.md +311 -0
- package/templates/agentic/subagent-generation.md +28 -12
- package/templates/commands/bug.md +72 -17
- package/templates/commands/done.md +158 -8
- package/templates/commands/git.md +21 -5
- package/templates/commands/merge.md +202 -0
- package/templates/commands/p.md +32 -0
- package/templates/commands/pause.md +40 -7
- package/templates/commands/resume.md +113 -33
- package/templates/commands/review.md +276 -0
- package/templates/commands/ship.md +193 -17
- package/templates/commands/sync.md +442 -47
- package/templates/commands/task.md +168 -542
- package/templates/commands/test.md +75 -3
- package/templates/commands/verify.md +204 -0
- package/templates/config/skill-mappings.json +87 -0
- package/templates/global/CLAUDE.md +193 -36
- package/templates/global/docs/commands.md +29 -31
- package/templates/subagents/domain/backend.md +1 -0
- package/templates/subagents/domain/devops.md +1 -0
- package/templates/subagents/domain/frontend.md +1 -0
- package/templates/subagents/domain/testing.md +1 -0
- package/templates/subagents/workflow/prjct-planner.md +1 -0
- package/templates/subagents/workflow/prjct-shipper.md +1 -0
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
allowed-tools: [Bash, Read, Write, Edit]
|
|
3
|
-
description: 'Run tests
|
|
3
|
+
description: 'Run tests and advance workflow phase'
|
|
4
4
|
timestamp-rule: 'GetTimestamp() for ALL timestamps'
|
|
5
|
+
architecture: 'Write-Through (JSON -> MD -> Events)'
|
|
6
|
+
storage-layer: true
|
|
7
|
+
source-of-truth: 'storage/state.json'
|
|
5
8
|
---
|
|
6
9
|
|
|
7
10
|
# /p:test
|
|
8
11
|
|
|
12
|
+
Run tests to advance from implement phase to test phase in the workflow.
|
|
13
|
+
|
|
9
14
|
## Usage
|
|
10
15
|
|
|
11
16
|
```
|
|
@@ -17,7 +22,9 @@ timestamp-rule: 'GetTimestamp() for ALL timestamps'
|
|
|
17
22
|
- `{projectId}`: From `.prjct/prjct.config.json`
|
|
18
23
|
- `{globalPath}`: `~/.prjct-cli/projects/{projectId}`
|
|
19
24
|
- `{configPath}`: `~/.prjct-cli/config.json`
|
|
25
|
+
- `{statePath}`: `{globalPath}/storage/state.json`
|
|
20
26
|
- `{memoryPath}`: `{globalPath}/memory/events.jsonl`
|
|
27
|
+
- `{syncPath}`: `{globalPath}/sync/pending.json`
|
|
21
28
|
|
|
22
29
|
## Step 1: Read Project Config
|
|
23
30
|
|
|
@@ -28,6 +35,26 @@ IF file not found:
|
|
|
28
35
|
OUTPUT: "No prjct project. Run /p:init first."
|
|
29
36
|
STOP
|
|
30
37
|
|
|
38
|
+
## Step 1.5: Validate Workflow Phase
|
|
39
|
+
|
|
40
|
+
READ: `{globalPath}/storage/state.json`
|
|
41
|
+
|
|
42
|
+
IF currentTask is null:
|
|
43
|
+
OUTPUT: "No active task. Use p. task to start one."
|
|
44
|
+
STOP
|
|
45
|
+
|
|
46
|
+
IF currentTask.workflow exists:
|
|
47
|
+
IF currentTask.workflow.phase != "implement":
|
|
48
|
+
OUTPUT:
|
|
49
|
+
```
|
|
50
|
+
Cannot run tests. Current phase: {currentTask.workflow.phase}
|
|
51
|
+
|
|
52
|
+
Required phase: implement
|
|
53
|
+
|
|
54
|
+
Workflow: analyze → branch → implement → test → review → merge → ship → verify
|
|
55
|
+
```
|
|
56
|
+
STOP
|
|
57
|
+
|
|
31
58
|
## Step 2: Parse Arguments
|
|
32
59
|
|
|
33
60
|
SET defaults:
|
|
@@ -141,14 +168,59 @@ IF {blocking} AND {failed} > 0:
|
|
|
141
168
|
### Success Response
|
|
142
169
|
|
|
143
170
|
IF {testStatus} == "passed":
|
|
171
|
+
### Update Workflow Phase (if workflow exists)
|
|
172
|
+
IF currentTask.workflow exists:
|
|
173
|
+
SET: {now} = GetTimestamp()
|
|
174
|
+
|
|
175
|
+
SET: currentTask.workflow.phase = "test"
|
|
176
|
+
SET: currentTask.workflow.checkpoints.implement = {
|
|
177
|
+
"completedAt": "{now}",
|
|
178
|
+
"data": { "filesChanged": {count}, "commits": {count} }
|
|
179
|
+
}
|
|
180
|
+
SET: currentTask.workflow.checkpoints.test = {
|
|
181
|
+
"completedAt": "{now}",
|
|
182
|
+
"data": { "passed": {passed}, "coverage": "{coverage}" }
|
|
183
|
+
}
|
|
184
|
+
SET: currentTask.workflow.lastCheckpoint = "test"
|
|
185
|
+
|
|
186
|
+
WRITE: `{statePath}`
|
|
187
|
+
|
|
188
|
+
### Log workflow events
|
|
189
|
+
APPEND to `{memoryPath}`:
|
|
190
|
+
```json
|
|
191
|
+
{"timestamp":"{now}","action":"phase_advanced","taskId":"{currentTask.id}","from":"implement","to":"test"}
|
|
192
|
+
{"timestamp":"{now}","action":"checkpoint_completed","taskId":"{currentTask.id}","checkpoint":"implement"}
|
|
193
|
+
{"timestamp":"{now}","action":"checkpoint_completed","taskId":"{currentTask.id}","checkpoint":"test"}
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### Queue sync event
|
|
197
|
+
APPEND to `{syncPath}`:
|
|
198
|
+
```json
|
|
199
|
+
{"type":"workflow.phase_advanced","data":{"taskId":"{currentTask.id}","from":"implement","to":"test"},"timestamp":"{now}"}
|
|
200
|
+
```
|
|
201
|
+
|
|
144
202
|
OUTPUT: "✅ All tests passing!"
|
|
145
203
|
OUTPUT: ""
|
|
146
204
|
OUTPUT: "📊 Results:"
|
|
147
205
|
OUTPUT: "• Passed: {passed}"
|
|
148
206
|
IF {coverage}:
|
|
149
207
|
OUTPUT: "• Coverage: {coverage}%"
|
|
150
|
-
|
|
151
|
-
|
|
208
|
+
|
|
209
|
+
IF currentTask.workflow exists:
|
|
210
|
+
OUTPUT: ""
|
|
211
|
+
OUTPUT: "Phase: test (4/11 checkpoints)"
|
|
212
|
+
OUTPUT: ""
|
|
213
|
+
OUTPUT: "Workflow:"
|
|
214
|
+
OUTPUT: "1. analyze ✓"
|
|
215
|
+
OUTPUT: "2. branch ✓"
|
|
216
|
+
OUTPUT: "3. implement ✓"
|
|
217
|
+
OUTPUT: "4. test ✓"
|
|
218
|
+
OUTPUT: "5. review ← next"
|
|
219
|
+
OUTPUT: ""
|
|
220
|
+
OUTPUT: "🎯 Next: p. review"
|
|
221
|
+
ELSE:
|
|
222
|
+
OUTPUT: ""
|
|
223
|
+
OUTPUT: "🎯 Next: /p:ship"
|
|
152
224
|
|
|
153
225
|
### Failure Response
|
|
154
226
|
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
---
|
|
2
|
+
allowed-tools: [Bash, Read, Write]
|
|
3
|
+
description: 'Verify workflow completion and close task'
|
|
4
|
+
timestamp-rule: 'GetTimestamp() for ALL timestamps'
|
|
5
|
+
architecture: 'Write-Through (JSON -> MD -> Events)'
|
|
6
|
+
storage-layer: true
|
|
7
|
+
source-of-truth: 'storage/state.json'
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# /p:verify
|
|
11
|
+
|
|
12
|
+
Verify all workflow checkpoints are complete and close the task.
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
/p:verify
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Context Variables
|
|
21
|
+
- `{projectId}`: From `.prjct/prjct.config.json`
|
|
22
|
+
- `{globalPath}`: `~/.prjct-cli/projects/{projectId}`
|
|
23
|
+
- `{statePath}`: `{globalPath}/storage/state.json`
|
|
24
|
+
- `{memoryPath}`: `{globalPath}/memory/events.jsonl`
|
|
25
|
+
- `{syncPath}`: `{globalPath}/sync/pending.json`
|
|
26
|
+
- `{nowContextPath}`: `{globalPath}/context/now.md`
|
|
27
|
+
|
|
28
|
+
## Step 1: Validate Project
|
|
29
|
+
|
|
30
|
+
READ: `.prjct/prjct.config.json`
|
|
31
|
+
EXTRACT: `projectId`
|
|
32
|
+
|
|
33
|
+
IF file not found:
|
|
34
|
+
OUTPUT: "No prjct project. Run /p:init first."
|
|
35
|
+
STOP
|
|
36
|
+
|
|
37
|
+
## Step 2: Validate Workflow Phase
|
|
38
|
+
|
|
39
|
+
READ: `{globalPath}/storage/state.json`
|
|
40
|
+
|
|
41
|
+
IF currentTask is null:
|
|
42
|
+
OUTPUT: "No active task. Nothing to verify."
|
|
43
|
+
STOP
|
|
44
|
+
|
|
45
|
+
IF currentTask.workflow is null:
|
|
46
|
+
OUTPUT: "Task has no workflow. This is a legacy task."
|
|
47
|
+
STOP
|
|
48
|
+
|
|
49
|
+
IF currentTask.workflow.phase != "register":
|
|
50
|
+
OUTPUT:
|
|
51
|
+
```
|
|
52
|
+
Cannot verify. Current phase: {currentTask.workflow.phase}
|
|
53
|
+
|
|
54
|
+
Required phase: register (after ship)
|
|
55
|
+
|
|
56
|
+
Workflow: analyze → branch → implement → test → review → merge → ship → verify
|
|
57
|
+
|
|
58
|
+
Complete p. ship first.
|
|
59
|
+
```
|
|
60
|
+
STOP
|
|
61
|
+
|
|
62
|
+
## Step 3: Validate All Checkpoints
|
|
63
|
+
|
|
64
|
+
SET: {checkpoints} = currentTask.workflow.checkpoints
|
|
65
|
+
SET: {required} = ["analyze", "branch", "implement", "test", "review", "merge", "tag", "release", "deploy", "register"]
|
|
66
|
+
SET: {missing} = []
|
|
67
|
+
|
|
68
|
+
FOR each checkpoint in {required}:
|
|
69
|
+
IF {checkpoints}[checkpoint] is null:
|
|
70
|
+
APPEND checkpoint to {missing}
|
|
71
|
+
|
|
72
|
+
IF {missing}.length > 0:
|
|
73
|
+
OUTPUT:
|
|
74
|
+
```
|
|
75
|
+
⚠️ Incomplete workflow
|
|
76
|
+
|
|
77
|
+
Missing checkpoints:
|
|
78
|
+
{FOR each in missing: "- {checkpoint}"}
|
|
79
|
+
|
|
80
|
+
Complete all phases before verifying.
|
|
81
|
+
```
|
|
82
|
+
STOP
|
|
83
|
+
|
|
84
|
+
## Step 4: Calculate Workflow Summary
|
|
85
|
+
|
|
86
|
+
SET: {startedAt} = currentTask.workflow.startedAt
|
|
87
|
+
SET: {now} = GetTimestamp()
|
|
88
|
+
SET: {totalDuration} = time between {startedAt} and {now}
|
|
89
|
+
FORMAT: as "Xh Ym" or "Xd Xh"
|
|
90
|
+
|
|
91
|
+
### Gather metrics from checkpoints
|
|
92
|
+
SET: {scope} = checkpoints.analyze.data.scope
|
|
93
|
+
SET: {branchName} = checkpoints.branch.data.branchName
|
|
94
|
+
SET: {coverage} = checkpoints.test.data.coverage
|
|
95
|
+
SET: {mcpScore} = checkpoints.review.data.mcpScore
|
|
96
|
+
SET: {approvals} = checkpoints.review.data.approvals.length
|
|
97
|
+
SET: {mergeCommit} = checkpoints.merge.data.mergeCommit
|
|
98
|
+
SET: {version} = checkpoints.tag.data.version
|
|
99
|
+
SET: {releaseUrl} = checkpoints.release.data.releaseUrl
|
|
100
|
+
|
|
101
|
+
## Step 5: Complete Workflow
|
|
102
|
+
|
|
103
|
+
SET: currentTask.workflow.phase = "verify"
|
|
104
|
+
SET: currentTask.workflow.checkpoints.verify = {
|
|
105
|
+
"completedAt": "{now}",
|
|
106
|
+
"data": {
|
|
107
|
+
"verified": true,
|
|
108
|
+
"totalDuration": "{totalDuration}"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
SET: currentTask.workflow.completedAt = "{now}"
|
|
112
|
+
SET: currentTask.workflow.lastCheckpoint = "verify"
|
|
113
|
+
|
|
114
|
+
### Move to previousTask
|
|
115
|
+
SET: state.previousTask = {
|
|
116
|
+
...currentTask,
|
|
117
|
+
"status": "completed",
|
|
118
|
+
"completedAt": "{now}"
|
|
119
|
+
}
|
|
120
|
+
SET: state.currentTask = null
|
|
121
|
+
SET: state.lastUpdated = "{now}"
|
|
122
|
+
|
|
123
|
+
WRITE: `{statePath}`
|
|
124
|
+
|
|
125
|
+
## Step 6: Generate Context
|
|
126
|
+
|
|
127
|
+
WRITE: `{nowContextPath}`
|
|
128
|
+
|
|
129
|
+
```markdown
|
|
130
|
+
# NOW
|
|
131
|
+
|
|
132
|
+
_No active task_
|
|
133
|
+
|
|
134
|
+
Last completed: {previousTask.description}
|
|
135
|
+
Duration: {totalDuration}
|
|
136
|
+
Version: {version}
|
|
137
|
+
|
|
138
|
+
Use p. task to start new work.
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Step 7: Log Events
|
|
142
|
+
|
|
143
|
+
APPEND to `{memoryPath}`:
|
|
144
|
+
```json
|
|
145
|
+
{"timestamp":"{now}","action":"workflow_completed","taskId":"{previousTask.id}","duration":"{totalDuration}","checkpoints":11}
|
|
146
|
+
{"timestamp":"{now}","action":"checkpoint_completed","taskId":"{previousTask.id}","checkpoint":"verify"}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
APPEND to `{syncPath}`:
|
|
150
|
+
```json
|
|
151
|
+
{"type":"workflow.completed","data":{"taskId":"{previousTask.id}","duration":"{totalDuration}","version":"{version}"},"timestamp":"{now}"}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Output
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
✓ Workflow Complete
|
|
158
|
+
|
|
159
|
+
Task: {previousTask.description}
|
|
160
|
+
Type: {previousTask.type}
|
|
161
|
+
Duration: {totalDuration}
|
|
162
|
+
Version: {version}
|
|
163
|
+
|
|
164
|
+
Checkpoints (11/11):
|
|
165
|
+
1. analyze ✓ - Scope: {scope}
|
|
166
|
+
2. branch ✓ - {branchName}
|
|
167
|
+
3. implement ✓
|
|
168
|
+
4. test ✓ - Coverage: {coverage}
|
|
169
|
+
5. review ✓ - MCP: {mcpScore}/100, Approvals: {approvals}
|
|
170
|
+
6. merge ✓ - {mergeCommit}
|
|
171
|
+
7. tag ✓ - v{version}
|
|
172
|
+
8. release ✓ - {releaseUrl}
|
|
173
|
+
9. deploy ✓ - Reminded
|
|
174
|
+
10. register ✓ - Logged
|
|
175
|
+
11. verify ✓ - Complete
|
|
176
|
+
|
|
177
|
+
Summary:
|
|
178
|
+
- All phases completed
|
|
179
|
+
- Audit trail recorded
|
|
180
|
+
- Task closed
|
|
181
|
+
|
|
182
|
+
Next: p. task to start new work
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## Error Handling
|
|
186
|
+
|
|
187
|
+
| Error | Response | Action |
|
|
188
|
+
|-------|----------|--------|
|
|
189
|
+
| No project | "No prjct project" | STOP |
|
|
190
|
+
| No active task | "Nothing to verify" | STOP |
|
|
191
|
+
| No workflow | "Legacy task" | STOP |
|
|
192
|
+
| Wrong phase | Show required phase | STOP |
|
|
193
|
+
| Missing checkpoints | List missing | STOP |
|
|
194
|
+
|
|
195
|
+
## Natural Language Triggers
|
|
196
|
+
|
|
197
|
+
- `p. verify` -> /p:verify
|
|
198
|
+
- `p. complete` -> /p:verify
|
|
199
|
+
- `p. close` -> /p:verify
|
|
200
|
+
|
|
201
|
+
## References
|
|
202
|
+
|
|
203
|
+
- Architecture: `~/.prjct-cli/docs/architecture.md`
|
|
204
|
+
- Workflow: `~/.prjct-cli/docs/workflow.md`
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.0.0",
|
|
3
|
+
"description": "Search hints for finding skills on claude-plugins.dev - NOT hardcoded mappings",
|
|
4
|
+
"note": "Claude should SEARCH claude-plugins.dev dynamically using these hints",
|
|
5
|
+
"searchEndpoint": "https://claude-plugins.dev/skills?q={query}",
|
|
6
|
+
"skillsDirectory": "~/.claude/skills/",
|
|
7
|
+
"searchHints": {
|
|
8
|
+
"frontend": {
|
|
9
|
+
"searchTerms": ["frontend-design", "react components", "vue components", "ui design"],
|
|
10
|
+
"preferredAuthors": ["@anthropics", "@wshobson"],
|
|
11
|
+
"fallbackSearch": "frontend ui components",
|
|
12
|
+
"description": "UI components, styling, frontend patterns"
|
|
13
|
+
},
|
|
14
|
+
"uxui": {
|
|
15
|
+
"searchTerms": ["ux-designer", "frontend-design", "user experience", "ui ux design"],
|
|
16
|
+
"preferredAuthors": ["@anthropics", "@aj-geddes"],
|
|
17
|
+
"fallbackSearch": "ux ui design patterns",
|
|
18
|
+
"description": "UX/UI design, user experience, accessibility"
|
|
19
|
+
},
|
|
20
|
+
"backend": {
|
|
21
|
+
"ecosystemSpecific": {
|
|
22
|
+
"javascript": ["typescript backend", "nodejs patterns", "express api"],
|
|
23
|
+
"typescript": ["typescript backend", "nodejs patterns", "api design"],
|
|
24
|
+
"python": ["python backend", "fastapi django", "python api"],
|
|
25
|
+
"go": ["golang backend", "go api patterns"],
|
|
26
|
+
"rust": ["rust backend", "axum actix"]
|
|
27
|
+
},
|
|
28
|
+
"preferredAuthors": ["@wshobson", "@anthropics"],
|
|
29
|
+
"fallbackSearch": "backend api patterns",
|
|
30
|
+
"description": "API design, backend patterns, server logic"
|
|
31
|
+
},
|
|
32
|
+
"database": {
|
|
33
|
+
"searchTerms": ["database design", "sql patterns", "prisma drizzle"],
|
|
34
|
+
"preferredAuthors": ["@wshobson"],
|
|
35
|
+
"fallbackSearch": "database sql patterns",
|
|
36
|
+
"description": "Database design, queries, migrations"
|
|
37
|
+
},
|
|
38
|
+
"testing": {
|
|
39
|
+
"searchTerms": ["testing automation", "test patterns", "jest pytest"],
|
|
40
|
+
"preferredAuthors": ["@anthropics", "@claudebase"],
|
|
41
|
+
"fallbackSearch": "testing automation patterns",
|
|
42
|
+
"description": "Test automation, TDD, test patterns"
|
|
43
|
+
},
|
|
44
|
+
"devops": {
|
|
45
|
+
"searchTerms": ["devops automation", "ci cd", "docker kubernetes", "github actions"],
|
|
46
|
+
"preferredAuthors": ["@claudebase", "@anthropics"],
|
|
47
|
+
"fallbackSearch": "devops ci cd automation",
|
|
48
|
+
"description": "CI/CD, containers, infrastructure"
|
|
49
|
+
},
|
|
50
|
+
"prjct-planner": {
|
|
51
|
+
"searchTerms": ["architecture patterns", "feature development", "system design"],
|
|
52
|
+
"preferredAuthors": ["@anthropics", "@wshobson"],
|
|
53
|
+
"fallbackSearch": "architecture planning patterns",
|
|
54
|
+
"description": "Feature planning, architecture, task breakdown"
|
|
55
|
+
},
|
|
56
|
+
"prjct-shipper": {
|
|
57
|
+
"searchTerms": ["code review", "pr review", "shipping best practices"],
|
|
58
|
+
"preferredAuthors": ["@anthropics"],
|
|
59
|
+
"fallbackSearch": "code review automation",
|
|
60
|
+
"description": "Code review, PR quality, shipping"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"selectionCriteria": {
|
|
64
|
+
"priority": [
|
|
65
|
+
"Match agent domain",
|
|
66
|
+
"Prefer @anthropics (official)",
|
|
67
|
+
"High download count",
|
|
68
|
+
"Recent updates",
|
|
69
|
+
"Good documentation"
|
|
70
|
+
],
|
|
71
|
+
"skipIf": [
|
|
72
|
+
"Low download count (<100)",
|
|
73
|
+
"No recent updates (>6 months)",
|
|
74
|
+
"Duplicate of installed skill"
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
"installMethod": {
|
|
78
|
+
"steps": [
|
|
79
|
+
"1. Search claude-plugins.dev/skills?q={searchTerm}",
|
|
80
|
+
"2. Analyze results, pick best match",
|
|
81
|
+
"3. Get skill markdown from GitHub source",
|
|
82
|
+
"4. Write to ~/.claude/skills/{name}.md",
|
|
83
|
+
"5. Verify skill loads with /skills command"
|
|
84
|
+
],
|
|
85
|
+
"fallback": "Create custom skill if marketplace has no good match"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -1,75 +1,232 @@
|
|
|
1
1
|
<!-- prjct:start - DO NOT REMOVE THIS MARKER -->
|
|
2
2
|
# prjct-cli
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
**Developer momentum tool** - Track progress through natural language commands without PM overhead.
|
|
5
|
+
|
|
6
|
+
## HOW TO USE PRJCT (Read This First)
|
|
7
|
+
|
|
8
|
+
When user types `p. <command>`, load the template from `templates/commands/{command}.md` and execute it intelligently.
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
p. sync → templates/commands/sync.md
|
|
12
|
+
p. task X → templates/commands/task.md
|
|
13
|
+
p. done → templates/commands/done.md
|
|
14
|
+
p. ship X → templates/commands/ship.md
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**Key Insight**: Templates are GUIDANCE, not scripts. Use your intelligence to adapt them to the situation.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## CRITICAL RULES
|
|
5
22
|
|
|
6
23
|
### 1. Path Resolution (MOST IMPORTANT)
|
|
7
24
|
**ALL writes go to global storage**: `~/.prjct-cli/projects/{projectId}/`
|
|
8
25
|
|
|
9
|
-
- **NEVER** write to `.prjct/` (config only)
|
|
26
|
+
- **NEVER** write to `.prjct/` (config only, read-only)
|
|
10
27
|
- **NEVER** write to `./` (current directory)
|
|
11
|
-
- **ALWAYS**
|
|
28
|
+
- **ALWAYS** resolve projectId first from `.prjct/prjct.config.json`
|
|
12
29
|
|
|
13
|
-
### 2.
|
|
14
|
-
|
|
15
|
-
|
|
30
|
+
### 2. Before Any Command
|
|
31
|
+
```
|
|
32
|
+
1. Read .prjct/prjct.config.json → get projectId
|
|
33
|
+
2. Set globalPath = ~/.prjct-cli/projects/{projectId}
|
|
34
|
+
3. Execute command using globalPath for all writes
|
|
35
|
+
4. Log to {globalPath}/memory/events.jsonl
|
|
36
|
+
```
|
|
16
37
|
|
|
17
|
-
### 3. Timestamps
|
|
38
|
+
### 3. Timestamps & UUIDs
|
|
18
39
|
```bash
|
|
40
|
+
# Timestamp (NEVER hardcode)
|
|
19
41
|
bun -e "console.log(new Date().toISOString())" 2>/dev/null || node -e "console.log(new Date().toISOString())"
|
|
42
|
+
|
|
43
|
+
# UUID
|
|
44
|
+
bun -e "console.log(crypto.randomUUID())" 2>/dev/null || node -e "console.log(require('crypto').randomUUID())"
|
|
20
45
|
```
|
|
21
|
-
Result: `"2025-12-20T10:30:00.000Z"` - NEVER hardcode
|
|
22
46
|
|
|
23
|
-
### 4. Git Commit Footer
|
|
47
|
+
### 4. Git Commit Footer (CRITICAL - ALWAYS INCLUDE)
|
|
48
|
+
|
|
49
|
+
**Every commit made with prjct MUST include this footer:**
|
|
50
|
+
|
|
24
51
|
```
|
|
25
52
|
🤖 Generated with [p/](https://www.prjct.app/)
|
|
26
53
|
Designed for [Claude](https://www.anthropic.com/claude)
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**This is NON-NEGOTIABLE. The prjct signature (`🤖 Generated with [p/]`) must appear in ALL commits.**
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## CORE WORKFLOW
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
p. sync → p. task "description" → [work] → p. done → p. ship
|
|
65
|
+
│ │ │ │
|
|
66
|
+
│ └─ Creates branch, breaks down │ │
|
|
67
|
+
│ task, starts tracking │ │
|
|
68
|
+
│ │ │
|
|
69
|
+
└─ Analyzes project, generates agents │ │
|
|
70
|
+
│ │
|
|
71
|
+
Completes subtask ─────┘ │
|
|
72
|
+
│
|
|
73
|
+
Ships feature, PR, tag ───┘
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Quick Reference
|
|
77
|
+
|
|
78
|
+
| Trigger | What It Does |
|
|
79
|
+
|---------|--------------|
|
|
80
|
+
| `p. sync` | Analyze project, generate domain agents |
|
|
81
|
+
| `p. task <desc>` | Start task with auto-classification |
|
|
82
|
+
| `p. done` | Complete current subtask |
|
|
83
|
+
| `p. ship [name]` | Ship feature with PR + version bump |
|
|
84
|
+
| `p. pause` | Pause current task |
|
|
85
|
+
| `p. resume` | Resume paused task |
|
|
86
|
+
| `p. bug <desc>` | Report bug with auto-priority |
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## ARCHITECTURE: Write-Through Pattern
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
User Action → Storage (JSON) → Context (MD) → Sync Events
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
| Layer | Path | Purpose |
|
|
97
|
+
|-------|------|---------|
|
|
98
|
+
| **Storage** | `storage/*.json` | Source of truth |
|
|
99
|
+
| **Context** | `context/*.md` | Claude-readable summaries |
|
|
100
|
+
| **Memory** | `memory/events.jsonl` | Audit trail (append-only) |
|
|
101
|
+
| **Agents** | `agents/*.md` | Domain specialists |
|
|
102
|
+
| **Sync** | `sync/pending.json` | Backend sync queue |
|
|
103
|
+
|
|
104
|
+
### File Structure
|
|
105
|
+
```
|
|
106
|
+
~/.prjct-cli/projects/{projectId}/
|
|
107
|
+
├── storage/
|
|
108
|
+
│ ├── state.json # Current task (SOURCE OF TRUTH)
|
|
109
|
+
│ ├── queue.json # Task queue
|
|
110
|
+
│ └── shipped.json # Shipped features
|
|
111
|
+
├── context/
|
|
112
|
+
│ ├── now.md # Current task (generated)
|
|
113
|
+
│ └── next.md # Queue (generated)
|
|
114
|
+
├── config/
|
|
115
|
+
│ └── skills.json # Agent-to-skill mappings (NEW)
|
|
116
|
+
├── memory/
|
|
117
|
+
│ └── events.jsonl # Audit trail
|
|
118
|
+
├── agents/ # Domain specialists (auto-generated)
|
|
119
|
+
└── sync/
|
|
120
|
+
└── pending.json # Events for backend
|
|
27
121
|
```
|
|
28
122
|
|
|
29
123
|
---
|
|
30
124
|
|
|
31
|
-
##
|
|
125
|
+
## INTELLIGENT BEHAVIOR
|
|
126
|
+
|
|
127
|
+
### When Starting Tasks (`p. task`)
|
|
128
|
+
1. **Analyze** - Understand what user wants to achieve
|
|
129
|
+
2. **Classify** - Determine type: feature, bug, improvement, refactor, chore
|
|
130
|
+
3. **Explore** - Find similar code, patterns, affected files
|
|
131
|
+
4. **Ask** - Clarify ambiguities (use AskUserQuestion)
|
|
132
|
+
5. **Design** - Propose 2-3 approaches, get approval
|
|
133
|
+
6. **Break down** - Create actionable subtasks
|
|
134
|
+
7. **Track** - Update storage/state.json
|
|
135
|
+
|
|
136
|
+
### When Completing Tasks (`p. done`)
|
|
137
|
+
1. Check if there are more subtasks
|
|
138
|
+
2. If yes, advance to next subtask
|
|
139
|
+
3. If no, task is complete
|
|
140
|
+
4. Update storage, generate context
|
|
141
|
+
|
|
142
|
+
### When Shipping (`p. ship`)
|
|
143
|
+
1. Run tests (if configured)
|
|
144
|
+
2. Create PR (if on feature branch)
|
|
145
|
+
3. Bump version
|
|
146
|
+
4. Update CHANGELOG
|
|
147
|
+
5. Create git tag
|
|
148
|
+
|
|
149
|
+
### Key Intelligence Rules
|
|
150
|
+
- **Read before write** - Always read existing files before modifying
|
|
151
|
+
- **Explore before coding** - Use Task(Explore) to understand codebase
|
|
152
|
+
- **Ask when uncertain** - Use AskUserQuestion to clarify
|
|
153
|
+
- **Adapt templates** - Templates are guidance, not rigid scripts
|
|
154
|
+
- **Log everything** - Append to memory/events.jsonl
|
|
32
155
|
|
|
33
|
-
|
|
34
|
-
|---------|---------|
|
|
35
|
-
| `/p:sync` | Analyze project, generate agents |
|
|
36
|
-
| `/p:task <description>` | Start task (auto-classifies type) |
|
|
37
|
-
| `/p:done` | Complete current task |
|
|
38
|
-
| `/p:ship [feature]` | Ship with quality checks |
|
|
156
|
+
---
|
|
39
157
|
|
|
40
|
-
|
|
158
|
+
## OUTPUT FORMAT
|
|
41
159
|
|
|
42
|
-
|
|
160
|
+
Concise responses (< 4 lines):
|
|
161
|
+
```
|
|
162
|
+
✅ [What was done]
|
|
43
163
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
- `p. ship login` → /p:ship "login"
|
|
164
|
+
[Key metrics]
|
|
165
|
+
Next: [suggested action]
|
|
166
|
+
```
|
|
48
167
|
|
|
49
168
|
---
|
|
50
169
|
|
|
51
|
-
##
|
|
170
|
+
## LOADING DOMAIN AGENTS
|
|
52
171
|
|
|
53
|
-
|
|
172
|
+
When working on tasks, load relevant agents from `{globalPath}/agents/`:
|
|
173
|
+
- `frontend.md` - Frontend patterns, components
|
|
174
|
+
- `backend.md` - Backend patterns, APIs
|
|
175
|
+
- `database.md` - Database patterns, queries
|
|
176
|
+
- `uxui.md` - UX/UI guidelines
|
|
177
|
+
- `testing.md` - Testing patterns
|
|
178
|
+
- `devops.md` - CI/CD, containers
|
|
54
179
|
|
|
55
|
-
|
|
56
|
-
|-------|------|
|
|
57
|
-
| Architecture (Write-Through, file structure) | `~/.prjct-cli/docs/architecture.md` |
|
|
58
|
-
| All commands and examples | `~/.prjct-cli/docs/commands.md` |
|
|
59
|
-
| Validation patterns | `~/.prjct-cli/docs/validation.md` |
|
|
60
|
-
| Using agents | `~/.prjct-cli/docs/agents.md` |
|
|
180
|
+
These agents contain project-specific patterns. **USE THEM**.
|
|
61
181
|
|
|
62
182
|
---
|
|
63
183
|
|
|
64
|
-
##
|
|
184
|
+
## SKILL INTEGRATION (NEW in v0.27 - AGENTIC)
|
|
185
|
+
|
|
186
|
+
Agents are linked to Claude Code skills from claude-plugins.dev.
|
|
187
|
+
|
|
188
|
+
**Skills are discovered AGENTICALLY** - Claude searches the marketplace dynamically.
|
|
189
|
+
|
|
190
|
+
### How Skills Work
|
|
191
|
+
|
|
192
|
+
1. **During `p. sync`**: Search claude-plugins.dev, install best matches
|
|
193
|
+
2. **During `p. task`**: Skills are auto-invoked for domain expertise
|
|
194
|
+
3. **Agent frontmatter** has `skills: [discovered-skill-name]` field
|
|
195
|
+
|
|
196
|
+
### Agentic Discovery Process
|
|
197
|
+
|
|
198
|
+
```
|
|
199
|
+
FOR EACH generated agent:
|
|
200
|
+
1. Read search hints from templates/config/skill-mappings.json
|
|
201
|
+
2. Search: https://claude-plugins.dev/skills?q={searchTerm}
|
|
202
|
+
3. Analyze results (prefer @anthropics, high downloads)
|
|
203
|
+
4. Download skill markdown from GitHub
|
|
204
|
+
5. Write to ~/.claude/skills/{name}.md
|
|
205
|
+
6. Update agent frontmatter
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Search Terms by Agent
|
|
209
|
+
|
|
210
|
+
| Agent | Search Terms |
|
|
211
|
+
|-------|-------------|
|
|
212
|
+
| `frontend.md` | "frontend-design", "react", "ui components" |
|
|
213
|
+
| `uxui.md` | "ux-designer", "frontend-design", "ui ux" |
|
|
214
|
+
| `backend.md` | "{ecosystem} backend", "api design" |
|
|
215
|
+
| `testing.md` | "testing automation", "test patterns" |
|
|
216
|
+
| `devops.md` | "devops", "ci cd", "docker kubernetes" |
|
|
217
|
+
| `prjct-planner.md` | "architecture patterns", "feature development" |
|
|
218
|
+
| `prjct-shipper.md` | "code review", "pr review" |
|
|
219
|
+
|
|
220
|
+
### Skill Location
|
|
221
|
+
|
|
222
|
+
Skills are markdown files in `~/.claude/skills/`
|
|
223
|
+
|
|
224
|
+
### Skill Configuration
|
|
65
225
|
|
|
66
|
-
|
|
67
|
-
2. Read `~/.prjct-cli/projects/{projectId}/CLAUDE.md` → project context
|
|
68
|
-
3. Execute using global storage paths
|
|
69
|
-
4. Log to `memory/events.jsonl`
|
|
226
|
+
After sync: `{globalPath}/config/skills.json` contains discovered mappings.
|
|
70
227
|
|
|
71
228
|
---
|
|
72
229
|
|
|
73
|
-
**Auto-managed by prjct-cli** | https://prjct.app | v0.
|
|
230
|
+
**Auto-managed by prjct-cli** | https://prjct.app | v0.27.0
|
|
74
231
|
|
|
75
232
|
<!-- prjct:end - DO NOT REMOVE THIS MARKER -->
|