prjct-cli 2.23.8 → 2.23.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prjct-cli",
3
- "version": "2.23.8",
3
+ "version": "2.23.12",
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": {
@@ -98,6 +98,7 @@
98
98
  "bin/prjct",
99
99
  "dist/",
100
100
  "templates/",
101
+ "scripts/ensure-native-deps.js",
101
102
  "scripts/postinstall.js",
102
103
  "scripts/ensure-bun.sh",
103
104
  "scripts/install.sh",
@@ -107,6 +108,7 @@
107
108
  ],
108
109
  "prepublishOnly": "node scripts/build.js",
109
110
  "trustedDependencies": [
111
+ "better-sqlite3",
110
112
  "chalk"
111
113
  ]
112
114
  }
@@ -0,0 +1,64 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { execFileSync } = require('node:child_process')
4
+ const path = require('node:path')
5
+
6
+ const ROOT = path.resolve(__dirname, '..')
7
+
8
+ function npmCommand() {
9
+ return process.platform === 'win32' ? 'npm.cmd' : 'npm'
10
+ }
11
+
12
+ function hasBetterSqliteBinding() {
13
+ try {
14
+ const Database = require('better-sqlite3')
15
+ new Database(':memory:').close()
16
+ return true
17
+ } catch (error) {
18
+ const message = error instanceof Error ? error.message : String(error)
19
+ if (
20
+ message.includes('Could not locate the bindings file') ||
21
+ message.includes('better_sqlite3.node')
22
+ ) {
23
+ return false
24
+ }
25
+ throw error
26
+ }
27
+ }
28
+
29
+ function ensureNativeDependencies(options = {}) {
30
+ if (process.env.PRJCT_SKIP_NATIVE_REBUILD === '1') {
31
+ return { rebuilt: false, skipped: true }
32
+ }
33
+ if (hasBetterSqliteBinding()) {
34
+ return { rebuilt: false, skipped: false }
35
+ }
36
+
37
+ const stdio = options.stdio || 'inherit'
38
+ execFileSync(npmCommand(), ['rebuild', 'better-sqlite3', '--foreground-scripts'], {
39
+ cwd: ROOT,
40
+ stdio,
41
+ timeout: 120000,
42
+ })
43
+
44
+ if (!hasBetterSqliteBinding()) {
45
+ throw new Error('better-sqlite3 native binding is still unavailable after rebuild')
46
+ }
47
+
48
+ return { rebuilt: true, skipped: false }
49
+ }
50
+
51
+ if (require.main === module) {
52
+ try {
53
+ ensureNativeDependencies()
54
+ } catch (error) {
55
+ const message = error instanceof Error ? error.message : String(error)
56
+ console.error(`prjct native dependency install failed: ${message}`)
57
+ process.exit(1)
58
+ }
59
+ }
60
+
61
+ module.exports = {
62
+ ensureNativeDependencies,
63
+ hasBetterSqliteBinding,
64
+ }
@@ -6,11 +6,13 @@
6
6
  * NOTE: postinstall often doesn't run (npm quirks, --ignore-scripts, etc.)
7
7
  * The reliable setup path is `prjct start` which users run manually.
8
8
  *
9
- * This script just shows a helpful message.
9
+ * This script may repair required native dependencies, but it must never
10
+ * install optional tools, mutate shell config, or configure integrations.
10
11
  */
11
12
 
12
13
  const fs = require('node:fs')
13
14
  const path = require('node:path')
15
+ const { ensureNativeDependencies } = require('./ensure-native-deps')
14
16
 
15
17
  const ROOT = path.resolve(__dirname, '..')
16
18
  const pkg = JSON.parse(fs.readFileSync(path.join(ROOT, 'package.json'), 'utf-8'))
@@ -23,6 +25,19 @@ const DIM = '\x1b[2m'
23
25
  const BOLD = '\x1b[1m'
24
26
  const RESET = '\x1b[0m'
25
27
 
28
+ try {
29
+ const result = ensureNativeDependencies({ stdio: 'inherit' })
30
+ if (result.rebuilt) {
31
+ console.log(` ${DIM}Built required SQLite native dependency.${RESET}`)
32
+ }
33
+ } catch (error) {
34
+ const message = error instanceof Error ? error.message : String(error)
35
+ console.error(`\n${BOLD}prjct native dependency repair warning:${RESET} ${message}`)
36
+ console.error(
37
+ `${DIM}Install will continue. prjct will retry this repair before starting the daemon.${RESET}`
38
+ )
39
+ }
40
+
26
41
  console.log(`
27
42
  ${CYAN}${BOLD} prjct${RESET} ${DIM}v${VERSION}${RESET}
28
43
 
@@ -32,14 +47,3 @@ ${CYAN}${BOLD} prjct${RESET} ${DIM}v${VERSION}${RESET}
32
47
 
33
48
  ${DIM}Supports: Claude Code, Gemini CLI, or both${RESET}
34
49
  `)
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
- }
@@ -69,3 +69,15 @@ agents/ # domain specialists
69
69
  ## Crew mode (opt-in)
70
70
 
71
71
  Projects that want a multi-agent workflow can run `prjct crew install` to drop a leader/implementer/reviewer trio into `.claude/agents/`, a project `CHECKPOINTS.md`, and a CLAUDE.md snippet that locks the main session into orchestrator role. Templates live in `templates/crew/`. Uninstall with `prjct crew uninstall`. Strictly opt-in — not invoked by `init`/`sync`.
72
+
73
+ ### Crew roster
74
+
75
+ Each member has a stable name + color so you can identify who is acting at a glance, in any LLM. Source of truth: `templates/crew/registry.json`.
76
+
77
+ | Name | Role | Color |
78
+ |---|---|---|
79
+ | Leader | Orchestrator | blue |
80
+ | Implementer | Worker | purple |
81
+ | Reviewer | Strict auditor | pink |
82
+
83
+ Crew SUBAGENT DISPATCH is Claude Code only (only Claude Code currently exposes an Agent tool that can spawn typed subagents). In Codex / Gemini / Cursor / Windsurf the roster above is informational — the same session plays whichever role the prompt names; identify it explicitly when you reply ("acting as Implementer").
@@ -15,6 +15,8 @@ Flow: idea → roadmap → next → task → done → ship → next (cycle until
15
15
 
16
16
  Rules:
17
17
  - prjct runs → LLM generates relevant data → prjct stores it → LLM requests it from prjct → LLM uses it
18
+ - prjct remembers and shows the path; the agent decides how to execute with its own tools
19
+ - Treat prjct output as signals, not a prescriptive harness
18
20
  - All commits include footer: `Generated with [p/](https://www.prjct.app/)`
19
21
  - All storage through `prjct` CLI (SQLite internally)
20
22
  - Start code tasks with `p. task` and follow Context Contract from CLI output
@@ -1,8 +1,9 @@
1
1
  ---
2
2
  name: implementer
3
- description: Worker. Implements exactly ONE prjct task end-to-end. Writes code, writes tests, self-verifies. Never approves its own work.
3
+ description: "Implementer (Worker, purple). Implements exactly ONE prjct task end-to-end. Writes code, writes tests, self-verifies. Never approves its own work."
4
4
  tools: Read, Write, Edit, Glob, Grep, Bash
5
5
  model: opus
6
+ color: purple
6
7
  ---
7
8
 
8
9
  # Implementer
@@ -1,8 +1,9 @@
1
1
  ---
2
2
  name: leader
3
- description: Orchestrator. Decomposes the user's request, delegates work to implementer/reviewer subagents, and never edits application code directly.
3
+ description: "Leader (Orchestrator, blue). Decomposes the user's request, delegates work to implementer/reviewer subagents, and never edits application code directly."
4
4
  tools: Read, Glob, Grep, Bash, Agent
5
5
  model: haiku
6
+ color: blue
6
7
  ---
7
8
 
8
9
  # Leader (Orchestrator)
@@ -1,8 +1,9 @@
1
1
  ---
2
2
  name: reviewer
3
- description: Strict reviewer. Approves or rejects an implementer's work against the project checkpoints and conventions. Never edits code.
3
+ description: "Reviewer (Strict auditor, pink). Approves or rejects an implementer's work against the project checkpoints and conventions. Never edits code."
4
4
  tools: Read, Glob, Grep, Bash
5
5
  model: sonnet
6
+ color: pink
6
7
  ---
7
8
 
8
9
  # Reviewer
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "./registry.schema.json",
3
+ "version": 1,
4
+ "crew": [
5
+ {
6
+ "id": "leader",
7
+ "name": "Leader",
8
+ "role": "Orchestrator",
9
+ "color": "blue",
10
+ "summary": "Decomposes the user's request and delegates to implementer/reviewer subagents. Never edits application code."
11
+ },
12
+ {
13
+ "id": "implementer",
14
+ "name": "Implementer",
15
+ "role": "Worker",
16
+ "color": "purple",
17
+ "summary": "Takes one prjct task from active to ready-for-review. Writes code, writes tests, self-verifies. Never approves its own work."
18
+ },
19
+ {
20
+ "id": "reviewer",
21
+ "name": "Reviewer",
22
+ "role": "Strict auditor",
23
+ "color": "pink",
24
+ "summary": "Approves or rejects work against project checkpoints and conventions. Never edits code."
25
+ }
26
+ ]
27
+ }
@@ -8,9 +8,13 @@ Flow: idea → roadmap → next → task → done → ship → next (cycle until
8
8
 
9
9
  Data:
10
10
  - prjct runs → LLM generates relevant data → prjct stores it → LLM requests it from prjct → LLM uses it
11
+ - prjct remembers and shows the path; the agent decides how to execute with its own native tools
12
+ - Treat prjct output as signals, not a prescriptive harness
11
13
  - Commit footer: `Generated with [p/](https://www.prjct.app/)`
12
14
  - Path resolution: `.prjct/prjct.config.json` → `~/.prjct-cli/projects/{projectId}`
13
15
  - Storage: `prjct` CLI (SQLite internally)
14
16
 
17
+ Crew (opt-in via `prjct crew install`): Leader (blue) · Implementer (purple) · Reviewer (pink). Subagent dispatch is Claude-Code-only; in Antigravity, identify the role you are playing explicitly.
18
+
15
19
  **Auto-managed by prjct-cli** | https://prjct.app
16
20
  <!-- prjct:end - DO NOT REMOVE THIS MARKER -->
@@ -13,9 +13,13 @@ Flow: idea → roadmap → next → task → done → ship → next (cycle until
13
13
 
14
14
  Data:
15
15
  - prjct runs → LLM generates relevant data → prjct stores it → LLM requests it from prjct → LLM uses it
16
+ - prjct remembers and shows the path; the agent decides how to execute with its own native tools
17
+ - Treat prjct output as signals, not a prescriptive harness
16
18
  - Commit footer: `Generated with [p/](https://www.prjct.app/)`
17
19
  - Path resolution: `.prjct/prjct.config.json` → `~/.prjct-cli/projects/{projectId}`
18
20
  - Storage: `prjct` CLI (SQLite internally)
19
21
 
22
+ Crew (opt-in via `prjct crew install`): Leader (blue) · Implementer (purple) · Reviewer (pink). Subagent dispatch is Claude-Code-only; in Cursor, identify the role you are playing explicitly.
23
+
20
24
  **Auto-managed by prjct-cli** | https://prjct.app
21
25
  <!-- prjct:end - DO NOT REMOVE THIS MARKER -->
@@ -8,9 +8,13 @@ Flow: idea → roadmap → next → task → done → ship → next (cycle until
8
8
 
9
9
  Data:
10
10
  - prjct runs → LLM generates relevant data → prjct stores it → LLM requests it from prjct → LLM uses it
11
+ - prjct remembers and shows the path; the agent decides how to execute with its own native tools
12
+ - Treat prjct output as signals, not a prescriptive harness
11
13
  - Commit footer: `Generated with [p/](https://www.prjct.app/)`
12
14
  - Path resolution: `.prjct/prjct.config.json` → `~/.prjct-cli/projects/{projectId}`
13
15
  - Storage: `prjct` CLI (SQLite internally)
14
16
 
17
+ Crew (opt-in via `prjct crew install`): Leader (blue) · Implementer (purple) · Reviewer (pink). Subagent dispatch is Claude-Code-only; in Gemini, identify the role you are playing explicitly.
18
+
15
19
  **Auto-managed by prjct-cli** | https://prjct.app
16
20
  <!-- prjct:end - DO NOT REMOVE THIS MARKER -->
@@ -13,9 +13,13 @@ Flow: idea → roadmap → next → task → done → ship → next (cycle until
13
13
 
14
14
  Data:
15
15
  - prjct runs → LLM generates relevant data → prjct stores it → LLM requests it from prjct → LLM uses it
16
+ - prjct remembers and shows the path; the agent decides how to execute with its own native tools
17
+ - Treat prjct output as signals, not a prescriptive harness
16
18
  - Commit footer: `Generated with [p/](https://www.prjct.app/)`
17
19
  - Path resolution: `.prjct/prjct.config.json` → `~/.prjct-cli/projects/{projectId}`
18
20
  - Storage: `prjct` CLI (SQLite internally)
19
21
 
22
+ Crew (opt-in via `prjct crew install`): Leader (blue) · Implementer (purple) · Reviewer (pink). Subagent dispatch is Claude-Code-only; in Windsurf, identify the role you are playing explicitly.
23
+
20
24
  **Auto-managed by prjct-cli** | https://prjct.app
21
25
  <!-- prjct:end - DO NOT REMOVE THIS MARKER -->
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Project-memory + spec-driven runtime. TRIAGE FIRST, every turn — is this simple or complex? MOST work is SIMPLE (≈1 file, known cause, bug/config/copy/doc, reversible, or the user says fix/hoy/rápido/directo): go DIRECT — `prjct task` → implement → `qa`/`review` → `ship`. NO spec, NO audit-spec, NO reviewer subagents. Spec is the EXCEPTION, ONLY for genuinely complex / high-stakes work (multi-file + new behavior, ambiguous scope, irreversible, or the user frames goals/acceptance/risks): then `spec` → `audit-spec` → `task --spec` → `ship`. Over-routing simple work through spec+reviewers is THE failure mode (burns time/tokens, zero protection on a one-file fix) — when unsure prefer DIRECT and ask one line; never default to spec. Recognize intent in any language (es/en) and run the verb yourself — never make the user type commands. Routine captures (capture/remember/tag) auto-execute, one-line confirm; destructive verbs (ship, status done) suggest-and-confirm; heavy reviews (audit/review/security/investigate) dispatch parallel subagents ONLY when the diff/scope warrants. Lookup-first: vault before re-reading source."
2
+ description: "Project-memory + spec-driven runtime. prjct remembers and shows the path; the agent decides how to execute with its own tools. TRIAGE FIRST, every turn — is this simple or complex? MOST work is SIMPLE (≈1 file, known cause, bug/config/copy/doc, reversible, or the user says fix/hoy/rápido/directo): go DIRECT — `prjct task` → implement → `qa`/`review` → `ship`. NO spec, NO audit-spec, NO reviewer subagents. Spec is the EXCEPTION, ONLY for genuinely complex / high-stakes work (multi-file + new behavior, ambiguous scope, irreversible, or the user frames goals/acceptance/risks): then `spec` → `audit-spec` → `task --spec` → `ship`. Over-routing simple work through spec+reviewers is THE failure mode (burns time/tokens, zero protection on a one-file fix) — when unsure prefer DIRECT and ask one line; never default to spec. Recognize intent in any language (es/en) and run the verb yourself — never make the user type commands. Routine captures (capture/remember/tag) auto-execute, one-line confirm; destructive verbs (ship, status done) suggest-and-confirm; heavy reviews (audit/review/security/investigate) dispatch parallel subagents ONLY when the diff/scope warrants. Lookup-first: vault before re-reading source."
3
3
  allowed-tools: ["Bash", "Read", "Write", "Edit", "Glob", "Grep", "Task"]
4
4
  user-invocable: true
5
5
  ---
@@ -28,6 +28,13 @@ known gotchas). The verb intent map below applies in both states.
28
28
 
29
29
 
30
30
 
31
+ ### Agent contract
32
+
33
+ - prjct remembers project state and shows the path; it does not own the execution.
34
+ - Treat prjct output as durable signals: active task, memories, workflows, specs, risks, and recent learnings.
35
+ - Claude, GPT, and other agents decide the concrete HOW with their own native tools and judgment.
36
+ - Persist meaningful outcomes back through `prjct remember`, `prjct capture`, `prjct task`, and `prjct ship` so the next interaction starts smarter.
37
+
31
38
  ### Primitives
32
39
 
33
40
  - `prjct spec "<title>"` — frame work BEFORE coding (Goal/Acceptance/Scope/Risks)