prjct-cli 0.6.0 → 0.7.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 +67 -6
- package/CLAUDE.md +442 -36
- package/README.md +47 -54
- package/bin/prjct +170 -240
- package/core/agentic/command-executor.js +113 -0
- package/core/agentic/context-builder.js +85 -0
- package/core/agentic/prompt-builder.js +86 -0
- package/core/agentic/template-loader.js +104 -0
- package/core/agentic/tool-registry.js +117 -0
- package/core/command-registry.js +106 -62
- package/core/commands.js +2030 -2211
- package/core/domain/agent-generator.js +118 -0
- package/core/domain/analyzer.js +211 -0
- package/core/domain/architect-session.js +300 -0
- package/core/{agents → infrastructure/agents}/claude-agent.js +16 -13
- package/core/{author-detector.js → infrastructure/author-detector.js} +3 -1
- package/core/{capability-installer.js → infrastructure/capability-installer.js} +3 -6
- package/core/{command-installer.js → infrastructure/command-installer.js} +4 -2
- package/core/{config-manager.js → infrastructure/config-manager.js} +4 -4
- package/core/{editors-config.js → infrastructure/editors-config.js} +2 -10
- package/core/{migrator.js → infrastructure/migrator.js} +34 -19
- package/core/{path-manager.js → infrastructure/path-manager.js} +20 -44
- package/core/{session-manager.js → infrastructure/session-manager.js} +45 -105
- package/core/{update-checker.js → infrastructure/update-checker.js} +67 -67
- package/core/{animations-simple.js → utils/animations.js} +3 -23
- package/core/utils/date-helper.js +238 -0
- package/core/utils/file-helper.js +327 -0
- package/core/utils/jsonl-helper.js +206 -0
- package/core/{project-capabilities.js → utils/project-capabilities.js} +21 -22
- package/core/utils/session-helper.js +277 -0
- package/core/{version.js → utils/version.js} +1 -1
- package/package.json +4 -12
- package/templates/agents/AGENTS.md +101 -27
- package/templates/analysis/analyze.md +84 -0
- package/templates/commands/analyze.md +9 -2
- package/templates/commands/bug.md +79 -0
- package/templates/commands/build.md +5 -2
- package/templates/commands/cleanup.md +5 -2
- package/templates/commands/design.md +5 -2
- package/templates/commands/done.md +4 -2
- package/templates/commands/feature.md +113 -0
- package/templates/commands/fix.md +41 -10
- package/templates/commands/git.md +7 -2
- package/templates/commands/help.md +2 -2
- package/templates/commands/idea.md +14 -5
- package/templates/commands/init.md +62 -7
- package/templates/commands/next.md +4 -2
- package/templates/commands/now.md +4 -2
- package/templates/commands/progress.md +27 -5
- package/templates/commands/recap.md +39 -10
- package/templates/commands/roadmap.md +19 -5
- package/templates/commands/ship.md +118 -16
- package/templates/commands/status.md +4 -2
- package/templates/commands/sync.md +19 -15
- package/templates/commands/task.md +4 -2
- package/templates/commands/test.md +5 -2
- package/templates/commands/workflow.md +4 -2
- package/core/agent-generator.js +0 -525
- package/core/analyzer.js +0 -600
- package/core/animations.js +0 -277
- package/core/ascii-graphics.js +0 -433
- package/core/git-integration.js +0 -401
- package/core/task-schema.js +0 -342
- package/core/workflow-engine.js +0 -213
- package/core/workflow-prompts.js +0 -192
- package/core/workflow-rules.js +0 -147
- package/scripts/post-install.js +0 -121
- package/scripts/preuninstall.js +0 -94
- package/scripts/verify-installation.sh +0 -158
- package/templates/agents/be.template.md +0 -27
- package/templates/agents/coordinator.template.md +0 -34
- package/templates/agents/data.template.md +0 -27
- package/templates/agents/devops.template.md +0 -27
- package/templates/agents/fe.template.md +0 -27
- package/templates/agents/mobile.template.md +0 -27
- package/templates/agents/qa.template.md +0 -27
- package/templates/agents/scribe.template.md +0 -29
- package/templates/agents/security.template.md +0 -27
- package/templates/agents/ux.template.md +0 -27
- package/templates/commands/context.md +0 -36
- package/templates/commands/stuck.md +0 -36
- package/templates/examples/natural-language-examples.md +0 -532
- /package/core/{agent-detector.js → infrastructure/agent-detector.js} +0 -0
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
const path = require('path')
|
|
2
|
+
const dateHelper = require('./date-helper')
|
|
3
|
+
const jsonlHelper = require('./jsonl-helper')
|
|
4
|
+
const fileHelper = require('./file-helper')
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Session Helper - High-level session operations
|
|
8
|
+
*
|
|
9
|
+
* Simplifies common session workflows by combining:
|
|
10
|
+
* - date-helper (date formatting)
|
|
11
|
+
* - jsonl-helper (JSONL parsing)
|
|
12
|
+
* - file-helper (file operations)
|
|
13
|
+
* - path-manager (path construction)
|
|
14
|
+
*
|
|
15
|
+
* @module session-helper
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Build session file path for today
|
|
20
|
+
*
|
|
21
|
+
* @param {string} projectGlobalPath - Global project path
|
|
22
|
+
* @param {string} layer - Layer (planning/progress/memory)
|
|
23
|
+
* @param {string} filename - Filename (e.g., '2025-10-04.jsonl')
|
|
24
|
+
* @returns {string} - Full path to session file
|
|
25
|
+
*/
|
|
26
|
+
function getTodaySessionFilePath(projectGlobalPath, layer, filename = null) {
|
|
27
|
+
const today = dateHelper.getTodayKey()
|
|
28
|
+
const yearMonth = dateHelper.formatMonth(new Date())
|
|
29
|
+
const [year, month] = yearMonth.split('-')
|
|
30
|
+
|
|
31
|
+
const sessionDir = path.join(projectGlobalPath, layer, 'sessions', year, month)
|
|
32
|
+
|
|
33
|
+
if (filename) {
|
|
34
|
+
return path.join(sessionDir, filename)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return path.join(sessionDir, `${today}.jsonl`)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Ensure today's session directory exists
|
|
42
|
+
*
|
|
43
|
+
* @param {string} projectGlobalPath - Global project path
|
|
44
|
+
* @param {string} layer - Layer (planning/progress/memory)
|
|
45
|
+
* @returns {Promise<string>} - Path to session directory
|
|
46
|
+
*/
|
|
47
|
+
async function ensureTodaySessionDir(projectGlobalPath, layer) {
|
|
48
|
+
const yearMonth = dateHelper.formatMonth(new Date())
|
|
49
|
+
const [year, month] = yearMonth.split('-')
|
|
50
|
+
|
|
51
|
+
const sessionDir = path.join(projectGlobalPath, layer, 'sessions', year, month)
|
|
52
|
+
await fileHelper.ensureDir(sessionDir)
|
|
53
|
+
|
|
54
|
+
return sessionDir
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Write log entry to today's session
|
|
59
|
+
*
|
|
60
|
+
* @param {string} projectGlobalPath - Global project path
|
|
61
|
+
* @param {string} layer - Layer (planning/progress/memory)
|
|
62
|
+
* @param {Object} entry - Log entry to write
|
|
63
|
+
* @param {string} filename - Optional custom filename (defaults to YYYY-MM-DD.jsonl)
|
|
64
|
+
* @returns {Promise<void>}
|
|
65
|
+
*/
|
|
66
|
+
async function writeToSession(projectGlobalPath, layer, entry, filename = null) {
|
|
67
|
+
await ensureTodaySessionDir(projectGlobalPath, layer)
|
|
68
|
+
|
|
69
|
+
const filePath = getTodaySessionFilePath(projectGlobalPath, layer, filename)
|
|
70
|
+
|
|
71
|
+
// Add timestamp if not present
|
|
72
|
+
if (!entry.ts && !entry.timestamp) {
|
|
73
|
+
entry.ts = dateHelper.getTimestamp()
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
await jsonlHelper.appendJsonLine(filePath, entry)
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Read today's session logs
|
|
81
|
+
*
|
|
82
|
+
* @param {string} projectGlobalPath - Global project path
|
|
83
|
+
* @param {string} layer - Layer (planning/progress/memory)
|
|
84
|
+
* @param {string} filename - Optional custom filename
|
|
85
|
+
* @returns {Promise<Array<Object>>} - Array of log entries
|
|
86
|
+
*/
|
|
87
|
+
async function readTodaySession(projectGlobalPath, layer, filename = null) {
|
|
88
|
+
const filePath = getTodaySessionFilePath(projectGlobalPath, layer, filename)
|
|
89
|
+
return await jsonlHelper.readJsonLines(filePath)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Read session logs for a date range
|
|
94
|
+
*
|
|
95
|
+
* @param {string} projectGlobalPath - Global project path
|
|
96
|
+
* @param {string} layer - Layer (planning/progress/memory)
|
|
97
|
+
* @param {number} daysBack - Number of days to look back
|
|
98
|
+
* @returns {Promise<Array<Object>>} - Array of all log entries
|
|
99
|
+
*/
|
|
100
|
+
async function readRecentSessions(projectGlobalPath, layer, daysBack = 7) {
|
|
101
|
+
const fromDate = dateHelper.getDaysAgo(daysBack)
|
|
102
|
+
const toDate = new Date()
|
|
103
|
+
|
|
104
|
+
const dates = dateHelper.getDateRange(fromDate, toDate)
|
|
105
|
+
const allEntries = []
|
|
106
|
+
|
|
107
|
+
for (const date of dates) {
|
|
108
|
+
const yearMonth = dateHelper.formatMonth(date)
|
|
109
|
+
const dateKey = dateHelper.getDateKey(date)
|
|
110
|
+
const [year, month] = yearMonth.split('-')
|
|
111
|
+
|
|
112
|
+
const filePath = path.join(
|
|
113
|
+
projectGlobalPath,
|
|
114
|
+
layer,
|
|
115
|
+
'sessions',
|
|
116
|
+
year,
|
|
117
|
+
month,
|
|
118
|
+
`${dateKey}.jsonl`
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
const entries = await jsonlHelper.readJsonLines(filePath)
|
|
122
|
+
allEntries.push(...entries)
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return allEntries
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Get session statistics for a layer
|
|
130
|
+
*
|
|
131
|
+
* @param {string} projectGlobalPath - Global project path
|
|
132
|
+
* @param {string} layer - Layer (planning/progress/memory)
|
|
133
|
+
* @param {number} daysBack - Number of days to analyze
|
|
134
|
+
* @returns {Promise<Object>} - Statistics object
|
|
135
|
+
*/
|
|
136
|
+
async function getSessionStats(projectGlobalPath, layer, daysBack = 30) {
|
|
137
|
+
const entries = await readRecentSessions(projectGlobalPath, layer, daysBack)
|
|
138
|
+
|
|
139
|
+
// Group by type
|
|
140
|
+
const byType = {}
|
|
141
|
+
for (const entry of entries) {
|
|
142
|
+
const type = entry.type || 'unknown'
|
|
143
|
+
byType[type] = (byType[type] || 0) + 1
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// Group by date
|
|
147
|
+
const byDate = {}
|
|
148
|
+
for (const entry of entries) {
|
|
149
|
+
const timestamp = entry.ts || entry.timestamp
|
|
150
|
+
if (timestamp) {
|
|
151
|
+
const date = dateHelper.getDateKey(new Date(timestamp))
|
|
152
|
+
byDate[date] = (byDate[date] || 0) + 1
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
return {
|
|
157
|
+
totalEntries: entries.length,
|
|
158
|
+
byType,
|
|
159
|
+
byDate,
|
|
160
|
+
activeDays: Object.keys(byDate).length,
|
|
161
|
+
averagePerDay: entries.length / Math.max(daysBack, 1),
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Archive old session data (move sessions older than N days)
|
|
167
|
+
*
|
|
168
|
+
* @param {string} projectGlobalPath - Global project path
|
|
169
|
+
* @param {string} layer - Layer (planning/progress/memory)
|
|
170
|
+
* @param {number} daysToKeep - Keep sessions newer than this (default: 30)
|
|
171
|
+
* @returns {Promise<Object>} - Archive result
|
|
172
|
+
*/
|
|
173
|
+
async function archiveOldSessions(projectGlobalPath, layer, daysToKeep = 30) {
|
|
174
|
+
const cutoffDate = dateHelper.getDaysAgo(daysToKeep)
|
|
175
|
+
const archiveDir = path.join(projectGlobalPath, layer, 'archive')
|
|
176
|
+
await fileHelper.ensureDir(archiveDir)
|
|
177
|
+
|
|
178
|
+
const sessionsDir = path.join(projectGlobalPath, layer, 'sessions')
|
|
179
|
+
|
|
180
|
+
// Find all session files older than cutoff
|
|
181
|
+
const archived = []
|
|
182
|
+
const errors = []
|
|
183
|
+
|
|
184
|
+
try {
|
|
185
|
+
const years = await fileHelper.listFiles(sessionsDir, { dirsOnly: true })
|
|
186
|
+
|
|
187
|
+
for (const year of years) {
|
|
188
|
+
const yearPath = path.join(sessionsDir, year)
|
|
189
|
+
const months = await fileHelper.listFiles(yearPath, { dirsOnly: true })
|
|
190
|
+
|
|
191
|
+
for (const month of months) {
|
|
192
|
+
const monthPath = path.join(yearPath, month)
|
|
193
|
+
const sessionFiles = await fileHelper.listFiles(monthPath, { filesOnly: true })
|
|
194
|
+
|
|
195
|
+
for (const filename of sessionFiles) {
|
|
196
|
+
// Parse date from filename (YYYY-MM-DD.jsonl)
|
|
197
|
+
const dateMatch = filename.match(/(\d{4}-\d{2}-\d{2})/)
|
|
198
|
+
if (!dateMatch) continue
|
|
199
|
+
|
|
200
|
+
const sessionDate = new Date(dateMatch[1])
|
|
201
|
+
if (sessionDate < cutoffDate) {
|
|
202
|
+
const sourcePath = path.join(monthPath, filename)
|
|
203
|
+
const destPath = path.join(archiveDir, filename)
|
|
204
|
+
|
|
205
|
+
try {
|
|
206
|
+
await fileHelper.moveFile(sourcePath, destPath)
|
|
207
|
+
archived.push(filename)
|
|
208
|
+
} catch (error) {
|
|
209
|
+
errors.push({ filename, error: error.message })
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
} catch (error) {
|
|
216
|
+
// Sessions directory might not exist yet
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
return {
|
|
220
|
+
archived: archived.length,
|
|
221
|
+
files: archived,
|
|
222
|
+
errors,
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Clean empty session directories
|
|
228
|
+
*
|
|
229
|
+
* @param {string} projectGlobalPath - Global project path
|
|
230
|
+
* @param {string} layer - Layer (planning/progress/memory)
|
|
231
|
+
* @returns {Promise<number>} - Number of directories removed
|
|
232
|
+
*/
|
|
233
|
+
async function cleanEmptySessionDirs(projectGlobalPath, layer) {
|
|
234
|
+
const sessionsDir = path.join(projectGlobalPath, layer, 'sessions')
|
|
235
|
+
let cleaned = 0
|
|
236
|
+
|
|
237
|
+
try {
|
|
238
|
+
const years = await fileHelper.listFiles(sessionsDir, { dirsOnly: true })
|
|
239
|
+
|
|
240
|
+
for (const year of years) {
|
|
241
|
+
const yearPath = path.join(sessionsDir, year)
|
|
242
|
+
const months = await fileHelper.listFiles(yearPath, { dirsOnly: true })
|
|
243
|
+
|
|
244
|
+
for (const month of months) {
|
|
245
|
+
const monthPath = path.join(yearPath, month)
|
|
246
|
+
const files = await fileHelper.listFiles(monthPath)
|
|
247
|
+
|
|
248
|
+
if (files.length === 0) {
|
|
249
|
+
await fileHelper.deleteDir(monthPath)
|
|
250
|
+
cleaned++
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
// Check if year directory is now empty
|
|
255
|
+
const remainingMonths = await fileHelper.listFiles(yearPath, { dirsOnly: true })
|
|
256
|
+
if (remainingMonths.length === 0) {
|
|
257
|
+
await fileHelper.deleteDir(yearPath)
|
|
258
|
+
cleaned++
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
} catch (error) {
|
|
262
|
+
// Sessions directory might not exist
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
return cleaned
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
module.exports = {
|
|
269
|
+
getTodaySessionFilePath,
|
|
270
|
+
ensureTodaySessionDir,
|
|
271
|
+
writeToSession,
|
|
272
|
+
readTodaySession,
|
|
273
|
+
readRecentSessions,
|
|
274
|
+
getSessionStats,
|
|
275
|
+
archiveOldSessions,
|
|
276
|
+
cleanEmptySessionDirs,
|
|
277
|
+
}
|
|
@@ -24,7 +24,7 @@ function getVersion() {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
try {
|
|
27
|
-
const packageJsonPath = path.join(__dirname, '..', 'package.json')
|
|
27
|
+
const packageJsonPath = path.join(__dirname, '..', '..', 'package.json')
|
|
28
28
|
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'))
|
|
29
29
|
cachedVersion = packageJson.version
|
|
30
30
|
cachedPackageJson = packageJson
|
package/package.json
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prjct-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Built for Claude - Ship fast, track progress, stay focused. Developer momentum tool for indie hackers.",
|
|
5
5
|
"main": "core/index.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"prjct": "
|
|
7
|
+
"prjct": "bin/prjct"
|
|
8
8
|
},
|
|
9
9
|
"publishConfig": {
|
|
10
10
|
"access": "public",
|
|
11
11
|
"registry": "https://registry.npmjs.org"
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
|
-
"postinstall": "node scripts/post-install.js",
|
|
15
|
-
"preuninstall": "node scripts/preuninstall.js",
|
|
16
14
|
"install-global": "./scripts/install.sh",
|
|
17
15
|
"test": "echo 'No tests configured'",
|
|
18
16
|
"validate": "node scripts/validate-commands.js",
|
|
@@ -41,13 +39,12 @@
|
|
|
41
39
|
"license": "MIT",
|
|
42
40
|
"dependencies": {
|
|
43
41
|
"chalk": "^4.1.2",
|
|
44
|
-
"commander": "^11.0.0",
|
|
45
|
-
"ora": "^5.4.1",
|
|
46
42
|
"prompts": "^2.4.2"
|
|
47
43
|
},
|
|
48
44
|
"devDependencies": {
|
|
49
45
|
"@types/node": "^20.0.0",
|
|
50
46
|
"eslint": "^8.57.1",
|
|
47
|
+
"eslint-config-prettier": "^10.1.8",
|
|
51
48
|
"eslint-config-standard": "^17.1.0",
|
|
52
49
|
"eslint-plugin-import": "^2.32.0",
|
|
53
50
|
"eslint-plugin-n": "^16.6.2",
|
|
@@ -58,7 +55,7 @@
|
|
|
58
55
|
},
|
|
59
56
|
"repository": {
|
|
60
57
|
"type": "git",
|
|
61
|
-
"url": "https://github.com/jlopezlira/prjct-cli"
|
|
58
|
+
"url": "git+https://github.com/jlopezlira/prjct-cli.git"
|
|
62
59
|
},
|
|
63
60
|
"bugs": {
|
|
64
61
|
"url": "https://github.com/jlopezlira/prjct-cli/issues"
|
|
@@ -72,9 +69,6 @@
|
|
|
72
69
|
"core/",
|
|
73
70
|
"templates/",
|
|
74
71
|
"scripts/install.sh",
|
|
75
|
-
"scripts/verify-installation.sh",
|
|
76
|
-
"scripts/post-install.js",
|
|
77
|
-
"scripts/preuninstall.js",
|
|
78
72
|
"LICENSE",
|
|
79
73
|
"README.md",
|
|
80
74
|
"CHANGELOG.md",
|
|
@@ -82,8 +76,6 @@
|
|
|
82
76
|
],
|
|
83
77
|
"trustedDependencies": [
|
|
84
78
|
"chalk",
|
|
85
|
-
"commander",
|
|
86
|
-
"ora",
|
|
87
79
|
"prompts"
|
|
88
80
|
]
|
|
89
81
|
}
|
|
@@ -8,6 +8,74 @@ AI assistant guidance for **prjct-cli** - developer momentum tool for solo build
|
|
|
8
8
|
|
|
9
9
|
**IS** frictionless progress tracking. Talk naturally, ship features, celebrate wins.
|
|
10
10
|
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Dynamic Agent Generation
|
|
14
|
+
|
|
15
|
+
**YOU decide** what specialists to generate based on project analysis. No predetermined lists.
|
|
16
|
+
|
|
17
|
+
### When to Generate Agents
|
|
18
|
+
|
|
19
|
+
From commands that analyze the project:
|
|
20
|
+
|
|
21
|
+
- `/p:sync` - Sync and generate agents
|
|
22
|
+
- `/p:init` - Initialize with existing code
|
|
23
|
+
- `/p:architect` - After generating project plan
|
|
24
|
+
|
|
25
|
+
### How to Generate
|
|
26
|
+
|
|
27
|
+
```javascript
|
|
28
|
+
const generator = new AgentGenerator(projectId)
|
|
29
|
+
|
|
30
|
+
await generator.generateDynamicAgent('agent-name', {
|
|
31
|
+
role: 'Clear Role Description',
|
|
32
|
+
expertise: 'Specific technologies, versions, tools',
|
|
33
|
+
responsibilities: 'What they handle in this project',
|
|
34
|
+
projectContext: {
|
|
35
|
+
/* optional context */
|
|
36
|
+
},
|
|
37
|
+
})
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Example Usage
|
|
41
|
+
|
|
42
|
+
**1. Read the analysis first:**
|
|
43
|
+
|
|
44
|
+
```javascript
|
|
45
|
+
// Read analysis/repo-summary.md to understand the stack
|
|
46
|
+
const analysis = await readAnalysis('analysis/repo-summary.md')
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**2. Generate specialists for technologies YOU find:**
|
|
50
|
+
|
|
51
|
+
```javascript
|
|
52
|
+
// For EACH major technology found in the analysis, create a specialist
|
|
53
|
+
// Use descriptive names and specific details from the analysis
|
|
54
|
+
|
|
55
|
+
await generator.generateDynamicAgent('descriptive-name', {
|
|
56
|
+
role: 'Clear role based on what you found',
|
|
57
|
+
expertise: 'Specific versions, frameworks, tools from analysis',
|
|
58
|
+
responsibilities: 'What this agent handles in THIS specific project',
|
|
59
|
+
projectContext: {
|
|
60
|
+
/* any relevant context from analysis */
|
|
61
|
+
},
|
|
62
|
+
})
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**You decide everything** - read the analysis, understand the stack, generate appropriate specialists. No predetermined lists, no assumptions, no limitations.
|
|
66
|
+
|
|
67
|
+
### Guidelines
|
|
68
|
+
|
|
69
|
+
1. **Read analysis** - Understand full stack from analysis/repo-summary.md
|
|
70
|
+
2. **Create specialists** - For each major technology found
|
|
71
|
+
3. **Name descriptively** - `go-backend` not `be`, `vuejs-frontend` not `fe`
|
|
72
|
+
4. **Be specific** - Include versions, frameworks, tools
|
|
73
|
+
5. **No predetermined list** - ANY stack works (Elixir, Phoenix, Svelte, etc.)
|
|
74
|
+
6. **Follow project plan** - Only generate agents for technologies found in project plan and related to your role
|
|
75
|
+
7. **Best practices** - Allways use best practices for your role
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
11
79
|
## Talk Naturally
|
|
12
80
|
|
|
13
81
|
**Zero memorization** - just describe what you want!
|
|
@@ -15,14 +83,14 @@ AI assistant guidance for **prjct-cli** - developer momentum tool for solo build
|
|
|
15
83
|
Works in **any language** via semantic understanding.
|
|
16
84
|
|
|
17
85
|
**Examples:**
|
|
86
|
+
|
|
18
87
|
```
|
|
19
88
|
Start working:
|
|
20
89
|
→ "I want to build the login page"
|
|
21
|
-
→ "Voy a hacer el dashboard"
|
|
22
90
|
→ Command: /p:now
|
|
23
91
|
|
|
24
92
|
Finished:
|
|
25
|
-
→ "I'm done" | "
|
|
93
|
+
→ "I'm done" | "completed"
|
|
26
94
|
→ Command: /p:done
|
|
27
95
|
|
|
28
96
|
Ship:
|
|
@@ -31,12 +99,14 @@ Ship:
|
|
|
31
99
|
```
|
|
32
100
|
|
|
33
101
|
**Both work:**
|
|
102
|
+
|
|
34
103
|
- Natural: "I want to start building auth"
|
|
35
104
|
- Direct: `/p:now "building auth"`
|
|
36
105
|
|
|
37
106
|
## Architecture
|
|
38
107
|
|
|
39
108
|
**Global**: `~/.prjct-cli/projects/{id}/`
|
|
109
|
+
|
|
40
110
|
```
|
|
41
111
|
core/ # now.md, next.md, context.md
|
|
42
112
|
progress/ # shipped.md, metrics.md
|
|
@@ -57,32 +127,34 @@ memory/ # context.jsonl
|
|
|
57
127
|
|
|
58
128
|
**💡 Tip**: `/p:help` for interactive guide
|
|
59
129
|
|
|
60
|
-
| Command
|
|
61
|
-
|
|
62
|
-
| `/p:help`
|
|
63
|
-
| `/p:init`
|
|
64
|
-
| `/p:now [task]`
|
|
65
|
-
| `/p:done`
|
|
66
|
-
| `/p:ship <feature>`
|
|
67
|
-
| `/p:next`
|
|
68
|
-
| `/p:idea <text>`
|
|
69
|
-
| `/p:recap`
|
|
70
|
-
| `/p:progress [period]` | "how am I doing?" | Metrics
|
|
71
|
-
| `/p:stuck <issue>`
|
|
72
|
-
| `/p:context`
|
|
73
|
-
| `/p:analyze`
|
|
74
|
-
| `/p:design`
|
|
75
|
-
| `/p:cleanup`
|
|
130
|
+
| Command | Say This | Action |
|
|
131
|
+
| ---------------------- | ----------------- | ----------------- |
|
|
132
|
+
| `/p:help` | "help" | Interactive guide |
|
|
133
|
+
| `/p:init` | - | Create structure |
|
|
134
|
+
| `/p:now [task]` | "start [task]" | Set current task |
|
|
135
|
+
| `/p:done` | "I'm done" | Complete & next |
|
|
136
|
+
| `/p:ship <feature>` | "ship [feature]" | Celebrate win |
|
|
137
|
+
| `/p:next` | "what's next?" | Show queue |
|
|
138
|
+
| `/p:idea <text>` | "idea about [x]" | Capture ideas |
|
|
139
|
+
| `/p:recap` | "show progress" | Overview |
|
|
140
|
+
| `/p:progress [period]` | "how am I doing?" | Metrics |
|
|
141
|
+
| `/p:stuck <issue>` | "I'm stuck" | Get help |
|
|
142
|
+
| `/p:context` | "show context" | Display state |
|
|
143
|
+
| `/p:analyze` | "analyze repo" | Generate summary |
|
|
144
|
+
| `/p:design` | "design [x]" | Generate specs |
|
|
145
|
+
| `/p:cleanup` | "clean up" | Remove dead code |
|
|
76
146
|
|
|
77
147
|
## How It Works
|
|
78
148
|
|
|
79
149
|
**Natural conversation:**
|
|
150
|
+
|
|
80
151
|
- Detect intent
|
|
81
152
|
- Map to command
|
|
82
153
|
- Respond with options
|
|
83
154
|
- Suggest next steps
|
|
84
155
|
|
|
85
156
|
**Every response:**
|
|
157
|
+
|
|
86
158
|
- What you did
|
|
87
159
|
- Natural options
|
|
88
160
|
- Command alternatives
|
|
@@ -93,15 +165,15 @@ memory/ # context.jsonl
|
|
|
93
165
|
|
|
94
166
|
Semantic understanding, not pattern matching.
|
|
95
167
|
|
|
96
|
-
| Intent
|
|
97
|
-
|
|
98
|
-
| Start task | `/p:now`
|
|
99
|
-
| Finish
|
|
100
|
-
| Ship
|
|
101
|
-
| Idea
|
|
102
|
-
| Progress
|
|
103
|
-
| Stuck
|
|
104
|
-
| Next
|
|
168
|
+
| Intent | Command | Examples |
|
|
169
|
+
| ---------- | ---------- | -------------------------------------------- |
|
|
170
|
+
| Start task | `/p:now` | "work on X", "starting API", "voy a hacer X" |
|
|
171
|
+
| Finish | `/p:done` | "done", "finished", "terminé", "listo" |
|
|
172
|
+
| Ship | `/p:ship` | "ship this", "deploy X", "it's ready" |
|
|
173
|
+
| Idea | `/p:idea` | "I have an idea", "what if we..." |
|
|
174
|
+
| Progress | `/p:recap` | "show progress", "how am I doing" |
|
|
175
|
+
| Stuck | `/p:stuck` | "I'm stuck", "help with X" |
|
|
176
|
+
| Next | `/p:next` | "what's next", "qué sigue" |
|
|
105
177
|
|
|
106
178
|
**Any language works** - if you understand intent, execute the command.
|
|
107
179
|
|
|
@@ -110,11 +182,13 @@ Semantic understanding, not pattern matching.
|
|
|
110
182
|
**User:** "I want to start building the login page"
|
|
111
183
|
|
|
112
184
|
**Your reasoning:**
|
|
185
|
+
|
|
113
186
|
- Intent: Start working
|
|
114
187
|
- Command: `/p:now`
|
|
115
188
|
- Param: "building the login page"
|
|
116
189
|
|
|
117
190
|
**Response:**
|
|
191
|
+
|
|
118
192
|
```
|
|
119
193
|
💬 Understood: "start building the login page"
|
|
120
194
|
⚡ Executing: /p:now "building the login page"
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
allowed-tools: [Read, Bash]
|
|
3
|
+
description: 'Analyze codebase and generate comprehensive summary'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /p:analyze
|
|
7
|
+
|
|
8
|
+
## Instructions for Claude
|
|
9
|
+
|
|
10
|
+
You are analyzing a codebase to generate a comprehensive summary. **NO predetermined patterns** - analyze based on what you actually find.
|
|
11
|
+
|
|
12
|
+
## Your Task
|
|
13
|
+
|
|
14
|
+
1. **Read project files** using the analyzer helpers:
|
|
15
|
+
- package.json, Cargo.toml, go.mod, requirements.txt, etc.
|
|
16
|
+
- Directory structure
|
|
17
|
+
- Git history and stats
|
|
18
|
+
- Key source files
|
|
19
|
+
|
|
20
|
+
2. **Understand the stack** - DON'T use predetermined lists:
|
|
21
|
+
- What language(s) are used?
|
|
22
|
+
- What frameworks are used?
|
|
23
|
+
- What tools and libraries are important?
|
|
24
|
+
- What's the architecture?
|
|
25
|
+
|
|
26
|
+
3. **Identify features** - based on actual code, not assumptions:
|
|
27
|
+
- What has been built?
|
|
28
|
+
- What's the current state?
|
|
29
|
+
- What patterns do you see?
|
|
30
|
+
|
|
31
|
+
4. **Generate agents** - create specialists for THIS project:
|
|
32
|
+
- Read the stack you identified
|
|
33
|
+
- Create agents for each major technology
|
|
34
|
+
- Use descriptive names (e.g., 'express-backend', 'react-frontend', 'postgres-db')
|
|
35
|
+
- Include specific versions and tools found
|
|
36
|
+
|
|
37
|
+
## Guidelines
|
|
38
|
+
|
|
39
|
+
- **No assumptions** - only report what you find
|
|
40
|
+
- **No predefined maps** - don't assume express = "REST API server"
|
|
41
|
+
- **Read and understand** - look at actual code structure
|
|
42
|
+
- **Any stack works** - Elixir, Rust, Go, Python, Ruby, whatever exists
|
|
43
|
+
- **Be specific** - include versions, specific tools, actual patterns
|
|
44
|
+
|
|
45
|
+
## Output Format
|
|
46
|
+
|
|
47
|
+
Generate `analysis/repo-summary.md` with:
|
|
48
|
+
|
|
49
|
+
```markdown
|
|
50
|
+
# Project Analysis
|
|
51
|
+
|
|
52
|
+
## Stack
|
|
53
|
+
|
|
54
|
+
[What you found - languages, frameworks, tools with versions]
|
|
55
|
+
|
|
56
|
+
## Architecture
|
|
57
|
+
|
|
58
|
+
[How it's organized - based on actual structure]
|
|
59
|
+
|
|
60
|
+
## Features
|
|
61
|
+
|
|
62
|
+
[What has been built - based on code and git history]
|
|
63
|
+
|
|
64
|
+
## Statistics
|
|
65
|
+
|
|
66
|
+
- Total files: [count]
|
|
67
|
+
- Contributors: [count]
|
|
68
|
+
- Age: [age]
|
|
69
|
+
- Last activity: [date]
|
|
70
|
+
|
|
71
|
+
## Recommendations
|
|
72
|
+
|
|
73
|
+
[What agents to generate, what's next, etc.]
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## After Analysis
|
|
77
|
+
|
|
78
|
+
1. Save summary to `analysis/repo-summary.md`
|
|
79
|
+
2. Generate agents using `generator.generateDynamicAgent()`
|
|
80
|
+
3. Report what was found
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
**Remember**: You decide EVERYTHING based on analysis. No if/else, no predetermined patterns.
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
allowed-tools: [Read, Grep, Glob, Bash, TodoWrite]
|
|
3
|
-
description:
|
|
3
|
+
description: 'Analyze repository and generate summary'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# /p:analyze
|
|
7
7
|
|
|
8
8
|
## Flow
|
|
9
|
+
|
|
9
10
|
1. Scan: project structure (Glob)
|
|
10
11
|
2. Detect: technologies (package.json, requirements.txt, etc.)
|
|
11
12
|
3. Analyze: architecture patterns
|
|
@@ -14,28 +15,34 @@ description: "Analyze repository and generate summary"
|
|
|
14
15
|
6. Save: `analysis/repo-summary.md`
|
|
15
16
|
|
|
16
17
|
## Report Format
|
|
18
|
+
|
|
17
19
|
```markdown
|
|
18
20
|
# Repository Analysis
|
|
19
21
|
|
|
20
22
|
## Overview
|
|
23
|
+
|
|
21
24
|
- Type: {type}
|
|
22
25
|
- Language: {lang}
|
|
23
26
|
- Framework: {framework}
|
|
24
27
|
|
|
25
28
|
## Git Status
|
|
29
|
+
|
|
26
30
|
- Last commit: {hash} "{msg}" ({time_ago})
|
|
27
31
|
- Status: {clean/has_changes}
|
|
28
32
|
|
|
29
33
|
## Stack
|
|
34
|
+
|
|
30
35
|
- Languages: {list}
|
|
31
36
|
- Frameworks: {list}
|
|
32
37
|
- Dependencies: {count}
|
|
33
38
|
|
|
34
39
|
## Architecture
|
|
40
|
+
|
|
35
41
|
- Pattern: {pattern}
|
|
36
42
|
- Entry points: {files}
|
|
37
43
|
|
|
38
44
|
## Recommended Agents
|
|
45
|
+
|
|
39
46
|
Base (6): PM, UX, FE, BE, QA, Scribe
|
|
40
47
|
Additional: {conditional_agents}
|
|
41
48
|
|
|
@@ -43,6 +50,7 @@ Generated: {timestamp}
|
|
|
43
50
|
```
|
|
44
51
|
|
|
45
52
|
## Response
|
|
53
|
+
|
|
46
54
|
```
|
|
47
55
|
🔍 Analysis complete!
|
|
48
56
|
|
|
@@ -53,4 +61,3 @@ Stack: {stack}
|
|
|
53
61
|
|
|
54
62
|
/p:roadmap | /p:now
|
|
55
63
|
```
|
|
56
|
-
|