contextdevkit 1.8.1 → 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.
package/docs/CHANGELOG.md DELETED
@@ -1,559 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to VibeDevKit are documented here.
4
- Format based on [Keep a Changelog](https://keepachangelog.com/).
5
- This project adheres to [Semantic Versioning](https://semver.org/).
6
-
7
- ## [Unreleased]
8
-
9
- Add your changes here. Use sub-sections: Added / Changed / Fixed / Removed.
10
-
11
- ### Added
12
- - **Token-economy digest layer IMPLEMENTED — [ADR-0027](../vibekit/memory/decisions/0027-token-economy-digest-layer.md)
13
- (session 37, PR #41).** Shipped all 3 phases of the digest layer that lets commands
14
- reason over compact output instead of raw markdown: `runtime/hooks/md-extract.mjs`
15
- + `session-digest-core.mjs` (shared pure parsers) + `tools/scripts/session-digest.mjs`
16
- (`/distill-sessions` + `/retro` rewired); `boot-context-readers.digestLatestSession`
17
- shrinks the boot banner from 60 raw lines to a ~6-line digest with a raw fallback
18
- (never empties), plus `context-pack.mjs` collapsing `/dev-start` + `/state` into one
19
- call; `adr-digest.mjs` catalog + `--search` for `/ship` + `/new-adr` + `/deep-analysis`.
20
- 23 selfcheck assertions + a behavioural digest/raw-fallback test; `npm test` green.
21
- ROADMAP items marked ✅ (PR #42). ADR-0027 Accepted; backlog 058–060 concluded.
22
- - **Token-economy digest layer (design) — [ADR-0027](../vibekit/memory/decisions/0027-token-economy-digest-layer.md)
23
- (session 36).** Recorded the decision + plan to **reduce token consumption** by
24
- pre-digesting deterministically in scripts so the AI reasons over compact output
25
- instead of raw markdown. Audited the 65 commands + boot hook: the biggest
26
- single-run cost is reading the **last ~10 session logs raw** (~13–16K input
27
- tokens before reasoning); the highest-frequency cost is the boot banner injecting
28
- 60 raw lines every session. Proposed a `lib/digest/` shared extractor +
29
- `session-digest.mjs` + `adr-digest.mjs` + `context-pack.mjs` + a boot rewire
30
- (digest with raw fallback). New `docs/ROADMAP.md` section + `docs/token-economy-plan.md`
31
- (per-command savings table ≈ **120–200K input tokens/week** on an active project,
32
- 5-phase rollout, guardrails) + DevPipeline backlog **058 / 059 / 060** (one per
33
- phase). **No code shipped** — design/planning only (ADR-before-implementing).
34
- - **GitHub sync awareness in the dev flow — [ADR-0026](../vibekit/memory/decisions/0026-github-sync-awareness-dev-flow.md)
35
- (session 35).** New zero-dep `templates/vibekit/tools/scripts/sync-check.mjs`
36
- with two modes: `preflight` (run by `/dev-start` before coding — ahead/behind,
37
- in-flight branches, and **open PRs with CI/review status**, flagging PRs
38
- *awaiting status*) and `prepr` (run by `/git pr` before push — re-check
39
- divergence vs the default branch and **detect a duplicate open PR** for the
40
- current branch). `gh` is optional: absent/unauthed degrades to the git-only
41
- half and reports the PR check as *skipped, never a pass* (Rule 8); offline ⇒
42
- silent. PR queries stay **off** the SessionStart hot path (Rule 2); the script
43
- is read-only. Wired into `pipeline/dev-start.md` + `vcs/git.md`; 8 selfcheck
44
- assertions added.
45
- - **Landing-page + media generation + SEO/AISO — 3 ADRs (0023/0024/0025),
46
- 1 new agent, 2 playbooks, 5 scripts, 3 slash commands, 6 pipeline
47
- tickets (052–057, session 34).** A coordinated drop addressing the user
48
- request for "skills de UX e UI" for high-conversion landing pages,
49
- Veo + Nano Banana integration, and an SEO specialist with AISO
50
- (AI Search Optimization).
51
-
52
- **ADRs (3).** [ADR-0023](../vibekit/memory/decisions/0023-landing-page-and-conversion-posture.md)
53
- records the landing-page posture: fold rules (min 3 / ideal 5–7 / max 9),
54
- anti-Lovable refusals (gradient hero, three feature cards, three-tier
55
- pricing, testimonial slider, Inter font, Heroicons), dated package
56
- recommendations (Astro recommended, Tailwind + tokens, Motion, Lucide,
57
- Plausible, GrowthBook), performance budget (LCP < 2.5 s, INP < 200 ms,
58
- CLS < 0.1). [ADR-0024](../vibekit/memory/decisions/0024-media-generation-veo-nano-banana.md)
59
- records the media-generation adapter contract — five points
60
- (no SDK, refuse-on-missing-creds, typed return, refuse-on-content-policy,
61
- per-process cost cap) — and the deferred content-addressed cache
62
- (ticket 056). [ADR-0025](../vibekit/memory/decisions/0025-seo-and-aiso-posture.md)
63
- records the SEO + AISO posture, the audit-first stance, AISO as a
64
- first-class concern (`llms.txt`, FAQ schema, semantic HTML5, author +
65
- date stamps), and refuse-on-unindexable for landing surfaces (full
66
- refuse-gate parked as ticket 057).
67
-
68
- **Agent (1 new).** `templates/claude/agents/seo-specialist.md` —
69
- design-team squad member. Audit-first; refuses unindexable SPAs;
70
- refuses JS-rendered content for cited material; respects project-local
71
- ADR overrides. Pairs with `landing-architect`, `ui-designer`,
72
- `ux-designer`, `accessibility`, `code-reviewer`.
73
-
74
- **Playbooks (2).** `templates/vibekit/workflows/playbooks/landing-page.md`
75
- carries the anti-Lovable substitution table (editorial hero,
76
- in-context testimonials, decision-tree pricing, inline FAQ for AISO)
77
- and the package-recs table dated 2026-06-02. `templates/vibekit/workflows/
78
- playbooks/seo-aiso.md` carries the SEO checklist (server-rendered HTML,
79
- meta tags, sitemap, robots, structured data, images, CWV) + the AISO
80
- checklist (`llms.txt`, FAQ schema, semantic HTML5, scannable Q&A
81
- headings, author + date schema, robots.txt AI-crawler block detection).
82
-
83
- **Media-gen system (5 files).**
84
- `templates/vibekit/runtime/providers/media/_adapter.mjs` — contract +
85
- `MediaProviderError` (7 codes: NO_CREDENTIALS, CONTENT_POLICY,
86
- COST_CAP_REACHED, RATE_LIMIT, PROVIDER_ERROR, BAD_INPUT, IO) +
87
- `validateAdapter` + `assertCredentials` + `noteCostOrThrow` (shared
88
- per-process cost-cap tally read from `VIBEDEVKIT_MEDIA_MAX_USD`).
89
- `nano-banana.mjs` — Imagen 3 image generation via `node:fetch`
90
- (`POST /v1beta/models/imagen-3.0-generate-002:predict`, dated
91
- 2026-06-02). `veo.mjs` — Veo 3 video generation with the long-running
92
- operation poll loop (`predictLongRunning` → poll until `done:
93
- true` → download bytes or follow `uri`). `templates/vibekit/tools/
94
- scripts/media-gen.mjs` — CLI entry with positional `image|video`,
95
- `--prompt`, `--out`, `--provider`, `--aspect-ratio`, `--duration`,
96
- `--model`, `--sample-count`, `--dry-run`, `--help`. New
97
- `templates/vibekit/.env.example` template ships at the kit's vibekit
98
- root; commented; `install.mjs` seeds it write-if-missing.
99
-
100
- **Audit scripts (3 files).**
101
- `templates/vibekit/tools/scripts/audit-shared.mjs` (~110 lines) —
102
- `walkProject` (recursive walk skipping `node_modules`, `.git`, build
103
- caches), `detectFramework` (Astro / Next / Nuxt / Remix / SvelteKit /
104
- Gatsby / 11ty / `vite-react` / `null`), `lineOf`, `renderFindings`
105
- (severity-grouped coloured terminal output), `exitCodeFor` (1 on any
106
- `critical`). `seo-audit.mjs` (~125 lines) — 8 codes
107
- (SPA_ENTRYPOINT critical; MISSING_TITLE/DESC/SITEMAP/MULTIPLE_H1 high;
108
- MISSING_CANONICAL/ALT/ROBOTS medium); SPA-entry-point detection reads
109
- `index.html` for `<div id="root\|app\|__next\|___gatsby"></div>` and
110
- flags only when framework detection is `vite-react` or `null`.
111
- `aiso-audit.mjs` (~130 lines) — 8 codes (MISSING_LLMS_TXT/
112
- FAQ_SCHEMA/JS_RENDERED/BLOCKS_AI_CRAWLERS high;
113
- MISSING_ORG_SCHEMA/DIV_SOUP medium; MISSING_AUTHOR/DATE low);
114
- div-soup ratio threshold 5:1; AI-crawler block detection covers
115
- GPTBot, ClaudeBot, PerplexityBot, Google-Extended, OAI-SearchBot.
116
-
117
- **Slash commands (3).** `/seo-audit` lands in the `audit/` pack (per
118
- ticket 047's taxonomy). `/landing-page` + `/media-gen` at root
119
- (utility commands, like `/dashboard` and `/watch`). `commands/README.md`
120
- taxonomy updated to list the three new commands.
121
-
122
- **Pipeline tickets (6).** 052 / 053 / 054 in `testing/` (shipped
123
- this session). 055 (`.env.example` install integration follow-up) +
124
- 056 (media-gen cache) + 057 (SEO refuse-gate in `code-reviewer`)
125
- parked in `backlog/` with explicit acceptance criteria, dependencies
126
- declared via the ticket-040 DAG (`dependencies: ["053"]`, etc.) and
127
- T-shirt complexity (S/M).
128
-
129
- **Tests (rule 3).** 33 new selfcheck assertions covering every shipped
130
- surface — every adapter export, every audit-code constant, every
131
- playbook anchor, the `127.0.0.1`-only spirit (`/media-gen` is
132
- network-only, no localhost binding involved; `assertCredentials` is
133
- the equivalent guard). All 7 integration suites green.
134
-
135
- **Smoke-tested end-to-end.** `seo-audit --json` against this repo
136
- emitted truthful findings (no sitemap, no robots.txt, missing meta
137
- description in the TanStack starter's `index.html`). `aiso-audit
138
- --json` flagged no `llms.txt` and the missing FAQ schema in the
139
- starter. `media-gen image --prompt "test" --out tmp.png --dry-run`
140
- detected nano-banana as the image adapter and showed
141
- `GOOGLE_AI_API_KEY ✗ missing` — the refuse-on-missing-creds path
142
- works without making any network call.
143
-
144
- - **Backlog sweep — 5 Compozy follow-through tickets shipped (session 33,
145
- `main`).** Single `/dev-start` resolved the remaining open backlog from
146
- ADRs 0018–0022; one worktree + one PR per ticket, squash-merged on green
147
- CI (Node 18/20/22). **PR #29 ticket 040** (commit `42ed8c8`) — task
148
- metadata v2: `dependencies: []` (strict DAG, no cycles), `complexity:
149
- S\|M\|L\|XL`, extended `type` enum with `spike` + `docs`, new
150
- `pipeline validate` subcommand, board `↘ blocked by N` hint, new
151
- `pipeline-validate.mjs` sibling. **PR #30 ticket 047** (`9787969`) — 39
152
- of 58 slash commands moved into `qa/ vcs/ forge/ pipeline/ audit/
153
- setup/` subfolders (daily 20 stay at root); new `commands/README.md`
154
- documents the taxonomy; selfcheck walk made recursive + new
155
- basename-collision invariant. Claude Code resolves by basename →
156
- invocations unchanged. **PR #31 ticket 046** (`c54b6bb`) — new
157
- `/resume` re-binds the current session to an unregistered drift
158
- ledger via `resume.mjs` (reads `listAllLedgers` from the runtime,
159
- single-sourced); three rule-8 refusal paths (unknown id / already
160
- registered / cross-session claim conflict); atomic `.last-touched`
161
- rewrite. **PR #32 ticket 043** (`bb5c132`) — new `distill-detect.mjs`
162
- scans the just-written session narrative for 10 Tier-1 rule-like
163
- patterns ("we decided" / "from now on" / "always" / "never" /
164
- "convention:" / "lesson learned"); proposal-only (never auto-invokes
165
- `/distill-sessions`); skips headings + blockquotes to dodge false
166
- positives; wired into `/log-session` as step 6. **PR #33 ticket 041**
167
- (`8dd35a3`) — new `/workflow` macro chains roadmap → ADR → pipeline →
168
- ship via a per-slug breadcrumb in `vibekit/memory/workflows/<slug>.md`;
169
- `new` / `advance` / `status` subcommands; each phase is an explicit
170
- user action (rule 9, no silent chaining). **Plus:** new
171
- `tools/integration-test-compozy.mjs` sibling extracted from
172
- `integration-test-guards.mjs` (responsibility seam — guards stays
173
- input-rejection-focused; lifecycle tests for 041 / 043 / 046 live in
174
- the sibling). +24 selfcheck behavioural asserts + 16 integration
175
- lifecycle asserts across the five PRs. All 7 test suites green;
176
- tech-debt CI gate: 0 RED-zone findings across 138 files. **049
177
- (Extension SDK) and 050 (Run dispatcher) remain in `backlog/`** —
178
- confirmed rule-9 parking tickets (type `spike`, P4, `sla:` empty,
179
- explicit trigger conditions per ADR-0018 / ADR-0022). Bug **038**
180
- (install in worktree) was also closed earlier in the same conversation
181
- (PR #27, commit `4c3ed59`).
182
- - **`/dashboard` — visual project state in HTML, snapshot or live
183
- (ticket 051, session 33)**. Zero-dep, pure `node:` stdlib. Two modes
184
- from one entry: `node vibekit/tools/scripts/dashboard.mjs` writes a
185
- self-contained `dashboard.html` (inline CSS + vanilla JS, no external
186
- assets — opens by double-click, works offline); `--watch` spawns a
187
- tiny `node:http` server bound to **127.0.0.1 only** (default port
188
- `4242`, override via `--port=N` or `VIBEDEVKIT_DASHBOARD_PORT`) that
189
- serves the page plus a `text/event-stream` endpoint on `/events`. An
190
- `fs.watch` on the platform dir (200 ms debouncer) rebuilds the data
191
- object and pushes it; the page reconnects on disconnect and patches
192
- the DOM in place. Heartbeat every 15 s on idle. Four modules, each
193
- under the 280-line budget: `dashboard-data.mjs` (~160 lines —
194
- single owner of "read project state": pipeline lanes, ADRs,
195
- sessions, roadmap, `[Unreleased]` CHANGELOG; single-sources
196
- `PLATFORM_DIR` via `paths.mjs` per rule 4; exports
197
- `parseFrontmatter` so other scripts can reuse the YAML reader);
198
- `dashboard-html.mjs` (~180 lines — purely functional renderer with
199
- `escapeHtml` everywhere, CSS Grid for the 4-column kanban,
200
- `prefers-color-scheme` light/dark, type/priority/ADR-status colour
201
- badges); `dashboard-server.mjs` (~115 lines — `startDashboardServer`
202
- + `resolvePort` exports; defensive everywhere — `fs.watch`
203
- failures log and continue; SSE clients tracked in a `Set` and
204
- cleaned up on `req.close`); `dashboard.mjs` (~110 lines — CLI
205
- dispatch, `--help`, clean SIGINT). New
206
- `templates/claude/commands/dashboard.md` documents both modes and
207
- the non-goals (read-only, no remote access, no JS framework, no
208
- persistent state). 11 new selfcheck assertions covering every
209
- shipped surface including the `127.0.0.1`-only bind. Smoke-tested
210
- both modes: snapshot writes a 68 KB self-contained file; live mode
211
- serves 69 KB on `127.0.0.1:14242` with the SSE client-script
212
- appended.
213
- - **`home.mjs` — single owner of `~/.vibedevkit/` resolution + atomic
214
- write contract (ticket 048 → testing; ADR-0020 follow-up)**. New
215
- `templates/vibekit/tools/scripts/home.mjs` (~95 lines, zero-dep)
216
- exports three functions: `resolveHome()` honours `VIBEDEVKIT_HOME`
217
- with lazy directory creation; `readHomeFile(name)` returns `null`
218
- on absent/malformed/wrong-version files (an *explicitly unknown*
219
- `version` triggers a timestamped `.bak.<ms>` and a fresh start —
220
- absent `version` is treated as legacy and adopted, so existing
221
- `fleet.json` is not destroyed on first read); `writeHomeFile(name,
222
- data)` writes atomically via `tmp.<pid>` + `renameSync`, stamping
223
- `version: 1` when absent. `fleet.mjs` migrated to delegate to the
224
- helper — `VIBE_FLEET_FILE` (used by the integration test as a path
225
- override) keeps its precedence, so existing tests continue to pass
226
- without changes. 6 new selfcheck assertions
227
- (`resolveHome` / `readHomeFile` / `writeHomeFile` exports,
228
- `renameSync(tmp, path)` atomic-write pattern, `VIBEDEVKIT_HOME`
229
- honoured, `fleet.mjs` imports the helper). Smoke-tested end-to-end
230
- with `VIBEDEVKIT_HOME=<tmpdir>`: list → add → list round-trip works
231
- and the persisted file carries `"version": 1`. ADR-0020 promised
232
- "any next home-scoped consumer (preferences, telemetry cache)
233
- inherits the contract for free" — that promise is now real.
234
- - **5 new ADRs + 11 pipeline tickets from the Compozy comparison pass**
235
- (session 30, `feat/tanstack-support`). Compared VibeDevKit against
236
- `D:\compozy-main` and extracted what fits the constitution. Five **ADRs**
237
- land the architectural decisions: **ADR-0018 — Extension SDK** (subprocess
238
- JSON-RPC contract sketched; *implementation deferred* until a first external
239
- author signals interest; rule-9-driven refusal of the speculative half),
240
- **ADR-0019 — MCP injection in squads** (optional `mcpServers:` field in
241
- agent frontmatter with required `rationale`; `optional: true` default
242
- means the agent loads without the server; no shipped agent declares one
243
- yet — convention only), **ADR-0020 — Workspace registry global**
244
- (formalises `~/.vibedevkit/` with `VIBEDEVKIT_HOME` override, lazy
245
- creation, plain JSON + `version` field, atomic tmp+rename; lists what
246
- belongs there and what does *not* — no ADRs, no sessions, no SQLite, no
247
- daemon), **ADR-0021 — Provider strategy for review/QA** (thin adapter
248
- contract at `templates/vibekit/runtime/providers/review/` with `gh` as the
249
- shipped seed; missing CLI is a refusal not a fallback — rule 8;
250
- `/git` and `/qa-signoff` keep calling `gh` directly until the next
251
- consumer justifies the rewrite), **ADR-0022 — Run dispatcher** (direction
252
- accepted; implementation deferred behind three explicit trigger
253
- conditions; locks the `dependencies: []` DAG semantics for ticket 040
254
- so the future implementation does not retrofit free-text). **Three green
255
- items** implemented this session: (a) **two-tier memory** via
256
- `templates/vibekit/pipeline/.gitignore` excluding `*.scratch.md` +
257
- one-line addition to `/dev-start` describing the per-task scratch
258
- convention (ticket 042 → testing); (b) **review providers adapter
259
- scaffold** — `_adapter.mjs` (contract + `ProviderError` + `validateAdapter`),
260
- `detect.mjs` (`resolveAdapter` resolves from `vibekit/config.json` →
261
- origin auto-detect → refusal; single-sources `PLATFORM_DIR` from
262
- `paths.mjs` per rule 4), `gh.mjs` (thin `spawnSync` wrapper around
263
- `gh pr create / api / pr comment`; throws typed `ProviderError` codes
264
- `CLI_MISSING | AUTH | NOT_FOUND | REMOTE_REJECTED | BAD_INPUT | PARSE`)
265
- (ticket 044 → testing); (c) **`/watch` slash command** —
266
- `templates/vibekit/tools/scripts/watch.mjs` reuses
267
- `readMostRecentLedger` from the runtime (single-sourced session
268
- resolution), default prints the ledger and exits, `--follow` re-polls
269
- every 500ms and exits cleanly on SIGINT, never prints "0 entries" as
270
- soft success (refused-silently-to-false-negative) (ticket 045 →
271
- testing). **One yellow seed**: `templates/claude/agents/_TEMPLATE.md`
272
- gains a commented-out `mcpServers:` block pointing to ADR-0019 — new
273
- agents read the convention without any shipped agent using it yet.
274
- **Eleven pipeline tickets** (040–050) scaffolded: 040 metadata v2
275
- (dependencies DAG + complexity + spike/docs types), 041 `/workflow`
276
- macro, 042 two-tier memory (testing), 043 auto memory compaction at
277
- `/log-session`, 044 review providers seed (testing), 045 `/watch`
278
- (testing), 046 `/resume` for interrupted sessions, 047 skill packs by
279
- domain (commands subfolders), 048 `home.mjs` helper for ADR-0020,
280
- 049/050 are the trigger-watch tickets parking ADR-0018 and ADR-0022
281
- behind explicit conditions. **13 new selfcheck assertions** in
282
- `tools/selfcheck-source.mjs` covering every shipped surface: agent
283
- template documents `mcpServers` + `rationale`; the three adapter
284
- module exports; the `/watch` `parseLedgerEntry` export + command
285
- file; the pipeline `.gitignore` rule; `/dev-start`'s scratch line.
286
- `npm test` green end-to-end (selfcheck + 5 integration suites).
287
- - **agent-forge — Fase 6: declarative pipeline DSL + dry-run engine shipped
288
- on a worktree** (session 30, commit `eae2fee` on
289
- `feat/agent-forge-fase6-pipeline-dsl`). Closes ADR-0015 Part A — the
290
- forge orchestration becomes a diffable, simulate-impact-mappable plan.
291
- New `templates/vibekit/squads/agent-forge/pipeline.yaml` declares 9
292
- steps with one bounded retry loop (eval-gate → generate-prompt,
293
- max_cycles: 3) and two conditional steps (`generate-tools` when
294
- `blueprint.tools.length > 0`, `generate-rag` when
295
- `capabilities.rag == true`). New engine
296
- `templates/vibekit/tools/scripts/squad-pipeline.mjs` (252 lines) parses
297
- via `lib/yaml.mjs` (ADR-0013 dynamic import); **refuses on missing
298
- `yaml` with exit 0 + informative message** — pipelines are opt-in, not
299
- hot-path. Sibling `squad-pipeline-condition.mjs` (192 lines) is the
300
- whitelisted parser — only `<id>(.<id>)* <op> <literal>` and `…length
301
- <op> <int>` (no function calls, no boolean chaining, no arithmetic, no
302
- type coercion). `--dry-run` walks the graph against empty ctx and
303
- prints `✓ / ⊘ / ↺` markers. `max_review_cycles` is a hard cap (engine
304
- exits "manual escalation required" rather than looping). Vendor model
305
- names are refused in YAML — only `model_tier: fast|powerful|reasoning`
306
- (router stays the single resolver). Canonical spec
307
- `docs/SQUAD-PIPELINE-FORMAT.md` (258 lines). 2 new selfchecks
308
- (`checkConditionParser` + `checkSquadPipeline`, 8 asserts) +
309
- 4 new integration asserts. agent-forge ROADMAP Fase 6 → ✅. **NOT
310
- shipped this turn** (deferred to tasks 040/039 in the worktree
311
- backlog): `state.json` per run, DevPipeline `working/` stage,
312
- cross-session task ownership.
313
- - **ADR-0017 — TanStack stack recognition: detection + curated playbook +
314
- opt-in empty starter** (session 29). `templates/vibekit/tools/scripts/
315
- detect-stack.mjs` `known` list extended with the TanStack family
316
- (`@tanstack/react-query`, `react-router`, `react-table`, `react-form`,
317
- `react-virtual`, `start`, plus `solid-query`/`vue-query`) — existing
318
- projects on TanStack are no longer invisible to `/setupvibedevkit`. New
319
- `templates/vibekit/workflows/playbooks/tanstack.md` (165 lines) is the
320
- curated *why/when/how*: the family table (pick by concern), the **Core
321
- conventions** block injected into the user's `CLAUDE.md` (server state in
322
- Query never `useState`, `queryOptions` as the unit of reuse, hierarchical
323
- cache keys, typed Router params, deliberate `staleTime`, minimum-key
324
- invalidation), the anti-patterns review will catch, the explicit
325
- Next/Nuxt/Remix conflict ("don't stack two routers"), and the freshness
326
- protocol. `/aidevtool-from0` Phase 3 references the playbook when the
327
- architect proposes TanStack; `/setupvibedevkit` Phase 4 inherits the
328
- conventions block on detection. New `templates/vibekit/starters/tanstack/`
329
- (10 files, 165 lines total) is a Router + Query + Vite skeleton offered
330
- opt-in by `/aidevtool-from0` Phase 6 — **no invented domain** (one
331
- placeholder route), no CSS framework, no backend choice, no example
332
- query, copy-and-step-aside (no upgrade path). TanStack Start documented
333
- as an upgrade path rather than shipped (Start's tooling has been evolving
334
- fast; pinning to a moving target would ship fragility). `install.mjs`
335
- now `copyTree`s `vibekit/starters/` on every install. Selfcheck
336
- (`tools/selfcheck-source.mjs`) gains seven cases asserting detection
337
- pattern, playbook presence, starter deps (`react-router` + `react-query`),
338
- wiring (`QueryClientProvider`, `RouterProvider`), and installer copy —
339
- without prescribing version numbers (owned by the playbook's freshness
340
- protocol).
341
-
342
- - **ADR-0016 — Best-practices restructured: 2-tier rubric, split into rubric
343
- + protocol, stack-agnostic, security routed out** (session 25). The
344
- rubric was 69 lines, flat, hygiene-only; the auditor led with line counts
345
- instead of architecture. Now: `templates/vibekit/best-practices.md`
346
- (323 lines) carries the rubric — risk model, **Tier 1 System &
347
- architecture** (S1 dependency direction, S2 boundaries, S3 coupling/cycles,
348
- S4 state location), **Tier 2 Module & function hygiene** (H1–H7) — each
349
- rule with the **Principle / Smells / Fix / Don't over-apply** shape that
350
- calibrates the auditor against false positives. New companion
351
- `templates/vibekit/review-protocol.md` (214 lines) carries the protocol —
352
- severity vocabulary `BLOCKER`/`HARD`/`CANDIDATE`/`NIT` mapped onto the
353
- scanner's existing 1..5 scale, scope clauses (Tier 2 relaxed for spikes),
354
- the run-the-analysis steps, the report shape, and an honest **Scanner
355
- Map** listing only the four detectors that actually exist
356
- (`detectLineBudget`, `detectSrpAnd`, `detectReactStateLoop`,
357
- `detectTodoMarkers`) plus the `vibekit/detectors/*.mjs` plug-in slot.
358
- Deliberately rejected (recorded in the ADR): a Tier 2 — Security
359
- (duplicates `code-security`/`security`/`infra-security` and
360
- `/audit`/`/deps-audit`/`/security-setup` — routed out via *Adjacent
361
- concerns* instead); stack-coupled examples (Supabase/RLS/zod/NEXT_PUBLIC,
362
- rule 9); a `// vibe-allow §ID` pragma (not implemented); promised but
363
- absent detectors (cycles, secrets, `any`-counter); a parallel severity
364
- scale (would drift from the `--ci` gate). Dogfood install mirrored.
365
-
366
- - **ADR-0015 — Pipeline DSL, `working/` stage, and multi-session work-claims**
367
- (session 24, proposed). One ADR opens two adjacent moves, sharing one
368
- substrate (`state.json` per in-flight item). **Part A:** declarative
369
- `pipeline.yaml` per squad (steps + `condition` + `on_reject` +
370
- `max_review_cycles` + `model_tier` + `type: checkpoint`) with a `squad-
371
- pipeline.mjs` engine — opt-in per squad, parses via `lib/yaml.mjs`
372
- (ADR-0013 dynamic import), refuses on missing `yaml` with a clear message,
373
- whitelisted `condition` grammar (no arbitrary expression eval), no vendor
374
- model names in YAML (the router stays the single resolver), dry-run is a
375
- first-class mode. **Part B:** a `working/` stage in the DevPipeline that
376
- holds *only WIP*, leaving `testing/` for QA sign-off; `/pipeline start
377
- <id>` and `/pipeline stop <id>` attach/detach the task to the workspace
378
- record (`.claude/.workspace/<sid>.json` gains a `tasks[]` array), the
379
- dashboard surfaces which session owns which task, stale auto-eviction
380
- defaults to 90m without a heartbeat. **Part C:** canonical `state.json`
381
- schema covers both task-in-flight and pipeline-run; future `/runs` lists
382
- the last N across squads. Inspired by a read of opensquad's declarative
383
- pipeline, *not* a copy — the kit's zero-dep + model-router + simulate-
384
- impact invariants reshape the grammar. Roadmap markers updated:
385
- agent-forge ROADMAP gains Fase 6 (task 036, 📋); `docs/ROADMAP.md` gains
386
- a "Next" block before the design invariants; agent-forge ROADMAP "Net
387
- additions" lists 5 new ADR-0015-driven net additions. No code touched
388
- this turn — only the ADR + roadmap + this entry.
389
-
390
- ### Added
391
- - **PR [#19](https://github.com/reiTavares/VibeDevKit/pull/19) merged to
392
- `main`** (session 27, rebase strategy — individual commits preserved).
393
- Ships agent-forge Fases 1–5 (ADR-0012), ADR-0015 roadmap markers,
394
- ADR-0016 tiered rubric + companion review-protocol + rewritten
395
- `/analyze-code-ia-practices`, and the first BLOCKER cleared by the new
396
- rubric (task 036, integration-test-tooling split). 10 commits land on
397
- main; local `main` fast-forwarded.
398
-
399
- ### Changed
400
- - **selfcheck-checks.mjs split by invariant category + checkLevelsAndSchema
401
- SRP split** (session 28, task 037, **PR [#20](https://github.com/reiTavares/VibeDevKit/pull/20)
402
- merged to `main`** as `db0632c`) — second pair caught by the ADR-0016 rubric. The 253-line yellow-zone file carried 5 distinct
403
- invariant categories under one umbrella; the rubric's H1 and H2
404
- (`checkLevelsAndSchema` SRP-and) drove a split by responsibility into
405
- three siblings: `tools/selfcheck-runtime.mjs` (113 — boot readers,
406
- atomic I/O, sid sanitization, squad meta), `tools/selfcheck-config.mjs`
407
- (80 — level taxonomy and zod schema, with `checkLevelsAndSchema` itself
408
- split into `checkLevels` + `checkSchema`), `tools/selfcheck-source.mjs`
409
- (123 — source-level patterns, rule 4 enforcement, SHA-pinned workflows;
410
- hosts the shared `listMjs` walker). The orchestrator `tools/selfcheck
411
- -checks.mjs` was deleted (no compatibility shim — rule 9). `tools/selfcheck
412
- .mjs` now imports + dispatches the three new runners plus the two
413
- pre-existing agent-forge ones; gained a cohesion note (241 lines, in the
414
- ~308 tolerance band). `tools/selfcheck-agent-forge.mjs` updated to import
415
- `listMjs` from the new source module. All five integration suites pass;
416
- tech-debt scan emits zero severity-5 findings; SRP-and finding cleared.
417
- - **integration-test-tooling.mjs split by responsibility** (session 26, task
418
- 036 — first BLOCKER caught by the new ADR-0016 rubric). The file was 321
419
- lines (> 308 RED) carrying ~23 subsystems. Extracted the internally-coupled
420
- DevPipeline chain (add → ingest → idempotent → prioritize → wsjf → bugs,
421
- ~39 lines) into a focused sibling `tools/integration-test-tooling-pipeline.mjs`
422
- with its own fixture + reporter (one extra L5 install — cost paid for
423
- isolation). Updated `tools/it-helpers.mjs` header to list all four
424
- integration files; added the new sibling to `npm test` and `prepublishOnly`
425
- scripts. The remaining tooling file is 285 lines (yellow zone) with a
426
- documented cohesion note ("one fixture install, many tool scripts") and a
427
- flagged next seam (agent-forge round-trip) for when budget pressure
428
- returns. All 4 integration suites pass; `tech-debt-scan --ci` no longer
429
- reports a RED-zone finding.
430
- - **`/analyze-code-ia-practices` rewritten + factual fix** (session 25,
431
- ADR-0016). Command now reads both rubric files
432
- (`best-practices.md` + `review-protocol.md`), walks Tier 1 (judgment, no
433
- scanner help) before Tier 2 (scanner findings), routes adjacent concerns
434
- (security, a11y, privacy, deps) to specialist agents instead of absorbing
435
- them. Also corrected a long-standing factual drift: the command
436
- previously claimed the scanner produced `missing-doc` findings — a
437
- detector that has never existed in `tech-debt-detectors.mjs` — and
438
- omitted `todo-marker` which does exist. Replaced with the four real
439
- detectors and their actual severities.
440
- - **Distillation cycle 1 — refuse-by-default + defer-to-demand promoted to the
441
- constitution** (session 23, ADR-0014). After agent-forge Fases 0–5 closed,
442
- the 25 net additions on the squad ROADMAP surfaced two recurring postures
443
- the constitution didn't have written down. `CLAUDE.md` rules 8 + 9 added
444
- (refuse-over-rubber-stamp + build-what-is-asked); rule 1 refined with a
445
- positive-split criterion. 140 → 170 lines (under the 200-line nudge). No
446
- code touched — the cycle codifies patterns already practiced.
447
-
448
- ### Added
449
- - **agent-forge — Fase 5: RAG designer + Go runtime + L5 gate + /fleet Forge
450
- Stats** (session 22, task 035). Closes the original blueprint. New
451
- `lib/rag-designer.mjs` (multilingual-vs-english embedding from
452
- `intent.domain`, pgvector vs qdrant from residency, recursive chunking
453
- tightened for extraction, `top_k` by complexity, hybrid + reranker on by
454
- default). Packager writes 5 `rag/` files when `capabilities.rag: true` and
455
- stamps the Go adapter (`go.mod` + `{{MODULE_PATH}}`). `defaults.l5.
456
- highRiskPaths` now ships with `agent-packages/**` — every forged-agent edit
457
- triggers the simulate-impact gate. `fleet.mjs cmdStats` aggregates per-repo
458
- Forge Stats + a fleet total line. Selfcheck split by responsibility: build
459
- pipeline stays in `selfcheck-agent-forge.mjs` (225 lines), ops checks moved
460
- to `selfcheck-agent-forge-ops.mjs` (107 lines). New `rag-designer.md`
461
- briefing — refuses pinecone-under-no-cloud and `top_k < 4`. **All Fases
462
- 0–5 are ✅; backlog is 0.**
463
- - **agent-forge — Fase 4: production maintenance + Forge Stats + docs**
464
- (session 21, task 034). 13 new `/forge-*` slash commands (list/show/doctor/
465
- policy/budget/audit/eval/redteam/route/fallback-test/refresh-matrix/
466
- killswitch/deprecate) wired through 3 CLI modules + `lib/package-ops.mjs`.
467
- Node runtime adapter ships a `createShadowEval` scaffold. `/vibe-stats`
468
- gains a Forge Stats section. New reference docs `docs/SQUADS/agent-forge.md`
469
- + `docs/AGENT-PACKAGE-FORMAT.md`. Selfcheck `checkPackageOps` + 19
470
- inventory entries. ROADMAP Fase 4 ✅.
471
- - **agent-forge — Fase 3: governance + eval gate** (session 20, task 033). The
472
- refuse-to-ship layer. Three new pure zero-dep modules: `lib/eval-designer.mjs`
473
- (`designEvalSet` — seed golden by intent.category + universal red-team + rubric
474
- + thresholds derived from blueprint privacy/sla/cost; PII-leak block rate forced
475
- to 1.0 when `pii_present`), `lib/eval-runner.mjs` (`runEvalSuite` —
476
- provider-agnostic; mock for CI, real adapter for prod; supports `exact` /
477
- `exact_set` / `numeric_tolerance:N` / `semantic_similarity:>=N`; aggregates p95
478
- latency + cost), `lib/governance-officer.mjs` (`attachGovernance` populates 3
479
- pillars from blueprint + fallback chain from router decision; `validateGovernance`
480
- refuses on missing sections OR `{{TOKEN}}` placeholders; **throws**). Packager
481
- now calls `attachGovernance` first (throws before any I/O), writes 4 populated
482
- governance YAMLs + 4 populated eval files, and stamps `provenance.eval_passed_at`
483
- only when `opts.evalResult.verdict === 'pass'`. `forgeNew` gains opt-in
484
- `runEval = { provider, semantic }` that runs the gate before packaging. Two
485
- agent briefings ship: `eval-designer.md` + `governance-officer.md`. 11
486
- behavioural selfchecks + 6 integration asserts. ROADMAP §6/§7 ✅; Fase 3 ✅.
487
- - **agent-forge — Fase 2: multi-provider + Python runtime** (session 19, task 032).
488
- All five providers now flow end-to-end: Gemini (`systemInstruction` body +
489
- safetySettings note; `functionDeclarations` adapter strips JSON-Schema fields the
490
- parser rejects), DeepSeek (OpenAI-compat + explicit CoT cue prepended to Rules),
491
- Ollama (Markdown body, per-model `chat_template` applied by the host).
492
- `packager.mjs` writes the full 5 prompts + 5 tool adapters every package and
493
- stamps `{{AGENT_NAME}}` / `{{SEE_LICENSE}}` into Node `package.json` + Python
494
- `pyproject.toml` (and their READMEs) when those runtimes are requested.
495
- `runtime_adapters` is now a first-class blueprint field (`enum-multi` over
496
- `[node, python, go]`, default `[node]`) — `validateBlueprint` rejects unknown
497
- entries; `assembleManifest` stamps `spec.runtime_adapters` straight from the
498
- blueprint. Integration test gains 7 new asserts. ROADMAP §5 prompt/tool generators
499
- flipped ✅. Suite green.
500
- - **agent-forge — Fase 1, the model-router engine** (session 18, ADR-0012 §5).
501
- `lib/router.mjs` (`routeAgent`, pure zero-dep) + `router/decision-rules.json` (13
502
- rules, cap 15, shortlists only — no hardcoded quality claims). Filters candidates by
503
- capability + residency, enforces a cross-provider fallback, throws on
504
- `abort_if_no_candidate`, emits the canonical Model Selection Rationale with the
505
- eval-as-authority disclaimer. New `checkRouterEngine` behavioural test (typical +
506
- on-prem blueprints). **Refactor**: agent-forge selfchecks moved to
507
- `tools/selfcheck-agent-forge.mjs` (real responsibility seam; `selfcheck-checks.mjs`
508
- back to 251 lines). Squad ROADMAP §4.3 / §4.4 / §12 → ✅. Task 031 now 2/7.
509
- - **agent-forge — Fase 0 foundations** (session 17, ADR-0012). New optional L4+
510
- *factory* squad that forges portable, multi-provider Agent Packages for projects
511
- outside the kit. Added the squad scaffold (`vibekit/squads/agent-forge/` README +
512
- `best-practices.md`), a dated/ADR-gated `capability-matrix.json` with a parse/id
513
- selfcheck guard, and the full APF v1 template tree (45 files). Agents + `/forge-*`
514
- commands land in Fases 1–5 (031–035). PR #18.
515
- - **DevPipeline backlog cleared (all 25 tasks)** — session 16. Fixed: git-call
516
- timeouts (007), boot truncation/tie-break (009/010), partial-preset crash (013),
517
- atomic writes + collision-safe ids (011), live-ledger race (008). Security:
518
- sanitizeSid everywhere (012), SHA-pinned Actions + least-privilege CI (019/020),
519
- README trust section + installer hook backup (021/022). Added: guards test suite
520
- (014–018), detectors seed (026). Changed: single-source level taxonomy + passthrough
521
- schema [ADR-0010] (024/025), single-source paths via pathsFor [ADR-0011] (023),
522
- shared readJsonSafe/squadOf (027/028), line-budget cohesion + nits + selfcheck split
523
- (005/006/029). No public API removed.
524
- - Released: **v1.4.0 (npm + GitHub)** — onboarding defaults + level-cap fixes.
525
- - Changed: **recommended start level by project type** (ADR-0009) — installer auto-picks
526
- **L3** (greenfield) / **L7** (existing) instead of always L2; docs retagged (LEVELS.md
527
- now has L6/L7 sections + "Where to start"; both instrucoes; README quickstart).
528
- - Fixed: **level cap stuck at 6** — `install.mjs` downgraded `--level 7`→2 and `doctor.mjs`
529
- flagged L7 as out of range; both accept 1–7 now. Stale 1-5/1-6 range hints corrected.
530
- - Released: **v1.3.0 (npm + GitHub)** — launches the **L7 "Ecosystem & Scale"** tier
531
- (`/vibe-level 7`, capability tier, no new hook) + all post-1.2 capabilities.
532
- - Added: **L7 as a real level** — `getLevel` 1→7, labels, `--level 1-7`, `vibe-level 7`,
533
- selfcheck/integration coverage. [ADR-0008]
534
- - Added: **Diverse & visual testing harness (MVP)** — `/visual-test` + `visual-test.mjs`
535
- scaffold Playwright (JS + Python) starters; wired into scaffold-tests/qa-signoff/ship.
536
- [ADR-0007]
537
- - Added: **Fleet mode (MVP)** — `/fleet` + `fleet.mjs`: a control plane over many
538
- repos (registry at `~/.vibedevkit/fleet.json`; aggregate `stats`/`audit`; detect
539
- CLAUDE.md rule drift). Roadmap #2.
540
- - Added: **Outcome-driven agent tuning (MVP)** — `/tune-agents` + `agent-tuning.mjs`
541
- propose briefing refinements (applies nothing). Roadmap #3.
542
- - Added: **Editor/CI surfaces (MVP)** — status-line widget (`statusline.mjs`) +
543
- `quality.yml` CI workflow (contract-drift + tech-debt gates). Roadmap #4.
544
- - Added: **Pluggable detectors & stack presets (MVP)** — `vibekit/detectors/*.mjs`
545
- drop-ins + `install.mjs --preset next|go|python`. Roadmap #5.
546
- - Changed: **Split two RED-zone files** off the constitution gate — `integration-test.mjs`
547
- (→ core + tooling + `it-helpers.mjs`) and `session-start.mjs` (→ `boot-signals.mjs`);
548
- behaviour-identical, gate green.
549
- - Added: **`code-security` agent** — security-team sub-specialist for the code's
550
- external surface (integration code, dependency provenance/SBOM, SAST/CodeQL).
551
- - Added: **GitHub-native security** — `.github/dependabot.yml` + an advisory
552
- `security.yml` workflow (dependency-review + deps-audit + CodeQL), `gh-alerts.mjs`
553
- (Dependabot/code-scanning alerts → DevPipeline backlog), and a `/security-setup` command.
554
- - Changed: **`/deps-audit` grown into a dependency policy** — license allow/deny,
555
- CycloneDX SBOM (`--sbom`), lockfile-drift, driven by a new `deps` config block.
556
- - Added: ROADMAP "supply-chain & code security" section (shipped) + a roadmap
557
- **status convention** (`⏳ in progress` alongside `✅`/`📋`/`🟡`) in `docs/ROADMAP.md`
558
- and the installed-project template `templates/vibekit/memory/roadmap.md`.
559
- - Added: VibeDevKit context platform scaffolded (2026-05-22).