prjct-cli 0.18.2 → 0.20.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 (246) hide show
  1. package/CHANGELOG.md +82 -0
  2. package/CLAUDE.md +74 -211
  3. package/core/agentic/prompt-builder.ts +3 -7
  4. package/core/command-registry/optional-commands.ts +0 -20
  5. package/core/infrastructure/command-installer/command-installer.ts +8 -1
  6. package/core/infrastructure/command-installer/global-config.ts +31 -1
  7. package/core/infrastructure/command-installer/index.ts +1 -1
  8. package/core/infrastructure/setup.ts +3 -0
  9. package/package.json +3 -17
  10. package/templates/agentic/agents/uxui.md +210 -0
  11. package/templates/commands/bug.md +219 -41
  12. package/templates/commands/done.md +57 -258
  13. package/templates/commands/feature.md +368 -80
  14. package/templates/commands/now.md +72 -277
  15. package/templates/commands/ship.md +167 -246
  16. package/templates/commands/sync.md +62 -3
  17. package/templates/commands/test.md +160 -20
  18. package/templates/global/CLAUDE.md +40 -205
  19. package/templates/global/docs/agents.md +88 -0
  20. package/templates/global/docs/architecture.md +103 -0
  21. package/templates/global/docs/commands.md +98 -0
  22. package/templates/global/docs/validation.md +95 -0
  23. package/bin/dev.js +0 -216
  24. package/bin/serve.js +0 -361
  25. package/packages/web/README.md +0 -36
  26. package/packages/web/app/api/claude/sessions/route.ts +0 -44
  27. package/packages/web/app/api/claude/status/route.ts +0 -34
  28. package/packages/web/app/api/projects/[id]/icon/route.ts +0 -33
  29. package/packages/web/app/api/projects/[id]/momentum/route.ts +0 -257
  30. package/packages/web/app/api/projects/[id]/route.ts +0 -29
  31. package/packages/web/app/api/projects/[id]/stats/route.ts +0 -41
  32. package/packages/web/app/api/projects/[id]/status/route.ts +0 -21
  33. package/packages/web/app/api/projects/route.ts +0 -16
  34. package/packages/web/app/api/sessions/current/route.ts +0 -132
  35. package/packages/web/app/api/sessions/history/route.ts +0 -204
  36. package/packages/web/app/error.tsx +0 -34
  37. package/packages/web/app/favicon.ico +0 -0
  38. package/packages/web/app/globals.css +0 -198
  39. package/packages/web/app/layout.tsx +0 -53
  40. package/packages/web/app/loading.tsx +0 -7
  41. package/packages/web/app/not-found.tsx +0 -25
  42. package/packages/web/app/page.tsx +0 -12
  43. package/packages/web/app/project/[id]/code/layout.tsx +0 -18
  44. package/packages/web/app/project/[id]/code/page.tsx +0 -408
  45. package/packages/web/app/project/[id]/error.tsx +0 -41
  46. package/packages/web/app/project/[id]/loading.tsx +0 -9
  47. package/packages/web/app/project/[id]/not-found.tsx +0 -27
  48. package/packages/web/app/project/[id]/page.tsx +0 -384
  49. package/packages/web/app/project/[id]/reports/page.tsx +0 -59
  50. package/packages/web/app/project/[id]/reports/print/page.tsx +0 -58
  51. package/packages/web/app/sessions/page.tsx +0 -165
  52. package/packages/web/app/settings/page.tsx +0 -151
  53. package/packages/web/components/ActivityTimeline/ActivityTimeline.constants.ts +0 -2
  54. package/packages/web/components/ActivityTimeline/ActivityTimeline.tsx +0 -49
  55. package/packages/web/components/ActivityTimeline/ActivityTimeline.types.ts +0 -8
  56. package/packages/web/components/ActivityTimeline/hooks/index.ts +0 -2
  57. package/packages/web/components/ActivityTimeline/hooks/useExpandable.ts +0 -9
  58. package/packages/web/components/ActivityTimeline/hooks/useGroupedEvents.ts +0 -23
  59. package/packages/web/components/ActivityTimeline/index.ts +0 -2
  60. package/packages/web/components/AgentsCard/AgentsCard.tsx +0 -93
  61. package/packages/web/components/AgentsCard/AgentsCard.types.ts +0 -14
  62. package/packages/web/components/AgentsCard/index.ts +0 -2
  63. package/packages/web/components/AppSidebar/AppSidebar.tsx +0 -316
  64. package/packages/web/components/AppSidebar/index.ts +0 -1
  65. package/packages/web/components/BackLink/BackLink.tsx +0 -18
  66. package/packages/web/components/BackLink/BackLink.types.ts +0 -5
  67. package/packages/web/components/BackLink/index.ts +0 -2
  68. package/packages/web/components/BentoCard/BentoCard.constants.ts +0 -16
  69. package/packages/web/components/BentoCard/BentoCard.tsx +0 -48
  70. package/packages/web/components/BentoCard/BentoCard.types.ts +0 -15
  71. package/packages/web/components/BentoCard/index.ts +0 -2
  72. package/packages/web/components/BentoCardSkeleton/BentoCardSkeleton.constants.ts +0 -9
  73. package/packages/web/components/BentoCardSkeleton/BentoCardSkeleton.tsx +0 -18
  74. package/packages/web/components/BentoCardSkeleton/BentoCardSkeleton.types.ts +0 -5
  75. package/packages/web/components/BentoCardSkeleton/index.ts +0 -2
  76. package/packages/web/components/BentoGrid/BentoGrid.tsx +0 -18
  77. package/packages/web/components/BentoGrid/BentoGrid.types.ts +0 -4
  78. package/packages/web/components/BentoGrid/index.ts +0 -2
  79. package/packages/web/components/BlockersCard/BlockersCard.tsx +0 -75
  80. package/packages/web/components/BlockersCard/BlockersCard.types.ts +0 -12
  81. package/packages/web/components/BlockersCard/index.ts +0 -2
  82. package/packages/web/components/CommandBar/CommandBar.tsx +0 -67
  83. package/packages/web/components/CommandBar/index.ts +0 -1
  84. package/packages/web/components/CommandButton/CommandButton.tsx +0 -46
  85. package/packages/web/components/CommandButton/index.ts +0 -1
  86. package/packages/web/components/ConnectionStatus/ConnectionStatus.tsx +0 -29
  87. package/packages/web/components/ConnectionStatus/index.ts +0 -1
  88. package/packages/web/components/DashboardContent/DashboardContent.tsx +0 -284
  89. package/packages/web/components/DashboardContent/index.ts +0 -1
  90. package/packages/web/components/DateGroup/DateGroup.tsx +0 -18
  91. package/packages/web/components/DateGroup/DateGroup.types.ts +0 -6
  92. package/packages/web/components/DateGroup/DateGroup.utils.ts +0 -11
  93. package/packages/web/components/DateGroup/index.ts +0 -2
  94. package/packages/web/components/EmptyState/EmptyState.tsx +0 -76
  95. package/packages/web/components/EmptyState/EmptyState.types.ts +0 -11
  96. package/packages/web/components/EmptyState/index.ts +0 -2
  97. package/packages/web/components/EventRow/EventRow.constants.ts +0 -10
  98. package/packages/web/components/EventRow/EventRow.tsx +0 -49
  99. package/packages/web/components/EventRow/EventRow.types.ts +0 -7
  100. package/packages/web/components/EventRow/EventRow.utils.ts +0 -49
  101. package/packages/web/components/EventRow/index.ts +0 -2
  102. package/packages/web/components/ExpandButton/ExpandButton.tsx +0 -18
  103. package/packages/web/components/ExpandButton/ExpandButton.types.ts +0 -6
  104. package/packages/web/components/ExpandButton/index.ts +0 -2
  105. package/packages/web/components/HealthGradientBackground/HealthGradientBackground.tsx +0 -14
  106. package/packages/web/components/HealthGradientBackground/HealthGradientBackground.types.ts +0 -5
  107. package/packages/web/components/HealthGradientBackground/HealthGradientBackground.utils.ts +0 -13
  108. package/packages/web/components/HealthGradientBackground/index.ts +0 -2
  109. package/packages/web/components/HeroSection/HeroSection.tsx +0 -92
  110. package/packages/web/components/HeroSection/HeroSection.types.ts +0 -14
  111. package/packages/web/components/HeroSection/HeroSection.utils.ts +0 -11
  112. package/packages/web/components/HeroSection/hooks/index.ts +0 -2
  113. package/packages/web/components/HeroSection/hooks/useCountUp.ts +0 -45
  114. package/packages/web/components/HeroSection/hooks/useWeeklyActivity.ts +0 -18
  115. package/packages/web/components/HeroSection/index.ts +0 -2
  116. package/packages/web/components/IdeasCard/IdeasCard.tsx +0 -115
  117. package/packages/web/components/IdeasCard/IdeasCard.types.ts +0 -10
  118. package/packages/web/components/IdeasCard/index.ts +0 -2
  119. package/packages/web/components/InsightMessage/InsightMessage.tsx +0 -9
  120. package/packages/web/components/InsightMessage/InsightMessage.types.ts +0 -3
  121. package/packages/web/components/InsightMessage/index.ts +0 -2
  122. package/packages/web/components/Logo/Logo.tsx +0 -65
  123. package/packages/web/components/Logo/index.ts +0 -1
  124. package/packages/web/components/MarkdownContent/MarkdownContent.tsx +0 -123
  125. package/packages/web/components/MarkdownContent/index.ts +0 -1
  126. package/packages/web/components/MasonryGrid/MasonryGrid.tsx +0 -18
  127. package/packages/web/components/MasonryGrid/index.ts +0 -1
  128. package/packages/web/components/MomentumWidget/MomentumWidget.tsx +0 -119
  129. package/packages/web/components/MomentumWidget/MomentumWidget.types.ts +0 -16
  130. package/packages/web/components/MomentumWidget/index.ts +0 -2
  131. package/packages/web/components/NowCard/NowCard.tsx +0 -118
  132. package/packages/web/components/NowCard/NowCard.types.ts +0 -16
  133. package/packages/web/components/NowCard/index.ts +0 -2
  134. package/packages/web/components/PageHeader/PageHeader.tsx +0 -24
  135. package/packages/web/components/PageHeader/index.ts +0 -1
  136. package/packages/web/components/ProgressRing/ProgressRing.constants.ts +0 -20
  137. package/packages/web/components/ProgressRing/ProgressRing.tsx +0 -51
  138. package/packages/web/components/ProgressRing/ProgressRing.types.ts +0 -11
  139. package/packages/web/components/ProgressRing/index.ts +0 -2
  140. package/packages/web/components/ProjectAvatar/ProjectAvatar.tsx +0 -54
  141. package/packages/web/components/ProjectAvatar/index.ts +0 -1
  142. package/packages/web/components/ProjectColorDot/ProjectColorDot.tsx +0 -37
  143. package/packages/web/components/ProjectColorDot/index.ts +0 -1
  144. package/packages/web/components/ProjectSelectorModal/ProjectSelectorModal.tsx +0 -104
  145. package/packages/web/components/ProjectSelectorModal/index.ts +0 -1
  146. package/packages/web/components/Providers/Providers.tsx +0 -48
  147. package/packages/web/components/Providers/index.ts +0 -1
  148. package/packages/web/components/QueueCard/QueueCard.tsx +0 -125
  149. package/packages/web/components/QueueCard/QueueCard.types.ts +0 -12
  150. package/packages/web/components/QueueCard/QueueCard.utils.ts +0 -12
  151. package/packages/web/components/QueueCard/index.ts +0 -2
  152. package/packages/web/components/RecoverCard/RecoverCard.tsx +0 -72
  153. package/packages/web/components/RecoverCard/RecoverCard.types.ts +0 -16
  154. package/packages/web/components/RecoverCard/index.ts +0 -2
  155. package/packages/web/components/RoadmapCard/RoadmapCard.tsx +0 -145
  156. package/packages/web/components/RoadmapCard/RoadmapCard.types.ts +0 -16
  157. package/packages/web/components/RoadmapCard/index.ts +0 -2
  158. package/packages/web/components/ShipsCard/ShipsCard.tsx +0 -95
  159. package/packages/web/components/ShipsCard/ShipsCard.types.ts +0 -14
  160. package/packages/web/components/ShipsCard/ShipsCard.utils.ts +0 -4
  161. package/packages/web/components/ShipsCard/index.ts +0 -2
  162. package/packages/web/components/SparklineChart/SparklineChart.tsx +0 -40
  163. package/packages/web/components/SparklineChart/SparklineChart.types.ts +0 -6
  164. package/packages/web/components/SparklineChart/index.ts +0 -2
  165. package/packages/web/components/StatsMasonry/StatsMasonry.tsx +0 -95
  166. package/packages/web/components/StatsMasonry/index.ts +0 -1
  167. package/packages/web/components/StreakCard/StreakCard.constants.ts +0 -2
  168. package/packages/web/components/StreakCard/StreakCard.tsx +0 -55
  169. package/packages/web/components/StreakCard/StreakCard.types.ts +0 -4
  170. package/packages/web/components/StreakCard/index.ts +0 -2
  171. package/packages/web/components/TasksCounter/TasksCounter.tsx +0 -14
  172. package/packages/web/components/TasksCounter/TasksCounter.types.ts +0 -3
  173. package/packages/web/components/TasksCounter/index.ts +0 -2
  174. package/packages/web/components/TechStackBadges/TechStackBadges.tsx +0 -28
  175. package/packages/web/components/TechStackBadges/index.ts +0 -1
  176. package/packages/web/components/TerminalDock/DockToggleTab.tsx +0 -29
  177. package/packages/web/components/TerminalDock/TerminalDock.tsx +0 -386
  178. package/packages/web/components/TerminalDock/TerminalDockTab.tsx +0 -130
  179. package/packages/web/components/TerminalDock/TerminalTabBar.tsx +0 -142
  180. package/packages/web/components/TerminalDock/index.ts +0 -2
  181. package/packages/web/components/TerminalTabs/TerminalTab.tsx +0 -95
  182. package/packages/web/components/TerminalTabs/TerminalTabs.tsx +0 -211
  183. package/packages/web/components/TerminalTabs/index.ts +0 -1
  184. package/packages/web/components/VelocityBadge/VelocityBadge.tsx +0 -32
  185. package/packages/web/components/VelocityBadge/VelocityBadge.types.ts +0 -3
  186. package/packages/web/components/VelocityBadge/index.ts +0 -2
  187. package/packages/web/components/VelocityCard/VelocityCard.tsx +0 -73
  188. package/packages/web/components/VelocityCard/VelocityCard.types.ts +0 -7
  189. package/packages/web/components/VelocityCard/index.ts +0 -2
  190. package/packages/web/components/WeeklyReports/PrintableReport.tsx +0 -259
  191. package/packages/web/components/WeeklyReports/ReportPreviewCard.tsx +0 -187
  192. package/packages/web/components/WeeklyReports/WeekCalendar.tsx +0 -288
  193. package/packages/web/components/WeeklyReports/WeeklyReports.tsx +0 -149
  194. package/packages/web/components/WeeklyReports/index.ts +0 -4
  195. package/packages/web/components/WeeklySparkline/WeeklySparkline.tsx +0 -25
  196. package/packages/web/components/WeeklySparkline/WeeklySparkline.types.ts +0 -4
  197. package/packages/web/components/WeeklySparkline/index.ts +0 -2
  198. package/packages/web/components/charts/SessionsChart.tsx +0 -175
  199. package/packages/web/components/ui/alert-dialog.tsx +0 -157
  200. package/packages/web/components/ui/badge.tsx +0 -46
  201. package/packages/web/components/ui/button.tsx +0 -60
  202. package/packages/web/components/ui/card.tsx +0 -92
  203. package/packages/web/components/ui/chart.tsx +0 -385
  204. package/packages/web/components/ui/dialog.tsx +0 -143
  205. package/packages/web/components/ui/drawer.tsx +0 -135
  206. package/packages/web/components/ui/dropdown-menu.tsx +0 -257
  207. package/packages/web/components/ui/input.tsx +0 -21
  208. package/packages/web/components/ui/scroll-area.tsx +0 -58
  209. package/packages/web/components/ui/select.tsx +0 -187
  210. package/packages/web/components/ui/sheet.tsx +0 -139
  211. package/packages/web/components/ui/tabs.tsx +0 -66
  212. package/packages/web/components/ui/tooltip.tsx +0 -61
  213. package/packages/web/components.json +0 -22
  214. package/packages/web/context/GlobalTerminalContext.tsx +0 -538
  215. package/packages/web/context/TerminalContext.tsx +0 -45
  216. package/packages/web/context/TerminalTabsContext.tsx +0 -181
  217. package/packages/web/eslint.config.mjs +0 -18
  218. package/packages/web/hooks/useClaudeTerminal.ts +0 -425
  219. package/packages/web/hooks/useProjectStats.ts +0 -93
  220. package/packages/web/hooks/useProjects.ts +0 -73
  221. package/packages/web/lib/actions/projects.ts +0 -15
  222. package/packages/web/lib/commands.ts +0 -81
  223. package/packages/web/lib/format.ts +0 -23
  224. package/packages/web/lib/generate-week-report.ts +0 -285
  225. package/packages/web/lib/parse-prjct-files.ts +0 -1123
  226. package/packages/web/lib/project-colors.ts +0 -58
  227. package/packages/web/lib/projects.ts +0 -506
  228. package/packages/web/lib/pty.ts +0 -101
  229. package/packages/web/lib/query-config.ts +0 -44
  230. package/packages/web/lib/services/index.ts +0 -9
  231. package/packages/web/lib/services/projects.server.ts +0 -66
  232. package/packages/web/lib/services/stats.server.ts +0 -562
  233. package/packages/web/lib/unified-loader.ts +0 -396
  234. package/packages/web/lib/utils.ts +0 -6
  235. package/packages/web/next-env.d.ts +0 -6
  236. package/packages/web/next.config.ts +0 -7
  237. package/packages/web/package.json +0 -57
  238. package/packages/web/postcss.config.mjs +0 -7
  239. package/packages/web/public/file.svg +0 -1
  240. package/packages/web/public/globe.svg +0 -1
  241. package/packages/web/public/next.svg +0 -1
  242. package/packages/web/public/vercel.svg +0 -1
  243. package/packages/web/public/window.svg +0 -1
  244. package/packages/web/server.ts +0 -312
  245. package/packages/web/tsconfig.json +0 -34
  246. package/templates/commands/serve.md +0 -121
@@ -1,6 +1,6 @@
1
1
  ---
2
- allowed-tools: [Read, Write, Bash, Task, Glob]
3
- description: 'Value analysis + roadmap + task breakdown + auto-start'
2
+ allowed-tools: [Read, Write, Bash, Task, Glob, Grep, AskUserQuestion]
3
+ description: '7-phase feature development workflow'
4
4
  timestamp-rule: 'GetTimestamp() and GetDate() for ALL timestamps'
5
5
  architecture: 'Write-Through (JSON → MD → Events)'
6
6
  storage-layer: true
@@ -9,7 +9,19 @@ claude-context: 'context/next.md'
9
9
  backend-sync: 'sync/pending.json'
10
10
  ---
11
11
 
12
- # /p:feature - Add Feature to Roadmap
12
+ # /p:feature - Add Feature with 7-Phase Workflow
13
+
14
+ ## 7-Phase Development Workflow
15
+
16
+ ```
17
+ Phase 1: Discovery → Understand the feature
18
+ Phase 2: Exploration → Analyze existing codebase
19
+ Phase 3: Questions → Clarify ambiguities
20
+ Phase 4: Design → Architecture options
21
+ Phase 5: Implementation → Task breakdown + start
22
+ Phase 6: Review → (via /p:done, /p:ship)
23
+ Phase 7: Summary → (via /p:done)
24
+ ```
13
25
 
14
26
  ## Architecture: Write-Through Pattern
15
27
 
@@ -96,71 +108,242 @@ IF no feature description provided:
96
108
  WAIT for user input
97
109
  CONTINUE with user's response as {feature}
98
110
 
99
- ## Step 3: Value Analysis
111
+ ---
100
112
 
101
- Analyze the feature:
113
+ ## PHASE 1: Discovery
102
114
 
103
- ### Impact Assessment
104
- Based on feature description, determine:
115
+ OUTPUT: "## Phase 1: Discovery"
105
116
 
106
- IF affects core functionality OR user-facing:
107
- {impact} = "high"
108
- ELSE IF affects internal systems OR developer experience:
109
- {impact} = "medium"
110
- ELSE:
111
- {impact} = "low"
117
+ ### 1.1 Summarize the Feature
118
+ Analyze {feature} and OUTPUT:
119
+ ```
120
+ Building: {one-sentence summary}
112
121
 
113
- ### Effort Estimation
114
- Based on complexity:
115
-
116
- IF simple change (1-2 files, straightforward):
117
- {effort} = "1-2h"
118
- {taskCount} = 1-2
119
- ELSE IF medium change (3-5 files, some logic):
120
- {effort} = "3-4h"
121
- {taskCount} = 3-4
122
- ELSE IF complex change (many files, new patterns):
123
- {effort} = "6-8h"
124
- {taskCount} = 5-8
125
- ELSE:
126
- {effort} = "1d+"
127
- {taskCount} = 8+
128
-
129
- ### Timing Decision
130
- IF {impact} = "high" AND {effort} < "4h":
131
- {timing} = "do_now"
132
- ELSE IF {impact} = "high":
133
- {timing} = "plan_first"
134
- ELSE:
135
- {timing} = "add_to_queue"
122
+ Requirements:
123
+ - {requirement 1}
124
+ - {requirement 2}
125
+ - {requirement 3}
126
+
127
+ Success looks like:
128
+ - {success criteria 1}
129
+ - {success criteria 2}
130
+ ```
131
+
132
+ ### 1.2 Initial Assessment
133
+ Determine scope:
134
+ - IF simple (1-2 files): {scope} = "small"
135
+ - IF medium (3-5 files): {scope} = "medium"
136
+ - IF complex (many files, new patterns): {scope} = "large"
137
+
138
+ ---
139
+
140
+ ## PHASE 2: Exploration
141
+
142
+ OUTPUT: "## Phase 2: Codebase Exploration"
143
+
144
+ ### 2.1 Find Similar Features
145
+ DELEGATE to Explore agent:
146
+ ```
147
+ Task(
148
+ subagent_type: 'Explore',
149
+ prompt: 'Find code similar to "{feature}". Look for:
150
+ - Existing implementations of similar functionality
151
+ - Patterns used in this codebase
152
+ - Key files that would be affected
153
+ Return: file paths, patterns found, relevant code snippets'
154
+ )
155
+ ```
156
+
157
+ ### 2.2 Trace Dependencies
158
+ BASH: Find imports/dependencies related to the feature area
159
+
160
+ ### 2.3 Report Findings
161
+ OUTPUT:
162
+ ```
163
+ Found similar:
164
+ - {similar feature 1} in {file path}
165
+ - {similar feature 2} in {file path}
166
+
167
+ Patterns used:
168
+ - {pattern 1}: {where it's used}
169
+ - {pattern 2}: {where it's used}
170
+
171
+ Key files to modify:
172
+ - {file 1}: {what needs to change}
173
+ - {file 2}: {what needs to change}
174
+ ```
175
+
176
+ ---
177
+
178
+ ## PHASE 3: Questions
179
+
180
+ OUTPUT: "## Phase 3: Clarifying Questions"
181
+
182
+ ### 3.1 Identify Ambiguities
183
+ Based on discovery and exploration, identify unclear aspects:
136
184
 
137
- ## Step 4: Task Breakdown
185
+ IF ambiguities exist:
186
+ USE AskUserQuestion tool:
187
+ ```
188
+ - Scope: "Should this include {edge case}?"
189
+ - Tech: "Prefer {option A} or {option B}?"
190
+ - Priority: "Is {sub-feature} required now or later?"
191
+ ```
192
+ WAIT for answers
193
+ UPDATE requirements based on answers
194
+
195
+ IF no ambiguities:
196
+ OUTPUT: "Requirements are clear. Proceeding to design."
138
197
 
139
- Break {feature} into specific, actionable tasks:
198
+ ---
140
199
 
141
- ### Task Generation Rules
142
- 1. Each task should be completable in 30min - 2h
143
- 2. Tasks should be atomic (one concern each)
144
- 3. Order tasks by dependency (blockers first)
145
- 4. Include setup/research task if needed
146
- 5. Include testing/verification as final task
200
+ ## PHASE 4: Design
201
+
202
+ OUTPUT: "## Phase 4: Architecture Design"
203
+
204
+ ### 4.0 UX/UI Analysis (Frontend Features)
205
+
206
+ **CRITICAL**: If feature involves UI/frontend, apply UX/UI agent FIRST.
207
+
208
+ CHECK: Does feature involve frontend/UI?
209
+ - Keywords: page, component, form, button, modal, dashboard, view, screen, UI, interface
210
+ - File types affected: .tsx, .jsx, .vue, .svelte, .swift, .kt, .dart
211
+
212
+ IF frontend feature:
213
+ READ: `{globalPath}/agents/uxui.md`
214
+
215
+ IF agent not found:
216
+ OUTPUT: "⚠️ UX/UI agent not found. Run /p:sync to generate."
217
+ CONTINUE without UX/UI analysis
218
+
219
+ ELSE:
220
+ OUTPUT: "### 4.0 UX/UI Analysis"
221
+
222
+ ### Apply UX Checklist (MANDATORY)
223
+ ```
224
+ **User Analysis:**
225
+ - Who: {describe the user}
226
+ - Problem: {what pain point this solves}
227
+ - Happy Path: {ideal flow}
228
+ - Edge Cases: {what can go wrong}
229
+
230
+ **UX Requirements:**
231
+ - [ ] User understands action in < 3 seconds
232
+ - [ ] Each action has visual feedback
233
+ - [ ] Errors are clear and recoverable
234
+ - [ ] Keyboard navigation supported
235
+ - [ ] Contrast ratio >= 4.5:1
236
+ - [ ] Touch targets >= 44px (mobile)
237
+ ```
238
+
239
+ ### Ask Aesthetic Direction
240
+ USE AskUserQuestion:
241
+ ```
242
+ question: "¿Qué dirección estética para este feature?"
243
+ header: "Aesthetic"
244
+ options:
245
+ - label: "Minimal"
246
+ description: "Clean, professional. Best for B2B, productivity tools"
247
+ - label: "Bold/Maximalist"
248
+ description: "Striking, modern. Best for creative, entertainment"
249
+ - label: "Soft/Organic"
250
+ description: "Friendly, approachable. Best for wellness, lifestyle"
251
+ - label: "Brutalist"
252
+ description: "Raw, technical. Best for dev tools, startups"
253
+ ```
254
+
255
+ SET: {aestheticDirection} = user's choice
256
+
257
+ OUTPUT:
258
+ ```
259
+ **Aesthetic:** {aestheticDirection}
260
+
261
+ **UI Guidelines Applied:**
262
+ - Typography: Distinctive fonts (avoiding Inter, Roboto, Arial)
263
+ - Color: 60-30-10 framework with personality
264
+ - Animation: Purposeful micro-interactions
265
+ - Layout: Memorable composition (not generic centered)
266
+ ```
267
+
268
+ ### 4.1 Generate Options
269
+ Based on exploration (and UX/UI analysis if frontend), design 2-3 approaches:
270
+
271
+ OUTPUT:
272
+ ```
273
+ ### Option 1: Minimal Changes
274
+ - Approach: {description}
275
+ - Files: {count} files modified
276
+ - Pros: Fast, low risk
277
+ - Cons: {tradeoff}
278
+
279
+ ### Option 2: Clean Architecture
280
+ - Approach: {description}
281
+ - Files: {count} files modified
282
+ - Pros: Maintainable, testable
283
+ - Cons: More work upfront
284
+
285
+ ### Option 3: Pragmatic Balance (Recommended)
286
+ - Approach: {description}
287
+ - Files: {count} files modified
288
+ - Pros: Balance of speed and quality
289
+ - Cons: {minor tradeoff}
290
+ ```
147
291
 
148
- ### Example Breakdown
149
- For feature "add user authentication":
292
+ ### 4.2 Get Approval
293
+ USE AskUserQuestion:
150
294
  ```
151
- 1. Research auth patterns for this stack
152
- 2. Setup auth middleware/routes
153
- 3. Implement login endpoint
154
- 4. Implement logout endpoint
155
- 5. Add session management
156
- 6. Write auth tests
295
+ question: "Which architecture approach?"
296
+ options:
297
+ - "Option 1: Minimal Changes"
298
+ - "Option 2: Clean Architecture"
299
+ - "Option 3: Pragmatic Balance (Recommended)"
157
300
  ```
158
301
 
302
+ SET: {chosenApproach} = user's choice
303
+
304
+ ---
305
+
306
+ ## PHASE 5: Implementation
307
+
308
+ OUTPUT: "## Phase 5: Task Breakdown"
309
+
310
+ ### 5.1 Generate Tasks
311
+ Based on {chosenApproach}, break into tasks:
312
+
313
+ Rules:
314
+ 1. Each task: 30min - 2h
315
+ 2. Atomic (one concern each)
316
+ 3. Ordered by dependency
317
+ 4. Include testing as final task
318
+
159
319
  GENERATE: {tasks} = list of task descriptions
160
320
  GENERATE: {featureId} = UUID v4
161
321
  SET: {now} = GetTimestamp()
162
322
 
163
- ## Step 5: Update Storage (SOURCE OF TRUTH)
323
+ ### 5.2 Show Task List
324
+ OUTPUT:
325
+ ```
326
+ Tasks for {feature}:
327
+ 1. {task 1}
328
+ 2. {task 2}
329
+ 3. {task 3}
330
+ ...
331
+ n. Write tests and verify
332
+ ```
333
+
334
+ ### 5.3 Impact Assessment
335
+ IF affects core functionality OR user-facing:
336
+ {impact} = "high"
337
+ ELSE IF affects internal systems:
338
+ {impact} = "medium"
339
+ ELSE:
340
+ {impact} = "low"
341
+
342
+ {effort} = estimate based on task count
343
+
344
+ ---
345
+
346
+ ## Step 3: Update Storage (SOURCE OF TRUTH)
164
347
 
165
348
  ### Update queue.json
166
349
 
@@ -192,7 +375,7 @@ APPEND all tasks to `tasks` array
192
375
  SET: `lastUpdated` = {now}
193
376
  WRITE: `{queuePath}`
194
377
 
195
- ## Step 6: Generate Context (FOR CLAUDE)
378
+ ## Step 4: Generate Context (FOR CLAUDE)
196
379
 
197
380
  ### Generate context/next.md
198
381
 
@@ -219,7 +402,7 @@ TRANSFORM to markdown:
219
402
 
220
403
  WRITE: `{nextContextPath}`
221
404
 
222
- ## Step 7: Auto-Start First Task
405
+ ## Step 5: Auto-Start First Task
223
406
 
224
407
  READ: `{statePath}`
225
408
 
@@ -261,7 +444,7 @@ IF no currentTask:
261
444
  ELSE:
262
445
  {autoStarted} = false
263
446
 
264
- ## Step 8: Queue Sync Events
447
+ ## Step 6: Queue Sync Events
265
448
 
266
449
  READ: `{syncPath}` or create empty array
267
450
 
@@ -316,7 +499,7 @@ IF {autoStarted}:
316
499
 
317
500
  WRITE: `{syncPath}`
318
501
 
319
- ## Step 9: Log to Memory
502
+ ## Step 7: Log to Memory
320
503
 
321
504
  APPEND to: `{memoryPath}`
322
505
  ```json
@@ -365,43 +548,148 @@ Next:
365
548
 
366
549
  ## Examples
367
550
 
368
- ### Example 1: Simple Feature
369
- Input: `/p:feature add dark mode toggle`
551
+ ### Example 1: Full 7-Phase Workflow
552
+ Input: `/p:feature add user authentication`
370
553
 
371
554
  ```
372
- Added: add dark mode toggle
555
+ ## Phase 1: Discovery
556
+
557
+ Building: OAuth2 authentication with JWT tokens
558
+
559
+ Requirements:
560
+ - Support Google and GitHub OAuth
561
+ - Session persistence
562
+ - Secure token handling
563
+
564
+ Success looks like:
565
+ - Users can log in via OAuth
566
+ - Sessions persist across browser refreshes
567
+
568
+ ---
569
+
570
+ ## Phase 2: Codebase Exploration
571
+
572
+ Found similar:
573
+ - Session middleware in src/middleware/session.ts
574
+ - User model in src/models/user.ts
575
+
576
+ Patterns used:
577
+ - Middleware pattern for auth checks
578
+ - Repository pattern for data access
373
579
 
374
- Impact: medium | Effort: 2-3h
375
- Tasks: 3
580
+ Key files to modify:
581
+ - src/routes/auth.ts (new)
582
+ - src/middleware/session.ts (extend)
583
+ - src/models/user.ts (add OAuth fields)
376
584
 
377
- 🎯 Started: Setup theme context/state
585
+ ---
586
+
587
+ ## Phase 3: Clarifying Questions
588
+
589
+ Which OAuth providers should we support?
590
+ > [User selected: Google and GitHub]
591
+
592
+ Should we support "Remember me" functionality?
593
+ > [User selected: Yes, 30-day tokens]
594
+
595
+ ---
596
+
597
+ ## Phase 4: Architecture Design
598
+
599
+ ### Option 1: Minimal Changes
600
+ - Extend existing session middleware
601
+ - Pros: Fast
602
+ - Cons: Coupling
603
+
604
+ ### Option 2: Clean Architecture
605
+ - New AuthService with strategy pattern
606
+ - Pros: Testable, extensible
607
+ - Cons: More files
608
+
609
+ ### Option 3: Pragmatic Balance (Recommended)
610
+ - OAuthProvider abstraction, integrate with existing session
611
+ - Pros: Clean boundaries, reuses existing code
612
+ - Cons: None significant
613
+
614
+ Which approach? > [User selected: Option 3]
615
+
616
+ ---
617
+
618
+ ## Phase 5: Task Breakdown
619
+
620
+ Tasks for user authentication:
621
+ 1. Create OAuthProvider interface
622
+ 2. Implement GoogleOAuthProvider
623
+ 3. Implement GitHubOAuthProvider
624
+ 4. Add OAuth routes (/auth/google, /auth/github)
625
+ 5. Extend session middleware for OAuth tokens
626
+ 6. Add "Remember me" token refresh
627
+ 7. Write auth integration tests
628
+
629
+ Impact: high | Effort: 6-8h
630
+
631
+ ---
632
+
633
+ ✅ Added: add user authentication
378
634
 
379
- Tasks:
380
- 1. Setup theme context/state
381
- 2. Add toggle component
382
- 3. Apply theme to components
635
+ 🎯 Started: Create OAuthProvider interface
383
636
 
384
637
  Next: /p:done | /p:next
385
638
  ```
386
639
 
387
- ### Example 2: Complex Feature
388
- Input: `/p:feature implement user authentication`
640
+ ### Example 2: Frontend Feature with UX/UI Analysis
641
+ Input: `/p:feature add dark mode toggle`
389
642
 
390
643
  ```
391
- Added: implement user authentication
644
+ ## Phase 1: Discovery
645
+ Building: Dark mode toggle in settings
646
+
647
+ ## Phase 2: Exploration
648
+ Found: Theme context exists in src/context/theme.tsx
649
+ Pattern: React Context for global state
650
+
651
+ ## Phase 3: Questions
652
+ Requirements are clear. Proceeding to design.
653
+
654
+ ## Phase 4: Design
655
+
656
+ ### 4.0 UX/UI Analysis
657
+
658
+ **User Analysis:**
659
+ - Who: Users who prefer dark interfaces or work in low-light
660
+ - Problem: Eye strain, preference not respected
661
+ - Happy Path: Toggle → Instant switch → Preference saved
662
+ - Edge Cases: System preference, mid-animation toggle
663
+
664
+ **UX Requirements:**
665
+ - [x] User understands action in < 3 seconds (toggle is clear)
666
+ - [x] Each action has visual feedback (instant theme switch)
667
+ - [x] Errors are clear and recoverable (N/A - no error states)
668
+ - [x] Keyboard navigation supported (toggle focusable)
669
+ - [x] Contrast ratio >= 4.5:1 (both themes)
670
+ - [x] Touch targets >= 44px (toggle size)
671
+
672
+ **Aesthetic:** Minimal
673
+ - Typography: System font (matches app)
674
+ - Animation: Smooth 200ms transition
675
+ - Layout: Toggle in settings, icon in header
676
+
677
+ ### Architecture
678
+ Recommending: Extend existing theme context
679
+ (Simple feature, only 1 approach needed)
680
+
681
+ ## Phase 5: Tasks
682
+ 1. Add dark mode colors to theme context
683
+ 2. Create toggle component with a11y support
684
+ 3. Add smooth transition animation (200ms)
685
+ 4. Persist preference to localStorage
686
+ 5. Detect system preference as default
392
687
 
393
- Impact: high | Effort: 6-8h
394
- Tasks: 6
688
+ ---
395
689
 
396
- 🎯 Started: Research auth patterns
690
+ Added: add dark mode toggle
397
691
 
398
- Tasks:
399
- 1. Research auth patterns
400
- 2. Setup auth middleware
401
- 3. Implement login
402
- 4. Implement logout
403
- 5. Add session management
404
- 6. Write auth tests
692
+ 🎯 Started: Add dark mode colors to theme context
405
693
 
406
694
  Next: /p:done | /p:next
407
695
  ```