prjct-cli 0.18.1 → 0.19.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 (245) hide show
  1. package/CHANGELOG.md +53 -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/subagent-generation.md +8 -6
  11. package/templates/commands/done.md +57 -258
  12. package/templates/commands/now.md +72 -277
  13. package/templates/commands/ship.md +55 -261
  14. package/templates/commands/sync.md +7 -7
  15. package/templates/commands/test.md +328 -21
  16. package/templates/global/CLAUDE.md +40 -205
  17. package/templates/global/docs/agents.md +88 -0
  18. package/templates/global/docs/architecture.md +103 -0
  19. package/templates/global/docs/commands.md +98 -0
  20. package/templates/global/docs/validation.md +95 -0
  21. package/templates/mcp-config.json +36 -0
  22. package/bin/dev.js +0 -216
  23. package/bin/serve.js +0 -361
  24. package/packages/web/README.md +0 -36
  25. package/packages/web/app/api/claude/sessions/route.ts +0 -44
  26. package/packages/web/app/api/claude/status/route.ts +0 -34
  27. package/packages/web/app/api/projects/[id]/icon/route.ts +0 -33
  28. package/packages/web/app/api/projects/[id]/momentum/route.ts +0 -257
  29. package/packages/web/app/api/projects/[id]/route.ts +0 -29
  30. package/packages/web/app/api/projects/[id]/stats/route.ts +0 -41
  31. package/packages/web/app/api/projects/[id]/status/route.ts +0 -21
  32. package/packages/web/app/api/projects/route.ts +0 -16
  33. package/packages/web/app/api/sessions/current/route.ts +0 -132
  34. package/packages/web/app/api/sessions/history/route.ts +0 -204
  35. package/packages/web/app/error.tsx +0 -34
  36. package/packages/web/app/favicon.ico +0 -0
  37. package/packages/web/app/globals.css +0 -198
  38. package/packages/web/app/layout.tsx +0 -53
  39. package/packages/web/app/loading.tsx +0 -7
  40. package/packages/web/app/not-found.tsx +0 -25
  41. package/packages/web/app/page.tsx +0 -12
  42. package/packages/web/app/project/[id]/code/layout.tsx +0 -18
  43. package/packages/web/app/project/[id]/code/page.tsx +0 -408
  44. package/packages/web/app/project/[id]/error.tsx +0 -41
  45. package/packages/web/app/project/[id]/loading.tsx +0 -9
  46. package/packages/web/app/project/[id]/not-found.tsx +0 -27
  47. package/packages/web/app/project/[id]/page.tsx +0 -384
  48. package/packages/web/app/project/[id]/reports/page.tsx +0 -59
  49. package/packages/web/app/project/[id]/reports/print/page.tsx +0 -58
  50. package/packages/web/app/sessions/page.tsx +0 -165
  51. package/packages/web/app/settings/page.tsx +0 -151
  52. package/packages/web/components/ActivityTimeline/ActivityTimeline.constants.ts +0 -2
  53. package/packages/web/components/ActivityTimeline/ActivityTimeline.tsx +0 -49
  54. package/packages/web/components/ActivityTimeline/ActivityTimeline.types.ts +0 -8
  55. package/packages/web/components/ActivityTimeline/hooks/index.ts +0 -2
  56. package/packages/web/components/ActivityTimeline/hooks/useExpandable.ts +0 -9
  57. package/packages/web/components/ActivityTimeline/hooks/useGroupedEvents.ts +0 -23
  58. package/packages/web/components/ActivityTimeline/index.ts +0 -2
  59. package/packages/web/components/AgentsCard/AgentsCard.tsx +0 -93
  60. package/packages/web/components/AgentsCard/AgentsCard.types.ts +0 -14
  61. package/packages/web/components/AgentsCard/index.ts +0 -2
  62. package/packages/web/components/AppSidebar/AppSidebar.tsx +0 -316
  63. package/packages/web/components/AppSidebar/index.ts +0 -1
  64. package/packages/web/components/BackLink/BackLink.tsx +0 -18
  65. package/packages/web/components/BackLink/BackLink.types.ts +0 -5
  66. package/packages/web/components/BackLink/index.ts +0 -2
  67. package/packages/web/components/BentoCard/BentoCard.constants.ts +0 -16
  68. package/packages/web/components/BentoCard/BentoCard.tsx +0 -48
  69. package/packages/web/components/BentoCard/BentoCard.types.ts +0 -15
  70. package/packages/web/components/BentoCard/index.ts +0 -2
  71. package/packages/web/components/BentoCardSkeleton/BentoCardSkeleton.constants.ts +0 -9
  72. package/packages/web/components/BentoCardSkeleton/BentoCardSkeleton.tsx +0 -18
  73. package/packages/web/components/BentoCardSkeleton/BentoCardSkeleton.types.ts +0 -5
  74. package/packages/web/components/BentoCardSkeleton/index.ts +0 -2
  75. package/packages/web/components/BentoGrid/BentoGrid.tsx +0 -18
  76. package/packages/web/components/BentoGrid/BentoGrid.types.ts +0 -4
  77. package/packages/web/components/BentoGrid/index.ts +0 -2
  78. package/packages/web/components/BlockersCard/BlockersCard.tsx +0 -75
  79. package/packages/web/components/BlockersCard/BlockersCard.types.ts +0 -12
  80. package/packages/web/components/BlockersCard/index.ts +0 -2
  81. package/packages/web/components/CommandBar/CommandBar.tsx +0 -67
  82. package/packages/web/components/CommandBar/index.ts +0 -1
  83. package/packages/web/components/CommandButton/CommandButton.tsx +0 -46
  84. package/packages/web/components/CommandButton/index.ts +0 -1
  85. package/packages/web/components/ConnectionStatus/ConnectionStatus.tsx +0 -29
  86. package/packages/web/components/ConnectionStatus/index.ts +0 -1
  87. package/packages/web/components/DashboardContent/DashboardContent.tsx +0 -284
  88. package/packages/web/components/DashboardContent/index.ts +0 -1
  89. package/packages/web/components/DateGroup/DateGroup.tsx +0 -18
  90. package/packages/web/components/DateGroup/DateGroup.types.ts +0 -6
  91. package/packages/web/components/DateGroup/DateGroup.utils.ts +0 -11
  92. package/packages/web/components/DateGroup/index.ts +0 -2
  93. package/packages/web/components/EmptyState/EmptyState.tsx +0 -76
  94. package/packages/web/components/EmptyState/EmptyState.types.ts +0 -11
  95. package/packages/web/components/EmptyState/index.ts +0 -2
  96. package/packages/web/components/EventRow/EventRow.constants.ts +0 -10
  97. package/packages/web/components/EventRow/EventRow.tsx +0 -49
  98. package/packages/web/components/EventRow/EventRow.types.ts +0 -7
  99. package/packages/web/components/EventRow/EventRow.utils.ts +0 -49
  100. package/packages/web/components/EventRow/index.ts +0 -2
  101. package/packages/web/components/ExpandButton/ExpandButton.tsx +0 -18
  102. package/packages/web/components/ExpandButton/ExpandButton.types.ts +0 -6
  103. package/packages/web/components/ExpandButton/index.ts +0 -2
  104. package/packages/web/components/HealthGradientBackground/HealthGradientBackground.tsx +0 -14
  105. package/packages/web/components/HealthGradientBackground/HealthGradientBackground.types.ts +0 -5
  106. package/packages/web/components/HealthGradientBackground/HealthGradientBackground.utils.ts +0 -13
  107. package/packages/web/components/HealthGradientBackground/index.ts +0 -2
  108. package/packages/web/components/HeroSection/HeroSection.tsx +0 -92
  109. package/packages/web/components/HeroSection/HeroSection.types.ts +0 -14
  110. package/packages/web/components/HeroSection/HeroSection.utils.ts +0 -11
  111. package/packages/web/components/HeroSection/hooks/index.ts +0 -2
  112. package/packages/web/components/HeroSection/hooks/useCountUp.ts +0 -45
  113. package/packages/web/components/HeroSection/hooks/useWeeklyActivity.ts +0 -18
  114. package/packages/web/components/HeroSection/index.ts +0 -2
  115. package/packages/web/components/IdeasCard/IdeasCard.tsx +0 -115
  116. package/packages/web/components/IdeasCard/IdeasCard.types.ts +0 -10
  117. package/packages/web/components/IdeasCard/index.ts +0 -2
  118. package/packages/web/components/InsightMessage/InsightMessage.tsx +0 -9
  119. package/packages/web/components/InsightMessage/InsightMessage.types.ts +0 -3
  120. package/packages/web/components/InsightMessage/index.ts +0 -2
  121. package/packages/web/components/Logo/Logo.tsx +0 -65
  122. package/packages/web/components/Logo/index.ts +0 -1
  123. package/packages/web/components/MarkdownContent/MarkdownContent.tsx +0 -123
  124. package/packages/web/components/MarkdownContent/index.ts +0 -1
  125. package/packages/web/components/MasonryGrid/MasonryGrid.tsx +0 -18
  126. package/packages/web/components/MasonryGrid/index.ts +0 -1
  127. package/packages/web/components/MomentumWidget/MomentumWidget.tsx +0 -119
  128. package/packages/web/components/MomentumWidget/MomentumWidget.types.ts +0 -16
  129. package/packages/web/components/MomentumWidget/index.ts +0 -2
  130. package/packages/web/components/NowCard/NowCard.tsx +0 -118
  131. package/packages/web/components/NowCard/NowCard.types.ts +0 -16
  132. package/packages/web/components/NowCard/index.ts +0 -2
  133. package/packages/web/components/PageHeader/PageHeader.tsx +0 -24
  134. package/packages/web/components/PageHeader/index.ts +0 -1
  135. package/packages/web/components/ProgressRing/ProgressRing.constants.ts +0 -20
  136. package/packages/web/components/ProgressRing/ProgressRing.tsx +0 -51
  137. package/packages/web/components/ProgressRing/ProgressRing.types.ts +0 -11
  138. package/packages/web/components/ProgressRing/index.ts +0 -2
  139. package/packages/web/components/ProjectAvatar/ProjectAvatar.tsx +0 -54
  140. package/packages/web/components/ProjectAvatar/index.ts +0 -1
  141. package/packages/web/components/ProjectColorDot/ProjectColorDot.tsx +0 -37
  142. package/packages/web/components/ProjectColorDot/index.ts +0 -1
  143. package/packages/web/components/ProjectSelectorModal/ProjectSelectorModal.tsx +0 -104
  144. package/packages/web/components/ProjectSelectorModal/index.ts +0 -1
  145. package/packages/web/components/Providers/Providers.tsx +0 -48
  146. package/packages/web/components/Providers/index.ts +0 -1
  147. package/packages/web/components/QueueCard/QueueCard.tsx +0 -125
  148. package/packages/web/components/QueueCard/QueueCard.types.ts +0 -12
  149. package/packages/web/components/QueueCard/QueueCard.utils.ts +0 -12
  150. package/packages/web/components/QueueCard/index.ts +0 -2
  151. package/packages/web/components/RecoverCard/RecoverCard.tsx +0 -72
  152. package/packages/web/components/RecoverCard/RecoverCard.types.ts +0 -16
  153. package/packages/web/components/RecoverCard/index.ts +0 -2
  154. package/packages/web/components/RoadmapCard/RoadmapCard.tsx +0 -145
  155. package/packages/web/components/RoadmapCard/RoadmapCard.types.ts +0 -16
  156. package/packages/web/components/RoadmapCard/index.ts +0 -2
  157. package/packages/web/components/ShipsCard/ShipsCard.tsx +0 -95
  158. package/packages/web/components/ShipsCard/ShipsCard.types.ts +0 -14
  159. package/packages/web/components/ShipsCard/ShipsCard.utils.ts +0 -4
  160. package/packages/web/components/ShipsCard/index.ts +0 -2
  161. package/packages/web/components/SparklineChart/SparklineChart.tsx +0 -40
  162. package/packages/web/components/SparklineChart/SparklineChart.types.ts +0 -6
  163. package/packages/web/components/SparklineChart/index.ts +0 -2
  164. package/packages/web/components/StatsMasonry/StatsMasonry.tsx +0 -95
  165. package/packages/web/components/StatsMasonry/index.ts +0 -1
  166. package/packages/web/components/StreakCard/StreakCard.constants.ts +0 -2
  167. package/packages/web/components/StreakCard/StreakCard.tsx +0 -55
  168. package/packages/web/components/StreakCard/StreakCard.types.ts +0 -4
  169. package/packages/web/components/StreakCard/index.ts +0 -2
  170. package/packages/web/components/TasksCounter/TasksCounter.tsx +0 -14
  171. package/packages/web/components/TasksCounter/TasksCounter.types.ts +0 -3
  172. package/packages/web/components/TasksCounter/index.ts +0 -2
  173. package/packages/web/components/TechStackBadges/TechStackBadges.tsx +0 -28
  174. package/packages/web/components/TechStackBadges/index.ts +0 -1
  175. package/packages/web/components/TerminalDock/DockToggleTab.tsx +0 -29
  176. package/packages/web/components/TerminalDock/TerminalDock.tsx +0 -386
  177. package/packages/web/components/TerminalDock/TerminalDockTab.tsx +0 -130
  178. package/packages/web/components/TerminalDock/TerminalTabBar.tsx +0 -142
  179. package/packages/web/components/TerminalDock/index.ts +0 -2
  180. package/packages/web/components/TerminalTabs/TerminalTab.tsx +0 -95
  181. package/packages/web/components/TerminalTabs/TerminalTabs.tsx +0 -211
  182. package/packages/web/components/TerminalTabs/index.ts +0 -1
  183. package/packages/web/components/VelocityBadge/VelocityBadge.tsx +0 -32
  184. package/packages/web/components/VelocityBadge/VelocityBadge.types.ts +0 -3
  185. package/packages/web/components/VelocityBadge/index.ts +0 -2
  186. package/packages/web/components/VelocityCard/VelocityCard.tsx +0 -73
  187. package/packages/web/components/VelocityCard/VelocityCard.types.ts +0 -7
  188. package/packages/web/components/VelocityCard/index.ts +0 -2
  189. package/packages/web/components/WeeklyReports/PrintableReport.tsx +0 -259
  190. package/packages/web/components/WeeklyReports/ReportPreviewCard.tsx +0 -187
  191. package/packages/web/components/WeeklyReports/WeekCalendar.tsx +0 -288
  192. package/packages/web/components/WeeklyReports/WeeklyReports.tsx +0 -149
  193. package/packages/web/components/WeeklyReports/index.ts +0 -4
  194. package/packages/web/components/WeeklySparkline/WeeklySparkline.tsx +0 -25
  195. package/packages/web/components/WeeklySparkline/WeeklySparkline.types.ts +0 -4
  196. package/packages/web/components/WeeklySparkline/index.ts +0 -2
  197. package/packages/web/components/charts/SessionsChart.tsx +0 -175
  198. package/packages/web/components/ui/alert-dialog.tsx +0 -157
  199. package/packages/web/components/ui/badge.tsx +0 -46
  200. package/packages/web/components/ui/button.tsx +0 -60
  201. package/packages/web/components/ui/card.tsx +0 -92
  202. package/packages/web/components/ui/chart.tsx +0 -385
  203. package/packages/web/components/ui/dialog.tsx +0 -143
  204. package/packages/web/components/ui/drawer.tsx +0 -135
  205. package/packages/web/components/ui/dropdown-menu.tsx +0 -257
  206. package/packages/web/components/ui/input.tsx +0 -21
  207. package/packages/web/components/ui/scroll-area.tsx +0 -58
  208. package/packages/web/components/ui/select.tsx +0 -187
  209. package/packages/web/components/ui/sheet.tsx +0 -139
  210. package/packages/web/components/ui/tabs.tsx +0 -66
  211. package/packages/web/components/ui/tooltip.tsx +0 -61
  212. package/packages/web/components.json +0 -22
  213. package/packages/web/context/GlobalTerminalContext.tsx +0 -538
  214. package/packages/web/context/TerminalContext.tsx +0 -45
  215. package/packages/web/context/TerminalTabsContext.tsx +0 -181
  216. package/packages/web/eslint.config.mjs +0 -18
  217. package/packages/web/hooks/useClaudeTerminal.ts +0 -425
  218. package/packages/web/hooks/useProjectStats.ts +0 -93
  219. package/packages/web/hooks/useProjects.ts +0 -73
  220. package/packages/web/lib/actions/projects.ts +0 -15
  221. package/packages/web/lib/commands.ts +0 -81
  222. package/packages/web/lib/format.ts +0 -23
  223. package/packages/web/lib/generate-week-report.ts +0 -285
  224. package/packages/web/lib/parse-prjct-files.ts +0 -1123
  225. package/packages/web/lib/project-colors.ts +0 -58
  226. package/packages/web/lib/projects.ts +0 -506
  227. package/packages/web/lib/pty.ts +0 -101
  228. package/packages/web/lib/query-config.ts +0 -44
  229. package/packages/web/lib/services/index.ts +0 -9
  230. package/packages/web/lib/services/projects.server.ts +0 -66
  231. package/packages/web/lib/services/stats.server.ts +0 -562
  232. package/packages/web/lib/unified-loader.ts +0 -396
  233. package/packages/web/lib/utils.ts +0 -6
  234. package/packages/web/next-env.d.ts +0 -6
  235. package/packages/web/next.config.ts +0 -7
  236. package/packages/web/package.json +0 -57
  237. package/packages/web/postcss.config.mjs +0 -7
  238. package/packages/web/public/file.svg +0 -1
  239. package/packages/web/public/globe.svg +0 -1
  240. package/packages/web/public/next.svg +0 -1
  241. package/packages/web/public/vercel.svg +0 -1
  242. package/packages/web/public/window.svg +0 -1
  243. package/packages/web/server.ts +0 -312
  244. package/packages/web/tsconfig.json +0 -34
  245. package/templates/commands/serve.md +0 -121
package/CHANGELOG.md CHANGED
@@ -1,5 +1,58 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.19.0] - 2025-12-21
4
+
5
+ ### Breaking: Web Package Removed
6
+
7
+ The web dashboard (`packages/web/`) has been extracted to a separate repository for independent development.
8
+
9
+ **Removed:**
10
+ - `packages/web/` - Next.js dashboard app (~200 files)
11
+ - `bin/serve.js`, `bin/dev.js` - Web server scripts
12
+ - `templates/commands/serve.md` - /p:serve command
13
+ - `prjct-serve`, `prjct-dev` bin entries
14
+
15
+ ### Fix: Prompt Builder Now Sends Full Templates
16
+
17
+ Fixed critical bug where `prompt-builder.ts` only extracted `## Flow` sections, causing Claude to miss important instructions.
18
+
19
+ **Before:** Claude only saw the Flow section (~30% of template)
20
+ **After:** Claude sees the full template content
21
+
22
+ **Files Modified:**
23
+ - `core/agentic/prompt-builder.ts` - Removed regex extraction, send full content
24
+
25
+ ### Improved: Templates Simplified
26
+
27
+ Reduced template verbosity for better Claude comprehension:
28
+
29
+ | Template | Before | After |
30
+ |----------|--------|-------|
31
+ | ship.md | 359 lines | ~110 lines |
32
+ | done.md | 318 lines | ~117 lines |
33
+ | now.md | 346 lines | ~141 lines |
34
+
35
+ ### Improved: Timestamp Generation
36
+
37
+ Changed from undefined `GetTimestamp()` to actual bash commands:
38
+
39
+ ```bash
40
+ bun -e "console.log(new Date().toISOString())" 2>/dev/null || node -e "console.log(new Date().toISOString())"
41
+ ```
42
+
43
+ ## [0.18.2] - 2025-12-15
44
+
45
+ ### Fix: Agents Write to Global Storage
46
+
47
+ Fixed critical bug where sub-agents were being written to project's local `.claude/agents/` directory instead of global storage.
48
+
49
+ - **Bug**: `/p:sync` created agents in `{projectPath}/.claude/agents/` polluting local projects
50
+ - **Fix**: Agents now correctly write to `~/.prjct-cli/projects/{projectId}/agents/`
51
+
52
+ **Files Modified:**
53
+ - `templates/commands/sync.md` - Changed all agent paths from `{cwd}/.claude/agents/` to `{globalPath}/agents/`
54
+ - `templates/agentic/subagent-generation.md` - Updated paths and added critical rules
55
+
3
56
  ## [0.16.0] - 2025-12-15
4
57
 
5
58
  ### Dead Code Cleanup
package/CLAUDE.md CHANGED
@@ -6,255 +6,118 @@ This file provides guidance to Claude Code when working with prjct-cli.
6
6
 
7
7
  **prjct-cli** is a developer momentum tool. Track progress through slash commands without meetings or traditional PM overhead.
8
8
 
9
- ## CRITICAL: Timestamp Management
9
+ ## CRITICAL RULES
10
10
 
11
- **LLM DOES NOT KNOW CURRENT DATE/TIME** - Never generate timestamps manually.
12
-
13
- ### Tools (MUST USE)
14
- - `GetTimestamp()` ISO format: "2025-10-07T14:30:00.000Z"
15
- - `GetDate()` → YYYY-MM-DD format: "2025-10-07"
16
-
17
- ### Rules
18
- 1. **NEVER** generate timestamps manually - All hardcoded dates are WRONG
19
- 2. **ALWAYS** call GetTimestamp() for session files (*.jsonl)
20
- 3. **ALWAYS** call GetDate() for index files (shipped.md, roadmap.md, ideas.md)
21
-
22
- ## Core Workflow
11
+ ### 1. Path Resolution
12
+ **ALL writes go to global storage**: `~/.prjct-cli/projects/{projectId}/`
13
+ - NEVER write to `.prjct/` (config only)
14
+ - NEVER write to `./` (current directory)
23
15
 
16
+ ### 2. Timestamps
17
+ ```bash
18
+ # Prefer bun, fallback to node
19
+ bun -e "console.log(new Date().toISOString())" 2>/dev/null || node -e "console.log(new Date().toISOString())"
24
20
  ```
25
- p. analyze → Analyze stack, generate agents
26
- p. feature → Add feature with tasks
27
- p. done → Mark complete, next task
28
- p. ship → Lint/test/commit/push
29
- ```
30
-
31
- ## Architecture: MD-First
21
+ - Result: `"2025-12-20T10:30:00.000Z"`
22
+ - NEVER hardcode dates or times
32
23
 
33
- **MD files are the source of truth.** No JSON data files - all state is stored directly in Markdown.
24
+ ### 3. UUIDs
25
+ ```bash
26
+ bun -e "console.log(crypto.randomUUID())" 2>/dev/null || node -e "console.log(require('crypto').randomUUID())"
27
+ ```
34
28
 
35
- ### Global Storage
29
+ ### 4. Git Commit Footer
36
30
  ```
37
- ~/.prjct-cli/projects/{id}/
38
- ├── core/ # now.md (current task), next.md (queue)
39
- ├── progress/ # shipped.md, sessions/
40
- ├── planning/ # ideas.md, roadmap.md
41
- ├── analysis/ # repo-summary.md
42
- ├── memory/ # context.jsonl (append-only logs)
43
- ├── agents/ # Generated specialists
44
- └── project.json # Metadata only (name, repoPath, techStack)
31
+ 🤖 Generated with [p/](https://www.prjct.app/)
32
+ Designed for [Claude](https://www.anthropic.com/claude)
45
33
  ```
46
34
 
47
- ### Key Files (Source of Truth)
48
- | File | Purpose |
49
- |------|---------|
50
- | `core/now.md` | Current task state |
51
- | `core/next.md` | Task queue |
52
- | `planning/ideas.md` | Ideas backlog |
53
- | `planning/roadmap.md` | Feature roadmap |
54
- | `progress/shipped.md` | Shipped features |
35
+ ## Architecture: Write-Through
55
36
 
56
- ### Local Config
57
37
  ```
58
- .prjct/prjct.config.json # Links to global data via projectId
59
- ```
60
-
61
- ### Session Format (JSONL)
62
- ```jsonl
63
- {"ts":"{GetTimestamp()}","type":"task_complete","task":"auth","duration":"2h15m"}
38
+ User Action Storage (JSON) Context (MD) → Sync Events
64
39
  ```
65
40
 
66
- ## Natural Language: p. Trigger
67
-
68
- When message starts with `p.`:
69
- 1. Check `.prjct/prjct.config.json` exists
70
- 2. Detect intent from message
71
- 3. **USE SlashCommand tool** to execute the command
72
-
73
- ⚠️ **CRITICAL** - Always use SlashCommand, never work directly:
74
- - ✅ `SlashCommand("/p:feature add dark mode")`
75
- - ❌ Directly creating files without the command
76
-
77
- If no project: "No prjct project. Run /p:init first."
78
-
79
- ### Intent Map
80
-
81
- | User Intent | Command | What It Does |
82
- |-------------|---------|--------------|
83
- | Start/focus on task | `/p:now` | Sets current task |
84
- | Finished work | `/p:done` | Marks complete |
85
- | Ready to ship | `/p:ship` | Ship feature |
86
- | Has an idea | `/p:idea` | Saves to backlog |
87
- | See progress | `/p:recap` | Shows overview |
88
- | What's next | `/p:next` | Priority queue |
89
- | Need help | `/p:help` | Interactive guide |
90
-
91
- **Any language works** - English, Spanish, etc.
92
-
93
- ## Command Execution
94
-
95
- All `/p:*` commands:
96
- 1. Read `.prjct/prjct.config.json` → get projectId
97
- 2. Operate on `~/.prjct-cli/projects/{id}/`
98
- 3. Update files atomically
99
- 4. Return formatted response
100
-
101
- ### Confirmation Policy
102
-
103
- **ALL commands MUST ask for confirmation before execution:**
104
- 1. User triggers command
105
- 2. Present plan of what will be done
106
- 3. User approves
107
- 4. Execute
108
-
109
- ### Command Distinctions
110
-
111
- **`/p:idea`** - Quick idea capture (simple write)
112
- **`/p:workflow`** - Multi-agent workflow management (state machine)
113
-
114
- ## Available Commands
115
-
116
- ### Work
117
- - `/p:now [task]` - Set current task
118
- - `/p:next` - Priority queue
119
- - `/p:done` - Complete task
120
- - `/p:ship <feature>` - Ship and celebrate
121
- - `/p:bug <desc>` - Report bug
122
-
123
- ### Planning
124
- - `/p:idea <text>` - Capture idea
125
- - `/p:feature <desc>` - Add feature
126
- - `/p:workflow` - Workflow status
127
-
128
- ### Progress
129
- - `/p:recap` - Project overview
130
- - `/p:progress [period]` - Metrics
131
- - `/p:status` - KPI dashboard
41
+ | Layer | Path | Purpose |
42
+ |-------|------|---------|
43
+ | Storage | `storage/*.json` | Source of truth |
44
+ | Context | `context/*.md` | Claude-readable (generated) |
45
+ | Sync | `sync/pending.json` | Backend events |
46
+ | Memory | `memory/events.jsonl` | Audit trail |
132
47
 
133
- ### Help
134
- - `/p:init` - Initialize project
135
- - `/p:help` - Interactive guide
136
- - `/p:ask <question>` - Intent translator
137
- - `/p:suggest` - Smart recommendations
138
- - `/p:analyze` - Analyze repository
139
- - `/p:sync` - Sync state
140
-
141
- ### Quality
142
- - `/p:cleanup` - Clean up
143
- - `/p:design` - System design
144
-
145
- ## Agentic Architecture
146
-
147
- prjct-cli is template-driven. Claude reads templates and executes using tools.
148
-
149
- ### Flow
48
+ ### File Structure
150
49
  ```
151
- Template (MD) → Claude reads → Claude decides → Claude uses tools → Result
50
+ ~/.prjct-cli/projects/{projectId}/
51
+ ├── storage/
52
+ │ ├── state.json # Current task (source of truth)
53
+ │ ├── shipped.json # Shipped features
54
+ │ └── queue.json # Task queue
55
+ ├── context/
56
+ │ ├── now.md # Generated from state.json
57
+ │ └── shipped.md # Generated from shipped.json
58
+ ├── sync/pending.json # Backend events
59
+ ├── memory/events.jsonl # Audit trail
60
+ └── agents/ # Domain specialists
152
61
  ```
153
62
 
154
- ### Structure
155
- ```
156
- core/agentic/
157
- ├── template-loader.js # Loads command templates
158
- ├── context-builder.js # Builds project context
159
- ├── prompt-builder.js # Generates prompts
160
- ├── command-executor.js # Executes commands
161
- └── tool-registry.js # Maps tools
63
+ ## Core Workflow
162
64
 
163
- templates/commands/ # Command instructions
164
- templates/workflows/ # Workflow guides
165
- templates/analysis/ # Analysis instructions
166
65
  ```
167
-
168
- ### Templates as Source of Truth
169
-
170
- Templates define what Claude should do:
171
-
172
- ```markdown
173
- # /p:done
174
-
175
- ## Validation
176
- - Requires: `core/now.md` has content
177
-
178
- ## Flow
179
- 1. Read `core/now.md` → calculate duration
180
- 2. Clear now.md
181
- 3. Update metrics
182
-
183
- ## Response
184
- ✅ {task} ({duration})
66
+ /p:sync → /p:now "task" → [work] → /p:done → /p:ship
185
67
  ```
186
68
 
187
- Claude reads this and:
188
- 1. Checks validation
189
- 2. Executes flow using tools
190
- 3. Generates response
191
- 4. Suggests next actions
69
+ ## Commands
192
70
 
193
- ## Git Commit Format
71
+ | Command | Purpose |
72
+ |---------|---------|
73
+ | `/p:sync` | Analyze repo, generate agents |
74
+ | `/p:now [task]` | Start/show current task |
75
+ | `/p:done` | Complete current task |
76
+ | `/p:ship [feature]` | Ship with quality checks |
77
+ | `/p:feature` | Add to roadmap |
78
+ | `/p:idea` | Quick idea capture |
79
+ | `/p:recap` | Project overview |
194
80
 
195
- **ALL commits by prjct MUST use this footer:**
81
+ ## Natural Language Trigger
196
82
 
83
+ Messages starting with `p.` trigger commands:
197
84
  ```
198
- 🤖 Generated with [p/](https://www.prjct.app/)
199
- Designed for [Claude](https://www.anthropic.com/claude)
85
+ p. start auth → /p:now "auth"
86
+ p. done → /p:done
87
+ p. ship login → /p:ship "login"
200
88
  ```
201
89
 
202
- **Never use:**
203
- - "Generated with Claude Code"
204
- - "Co-Authored-By: Claude"
205
-
206
- ## Agent Generation
90
+ ## Template-Driven Execution
207
91
 
208
- Dynamic agents based on project analysis.
209
-
210
- See `templates/agents/AGENTS.md` for reference.
92
+ Templates define command behavior:
93
+ ```
94
+ templates/commands/{command}.md
95
+ ```
211
96
 
212
- Use: `generator.generateDynamicAgent(name, config)`
97
+ Claude reads template → executes flow → generates response.
213
98
 
214
99
  ## Key Rules
215
100
 
216
101
  1. **Read files before editing** - Never assume structure
217
- 2. **Use system timestamps** - Never hardcode dates
102
+ 2. **Use node commands for timestamps** - Never hardcode dates
218
103
  3. **Follow template instructions** - Templates are source of truth
219
- 4. **Confirm before executing** - Always show plan first
220
- 5. **Log actions** - Append to memory/context.jsonl
221
- 6. **Suggest next actions** - Maintain user momentum
222
-
223
- ## Output Philosophy
104
+ 4. **Log to memory** - Append to `memory/events.jsonl`
105
+ 5. **Suggest next actions** - Maintain user momentum
224
106
 
225
- **Task completion responses MUST be concise (< 4 lines):**
107
+ ## Output Format
226
108
 
227
- Format:
109
+ Concise responses (< 4 lines):
228
110
  ```
229
111
  ✅ [What was done]
230
112
 
231
- Files: [count] | Modified: [key file]
232
- Next: [action]
113
+ [Key metrics]
114
+ Next: [suggested action]
233
115
  ```
234
116
 
235
- **NEVER include in task summaries:**
236
- - Tables listing files
237
- - "Created Files" / "Modified Files" sections
238
- - "How It Works" explanations
239
- - Code snippets or implementation details
240
- - Detailed breakdowns of what was done
117
+ ## Documentation
241
118
 
242
- **Example (GOOD):**
243
- ```
244
- Agentic checklists integrated
245
-
246
- Files: 11 created | Modified: prompt-builder.js
247
- Next: /p:ship or test with /p:now
248
- ```
249
-
250
- **Example (BAD):**
251
- ```
252
- Created Files:
253
- | File | Purpose |
254
- |------|---------|
255
- | x.md | Does X |
256
- ...
257
-
258
- How It Works:
259
- Claude reads → decides → applies...
260
- ```
119
+ For detailed information:
120
+ - Architecture: `~/.prjct-cli/docs/architecture.md`
121
+ - Commands: `~/.prjct-cli/docs/commands.md`
122
+ - Validation: `~/.prjct-cli/docs/validation.md`
123
+ - Agents: `~/.prjct-cli/docs/agents.md`
@@ -330,13 +330,9 @@ class PromptBuilder {
330
330
 
331
331
  parts.push('\n---\n')
332
332
 
333
- // Template (only the flow section, skip verbose explanations)
334
- const flowMatch = template.content.match(/## Flow([\s\S]*?)(?=##|$)/)
335
- if (flowMatch) {
336
- parts.push(flowMatch[0])
337
- } else {
338
- parts.push(template.content)
339
- }
333
+ // Template content (include full template, frontmatter already stripped by loader)
334
+ // This ensures Claude sees ALL instructions including critical rules at the top
335
+ parts.push(template.content)
340
336
 
341
337
  // Current state (only if exists and relevant)
342
338
  const relevantState = this.filterRelevantState(state)
@@ -160,24 +160,4 @@ export const OPTIONAL_COMMANDS: Command[] = [
160
160
  ],
161
161
  },
162
162
 
163
- {
164
- name: 'serve',
165
- category: 'optional',
166
- description: 'Start prjct web server',
167
- usage: {
168
- claude: '/p:serve',
169
- terminal: 'prjct serve',
170
- },
171
- params: '[port]',
172
- implemented: true,
173
- hasTemplate: true,
174
- requiresInit: true,
175
- blockingRules: null,
176
- isOptional: true,
177
- features: [
178
- 'Local dashboard server',
179
- 'API endpoints',
180
- 'Real-time updates',
181
- ],
182
- },
183
163
  ]
@@ -7,7 +7,7 @@ import fs from 'fs/promises'
7
7
  import path from 'path'
8
8
  import os from 'os'
9
9
  import type { InstallResult, UninstallResult, CheckResult, SyncResult, GlobalConfigResult } from './types'
10
- import { installGlobalConfig } from './global-config'
10
+ import { installGlobalConfig, installDocs } from './global-config'
11
11
 
12
12
  export class CommandInstaller {
13
13
  homeDir: string
@@ -317,4 +317,11 @@ export class CommandInstaller {
317
317
  async installGlobalConfig(): Promise<GlobalConfigResult> {
318
318
  return installGlobalConfig(this.claudeConfigPath, () => this.detectClaude())
319
319
  }
320
+
321
+ /**
322
+ * Install documentation files to ~/.prjct-cli/docs/
323
+ */
324
+ async installDocs(): Promise<{ success: boolean; error?: string }> {
325
+ return installDocs()
326
+ }
320
327
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Global Config Operations
3
- * Install/update global CLAUDE.md configuration
3
+ * Install/update global CLAUDE.md configuration and docs
4
4
  */
5
5
 
6
6
  import fs from 'fs/promises'
@@ -8,6 +8,36 @@ import path from 'path'
8
8
  import os from 'os'
9
9
  import type { GlobalConfigResult } from './types'
10
10
 
11
+ /**
12
+ * Install documentation files to ~/.prjct-cli/docs/
13
+ */
14
+ export async function installDocs(): Promise<{ success: boolean; error?: string }> {
15
+ try {
16
+ const docsDir = path.join(os.homedir(), '.prjct-cli', 'docs')
17
+ const templateDocsDir = path.join(__dirname, '../../../templates/global/docs')
18
+
19
+ // Ensure docs directory exists
20
+ await fs.mkdir(docsDir, { recursive: true })
21
+
22
+ // Read all doc files from template
23
+ const docFiles = await fs.readdir(templateDocsDir)
24
+
25
+ // Copy each doc file
26
+ for (const file of docFiles) {
27
+ if (file.endsWith('.md')) {
28
+ const srcPath = path.join(templateDocsDir, file)
29
+ const destPath = path.join(docsDir, file)
30
+ const content = await fs.readFile(srcPath, 'utf-8')
31
+ await fs.writeFile(destPath, content, 'utf-8')
32
+ }
33
+ }
34
+
35
+ return { success: true }
36
+ } catch (error) {
37
+ return { success: false, error: (error as Error).message }
38
+ }
39
+ }
40
+
11
41
  /**
12
42
  * Install or update global CLAUDE.md configuration
13
43
  */
@@ -16,7 +16,7 @@ export type {
16
16
  GlobalConfigResult,
17
17
  } from './types'
18
18
 
19
- export { installGlobalConfig } from './global-config'
19
+ export { installGlobalConfig, installDocs } from './global-config'
20
20
  export { CommandInstaller } from './command-installer'
21
21
 
22
22
  import { CommandInstaller } from './command-installer'
@@ -103,6 +103,9 @@ export async function run(): Promise<SetupResults> {
103
103
  if (configResult.success) {
104
104
  results.configAction = configResult.action
105
105
  }
106
+
107
+ // Step 4b: Install documentation files
108
+ await installer.installDocs()
106
109
  }
107
110
 
108
111
  // Step 5: Save version in editors-config
package/package.json CHANGED
@@ -1,12 +1,10 @@
1
1
  {
2
2
  "name": "prjct-cli",
3
- "version": "0.18.1",
3
+ "version": "0.19.0",
4
4
  "description": "Built for Claude - Ship fast, track progress, stay focused. Developer momentum tool for indie hackers.",
5
5
  "main": "core/index.ts",
6
6
  "bin": {
7
- "prjct": "bin/prjct",
8
- "prjct-dev": "bin/dev.js",
9
- "prjct-serve": "bin/serve.js"
7
+ "prjct": "bin/prjct"
10
8
  },
11
9
  "workspaces": [
12
10
  "packages/*"
@@ -16,11 +14,8 @@
16
14
  "registry": "https://registry.npmjs.org"
17
15
  },
18
16
  "scripts": {
19
- "dev": "bun run --filter '*' dev",
20
- "build": "bun run --filter '@prjct/shared' build && bun run --filter 'web' build",
17
+ "build": "bun run --filter '@prjct/shared' build",
21
18
  "build:shared": "bun run --filter '@prjct/shared' build",
22
- "build:web": "bun run --filter 'web' build",
23
- "serve": "bun run --filter 'web' dev",
24
19
  "postinstall": "bun scripts/postinstall.js",
25
20
  "update-commands": "bun -e \"const installer = require('./core/infrastructure/command-installer'); installer.syncCommands().then(r => console.log('Commands updated:', r)).catch(e => console.error('Error:', e.message))\"",
26
21
  "install-global": "./scripts/install.sh",
@@ -84,15 +79,6 @@
84
79
  "bin/",
85
80
  "core/",
86
81
  "packages/shared/",
87
- "packages/web/app/",
88
- "packages/web/components/",
89
- "packages/web/context/",
90
- "packages/web/hooks/",
91
- "packages/web/lib/",
92
- "packages/web/public/",
93
- "packages/web/*.ts",
94
- "packages/web/*.json",
95
- "packages/web/*.mjs",
96
82
  "templates/",
97
83
  "scripts/postinstall.js",
98
84
  "scripts/install.sh",
@@ -11,7 +11,7 @@ You have access to:
11
11
 
12
12
  ## Output Location
13
13
 
14
- Write sub-agents to: `{projectPath}/.claude/agents/`
14
+ Write sub-agents to: `{globalPath}/agents/` (global storage, NOT local project)
15
15
 
16
16
  ## Sub-Agent Format (Claude Code)
17
17
 
@@ -70,29 +70,29 @@ Each generated agent should include:
70
70
 
71
71
  1. **Read Analysis**
72
72
  ```
73
- Read("{projectPath}/.prjct-cli/projects/{projectId}/analysis/repo-summary.md")
73
+ Read("{globalPath}/analysis/repo-summary.md")
74
74
  ```
75
75
 
76
76
  2. **Create Directory**
77
77
  ```
78
- Bash("mkdir -p {projectPath}/.claude/agents")
78
+ Bash("mkdir -p {globalPath}/agents")
79
79
  ```
80
80
 
81
81
  3. **Generate Workflow Agents** (always)
82
82
  - Read template from `templates/subagents/workflow/prjct-workflow.md`
83
83
  - Adapt with project context
84
- - Write to `{projectPath}/.claude/agents/prjct-workflow.md`
84
+ - Write to `{globalPath}/agents/prjct-workflow.md`
85
85
  - Repeat for prjct-planner.md and prjct-shipper.md
86
86
 
87
87
  4. **Generate Domain Agents** (based on analysis)
88
88
  - For each detected technology stack:
89
89
  - Read corresponding template from `templates/subagents/domain/`
90
90
  - Adapt with project-specific details
91
- - Write to `{projectPath}/.claude/agents/`
91
+ - Write to `{globalPath}/agents/`
92
92
 
93
93
  5. **Report Generated Agents**
94
94
  ```
95
- Generated sub-agents in .claude/agents/:
95
+ Generated sub-agents in {globalPath}/agents/:
96
96
  - prjct-workflow.md (workflow)
97
97
  - prjct-planner.md (workflow)
98
98
  - prjct-shipper.md (workflow)
@@ -102,6 +102,8 @@ Each generated agent should include:
102
102
 
103
103
  ## Critical Rules
104
104
 
105
+ - **NEVER write agents to local project directories** (`.claude/`, `.prjct/`)
106
+ - **ALWAYS write agents to `{globalPath}/agents/`** (global storage)
105
107
  - NEVER hardcode technology detection in TypeScript
106
108
  - ALWAYS read and analyze repo-summary.md
107
109
  - ADAPT templates to project context