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.
Files changed (83) hide show
  1. package/CHANGELOG.md +67 -6
  2. package/CLAUDE.md +442 -36
  3. package/README.md +47 -54
  4. package/bin/prjct +170 -240
  5. package/core/agentic/command-executor.js +113 -0
  6. package/core/agentic/context-builder.js +85 -0
  7. package/core/agentic/prompt-builder.js +86 -0
  8. package/core/agentic/template-loader.js +104 -0
  9. package/core/agentic/tool-registry.js +117 -0
  10. package/core/command-registry.js +106 -62
  11. package/core/commands.js +2030 -2211
  12. package/core/domain/agent-generator.js +118 -0
  13. package/core/domain/analyzer.js +211 -0
  14. package/core/domain/architect-session.js +300 -0
  15. package/core/{agents → infrastructure/agents}/claude-agent.js +16 -13
  16. package/core/{author-detector.js → infrastructure/author-detector.js} +3 -1
  17. package/core/{capability-installer.js → infrastructure/capability-installer.js} +3 -6
  18. package/core/{command-installer.js → infrastructure/command-installer.js} +4 -2
  19. package/core/{config-manager.js → infrastructure/config-manager.js} +4 -4
  20. package/core/{editors-config.js → infrastructure/editors-config.js} +2 -10
  21. package/core/{migrator.js → infrastructure/migrator.js} +34 -19
  22. package/core/{path-manager.js → infrastructure/path-manager.js} +20 -44
  23. package/core/{session-manager.js → infrastructure/session-manager.js} +45 -105
  24. package/core/{update-checker.js → infrastructure/update-checker.js} +67 -67
  25. package/core/{animations-simple.js → utils/animations.js} +3 -23
  26. package/core/utils/date-helper.js +238 -0
  27. package/core/utils/file-helper.js +327 -0
  28. package/core/utils/jsonl-helper.js +206 -0
  29. package/core/{project-capabilities.js → utils/project-capabilities.js} +21 -22
  30. package/core/utils/session-helper.js +277 -0
  31. package/core/{version.js → utils/version.js} +1 -1
  32. package/package.json +4 -12
  33. package/templates/agents/AGENTS.md +101 -27
  34. package/templates/analysis/analyze.md +84 -0
  35. package/templates/commands/analyze.md +9 -2
  36. package/templates/commands/bug.md +79 -0
  37. package/templates/commands/build.md +5 -2
  38. package/templates/commands/cleanup.md +5 -2
  39. package/templates/commands/design.md +5 -2
  40. package/templates/commands/done.md +4 -2
  41. package/templates/commands/feature.md +113 -0
  42. package/templates/commands/fix.md +41 -10
  43. package/templates/commands/git.md +7 -2
  44. package/templates/commands/help.md +2 -2
  45. package/templates/commands/idea.md +14 -5
  46. package/templates/commands/init.md +62 -7
  47. package/templates/commands/next.md +4 -2
  48. package/templates/commands/now.md +4 -2
  49. package/templates/commands/progress.md +27 -5
  50. package/templates/commands/recap.md +39 -10
  51. package/templates/commands/roadmap.md +19 -5
  52. package/templates/commands/ship.md +118 -16
  53. package/templates/commands/status.md +4 -2
  54. package/templates/commands/sync.md +19 -15
  55. package/templates/commands/task.md +4 -2
  56. package/templates/commands/test.md +5 -2
  57. package/templates/commands/workflow.md +4 -2
  58. package/core/agent-generator.js +0 -525
  59. package/core/analyzer.js +0 -600
  60. package/core/animations.js +0 -277
  61. package/core/ascii-graphics.js +0 -433
  62. package/core/git-integration.js +0 -401
  63. package/core/task-schema.js +0 -342
  64. package/core/workflow-engine.js +0 -213
  65. package/core/workflow-prompts.js +0 -192
  66. package/core/workflow-rules.js +0 -147
  67. package/scripts/post-install.js +0 -121
  68. package/scripts/preuninstall.js +0 -94
  69. package/scripts/verify-installation.sh +0 -158
  70. package/templates/agents/be.template.md +0 -27
  71. package/templates/agents/coordinator.template.md +0 -34
  72. package/templates/agents/data.template.md +0 -27
  73. package/templates/agents/devops.template.md +0 -27
  74. package/templates/agents/fe.template.md +0 -27
  75. package/templates/agents/mobile.template.md +0 -27
  76. package/templates/agents/qa.template.md +0 -27
  77. package/templates/agents/scribe.template.md +0 -29
  78. package/templates/agents/security.template.md +0 -27
  79. package/templates/agents/ux.template.md +0 -27
  80. package/templates/commands/context.md +0 -36
  81. package/templates/commands/stuck.md +0 -36
  82. package/templates/examples/natural-language-examples.md +0 -532
  83. /package/core/{agent-detector.js → infrastructure/agent-detector.js} +0 -0
@@ -20,48 +20,67 @@ const COMMANDS = [
20
20
  category: 'core',
21
21
  description: 'Deep project analysis and initialization',
22
22
  usage: {
23
- claude: '/p:init',
24
- terminal: 'prjct init',
23
+ claude: '/p:init "[idea]"',
24
+ terminal: 'prjct init "[idea]"',
25
25
  },
26
- params: null,
26
+ params: '[idea]',
27
27
  implemented: true,
28
28
  hasTemplate: true,
29
29
  icon: 'Zap',
30
30
  requiresInit: false,
31
31
  blockingRules: null,
32
32
  features: [
33
- 'Analyzes codebase structure',
34
- 'Reviews docs and GitHub',
35
- 'Generates project summary',
36
- 'Creates initial roadmap',
33
+ 'Architect mode for blank projects',
34
+ 'Auto tech stack recommendation',
35
+ 'Project structure generation',
36
+ 'Initial roadmap creation',
37
+ 'Analyzes existing codebases',
37
38
  ],
38
39
  },
39
40
 
40
- // 2. Agentic Idea Evaluation
41
+ // 2. Feature with Roadmap (NEW - replaces idea)
41
42
  {
42
- name: 'idea',
43
+ name: 'feature',
43
44
  category: 'core',
44
- description: 'AI-powered idea evaluation with risk assessment',
45
+ description: 'Add feature with value analysis, roadmap, and task breakdown',
45
46
  usage: {
46
- claude: '/p:idea "add dark mode"',
47
- terminal: 'prjct idea "add dark mode"',
47
+ claude: '/p:feature "add unit testing"',
48
+ terminal: 'prjct feature "add unit testing"',
48
49
  },
49
- params: '<text>',
50
- implemented: false, // Needs agentic enhancement
50
+ params: '<description>',
51
+ implemented: true,
51
52
  hasTemplate: true,
52
- icon: 'Lightbulb',
53
+ icon: 'Package',
53
54
  requiresInit: true,
54
55
  blockingRules: null,
55
56
  features: [
56
- 'Risk assessment (low/medium/high)',
57
- 'Time estimation',
57
+ 'Value analysis (impact/effort/timing)',
58
+ 'Auto roadmap generation',
58
59
  'Task breakdown',
59
- 'Optimal timing recommendation',
60
- 'ASCII decision tree',
61
- 'Interactive keep/discard',
60
+ 'Auto-start first task',
61
+ 'Timing recommendations',
62
62
  ],
63
63
  },
64
64
 
65
+ // DEPRECATED: Use /p:feature instead
66
+ {
67
+ name: 'idea',
68
+ category: 'deprecated',
69
+ description: '[DEPRECATED] Use /p:feature instead',
70
+ usage: {
71
+ claude: null,
72
+ terminal: null,
73
+ },
74
+ params: '<text>',
75
+ implemented: false,
76
+ hasTemplate: true,
77
+ icon: 'Lightbulb',
78
+ requiresInit: true,
79
+ blockingRules: null,
80
+ deprecated: true,
81
+ replacedBy: 'feature',
82
+ },
83
+
65
84
  // 3. Strategic Roadmap
66
85
  {
67
86
  name: 'roadmap',
@@ -209,36 +228,87 @@ const COMMANDS = [
209
228
  terminal: 'prjct ship "user authentication"',
210
229
  },
211
230
  params: '<feature>',
212
- implemented: false, // Needs Git integration
231
+ implemented: true, // Complete automated workflow
213
232
  hasTemplate: true,
214
233
  icon: 'Rocket',
215
234
  requiresInit: true,
216
235
  blockingRules: null,
217
236
  features: [
218
- 'Auto-generates commit message',
219
- 'Adds "Generated-by: prjct/cli" footer',
220
- 'Interactive push confirmation',
221
- 'Moves to shipped.md',
222
- 'Completion metadata tracking',
237
+ 'Lint checks (non-blocking)',
238
+ 'Run tests (non-blocking)',
239
+ 'Update docs',
240
+ 'Update version',
241
+ 'Update CHANGELOG',
242
+ 'Git commit + push',
243
+ 'Recommend compact',
244
+ ],
245
+ },
246
+
247
+ // 10. Bug Tracking
248
+ {
249
+ name: 'bug',
250
+ category: 'core',
251
+ description: 'Report and track bugs with priority',
252
+ usage: {
253
+ claude: '/p:bug "login button not working"',
254
+ terminal: 'prjct bug "login button not working"',
255
+ },
256
+ params: '<description>',
257
+ implemented: true,
258
+ hasTemplate: true,
259
+ icon: 'Bug',
260
+ requiresInit: true,
261
+ blockingRules: null,
262
+ features: [
263
+ 'Auto-detect severity (critical/high/medium/low)',
264
+ 'Priority placement in next.md',
265
+ 'Bug tracking in memory',
266
+ 'Quick bug resolution workflow',
267
+ ],
268
+ },
269
+
270
+ // 11. Architect Execute
271
+ {
272
+ name: 'architect',
273
+ category: 'core',
274
+ description: 'Execute architect plan and generate code',
275
+ usage: {
276
+ claude: '/p:architect execute',
277
+ terminal: 'prjct architect execute',
278
+ },
279
+ params: 'execute',
280
+ implemented: true,
281
+ hasTemplate: false,
282
+ icon: 'Hammer',
283
+ requiresInit: true,
284
+ blockingRules: null,
285
+ features: [
286
+ 'Reads architect-session.md plan',
287
+ 'Generates code structure',
288
+ 'Uses Context7 for documentation',
289
+ 'Language-agnostic implementation',
223
290
  ],
224
291
  },
225
292
 
226
293
  // ===== OPTIONAL COMMANDS (Advanced features) =====
294
+
295
+ // DEPRECATED: Workflow is now automatic in /p:ship
227
296
  {
228
297
  name: 'workflow',
229
- category: 'optional',
230
- description: 'Cascading agentic workflow for complex tasks',
298
+ category: 'deprecated',
299
+ description: '[DEPRECATED] Workflow is now automatic in /p:ship',
231
300
  usage: {
232
- claude: '/p:workflow',
233
- terminal: 'prjct workflow',
301
+ claude: null,
302
+ terminal: null,
234
303
  },
235
304
  params: null,
236
- implemented: true,
305
+ implemented: false,
237
306
  hasTemplate: true,
238
307
  icon: 'GitBranch',
239
308
  requiresInit: true,
240
309
  blockingRules: null,
241
- isOptional: true,
310
+ deprecated: true,
311
+ replacedBy: 'ship',
242
312
  },
243
313
  {
244
314
  name: 'design',
@@ -459,7 +529,7 @@ const registry = {
459
529
  const notImplemented = COMMANDS.filter((c) => c.hasTemplate && !c.implemented)
460
530
  if (notImplemented.length > 0) {
461
531
  issues.push(
462
- `Commands with templates but not implemented: ${notImplemented.map((c) => c.name).join(', ')}`,
532
+ `Commands with templates but not implemented: ${notImplemented.map((c) => c.name).join(', ')}`
463
533
  )
464
534
  }
465
535
 
@@ -468,7 +538,7 @@ const registry = {
468
538
  const invalidCategories = COMMANDS.filter((c) => !validCategories.includes(c.category))
469
539
  if (invalidCategories.length > 0) {
470
540
  issues.push(
471
- `Invalid categories: ${invalidCategories.map((c) => `${c.name}:${c.category}`).join(', ')}`,
541
+ `Invalid categories: ${invalidCategories.map((c) => `${c.name}:${c.category}`).join(', ')}`
472
542
  )
473
543
  }
474
544
 
@@ -495,36 +565,10 @@ const registry = {
495
565
 
496
566
  /**
497
567
  * Get commands with blocking rules
568
+ * NOTE: Blocking rules are now handled by Claude reading templates, not deterministic code
498
569
  */
499
570
  getWithBlockingRules: () => COMMANDS.filter((c) => c.blockingRules !== null),
500
571
 
501
- /**
502
- * Check if command can execute based on blocking rules
503
- */
504
- canExecute: (commandName, context = {}) => {
505
- const command = COMMANDS.find((c) => c.name === commandName)
506
- if (!command) return { allowed: false, message: 'Command not found' }
507
- if (!command.blockingRules) return { allowed: true }
508
-
509
- // Example context checks - should be implemented per command
510
- const { hasActiveTask, hasContent } = context
511
-
512
- if (commandName === 'build' && hasActiveTask) {
513
- return { allowed: false, message: command.blockingRules.message }
514
- }
515
- if (commandName === 'done' && !hasContent) {
516
- return { allowed: false, message: command.blockingRules.message }
517
- }
518
- if (commandName === 'next' && hasActiveTask) {
519
- return {
520
- allowed: true,
521
- warning: 'You have an active task. Complete it with /p:done first.',
522
- }
523
- }
524
-
525
- return { allowed: true }
526
- },
527
-
528
572
  /**
529
573
  * Get statistics
530
574
  */
@@ -545,7 +589,7 @@ const registry = {
545
589
  ...acc,
546
590
  [cat]: COMMANDS.filter((c) => c.category === cat).length,
547
591
  }),
548
- {},
592
+ {}
549
593
  ),
550
594
  }),
551
595
  }