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.
- package/CHANGELOG.md +82 -0
- package/CLAUDE.md +74 -211
- package/core/agentic/prompt-builder.ts +3 -7
- package/core/command-registry/optional-commands.ts +0 -20
- package/core/infrastructure/command-installer/command-installer.ts +8 -1
- package/core/infrastructure/command-installer/global-config.ts +31 -1
- package/core/infrastructure/command-installer/index.ts +1 -1
- package/core/infrastructure/setup.ts +3 -0
- package/package.json +3 -17
- package/templates/agentic/agents/uxui.md +210 -0
- package/templates/commands/bug.md +219 -41
- package/templates/commands/done.md +57 -258
- package/templates/commands/feature.md +368 -80
- package/templates/commands/now.md +72 -277
- package/templates/commands/ship.md +167 -246
- package/templates/commands/sync.md +62 -3
- package/templates/commands/test.md +160 -20
- package/templates/global/CLAUDE.md +40 -205
- package/templates/global/docs/agents.md +88 -0
- package/templates/global/docs/architecture.md +103 -0
- package/templates/global/docs/commands.md +98 -0
- package/templates/global/docs/validation.md +95 -0
- package/bin/dev.js +0 -216
- package/bin/serve.js +0 -361
- package/packages/web/README.md +0 -36
- package/packages/web/app/api/claude/sessions/route.ts +0 -44
- package/packages/web/app/api/claude/status/route.ts +0 -34
- package/packages/web/app/api/projects/[id]/icon/route.ts +0 -33
- package/packages/web/app/api/projects/[id]/momentum/route.ts +0 -257
- package/packages/web/app/api/projects/[id]/route.ts +0 -29
- package/packages/web/app/api/projects/[id]/stats/route.ts +0 -41
- package/packages/web/app/api/projects/[id]/status/route.ts +0 -21
- package/packages/web/app/api/projects/route.ts +0 -16
- package/packages/web/app/api/sessions/current/route.ts +0 -132
- package/packages/web/app/api/sessions/history/route.ts +0 -204
- package/packages/web/app/error.tsx +0 -34
- package/packages/web/app/favicon.ico +0 -0
- package/packages/web/app/globals.css +0 -198
- package/packages/web/app/layout.tsx +0 -53
- package/packages/web/app/loading.tsx +0 -7
- package/packages/web/app/not-found.tsx +0 -25
- package/packages/web/app/page.tsx +0 -12
- package/packages/web/app/project/[id]/code/layout.tsx +0 -18
- package/packages/web/app/project/[id]/code/page.tsx +0 -408
- package/packages/web/app/project/[id]/error.tsx +0 -41
- package/packages/web/app/project/[id]/loading.tsx +0 -9
- package/packages/web/app/project/[id]/not-found.tsx +0 -27
- package/packages/web/app/project/[id]/page.tsx +0 -384
- package/packages/web/app/project/[id]/reports/page.tsx +0 -59
- package/packages/web/app/project/[id]/reports/print/page.tsx +0 -58
- package/packages/web/app/sessions/page.tsx +0 -165
- package/packages/web/app/settings/page.tsx +0 -151
- package/packages/web/components/ActivityTimeline/ActivityTimeline.constants.ts +0 -2
- package/packages/web/components/ActivityTimeline/ActivityTimeline.tsx +0 -49
- package/packages/web/components/ActivityTimeline/ActivityTimeline.types.ts +0 -8
- package/packages/web/components/ActivityTimeline/hooks/index.ts +0 -2
- package/packages/web/components/ActivityTimeline/hooks/useExpandable.ts +0 -9
- package/packages/web/components/ActivityTimeline/hooks/useGroupedEvents.ts +0 -23
- package/packages/web/components/ActivityTimeline/index.ts +0 -2
- package/packages/web/components/AgentsCard/AgentsCard.tsx +0 -93
- package/packages/web/components/AgentsCard/AgentsCard.types.ts +0 -14
- package/packages/web/components/AgentsCard/index.ts +0 -2
- package/packages/web/components/AppSidebar/AppSidebar.tsx +0 -316
- package/packages/web/components/AppSidebar/index.ts +0 -1
- package/packages/web/components/BackLink/BackLink.tsx +0 -18
- package/packages/web/components/BackLink/BackLink.types.ts +0 -5
- package/packages/web/components/BackLink/index.ts +0 -2
- package/packages/web/components/BentoCard/BentoCard.constants.ts +0 -16
- package/packages/web/components/BentoCard/BentoCard.tsx +0 -48
- package/packages/web/components/BentoCard/BentoCard.types.ts +0 -15
- package/packages/web/components/BentoCard/index.ts +0 -2
- package/packages/web/components/BentoCardSkeleton/BentoCardSkeleton.constants.ts +0 -9
- package/packages/web/components/BentoCardSkeleton/BentoCardSkeleton.tsx +0 -18
- package/packages/web/components/BentoCardSkeleton/BentoCardSkeleton.types.ts +0 -5
- package/packages/web/components/BentoCardSkeleton/index.ts +0 -2
- package/packages/web/components/BentoGrid/BentoGrid.tsx +0 -18
- package/packages/web/components/BentoGrid/BentoGrid.types.ts +0 -4
- package/packages/web/components/BentoGrid/index.ts +0 -2
- package/packages/web/components/BlockersCard/BlockersCard.tsx +0 -75
- package/packages/web/components/BlockersCard/BlockersCard.types.ts +0 -12
- package/packages/web/components/BlockersCard/index.ts +0 -2
- package/packages/web/components/CommandBar/CommandBar.tsx +0 -67
- package/packages/web/components/CommandBar/index.ts +0 -1
- package/packages/web/components/CommandButton/CommandButton.tsx +0 -46
- package/packages/web/components/CommandButton/index.ts +0 -1
- package/packages/web/components/ConnectionStatus/ConnectionStatus.tsx +0 -29
- package/packages/web/components/ConnectionStatus/index.ts +0 -1
- package/packages/web/components/DashboardContent/DashboardContent.tsx +0 -284
- package/packages/web/components/DashboardContent/index.ts +0 -1
- package/packages/web/components/DateGroup/DateGroup.tsx +0 -18
- package/packages/web/components/DateGroup/DateGroup.types.ts +0 -6
- package/packages/web/components/DateGroup/DateGroup.utils.ts +0 -11
- package/packages/web/components/DateGroup/index.ts +0 -2
- package/packages/web/components/EmptyState/EmptyState.tsx +0 -76
- package/packages/web/components/EmptyState/EmptyState.types.ts +0 -11
- package/packages/web/components/EmptyState/index.ts +0 -2
- package/packages/web/components/EventRow/EventRow.constants.ts +0 -10
- package/packages/web/components/EventRow/EventRow.tsx +0 -49
- package/packages/web/components/EventRow/EventRow.types.ts +0 -7
- package/packages/web/components/EventRow/EventRow.utils.ts +0 -49
- package/packages/web/components/EventRow/index.ts +0 -2
- package/packages/web/components/ExpandButton/ExpandButton.tsx +0 -18
- package/packages/web/components/ExpandButton/ExpandButton.types.ts +0 -6
- package/packages/web/components/ExpandButton/index.ts +0 -2
- package/packages/web/components/HealthGradientBackground/HealthGradientBackground.tsx +0 -14
- package/packages/web/components/HealthGradientBackground/HealthGradientBackground.types.ts +0 -5
- package/packages/web/components/HealthGradientBackground/HealthGradientBackground.utils.ts +0 -13
- package/packages/web/components/HealthGradientBackground/index.ts +0 -2
- package/packages/web/components/HeroSection/HeroSection.tsx +0 -92
- package/packages/web/components/HeroSection/HeroSection.types.ts +0 -14
- package/packages/web/components/HeroSection/HeroSection.utils.ts +0 -11
- package/packages/web/components/HeroSection/hooks/index.ts +0 -2
- package/packages/web/components/HeroSection/hooks/useCountUp.ts +0 -45
- package/packages/web/components/HeroSection/hooks/useWeeklyActivity.ts +0 -18
- package/packages/web/components/HeroSection/index.ts +0 -2
- package/packages/web/components/IdeasCard/IdeasCard.tsx +0 -115
- package/packages/web/components/IdeasCard/IdeasCard.types.ts +0 -10
- package/packages/web/components/IdeasCard/index.ts +0 -2
- package/packages/web/components/InsightMessage/InsightMessage.tsx +0 -9
- package/packages/web/components/InsightMessage/InsightMessage.types.ts +0 -3
- package/packages/web/components/InsightMessage/index.ts +0 -2
- package/packages/web/components/Logo/Logo.tsx +0 -65
- package/packages/web/components/Logo/index.ts +0 -1
- package/packages/web/components/MarkdownContent/MarkdownContent.tsx +0 -123
- package/packages/web/components/MarkdownContent/index.ts +0 -1
- package/packages/web/components/MasonryGrid/MasonryGrid.tsx +0 -18
- package/packages/web/components/MasonryGrid/index.ts +0 -1
- package/packages/web/components/MomentumWidget/MomentumWidget.tsx +0 -119
- package/packages/web/components/MomentumWidget/MomentumWidget.types.ts +0 -16
- package/packages/web/components/MomentumWidget/index.ts +0 -2
- package/packages/web/components/NowCard/NowCard.tsx +0 -118
- package/packages/web/components/NowCard/NowCard.types.ts +0 -16
- package/packages/web/components/NowCard/index.ts +0 -2
- package/packages/web/components/PageHeader/PageHeader.tsx +0 -24
- package/packages/web/components/PageHeader/index.ts +0 -1
- package/packages/web/components/ProgressRing/ProgressRing.constants.ts +0 -20
- package/packages/web/components/ProgressRing/ProgressRing.tsx +0 -51
- package/packages/web/components/ProgressRing/ProgressRing.types.ts +0 -11
- package/packages/web/components/ProgressRing/index.ts +0 -2
- package/packages/web/components/ProjectAvatar/ProjectAvatar.tsx +0 -54
- package/packages/web/components/ProjectAvatar/index.ts +0 -1
- package/packages/web/components/ProjectColorDot/ProjectColorDot.tsx +0 -37
- package/packages/web/components/ProjectColorDot/index.ts +0 -1
- package/packages/web/components/ProjectSelectorModal/ProjectSelectorModal.tsx +0 -104
- package/packages/web/components/ProjectSelectorModal/index.ts +0 -1
- package/packages/web/components/Providers/Providers.tsx +0 -48
- package/packages/web/components/Providers/index.ts +0 -1
- package/packages/web/components/QueueCard/QueueCard.tsx +0 -125
- package/packages/web/components/QueueCard/QueueCard.types.ts +0 -12
- package/packages/web/components/QueueCard/QueueCard.utils.ts +0 -12
- package/packages/web/components/QueueCard/index.ts +0 -2
- package/packages/web/components/RecoverCard/RecoverCard.tsx +0 -72
- package/packages/web/components/RecoverCard/RecoverCard.types.ts +0 -16
- package/packages/web/components/RecoverCard/index.ts +0 -2
- package/packages/web/components/RoadmapCard/RoadmapCard.tsx +0 -145
- package/packages/web/components/RoadmapCard/RoadmapCard.types.ts +0 -16
- package/packages/web/components/RoadmapCard/index.ts +0 -2
- package/packages/web/components/ShipsCard/ShipsCard.tsx +0 -95
- package/packages/web/components/ShipsCard/ShipsCard.types.ts +0 -14
- package/packages/web/components/ShipsCard/ShipsCard.utils.ts +0 -4
- package/packages/web/components/ShipsCard/index.ts +0 -2
- package/packages/web/components/SparklineChart/SparklineChart.tsx +0 -40
- package/packages/web/components/SparklineChart/SparklineChart.types.ts +0 -6
- package/packages/web/components/SparklineChart/index.ts +0 -2
- package/packages/web/components/StatsMasonry/StatsMasonry.tsx +0 -95
- package/packages/web/components/StatsMasonry/index.ts +0 -1
- package/packages/web/components/StreakCard/StreakCard.constants.ts +0 -2
- package/packages/web/components/StreakCard/StreakCard.tsx +0 -55
- package/packages/web/components/StreakCard/StreakCard.types.ts +0 -4
- package/packages/web/components/StreakCard/index.ts +0 -2
- package/packages/web/components/TasksCounter/TasksCounter.tsx +0 -14
- package/packages/web/components/TasksCounter/TasksCounter.types.ts +0 -3
- package/packages/web/components/TasksCounter/index.ts +0 -2
- package/packages/web/components/TechStackBadges/TechStackBadges.tsx +0 -28
- package/packages/web/components/TechStackBadges/index.ts +0 -1
- package/packages/web/components/TerminalDock/DockToggleTab.tsx +0 -29
- package/packages/web/components/TerminalDock/TerminalDock.tsx +0 -386
- package/packages/web/components/TerminalDock/TerminalDockTab.tsx +0 -130
- package/packages/web/components/TerminalDock/TerminalTabBar.tsx +0 -142
- package/packages/web/components/TerminalDock/index.ts +0 -2
- package/packages/web/components/TerminalTabs/TerminalTab.tsx +0 -95
- package/packages/web/components/TerminalTabs/TerminalTabs.tsx +0 -211
- package/packages/web/components/TerminalTabs/index.ts +0 -1
- package/packages/web/components/VelocityBadge/VelocityBadge.tsx +0 -32
- package/packages/web/components/VelocityBadge/VelocityBadge.types.ts +0 -3
- package/packages/web/components/VelocityBadge/index.ts +0 -2
- package/packages/web/components/VelocityCard/VelocityCard.tsx +0 -73
- package/packages/web/components/VelocityCard/VelocityCard.types.ts +0 -7
- package/packages/web/components/VelocityCard/index.ts +0 -2
- package/packages/web/components/WeeklyReports/PrintableReport.tsx +0 -259
- package/packages/web/components/WeeklyReports/ReportPreviewCard.tsx +0 -187
- package/packages/web/components/WeeklyReports/WeekCalendar.tsx +0 -288
- package/packages/web/components/WeeklyReports/WeeklyReports.tsx +0 -149
- package/packages/web/components/WeeklyReports/index.ts +0 -4
- package/packages/web/components/WeeklySparkline/WeeklySparkline.tsx +0 -25
- package/packages/web/components/WeeklySparkline/WeeklySparkline.types.ts +0 -4
- package/packages/web/components/WeeklySparkline/index.ts +0 -2
- package/packages/web/components/charts/SessionsChart.tsx +0 -175
- package/packages/web/components/ui/alert-dialog.tsx +0 -157
- package/packages/web/components/ui/badge.tsx +0 -46
- package/packages/web/components/ui/button.tsx +0 -60
- package/packages/web/components/ui/card.tsx +0 -92
- package/packages/web/components/ui/chart.tsx +0 -385
- package/packages/web/components/ui/dialog.tsx +0 -143
- package/packages/web/components/ui/drawer.tsx +0 -135
- package/packages/web/components/ui/dropdown-menu.tsx +0 -257
- package/packages/web/components/ui/input.tsx +0 -21
- package/packages/web/components/ui/scroll-area.tsx +0 -58
- package/packages/web/components/ui/select.tsx +0 -187
- package/packages/web/components/ui/sheet.tsx +0 -139
- package/packages/web/components/ui/tabs.tsx +0 -66
- package/packages/web/components/ui/tooltip.tsx +0 -61
- package/packages/web/components.json +0 -22
- package/packages/web/context/GlobalTerminalContext.tsx +0 -538
- package/packages/web/context/TerminalContext.tsx +0 -45
- package/packages/web/context/TerminalTabsContext.tsx +0 -181
- package/packages/web/eslint.config.mjs +0 -18
- package/packages/web/hooks/useClaudeTerminal.ts +0 -425
- package/packages/web/hooks/useProjectStats.ts +0 -93
- package/packages/web/hooks/useProjects.ts +0 -73
- package/packages/web/lib/actions/projects.ts +0 -15
- package/packages/web/lib/commands.ts +0 -81
- package/packages/web/lib/format.ts +0 -23
- package/packages/web/lib/generate-week-report.ts +0 -285
- package/packages/web/lib/parse-prjct-files.ts +0 -1123
- package/packages/web/lib/project-colors.ts +0 -58
- package/packages/web/lib/projects.ts +0 -506
- package/packages/web/lib/pty.ts +0 -101
- package/packages/web/lib/query-config.ts +0 -44
- package/packages/web/lib/services/index.ts +0 -9
- package/packages/web/lib/services/projects.server.ts +0 -66
- package/packages/web/lib/services/stats.server.ts +0 -562
- package/packages/web/lib/unified-loader.ts +0 -396
- package/packages/web/lib/utils.ts +0 -6
- package/packages/web/next-env.d.ts +0 -6
- package/packages/web/next.config.ts +0 -7
- package/packages/web/package.json +0 -57
- package/packages/web/postcss.config.mjs +0 -7
- package/packages/web/public/file.svg +0 -1
- package/packages/web/public/globe.svg +0 -1
- package/packages/web/public/next.svg +0 -1
- package/packages/web/public/vercel.svg +0 -1
- package/packages/web/public/window.svg +0 -1
- package/packages/web/server.ts +0 -312
- package/packages/web/tsconfig.json +0 -34
- 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
|
|
6
|
+
# /p:ship - Ship Feature
|
|
13
7
|
|
|
14
|
-
|
|
8
|
+
Ship completed work with pre-flight checks, code review, and quality gates.
|
|
15
9
|
|
|
10
|
+
## Usage
|
|
16
11
|
```
|
|
17
|
-
|
|
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
|
-
|
|
21
|
-
**Claude Context**: `context/shipped.md` (generated)
|
|
22
|
-
**Backend Sync**: `sync/pending.json` (events)
|
|
18
|
+
## Flow
|
|
23
19
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
|
|
24
|
+
SET: `{globalPath}` = `~/.prjct-cli/projects/{projectId}`
|
|
36
25
|
|
|
37
|
-
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
|
67
|
-
OUTPUT: "
|
|
53
|
+
IF `--blocking` AND (lint failed OR tests failed):
|
|
54
|
+
OUTPUT: "Quality checks failed. Ship blocked."
|
|
68
55
|
STOP
|
|
69
56
|
|
|
70
|
-
|
|
57
|
+
### Step 4: Code Review with Confidence Scoring
|
|
71
58
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
BASH: `
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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
|
-
|
|
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
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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
|
-
|
|
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
|
-
###
|
|
123
|
+
### Step 6: Update CHANGELOG
|
|
124
124
|
BASH: `git log --oneline -20 --pretty=format:"- %s"`
|
|
125
|
-
|
|
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
|
-
|
|
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
|
-
|
|
153
|
-
|
|
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
|
-
|
|
156
|
-
|
|
140
|
+
READ: `{globalPath}/storage/shipped.json` (or create default)
|
|
141
|
+
PREPEND new ship object:
|
|
157
142
|
```json
|
|
158
143
|
{
|
|
159
|
-
"
|
|
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
|
-
"
|
|
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
|
-
|
|
179
|
-
|
|
180
|
-
SET: lastUpdated = {now}
|
|
181
|
-
WRITE: `{shippedStoragePath}`
|
|
154
|
+
Generate context:
|
|
155
|
+
WRITE: `{globalPath}/context/shipped.md`
|
|
182
156
|
|
|
183
|
-
|
|
157
|
+
Queue sync event:
|
|
158
|
+
APPEND to `{globalPath}/sync/pending.json`
|
|
184
159
|
|
|
185
|
-
|
|
160
|
+
Log to memory:
|
|
161
|
+
APPEND to `{globalPath}/memory/events.jsonl`
|
|
186
162
|
|
|
187
|
-
|
|
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: {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
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 |
|
|
284
|
-
|
|
|
285
|
-
|
|
|
286
|
-
|
|
|
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:
|
|
189
|
+
### Example 1: Trivial Change (auto-skip review)
|
|
291
190
|
```
|
|
292
|
-
|
|
191
|
+
/p:ship "fix typo"
|
|
293
192
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
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
|
-
|
|
197
|
+
🚀 Shipped: fix typo
|
|
198
|
+
Version: 1.2.0 → 1.2.1
|
|
301
199
|
```
|
|
302
200
|
|
|
303
|
-
### Example 2:
|
|
201
|
+
### Example 2: Medium Change (with review)
|
|
304
202
|
```
|
|
305
|
-
|
|
203
|
+
/p:ship "add auth"
|
|
306
204
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
642
|
+
├── testing.md # (if test framework detected)
|
|
643
|
+
└── uxui.md # (if ANY frontend UI detected - web or mobile)
|
|
585
644
|
```
|