prjct-cli 0.13.3 → 0.15.1

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 (195) hide show
  1. package/CHANGELOG.md +122 -0
  2. package/bin/prjct +10 -13
  3. package/core/agentic/memory-system/semantic-memories.ts +2 -1
  4. package/core/agentic/plan-mode/plan-mode.ts +2 -1
  5. package/core/agentic/prompt-builder.ts +22 -43
  6. package/core/agentic/services.ts +5 -5
  7. package/core/agentic/smart-context.ts +7 -2
  8. package/core/command-registry/core-commands.ts +54 -29
  9. package/core/command-registry/optional-commands.ts +64 -0
  10. package/core/command-registry/setup-commands.ts +18 -3
  11. package/core/commands/analysis.ts +21 -68
  12. package/core/commands/analytics.ts +247 -213
  13. package/core/commands/base.ts +1 -1
  14. package/core/commands/index.ts +41 -36
  15. package/core/commands/maintenance.ts +300 -31
  16. package/core/commands/planning.ts +233 -22
  17. package/core/commands/setup.ts +3 -8
  18. package/core/commands/shipping.ts +14 -18
  19. package/core/commands/types.ts +8 -6
  20. package/core/commands/workflow.ts +105 -100
  21. package/core/context/generator.ts +317 -0
  22. package/core/context-sync.ts +7 -350
  23. package/core/data/index.ts +13 -32
  24. package/core/data/md-ideas-manager.ts +155 -0
  25. package/core/data/md-queue-manager.ts +4 -3
  26. package/core/data/md-shipped-manager.ts +90 -0
  27. package/core/data/md-state-manager.ts +11 -7
  28. package/core/domain/agent-generator.ts +23 -63
  29. package/core/events/index.ts +143 -0
  30. package/core/index.ts +17 -14
  31. package/core/infrastructure/capability-installer.ts +13 -149
  32. package/core/infrastructure/migrator/project-scanner.ts +2 -1
  33. package/core/infrastructure/path-manager.ts +4 -6
  34. package/core/infrastructure/setup.ts +3 -0
  35. package/core/infrastructure/uuid-migration.ts +750 -0
  36. package/core/outcomes/recorder.ts +2 -1
  37. package/core/plugin/loader.ts +4 -7
  38. package/core/plugin/registry.ts +3 -3
  39. package/core/schemas/index.ts +23 -25
  40. package/core/schemas/state.ts +1 -0
  41. package/core/serializers/ideas-serializer.ts +187 -0
  42. package/core/serializers/index.ts +16 -0
  43. package/core/serializers/shipped-serializer.ts +108 -0
  44. package/core/session/utils.ts +3 -9
  45. package/core/storage/ideas-storage.ts +273 -0
  46. package/core/storage/index.ts +204 -0
  47. package/core/storage/queue-storage.ts +297 -0
  48. package/core/storage/shipped-storage.ts +223 -0
  49. package/core/storage/state-storage.ts +235 -0
  50. package/core/storage/storage-manager.ts +175 -0
  51. package/package.json +1 -1
  52. package/packages/web/app/api/projects/[id]/momentum/route.ts +257 -0
  53. package/packages/web/app/api/sessions/current/route.ts +132 -0
  54. package/packages/web/app/api/sessions/history/route.ts +96 -14
  55. package/packages/web/app/globals.css +5 -0
  56. package/packages/web/app/layout.tsx +2 -0
  57. package/packages/web/app/project/[id]/code/layout.tsx +18 -0
  58. package/packages/web/app/project/[id]/code/page.tsx +408 -0
  59. package/packages/web/app/project/[id]/page.tsx +359 -389
  60. package/packages/web/app/project/[id]/reports/page.tsx +59 -0
  61. package/packages/web/app/project/[id]/reports/print/page.tsx +58 -0
  62. package/packages/web/components/ActivityTimeline/ActivityTimeline.tsx +0 -1
  63. package/packages/web/components/AgentsCard/AgentsCard.tsx +64 -34
  64. package/packages/web/components/AgentsCard/AgentsCard.types.ts +1 -0
  65. package/packages/web/components/AppSidebar/AppSidebar.tsx +135 -11
  66. package/packages/web/components/BentoCard/BentoCard.constants.ts +3 -3
  67. package/packages/web/components/BentoCard/BentoCard.tsx +2 -1
  68. package/packages/web/components/BentoGrid/BentoGrid.tsx +2 -2
  69. package/packages/web/components/BlockersCard/BlockersCard.tsx +65 -57
  70. package/packages/web/components/BlockersCard/BlockersCard.types.ts +1 -0
  71. package/packages/web/components/CommandBar/CommandBar.tsx +67 -0
  72. package/packages/web/components/CommandBar/index.ts +1 -0
  73. package/packages/web/components/DashboardContent/DashboardContent.tsx +35 -5
  74. package/packages/web/components/DateGroup/DateGroup.tsx +1 -1
  75. package/packages/web/components/EmptyState/EmptyState.tsx +39 -21
  76. package/packages/web/components/EmptyState/EmptyState.types.ts +1 -0
  77. package/packages/web/components/EventRow/EventRow.tsx +4 -4
  78. package/packages/web/components/EventRow/EventRow.utils.ts +3 -3
  79. package/packages/web/components/HeroSection/HeroSection.tsx +52 -15
  80. package/packages/web/components/HeroSection/HeroSection.types.ts +4 -4
  81. package/packages/web/components/HeroSection/HeroSection.utils.ts +7 -3
  82. package/packages/web/components/IdeasCard/IdeasCard.tsx +94 -27
  83. package/packages/web/components/IdeasCard/IdeasCard.types.ts +1 -0
  84. package/packages/web/components/MasonryGrid/MasonryGrid.tsx +18 -0
  85. package/packages/web/components/MasonryGrid/index.ts +1 -0
  86. package/packages/web/components/MomentumWidget/MomentumWidget.tsx +119 -0
  87. package/packages/web/components/MomentumWidget/MomentumWidget.types.ts +16 -0
  88. package/packages/web/components/MomentumWidget/index.ts +2 -0
  89. package/packages/web/components/NowCard/NowCard.tsx +81 -56
  90. package/packages/web/components/NowCard/NowCard.types.ts +1 -0
  91. package/packages/web/components/PageHeader/PageHeader.tsx +24 -0
  92. package/packages/web/components/PageHeader/index.ts +1 -0
  93. package/packages/web/components/ProgressRing/ProgressRing.constants.ts +2 -2
  94. package/packages/web/components/ProjectAvatar/ProjectAvatar.tsx +2 -2
  95. package/packages/web/components/ProjectColorDot/ProjectColorDot.tsx +37 -0
  96. package/packages/web/components/ProjectColorDot/index.ts +1 -0
  97. package/packages/web/components/ProjectSelectorModal/ProjectSelectorModal.tsx +104 -0
  98. package/packages/web/components/ProjectSelectorModal/index.ts +1 -0
  99. package/packages/web/components/Providers/Providers.tsx +4 -1
  100. package/packages/web/components/QueueCard/QueueCard.tsx +78 -25
  101. package/packages/web/components/QueueCard/QueueCard.types.ts +1 -0
  102. package/packages/web/components/QueueCard/QueueCard.utils.ts +3 -3
  103. package/packages/web/components/RecoverCard/RecoverCard.tsx +72 -0
  104. package/packages/web/components/RecoverCard/RecoverCard.types.ts +16 -0
  105. package/packages/web/components/RecoverCard/index.ts +2 -0
  106. package/packages/web/components/RoadmapCard/RoadmapCard.tsx +101 -33
  107. package/packages/web/components/RoadmapCard/RoadmapCard.types.ts +1 -0
  108. package/packages/web/components/ShipsCard/ShipsCard.tsx +71 -28
  109. package/packages/web/components/ShipsCard/ShipsCard.types.ts +2 -0
  110. package/packages/web/components/SparklineChart/SparklineChart.tsx +20 -18
  111. package/packages/web/components/StatsMasonry/StatsMasonry.tsx +95 -0
  112. package/packages/web/components/StatsMasonry/index.ts +1 -0
  113. package/packages/web/components/StreakCard/StreakCard.tsx +37 -35
  114. package/packages/web/components/TasksCounter/TasksCounter.tsx +1 -1
  115. package/packages/web/components/TechStackBadges/TechStackBadges.tsx +12 -4
  116. package/packages/web/components/TerminalDock/DockToggleTab.tsx +29 -0
  117. package/packages/web/components/TerminalDock/TerminalDock.tsx +386 -0
  118. package/packages/web/components/TerminalDock/TerminalDockTab.tsx +130 -0
  119. package/packages/web/components/TerminalDock/TerminalTabBar.tsx +142 -0
  120. package/packages/web/components/TerminalDock/index.ts +2 -0
  121. package/packages/web/components/VelocityBadge/VelocityBadge.tsx +8 -3
  122. package/packages/web/components/VelocityCard/VelocityCard.tsx +49 -47
  123. package/packages/web/components/WeeklyReports/PrintableReport.tsx +259 -0
  124. package/packages/web/components/WeeklyReports/ReportPreviewCard.tsx +187 -0
  125. package/packages/web/components/WeeklyReports/WeekCalendar.tsx +288 -0
  126. package/packages/web/components/WeeklyReports/WeeklyReports.tsx +149 -0
  127. package/packages/web/components/WeeklyReports/index.ts +4 -0
  128. package/packages/web/components/WeeklySparkline/WeeklySparkline.tsx +16 -4
  129. package/packages/web/components/WeeklySparkline/WeeklySparkline.types.ts +1 -0
  130. package/packages/web/components/charts/SessionsChart.tsx +6 -3
  131. package/packages/web/components/ui/dialog.tsx +143 -0
  132. package/packages/web/components/ui/drawer.tsx +135 -0
  133. package/packages/web/components/ui/select.tsx +187 -0
  134. package/packages/web/context/GlobalTerminalContext.tsx +538 -0
  135. package/packages/web/lib/commands.ts +81 -0
  136. package/packages/web/lib/generate-week-report.ts +285 -0
  137. package/packages/web/lib/parse-prjct-files.ts +56 -55
  138. package/packages/web/lib/project-colors.ts +58 -0
  139. package/packages/web/lib/projects.ts +58 -5
  140. package/packages/web/lib/services/projects.server.ts +11 -1
  141. package/packages/web/next-env.d.ts +1 -1
  142. package/packages/web/package.json +5 -1
  143. package/templates/commands/analyze.md +39 -3
  144. package/templates/commands/ask.md +58 -3
  145. package/templates/commands/bug.md +117 -26
  146. package/templates/commands/dash.md +95 -158
  147. package/templates/commands/done.md +130 -148
  148. package/templates/commands/feature.md +125 -103
  149. package/templates/commands/git.md +18 -3
  150. package/templates/commands/idea.md +121 -38
  151. package/templates/commands/init.md +124 -20
  152. package/templates/commands/migrate-all.md +63 -28
  153. package/templates/commands/migrate.md +140 -0
  154. package/templates/commands/next.md +115 -5
  155. package/templates/commands/now.md +146 -82
  156. package/templates/commands/pause.md +89 -74
  157. package/templates/commands/redo.md +6 -4
  158. package/templates/commands/resume.md +141 -59
  159. package/templates/commands/setup.md +18 -3
  160. package/templates/commands/ship.md +103 -231
  161. package/templates/commands/spec.md +98 -8
  162. package/templates/commands/suggest.md +22 -2
  163. package/templates/commands/sync.md +192 -203
  164. package/templates/commands/undo.md +6 -4
  165. package/templates/mcp-config.json +20 -1
  166. package/core/data/agents-manager.ts +0 -76
  167. package/core/data/analysis-manager.ts +0 -83
  168. package/core/data/base-manager.ts +0 -156
  169. package/core/data/ideas-manager.ts +0 -81
  170. package/core/data/outcomes-manager.ts +0 -96
  171. package/core/data/project-manager.ts +0 -75
  172. package/core/data/roadmap-manager.ts +0 -118
  173. package/core/data/shipped-manager.ts +0 -65
  174. package/core/data/state-manager.ts +0 -214
  175. package/core/state/index.ts +0 -25
  176. package/core/state/manager.ts +0 -376
  177. package/core/state/types.ts +0 -185
  178. package/core/utils/project-capabilities.ts +0 -156
  179. package/core/view-generator.ts +0 -536
  180. package/packages/web/app/project/[id]/stats/loading.tsx +0 -43
  181. package/packages/web/app/project/[id]/stats/page.tsx +0 -253
  182. package/templates/agent-assignment.md +0 -72
  183. package/templates/analysis/project-analysis.md +0 -78
  184. package/templates/checklists/accessibility.md +0 -33
  185. package/templates/commands/build.md +0 -17
  186. package/templates/commands/decision.md +0 -226
  187. package/templates/commands/fix.md +0 -79
  188. package/templates/commands/help.md +0 -61
  189. package/templates/commands/progress.md +0 -14
  190. package/templates/commands/recap.md +0 -14
  191. package/templates/commands/roadmap.md +0 -52
  192. package/templates/commands/status.md +0 -17
  193. package/templates/commands/task.md +0 -63
  194. package/templates/commands/work.md +0 -44
  195. package/templates/commands/workflow.md +0 -12
@@ -1,253 +0,0 @@
1
- import { notFound } from 'next/navigation'
2
- import {
3
- getStats,
4
- getInsightMessage,
5
- calculateStreak,
6
- calculateHealthScore,
7
- getVelocityChange,
8
- getWeeklyVelocityData,
9
- type StatsResult
10
- } from '@/lib/services/stats.server'
11
- import { getProject } from '@/lib/services/projects.server'
12
- import type { TimelineEvent } from '@/lib/parse-prjct-files'
13
-
14
- import { BentoGrid } from '@/components/BentoGrid'
15
- import { HeroSection } from '@/components/HeroSection'
16
- import { NowCard } from '@/components/NowCard'
17
- import { VelocityCard } from '@/components/VelocityCard'
18
- import { StreakCard } from '@/components/StreakCard'
19
- import { QueueCard } from '@/components/QueueCard'
20
- import { ShipsCard } from '@/components/ShipsCard'
21
- import { IdeasCard } from '@/components/IdeasCard'
22
- import { AgentsCard } from '@/components/AgentsCard'
23
- import { RoadmapCard } from '@/components/RoadmapCard'
24
- import { BlockersCard } from '@/components/BlockersCard'
25
- import { ActivityTimeline } from '@/components/ActivityTimeline'
26
-
27
- // Types for normalized component data
28
- interface NormalizedCurrentTask {
29
- task: string
30
- startedAt?: string
31
- agent?: string
32
- estimatedDuration?: string
33
- pausedAt?: string
34
- pauseReason?: string
35
- }
36
-
37
- interface NormalizedQueueItem {
38
- task: string
39
- priority?: 'low' | 'medium' | 'high' | 'critical' | number
40
- estimatedDuration?: string
41
- }
42
-
43
- interface NormalizedShip {
44
- name: string
45
- date: string
46
- duration?: string
47
- }
48
-
49
- interface NormalizedIdea {
50
- title: string
51
- impact?: string
52
- }
53
-
54
- interface NormalizedAgent {
55
- name: string
56
- description?: string
57
- successRate?: number
58
- tasksCompleted?: number
59
- bestFor?: string[]
60
- }
61
-
62
- interface NormalizedRoadmap {
63
- phases: Array<{
64
- name: string
65
- progress: number
66
- features?: Array<{ name: string; status: string }>
67
- }>
68
- progress: number
69
- }
70
-
71
- // Data normalization functions
72
- function normalizeCurrentTask(stats: StatsResult): NormalizedCurrentTask | null {
73
- if (stats.state?.currentTask) {
74
- return {
75
- task: stats.state.currentTask.description,
76
- startedAt: stats.state.currentTask.startedAt,
77
- // Simplified - removed legacy fields not in new schema
78
- }
79
- }
80
- return stats.legacyStats?.currentTask ?? null
81
- }
82
-
83
- function normalizeQueue(stats: StatsResult): NormalizedQueueItem[] {
84
- if (stats.queue?.tasks) {
85
- return stats.queue.tasks
86
- .filter(t => !t.completed)
87
- .map(q => ({
88
- task: q.description,
89
- priority: q.priority,
90
- }))
91
- }
92
- return stats.legacyStats?.queue ?? []
93
- }
94
-
95
- function normalizeRoadmap(stats: StatsResult): NormalizedRoadmap | null {
96
- const features = stats.roadmap?.features ?? []
97
- if (features.length > 0) {
98
- const completed = features.filter(f =>
99
- f.status === 'shipped' || f.status === 'completed'
100
- ).length
101
-
102
- return {
103
- phases: features.map(f => ({
104
- name: f.name,
105
- progress: f.status === 'shipped' || f.status === 'completed' ? 100 :
106
- f.status === 'active' ? 50 : 0,
107
- features: f.tasks.map(t => ({
108
- name: t.description,
109
- status: t.completed ? 'completed' : 'pending'
110
- }))
111
- })),
112
- progress: Math.round((completed / features.length) * 100)
113
- }
114
- }
115
- return stats.legacyStats?.roadmap ?? null
116
- }
117
-
118
- function normalizeShipped(stats: StatsResult): NormalizedShip[] {
119
- const items = stats.shipped?.items ?? []
120
- return items.map(s => ({
121
- name: s.name,
122
- date: s.shippedAt || s.date || new Date().toISOString(),
123
- }))
124
- }
125
-
126
- function normalizeIdeas(stats: StatsResult): NormalizedIdea[] {
127
- const ideas = stats.ideas?.ideas ?? []
128
- return ideas
129
- .filter(i => i.status === 'pending')
130
- .map(i => ({
131
- title: i.text,
132
- impact: i.priority?.toUpperCase() || 'MEDIUM'
133
- }))
134
- }
135
-
136
- function normalizeAgents(stats: StatsResult): NormalizedAgent[] {
137
- return stats.agents.map(a => ({
138
- name: a.name,
139
- description: a.description,
140
- successRate: a.successRate,
141
- tasksCompleted: a.tasksCompleted,
142
- bestFor: a.bestFor,
143
- }))
144
- }
145
-
146
- function normalizeTimeline(stats: StatsResult): TimelineEvent[] {
147
- if (stats.metrics?.recentActivity?.length) {
148
- return stats.metrics.recentActivity.map(a => ({
149
- ts: a.timestamp,
150
- type: a.action || a.type || 'task_completed',
151
- task: a.description || '',
152
- }))
153
- }
154
- return stats.legacyStats?.timeline ?? []
155
- }
156
-
157
- function getVelocity(stats: StatsResult): number {
158
- if (stats.metrics?.velocity?.tasksPerDay) {
159
- return stats.metrics.velocity.tasksPerDay
160
- }
161
- return stats.legacyStats?.metrics?.velocity?.tasksPerDay ?? 0
162
- }
163
-
164
- function getTotalShips(stats: StatsResult): number {
165
- return stats.shipped?.items?.length ?? stats.legacyStats?.summary?.totalShipsEver ?? 0
166
- }
167
-
168
- function getTasksCompleted(stats: StatsResult): number {
169
- return stats.metrics?.currentSprint?.tasksCompleted ?? stats.legacyStats?.metrics?.tasksCompleted ?? 0
170
- }
171
-
172
- interface PageProps {
173
- params: Promise<{ id: string }>
174
- }
175
-
176
- export default async function ProjectStatsPage({ params }: PageProps) {
177
- const { id: projectId } = await params
178
-
179
- // Fetch data directly on server - no API calls
180
- const [project, stats] = await Promise.all([
181
- getProject(projectId),
182
- getStats(projectId)
183
- ])
184
-
185
- if (!stats.hasData) {
186
- notFound()
187
- }
188
-
189
- // Compute derived values using service functions
190
- const streak = calculateStreak(stats.metrics)
191
- const healthScore = calculateHealthScore(stats)
192
- const velocity = getVelocity(stats)
193
- const velocityChange = getVelocityChange(velocity)
194
- const insightMessage = getInsightMessage(stats, streak)
195
- const weeklyVelocityData = getWeeklyVelocityData(stats.metrics)
196
-
197
- // Normalize data for components
198
- const currentTask = normalizeCurrentTask(stats)
199
- const queue = normalizeQueue(stats)
200
- const roadmap = normalizeRoadmap(stats)
201
- const shipped = normalizeShipped(stats)
202
- const ideas = normalizeIdeas(stats)
203
- const agents = normalizeAgents(stats)
204
- const timeline = normalizeTimeline(stats)
205
- const totalShips = getTotalShips(stats)
206
- const tasksCompleted = getTasksCompleted(stats)
207
-
208
- // Extract insights
209
- const { estimateAccuracy, blockers } = stats.insights
210
-
211
- return (
212
- <div className="flex h-full flex-col p-4 md:p-8 overflow-auto">
213
- {/* Mobile: Add padding for hamburger menu */}
214
- <div className="pl-10 md:pl-0">
215
- <HeroSection
216
- projectId={projectId}
217
- projectName={project?.name ?? projectId}
218
- tasksCompleted={tasksCompleted}
219
- healthScore={healthScore}
220
- velocity={velocity}
221
- velocityChange={velocityChange}
222
- insightMessage={insightMessage}
223
- timeline={timeline}
224
- />
225
- </div>
226
-
227
- {/* Bento Grid - Server Components */}
228
- <BentoGrid className="mt-6 md:mt-8">
229
- <NowCard currentTask={currentTask} />
230
- <VelocityCard
231
- tasksPerDay={velocity}
232
- weeklyData={weeklyVelocityData}
233
- change={velocityChange}
234
- estimateAccuracy={estimateAccuracy}
235
- />
236
- <RoadmapCard roadmap={roadmap} />
237
- <StreakCard streak={streak} />
238
- <QueueCard queue={queue} />
239
- <ShipsCard ships={shipped} totalShips={totalShips} />
240
- <BlockersCard blockers={blockers} />
241
- <IdeasCard ideas={ideas} />
242
- <AgentsCard agents={agents} />
243
- </BentoGrid>
244
-
245
- {/* Activity Timeline - Client Component */}
246
- <div className="mt-6 md:mt-8">
247
- <ActivityTimeline timeline={timeline} />
248
- </div>
249
-
250
- <div className="h-6 md:h-8" />
251
- </div>
252
- )
253
- }
@@ -1,72 +0,0 @@
1
- ---
2
- name: agent-assignment
3
- description: Assign the best agent for a task
4
- allowed-tools: [Read]
5
- ---
6
-
7
- # Agent Assignment
8
-
9
- Select the best agent for the given task based on semantic understanding.
10
-
11
- ## Input
12
-
13
- - **Task**: {{task}}
14
- - **Available Agents**: {{agents}}
15
- - **Project Context**: {{context}}
16
-
17
- ## Instructions
18
-
19
- 1. **Understand the Task**
20
- - What domain does this task belong to?
21
- - What skills are required?
22
- - What is the complexity level?
23
-
24
- 2. **Analyze Available Agents**
25
- - Read each agent's expertise and domain
26
- - Consider their skills and past success
27
- - Match capabilities to task requirements
28
-
29
- 3. **Select Best Agent**
30
- - Choose the agent with highest relevance
31
- - If multiple agents fit, prefer the specialist over generalist
32
- - If no good match, use 'generalist' or 'full-stack'
33
-
34
- ## Decision Criteria
35
-
36
- - **Domain Match**: Does the agent's domain align with the task?
37
- - **Skills Match**: Does the agent have the required skills?
38
- - **Complexity Fit**: Is the agent appropriate for this complexity level?
39
-
40
- ## Output Format
41
-
42
- Return JSON with your decision:
43
-
44
- ```json
45
- {
46
- "agent": "agent-name",
47
- "confidence": 0.85,
48
- "reason": "Brief explanation of why this agent was selected",
49
- "domain": "detected domain of the task"
50
- }
51
- ```
52
-
53
- ## Examples
54
-
55
- **Task**: "Implement React login component with form validation"
56
- **Decision**: `{ "agent": "frontend-specialist", "confidence": 0.95, "reason": "React component work requires frontend expertise", "domain": "frontend" }`
57
-
58
- **Task**: "Fix database connection timeout issue"
59
- **Decision**: `{ "agent": "backend-specialist", "confidence": 0.90, "reason": "Database issues require backend/infrastructure knowledge", "domain": "backend" }`
60
-
61
- **Task**: "Write unit tests for user service"
62
- **Decision**: `{ "agent": "qa-specialist", "confidence": 0.85, "reason": "Testing tasks benefit from QA expertise", "domain": "qa" }`
63
-
64
- **Task**: "Update README documentation"
65
- **Decision**: `{ "agent": "generalist", "confidence": 0.70, "reason": "Documentation is general task, no specialist needed", "domain": "docs" }`
66
-
67
- ## Guidelines
68
-
69
- - Prefer specialists when task clearly fits their domain
70
- - Use generalist only when no specialist matches
71
- - Higher confidence = stronger match
72
- - Always provide a reason for transparency
@@ -1,78 +0,0 @@
1
- ---
2
- allowed-tools: [Read, Glob, Bash]
3
- description: 'Analyze project technology stack - Claude reads and decides'
4
- ---
5
-
6
- # Project Analysis Instructions
7
-
8
- ## Objective
9
-
10
- Determine the technology stack by READING actual files, not assuming.
11
-
12
- ## Step 1: Read Dependency Files
13
-
14
- Read these files if they exist:
15
-
16
- - `package.json` → Node.js/JavaScript/TypeScript project
17
- - `Cargo.toml` → Rust project
18
- - `go.mod` → Go project
19
- - `requirements.txt` or `pyproject.toml` → Python project
20
- - `Gemfile` → Ruby project
21
- - `mix.exs` → Elixir project
22
- - `pom.xml` or `build.gradle` → Java project
23
- - `composer.json` → PHP project
24
-
25
- **Extract actual dependencies** - don't guess frameworks.
26
-
27
- ## Step 2: Examine Directory Structure
28
-
29
- List the root directory to identify:
30
-
31
- - Source directories (src/, lib/, app/, cmd/)
32
- - Test directories (tests/, spec/, __tests__/)
33
- - Config directories (.github/, .gitlab/, .vscode/)
34
- - Build outputs (dist/, build/, target/)
35
-
36
- ## Step 3: Check Configuration Files
37
-
38
- Look for:
39
-
40
- - `tsconfig.json` → TypeScript configuration
41
- - `Dockerfile` → Docker usage
42
- - `docker-compose.yml` → Multi-container setup
43
- - `.eslintrc`, `.prettierrc` → Linting/formatting
44
- - `jest.config.js`, `vitest.config.ts` → Testing setup
45
- - `.env*` files → Environment configuration
46
-
47
- ## Step 4: Determine Stack
48
-
49
- Based on what you READ (not assumed):
50
-
51
- 1. **Languages**: Identify from file extensions and configs
52
- 2. **Frameworks**: Extract from actual dependencies
53
- 3. **Tools**: Identify from config files present
54
- 4. **Databases**: Look for DB clients in dependencies
55
- 5. **Testing**: Identify test frameworks from configs/deps
56
-
57
- ## Output Format
58
-
59
- Provide analysis in this structure:
60
-
61
- ```json
62
- {
63
- "languages": ["actual languages found"],
64
- "frameworks": ["actual frameworks from deps"],
65
- "tools": ["tools with config files present"],
66
- "databases": ["database clients in deps"],
67
- "testing": ["test frameworks found"],
68
- "notes": "any observations about the project"
69
- }
70
- ```
71
-
72
- ## Rules
73
-
74
- - **NO hardcoded assumptions** - React doesn't mean "frontend"
75
- - **READ before deciding** - Don't guess based on filenames
76
- - **Any stack works** - Elixir, Rust, Go, Python, etc.
77
- - **Be specific** - Include versions when available
78
- - **Note uncertainty** - If unclear, say so
@@ -1,33 +0,0 @@
1
- # Accessibility Checklist
2
-
3
- > Applies to: Web (WCAG), Mobile, CLI, Desktop
4
-
5
- ## Perceivable
6
- - [ ] Text alternatives for non-text content
7
- - [ ] Sufficient color contrast (4.5:1 minimum)
8
- - [ ] Content readable without color alone
9
- - [ ] Resizable text supported (up to 200%)
10
-
11
- ## Operable
12
- - [ ] Keyboard accessible (all functionality)
13
- - [ ] No keyboard traps
14
- - [ ] Sufficient time for interactions
15
- - [ ] Seizure-safe (no flashing > 3Hz)
16
-
17
- ## Understandable
18
- - [ ] Clear and simple language
19
- - [ ] Consistent navigation
20
- - [ ] Input assistance provided
21
- - [ ] Error identification and suggestions
22
-
23
- ## Robust
24
- - [ ] Compatible with assistive technologies
25
- - [ ] Valid markup/structure
26
- - [ ] ARIA used correctly (web)
27
- - [ ] Semantic HTML elements used
28
-
29
- ## CLI Accessibility
30
- - [ ] Screen reader compatible output
31
- - [ ] No color-only information
32
- - [ ] Clear text formatting
33
- - [ ] Configurable output verbosity
@@ -1,17 +0,0 @@
1
- ---
2
- allowed-tools: [Read, Write, GetTimestamp]
3
- description: 'Start task'
4
- timestamp-rule: 'GetTimestamp() for id and started'
5
- ---
6
-
7
- # /p:build
8
-
9
- ## Check
10
- Block if `core/now.md` active
11
-
12
- ## Flow
13
- 1. Parse task/# → Detect agent + complexity
14
- 2. Write now.md: id={GetTimestamp()}, agent, started={GetTimestamp()}
15
-
16
- ## Response
17
- `🎯 {task} | {agent} | Est: {time} | Done: /p:done`
@@ -1,226 +0,0 @@
1
- ---
2
- allowed-tools: [Read, Write, Bash]
3
- description: 'Log architectural or important decisions'
4
- timestamp-rule: 'GetTimestamp() for ALL timestamps'
5
- architecture: 'MD-first - MD files are source of truth'
6
- ---
7
-
8
- # /p:decision - Log Important Decisions
9
-
10
- ## Architecture: MD-First
11
-
12
- **Source of Truth**: `planning/decisions.md`
13
-
14
- MD files are the source of truth. Write directly to MD files.
15
-
16
- ## Context Variables
17
- - `{projectId}`: From `.prjct/prjct.config.json`
18
- - `{globalPath}`: `~/.prjct-cli/projects/{projectId}`
19
- - `{decisionsPath}`: `{globalPath}/planning/decisions.md`
20
- - `{memoryPath}`: `{globalPath}/memory/context.jsonl`
21
- - `{decision}`: User-provided decision (required)
22
- - `{reasoning}`: User-provided reasoning (optional)
23
- - `{alternatives}`: User-provided alternatives considered (optional)
24
-
25
- ## Decision Format
26
-
27
- Capture WHY decisions were made to avoid repeating mistakes:
28
-
29
- ```
30
- /p:decision "Use REST instead of GraphQL"
31
- --reason "Simpler for this use case, team familiarity"
32
- --alternatives "GraphQL, gRPC"
33
- ```
34
-
35
- Or interactive prompt:
36
- ```
37
- Decision: Use REST instead of GraphQL
38
-
39
- Why did you make this decision?
40
- > Simpler for this use case, team familiarity
41
-
42
- What alternatives did you consider?
43
- > GraphQL, gRPC
44
- ```
45
-
46
- ## Step 1: Read Config
47
-
48
- READ: `.prjct/prjct.config.json`
49
- EXTRACT: `projectId`
50
-
51
- IF file not found:
52
- OUTPUT: "No prjct project. Run /p:init first."
53
- STOP
54
-
55
- ## Step 2: Validate Input
56
-
57
- IF {decision} is empty:
58
- ASK: "What decision did you make?"
59
- SET: {decision} = user response
60
-
61
- IF {reasoning} is empty:
62
- ASK: "Why did you make this decision?"
63
- SET: {reasoning} = user response
64
-
65
- IF {alternatives} is empty:
66
- ASK: "What alternatives did you consider? (optional, press Enter to skip)"
67
- SET: {alternatives} = user response OR "none documented"
68
-
69
- ## Step 3: Generate Decision Entry
70
-
71
- GENERATE: {decisionId} = "dec_" + 8 random alphanumeric chars
72
- SET: {now} = GetTimestamp()
73
-
74
- ## Step 4: Read/Create Decisions File
75
-
76
- READ: `{decisionsPath}` (or create default if not exists)
77
-
78
- Default structure:
79
- ```markdown
80
- # Decisions
81
-
82
- Architecture decisions and their reasoning.
83
-
84
- ## Recent
85
-
86
- _No decisions logged yet_
87
-
88
- ## Archive
89
-
90
- _No archived decisions_
91
- ```
92
-
93
- ## Step 5: Update Decisions File (MD)
94
-
95
- Parse existing content and add new decision under "## Recent" section:
96
-
97
- ```markdown
98
- # Decisions
99
-
100
- Architecture decisions and their reasoning.
101
-
102
- ## Recent
103
-
104
- ### {decision}
105
- - **ID**: {decisionId}
106
- - **Date**: {now}
107
- - **Reasoning**: {reasoning}
108
- - **Alternatives**: {alternatives}
109
- - **Context**: {current task from now.md if active}
110
-
111
- {...existing recent decisions}
112
-
113
- ## Archive
114
-
115
- {...existing archive}
116
- ```
117
-
118
- WRITE: `{decisionsPath}`
119
-
120
- ## Step 6: Log to Memory
121
-
122
- APPEND to: `{memoryPath}`
123
-
124
- Single line (JSONL):
125
- ```json
126
- {"timestamp":"{now}","action":"decision_logged","decisionId":"{decisionId}","decision":"{decision}","reasoning":"{reasoning}","alternatives":"{alternatives}"}
127
- ```
128
-
129
- ## Output
130
-
131
- SUCCESS:
132
- ```
133
- 📝 Decision logged: {decision}
134
-
135
- ID: {decisionId}
136
- Reasoning: {reasoning}
137
- Alternatives: {alternatives}
138
-
139
- Next:
140
- • Continue working on your task
141
- • /p:recap - Review decisions made
142
- ```
143
-
144
- ## Error Handling
145
-
146
- | Error | Response | Action |
147
- |-------|----------|--------|
148
- | No project | "No prjct project" | STOP |
149
- | No decision provided | Ask for decision | WAIT |
150
- | Write fails | Log warning | CONTINUE |
151
-
152
- ## Examples
153
-
154
- ### Example 1: Full Decision with All Fields
155
- **Input:** `/p:decision "Use Zustand for state management" --reason "Lighter than Redux, better DX" --alternatives "Redux, MobX, Jotai"`
156
-
157
- **Output:**
158
- ```
159
- 📝 Decision logged: Use Zustand for state management
160
-
161
- ID: dec_abc12345
162
- Reasoning: Lighter than Redux, better DX
163
- Alternatives: Redux, MobX, Jotai
164
-
165
- Next: Continue working | /p:recap
166
- ```
167
-
168
- ### Example 2: Interactive Mode
169
- **Input:** `/p:decision`
170
-
171
- **Prompt flow:**
172
- ```
173
- What decision did you make?
174
- > Use PostgreSQL instead of MongoDB
175
-
176
- Why did you make this decision?
177
- > Need relational data with joins, better ACID compliance
178
-
179
- What alternatives did you consider? (Enter to skip)
180
- > MongoDB, SQLite
181
- ```
182
-
183
- **Output:**
184
- ```
185
- 📝 Decision logged: Use PostgreSQL instead of MongoDB
186
-
187
- ID: dec_xyz98765
188
- Reasoning: Need relational data with joins, better ACID compliance
189
- Alternatives: MongoDB, SQLite
190
-
191
- Next: Continue working | /p:recap
192
- ```
193
-
194
- ### Example 3: Quick Decision (minimal)
195
- **Input:** `/p:decision "Skip tests for MVP"`
196
-
197
- **Prompt:**
198
- ```
199
- Why did you make this decision?
200
- > Time constraint, will add before launch
201
- ```
202
-
203
- **Output:**
204
- ```
205
- 📝 Decision logged: Skip tests for MVP
206
-
207
- ID: dec_qrs45678
208
- Reasoning: Time constraint, will add before launch
209
- Alternatives: none documented
210
-
211
- Next: Continue working | /p:recap
212
- ```
213
-
214
- ## Use Cases
215
-
216
- When to log a decision:
217
- - Choosing between technologies/libraries
218
- - Architectural pattern selection
219
- - Trade-off decisions (speed vs quality)
220
- - Deviation from best practices (and why)
221
- - Postponing technical debt intentionally
222
-
223
- This creates institutional memory to avoid:
224
- - Repeating the same debates
225
- - Forgetting why something was done a certain way
226
- - Making inconsistent choices across the codebase