diff --git a/.changeset/applicable-guidance-docs.md b/.changeset/applicable-guidance-docs.md new file mode 100644 index 00000000..74093abb --- /dev/null +++ b/.changeset/applicable-guidance-docs.md @@ -0,0 +1,5 @@ +--- +"@design-intelligence/ghost": patch +--- + +Clarify task-specific brand guidance, early-preview status, agent selection, and delivery boundaries. diff --git a/README.md b/README.md index 46acc448..aed7307b 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@ # ghost -Use ghost to give agents applicable brand guidance before they start work. A -`.ghost/` package stores your stance, voice, trust moves, and concrete materials -in the repo. Agents select and read that guidance while working on a screen, -email, empty state, or sentence. +An agent holds nothing it isn't handed. It can build the screen, write the +email, draft the sentence, but your brand's stance, restraint, and trust +moves live in heads and PDFs it never sees. ghost puts those decisions in +the repo as plain files, each stating when it applies, so any agent can +pick up what governs the task. ```text .ghost/ @@ -13,78 +14,102 @@ email, empty state, or sentence. asset.logo.md # points at the actual SVGs ``` -Reviewers repeat the same feedback on every surface: "that's not our voice." -Write the decision in `.ghost/` so the next agent has it before starting work. +Each file says when it applies, what the brand wants, what it refuses, and +which real files back it up. Claude Code, Codex, Cursor, and Goose can all use the same guidance. +ghost is bring-your-own-agent: the CLI never calls a model and needs no +API key. [Project site](https://block.github.io/ghost/) · [npm](https://www.npmjs.com/package/@design-intelligence/ghost) -> [!WARNING] -> ghost is a public development preview. It is not ready for adoption, and we -> are not seeking external testers yet. The CLI, package format, and APIs may -> change without migration support. +## What it looks like + +This demo uses a filled-in package; `ghost init` gives you a usable +starter. You ask your agent for a transactional email. The agent runs: + +```bash +ghost gather "write a transactional email about seller reverification" +``` + +gather prints the complete menu: every selectable guidance file and when it +applies. The cover is excluded from selection and included by every pull. +gather never filters or ranks the menu. Selection belongs to the agent, +which reads the menu and picks what governs the task: + +> *Agent's selection:* `foundation.voice`, +> `context.email-transactional`, `shared.content-integrity` apply. +> `context.marketing-web` is the wrong register for a transactional email. +> `foundation.motion` does not apply; email has no motion. + +The agent then runs +`ghost pull foundation.voice context.email-transactional shared.content-integrity`. +pull delivers the cover, the selected guidance in its original words, and +the sources each file declares, inlined or as pointers. Successful gather +and pull calls are logged locally, so you can see what the CLI delivered +for the run. + +> [!NOTE] +> ghost is an early preview. The CLI, package format, and APIs may change +> without migration support, and breaking changes can ship in minor +> versions. If that doesn't scare you, we'd love your feedback: try it on a +> real repo and tell us what broke or confused you. ## Install +Use the local CLI with `npx ghost`, or make `ghost` available on your PATH +for the commands below. + ```bash npm install -D @design-intelligence/ghost npx ghost skill install ``` -After upgrading, run `npx ghost skill check` to compare the installed skill -with this CLI's bundle. Use `--agent` or `--dest` to select an installation; -the command prints the directory it checks and never modifies it. Review any -local edits before reinstalling with `ghost skill install --force`. - ## Use It -ghost is **bring-your-own-agent**. Install the skill bundle so Claude Code, -Codex, Cursor, Goose, or another host agent knows how to author and use the +Install the skill bundle so your host agent knows how to author and use the ghost package, then ask in plain English: ```text Set up the ghost package for this repo. Write down the decision I keep repeating about checkout. Brief this work from the ghost package. -Review this diff against the ghost checks. +Review this diff against the ghost review checks. ``` -Your agent selects, interprets, and applies the guidance. The CLI handles the -repeatable work without calling an LLM, so ghost needs no API key and does not -lock you into one agent. +Your agent selects, interprets, and applies the guidance. + +ghost never grades the work. It makes sure the CLI delivers the brand's +actual words, and shows you what it delivered. Whether the result is good is +still your call, and `ghost review` is built for that moment: it lays the +change, the guidance, and the review checks side by side so a reviewer can +judge quickly. -## Use Guidance While Making +## The loop -Your agent works with the package through a small set of commands. The default -scaffold is intentionally usable before the brand is fully documented. Its -provisional decisions should be replaced or confirmed as the brand becomes -known. +The starter package is usable before the brand is fully documented. Confirm +or replace its provisional guidance as the brand becomes known. Run setup +once per repo, then gather, pull, and review for each task: ```bash -ghost init # scaffold .ghost/ with a robust provisional baseline -ghost checks init # opt in to review assertions -ghost validate # make sure the package is well-formed -ghost gather # before building: show the complete guidance menu -ghost pull # read the cover plus picked nodes' full bodies -ghost review # during review: match a diff to guidance and checks -ghost stats # while tuning: see what agents reached for -ghost skill install # install the unified ghost skill bundle -ghost skill check # compare an installation with the shipped skill -ghost manifest # emit a machine-readable index of commands and flags +# Setup (once per repo) +ghost init # create .ghost/ with a usable starter package +ghost checks init # opt in to review checks +ghost validate # check the package is well-formed + +# The loop (every task) +ghost gather "write a transactional email about seller reverification" +ghost pull foundation.voice # deliver the cover plus selected guidance and sources +ghost review # assemble an advisory review packet for a diff ``` -For a task-specific gather, your agent reads the complete, unfiltered menu and -pulls every node whose stated situation applies. `ghost gather --format json` inspects -the catalog without grounding a task. Because only selected nodes enter the -working context, the agent can see the shape of the brand without loading the -whole package. +Your agent supplies the task and the applicable IDs; the example above uses +an ID from the starter package. Review requires review checks and a Git diff +against an existing commit. -`gather` and `pull` write a Git-ignored local log. Use `ghost stats` to inspect -it and tune node contexts. - -Run `ghost --help` for the core workflow and `ghost --help` for -current flags and command behavior. +While tuning the package, `ghost stats` summarizes what agents actually +reached for. See the [CLI reference](https://github.com/block/ghost/blob/main/packages/ghost/src/skill-bundle/references/schema.md#command-behavior) +for all commands, including `stats`, `skill check`, and `manifest`. ## Thesis @@ -93,16 +118,21 @@ help the next generation. Record where the model's default is good enough and where the brand must differ, then give those decisions to the agent before it starts. -A `.ghost/` package keeps that guidance in the repo with the materials it +A `.ghost/` package keeps that guidance in the repo with the sources it points at and the conditions where it applies. Buttons stay buttons. The moments that carry your brand get your stance instead of the default. Write the decision once, and each agent can use it when the same situation returns. -## How It Works +Selection is by applicability, not similarity. The menu states when each +file applies, and the agent pulls what governs the task, including guidance +whose words never appear in the prompt. + +## How it works -A ghost package is a small folder of prose. Your agent finds the guidance that -applies, reads it, and uses it while making. The CLI supports that work with -repeatable commands for scaffolding, validation, retrieval, and review. +The package is a folder of guidance files. Each file is one brand +decision: frontmatter saying when it applies and which sources back it, +and the guidance itself in prose. There is no hierarchy to learn. The +folder is flat, and directories are only for browsing. ```text .ghost/ @@ -110,17 +140,13 @@ repeatable commands for scaffolding, validation, retrieval, and review. glossary.md # your kind vocabulary + what each kind means brand.md # example cover included by every pull principle.trust.md # guidance of kind `principle` - asset.logo.md # guidance that points at concrete materials - checks/ # optional review assertions; never nodes + asset.logo.md # guidance that points at concrete sources + checks/ # optional review checks; not guidance files ``` -The package is a **flat set of nodes**. The optional `cover:` in -`manifest.yml` may name any node. `ghost gather` excludes it from selection; -every `ghost pull` includes it before selected guidance. The default skeleton -calls that node `brand`, but the filename is not reserved. -A node is one markdown file: a `for` payload in frontmatter (the situation or -activity the guidance is for), optional `materials`, and brand guidance in the -prose body. +The optional `cover:` in `manifest.yml` names the one page always included +by pull. gather excludes it from the selectable menu. The starting structure +calls it `brand`, but the filename is not reserved. ```markdown --- @@ -135,22 +161,14 @@ Use the full lockup when recognition matters. Use the glyph only when space is constrained or when brand presence should recede. ``` -`materials` points at the concrete stuff the guidance is about through -explicit repo-relative file paths or supported external references. Name each -file rather than reaching for a glob pattern. An opaque entry may -include a short note describing what the agent will find there. Components, -patterns, logos, motion files, illustrations, and external asset libraries all -use the same field. Guidance stays in prose; `materials` only says where the -material is. - -**Checks** are optional review assertions in a flat `.ghost/checks/` directory. -Core `ghost init` ships no checks; add them explicitly: - -```bash -ghost checks init -``` +`for` states when the file applies. `materials` lists its sources as explicit +repo-relative paths or supported external references. Name each file instead +of using a glob. A reference may include a short note about what the agent +will find there. Guidance stays in prose; sources say where to look. -Checks are not nodes. They are review assertions used by `ghost review`: +**Review checks** are optional assertions in `.ghost/checks/`. Core +`ghost init` ships no review checks; opt in with `ghost checks init`. +They are used only by review, never by gather or pull: ```markdown --- @@ -161,26 +179,79 @@ references: - asset.logo --- -Grade whether the change preserves the logo guidance in `asset.logo`. +Assess whether the change preserves the logo guidance in `asset.logo`. ``` -`gather` and `pull` give your agent applicable guidance before it builds. -`review` supports the same agent after a change exists: the CLI reads a diff, -matches touched files to node `materials`, and offers relevant checks for the -agent to weigh. Review output never enters generation context. - -## The Package Travels - -Different agents can read the same guidance and apply it to a screen, page, -email, or sentence. The package moves with the repo when someone clones or -forks it. To move the package on its own, copy the `.ghost/` directory and run -`ghost validate --package ` in the receiving workspace. +review reads a diff, matches touched files to guidance sources, and offers +review checks for the agent to weigh. Review output never enters generation +context. Use `ghost review --node` to add guidance that governs a change even +when its sources were not touched. See the CLI reference for flag usage. + +## What ghost can verify + +ghost's CLI delivery is observable by design. That is a deliberate contrast +with pasting a document into a prompt: ghost supplies a local record of what +its CLI delivered, not evidence of what the model read. + +- Successful `gather` and `pull` calls are logged locally in a private + run log excluded from git, so a run shows which guidance was requested and delivered. +- Agents can keep delivered context task-scoped. An email task can pull the + email guidance; a deck task can pull the deck guidance. Different tasks + can pull different subsets instead of the whole book every time. +- Delivery is tested end to end: transport tests verify that complete + guidance survives the pipe, and included source content is always marked + as untrusted source data. + +One honest boundary: a pull proves CLI delivery, not adherence. It does not +prove that the host passed the full output to the model or that the model +read it. Whether the agent followed the guidance is what review, and your +assessment, are for. + +Don't take our word for it. The repo ships two evaluation harnesses: +[`packages/context-control`](./packages/context-control) measures whether +agents select the applicable guidance from the menu, and +[`packages/steering-control`](./packages/steering-control) measures what a +package buys before and after, as a self-contained report. Run them +against your own package. + +## What ghost does not do + +- It does not score brand quality or grade outputs. +- It does not learn the brand automatically; humans confirm every decision. +- It does not guarantee adherence; it makes delivery and review inspectable. +- It does not lock you to a model, agent, or service. The package is plain + files in your git. + +## Why not just… + +**…put it in AGENTS.md?** Agent instruction files are always-on: every +rule rides along on every task, whether it applies or not. ghost guidance +is selected per task, so the agent can leave email rules out of a dashboard, +and the package can grow without growing every prompt. + +**…paste the brand guide into the prompt?** All-or-nothing delivery, no +CLI record of what was delivered, and the guide competes with the task for +attention. ghost delivers the subset the agent selects and logs successful +pulls. + +**…use RAG over the brand docs?** Search finds what sounds similar. +Applicability is situational: the guidance that governs a payment form may +never share vocabulary with the request. ghost shows the whole selectable +menu with explicit conditions and lets the agent judge applicability directly. + +## What it costs to start + +You do not need a finished brand book. `ghost init` scaffolds a usable +starter package, and one real decision beats an empty taxonomy: write down +the thing reviewers keep repeating, give it a condition, and let the +package grow from use. Guidance is markdown in your repo, so maintenance +is ordinary review: edit the file, see the diff, merge. ## Repo Layout | Path | Role | Published? | | ---- | ---- | --- | -| [`packages/ghost`](./packages/ghost) | The public `ghost` CLI, node authoring, package validation, gather/pull, review packet assembly, and the skill bundle. | yes: `@design-intelligence/ghost` | +| [`packages/ghost`](./packages/ghost) | The public `ghost` CLI, guidance authoring, package validation, gather/pull, review packet assembly, and the skill bundle. | yes: `@design-intelligence/ghost` | | [`packages/vessel-react`](./packages/vessel-react) | A standalone shadcn component registry and reference component system. | no | | [`packages/vessel-light`](./packages/vessel-light) | Vessel's design language as a portable `.ghost/` package for agents writing raw HTML/CSS. | no | | [`packages/context-control`](./packages/context-control) | Selection evaluation bench: measures whether agents choose applicable guidance from the complete menu. | no | diff --git a/package.json b/package.json index 50f6c0bd..73bf47f6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ghost", "private": true, - "description": "Portable brand guidance for AI agents", + "description": "Portable brand guidance that agents read before making and use during review.", "license": "Apache-2.0", "packageManager": "pnpm@10.33.0", "engines": { diff --git a/packages/ghost/README.md b/packages/ghost/README.md index 7864c963..51da5dda 100644 --- a/packages/ghost/README.md +++ b/packages/ghost/README.md @@ -1,149 +1,255 @@ # @design-intelligence/ghost -Use ghost to give agents applicable brand guidance before they start work. A -`.ghost/` package stores your stance, voice, trust moves, and concrete materials -in the repo. Agents select and read that guidance while working on a screen, -email, empty state, or sentence. +An agent holds nothing it isn't handed. It can build the screen, write the +email, draft the sentence, but your brand's stance, restraint, and trust +moves live in heads and PDFs it never sees. ghost puts those decisions in +the repo as plain files, each stating when it applies, so any agent can +pick up what governs the task. -Reviewers repeat the same feedback on every surface: "that's not our voice." -Write the decision in `.ghost/` so the next agent has it before starting work. +```text +.ghost/ + glossary.md # your vocabulary + principle.trust.md # "near the moment of payment, reduce felt risk…" + voice.md # how the brand talks + asset.logo.md # points at the actual SVGs +``` + +Each file says when it applies, what the brand wants, what it refuses, and +which real files back it up. + +Claude Code, Codex, Cursor, and Goose can all use the same guidance. +ghost is bring-your-own-agent: the CLI never calls a model and needs no +API key. + +[Project site](https://block.github.io/ghost/) · [Repo](https://github.com/block/ghost) + +## What it looks like + +This demo uses a filled-in package; `ghost init` gives you a usable +starter. You ask your agent for a transactional email. The agent runs: + +```bash +ghost gather "write a transactional email about seller reverification" +``` + +gather prints the complete menu: every selectable guidance file and when it +applies. The cover is excluded from selection and included by every pull. +gather never filters or ranks the menu. Selection belongs to the agent, +which reads the menu and picks what governs the task: + +> *Agent's selection:* `foundation.voice`, +> `context.email-transactional`, `shared.content-integrity` apply. +> `context.marketing-web` is the wrong register for a transactional email. +> `foundation.motion` does not apply; email has no motion. -[Project site](https://block.github.io/ghost/) · -[Repo](https://github.com/block/ghost) +The agent then runs +`ghost pull foundation.voice context.email-transactional shared.content-integrity`. +pull delivers the cover, the selected guidance in its original words, and +the sources each file declares, inlined or as pointers. Successful gather +and pull calls are logged locally, so you can see what the CLI delivered +for the run. + +> [!NOTE] +> ghost is an early preview. The CLI, package format, and APIs may change +> without migration support, and breaking changes can ship in minor +> versions. If that doesn't scare you, we'd love your feedback: try it on a +> real repo and tell us what broke or confused you. ## Install +Use the local CLI with `npx ghost`, or make `ghost` available on your PATH +for the commands below. + ```bash npm install -D @design-intelligence/ghost npx ghost skill install ``` -After upgrading, run `npx ghost skill check` to compare the installed skill -with this CLI's bundle. Use `--agent` or `--dest` to select an installation; -the command prints the directory it checks and never modifies it. Review any -local edits before reinstalling with `ghost skill install --force`. - ## Use It -ghost is **bring-your-own-agent**. Install the skill bundle so Claude Code, -Codex, Cursor, Goose, or another host agent knows how to author and use the +Install the skill bundle so your host agent knows how to author and use the ghost package, then ask in plain English: ```text Set up the ghost package for this repo. Write down the decision I keep repeating about checkout. Brief this work from the ghost package. -Review this diff against the ghost checks. +Review this diff against the ghost review checks. ``` -Your agent decides what applies and interprets the guidance. The CLI handles -repeatable work without calling an LLM, so ghost needs no API key and does not -lock you into one agent. +Your agent selects, interprets, and applies the guidance. -## Use Guidance While Making +ghost never grades the work. It makes sure the CLI delivers the brand's +actual words, and shows you what it delivered. Whether the result is good is +still your call, and `ghost review` is built for that moment: it lays the +change, the guidance, and the review checks side by side so a reviewer can +judge quickly. -Your agent works with the package through a small set of commands: +## The loop + +The starter package is usable before the brand is fully documented. Confirm +or replace its provisional guidance as the brand becomes known. Run setup +once per repo, then gather, pull, and review for each task: ```bash -ghost init # scaffold .ghost/ with the starter package -ghost checks init # opt in to review assertions -ghost validate # make sure the package is well-formed -ghost gather # before building: show the complete guidance menu -ghost pull # read the cover plus picked nodes' full bodies -ghost review # during review: match a diff to guidance and checks -ghost stats # while tuning: see what agents reached for -ghost skill install # install the unified ghost skill bundle -ghost skill check # compare an installation with the shipped skill -ghost manifest # emit a machine-readable index of commands and flags +# Setup (once per repo) +ghost init # create .ghost/ with a usable starter package +ghost checks init # opt in to review checks +ghost validate # check the package is well-formed + +# The loop (every task) +ghost gather "write a transactional email about seller reverification" +ghost pull foundation.voice # deliver the cover plus selected guidance and sources +ghost review # assemble an advisory review packet for a diff ``` -For a task-specific gather, your agent reads the complete, unfiltered menu and -pulls every node whose stated situation applies. `ghost gather --format json` inspects -the catalog without grounding a task. +Your agent supplies the task and the applicable IDs; the example above uses +an ID from the starter package. Review requires review checks and a Git diff +against an existing commit. -Run `ghost --help` for the core workflow and `ghost --help` for -current flags and command behavior. +While tuning the package, `ghost stats` summarizes what agents actually +reached for. See the [CLI reference](https://github.com/block/ghost/blob/main/packages/ghost/src/skill-bundle/references/schema.md#command-behavior) +for all commands, including `stats`, `skill check`, and `manifest`. -When new work uses unchanged components or prose guidance, name the nodes that -govern the change: +## Thesis -```bash -ghost review --node component.button --node voice +Agents now make screens, emails, and sentences. Polishing one output does not +help the next generation. Record where the model's default is good enough and +where the brand must differ, then give those decisions to the agent before it +starts. + +A `.ghost/` package keeps that guidance in the repo with the sources it +points at and the conditions where it applies. Buttons stay buttons. The +moments that carry your brand get your stance instead of the default. Write the +decision once, and each agent can use it when the same situation returns. + +Selection is by applicability, not similarity. The menu states when each +file applies, and the agent pulls what governs the task, including guidance +whose words never appear in the prompt. + +## How it works + +The package is a folder of guidance files. Each file is one brand +decision: frontmatter saying when it applies and which sources back it, +and the guidance itself in prose. There is no hierarchy to learn. The +folder is flat, and directories are only for browsing. + +```text +.ghost/ + manifest.yml # schema + package id + optional cover id + glossary.md # your kind vocabulary + what each kind means + brand.md # example cover included by every pull + principle.trust.md # guidance of kind `principle` + asset.logo.md # guidance that points at concrete sources + checks/ # optional review checks; not guidance files ``` -Repeat `--node` for each applicable ID. This adds guidance and referencing -checks alongside existing diff matches; it never filters other checks. -Unknown IDs stop review rather than produce a partial packet. Review still -requires `.ghost/checks/`, and the agent decides which offered checks apply. - -## Library - -```ts -import { - initGhostPackage, - lintGhostPackage, - loadGhostPackage, -} from "@design-intelligence/ghost/package"; -import { buildCatalogMenu } from "@design-intelligence/ghost/core"; -import { - gatherGhostPackage, - inspectGhostMaterial, - loadGhostSnapshot, - pullGhostNodes, -} from "@design-intelligence/ghost/embed"; -import { buildCli } from "@design-intelligence/ghost/cli"; +The optional `cover:` in `manifest.yml` names the one page always included +by pull. gather excludes it from the selectable menu. The starting structure +calls it `brand`, but the filename is not reserved. + +```markdown +--- +for: Placing, sizing, or choosing a logo lockup or glyph. +materials: + - brand/logo-lockup.svg + - brand/logo-glyph.svg + - https://figma.com/file/example?node-id=logo-lockups +--- + +Use the full lockup when recognition matters. Use the glyph only when space is +constrained or when brand presence should recede. ``` -Embedded hosts can use `@design-intelligence/ghost/embed` for the same semantic -contract as CLI `gather` and `pull` without CLI-only presentation fields or event -side effects. `loadGhostSnapshot` reads the package, resolved/absent/dangling -cover state, glossary kinds, and checks. `gatherGhostPackage` returns the -unfiltered selectable menu without cover content; checks stay separate. -Gather and pull return skipped guidance files in `diagnostics`. Check gather's -`contract.completeness.complete` before treating its menu as complete; these -loading diagnostics do not replace `ghost validate`. -`pullGhostNodes` includes the resolved cover before validated, de-duplicated -selected ids, returns misses with suggestions, stable concrete/prose ordering, -stripped node bodies, extracted Skeletons, and material transport packets. Use -`inspectGhostMaterial` only for materials declared by a pulled node; it is local -and bundled-only by default, with explicit host policy required for referenced -files. Symlinks must resolve within the permitted directory. Pull still inlines -small referenced text by default; use `inlineMaterials: false` before inspection -when the host requires explicit read permission. HTTPS inspection is always -rejected. Included and inspected material is marked `untrusted: true`; hosts -must keep it in a data or tool-result channel -rather than an instruction channel. Embedded operations do not write -`.ghost/.events`; hosts may -persist exported observability events in their own telemetry. - -Available subpath exports: `@design-intelligence/ghost`, -`@design-intelligence/ghost/package`, -`@design-intelligence/ghost/core`, -`@design-intelligence/ghost/embed`, and -`@design-intelligence/ghost/cli`. - -## Delivery evidence - -Process-pipe tests compare complete output for large Unicode bodies, aggregate -pulls, and full guidance menus, including slow readers. Material tests compare -complete accepted text and check that non-inline materials remain explicit -references or unavailable results. A reference is not evidence that its content -was read. Markdown framing and whitespace normalization differ from raw files. - -These tests cover the CLI process and embedded operations, not a host's tool -message or the model's use of it. They do not establish that all authored -content survives loading and rendering. If a host clips output, retrieve the -complete result through a lossless host route; do not substitute a summary or -claim complete grounding while required content remains unavailable. - -## Project Status: Development Preview - -ghost is being built in public, but it is not ready for adoption and the -project is not seeking external testers yet. The CLI, package schema, on-disk -`.ghost/` package shape, and public JavaScript exports may change without -migration support. Breaking changes may ship in minor versions; patch versions -are reserved for fixes that should not require migration. +`for` states when the file applies. `materials` lists its sources as explicit +repo-relative paths or supported external references. Name each file instead +of using a glob. A reference may include a short note about what the agent +will find there. Guidance stays in prose; sources say where to look. + +**Review checks** are optional assertions in `.ghost/checks/`. Core +`ghost init` ships no review checks; opt in with `ghost checks init`. +They are used only by review, never by gather or pull: + +```markdown +--- +name: logo-clearspace-holds +description: Logo usage preserves clearspace, lockup integrity, and glyph rules. +severity: medium +references: + - asset.logo +--- + +Assess whether the change preserves the logo guidance in `asset.logo`. +``` + +review reads a diff, matches touched files to guidance sources, and offers +review checks for the agent to weigh. Review output never enters generation +context. Use `ghost review --node` to add guidance that governs a change even +when its sources were not touched. See the CLI reference for flag usage. + +## What ghost can verify + +ghost's CLI delivery is observable by design. That is a deliberate contrast +with pasting a document into a prompt: ghost supplies a local record of what +its CLI delivered, not evidence of what the model read. + +- Successful `gather` and `pull` calls are logged locally in a private + run log excluded from git, so a run shows which guidance was requested and delivered. +- Agents can keep delivered context task-scoped. An email task can pull the + email guidance; a deck task can pull the deck guidance. Different tasks + can pull different subsets instead of the whole book every time. +- Delivery is tested end to end: transport tests verify that complete + guidance survives the pipe, and included source content is always marked + as untrusted source data. + +One honest boundary: a pull proves CLI delivery, not adherence. It does not +prove that the host passed the full output to the model or that the model +read it. Whether the agent followed the guidance is what review, and your +assessment, are for. + +Don't take our word for it. The repo ships two evaluation harnesses: +[`packages/context-control`](https://github.com/block/ghost/tree/main/packages/context-control) measures whether +agents select the applicable guidance from the menu, and +[`packages/steering-control`](https://github.com/block/ghost/tree/main/packages/steering-control) measures what a +package buys before and after, as a self-contained report. Run them +against your own package. + +## What ghost does not do + +- It does not score brand quality or grade outputs. +- It does not learn the brand automatically; humans confirm every decision. +- It does not guarantee adherence; it makes delivery and review inspectable. +- It does not lock you to a model, agent, or service. The package is plain + files in your git. + +## Why not just… + +**…put it in AGENTS.md?** Agent instruction files are always-on: every +rule rides along on every task, whether it applies or not. ghost guidance +is selected per task, so the agent can leave email rules out of a dashboard, +and the package can grow without growing every prompt. + +**…paste the brand guide into the prompt?** All-or-nothing delivery, no +CLI record of what was delivered, and the guide competes with the task for +attention. ghost delivers the subset the agent selects and logs successful +pulls. + +**…use RAG over the brand docs?** Search finds what sounds similar. +Applicability is situational: the guidance that governs a payment form may +never share vocabulary with the request. ghost shows the whole selectable +menu with explicit conditions and lets the agent judge applicability directly. + +## What it costs to start + +You do not need a finished brand book. `ghost init` scaffolds a usable +starter package, and one real decision beats an empty taxonomy: write down +the thing reviewers keep repeating, give it a condition, and let the +package grow from use. Guidance is markdown in your repo, so maintenance +is ordinary review: edit the file, see the diff, merge. + +## Project Status +Early preview; see the note above Install for what that means. ## License diff --git a/packages/ghost/package.json b/packages/ghost/package.json index 1a9771ed..179bae48 100644 --- a/packages/ghost/package.json +++ b/packages/ghost/package.json @@ -1,7 +1,7 @@ { "name": "@design-intelligence/ghost", "version": "0.35.0", - "description": "ghost CLI for portable .ghost/ packages of brand guidance your agent reads before it builds, with advisory review after", + "description": "Portable brand guidance that agents read before making and use during review.", "license": "Apache-2.0", "engines": { "node": "^20.19.0 || >=22.12.0" diff --git a/packages/ghost/src/skill-bundle/SKILL.md b/packages/ghost/src/skill-bundle/SKILL.md index 9b56c03c..21ae40a5 100644 --- a/packages/ghost/src/skill-bundle/SKILL.md +++ b/packages/ghost/src/skill-bundle/SKILL.md @@ -1,10 +1,10 @@ --- name: ghost description: >- - Author, validate, consume, and review against a repo-local ghost package: the - medium-agnostic articulation of a product's brand. Use when the user wants to - set up a .ghost package, write or update guidance nodes, gather brand context - before generation, or assemble a review packet from ghost checks. + Author, validate, consume, and review against a repo-local package of brand + guidance. Use when the user wants to set up a .ghost package, write or update + guidance nodes, gather brand context before generation, or assemble a review + packet from ghost checks. license: Apache-2.0 metadata: homepage: https://github.com/block/ghost @@ -13,7 +13,7 @@ metadata: # ghost: Brand Guidance Packages -A ghost package is the medium-agnostic articulation of a brand: its guidance, +A ghost package is a repo-local package of brand guidance: its guidance, its stance, its conditions, and optional pointers to the concrete materials that guidance governs. Each brand decision is stated once, at the broadest level where it applies, and an agent reads the relevant guidance before building. @@ -76,6 +76,8 @@ ghost review # assemble diff + matched material-backed nodes + checks ghost stats # summarize local gather/pull events while tuning ``` +Review is advisory: ghost never grades; the host agent or human judges the packet. + `gather` does no selection. Its Markdown is an agent-facing instruction surface: the task, then every selectable id and its applicability. Check the full list and pull every id that applies. If none apply, run bare `ghost pull`. diff --git a/packages/ghost/test/skill-bundle.test.ts b/packages/ghost/test/skill-bundle.test.ts index 1ddfdc35..979e0a74 100644 --- a/packages/ghost/test/skill-bundle.test.ts +++ b/packages/ghost/test/skill-bundle.test.ts @@ -64,7 +64,7 @@ describe("ghost skill bundle frontmatter", () => { expect(parsed.frontmatter).toMatchObject({ name: "ghost", description: - "Author, validate, consume, and review against a repo-local ghost package: the medium-agnostic articulation of a product's brand. Use when the user wants to set up a .ghost package, write or update guidance nodes, gather brand context before generation, or assemble a review packet from ghost checks.", + "Author, validate, consume, and review against a repo-local package of brand guidance. Use when the user wants to set up a .ghost package, write or update guidance nodes, gather brand context before generation, or assemble a review packet from ghost checks.", license: "Apache-2.0", metadata: { homepage: "https://github.com/block/ghost",