prjct-cli 3.59.1 → 3.61.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 CHANGED
@@ -2,13 +2,23 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [3.61.0] - 2026-07-14
6
+
7
+ ### Added
8
+ - clean comments readme align
9
+
10
+ ## [3.60.0] - 2026-07-14
11
+
12
+ ### Added
13
+ - Structural code symbol graph (CBM-inspired): symbols, trace, impact/hunks, architecture, dead code, per-project cache, Grep|Glob pre-search, CBM auto-fallback
14
+ - Harness repositioning — user-facing copy: 'AI Agile OS' → 'The agentic harness for AI coding agents'
15
+
5
16
  ## [3.59.1] - 2026-07-14
6
17
 
7
18
  ### Bug Fixes
8
19
 
9
20
  - bench-ab interleaved A/B reps + confirm pass — kill phantom regressions (#567)
10
21
 
11
-
12
22
  ## [3.59.0] - 2026-07-14
13
23
 
14
24
  ### Added
package/README.md CHANGED
@@ -1,9 +1,10 @@
1
1
  # prjct-cli
2
2
 
3
- **AI Agile OS for coding agents.** prjct-cli gives Claude Code, Codex, Gemini,
4
- Cursor, Windsurf, and any agent a project second brain: intent briefs, bounded
5
- RAG context, preventive guardrails, synthesized learning, and performance
6
- signals for each dev+LLM work cycle.
3
+ **The agentic harness for AI coding agents.** Intelligence is rented, the
4
+ harness is owned: prjct-cli gives Claude Code, Codex, Gemini, Cursor,
5
+ OpenCode, and any agent intent briefs, bounded RAG context, preventive
6
+ guardrails, synthesized learning, and performance signals for each dev+LLM
7
+ work cycle.
7
8
 
8
9
  [![npm](https://img.shields.io/npm/v/prjct-cli)](https://www.npmjs.com/package/prjct-cli)
9
10
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)
@@ -105,13 +106,17 @@ After install, **next session in any prjct-cli project**:
105
106
  - **Lookup-first protocol**: Claude queries prjct (`prjct search`, `prjct context memory`, MCP `prjct_*`) BEFORE re-exploring source. Cuts ~10K tokens of exploration per session.
106
107
  - **Auto-capture**: Stop hook scans the assistant transcript and persists durable insights (decisions/learnings/gotchas) tagged for dedup. The next session finds them via recall.
107
108
  - **Pattern detection**: Stop hook detects hot files (>3 changes in 7 days), recurring bugs (gotchas with the same topic), tech-debt growth (TODO/FIXME count rising). All persisted as learnings, surfaced next session.
108
- - **5 quality workflows** activated by natural language ("review this branch", "qa the UI", "security check", "investigate this bug"):
109
+ - **6 quality workflows** activated by natural language ("review this branch", "qa the UI", "security check", "investigate this bug"):
109
110
  - `review` — Production Bug Hunt + Completeness Gate (3 modes)
110
111
  - `qa` — Real Browser, Atomic Fixes, Regression Tests
111
112
  - `security` — OWASP Top 10 + STRIDE, 8/10 confidence gate, concrete exploit per finding
112
113
  - `investigate` — Iron Law (no fix without investigation), max 3 failed hypotheses
113
- - `ship` (endurecido) — Coverage Gate + Auto-Document
114
+ - `ship` (hardened) — Coverage Gate + Auto-Document
115
+ - `audit` — one-shot orchestrator: review + security + investigate combined
114
116
  - **Delivery-geometry advisory** (`prjct review-risk`): reads the committed changeset vs the merge-base and suggests a size tier (trivial/normal/large) + whether to ship direct, as one PR, or split — with the touched top-level dirs as natural split lines. Purely advisory: never gates, never mutates git.
117
+ - **Session ceremonies**: `prjct prime` restores the full work state at session start; `prjct land` closes it — hand-off persisted to SQLite plus memory consolidation via `prjct dream` when its gates open.
118
+ - **Multi-agent work graph**: dependency edges, ready frontier, race-free `prjct claim`, topological `prjct phases` — fan several agents out on one cycle without collisions. `prjct crew` runs the leader / implementers / reviewer flow.
119
+ - **Code symbol graph**: `prjct code symbols|trace|impact|architecture|dead` — structural code intel built by `prjct sync` and injected by hooks alongside Grep results.
115
120
 
116
121
  ## How it works
117
122
 
@@ -176,7 +181,7 @@ Use `prjct agents doctor --fix` inside a prjct project to refresh the portable
176
181
  `AGENTS.md` surface and any repo-local IDE rule adapters prjct manages. The
177
182
  command is idempotent and reports what changed.
178
183
 
179
- ## AI Agile intelligence
184
+ ## Harness intelligence
180
185
 
181
186
  prjct should justify itself with project evidence, not vague claims. These
182
187
  read-only commands show whether dev+LLM work cycles are getting cheaper,
@@ -240,7 +245,7 @@ $ prjct work "add OAuth refresh" --md
240
245
  ```bash
241
246
  # In any git repo
242
247
  prjct sync # register the project (auto on first prjct command)
243
- prjct work "add OAuth refresh" # start an AI Agile work cycle
248
+ prjct work "add OAuth refresh" # start a work cycle
244
249
  prjct remember decision "we chose JWT + refresh rotation"
245
250
  prjct remember context "implemented refresh rotation; model/tokens unknown; tests passed"
246
251
  prjct ship # bump version, commit, push, open PR
@@ -261,7 +266,7 @@ prjct team --enforce # pre-commit hook blocks commits without prjc
261
266
 
262
267
  ```bash
263
268
  p. remember context "call Ana re pricing; no work cycle yet"
264
- p. work "add OAuth refresh" # start an AI Agile work cycle
269
+ p. work "add OAuth refresh" # start a work cycle
265
270
  p. remember decision "we chose JWT + refresh rotation"
266
271
  p. performance 7 # inspect dev+LLM efficiency
267
272
  p. ship # commit, push, open PR
@@ -269,12 +274,12 @@ p. ship # commit, push, open PR
269
274
 
270
275
  Cursor and Windsurf use their installed prjct router files; otherwise run `prjct <command> --md` and follow the output.
271
276
 
272
- ### AI Agile verbs
277
+ ### Harness verbs
273
278
 
274
279
  | Verb | What it does |
275
280
  |---|---|
276
281
  | `prjct intent "<title>"` | Frame objective, constraints, risks, and success signal before high-stakes work. |
277
- | `prjct work ["<intent>"]` | Start or inspect an AI Agile work cycle with context and evidence. |
282
+ | `prjct work ["<intent>"]` | Start or inspect a work cycle with context and evidence. |
278
283
  | `prjct remember <type> "<content>"` | Persist a memory entry (decision, learning, gotcha, …). |
279
284
  | `prjct forget <id>` | Delete a memory entry by id (`prjct forget mem_1234`) — the delete half of `remember`. |
280
285
  | `prjct search "<query>"` | Search project memory — blended BM25 + semantic + recency recall (`prjct search mem_1234` resolves an entry by id). |
@@ -285,10 +290,17 @@ Cursor and Windsurf use their installed prjct router files; otherwise run `prjct
285
290
  | `prjct sync` | Re-index files, git co-change, imports; refresh project analysis. |
286
291
  | `prjct agents doctor` | Show the auditable compatibility matrix for local and project agent runtimes. |
287
292
  | `prjct review-risk` | Advisory change-size + delivery-geometry signal for the branch (read-only; never gates, never splits). |
293
+ | `prjct prime` / `prjct land` | Open / close a session: restore full work state · persist hand-off + trigger memory consolidation. |
294
+ | `prjct dream` | Consolidate memory: orient / gather / consolidate / prune. |
295
+ | `prjct ready` / `claim` / `depend` / `phases` | Multi-agent work graph: ready frontier, race-free claim, dependency edges, topological phases. |
296
+ | `prjct crew` | Multi-subagent crew flow: leader / implementers / reviewer. |
297
+ | `prjct code <sub>` | Symbol-graph queries: `symbols`, `trace`, `impact`, `architecture`, `dead`. |
298
+ | `prjct tdd` / `sdd` / `lean` | Quality gates: test-first, spec-driven development, anti-over-engineering. |
299
+ | `prjct memory export` / `import` | Git-shareable memory bundles for teams without cloud sync. |
288
300
 
289
301
  Compatibility aliases from v2 still execute for existing scripts: `task`,
290
302
  `status`, `tag`, `capture`, `spec`, `audit-spec`, `value`, `memory-doctor`,
291
- `report`, `handoff`, `guardrails`, `regen`, and `analyze`. They are no longer
303
+ `report`, `handoff`, `guardrails`, and `analyze`. They are no longer
292
304
  the product surface.
293
305
 
294
306
  ## Personas & Packs
@@ -307,46 +319,54 @@ the product surface.
307
319
  }
308
320
  ```
309
321
 
310
- Five built-in packs (manifests, not bash pipelines):
322
+ Seven built-in packs (TypeScript manifests in `core/packs/manifests.ts`, not bash pipelines):
311
323
 
312
324
  | Pack | Persona | Memory types enabled | Workflow slots |
313
325
  |---|---|---|---|
314
326
  | `code` | DEV | `fact`, `decision`, `learning`, `gotcha`, `pattern`, `anti-pattern`, `shipped` | `ship`, `review` |
327
+ | `code-strict` | DEV | same as `code`, with SDD+TDD strict + delivery-geometry / land / conflict gates | `ship`, `review` |
315
328
  | `daily` | — | `inbox`, `todo`, `idea` | `morning`, `clarify`, `review` |
316
- | `pm` | PM | `decision`, `insight`, `question`, `stakeholder` | `spec`, `triage`, `update` |
317
- | `founder` | Founder | `goal`, `okr`, `person`, `stakeholder`, `decision` | `ship`, `review` |
318
- | `research` | Research | `source`, `claim`, `question`, `insight` | `research`, `review` |
329
+ | `pm` | PM | `insight`, `question`, `stakeholder`, `decision`, `source` | `spec`, `triage`, `interview` |
330
+ | `founder` | Founder | `goal`, `okr`, `person`, `stakeholder`, `decision`, `shipped` | `investor-update`, `1on1`, `strategy` |
331
+ | `lean` | | `over-engineering`, `lean-debt` | `review`, `audit`, `debt` |
332
+ | `research` | Research | `source`, `claim`, `question`, `insight` | `lit-review`, `analyze` |
319
333
 
320
334
  Slots ship **empty** — the human or the agent fills them on demand.
321
335
 
322
336
  ## Claude Hooks Adapter (opt-in)
323
337
 
324
- `prjct install` refreshes the universal project surface (`AGENTS.md`) when run inside a prjct project, writes the Claude Code hooks adapter to `~/.claude/settings.json`, and repairs detected Codex config in `~/.codex/config.toml` (prjct MCP + TUI `status_line`). The Claude hooks inject `additionalContext`; none block by default. Other agents use the support level shown by `prjct agents doctor`.
338
+ `prjct install` refreshes the universal project surface (`AGENTS.md`) when run inside a prjct project, writes the Claude Code hooks adapter to `~/.claude/settings.json`, and repairs detected Codex config in `~/.codex/config.toml` (prjct MCP + TUI `status_line`). Most of the 13 hook subcommands inject `additionalContext`; two guard: the credential guard denies tool calls that would leak secrets, and the package guard denies unknown installs under strict packs. Other agents use the support level shown by `prjct agents doctor`.
325
339
 
326
- | Event | Injects |
340
+ | Event | Does |
327
341
  |---|---|
328
342
  | `SessionStart` | Persona; on cold start (startup/clear/compact) also the knowledge digest — top traps + decisions in force, so a freshly-updated model starts grounded |
329
343
  | `UserPromptSubmit` | Active project state (task, branch, inbox) |
344
+ | `PreToolUse` (any tool) | Credential guard — **denies** the call when tool arguments contain secret material, so credentials never leave the machine |
345
+ | `PreToolUse` (Bash package installs) | Package legitimacy — flags packages not already in `package.json` before the install runs (strict packs deny) |
330
346
  | `PreToolUse` (Bash git commit) | Anti-patterns tagged with touched files |
331
347
  | `PreToolUse` (Edit/Write) | The file's preventive memory (gotchas/anti-patterns) right before you edit it — pushes what `prjct guard` makes pull |
348
+ | `PreToolUse` (Grep/Glob) | Injects indexed symbol-graph hits alongside search results (never gates) |
332
349
  | `PostToolUse` (Edit/Write) | Silently annotates `files_touched` on active task |
333
350
  | `Stop` | Async prompt: "learn anything reusable?"; scans the transcript for durable captures |
334
351
  | `SubagentStart` | Persona for fresh-brain subagents (cache-stable, digest-free) |
352
+ | `SubagentStop` | Desktop notification when a subagent finishes (`config.notify`, default on) |
353
+ | `Notification` | Desktop notification when the agent is waiting for input or permission |
335
354
  | `CwdChanged` | Re-contextualizes on project switch |
336
355
 
337
356
  Remove with `prjct claude uninstall` (hooks only) or `prjct uninstall` (everything).
338
357
 
339
358
  ## MCP Server
340
359
 
341
- prjct-cli exposes an MCP server with 5 tool groups:
360
+ prjct-cli exposes an MCP server with 6 tool groups (every tool is prefixed `prjct_`):
342
361
 
343
362
  | Group | Tools |
344
363
  |---|---|
345
- | **memory** | save, list, similar, forget |
346
- | **project** | patterns, status, summary |
347
- | **files** | files, recent |
348
- | **workflow** | list, run, log |
349
- | **code-intel** | related, impact, stale |
364
+ | **memory** | `mem_save`, `mem_list`, `mem_similar`, `mem_forget`, `guard`, `record_decision` / `record_gotcha` / `record_learning` / `record_fact`, `capture_inbox` |
365
+ | **project** | `session_resume`, `task_status`, `task_start`, `task_set_status`, `analysis`, `cost_add`, `developer`, `signals`, `skills`, `context_tiers`, `safe_artifacts` |
366
+ | **files** | `relevant_files`, `signatures`, `history` |
367
+ | **workflow** | `workflow_rules`, `workflow_list`, `workflow_status` |
368
+ | **code-intel** | `impact_analysis`, `search_symbols`, `trace_path`, `architecture`, `cochange`, `dead_code`, `import_graph`, `related_context` |
369
+ | **spec** | 9 `spec_*` tools — create, get, list, update, and the rest of the SDD lifecycle |
350
370
 
351
371
  The broker model: if you already have `linear`, `jira`, `posthog`, `gmail` MCPs wired, prjct-cli **does not duplicate them** — it tells your agent they're available for the current persona and caches your insights locally.
352
372
 
@@ -374,9 +394,9 @@ Every command supports `--md` to emit LLM-optimized markdown for agent consumpti
374
394
 
375
395
  ## Memory
376
396
 
377
- 14 built-in types + user-defined lowercase identifiers:
397
+ 20 built-in types + user-defined lowercase identifiers:
378
398
 
379
- `fact`, `decision`, `learning`, `gotcha`, `pattern`, `anti-pattern`, `shipped`, `inbox`, `todo`, `idea`, `insight`, `question`, `source`, `person` — plus anything you invent (`recipe`, `workout`, `interview`, …).
399
+ `fact`, `decision`, `learning`, `gotcha`, `pattern`, `anti-pattern`, `shipped`, `identity`, `voice`, `glossary`, `framework`, `context`, `inbox`, `todo`, `idea`, `insight`, `question`, `source`, `person`, `spec` — plus anything you invent (`recipe`, `workout`, `interview`, …). Packs add more on top (e.g. `goal`, `okr` from `founder`).
380
400
 
381
401
  ```bash
382
402
  prjct remember decision "we chose SQLite because the app is local"
@@ -433,15 +453,16 @@ Without a key the built-in local embedder is used. Vector dimensionality is dete
433
453
 
434
454
  ## Code Intelligence
435
455
 
436
- `prjct sync` builds three indexes:
456
+ `prjct sync` builds four indexes:
437
457
 
438
458
  | Index | Purpose |
439
459
  |---|---|
440
460
  | BM25 | Full-text search over names, symbols, comments |
461
+ | Symbol graph | Structural code symbols + call sites — powers `prjct code symbols/trace/impact/architecture/dead` and the Grep/Glob hook augment |
441
462
  | Import graph | Forward + reverse dependency edges |
442
463
  | Git co-change | Files that change together |
443
464
 
444
- A combined ranker fuses the three signals (`core/domain/file-ranker.ts`) and powers `prjct context files`, plus `prjct_related`, `prjct_impact`, and `prjct_stale` in the MCP server.
465
+ A combined ranker fuses the signals (`core/domain/file-ranker.ts`) and powers `prjct context files`, plus the code-intel MCP tools (`prjct_related_context`, `prjct_impact_analysis`, `prjct_search_symbols`, `prjct_trace_path`, …).
445
466
 
446
467
  ## Issue Tracker Integration
447
468
 
@@ -468,28 +489,42 @@ Bring your own MCP — prjct-cli doesn't duplicate trackers.
468
489
  ```
469
490
  prjct-cli/
470
491
  bin/prjct.cjs Portable package-manager launcher
471
- dist/bin/prjct.mjs Thin JS shim (daemon-first)
492
+ bin/prjct.ts Source entry daemon + hook fast paths, self-heal
493
+ dist/bin/prjct.mjs Built JS shim (daemon-first)
472
494
  core/
473
- cli/ CLI command handlers + dispatcher
474
- hooks/ 7 passive Claude Code hook subcommands
475
- packs/ Pack manifests + pack-manager
476
- mcp/ MCP server (5 tool groups)
477
- domain/ BM25, import-graph, git-cochange, file-ranker
478
- services/ sync-service, skill-generator, pattern-detector
479
- storage/ SQLite (one DB per project) — source of truth
495
+ agentic/ Agent template loader
496
+ cli/ Bin-command helpers
497
+ commands/ Command registry (command-data.ts) + all verb handlers
498
+ config/ Static command-context config
499
+ constants/ Algorithm / timing / token constants
500
+ daemon/ Background daemon (client, dispatch, protocol)
501
+ domain/ BM25, symbol graph, import-graph, git-cochange, file-ranker
502
+ eval/ Retrieval evals + ledger
503
+ events/ Sync event bus
504
+ hooks/ 13 hook subcommands (Claude Code adapter)
505
+ infrastructure/ path-manager, ai-provider, command-installer, agent-detector
506
+ mcp/ MCP server (6 tool groups)
507
+ memory/ Memory model, recall, formatting
508
+ packs/ Pack manifests (TS) + pack-manager
480
509
  schemas/ Zod — runtime validation
481
- infrastructure/ path-manager, ai-provider, command-installer
482
- daemon/ Background daemon (file watching)
483
- sync/ Cloud sync client + auth-config
510
+ services/ sync-service, skill-generator, embeddings, retention
511
+ session/ Git session helpers
512
+ storage/ SQLite (one DB per project) — source of truth
513
+ sync/ Cloud sync client + auth + entity handlers
514
+ tools/ Context tools (signatures, history, relevant files)
515
+ types/ Shared TypeScript types
516
+ utils/ Output, branding, cache helpers
517
+ workflow-engine/ Rule state-machine + when-evaluator
518
+ workflows/ Onboarding wizard
484
519
  templates/
485
- commands/ Thin per-command templates (defer to CLI --md)
486
- packs/ JSON pack manifests
520
+ codex/ crew/ cursor/ windsurf/ antigravity/ Per-agent surfaces
487
521
  global/ Per-editor router templates
522
+ skills/ Skill templates
488
523
  ```
489
524
 
490
525
  ## Requirements
491
526
 
492
- - Node.js 22.22.2+ or Bun 1.0+
527
+ - Node.js 22.5+ (ships `node:sqlite`) or Bun 1.0+
493
528
  - One of: Claude Code, Gemini CLI, Cursor IDE, Windsurf, OpenAI Codex, Antigravity
494
529
 
495
530
  ## Common questions
@@ -499,7 +534,7 @@ In any git repo, run `prjct sync` (it auto-runs on the first `prjct` command) or
499
534
  `prjct init`. This creates `.prjct/prjct.config.json` with a `projectId` and
500
535
  builds the SQLite store at `~/.prjct-cli/projects/<projectId>/`.
501
536
 
502
- **How do I start an AI Agile work cycle?**
537
+ **How do I start a work cycle?**
503
538
  Run `prjct work "<intent>"` from the repo. It registers the work cycle in
504
539
  SQLite, pulls relevant second-brain context, auto-classifies a lightweight
505
540
  harness (H0-H3) with expected evidence, and marks it active — worked example: