prjct-cli 1.56.10 → 2.0.0-alpha.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/CHANGELOG.md CHANGED
@@ -1,5 +1,388 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.0.0-alpha.12] - 2026-04-21
4
+
5
+ Summary of the alpha.6 → alpha.12 arc and the dead-code / harness sweep
6
+ that closed it. Covers five commits on `v2/cut`: 28eb87e0, e3a163cb,
7
+ 4c661bde, d59612a5, b1cd664f.
8
+
9
+ ### Added (alpha.6 → alpha.11, landed earlier in the arc)
10
+ - **Hook pack**: `prjct claude install` writes 7 passive hooks into
11
+ `~/.claude/settings.json` (SessionStart / UserPromptSubmit /
12
+ PreToolUse / PostToolUse / Stop / SubagentStart / CwdChanged).
13
+ Each hook emits `additionalContext` from project memory + persona;
14
+ nothing blocks unless a hand-rolled workflow rule says so.
15
+ - **Persona per project** (`.prjct/prjct.config.json#persona`):
16
+ `role`, `focus`, `mcps`, `packs`. Injected by every hook.
17
+ - **Packs (5)**: `code`, `daily`, `pm`, `founder`, `research` as
18
+ declarative JSON manifests — no bash seeded, just memory types +
19
+ workflow-slot names + hook signals + suggested persona.
20
+ - **`prjct capture`** — GTD inbox verb. Bare `prjct "..."` now
21
+ routes here (was `task`).
22
+ - **14 base memory types + user-defined**: `fact`, `decision`,
23
+ `learning`, `gotcha`, `pattern`, `anti-pattern`, `shipped`,
24
+ `inbox`, `todo`, `idea`, `insight`, `question`, `source`,
25
+ `person`. Any lowercase identifier also accepted.
26
+ - **Workflow step types**: `script:<path>`, `mcp:<server>:<tool>`,
27
+ `persona:context`. Scripts live in `.prjct/workflows/*.sh` and
28
+ receive `PRJCT_BRANCH` / `PRJCT_FILES_CHANGED` / `PRJCT_TAGS` env.
29
+
30
+ ### Removed (this sweep — 16,859 LOC across 58 files)
31
+ - **Outcome subsystem** (`outcome-recorder/storage/learner/analyzer`):
32
+ zero write callsites anywhere in the codebase; every read returned
33
+ empty. Downstream velocity / estimate-history / learn-from-outcomes
34
+ features went with it.
35
+ - **Agentic stack** (`command-executor`, `loop-detector`,
36
+ `plan-mode`, `context-builder`, `prompt-builder`,
37
+ `orchestrator-executor`, `memory-system`, `semantic-memories`,
38
+ `pattern-store`, `memory-stores`, `domain-classifier`,
39
+ `response-validator`). `workflow.now()` (`prjct task` entry
40
+ point) rewired to persist via `stateStorage` directly +
41
+ `executeWorkflowRules`; no more detour through the orchestration
42
+ chain.
43
+ - **Pre-v2 MCP tools** (`patterns.ts`, `session.ts`, `review.ts`,
44
+ `context.ts`): duplicated what `projectMemory` already does.
45
+ `prjct_mem_save / _list / _similar / _forget` in `memory.ts` is
46
+ now the single MCP memory surface, wired to `projectMemory`.
47
+ `prjct_patterns` in `project.ts` reads the same store.
48
+ - **Six outcome-backed MCP tools** (`prjct_velocity`,
49
+ `_outcomes_search`, `_outcomes_similar`, `_outcomes_recent`,
50
+ `_estimate_accuracy`, `_velocity_detail`).
51
+ - **Ghost verbs** (`sessions`, `tokens` — no handlers).
52
+ - **Harness CLI context subtools** (`files`, `signatures`,
53
+ `imports`, `recent`, `summary` under `prjct context` — Claude has
54
+ Glob / Grep / Read / git natively). Internals kept for MCP.
55
+ - **Seven phantom dispatcher entries** (`diff`, `seal`, `rollback`,
56
+ `verify`, `analysis-payload`, `analysis-save-llm`, `analysis-llm`)
57
+ that routed to methods deleted in earlier alphas — 8 pre-existing
58
+ TS errors gone.
59
+ - **Gate cache** + **bilingual NL parser** in `workflow.ts` (alpha.10).
60
+ - **Obsolete config files / types / utils**: `core/cli/arg-parser`,
61
+ `core/events/pub-sub`, `core/schemas/roadmap`,
62
+ `core/session/task-session-manager`, `core/session/utils`,
63
+ `core/commands/context-contract`, `core/schemas/outcomes`,
64
+ `core/schemas/classification`, `core/schemas/llm-output`,
65
+ `core/constants/commands`, `core/session/session-log-manager`,
66
+ `core/tools/context/recent-tool`, `core/utils/agent-stream`,
67
+ `core/utils/jsonl-helper`, `core/utils/subtask-table`.
68
+
69
+ ### Changed
70
+ - `workflow.now()` 346 → ~120 LOC. `prjct task` (no arg) now shows
71
+ the active task instead of failing validation; `command-data.ts`
72
+ marks the description optional.
73
+ - `context.ts#context` emits the same JSON shape but `domains` /
74
+ `primaryDomain` / `subtasks` are empty — no more intent guessing.
75
+ Use `prjct tag` to classify explicitly.
76
+ - `analysis.ts` inlines `pathManager.getFilePath` instead of pulling
77
+ `contextBuilder`. Stats endpoint keeps its output shape for
78
+ backward compat; `patternsSummary` fields are zeros.
79
+ - `shipping.ts` drops `memorySystem.learnDecision` /
80
+ `recordWorkflow` calls — redundant with `shippedStorage.addShipped`
81
+ (which `projectMemory` reads as `type=shipped`).
82
+ - MCP server registers 5 tool groups (was 9): memory, project,
83
+ files, workflow, code-intel.
84
+
85
+ ### Verified
86
+ `prjct init --pack … --persona …`, `sync`, `task` (with + without
87
+ arg), `remember`, `capture`, `context memory`, `seed list`,
88
+ `SessionStart` / `CwdChanged` hooks with persona — all green on a
89
+ fresh tmp project. `bun test`: 756 pass / 0 fail. `tsc --noEmit`: 0
90
+ errors (was 8 pre-existing). `knip`: 0 unused files.
91
+
92
+ ## [2.0.0-alpha.5] - 2026-04-20
93
+
94
+ Wiki performance pass — answers the "SQLite vs Obsidian markdown graph"
95
+ question by making the hybrid (SQLite source-of-truth + markdown cache)
96
+ cheap enough that there's no reason to pick only one.
97
+
98
+ ### Incremental regen (O-1)
99
+ `core/services/wiki-generator.ts` now keeps a `.manifest.json` of
100
+ `{relPath: sha256}` per generated file. On regen:
101
+ - build every file body in memory
102
+ - sha256 each, diff against the manifest
103
+ - write only files whose hash changed
104
+ - delete files that were in the old manifest but not the new
105
+ - always rewrite the manifest itself (tiny)
106
+
107
+ For the common delta (one new memory entry touching 1-2 files), the
108
+ wiki now writes those 1-2 files instead of the whole tree. ~100ms →
109
+ <5ms in the write-bound case.
110
+
111
+ ### Deferred under daemon (O-2)
112
+ New `regenerateWikiDeferred(projectPath, projectId)`. When the daemon
113
+ sets `PRJCT_IN_DAEMON=1`, it fires the regen via `setImmediate` and
114
+ returns immediately — the CLI response flushes before the regen
115
+ touches disk. CLI path (no daemon) still awaits because
116
+ `process.exit` would drop the pending promise. `primitives.remember`
117
+ and `shipping.ship` call the deferred wrapper.
118
+
119
+ ### File-size cap via chunking (O-3)
120
+ Any memory bucket (type or tag-value pair) with more than 50 entries
121
+ is paginated:
122
+
123
+ ```
124
+ memory/decision.md ← index with links
125
+ memory/decision/chunk-1.md ← 50 entries
126
+ memory/decision/chunk-2.md ← 50 entries
127
+
128
+ ```
129
+
130
+ Tag pages go deeper: `tags/<key>/<value>.md` instead of cramming all
131
+ values under a single `tags/<key>.md`. An agent that reads one chunk
132
+ or one tag page stays under ~5K tokens regardless of corpus size.
133
+
134
+ ### Bottom line
135
+ The hybrid is now the right answer on every axis: SQLite still wins
136
+ writes + complex queries, markdown still wins LLM comprehension +
137
+ token-per-read, and the cost of keeping them in sync is near-zero.
138
+
139
+ ## [2.0.0-alpha.4] - 2026-04-20
140
+
141
+ Quality pass — applies every finding from the three-round line-by-line
142
+ review. No new user-facing verbs; everything is tightening what's already
143
+ in alpha.3.
144
+
145
+ ### DRY
146
+ - `core/commands/verb-names.ts` — single source for the auto-route
147
+ allowlist, imported by both bin (zero-heavy-imports path) and the
148
+ daemon dispatcher. Adding a verb touches one list instead of two.
149
+ - `core/memory/events.ts` — constants for event prefixes so
150
+ `'memory.remember.%'`, `'memory.task.tagged'`, etc. stop drifting
151
+ between writer and reader.
152
+ - `core/commands/guards.ts` — `requireProjectId` / `requireActiveTask`
153
+ helpers kill the duplicated 3-line preamble every v2 primitive used to
154
+ carry.
155
+ - `MEMORY_TYPES` is now a single `const` tuple in `project-memory.ts`
156
+ with the `MemoryType` union derived from it. `primitives.ts` imports it
157
+ instead of maintaining a parallel list.
158
+
159
+ ### Perf
160
+ - Workflow engine hot path: dynamic imports moved to static top-level,
161
+ the two `git diff` execs run in parallel, and `buildWhenContext` is
162
+ skipped entirely unless a rule in this phase actually reads it
163
+ (conditional rule or gate). Saves ~30ms on the plain hook/step case.
164
+ - `when-evaluator.globToRegex` single-pass walker with a compile cache.
165
+ Same pattern tested against N files only compiles once.
166
+
167
+ ### Bugs / UX
168
+ - `prjct status` (no args) now shows the real task status recovered from
169
+ `status.changed` events instead of misrepresenting the task `type` tag
170
+ as the status.
171
+ - Auto-route no longer swallows typos: a single-token input within
172
+ edit-distance 2 of a known verb surfaces a `did you mean` instead of
173
+ silently creating `prjct task "shipp"`.
174
+
175
+ ### Security
176
+ - Wiki lives at `.prjct/wiki/_generated/`. The top-level `.prjct/wiki/`
177
+ is user-owned — any notes you put there survive rebuilds. Only the
178
+ generated subdir gets wiped.
179
+ - Workflow rules gain `trust_source` (schema v14). Rules with
180
+ `trustSource === 'imported'` refuse to run their shell action, buying
181
+ forward-compat for a future template registry without shipping it as
182
+ an arbitrary-code-execution vector.
183
+ - `prjct remember` refuses content matching obvious secret patterns
184
+ (sk-… tokens, GitHub PATs, AWS access keys, Slack tokens, bearer
185
+ JWT-ish strings) unless `--force` is passed.
186
+
187
+ ### Cleanup / smell
188
+ - Magic numbers in `recall()` replaced with `OVERFETCH_FACTOR` and
189
+ `DEFAULT_RECALL_LIMIT` constants with comments explaining the 4×.
190
+ - Wiki regenerates on `prjct remember` too — not just `prjct ship`.
191
+ Subagents reading `_generated/` see newly captured memory without
192
+ waiting for the next ship.
193
+ - Wiki now surfaces inferred `patterns` + `anti-patterns` from
194
+ `prjct sync`, rendered at `_generated/patterns.md` with an
195
+ INFR provenance note so agents can weight them accordingly.
196
+ - Fragile `§§` glob placeholder replaced by a single-pass walker.
197
+
198
+ ### Schema
199
+ New migration v14 `workflow-rules-trust-source`:
200
+ - `workflow_rules.trust_source TEXT NOT NULL DEFAULT 'local'`
201
+
202
+ ## [2.0.0-alpha.3] - 2026-04-20
203
+
204
+ Fourth alpha — adds two high-leverage borrows from the graphify review:
205
+ provenance tags on memory entries and an agent-crawlable wiki under
206
+ `.prjct/wiki/`.
207
+
208
+ ### Memory provenance
209
+ Every `MemoryEntry` now carries a `provenance` field so Claude can
210
+ calibrate trust when reading memory:
211
+
212
+ DECL — declared by user / LLM via `prjct remember`
213
+ EXTR — extracted from verifiable project state (ships, tags)
214
+ INFR — inferred by pattern extractor or heuristic (weakest)
215
+ AMBG — mixed / unclear
216
+
217
+ Surfaced as a prefix in `prjct context memory --md`:
218
+
219
+ ### DECISION
220
+ - `DECL` [mem_15] use SQLite
221
+ ### LEARNING
222
+ - `DECL` [mem_8] bun faster than npm _(area=perf)_
223
+
224
+ Ships auto-tag as `EXTR`; user `remember` calls default to `DECL`. Future
225
+ pattern/heuristic-backed entries can override with `INFR`.
226
+
227
+ ### Agent-crawlable wiki
228
+ New `core/services/wiki-generator.ts` writes `.prjct/wiki/` on every
229
+ `prjct ship`:
230
+
231
+ .prjct/wiki/
232
+ index.md — entry point with links to everything
233
+ ships/<slug>.md — one file per shipped feature
234
+ memory/<type>.md — one file per memory type
235
+ tags/<key>.md — one file per tag key
236
+
237
+ Subagents can read these with native Read/Glob — no CLI round-trip into
238
+ SQLite, zero tokens until the file is opened. New `prjct context wiki`
239
+ rebuilds on demand.
240
+
241
+ ### Why these, not the rest of graphify
242
+ graphify's knowledge-graph engine (NetworkX + Leiden + vis.js) is a
243
+ harness pattern that duplicates what the LLM + file-scorer already do for
244
+ a solo-dev codebase. Multimodal PDF ingest is out of scope. The
245
+ long-running `--watch` daemon burns tokens. The `--mcp` server fragments
246
+ the toolbox. We took the two ideas that fit the v2 philosophy and left
247
+ the rest.
248
+
249
+ Hash cache + post-commit hook were already present in prjct
250
+ (`core/domain/file-hasher.ts` + `core/services/hooks-service.ts`) — no
251
+ duplication needed.
252
+
253
+ ## [2.0.0-alpha.2] - 2026-04-19
254
+
255
+ Third alpha — finishes the workflow engine upgrades from the Phase 4 plan.
256
+ Custom workflows can now be written once and execute efficiently.
257
+
258
+ ### Conditional rules
259
+ New `when_expr` column on `workflow_rules` with a tiny DSL:
260
+
261
+ ```
262
+ when: tags:type=bug
263
+ when: branch~main files:*.ts
264
+ when: tags:domain=frontend
265
+ ```
266
+
267
+ Supported: `tags:key=value` / `tags:key~value` (contains), `branch=` / `branch~`,
268
+ `files:<glob>` (glob against the current diff). Multiple tokens AND
269
+ together. Empty / null → unconditional.
270
+
271
+ ### Parallel hooks
272
+ Hooks now run concurrently via `Promise.all` by default. Opt out per rule
273
+ with `parallel: false` — those run sequentially ahead of the batch so
274
+ ordering-dependent cleanups still work. Gates and steps stay sequential.
275
+ Typical speedup on the common "3 independent hooks" case: ~3x.
276
+
277
+ ### Gate result cache
278
+ Gate passes are cached in a new `workflow_rule_cache` table, keyed on
279
+ `(files changed, tags, branch)`. Default TTL 1 h. Only successful passes
280
+ are cached — failures always re-run so the user sees a fresh error. Any
281
+ rule edit invalidates its cache. The win: `tsc` / `eslint` gates don't
282
+ re-run on every task start when nothing relevant has moved.
283
+
284
+ ### Schema
285
+ New migration `v13 workflow-rules-v2`:
286
+ - `workflow_rules.when_expr TEXT` (nullable)
287
+ - `workflow_rules.parallel INTEGER NOT NULL DEFAULT 1`
288
+ - `workflow_rule_cache(rule_id, context_hash, ran_at, ttl_ms)` table
289
+
290
+ All backward-compatible: existing rules keep running without `when_expr`
291
+ and with parallel=true.
292
+
293
+ ### New files
294
+ - `core/workflow/when-evaluator.ts` — DSL parser + evaluator (~100 LOC)
295
+ - `core/workflow/gate-cache.ts` — cache API + SHA-256 context hasher
296
+
297
+ ## [2.0.0-alpha.1] - 2026-04-19
298
+
299
+ Second alpha — finishes the four-PR arc planned for v2 so the new shape is
300
+ usable, not just carved out.
301
+
302
+ ### Auto-route (PR 2)
303
+ - `prjct arregla el checkout lento` → `prjct task "arregla el checkout lento"`.
304
+ Unknown verbs flow straight to task; explicit verbs still win. Works with
305
+ and without the daemon (bin/prjct.ts uses a hardcoded allowlist, core
306
+ dispatcher checks the registry).
307
+
308
+ ### Lazy context (PR 3)
309
+ - `prjct task` output collapsed from ~2,400 chars to ~400. No more eager
310
+ `findRelevantFiles` / pattern briefing / RPI / efficiency sections at
311
+ task start — Claude pulls them on demand.
312
+ - New context topics:
313
+ prjct context memory [topic] → facts, decisions, learnings…
314
+ prjct context learnings [topic] → learning + anti-pattern + gotcha
315
+
316
+ ### Project memory API (PR 4)
317
+ - `core/memory/project-memory.ts` — one surface over events-table entries
318
+ (from `prjct remember`) and `shipped_features` rows. Exposes
319
+ `remember / recall / similar` plus a compact markdown renderer.
320
+ - `prjct remember` auto-captures the active task id as `source`.
321
+
322
+ ### Workflow engine (PR 4)
323
+ - Step actions with prefix `status:` run through the state-machine instead
324
+ of `execAsync`. Custom workflows can now do:
325
+ - step: lint
326
+ - step: test
327
+ - step: status:shipped
328
+ and the final step closes the loop declaratively.
329
+
330
+ ### Fixes
331
+ - `tag` param spec `<pairs...>` — previous `<k:v> [<k:v>...]` tripped
332
+ `validateCommandParams` and blocked valid invocations.
333
+
334
+ ## [2.0.0-alpha.0] - 2026-04-19
335
+
336
+ **BREAKING.** First alpha of the v2 rewrite — "toolbox for LLMs, not harness".
337
+
338
+ ### Removed integrations (pure MCP gateways, no native value)
339
+ - `prjct jira` — use Jira MCP directly
340
+ - `prjct linear` — use Linear MCP directly
341
+ - `prjct obsidian` — use Obsidian MCP or a custom hook
342
+
343
+ ### Removed verbs (status-changes & ceremony)
344
+ - `done`, `pause`, `resume`, `next` — status transitions, handled by workflows or `prjct status`
345
+ - `bug`, `idea`, `spec` — replaced by `prjct task` + `prjct tag type:bug`
346
+ - `cleanup`, `undo`, `redo`, `history`, `recover`, `enrich`, `design` — maintenance ceremony
347
+ - `dash`, `stats`, `perf`, `velocity`, `tokens`, `sessions` — observability, not primitives
348
+ - `worktree`, `parallel`, `conductor` — harness patterns
349
+
350
+ ### New primitives
351
+ - `prjct status [value]` — inline task status change (Linear-style escape hatch)
352
+ - `prjct tag <k:v> [<k:v>...]` — Claude attaches tags; no heuristic classifier
353
+ - `prjct remember <type> "<content>"` — capture project memory (fact, decision, learning, gotcha, pattern, anti-pattern, shipped)
354
+
355
+ ### CLI surface (v2 minimal)
356
+ - Core: `task`, `ship`, `workflow`, `context`, `status`, `tag`, `remember`
357
+ - Bootstrap: `init`, `setup`, `login`, `logout`, `update`, `uninstall`
358
+
359
+ ### Skills (~/.claude/skills/)
360
+ - Kept: `prjct-context`, `prjct-task` (toolbox-style rewrite), `prjct-ship`, `prjct-workflow`
361
+ - Dropped: 12 dead skills matching removed commands
362
+
363
+ ### Stats
364
+ - ~7,000 LOC removed across integrations, aux commands, templates, and tests
365
+ - Skills bundle: 16 → 4 | templates bundle: 71 → 52 files
366
+ - Build output: 1.61 MB → 1.40 MB (-13%)
367
+
368
+ ### Coming next (not in this alpha)
369
+ - PR 2 — dispatcher auto-route (`prjct "fix bug"` → `prjct task`)
370
+ - PR 3 — lazy context injection (`prjct task` < 50 tokens)
371
+ - PR 4 — workflow engine upgrade: status-transitions as steps, conditionals, parallel hooks, cache, rich project-memory API
372
+
373
+ ## [1.56.12] - 2026-04-14
374
+
375
+ ### Bug Fixes
376
+
377
+ - exclude .worktrees from indexing (#248)
378
+
379
+
380
+ ## [1.56.11] - 2026-04-13
381
+
382
+ ### Fixed
383
+ - Exclude `.worktrees` from BM25 and import graph indexing to eliminate duplicate search results
384
+ - Exclude `.worktrees` from biome config to prevent nested root configuration errors
385
+
3
386
  ## [1.56.10] - 2026-04-11
4
387
 
5
388
  ### Bug Fixes
@@ -67,7 +450,6 @@
67
450
  - resolve biome check lint and format errors (#244)
68
451
  - prefer installed dist over source files (#243)
69
452
 
70
-
71
453
  ## [1.56.5] - 2026-04-07
72
454
 
73
455
  ### Added