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,277 +1,175 @@
1
1
  ---
2
- allowed-tools: [Read, Write, Bash]
2
+ allowed-tools: [Read, Write, Bash, Glob, Grep]
3
3
  description: 'Ship feature with automated workflow'
4
- timestamp-rule: 'GetTimestamp() and GetDate() for ALL timestamps'
5
- architecture: 'Write-Through (JSON → MD → Events)'
6
- storage-layer: true
7
- source-of-truth: 'storage/shipped.json'
8
- claude-context: 'context/shipped.md'
9
- backend-sync: 'sync/pending.json'
10
4
  ---
11
5
 
12
- # /p:ship - Ship Feature Workflow
6
+ # /p:ship - Ship Feature
13
7
 
14
- ## Architecture: Write-Through Pattern
8
+ Ship completed work with pre-flight checks, code review, and quality gates.
15
9
 
10
+ ## Usage
16
11
  ```
17
- User Action Storage (JSON) → Context (MD) → Sync Events
12
+ /p:ship [feature] [--blocking] [--skip-review]
18
13
  ```
14
+ - `feature`: Name of the feature being shipped (required)
15
+ - `--blocking`: Abort if any check fails
16
+ - `--skip-review`: Skip code review (for trivial changes)
19
17
 
20
- **Source of Truth**: `storage/shipped.json`
21
- **Claude Context**: `context/shipped.md` (generated)
22
- **Backend Sync**: `sync/pending.json` (events)
18
+ ## Flow
23
19
 
24
- ## Context Variables
25
- - `{projectId}`: From `.prjct/prjct.config.json`
26
- - `{globalPath}`: `~/.prjct-cli/projects/{projectId}`
27
- - `{shippedStoragePath}`: `{globalPath}/storage/shipped.json`
28
- - `{shippedContextPath}`: `{globalPath}/context/shipped.md`
29
- - `{syncPath}`: `{globalPath}/sync/pending.json`
30
- - `{memoryPath}`: `{globalPath}/memory/events.jsonl`
31
- - `{snapshotDir}`: `{globalPath}/snapshots`
32
- - `{feature}`: User-provided feature name
33
- - `{outcome}`: User-provided outcome status (optional)
20
+ ### Step 1: Validate Project
21
+ READ: `.prjct/prjct.config.json` → extract `projectId`
22
+ IF missing: "No prjct project. Run /p:init first." → STOP
34
23
 
35
- ## Outcome Categories
24
+ SET: `{globalPath}` = `~/.prjct-cli/projects/{projectId}`
36
25
 
37
- Track what happened after shipping:
38
-
39
- | Outcome | Meaning | Use When |
40
- |---------|---------|----------|
41
- | `validated` | Confirmed working in production | Feature verified by users/tests |
42
- | `monitoring` | Deployed, needs observation | Just shipped, watching metrics |
43
- | `known-issues` | Working with caveats | Minor issues known, acceptable |
44
-
45
- If no outcome provided, default to `monitoring`.
46
-
47
- ## Step 1: Read Config
48
-
49
- READ: `.prjct/prjct.config.json`
50
- EXTRACT: `projectId`
51
-
52
- IF file not found:
53
- OUTPUT: "No prjct project. Run /p:init first."
54
- STOP
55
-
56
- ## Step 2: Validate Prerequisites
26
+ ### Step 2: Pre-flight Checks
57
27
 
28
+ #### 2.1 Check for changes
58
29
  BASH: `git status --porcelain`
30
+ IF empty: "No changes to ship." → STOP
31
+
32
+ #### 2.2 Analyze change scope
33
+ BASH: `git diff --stat HEAD`
34
+ EXTRACT: {filesChanged}, {insertions}, {deletions}
35
+ SET: {totalLines} = {insertions} + {deletions}
36
+
37
+ #### 2.3 Detect trivial changes
38
+ IF {totalLines} < 10 AND {filesChanged} <= 2:
39
+ SET: {changeType} = "trivial"
40
+ OUTPUT: "Trivial changes detected ({totalLines} lines in {filesChanged} files)"
41
+ ELSE IF {totalLines} < 50:
42
+ SET: {changeType} = "small"
43
+ ELSE IF {totalLines} < 200:
44
+ SET: {changeType} = "medium"
45
+ ELSE:
46
+ SET: {changeType} = "large"
47
+ OUTPUT: "Large change detected ({totalLines} lines). Full review recommended."
59
48
 
60
- IF output empty (no changes):
61
- OUTPUT: "⚠️ No changes to ship. Make some commits first."
62
- STOP
63
-
64
- BASH: `git rev-parse --is-inside-work-tree`
49
+ ### Step 3: Quality Checks
50
+ BASH: `npm run lint 2>&1 || echo "LINT_SKIP"`
51
+ BASH: `npm test 2>&1 || echo "TEST_SKIP"`
65
52
 
66
- IF not a git repo:
67
- OUTPUT: "⚠️ Not a git repository. Initialize git first."
53
+ IF `--blocking` AND (lint failed OR tests failed):
54
+ OUTPUT: "Quality checks failed. Ship blocked."
68
55
  STOP
69
56
 
70
- ## Step 3: Quality Checks (Non-Blocking)
57
+ ### Step 4: Code Review with Confidence Scoring
71
58
 
72
- ### Lint Check
73
- BASH: `npm run lint 2>&1 || echo "LINT_SKIP"`
74
- CAPTURE output as {lintResult}
75
-
76
- IF contains "LINT_SKIP" OR contains "missing script":
77
- {lintStatus} = "skipped"
78
- ELSE IF contains "error":
79
- {lintStatus} = "warnings"
59
+ IF `--skip-review` OR {changeType} == "trivial":
60
+ OUTPUT: "Skipping code review."
61
+ Go to Step 5
80
62
  ELSE:
81
- {lintStatus} = "passed"
82
-
83
- ### Test Check
84
- BASH: `npm test 2>&1 || echo "TEST_SKIP"`
85
- CAPTURE output as {testResult}
86
-
87
- IF contains "TEST_SKIP" OR contains "missing script":
88
- {testStatus} = "skipped"
89
- ELSE IF contains "failed" OR contains "FAIL":
90
- {testStatus} = "failed"
63
+ OUTPUT: "Running code review..."
64
+
65
+ #### 4.1 Get changed files
66
+ BASH: `git diff --name-only HEAD`
67
+ SET: {changedFiles} = result
68
+
69
+ #### 4.2 Review each file for issues
70
+ FOR each file in {changedFiles}:
71
+ BASH: `git diff HEAD -- {file}`
72
+
73
+ Analyze diff for:
74
+ - Missing error handling
75
+ - Security issues (hardcoded secrets, SQL injection, XSS)
76
+ - Logic errors
77
+ - Missing null checks
78
+ - Resource leaks
79
+
80
+ FOR each issue found:
81
+ ASSIGN confidence score (0-100):
82
+ - 90-100: Definite bug/security issue
83
+ - 70-89: Likely problem, should fix
84
+ - 50-69: Maybe a problem
85
+ - 0-49: Nitpick/style preference
86
+
87
+ #### 4.3 Filter and report
88
+ SET: {issues} = issues with confidence >= 70
89
+
90
+ IF {issues}.length > 0:
91
+ OUTPUT: """
92
+ ## Code Review Results
93
+
94
+ Found {issues.length} issues (confidence >= 70%):
95
+
96
+ {FOR each issue:}
97
+ - [{confidence}%] {description}
98
+ File: {file}:{line}
99
+ {END FOR}
100
+ """
101
+
102
+ IF `--blocking`:
103
+ OUTPUT: "Fix issues before shipping."
104
+ STOP
105
+ ELSE:
106
+ PROMPT: "Continue with ship? (y/n)"
107
+ IF no: STOP
91
108
  ELSE:
92
- {testStatus} = "passed"
93
-
94
- **Note**: These are NON-BLOCKING. Continue even if they fail.
95
-
96
- ## Step 4: Version Bump (MANDATORY)
97
-
98
- ### Read Current Version
99
- Detect project type and read version:
109
+ OUTPUT: "Code review passed. No high-confidence issues found."
100
110
 
101
- | File | Language | Version Location |
102
- |------|----------|------------------|
103
- | `package.json` | Node.js | `"version": "X.Y.Z"` |
104
- | `Cargo.toml` | Rust | `version = "X.Y.Z"` |
105
- | `pyproject.toml` | Python | `version = "X.Y.Z"` |
106
- | `VERSION` | Any | Plain text `X.Y.Z` |
111
+ ### Step 5: Version Bump
112
+ READ: `package.json` (or Cargo.toml, pyproject.toml)
113
+ EXTRACT: current version
107
114
 
108
- ### Determine Bump Type
109
115
  BASH: `git log --oneline -10`
116
+ Determine bump type:
117
+ - "BREAKING" or "major:" → major
118
+ - "feat:" or "feature:" → minor
119
+ - else → patch
110
120
 
111
- IF any commit contains "BREAKING" OR "major:":
112
- {bumpType} = "major"
113
- ELSE IF any commit contains "feat:" OR "feature:":
114
- {bumpType} = "minor"
115
- ELSE:
116
- {bumpType} = "patch"
117
-
118
- ### Update Version File
119
- Update the version file with {newVersion}
120
-
121
- ## Step 5: Update CHANGELOG (MANDATORY)
121
+ UPDATE version file with new version
122
122
 
123
- ### Get Recent Commits
123
+ ### Step 6: Update CHANGELOG
124
124
  BASH: `git log --oneline -20 --pretty=format:"- %s"`
125
- CAPTURE as {commitList}
126
-
127
- ### Create/Update CHANGELOG.md
128
- INSERT new entry after header.
129
-
130
- ## Step 6: Git Commit
125
+ INSERT new entry in CHANGELOG.md
131
126
 
127
+ ### Step 7: Git Commit & Push
132
128
  BASH: `git add .`
133
-
134
- BASH: `git commit -m "$(cat <<'EOF'
135
- feat: Ship {feature} v{newVersion}
129
+ BASH: `git commit -m "feat: Ship {feature} v{newVersion}
136
130
 
137
131
  🤖 Generated with [p/](https://www.prjct.app/)
138
132
  Designed for [Claude](https://www.anthropic.com/claude)
139
- EOF
140
- )"`
141
-
142
- ## Step 7: Git Push
143
-
144
- BASH: `git push 2>&1`
145
-
146
- IF contains "rejected" OR contains "failed":
147
- OUTPUT: "⚠️ Push failed. Try: git pull --rebase && git push"
148
- CONTINUE
149
-
150
- ## Step 8: Update Storage (SOURCE OF TRUTH)
133
+ "`
134
+ BASH: `git push`
151
135
 
152
- SET: {now} = GetTimestamp()
153
- GENERATE: {shipId} = UUID v4
136
+ ### Step 8: Update Storage
137
+ GET timestamp: `bun -e "console.log(new Date().toISOString())" 2>/dev/null || node -e "console.log(new Date().toISOString())"`
138
+ GET uuid: `bun -e "console.log(crypto.randomUUID())" 2>/dev/null || node -e "console.log(require('crypto').randomUUID())"`
154
139
 
155
- ### Read existing shipped
156
- READ: `{shippedStoragePath}` or create default:
140
+ READ: `{globalPath}/storage/shipped.json` (or create default)
141
+ PREPEND new ship object:
157
142
  ```json
158
143
  {
159
- "shipped": [],
160
- "lastUpdated": null
161
- }
162
- ```
163
-
164
- ### Create ship object
165
- ```json
166
- {
167
- "id": "{shipId}",
144
+ "id": "{uuid}",
168
145
  "name": "{feature}",
169
146
  "version": "{newVersion}",
170
- "outcome": "{outcome}",
171
- "shippedAt": "{now}",
147
+ "shippedAt": "{timestamp}",
172
148
  "lint": "{lintStatus}",
173
- "tests": "{testStatus}",
174
- "commits": {commits}
149
+ "tests": "{testStatus}"
175
150
  }
176
151
  ```
152
+ WRITE: `{globalPath}/storage/shipped.json`
177
153
 
178
- ### Update shipped.json
179
- PREPEND new ship to shipped array
180
- SET: lastUpdated = {now}
181
- WRITE: `{shippedStoragePath}`
154
+ Generate context:
155
+ WRITE: `{globalPath}/context/shipped.md`
182
156
 
183
- ## Step 9: Generate Context (FOR CLAUDE)
157
+ Queue sync event:
158
+ APPEND to `{globalPath}/sync/pending.json`
184
159
 
185
- WRITE: `{shippedContextPath}`
160
+ Log to memory:
161
+ APPEND to `{globalPath}/memory/events.jsonl`
186
162
 
187
- ```markdown
188
- # SHIPPED 🚀
189
-
190
- ## {Month Year}
191
-
192
- {FOR EACH ship in shipped WHERE month matches:}
193
- - **{ship.name}** v{ship.version} - {ship.shippedAt}
194
- {END FOR}
195
-
196
- ---
197
-
198
- **Total shipped:** {shipped.length}
199
- ```
200
-
201
- ## Step 10: Queue Sync Event (FOR BACKEND)
202
-
203
- READ: `{syncPath}` or create empty array
204
- APPEND event:
205
- ```json
206
- {
207
- "type": "feature.shipped",
208
- "path": ["shipped"],
209
- "data": {
210
- "shipId": "{shipId}",
211
- "name": "{feature}",
212
- "version": "{newVersion}",
213
- "outcome": "{outcome}",
214
- "shippedAt": "{now}"
215
- },
216
- "timestamp": "{now}",
217
- "projectId": "{projectId}"
218
- }
219
- ```
220
- WRITE: `{syncPath}`
221
-
222
- ## Step 11: Log to Daily Session
223
-
224
- GET: {date} = YYYY-MM-DD from {now}
225
- GET: {yearMonth} = YYYY-MM from {now}
226
- SET: {dailySessionPath} = `{globalPath}/progress/sessions/{yearMonth}/{date}.jsonl`
227
-
228
- BASH: `mkdir -p {globalPath}/progress/sessions/{yearMonth}`
229
-
230
- APPEND to: `{dailySessionPath}`
231
- ```json
232
- {"ts":"{now}","type":"feature_ship","name":"{feature}","version":"{newVersion}"}
233
- ```
234
-
235
- ## Step 12: Log to Memory (AUDIT TRAIL)
236
-
237
- APPEND to: `{memoryPath}`
238
- ```json
239
- {"timestamp":"{now}","action":"feature_shipped","shipId":"{shipId}","feature":"{feature}","version":"{newVersion}","outcome":"{outcome}"}
240
- ```
241
-
242
- ## Step 13: Update project.json
243
-
244
- SET: {projectJsonPath} = `{globalPath}/project.json`
245
-
246
- READ: `{projectJsonPath}`
247
- UPDATE:
248
- - `"version"`: Set to `{newVersion}`
249
- - `"hasUncommittedChanges"`: Set to `false`
250
- - `"lastSync"`: Set to `{now}`
251
- WRITE: `{projectJsonPath}`
252
-
253
- ## Step 14: Run Deep Sync
254
-
255
- Execute `/p:sync` logic to update all context files.
256
-
257
- ## Output
258
-
259
- SUCCESS:
163
+ ### Step 9: Output
260
164
  ```
261
165
  🚀 Shipped: {feature}
262
166
 
263
- Version: {currentVersion} → {newVersion}
264
- Outcome: {outcome}
265
- Lint: {lintStatus}
266
- Tests: {testStatus}
267
- Commit: {commitHash}
268
-
269
- 🔄 Synced project data
167
+ Version: {oldVersion} → {newVersion}
168
+ Changes: {changeType} ({totalLines} lines in {filesChanged} files)
169
+ Quality: Lint {lintStatus} | Tests {testStatus}
170
+ Review: {reviewStatus}
270
171
 
271
- Next:
272
- • /p:undo - Revert this ship if needed
273
- • /p:feature - Plan next feature
274
- • /p:recap - See progress
172
+ Next: /p:feature | /p:recap
275
173
  ```
276
174
 
277
175
  ## Error Handling
@@ -280,37 +178,60 @@ Next:
280
178
  |-------|----------|--------|
281
179
  | No git repo | "Not a git repository" | STOP |
282
180
  | No changes | "No changes to ship" | STOP |
283
- | Lint fails | Show warning | CONTINUE |
284
- | Tests fail | Show warning | CONTINUE |
285
- | Push fails | Show fix command | CONTINUE |
286
- | Version bump fails | "Failed to update version" | STOP |
181
+ | Lint/test fails (blocking) | "Quality checks failed" | STOP |
182
+ | Lint/test fails (non-blocking) | Show warning | CONTINUE |
183
+ | Code review finds issues (blocking) | "Fix issues before shipping" | STOP |
184
+ | Code review finds issues (non-blocking) | Prompt to continue | ASK |
185
+ | Push fails | "Push failed. Try: git pull --rebase" | CONTINUE |
287
186
 
288
187
  ## Examples
289
188
 
290
- ### Example 1: Full Success
189
+ ### Example 1: Trivial Change (auto-skip review)
291
190
  ```
292
- 🚀 Shipped: user authentication
191
+ /p:ship "fix typo"
293
192
 
294
- Version: 1.2.0 1.3.0
295
- Outcome: validated
296
- Lint: passed
297
- Tests: passed
298
- Commit: abc1234
193
+ Pre-flight: Trivial changes (3 lines in 1 file)
194
+ Quality: Lint ✅ | Tests ✅
195
+ Review: Skipped (trivial)
299
196
 
300
- Next: /p:feature | /p:recap
197
+ 🚀 Shipped: fix typo
198
+ Version: 1.2.0 → 1.2.1
301
199
  ```
302
200
 
303
- ### Example 2: With Warnings
201
+ ### Example 2: Medium Change (with review)
304
202
  ```
305
- 🚀 Shipped: bug fixes
203
+ /p:ship "add auth"
306
204
 
307
- Version: 1.2.0 1.2.1
308
- Outcome: monitoring
309
- Lint: warnings (non-blocking)
310
- Tests: skipped
311
- Commit: def5678
205
+ Pre-flight: Medium changes (87 lines in 5 files)
206
+ Quality: Lint ✅ | Tests ✅
207
+ Review: Running...
312
208
 
313
- ⚠️ Consider fixing lint warnings
209
+ ## Code Review Results
210
+ Found 2 issues (confidence >= 70%):
211
+ - [85%] Missing error handling in OAuth callback
212
+ File: src/auth/oauth.ts:67
213
+ - [72%] Token not validated before use
214
+ File: src/auth/validate.ts:23
314
215
 
315
- Next: /p:feature | /p:recap
216
+ Continue with ship? (y/n)
316
217
  ```
218
+
219
+ ### Example 3: Blocking Mode
220
+ ```
221
+ /p:ship "deploy script" --blocking
222
+
223
+ Pre-flight: Small changes (28 lines in 2 files)
224
+ Quality: Lint ✅ | Tests ✅
225
+ Review: Running...
226
+
227
+ ## Code Review Results
228
+ Found 1 issue (confidence >= 70%):
229
+ - [95%] Hardcoded credentials detected
230
+ File: scripts/deploy.sh:12
231
+
232
+ Fix issues before shipping.
233
+ ```
234
+
235
+ ## References
236
+ - Architecture details: `~/.prjct-cli/docs/architecture.md`
237
+ - Validation patterns: `~/.prjct-cli/docs/validation.md`
@@ -167,6 +167,42 @@ GLOB for config files and analyze:
167
167
 
168
168
  EXTRACT: `{languages}`, `{frameworks}`, `{techStack}`
169
169
 
170
+ ### Detect Frontend/UI Stack (for UX/UI Agent)
171
+
172
+ **CRITICAL**: If ANY frontend technology is detected, generate the UX/UI agent.
173
+
174
+ #### Web Frontend Detection
175
+ ```bash
176
+ # Check package.json for web frameworks
177
+ grep -E '"(react|react-dom|next|vue|nuxt|svelte|@sveltejs/kit|@angular/core)"' package.json 2>/dev/null
178
+ ```
179
+
180
+ SET: `{hasWebFrontend}` = true if any match
181
+
182
+ #### Mobile Frontend Detection
183
+ ```bash
184
+ # React Native / Expo
185
+ grep -E '"(react-native|expo)"' package.json 2>/dev/null
186
+
187
+ # Flutter
188
+ test -f pubspec.yaml && echo "flutter"
189
+
190
+ # SwiftUI (iOS)
191
+ find . -name "*.swift" -exec grep -l "import SwiftUI" {} \; 2>/dev/null | head -1
192
+
193
+ # Jetpack Compose (Android)
194
+ find . -name "*.kt" -exec grep -l "androidx.compose" {} \; 2>/dev/null | head -1
195
+ ```
196
+
197
+ SET: `{hasMobileFrontend}` = true if any match
198
+
199
+ #### Combined Frontend Flag
200
+ ```
201
+ {hasFrontendUI} = {hasWebFrontend} OR {hasMobileFrontend}
202
+ ```
203
+
204
+ EXTRACT: `{frontendType}` = "web" | "mobile" | "both" | null
205
+
170
206
  ---
171
207
 
172
208
  ## Step 4: Regenerate ALL Context Files
@@ -421,13 +457,32 @@ Analyze `{techStack}` from Step 3 and generate ONLY relevant domain agents:
421
457
  | PostgreSQL, MySQL, MongoDB, Prisma | `database.md` | `templates/subagents/domain/database.md` |
422
458
  | Docker, Kubernetes, GitHub Actions | `devops.md` | `templates/subagents/domain/devops.md` |
423
459
  | Jest, Pytest, Vitest, testing | `testing.md` | `templates/subagents/domain/testing.md` |
460
+ | **{hasFrontendUI} = true** | `uxui.md` | `templates/agentic/agents/uxui.md` |
424
461
 
425
462
  For EACH detected stack:
426
463
  1. READ template from `templates/subagents/domain/{name}.md`
427
464
  2. ADAPT description with detected frameworks (e.g., "React specialist" not just "frontend")
428
465
  3. WRITE to `{globalPath}/agents/{name}.md`
429
466
 
430
- ### 7.5 Report Generated Agents
467
+ ### 7.5 Generate UX/UI Agent (CRITICAL for Frontend Projects)
468
+
469
+ **Priority: UX > UI** - User experience is more important than visuals.
470
+
471
+ IF `{hasFrontendUI}` == true:
472
+
473
+ 1. READ template: `templates/agentic/agents/uxui.md`
474
+ 2. WRITE to: `{globalPath}/agents/uxui.md`
475
+ 3. ADD to `{domainAgents}`: "uxui"
476
+
477
+ OUTPUT: "🎨 Generated UX/UI agent for {frontendType} ({frameworks detected})"
478
+
479
+ The UX/UI agent ensures:
480
+ - **UX First**: Clarity, feedback, reduced friction, error handling, accessibility
481
+ - **Modern UI**: Distinctive typography, bold colors, purposeful animation
482
+ - **Anti-patterns avoided**: No "AI slop" (Inter font, purple gradients, generic layouts)
483
+ - **Checklists**: UX and UI quality gates before shipping
484
+
485
+ ### 7.6 Report Generated Agents
431
486
 
432
487
  Track which agents were generated for output:
433
488
  - `{workflowAgents}`: Always 3 (prjct-workflow, prjct-planner, prjct-shipper)
@@ -516,7 +571,10 @@ IF cloudSync AND no syncError:
516
571
 
517
572
  🤖 Claude Code Sub-Agents ({workflowAgents.length + domainAgents.length})
518
573
  ├── Workflow: prjct-workflow, prjct-planner, prjct-shipper
519
- └── Domain: {domainAgents.join(', ') || 'none'}
574
+ ├── Domain: {domainAgents.join(', ') || 'none'}
575
+ {IF hasFrontendUI}
576
+ └── 🎨 UX/UI: uxui.md (Priority: UX > UI)
577
+ {ENDIF}
520
578
 
521
579
  {IF cloudSync}
522
580
  ☁️ Cloud Sync
@@ -581,5 +639,6 @@ Next: /p:now to start a new task
581
639
  ├── backend.md # (if Node/Go/Python API detected)
582
640
  ├── database.md # (if DB detected)
583
641
  ├── devops.md # (if Docker/K8s detected)
584
- └── testing.md # (if test framework detected)
642
+ ├── testing.md # (if test framework detected)
643
+ └── uxui.md # (if ANY frontend UI detected - web or mobile)
585
644
  ```