prjct-cli 0.8.8 → 0.9.2

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 (40) hide show
  1. package/CHANGELOG.md +194 -0
  2. package/core/__tests__/agentic/agent-router.test.js +398 -0
  3. package/core/__tests__/agentic/context-filter.test.js +494 -0
  4. package/core/__tests__/domain/analyzer.test.js +324 -0
  5. package/core/__tests__/infrastructure/author-detector.test.js +103 -0
  6. package/core/__tests__/infrastructure/config-manager.test.js +454 -0
  7. package/core/__tests__/infrastructure/path-manager.test.js +412 -0
  8. package/core/__tests__/utils/jsonl-helper.test.js +387 -0
  9. package/core/agentic/agent-router.js +482 -0
  10. package/core/agentic/command-executor.js +70 -15
  11. package/core/agentic/context-filter.js +549 -0
  12. package/core/agentic/prompt-builder.js +48 -38
  13. package/core/command-registry.js +104 -164
  14. package/core/domain/agent-generator.js +55 -44
  15. package/core/domain/architecture-generator.js +561 -0
  16. package/core/domain/task-stack.js +496 -0
  17. package/package.json +2 -1
  18. package/templates/commands/analyze.md +10 -53
  19. package/templates/commands/bug.md +11 -70
  20. package/templates/commands/build.md +7 -37
  21. package/templates/commands/cleanup.md +9 -32
  22. package/templates/commands/dash.md +241 -0
  23. package/templates/commands/design.md +5 -28
  24. package/templates/commands/done.md +6 -20
  25. package/templates/commands/feature.md +11 -83
  26. package/templates/commands/help.md +9 -38
  27. package/templates/commands/idea.md +7 -28
  28. package/templates/commands/init.md +10 -89
  29. package/templates/commands/next.md +6 -26
  30. package/templates/commands/now.md +6 -26
  31. package/templates/commands/pause.md +18 -0
  32. package/templates/commands/progress.md +5 -50
  33. package/templates/commands/recap.md +5 -54
  34. package/templates/commands/resume.md +97 -0
  35. package/templates/commands/ship.md +13 -68
  36. package/templates/commands/status.md +7 -32
  37. package/templates/commands/sync.md +7 -24
  38. package/templates/commands/work.md +44 -0
  39. package/templates/commands/workflow.md +3 -25
  40. package/templates/planning-methodology.md +195 -0
@@ -1,34 +1,12 @@
1
1
  ---
2
2
  allowed-tools: [Read, Write]
3
- description: 'Show workflow status'
3
+ description: 'Workflow status'
4
4
  ---
5
5
 
6
6
  # /p:workflow
7
7
 
8
- ## Usage
9
-
10
- ```
11
- /p:workflow # Show status
12
- /p:workflow skip # Skip current step
13
- ```
14
-
15
8
  ## Flow
16
-
17
- 1. Read: `workflow/state.json`
18
- 2. Display: current step + progress
19
- 3. Check: capabilities for next steps
9
+ Read `workflow/state.json` → Show progress
20
10
 
21
11
  ## Response
22
-
23
- ```
24
- 🔄 Workflow: {task_type}
25
-
26
- Progress: {current}/{total}
27
- Current: {step_name} ({agent})
28
- Status: {status}
29
-
30
- Next: {next_step}
31
- {capability_prompt_if_needed}
32
-
33
- /p:done | /p:workflow skip
34
- ```
12
+ `🔄 {task} | Step {N}/{total}: {step} ({agent}) | Skip: /p:workflow skip`
@@ -0,0 +1,195 @@
1
+ # Software Planning Methodology for prjct
2
+
3
+ This methodology guides the AI through developing ideas into complete technical specifications.
4
+
5
+ ## Phase 1: Discovery & Problem Definition
6
+
7
+ ### Questions to Ask
8
+ - What specific problem does this solve?
9
+ - Who is the target user?
10
+ - What's the budget and timeline?
11
+ - What happens if this problem isn't solved?
12
+
13
+ ### Output
14
+ - Problem statement
15
+ - User personas
16
+ - Business constraints
17
+ - Success metrics
18
+
19
+ ## Phase 2: User Flows & Journeys
20
+
21
+ ### Process
22
+ 1. Map primary user journey
23
+ 2. Identify entry points
24
+ 3. Define success states
25
+ 4. Document error states
26
+ 5. Note edge cases
27
+
28
+ ### Jobs-to-be-Done
29
+ When [situation], I want to [motivation], so I can [expected outcome]
30
+
31
+ ## Phase 3: Domain Modeling
32
+
33
+ ### Entity Definition
34
+ For each entity, define:
35
+ - Description
36
+ - Attributes (name, type, constraints)
37
+ - Relationships
38
+ - Business rules
39
+ - Lifecycle states
40
+
41
+ ### Bounded Contexts
42
+ Group entities into logical boundaries with:
43
+ - Owned entities
44
+ - External dependencies
45
+ - Events published/consumed
46
+
47
+ ## Phase 4: API Contract Design
48
+
49
+ ### Style Selection
50
+ | Style | Best For |
51
+ |----------|----------|
52
+ | REST | Simple CRUD, broad compatibility |
53
+ | GraphQL | Complex data requirements |
54
+ | tRPC | Full-stack TypeScript |
55
+ | gRPC | Microservices |
56
+
57
+ ### Endpoint Specification
58
+ - Method/Type
59
+ - Path/Name
60
+ - Authentication
61
+ - Input/Output schemas
62
+ - Error responses
63
+
64
+ ## Phase 5: System Architecture
65
+
66
+ ### Pattern Selection
67
+ | Pattern | Best For |
68
+ |---------|----------|
69
+ | Modular Monolith | Small team, fast iteration |
70
+ | Serverless-First | Variable load, event-driven |
71
+ | Microservices | Large team, complex domain |
72
+
73
+ ### C4 Model
74
+ 1. Context - System and external actors
75
+ 2. Container - Major components
76
+ 3. Component - Internal structure
77
+
78
+ ## Phase 6: Data Architecture
79
+
80
+ ### Database Selection
81
+ | Type | Options | Best For |
82
+ |------|---------|----------|
83
+ | Relational | PostgreSQL | ACID, structured data |
84
+ | Document | MongoDB | Flexible schema |
85
+ | Key-Value | Redis | Caching, sessions |
86
+
87
+ ### Schema Design
88
+ - Tables and columns
89
+ - Indexes
90
+ - Constraints
91
+ - Relationships
92
+
93
+ ## Phase 7: Tech Stack Decision
94
+
95
+ ### Frontend Stack
96
+ - Framework (Next.js, Remix, SvelteKit)
97
+ - Styling (Tailwind, CSS Modules)
98
+ - State management (Zustand, Jotai)
99
+ - Data fetching (TanStack Query, SWR)
100
+
101
+ ### Backend Stack
102
+ - Runtime (Node.js, Bun)
103
+ - Framework (Next.js API, Hono)
104
+ - ORM (Drizzle, Prisma)
105
+ - Validation (Zod, Valibot)
106
+
107
+ ### Infrastructure
108
+ - Hosting (Vercel, Railway, Fly.io)
109
+ - Database (Neon, PlanetScale)
110
+ - Cache (Upstash, Redis)
111
+ - Monitoring (Sentry, Axiom)
112
+
113
+ ## Phase 8: Implementation Roadmap
114
+
115
+ ### MVP Scope Definition
116
+ - Must-have features (P0)
117
+ - Should-have features (P1)
118
+ - Nice-to-have features (P2)
119
+ - Future considerations (P3)
120
+
121
+ ### Development Phases
122
+ 1. Foundation - Setup, core infrastructure
123
+ 2. Core Features - Primary functionality
124
+ 3. Polish & Launch - Optimization, deployment
125
+
126
+ ### Risk Assessment
127
+ - Technical risks and mitigation
128
+ - Business risks and mitigation
129
+ - Dependencies and assumptions
130
+
131
+ ## Output Structure
132
+
133
+ When complete, generate:
134
+
135
+ 1. **Executive Summary** - Problem, solution, key decisions
136
+ 2. **Architecture Documents** - All phases detailed
137
+ 3. **Implementation Plan** - Prioritized tasks with estimates
138
+ 4. **Decision Log** - Key choices and reasoning
139
+
140
+ ## Interactive Development Process
141
+
142
+ 1. **Classification**: Determine if idea needs full architecture
143
+ 2. **Discovery**: Ask clarifying questions
144
+ 3. **Generation**: Create architecture phase by phase
145
+ 4. **Validation**: Review with user at key points
146
+ 5. **Refinement**: Iterate based on feedback
147
+ 6. **Output**: Save complete specification
148
+
149
+ ## Success Criteria
150
+
151
+ A complete architecture includes:
152
+ - Clear problem definition
153
+ - User flows mapped
154
+ - Domain model defined
155
+ - API contracts specified
156
+ - Tech stack chosen
157
+ - Database schema designed
158
+ - Implementation roadmap created
159
+ - Risk assessment completed
160
+
161
+ ## Templates
162
+
163
+ ### Entity Template
164
+ ```
165
+ Entity: [Name]
166
+ ├── Description: [What it represents]
167
+ ├── Attributes:
168
+ │ ├── id: uuid (primary key)
169
+ │ └── [field]: [type] ([constraints])
170
+ ├── Relationships: [connections]
171
+ ├── Rules: [invariants]
172
+ └── States: [lifecycle]
173
+ ```
174
+
175
+ ### API Endpoint Template
176
+ ```
177
+ Operation: [Name]
178
+ ├── Method: [GET/POST/PUT/DELETE]
179
+ ├── Path: [/api/resource]
180
+ ├── Auth: [Required/Optional]
181
+ ├── Input: {schema}
182
+ ├── Output: {schema}
183
+ └── Errors: [codes and descriptions]
184
+ ```
185
+
186
+ ### Phase Template
187
+ ```
188
+ Phase: [Name]
189
+ ├── Duration: [timeframe]
190
+ ├── Tasks:
191
+ │ ├── [Task 1]
192
+ │ └── [Task 2]
193
+ ├── Deliverable: [outcome]
194
+ └── Dependencies: [prerequisites]
195
+ ```