@groeponline/pi-wishcraft 1.6.0 → 1.9.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.
Files changed (46) hide show
  1. package/AGENTS.md +315 -97
  2. package/CHANGELOG.md +99 -9
  3. package/README.md +33 -33
  4. package/bash-mode/editor.ts +82 -10
  5. package/bash-mode/pty-session.ts +64 -16
  6. package/bash-mode/transcript.ts +67 -2
  7. package/docs/architecture/codebase-graph.md +660 -0
  8. package/docs/bash-mode.md +4 -0
  9. package/docs/commands.md +1 -1
  10. package/docs/segments.md +2 -2
  11. package/package.json +2 -2
  12. package/src/config/presets.ts +59 -1
  13. package/src/config/segment-options.ts +98 -83
  14. package/src/config/structural-preset-data.ts +69 -0
  15. package/src/config/structural-preset-table.ts +445 -0
  16. package/src/config/structural-presets.ts +9 -499
  17. package/src/config/types.ts +8 -1
  18. package/src/extension/skills/global-registry.ts +63 -0
  19. package/src/extension/skills/skill-registry.ts +56 -4
  20. package/src/extension/ui/custom-editor.ts +22 -1
  21. package/src/extension/ui/deck/component.ts +17 -5
  22. package/src/extension/ui/deck/render.ts +26 -7
  23. package/src/extension/ui/status-line-renderers.ts +6 -2
  24. package/src/motion/catalog-extra.ts +24 -0
  25. package/src/motion/catalog.ts +4 -0
  26. package/src/motion/index.ts +1 -0
  27. package/src/motion/policy.ts +28 -1
  28. package/src/motion/scheduler.ts +7 -0
  29. package/src/render/layout.ts +44 -2
  30. package/src/render/motion-candidates.ts +52 -0
  31. package/src/render/motion-rail.ts +80 -50
  32. package/src/render/paint.ts +32 -8
  33. package/src/render/v2-adapter.ts +2 -0
  34. package/src/render/v2-entry.ts +1 -1
  35. package/src/segments/system.ts +13 -6
  36. package/src/signal/controller.ts +45 -29
  37. package/src/studio/component.ts +213 -37
  38. package/src/studio/deepwiki/cache.ts +80 -6
  39. package/src/studio/list.ts +11 -1
  40. package/src/studio/open.ts +207 -15
  41. package/src/theme/colors.ts +2 -6
  42. package/src/theme/icons.ts +21 -0
  43. package/src/theme/separators.ts +20 -0
  44. package/tsconfig.test.json +7 -0
  45. package/src/tools/patch.ts +0 -179
  46. package/src/tools/ripgrep.ts +0 -104
package/AGENTS.md CHANGED
@@ -1,102 +1,320 @@
1
- # AGENTS.md
2
-
3
- Guidance for AI agents (and humans) working on this repository.
4
-
5
- ## What this project is
6
-
7
- pi-wishcraft is a powerline-style status bar and wishcraft interaction layer for the `pi`
8
- coding agent: status segments, welcome overlay/header, working "vibes" loading
9
- messages, a queue + idea inbox, bash mode, prompt/stash history, and full
10
- user customization.
11
-
12
- ## Repository layout
13
-
14
- - `index.ts` — package entry: the public barrel. It re-exports the default
15
- activation function and the documented public API (`resolveShortcutConfig`,
16
- `parseBashModeSettings`, `PowerlineShortcuts`). Keep it a barrel; no
17
- implementation lives here.
18
- - `src/` — the proxy-free extension runtime, organized by domain:
19
- - `src/extension/` the extension runtime, organized into domain subfolders:
20
- `core/` (constants, types, `state.ts` hub, segment-context), `commands/`
21
- (slash commands, queue commands, bash-mode actions, vibe command),
22
- `session/` (activation, session lifecycle, git invalidation, stale-context),
23
- `ui/` (custom editor, layout, menu views, powerline widgets, status-line
24
- renderers), `history/` (prompt + stash history), `queue/` (queue context +
25
- integration), `settings/` (settings IO), `shortcuts/` (shortcut config +
26
- router), `welcome/` (welcome control + integration), `skills/` (inline
27
- invocation). Leaf modules keep the dependency graph acyclic: shared types
28
- and constants live in `core/`, queue/welcome callbacks are wired through
29
- leaves or `RuntimeState`, and `core/state.ts` is the hub that only has
30
- inbound edges. Verify with `npx madge --circular src index.ts bash-mode
31
- queue`.
32
- - `src/config/`powerline config parsing, presets, types, segment ids/options.
33
- - `src/segments/`segment registry and the segment renderers.
34
- - `src/theme/`colors, icons, separators, theme loading.
35
- - `src/usage/` — token stats, context usage, currency rates.
36
- - `src/welcome/`welcome header/overlay rendering and discovery.
37
- - `src/working-vibes/`vibe theme storage, generation, manager.
38
- - `src/git/`, `src/shell/`, `src/editor/`, `src/render/`, `src/paths/`,
39
- `src/shortcuts/`, `src/lifecycle/`small single-purpose domains.
40
- - `bash-mode/`managed shell session, transcript store, completion engine.
41
- - `queue/` — file-backed queue/inbox store and types.
42
- - `tests/` flat `node:test` suite (`tests/*.test.ts`); structural tests read
43
- the module under test from `src/`, never from `index.ts` source text.
44
- - `scripts/release.mjs` zero-dep release helper (bump, CHANGELOG, tag).
45
-
46
- ## Rules
47
-
48
- - **No root-level monofiles.** Implementation lives under `src/` organized by
49
- domain; `index.ts` is only a barrel. Import implementation via
50
- `src/**` paths (or `bash-mode/`, `queue/`).
51
- - **Module size:** when a file exceeds ~450 lines, split it along domain
52
- boundaries (e.g. command handlers out of `commands.ts`, git invalidation
53
- out of `session-lifecycle.ts`). Prefer many cohesive small modules.
54
- - **No circular imports.** Domain modules must not import back into
55
- `src/extension/core/state.ts` for callbacks; move the callback into a leaf module
56
- (e.g. `welcome-control.ts`) or wire it through `RuntimeState`.
57
- - **Bun/Node-native TS:** `import` paths carry `.ts` extensions
58
- (`allowImportingTsExtensions`), `node:`-prefixed builtins, `node --test`
59
- with type stripping. No build step.
60
- - **English UI:** operator overlays, notify strings, and `/wishcraft` copy are
61
- English. Do not add Dutch UI strings.
62
- - **Tests:** behavior changes in `src/` need a focused regression test near
63
- the existing tests for that subsystem; structural tests assert on module
64
- files in `src/` (never `index.ts`).
65
-
66
- ## Commands
1
+ # Repository Guidelines
2
+
3
+ ## Project Overview
4
+
5
+ `pi-wishcraft` is an operator cockpit extension for the **Pi** coding agent (`@earendil-works/pi-coding-agent`). It provides a powerline-style status bar, welcome overlay/header, working "vibes" loading messages, a file-backed idea queue, sticky Bash mode with PTY sessions, inline skill invocation, command-level hooks/policy controls, and a fullscreen Skill Studio. The package ships as a Pi extension rooted at `./index.ts` and is published to npm as `@groeponline/pi-wishcraft`.
6
+
7
+ ## Architecture & Data Flow
8
+
9
+ ### Bootstrap & Runtime Hub
10
+
11
+ The extension bootstraps from `index.ts`, which re-exports `powerlineFooter` from `src/extension/session/activate.ts`. Activation reads Pi settings, parses powerline config, creates a mutable `RuntimeState` (via `createRuntimeState` in `src/extension/core/state.ts`), and registers Pi lifecycle hooks, commands, segments, presets, shortcuts, skills, and bash-mode sessions.
12
+
13
+ `src/extension/core/state.ts` is the **central mutable hub** — it holds `config`, schedulers, and derived caches. All runtime mutations flow through `RuntimeState` and callback hooks (`requestStatusRender`, `requestImmediateStatusRender`, `resetLayoutCache`, `dispatchSignalEvent`). Leaf modules consume and extend this hub but never import sibling leaves directly.
14
+
15
+ ### Rendering Pipeline
16
+
17
+ The render pipeline is a pure, acyclic chain:
18
+
19
+ 1. **SegmentContext** is built read-only by `src/extension/core/segment-context.ts` from `RuntimeState`, config, theme, git state, and usage data.
20
+ 2. **Segment renderers** are dispatched through `src/segments/registry.ts` a fault-isolated `renderSegment` that maps segment IDs to pure render functions.
21
+ 3. **Status line composition** happens in `src/render/v2-entry.ts`, which orders segments, inserts the motion rail from `src/render/motion-rail.ts`, then delegates painting to `src/render/paint.ts` and `src/render/v2-adapter.ts`.
22
+
23
+ ### Motion & Signal
24
+
25
+ The motion engine (`src/motion/*`) defines a catalog of animations (`src/motion/catalog.ts`), a centralized scheduler (`src/motion/scheduler.ts`), and an accessibility policy (`src/motion/policy.ts`). The Signal controller (`src/signal/controller.ts`) leases one motion consumer per runtime event and manages the lifecycle of rendered signals on the status-line rail.
26
+
27
+ ### Leaf Domains
28
+
29
+ Each domain operates through `RuntimeState` callbacks:
30
+
31
+ - **bash-mode/** — PTY-managed shell sessions, transcripts, ghost suggestions, completion engine
32
+ - **queue/**file-backed JSONL queue/inbox store with aliases and retention
33
+ - **working-vibes/**themed loading message generation and persistence
34
+ - **welcome/**fullscreen TUI overlay with branded layout and countdown
35
+ - **usage/** — token/cost/context ledger, TPS ring, daily budget
36
+ - **theme/**color resolution, icons, separators, token mapping
37
+ - **studio/**Skill Studio UI component, Deck renderer, advice engine
38
+ - **skills/** skill registry, manager, inline invocation, doctor, status
39
+ - **hooks/**session/context/tool hooks, policy engine, repairs
40
+ - **settings/**settings IO, config commands, appearance write-back
41
+
42
+ ### Acyclic Dependency Rule
43
+
44
+ Domain modules must not import back into the hub for callbacks. Shared types and constants live in `src/extension/core/`. Verify no circular imports:
45
+
46
+ ```bash
47
+ npm run circular
48
+ # madge --circular src index.ts bash-mode queue
49
+ ```
50
+
51
+ ## Key Directories
52
+
53
+ | Directory | Purpose |
54
+ |---|---|
55
+ | `src/` | Extension runtime, organized by domain (core, config, segments, render, signal, motion, theme, welcome, working-vibes, usage, studio, skills, hooks, settings, shortcuts, history, queue, contrib) |
56
+ | `src/extension/` | Pi extension runtime: `core/` (hub, types, constants), `session/` (activation, lifecycle), `ui/` (deck, layout), `commands/`, `shortcuts/`, `queue/`, `welcome/`, `skills/`, `hooks/`, `settings/`, `history/`, `contrib/` |
57
+ | `src/config/` | Powerline config parsing, presets, settings registry, tokens |
58
+ | `src/segments/` | Segment registry and builtin renderers (core, system, usage, custom) |
59
+ | `src/theme/` | Colors, icons, separators, token mapping |
60
+ | `src/render/` | Paint primitives, v2 adapter, layout, motion-rail |
61
+ | `src/motion/` | Motion catalog, scheduler, policy, types, gallery, composer |
62
+ | `src/signal/` | Signal controller and event dispatching |
63
+ | `src/welcome/` | Welcome overlay, renderer, art, layout |
64
+ | `src/studio/` | Studio UI component, deck, advice engine |
65
+ | `bash-mode/` | Standalone PTY shell session management (editor, transcript, completion, forward mode) |
66
+ | `queue/` | Standalone file-backed queue store and types |
67
+ | `tests/` | Flat `node:test` suite (`tests/*.test.ts`), helpers in `tests/helpers/`, fixtures in `tests/fixtures/` |
68
+ | `docs/` | Operator guides (configuration, commands, bash-mode, segments, skills, etc.) |
69
+ | `docs/design/` | vNext design specs (not operator how-to docs) |
70
+ | `.compound-engineering/` | CE overlay: tracked `config.yaml`, artifacts, plans |
71
+
72
+ ## Development Commands
67
73
 
68
74
  ```bash
75
+ # Install dependencies
69
76
  npm ci
70
- npm run typecheck # tsc --noEmit (strict)
71
- npm test # node --experimental-strip-types --test tests/**/*.test.ts
77
+
78
+ # Type check (strict, no emit)
79
+ npm run typecheck
80
+
81
+ # Run all tests
82
+ npm test
83
+
84
+ # Check for circular imports
85
+ npm run circular
86
+
87
+ # Full package contract verification (for publish preparation)
88
+ npm run verify:package
89
+
90
+ # Local preview server (Deck/Signal/motion surfaces)
91
+ npm run preview
92
+
93
+ # Dockerized parallel testing (typecheck + test + circular)
94
+ scripts/docker-test.sh [-n N]
95
+
96
+ # Cloud agent bootstrap (Node 24, pi CLI install)
97
+ scripts/cloud-agent-install.sh
98
+ scripts/cloud-agent-start.sh
99
+ ```
100
+
101
+ ### Release Flow
102
+
103
+ Releases are CI-driven via GitHub Actions:
104
+
105
+ ```bash
106
+ # Locally: bump version, rewrite CHANGELOG, tag, optional push
107
+ node scripts/release.mjs # or: npm run release
108
+
109
+ # Publish to npm (CI handles auth)
110
+ scripts/npm-publish.sh
111
+
112
+ # Create GitHub Release
113
+ scripts/github-release.sh
114
+ ```
115
+
116
+ CI workflows (`.github/workflows/`):
117
+ - `test.yml` — Node 24, typecheck, test, circular, verify:package, npm audit
118
+ - `release.yml` — reuses test.yml, prepares release-candidate branch
119
+ - `promote-release-candidate.yml` — promotes verified SHA to main, tags, dispatches publish
120
+
121
+ Release behavior:
122
+ - **Every main merge with `[Unreleased]` CHANGELOG notes cuts a release automatically** (verify → candidate → promote → tag → npm). Notes-less merges skip candidate creation entirely — no more empty versions.
123
+ - Notes live under `## [Unreleased]` in CHANGELOG.md; the release commit rolls them into the new version heading.
124
+ - `[skip release]` skips the release when it appears in the **commit subject** — squash-merge builds that subject from the commit subject lines, so a `[skip release]` in a PR title is NOT preserved. Careful: the guard substring-matches the whole commit message, so don't write the literal tag in prose either.
125
+ - Manual escape hatch: `node scripts/release.mjs <version> --force` cuts a release with empty notes (deliberate, local only).
126
+
127
+ ## Code Conventions & Common Patterns
128
+
129
+ ### Module Structure
130
+
131
+ - **No root-level monofiles**: implementation lives under `src/` by domain; `index.ts` is a barrel only
132
+ - **Module size**: split files exceeding ~450 lines along domain boundaries
133
+ - **TypeScript**: `.ts` extensions on all imports (`allowImportingTsExtensions`), `node:`-prefixed builtins, strict mode, no build step
134
+ - **Entry point**: `index.ts` re-exports `powerlineFooter` and shortcut helpers — keep it a barrel, no implementation
135
+
136
+ ### Import Paths & Dependency Direction
137
+
138
+ ```typescript
139
+ // Correct: import via domain paths
140
+ import { SEGMENTS } from "src/segments/registry.ts";
141
+ import { createRuntimeState } from "src/extension/core/state.ts";
142
+
143
+ // Incorrect: avoid importing implementation from index.ts barrel
144
+ import { powerlineFooter } from "./index.ts"; // tests must not do this
145
+ ```
146
+
147
+ - Tests import from `src/<domain>/*` module files directly, **never** from `index.ts`
148
+ - Domain modules must not import back into the hub for callbacks — use `RuntimeState` + callback hooks
149
+
150
+ ### State Management
151
+
152
+ `RuntimeState` (from `src/extension/core/state.ts`) is the singleton mutable hub. It owns:
153
+ - `config` — parsed powerline configuration
154
+ - Motion/signal/render schedulers
155
+ - Derived caches (segment context, layout)
156
+
157
+ Leaf consumers receive `RuntimeState` plus callback hooks rather than importing sibling leaves directly.
158
+
159
+ ### Callback Wiring Pattern
160
+
161
+ ```typescript
162
+ // Leaf modules receive hooks, do not import siblings
163
+ function createRuntimeState(hooks: {
164
+ requestStatusRender: () => void;
165
+ requestImmediateStatusRender: () => void;
166
+ resetLayoutCache: () => void;
167
+ }): RuntimeState
168
+ ```
169
+
170
+ ### Error Handling
171
+
172
+ - Segment rendering is fault-isolated — a failing segment does not crash the status line
173
+ - Policy engine evaluates pre/post tool hooks with deny/inject results
174
+ - Hooks runner uses stdin JSON + timeout + process-group kill
175
+
176
+ ### Naming Conventions
177
+
178
+ - Domain barrels: `src/<domain>/index.ts`
179
+ - Segment files: `src/segments/{core,system,usage,custom}.ts`
180
+ - Motion modules: `src/motion/{catalog,scheduler,policy,types}.ts`
181
+ - Test files: `tests/<subsystem>.test.ts` (flat suite, descriptive names)
182
+
183
+ ## Important Files
184
+
185
+ ### Entry Points
186
+ - `index.ts` — package barrel (re-exports `powerlineFooter`, `resolveShortcutConfig`, `parseBashModeSettings`, `PowerlineShortcuts`)
187
+ - `src/extension/session/activate.ts` — activation bootstrap
188
+ - `src/extension/core/state.ts` — `RuntimeState` hub, `createRuntimeState`
189
+ - `src/extension/core/types.ts` — `RuntimeState` type definitions
190
+
191
+ ### Configuration
192
+ - `src/config/parse.ts` — `parsePowerlineConfig`, `PowerlineConfig` interface
193
+ - `src/config/settings-registry.ts` — operator settings definitions, defaults, validation
194
+ - `src/config/structural-presets.ts` — structural preset definitions
195
+ - `src/config/tokens.ts` — semantic token mapping
196
+
197
+ ### Rendering
198
+ - `src/render/v2-entry.ts` — `renderStatusLineV2` (composed render entry)
199
+ - `src/render/v2-adapter.ts` — layout adaptation for painting
200
+ - `src/render/paint.ts` — painting primitives
201
+ - `src/render/motion-rail.ts` — motion rail surface rendering
202
+
203
+ ### Segments
204
+ - `src/segments/registry.ts` — `SEGMENTS` registry, `renderSegment` dispatcher
205
+ - `src/segments/core.ts` — model, shell_mode, path, git, time, session, hostname
206
+ - `src/segments/system.ts` — thinking, subagents, queue, extension_statuses, open ports/TPS
207
+ - `src/segments/usage.ts` — token_in/out/total, cost, context_pct, cache_read/write
208
+ - `src/segments/custom.ts` — custom registered/static segments
209
+
210
+ ### Signal & Motion
211
+ - `src/signal/controller.ts` — `SignalRuntime` lifecycle
212
+ - `src/signal/integration.ts` — event dispatcher
213
+ - `src/motion/catalog.ts` — motion definitions, channel matrix
214
+ - `src/motion/scheduler.ts` — shared `MotionScheduler`
215
+ - `src/motion/policy.ts` — accessibility/policy filter
216
+
217
+ ### Bash Mode
218
+ - `bash-mode/pty-session.ts` — PTY session abstraction
219
+ - `bash-mode/session-factory.ts` — shell session creation
220
+ - `bash-mode/transcript.ts` — `BashTranscriptStore`
221
+ - `bash-mode/completion.ts` — completion engine
222
+
223
+ ### Queue
224
+ - `queue/store.ts` — `PowerlineQueueStore` (filesystem-backed JSONL)
225
+ - `queue/types.ts` — queue item/target/status types
226
+
227
+ ### Studio & Skills
228
+ - `src/studio/component.ts` — fullscreen Skill Studio component
229
+ - `src/studio/deck/render.ts` — Deck renderer
230
+ - `src/studio/advise/engine.ts` — advice pane engine
231
+ - `src/extension/skills/skill-registry.ts` — skill catalog
232
+ - `src/extension/skills/skill-manager.ts` — skill management commands
233
+
234
+ ### Release & Verification
235
+ - `scripts/release.mjs` — version bump, CHANGELOG rewrite, tag
236
+ - `scripts/verify-package.mjs` — package contract checks (name, description, keywords, pi manifest, resources, peers)
237
+ - `scripts/verify-pi-package-contract.mjs` — Pi package contract validation
238
+ - `scripts/npm-publish.sh` — idempotent npm publish with marker-tag promotion
239
+ - `scripts/github-release.sh` — GitHub Release creation
240
+ - `scripts/gen-lantern.mjs` — generates lantern art pixel-grid module
241
+
242
+ ## Runtime/Tooling Preferences
243
+
244
+ | Requirement | Detail |
245
+ |---|---|
246
+ | **Node** | v22.14 system default; Node 24 via nvm for CI and pi CLI (pi requires ≥22.19) |
247
+ | **Package manager** | npm (lockfile v3) |
248
+ | **TypeScript** | 5.9.3, strict mode, `NodeNext` module/resolution, `allowImportingTsExtensions`, no build step |
249
+ | **Test runner** | Node built-in `node:test` with `--experimental-strip-types` type stripping |
250
+ | **Circular import check** | `madge --circular src index.ts bash-mode queue` (via `npm run circular`) |
251
+ | **Import style** | `.ts` extensions on all imports, `node:`-prefixed builtins |
252
+ | **Pi CLI** | Installed at `^0.84.0`; wrapped to run under Node 24 via nvm |
253
+ | **Docker** | `fuse-overlayfs` storage driver for nested VM testing |
254
+ | **Compound Engineering** | `.compound-engineering/` overlay; portable skills via `~/.agents/skills/ce-*`; native Cursor plugin disabled |
255
+
256
+ ## Testing & QA
257
+
258
+ ### Test Framework
259
+
260
+ - **Runner**: Node's built-in `node:test` (flat per-file suites)
261
+ - **Assertions**: `node:assert/strict`
262
+ - **Type stripping**: `--experimental-strip-types` (no `tsc` compilation in tests)
263
+ - **Invocation**: `npm test` runs `node --experimental-strip-types --test tests/**/*.test.ts`
264
+
265
+ ### Test Organization
266
+
267
+ Tests are flat in `tests/` with supporting helpers and fixtures:
268
+
269
+ - `tests/helpers/strip-ansi.ts` — shared ANSI stripping utility
270
+ - `tests/fixtures/skill-template-golden.ts` — golden fixture for skill templates
271
+
272
+ ### Test Types
273
+
274
+ | Type | Convention | Examples |
275
+ |---|---|---|
276
+ | **Structural tests** | Assert on module contracts: layout rules, config precedence, catalog/scheduler invariants, registry behavior | `effective-config.test.ts`, `render-v2.test.ts`, `tokens.test.ts`, `hooks.test.ts` |
277
+ | **Behavior tests** | Assert runtime output: rendered strings, command execution, state changes, temp FS flows | `signal.test.ts`, `system-segments.test.ts`, `queue-store.test.ts`, `deck.test.ts` |
278
+ | **Golden tests** | Pin exact rendered output or template text | `signal-golden.test.ts`, `skill-templates.test.ts` |
279
+
280
+ ### Import Conventions
281
+
282
+ Tests import from `src/<domain>/*` module files directly — **never** from `index.ts`. For example:
283
+
284
+ ```typescript
285
+ // Correct
286
+ import { SEGMENTS } from "src/segments/registry.ts";
287
+
288
+ // Incorrect — do not import from index.ts
289
+ import { powerlineFooter } from "./index.ts";
290
+ ```
291
+
292
+ ### CI Verification Gates
293
+
294
+ The `.github/workflows/test.yml` workflow enforces the full verification chain:
295
+
296
+ ```bash
297
+ npm run typecheck # tsc --noEmit
298
+ npm test # node --test
299
+ npm run circular # madge --circular
300
+ npm run verify:package # verify-package.mjs + verify-pi-package-contract.mjs
301
+ npm audit # security audit
302
+ ```
303
+
304
+ ### Release Verification
305
+
306
+ Before any publish, `prepublishOnly` runs the full chain:
307
+
308
+ ```bash
309
+ tsc --noEmit && verify-package.mjs && verify-pi-package-contract.mjs
310
+ ```
311
+
312
+ ### Dockerized Parallel Testing
313
+
314
+ For isolated, parallel CI runs:
315
+
316
+ ```bash
317
+ scripts/docker-test.sh -n 4 # 4 parallel containers
72
318
  ```
73
319
 
74
- Run both before proposing any non-trivial change.
75
-
76
- Compound Engineering overlay: `.compound-engineering/` (tracked `config.yaml`, gitignored `config.local.yaml`). Artifact root `.compound-engineering/artifacts/`. Portable skills `~/.agents/skills/ce-*`; native Cursor plugin is fallback only when this overlay is absent.
77
-
78
- ## Cursor Cloud specific instructions
79
-
80
- The Cloud Agent environment is provisioned so the extension can be tested both as
81
- a library and inside real `pi`, with Docker for containerized/parallel runs.
82
-
83
- - **Node:** the platform `node` on `PATH` is v22.14 (fine for `npm ci`,
84
- `typecheck`, and the test suite, which use `--experimental-strip-types`).
85
- Node 24 is available via `nvm` and is what CI uses.
86
- - **pi CLI:** installed and pinned to the wishcraft peer range
87
- (`@earendil-works/pi-coding-agent` `>=0.81.0 <0.85.0`). pi requires Node
88
- `>=22.19`, so the `pi` launcher is wrapped to run under the `nvm` Node 24.
89
- `~/.pi/agent/settings.json` loads this checkout (`packages: ["/workspace"]`,
90
- `preset: chef`) so `pi` renders the wishcraft welcome/powerline on startup.
91
- Running a model needs a provider key (`/login`); the extension loads without
92
- one.
93
- - **Docker:** `dockerd` runs with the `fuse-overlayfs` storage driver (required
94
- in the nested VM). `scripts/cloud-agent-start.sh` starts it per boot;
95
- `scripts/cloud-agent-install.sh` is the idempotent bootstrap (`npm ci` plus
96
- self-healing pi setup).
97
- - **Containerized / parallel testing:** `scripts/docker-test.sh [-n N]` runs the
98
- full check suite (`typecheck` + `test` + `circular`) in `node:24` containers,
99
- each with an isolated copy of the tree, so `N` runs are safe in parallel.
100
- - **Publishing / pi.dev:** merges to `main` auto-publish to npm via the org
101
- `NPM_TOKEN` (`.github/workflows/release.yml`), and pi.dev mirrors npm. Gate
102
- the catalog contract with `npm run verify:package`.
320
+ Each container runs `typecheck + test + circular` with a shared read-only `node_modules` bind mount.
package/CHANGELOG.md CHANGED
@@ -2,13 +2,110 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
- ## [1.6.0] - 2026-08-28
5
+ ## [1.9.0] - 2026-09-12
6
+
7
+ ### Added
8
+ - Per-package preview container (`preview/Dockerfile` + `preview/smoke.sh` + `preview.yml` workflow): builds the npm artifact and smoke-tests the exact files pi loads; images push to GHCR on main.
9
+
10
+ ## [1.8.0] - 2026-09-12
11
+
12
+ ### Fixed
13
+ - Deck dashboard focus model: the focused pane is now marked with ◉/○ so ↓ on the skills workbench no longer looks like it "goes right" — ↑↓ moves the focused pane, ←/tab focuses NAVIGATION, → returns to the list, and the footer advertises both. List cursors clamp from the current position, so a stale cursor after filtering/refresh moves one row instead of sticking.
14
+
15
+ ## [1.4.17] - 2026-09-07
16
+
17
+ ### Added
18
+ - Bash forward-mode privacy notice (issue #71): the first keystroke forwarded to a running command raises an info notice that typed input may echo into the transcript; documented in `docs/bash-mode.md`.
19
+ - Managed PTY suite is now script-gated (issue #73): PTY-core tests skip when `script(1)` is missing instead of silently passing in degraded pipe mode, the basic run asserts a real PTY transport, and the explicit pipe-mode tests still cover the fallback.
20
+
21
+ ### Changed
22
+ - Signal rail is now a compact single-line state surface. `ready` is stable and costs no animation frames; thinking, streaming, tools, and compaction use a bounded directional trail without expanding the footer to three rows.
23
+ - Chef preset now includes session age, generated-token throughput, and cache-read information when present. The port counter names its protocol (`tcp` or `tcp+udp`) instead of displaying an ambiguous bare count.
24
+
25
+ ### Fixed
26
+ - Bash paste-while-running (issue #72): a bracketed paste performed while a command runs is stripped of its markers and forwarded to the child stdin — including split delivery across input chunks — instead of silently queuing in the editor buffer behind the command.
27
+ - PTY/transcript memory bounds (from jan `fix/runtime-pty-bounds`): a single unterminated output line is capped at a 64 KiB UTF-8 tail with a one-time notice, the partial-escape tail is bounded, and the active transcript command trims head lines/bytes within limits instead of growing unbounded.
28
+ - Segment-options spread hygiene (CodeFactor #86–89): `normalizeSegmentOptions` assigns fields imperatively instead of spreading conditional empty objects.
29
+ - Motion frames that contain multiple terminal columns no longer expand a rail cell and shift the footer layout while they animate.
30
+ - Idle rail no longer samples `Date.now()` without a corresponding repaint clock, eliminating stale or apparently random idle frames.
31
+ - TPS now reports `--` until a live two-sample rate exists, rather than falsely presenting idle telemetry as `0`; the existing `both`/`out`/`in` setting is validated and honored.
32
+
33
+ ## [1.4.16] - 2026-09-05
34
+
35
+ ### Fixed
36
+ - Release pipeline no longer cuts empty releases: candidate preparation (and the local `release` script, behind `--force`) now requires actual `[Unreleased]` notes in the CHANGELOG before bumping, so notes-only and docs-only merges to main no longer publish versions with empty release sections.
37
+
38
+ ## [1.4.15] - 2026-09-05
39
+
40
+ ### Added
41
+ - Codebase dependency graph (dot + mermaid + navigation guide) and four wishcraft agent skills (`wishcraft-codebase`, `wishcraft-ui-components`, `wishcraft-hot-path-rules`, `wishcraft-testing`) shipped as operator-facing SKILL.md docs.
42
+
43
+ ## [1.4.14] - 2026-09-05
44
+
45
+ ### Changed
46
+ - Release-notes housekeeping only: this release's main-merge carried the backfilled CHANGELOG sections for 1.4.12 and 1.4.13 (below) and no other code changes; GitHub Release notes for v1.4.12–v1.4.14 updated to match.
47
+
48
+ ## [1.4.13] - 2026-09-05
49
+
50
+ ### Added
51
+ - Skill Studio panes wired end-to-end (`/studio`): the fullscreen workbench now connects the registry-backed list, a detail pane (health, category override, usage count, frontmatter keys, model-invocation flag, and resolved local references with ✓/✗), actions (create from template, edit in-app with cache invalidation, doctor), and AI advice with explain/integrate/examples/improve modes — streamed through the advise engine with DeepWiki wiki context and insert-into-editor. The fail-closed placeholder gate is lifted; the entrypoint keeps its guards (closed without UI, warning + closed in RPC mode).
52
+ - DeepWiki disk cache gains bounded LRU eviction (`maxEntries`, default 64) on top of the existing TTL + stale-fallback behavior.
53
+ - Tests: studio pane render, key routing + refresh, entrypoint guards, and LRU eviction covered; 723 passing.
54
+
55
+ ## [1.4.12] - 2026-09-05
56
+
57
+ ### Added
58
+ - Skill Studio: browse the ChefGroep global skill registry alongside local skills (`loadSkillStudioCatalog`): registry-only skills surface with routing metadata and a "registry source not readable" warning when the file is unavailable on this host.
59
+ - Motion rail: impressive adaptive rail with motion-driven routing (#83).
60
+
61
+ ### Changed
62
+ - AGENTS.md rewritten to the current architecture (#80).
63
+ - Compound Engineering overlay example clarified: explainer archival and sweep state paths now reference `<docs_root>` (#68); devDependency `@earendil-works/pi-coding-agent` bumped to 0.84.3.
64
+
65
+ ### Removed
66
+ - Dead agent-tools (patch, ripgrep) with no runtime consumers (#81).
67
+
68
+ ### Fixed
69
+ - Rail/render fixes shipped with the studio registry work (#79).
70
+ - Tests: `session_compact_failed` regression coverage — clearing compacting state, settling the signal, and blocking post-compact queue items with the error (#68).
71
+
72
+ ## [1.4.11] - 2026-08-30
73
+
74
+ ## [1.4.10] - 2026-08-30
75
+
76
+ ## [1.4.9] - 2026-08-29
77
+
78
+ ## [1.4.8] - 2026-08-29
79
+
80
+ ## [1.4.7] - 2026-08-28
81
+
82
+ ## [1.4.6] - 2026-08-28
83
+
84
+ ## [1.4.5] - 2026-08-28
85
+
86
+ ## [1.4.4] - 2026-08-28
87
+
88
+ ## [1.4.3] - 2026-08-28
6
89
 
7
90
  ### Added (v2 Platform — wishcraft-v2-platform plan)
8
91
  - Powerline v2: the status line now renders through a single path (`renderStatusLineV2` -> `computeLaneLayout` -> `paintLayout`) with the motion rail as a first-class layout segment (reading order left -> rail -> right preserved; under width pressure the right lane yields first, the rail later). The legacy v1 three-lane renderer (`src/signal/render.ts`) is deleted; rail semantics live in `src/render/motion-rail.ts`. Deliberate visible delta: the configured separator now joins every primary segment. Golden pinned post-cutover in `tests/signal-golden.test.ts` (pre-cutover baseline preserved in git history at 84b2e2a).
92
+ - Multi-row layout: segments declare a visual row count (`LayoutSegment.height?` + auto-derive from embedded `\n`); `computeLaneLayout` returns `primaryRowCount`/`secondaryRowCount`; `paintLayout`/`paintSecondary` render one string per row with the separator on row 0 only.
93
+ - Motion rail: lantern sigil as 3-row active rail for the streaming state — a portable `#`-block lantern (sway + breath) that replaces the braille version that rendered as shade-block blobs on terminals without braille fonts. ASCII fallback stays a directional comet; `ready` = calm flat `─` track; `compacting` = inward heads.
9
94
  - Bash v2: PTY session core (`bash-mode/pty-session.ts`, SGR-safe ANSI filter, sentinel-based command boundary) plus the long-lived `PtyManagedShellSession` cutover: `session-factory.ts` routes `auto`/`v2` through the PTY-backed session and the editor forwards printable input to the running command's stdin while it runs (interactive programs work; Ctrl-C stays an interrupt). When `script(1)` is missing, commands degrade per-run to plain pipes with a one-time warning. The legacy pipe-based `ManagedShellSession` is deleted.
10
95
  - Skill Studio modules: shell + state machine + `/studio` command, list/inspect/actions (create from template, overwrite confirm, doctor), DeepWiki client with 7-day disk cache (`src/studio/deepwiki/`), AI advice engine with pi-ai streaming and char-capped context (`src/studio/advise/`), and an advice pane that streams + inserts into the session. Operator exposure remains deferred and fail-closed until the Studio panes are connected.
11
- - Tests: 704 passing across new and existing suites; full `typecheck`, `madge --circular`, and `npm test` green.
96
+ - Versioned autoresearch harness (`.auto/measure.sh`, `checks.sh`, `config.json`, `prompt.md`): one-run `METRIC` output for test/typecheck/circular plus signal-render and registry micro-benchmarks.
97
+ - Tests: 706 passing across new and existing suites; full `typecheck`, `madge --circular`, and `npm test` green.
98
+
99
+ ### Fixed
100
+ - `segmentHeight` counted trailing empty lines as extra rows, forcing an empty full-width row below a segment — the "big block under every line" render bug.
101
+ - `paintLayout` row-1+ separator padding used `separator.length` (ANSI bytes) instead of `visibleWidth(separator)` — a dead column between lanes on multi-row content.
102
+ - Multi-row rail color: `renderActivity` now wraps each sigil row with its own ANSI color+reset, so rows 1+ render in the lane accent instead of falling back to the terminal default.
103
+ - `activityForEvent` and `defaultMotionFor` had no `default` case — unknown events leaked the literal text `undefined` into the powerline.
104
+ - `MotionScheduler.subscribe` now calls `onDone` on an existing consumer with the same id before replacing it (a silent leak on re-subscribe).
105
+ - `setSignalEvent` wraps `scheduler.subscribe` in try/catch so a throw leaves the runtime in a clean idle state instead of `active=true` with `release=null`.
106
+
107
+ ### Changed
108
+ - Version numbering: the ladder had raced up to 1.7.x while the shipped feature depth was a handful of patches. This release restores the honest number (1.4.3) and `chooseBump` now defaults to `patch` for normal `feat:` commits — only an explicit breaking marker (`feat!:`, `BREAKING CHANGE`) auto-promotes (to `major`); `minor` is an explicit manual choice.
12
109
 
13
110
  ### Deferred
14
111
  - Editor live-tail and v1 session cleanup.
@@ -18,13 +115,6 @@
18
115
  - Studio operator exposure until its panes are connected.
19
116
  - Deck left-rail navigation bug (arrow-down skipping straight to the skills list).
20
117
 
21
- ## [1.5.1] - 2026-08-27
22
-
23
- ### Added
24
- - Versioned autoresearch harness (`.auto/measure.sh`, `checks.sh`, `config.json`, `prompt.md`): one-run `METRIC` output for test/typecheck/circular plus signal-render and registry micro-benchmarks. Future autoresearch sessions run against this contract.
25
-
26
- ## [1.5.0] - 2026-08-27
27
-
28
118
  ## [1.4.1] - 2026-08-27
29
119
 
30
120
  ## [1.4.0] - 2026-08-27