prjct-cli 1.46.2 → 1.46.5
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 +25 -1
- package/bin/prjct +11 -0
- package/dist/bin/prjct-core.mjs +368 -336
- package/dist/cli/jira.mjs +4 -4
- package/dist/cli/linear.mjs +8 -8
- package/dist/daemon/entry.mjs +335 -303
- package/dist/templates.json +1 -1
- package/package.json +4 -3
- package/scripts/ensure-bun.sh +44 -0
- package/scripts/postinstall.js +11 -0
- package/templates/commands/done.md +15 -2
- package/templates/commands/task.md +21 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prjct-cli",
|
|
3
|
-
"version": "1.46.
|
|
3
|
+
"version": "1.46.5",
|
|
4
4
|
"description": "Context layer for AI agents. Project context for Claude Code, Gemini CLI, and more.",
|
|
5
5
|
"main": "dist/bin/prjct.mjs",
|
|
6
6
|
"bin": {
|
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
"homepage": "https://prjct.app",
|
|
82
82
|
"packageManager": "bun@1.2.23",
|
|
83
83
|
"engines": {
|
|
84
|
-
"
|
|
85
|
-
"
|
|
84
|
+
"bun": ">=1.0.0",
|
|
85
|
+
"node": ">=18.0.0"
|
|
86
86
|
},
|
|
87
87
|
"files": [
|
|
88
88
|
"assets/",
|
|
@@ -90,6 +90,7 @@
|
|
|
90
90
|
"dist/",
|
|
91
91
|
"templates/",
|
|
92
92
|
"scripts/postinstall.js",
|
|
93
|
+
"scripts/ensure-bun.sh",
|
|
93
94
|
"scripts/install.sh",
|
|
94
95
|
"LICENSE",
|
|
95
96
|
"README.md",
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Auto-install Bun if not present (best-effort, never fails)
|
|
3
|
+
#
|
|
4
|
+
# Used by:
|
|
5
|
+
# - scripts/postinstall.js (npm install)
|
|
6
|
+
# - bin/prjct (first CLI invocation)
|
|
7
|
+
#
|
|
8
|
+
# NEVER exits with error — graceful fallback to Node.js
|
|
9
|
+
|
|
10
|
+
# Already installed? Done.
|
|
11
|
+
if command -v bun >/dev/null 2>&1; then
|
|
12
|
+
exit 0
|
|
13
|
+
fi
|
|
14
|
+
|
|
15
|
+
# Also check ~/.bun/bin (may not be in PATH yet)
|
|
16
|
+
if [ -x "${BUN_INSTALL:-$HOME/.bun}/bin/bun" ]; then
|
|
17
|
+
exit 0
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
# Only attempt on supported platforms
|
|
21
|
+
case "$(uname -s)" in
|
|
22
|
+
Darwin|Linux) ;;
|
|
23
|
+
*)
|
|
24
|
+
echo " Bun auto-install not supported on $(uname -s). Using Node.js."
|
|
25
|
+
exit 0
|
|
26
|
+
;;
|
|
27
|
+
esac
|
|
28
|
+
|
|
29
|
+
echo " Installing Bun for optimal performance..."
|
|
30
|
+
|
|
31
|
+
# Official Bun installer (non-interactive)
|
|
32
|
+
if curl -fsSL https://bun.sh/install | bash >/dev/null 2>&1; then
|
|
33
|
+
# Source the new PATH
|
|
34
|
+
export BUN_INSTALL="${BUN_INSTALL:-$HOME/.bun}"
|
|
35
|
+
export PATH="$BUN_INSTALL/bin:$PATH"
|
|
36
|
+
|
|
37
|
+
if command -v bun >/dev/null 2>&1; then
|
|
38
|
+
echo " ✓ Bun $(bun --version) installed"
|
|
39
|
+
exit 0
|
|
40
|
+
fi
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
echo " Bun auto-install skipped. Using Node.js (still works fine)."
|
|
44
|
+
exit 0
|
package/scripts/postinstall.js
CHANGED
|
@@ -32,3 +32,14 @@ ${CYAN}${BOLD} prjct${RESET} ${DIM}v${VERSION}${RESET}
|
|
|
32
32
|
|
|
33
33
|
${DIM}Supports: Claude Code, Gemini CLI, or both${RESET}
|
|
34
34
|
`)
|
|
35
|
+
|
|
36
|
+
// Auto-install Bun for optimal performance (best-effort)
|
|
37
|
+
try {
|
|
38
|
+
const { execSync } = require('node:child_process')
|
|
39
|
+
const ensureBun = path.join(__dirname, 'ensure-bun.sh')
|
|
40
|
+
if (fs.existsSync(ensureBun)) {
|
|
41
|
+
execSync(`sh "${ensureBun}"`, { stdio: 'inherit', timeout: 30000 })
|
|
42
|
+
}
|
|
43
|
+
} catch (_err) {
|
|
44
|
+
console.log(` ${DIM}Bun not installed — using Node.js (slower)${RESET}`)
|
|
45
|
+
}
|
|
@@ -14,10 +14,23 @@ If CLI output is JSON with `options`, present the options to the user and execut
|
|
|
14
14
|
- Review files changed: `git diff --name-only HEAD`
|
|
15
15
|
- Ensure work is complete and tested
|
|
16
16
|
|
|
17
|
-
## Step 3:
|
|
17
|
+
## Step 3: Pattern compliance check
|
|
18
|
+
|
|
19
|
+
If a Pattern Commitment table was created during the "Pattern commitment" step of the task workflow, review each committed pattern against the actual changes:
|
|
20
|
+
|
|
21
|
+
| Pattern | Status | Evidence |
|
|
22
|
+
|---------|--------|----------|
|
|
23
|
+
| (name) | FOLLOWED | `path/file.ts:line` — used correct abstraction |
|
|
24
|
+
| (name) | VIOLATED | reason — e.g., needed `use client` for interactivity |
|
|
25
|
+
|
|
26
|
+
Report any VIOLATED pattern with a clear reason. The user decides whether to accept the violation.
|
|
27
|
+
|
|
28
|
+
If no commitment table exists (e.g., project not synced, or patterns were empty), skip this step.
|
|
29
|
+
|
|
30
|
+
## Step 4: Handoff context
|
|
18
31
|
Summarize what was done and what the next subtask needs to know.
|
|
19
32
|
|
|
20
|
-
## Step
|
|
33
|
+
## Step 5: Follow CLI next steps → Ship
|
|
21
34
|
After completing, you MUST ask:
|
|
22
35
|
ASK: "Subtask done. Ready to ship or continue to next subtask?"
|
|
23
36
|
- Ship now → execute `p. ship` workflow (load and follow `~/.claude/commands/p/ship.md`)
|
|
@@ -19,24 +19,41 @@ If CLI output is JSON with `options`, present the options to the user and execut
|
|
|
19
19
|
- If the task is ambiguous, ASK the user to clarify
|
|
20
20
|
- Explore beyond suggested files if needed
|
|
21
21
|
|
|
22
|
-
## Step 4:
|
|
22
|
+
## Step 4: Pattern commitment (MANDATORY — do not skip)
|
|
23
|
+
|
|
24
|
+
Before writing ANY code, complete this checklist:
|
|
25
|
+
|
|
26
|
+
1. Read **Locked Decisions (NON-NEGOTIABLE)** from the Context Contract output. These are hard constraints — do not deviate.
|
|
27
|
+
2. Read **Pattern Briefing** — each pattern lists a VIOLATION line showing what NOT to do.
|
|
28
|
+
3. Read **Task Patterns (MUST follow)** — for each one, state HOW you will apply it to this specific task.
|
|
29
|
+
|
|
30
|
+
Output a commitment table:
|
|
31
|
+
|
|
32
|
+
| Pattern | Implementation plan for this task |
|
|
33
|
+
|---------|----------------------------------|
|
|
34
|
+
| (name from Task Patterns) | (concrete: which files, which types, which components) |
|
|
35
|
+
|
|
36
|
+
If no patterns were provided in the CLI output (e.g., project not yet synced), skip this step.
|
|
37
|
+
If the user corrects a commitment, update the table before proceeding.
|
|
38
|
+
|
|
39
|
+
## Step 5: Plan the approach
|
|
23
40
|
- For non-trivial changes, propose 2-3 approaches
|
|
24
41
|
- Consider existing patterns in the codebase
|
|
25
42
|
- If CLI output mentions domain agents, read them for project patterns
|
|
26
43
|
- Summarize anti-patterns from the CLI output before editing any file
|
|
27
44
|
|
|
28
|
-
## Step
|
|
45
|
+
## Step 6: Execute
|
|
29
46
|
- Create feature branch if on main: `git checkout -b {type}/{slug}`
|
|
30
47
|
- Work through subtasks in order
|
|
31
48
|
- When done with a subtask: `prjct done --md`
|
|
32
49
|
- Every git commit MUST include footer: `Generated with [p/](https://www.prjct.app/)`
|
|
33
50
|
- If a change may violate a high-severity anti-pattern, ask for confirmation and propose a safer alternative first
|
|
34
51
|
|
|
35
|
-
## Step
|
|
52
|
+
## Step 7: Ship (MANDATORY)
|
|
36
53
|
When all work is complete, you MUST execute the ship workflow:
|
|
37
54
|
ASK: "Work complete. Ready to ship?" Ship now / Continue working / Pause
|
|
38
55
|
- If Ship now: execute `p. ship` workflow (load and follow `~/.claude/commands/p/ship.md`)
|
|
39
|
-
- If Continue working: stay in Step
|
|
56
|
+
- If Continue working: stay in Step 6
|
|
40
57
|
- If Pause: execute `p. pause`
|
|
41
58
|
|
|
42
59
|
NEVER end a task without asking about shipping. This is non-negotiable.
|