prjct-cli 2.39.0 → 2.41.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prjct-cli",
3
- "version": "2.39.0",
3
+ "version": "2.41.0",
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": {
@@ -18,3 +18,4 @@ Rules:
18
18
  - All commits include footer: `Generated with [p/](https://www.prjct.app/)`
19
19
  - All storage through `prjct` CLI (SQLite internally)
20
20
  - Start code tasks with `p. task` and follow Context Contract from CLI output
21
+ - Worktree hygiene: if working in a git worktree, remove it AFTER its PR merges — `git worktree remove` from the main worktree; never with uncommitted/unpushed work, never `--force`
@@ -10,6 +10,7 @@ Run `prjct <command> --md` and follow its output. Pull context on demand; never
10
10
  - Flow: `task` → work → `done` → `ship`
11
11
  - Memory: `prjct remember <decision|gotcha|learning|fact> "<text>"`, `prjct context memory <topic>` (recall), `prjct guard <file>` (preventive memory before editing)
12
12
  - Capture stray thoughts: `prjct capture "<text>"`
13
+ - Worktree hygiene: if working in a git worktree, remove it AFTER its PR merges — `git worktree remove` from the main worktree; never with uncommitted/unpushed work, never `--force`.
13
14
  - Run `prjct --help` for the full command list; prefer the prjct MCP tools (`prjct_*`) when available.
14
15
 
15
16
  Commit footer: `Generated with [p/](https://www.prjct.app/)`
@@ -13,6 +13,7 @@ Data:
13
13
  - Commit footer: `Generated with [p/](https://www.prjct.app/)`
14
14
  - Path resolution: `.prjct/prjct.config.json` → `~/.prjct-cli/projects/{projectId}`
15
15
  - Storage: `prjct` CLI (SQLite internally)
16
+ - Worktree hygiene: if working in a git worktree, remove it AFTER its PR merges — `git worktree remove` from the main worktree; never with uncommitted/unpushed work, never `--force`
16
17
 
17
18
  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
19
 
@@ -18,6 +18,7 @@ Data:
18
18
  - Commit footer: `Generated with [p/](https://www.prjct.app/)`
19
19
  - Path resolution: `.prjct/prjct.config.json` → `~/.prjct-cli/projects/{projectId}`
20
20
  - Storage: `prjct` CLI (SQLite internally)
21
+ - Worktree hygiene: if working in a git worktree, remove it AFTER its PR merges — `git worktree remove` from the main worktree; never with uncommitted/unpushed work, never `--force`
21
22
 
22
23
  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
24
 
@@ -13,6 +13,7 @@ Data:
13
13
  - Commit footer: `Generated with [p/](https://www.prjct.app/)`
14
14
  - Path resolution: `.prjct/prjct.config.json` → `~/.prjct-cli/projects/{projectId}`
15
15
  - Storage: `prjct` CLI (SQLite internally)
16
+ - Worktree hygiene: if working in a git worktree, remove it AFTER its PR merges — `git worktree remove` from the main worktree; never with uncommitted/unpushed work, never `--force`
16
17
 
17
18
  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
19
 
@@ -18,6 +18,7 @@ Data:
18
18
  - Commit footer: `Generated with [p/](https://www.prjct.app/)`
19
19
  - Path resolution: `.prjct/prjct.config.json` → `~/.prjct-cli/projects/{projectId}`
20
20
  - Storage: `prjct` CLI (SQLite internally)
21
+ - Worktree hygiene: if working in a git worktree, remove it AFTER its PR merges — `git worktree remove` from the main worktree; never with uncommitted/unpushed work, never `--force`
21
22
 
22
23
  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
24
 
@@ -40,7 +40,8 @@ known gotchas). The verb intent map below applies in both states.
40
40
  - `prjct audit-spec <id>` — dispatch parallel strategic/architecture/design review
41
41
  - `prjct capture "<anything>"` — inbox dump (zero ceremony)
42
42
  - `prjct remember <type> "<content>" [--tags]` — typed memory entry
43
- - `prjct context memory [topic]` — recall with optional keyword filter
43
+ - `prjct search "<query>"` — recall project memory (BM25 + semantic + recall); the verb to reach for when you need prior knowledge
44
+ - `prjct context memory [topic]` — same blended retrieval as `search`, plus `learnings`/`wiki` subtools
44
45
  - `prjct guard <file>` — preventive memory recorded against a file, before you edit it
45
46
  - `prjct workflow list` / `prjct workflow run <name>` — registered workflows
46
47
  - `prjct seed list` — active packs (memory types + workflow slots)
@@ -53,18 +54,15 @@ Base memory types: `fact · decision · learning · gotcha · pattern · anti-pa
53
54
  - `.prjct/wiki/captured/` — drop notes with frontmatter, run `prjct context wiki sync` to ingest
54
55
  - `.prjct/prjct.config.json` — persona + active packs
55
56
 
56
- ## TRIAGE FIRSTthe gate before ANY verb
57
+ ## Act: default DIRECT escalation is the rare exception
57
58
 
58
- Before any verb, one beat: **is this simple or complex?** Runs EVERY turn. Skipping it (defaulting to spec) is the single worst failure modeit burns time + tokens for ZERO protection on routine work. Most work is SIMPLE.
59
+ **The first move on almost every turn is to just do the work DIRECTLY.** A fix, a one-file change, a capture, a question, anything the user calls "fix"/"hoy"/"rápido"/"directo": `prjct task` → implement it yourself `ship`. **NO spec, NO audit-spec, NO subagents, NO fan-out.** This is the common case and the safe default when unsure, this is what you pick. Ask at most ONE line; never escalate just to be safe.
59
60
 
60
- - **SIMPLE go DIRECT (the default, the common case):** ≈1 file, known root cause, bug/config/copy/doc, reversible, OR the user says "fix"/"hoy"/"rápido"/"directo". `prjct task` implement `qa`/`review` `ship`. **NO spec. NO audit-spec. NO reviewer subagents.** If even slightly unsure, this is the safe defaultask ONE line, do not escalate.
61
- - **COMPLEX → the EXCEPTION (rare):** ONLY multi-file + new behavior AND ambiguous scope AND real/irreversible stakes, OR the user explicitly frames goals/acceptance/risks. Then, and only then, the pipeline:
61
+ Escalate to the spec pipeline ONLY when the test is unambiguous: multi-file + new behavior AND ambiguous scope AND real/irreversible stakes (or the user explicitly frames goals/acceptance/risks). Then, and only then: `spec ─→ audit-spec ─→ task --spec <id> ─→ implement ─→ ship ─→ remember learning`. Forcing simple work through this pipeline is the #1 perf-killerit burns tokens for zero protection.
62
62
 
63
- ```
64
- spec ─→ audit-spec ─→ task (--spec <id>) ─→ implement ─→ ship (acceptance gate) ─→ remember learning
65
- ```
63
+ **If you ever dispatch a subagent (Agent tool), set `model:` explicitly — never let it inherit yours.** Only the agent that WRITES code gets `model: "opus"`. Reviewing/judging (`review`, `security`, `investigate`, audit-spec reviewers) → `model: "sonnet"`. Pure routing/orchestration → `model: "haiku"`. A non-implementer left on the parent's max model is exactly why a task crawls and burns tokens. Not optional.
66
64
 
67
- Forcing SIMPLE work (a fix, a one-file change, anything "hoy"/"rápido") through spec + audit-spec + parallel reviewers is the perf-killer. Default to DIRECT; reach for spec only when the complexity test is unambiguously met. The spec pipeline stations are detailed in `workflows.md`.
65
+ Heavy quality workflows (`review`, `qa`, `security`, `investigate`, `audit`, `audit-spec`), the parallel-implementer fan-out rules, decision-briefs, the `prjct prefs` protocol, the spec stations and builder ethos all live in `workflows.md` **read it on demand when (and only when) you actually run one.** Do not preload it; do not reach for the menu on simple work.
68
66
 
69
67
  **CONTENT LANGUAGE — author every stored memory in ENGLISH**, regardless of the conversation language. When you `capture`/`remember`, translate the intent into a clean English entry (the user may speak Spanish; the persisted knowledge is English). LLMs comprehend English better and embeddings stay high-quality in one canonical language — mixed-language content produces cross-language retrieval noise.
70
68
 
@@ -77,6 +75,7 @@ On every turn ask: "what is the user trying to accomplish?" and match to a verb
77
75
  | starting a unit of work — "haceme X", a fix, a change, picking up a queue item (THE DEFAULT, most turns) | `prjct task "<desc>"` (add `--spec <id>` if a spec exists) | 2 |
78
76
  | framing genuinely complex work WITH goals/stakes/acceptance criteria (the exception) | `prjct spec "<title>"` | 2 |
79
77
  | harden / pressure-test an existing spec before any code | `prjct audit-spec <id>` | 2 |
78
+ | need prior project knowledge — "what did we decide about X", "buscá lo de Y", recall before re-reading source | `prjct search "<query>"` | 1 |
80
79
  | an interesting thought to keep, no commitment yet | `prjct capture "<text>" --tags topic:<x>` | 1 |
81
80
  | a non-trivial choice just got resolved (+ its why) | `prjct remember decision "<choice + one-line why>"` | 1 |
82
81
  | an insight / "aha" / new mental model | `prjct remember learning "<insight>"` | 1 |
@@ -85,22 +84,17 @@ On every turn ask: "what is the user trying to accomplish?" and match to a verb
85
84
  | about to edit a file — check for known traps | `prjct guard <file>` | 1 |
86
85
  | work is done, push it | `prjct ship` | 2 |
87
86
  | lifecycle change on the active task | `prjct status done\|paused\|active` | 2 |
88
- | "find bugs" / "is this safe?" / "why broken?" / "ship-ready?" | `audit` / `review` / `security` / `investigate` (subagents — see `workflows.md`) | 2 |
89
87
  | "is the codebase healthy?" | `prjct health --md` | 1 |
90
88
  | "what did we accomplish?" | `prjct retro 7d --md` | 1 |
91
89
  | pause / resume the working context | `prjct context-save` / `prjct context-restore --md` | 1 |
92
90
 
93
91
  Disambiguators: the "why" separates a `decision` from an `inbox` dump — if you can't state it in one line, capture as inbox. A bare "fix X"/"hoy" is `task`, never `spec`. `audit-spec` requires an existing spec. For `ship`, if the active task has a `linked_spec_id`, ship surfaces the spec's acceptance_criteria as a PR checklist — STOP on any unmet criterion (override: `prjct ship --no-spec-gate`).
94
92
 
95
- ## Routing — auto-execute vs confirm (by blast radius)
93
+ ## Routing — Tier governs auto-run vs confirm (by blast radius)
96
94
 
97
- - **Tier 1 — auto-execute, one-line confirm.** `capture`, `tag`, `remember <type>`, `guard`, `context-save`, `health`, `retro`, `prefs check/list`. Additive or read-only: run IMMEDIATELY and emit one confirmation line (`✓ saved as decision: use Bun runtime (faster cold start)`). Do NOT ask "want me to save that?" — just save it; the user corrects afterward (cheap, reversible). Pausing for permission on routine captures is the failure mode that makes prjct useless.
98
- - **Tier 2 — suggest-and-confirm, ONE line.** `task`, `spec`, `audit-spec`, `ship`, `status done|paused`, `audit`/`review`/`security`/`investigate`, `prefs set`. State intent + blast radius in one line ("I'll run `prjct ship` — bumps version, commits the staged files, opens PR. Ok?") and wait for green light (yes/dale/confirma/silence-after-a-beat). Never run `ship` without surfacing the plan first — it is un-doable without a force-push.
99
- - **Tier 3 — decision-brief.** Hard forks where a wrong call costs >5 min to undo. Run `prjct prefs check <questionId>` first (the user may have said "stop asking me this"), then use the decision-brief format. Both are specified in `workflows.md`.
100
-
101
- ## Deep methodology — pull on demand (do not preload)
102
-
103
- When you actually run a heavy workflow (`review`, `qa`, `security`, `investigate`, `audit`, `audit-spec`) — or need the subagent-dispatch model policy, the parallel implementer fan-out rules, the decision-brief format, the `prjct prefs` protocol, the spec-pipeline stations, or the builder ethos — **read `workflows.md` in this skill directory first.** It is kept out of this file on purpose so it does not sit in your context every turn; pull it only when the task calls for it. This is the same pull-not-push rule the whole runtime follows.
95
+ - **Tier 1 — auto-execute, one-line confirm.** `search`, `capture`, `tag`, `remember`, `guard`, `context-save`, `health`, `retro`, `prefs check/list`. Additive/read-only: run IMMEDIATELY, emit one line (`✓ saved as decision: …`). Do not ask "want me to save that?" — just save it; the user corrects afterward. Pausing for permission on routine captures is what makes prjct useless.
96
+ - **Tier 2 — suggest-and-confirm, ONE line.** `task`, `spec`, `audit-spec`, `ship`, `status done|paused`, `prefs set`. State intent + blast radius in one line and wait for a green light (yes/dale/confirma/silence). Never run `ship` without surfacing the plan first — it is un-doable without a force-push.
97
+ - **Tier 3 — decision-brief** (hard forks costing >5 min to undo): `prjct prefs check <id>` first, then the decision-brief format. Both detailed in `workflows.md`.
104
98
 
105
99
  ## Gotchas
106
100
 
@@ -109,4 +103,5 @@ When you actually run a heavy workflow (`review`, `qa`, `security`, `investigate
109
103
  - Secret-like content is refused by `remember` and `capture` unless `--force`.
110
104
  - Bare `prjct "<text>"` routes to `capture` (inbox), not `task`. Use `prjct task` explicitly for work that needs a branch/worktree.
111
105
  - Hooks in `~/.claude/settings.json` already inject persona + topical memory on SessionStart / UserPromptSubmit — you rarely need to call prjct by hand at session start.
106
+ - **Worktree hygiene.** If you are working inside a git worktree, clean it up so they don't pile up on the local machine: AFTER the branch's PR is *merged* (not at session end — an open PR keeps its worktree), `git worktree remove <path>` + `git worktree prune`, run from the MAIN worktree (git won't remove the worktree you're standing in). NEVER remove a worktree with uncommitted or unpushed work, and never `--force` over a dirty tree (it silently discards work).
112
107