Skip to content

ghost init --body: packed payloads + vessel-light body install#210

Merged
nahiyankhan merged 6 commits into
skeleton-defaultfrom
body-install
Jul 9, 2026
Merged

ghost init --body: packed payloads + vessel-light body install#210
nahiyankhan merged 6 commits into
skeleton-defaultfrom
body-install

Conversation

@nahiyankhan

Copy link
Copy Markdown
Collaborator

Category: new-feature
User Impact: ghost init --body vessel-light installs a complete, working brand — answered dials, real tokens, embedded fonts, annotated reference compositions, and its own checks — instead of starting from the empty skeleton.
Problem: The skeleton default (#209) hands you the anatomy with the dials unanswered. Users who want full-strength steering on day one had to hand-copy packages/vessel-light/.ghost — and init's TS-string-literal templates physically couldn't carry the body's binary fonts.
Solution: Two pieces. (1) A packed-payload mechanism: init payloads become real files shipped in dist/init-payloads/, copied at build time by scripts/sync-init-payloads.mjs from their canonical sources (mirroring the skill-bundle packing pattern); the template seam widens to carry bytes and async loading. The skeleton migrates onto it — its content is now reviewable markdown instead of ~515 lines of escaped string literals, byte-identical output verified. (2) --body <name>: a new flag, deliberately distinct from --template — templates are shapes of emptiness, a body is the same anatomy inhabited. vessel-light installs the full fork-axis corpus + materials + its own 5 checks (automatically; --with checks on a body is a loud error). The manifest id stays vessel-light — renaming it is step one of adapting the starter, an explicit human act init never pre-executes.

Stacked on #209 (base: skeleton-default). Merge order: #207#208#209 ← this.

Validation:

  • pnpm check + pnpm test via pre-commit on all five commits (132 passed, 1 skipped)
  • Skeleton migration byte-identical: diff -r of scaffold output before/after → exit 0
  • Live: init --body vessel-light → 39 files, validate 0 errors 0 warnings, manifest id: vessel-light, font byte-identical to source (cmp)
  • Error paths verified: unknown body, --body+--template, --body+--with checks
  • check-packed-package + check-release-tarball extended with body probes: fonts and checks survive pnpm pack and the standalone release tarball; font size asserted against source

Changeset: added (minor) — new --body flag and packed-payload capability.

Ghost Review: not run — CLI mechanism + payload packing; no fingerprint-consuming or generation behavior changed. The body payload content itself was reviewed in #208.

File changes

Commit 1 — init: packed-payload mechanism
src/scan/packed-payloads.ts (new): resolves dist/init-payloads/<name> via import.meta.url (dual-root so vitest-from-src resolves synced payloads through dist), walks recursively, text as strings / .woff2 as bytes, deterministic order. templates.ts: TemplateFile.content widens to string | Uint8Array, files() may be async. fingerprint-package.ts: write path handles bytes; overwrite guard/--force/written list unchanged. scripts/sync-init-payloads.mjs (new): build-time copy of packages/vessel-light/.ghost (excluding .events/.gitignore) + src/init-payloads/** into dist; wired into the package build script.

Commit 2 — template: skeleton rides packed files
Skeleton content materialized at src/init-payloads/skeleton/*.md (13 files, exact extraction); skeleton-template.ts/skeleton-grammar.ts deleted; registry loads via the payload loader with stable output order; manifest.yml/.gitignore stay generated. Scaffold output byte-identical; existing skeleton tests pass unchanged.

Commit 3 — init: --body vessel-light
templates.ts: GhostInitBody interface + registry, getInitBody/listInitBodies; the vessel-light body loads its packed payload, keeps its own manifest.yml, generates only .gitignore. fingerprint-package.ts: body option, mutual-exclusion and unknown-body errors. init-command.ts: --body flag, --with checks conflict error. Tests: body inventory (corpus + tells + registers + materials + checks, no .events), manifest id, font byte-equality, validate 0/0, all three error paths. cli-manifest.json regenerated.

Commit 4 — checks: packed-artifact body probes
check-packed-package.mjs: installs the tarball in a temp consumer, runs init --body vessel-light --package …, asserts font/check paths written, lints the result. check-release-tarball.mjs: asserts payload paths exist in the extracted tarball, font size matches source byte count, and the body installs from the standalone tarball.

Commit 5 — docs + changeset
cli-reference.mdx + getting-started.mdx: the template/body distinction, install instructions, the manifest-id doctrine. .changeset/body-install.md: minor.

Screenshots/Demos: N/A — CLI. Try it: pnpm build && node packages/ghost/dist/bin.js init --body vessel-light in an empty dir.

…211)

* skill: adapting-a-starter recipe — the seven-step transplant procedure

* review: resolve package-relative material locators when matching diff paths (#212)

* review: resolve package-relative material locators when matching diff paths

* demo: drop stale parked-branch reference from eval artifacts gitignore

* median: one authored home — model truth stamped at init, prunable by contract (#213)

* corpus: audit backports, check cross-wiring, terminology sweeps

* median: one authored home — headings contract, payload check, all templates stamp the floor

* vessel-light: re-derive median onto the headings contract; docs get the ownership reframe
@nahiyankhan nahiyankhan marked this pull request as ready for review July 9, 2026 14:15
@nahiyankhan nahiyankhan merged commit 8d83bbf into skeleton-default Jul 9, 2026
1 check passed
@nahiyankhan nahiyankhan deleted the body-install branch July 9, 2026 14:15
nahiyankhan added a commit that referenced this pull request Jul 9, 2026
…n floor (#209)

* template: naked skeleton replaces steering default

* checks: median-tells scaffold — live check pairing with anti-goal.median, deterministic floor, model tells

* skill: migrate Morrow teaching shapes to authoring-scenarios

* docs: skeleton starter in getting-started + cli-reference; minor changeset

* ghost init --body: packed payloads + vessel-light body install (#210)

* init: packed-payload mechanism — dist payloads, byte-capable template seam

* template: skeleton rides packed files

* init: --body vessel-light — install the full inhabited package

* checks: packed-artifact body probes — fonts and checks survive pack

* docs: body install in getting-started + cli-reference; minor changeset

* skill: adapting-a-starter — the seven-step starter transplant recipe (#211)

* skill: adapting-a-starter recipe — the seven-step transplant procedure

* review: resolve package-relative material locators when matching diff paths (#212)

* review: resolve package-relative material locators when matching diff paths

* demo: drop stale parked-branch reference from eval artifacts gitignore

* median: one authored home — model truth stamped at init, prunable by contract (#213)

* corpus: audit backports, check cross-wiring, terminology sweeps

* median: one authored home — headings contract, payload check, all templates stamp the floor

* vessel-light: re-derive median onto the headings contract; docs get the ownership reframe
nahiyankhan added a commit that referenced this pull request Jul 9, 2026
…edian floor (#208)

* materials: tokens audit — radius roles, hoist grammar-enumerated values

* corpus: fork-axis re-author — grammar/signature/register/anti-goal

* checks: relationship/value split — density.md retired, median-tells gains demoted rules, frequency thresholds, model-named tells

* materials: regenerate refs — annotated, closed-set complete

* docs: vessel-light README — fork-axis structure and ref-annotation curation

* ghost init: naked skeleton default — grammar, unanswered dials, median floor (#209)

* template: naked skeleton replaces steering default

* checks: median-tells scaffold — live check pairing with anti-goal.median, deterministic floor, model tells

* skill: migrate Morrow teaching shapes to authoring-scenarios

* docs: skeleton starter in getting-started + cli-reference; minor changeset

* ghost init --body: packed payloads + vessel-light body install (#210)

* init: packed-payload mechanism — dist payloads, byte-capable template seam

* template: skeleton rides packed files

* init: --body vessel-light — install the full inhabited package

* checks: packed-artifact body probes — fonts and checks survive pack

* docs: body install in getting-started + cli-reference; minor changeset

* skill: adapting-a-starter — the seven-step starter transplant recipe (#211)

* skill: adapting-a-starter recipe — the seven-step transplant procedure

* review: resolve package-relative material locators when matching diff paths (#212)

* review: resolve package-relative material locators when matching diff paths

* demo: drop stale parked-branch reference from eval artifacts gitignore

* median: one authored home — model truth stamped at init, prunable by contract (#213)

* corpus: audit backports, check cross-wiring, terminology sweeps

* median: one authored home — headings contract, payload check, all templates stamp the floor

* vessel-light: re-derive median onto the headings contract; docs get the ownership reframe
nahiyankhan added a commit that referenced this pull request Jul 9, 2026
…ng-eval harness (#207)

* Add vendored vessel-react fingerprint: taste-floor nodes, materials wired to component sets, baseline hygiene checks

* Rename packages/vessel to packages/vessel-react; workspace fingerprint id follows

* Add vessel-light: Vessel's design language as a portable .ghost fingerprint for raw HTML/CSS agents

* Add steering-eval: portable before/after evaluation harness for Ghost fingerprints; wire vessel-light demo as first consumer

* Fix pilot findings: agent-browser set-viewport invocation, skip empty cells, brandTokens/pulledWords from tape

* Run the full steering-eval matrix on vessel-light: 45 generations + dump-growth, screenshots, metrics, report

* Park eval run artifacts on vessel-eval-artifacts branch; ignore demo/out on mainline

* steering-eval: emit WebP screenshots (shoot to PNG, convert via cwebp, embed webp in report)

* vessel-light: fork-axis re-authoring — grammar/signature/register + median floor (#208)

* materials: tokens audit — radius roles, hoist grammar-enumerated values

* corpus: fork-axis re-author — grammar/signature/register/anti-goal

* checks: relationship/value split — density.md retired, median-tells gains demoted rules, frequency thresholds, model-named tells

* materials: regenerate refs — annotated, closed-set complete

* docs: vessel-light README — fork-axis structure and ref-annotation curation

* ghost init: naked skeleton default — grammar, unanswered dials, median floor (#209)

* template: naked skeleton replaces steering default

* checks: median-tells scaffold — live check pairing with anti-goal.median, deterministic floor, model tells

* skill: migrate Morrow teaching shapes to authoring-scenarios

* docs: skeleton starter in getting-started + cli-reference; minor changeset

* ghost init --body: packed payloads + vessel-light body install (#210)

* init: packed-payload mechanism — dist payloads, byte-capable template seam

* template: skeleton rides packed files

* init: --body vessel-light — install the full inhabited package

* checks: packed-artifact body probes — fonts and checks survive pack

* docs: body install in getting-started + cli-reference; minor changeset

* skill: adapting-a-starter — the seven-step starter transplant recipe (#211)

* skill: adapting-a-starter recipe — the seven-step transplant procedure

* review: resolve package-relative material locators when matching diff paths (#212)

* review: resolve package-relative material locators when matching diff paths

* demo: drop stale parked-branch reference from eval artifacts gitignore

* median: one authored home — model truth stamped at init, prunable by contract (#213)

* corpus: audit backports, check cross-wiring, terminology sweeps

* median: one authored home — headings contract, payload check, all templates stamp the floor

* vessel-light: re-derive median onto the headings contract; docs get the ownership reframe

* build: root build and packed-package check produce the full ghost artifact

Root pnpm build only ran tsc, so dist/init-payloads and dist/skill-bundle
were missing in CI: the vessel-light body test failed and check-packed-package
packed a tarball without payloads. Root build now chains the package-level
build; check:packed-package builds its own complete artifact since the lint
job never runs pnpm build.

Signed-off-by: Nahiyan Khan <nahiyan@squareup.com>

---------

Signed-off-by: Nahiyan Khan <nahiyan@squareup.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant