Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/gather-applicability-fences.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@design-intelligence/ghost": minor
---

Clarify gather's applicability contract in markdown and JSON, and make pulled material and Skeleton fences safe around nested backticks.
8 changes: 4 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ to implementation or assets the agent can inspect), and **how it is assembled**

Altitude lives in the prose: a universal truth is stated plainly; a narrower
truth names its **condition**, the situation it applies in, never a filing
destination. `ghost gather` emits the whole menu (every node's id, kind,
description, and material count); the agent selects just-in-time against the
actual task. `ghost pull` emits selected node bodies and materials. `ghost
destination. `ghost gather` emits the complete menu (every node's id, kind,
description, material count, and payload labels); the agent pulls every node
whose stated situation applies to the actual task. `ghost pull` emits selected node bodies and materials. `ghost
review` reads a diff, matches touched files to node materials, offers relevant
checks, and emits an advisory packet for the host agent to judge.

Expand Down Expand Up @@ -103,7 +103,7 @@ Core workflow:
| `ghost init` | Scaffold `.ghost/` with the skeleton starter: manifest, glossary, a `brand.md` cover, foundation chapters, context nodes, and the cliche floor. `--template minimal` writes a smaller cover-led starter; `--body vessel-light` installs a full inhabited fingerprint instead. `--with checks` also adds the checks directory. |
| `ghost checks init` | Scaffold `.ghost/checks/` with an example review assertion. |
| `ghost validate` | Validate the package: manifest shape, node validity, material locators, check references, and glossary kind prefixes. |
| `ghost gather [ask…]` | Emit the fingerprint menu for the agent to select from. |
| `ghost gather [ask…]` | Emit the complete guidance menu so the agent can pull applicable nodes. |
| `ghost pull <id> [<id>…]` | Emit selected nodes' bodies and materials; append the selection to the local `.ghost/.events` tape. |
| `ghost review` | Emit an advisory review packet for a diff using material-backed nodes and checks (requires `.ghost/checks/`). |
| `ghost pulse` | Summarize local gather/pull events from `.ghost/.events`. |
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/.ghost/pattern.docs-index-card-grid.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ product and offers a small set of next reads or tools.
title, one short description. The hover state can darken the border and invert
a title underline, but it should not become a whole animated tile.
- Card copy explains the job of the destination, not the feature in abstract.
Prefer "Emit the fingerprint menu with gather" over "Powerful context
Prefer "Emit Available guidance with gather" over "Powerful context
discovery."
- Icons are thin-line Lucide symbols at the existing sizes and stroke widths.
They support scanning; they are not illustrations.
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/src/app/tools/scan/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const cards: {
name: "CLI reference",
href: "/docs/cli",
description:
"Emit the fingerprint menu with gather, read selected truths with pull, and tune with pulse.",
"Emit Available guidance with gather, pull selected truths with pull, and tune with pulse.",
icon: <BookOpen className="size-8" strokeWidth={1.5} />,
},
{
Expand All @@ -47,7 +47,7 @@ export default function GhostScanLanding() {
<AnimatedPageHeader
kicker="ghost gather"
title="Context Before Building"
description="The deterministic handoff that emits the fingerprint menu — every truth's id, kind, and descriptionso your agent can select and pull the right context before it builds."
description="The deterministic handoff that emits Available guidance: every truth's id, kind, and description, so your agent can pull applicable context before it builds."
/>

<div
Expand Down
21 changes: 13 additions & 8 deletions apps/docs/src/content/docs/cli-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,11 @@ ghost validate --format json

### Emit the menu: `gather`

`gather` emits the **menu**: every node's id, kind, and description. It does no
selection — the agent reads the ask against the menu and pulls the truths it
judges relevant. There is no slice, no anchor, and no inheritance between nodes;
the package is flat.
`gather` emits **Available guidance** from the Ghost brand fingerprint: every
node's id, kind, and description. It does no selection, filtering, or ranking.
The agent reads the ask against applicability and pulls every node whose stated
situation governs the work. There is no slice, no anchor, and no inheritance
between nodes; the package is flat.

<CliHelp tool="ghost" command="gather" hideDescription />

Expand All @@ -141,13 +142,17 @@ ghost gather "checkout confirmation email" --format json

This is the pre-generation step, and "the right context at the right time": the
agent selects just-in-time against the actual task, then manifests the truths
into whatever it is building — product UI, marketing, email, a landing page.
into whatever it is building: product UI, marketing, email, a landing page. If
nothing applies, the agent should name the fingerprint's silence and avoid
inventing Ghost-backed guidance.

### Read the selected truths: `pull`

`pull` emits the named nodes' full prose bodies. It is how an agent reads the
truths it selected from the menu — preferred over opening the files directly,
because gather and pull append structured JSONL events to `.ghost/.events`.
`pull` emits the named nodes' full prose bodies and materials. It is how an
agent reads the truths it selected from the menu, preferred over opening the
files directly because it inlines small materials, emits inspect-pointers,
extracts Skeletons last, and appends structured JSONL events to
`.ghost/.events`.

That file is an events tape for the fingerprint's author: tweak a node's
description, re-run the task, and `ghost pulse` shows whether the truth appeared
Expand Down
9 changes: 5 additions & 4 deletions apps/docs/src/content/docs/fingerprint-authoring.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Node frontmatter carries only descriptive properties:

| Property | What it does |
| --- | --- |
| `description` | A short summary of the node the retrieval payload the menu shows. |
| `description` | The retrieval payload the menu shows: what the node governs, the observable condition under which it applies, and what it contributes where useful. |
| `materials` | Optional list of locators for the concrete materials the truth is about: repo-relative paths/globs or absolute HTTPS URLs. |
| _passthrough_ | Free-form keys (`audience`, `stage`, …) are preserved for host tooling. |

Expand All @@ -115,7 +115,8 @@ plainly. A narrower truth names its **condition** in the prose — the *situatio
it applies in ("when a surface must show many items at once, carry hierarchy with
weight, not color"), never a destination or filing bucket ("for dashboards:").
The agent reads the condition and decides when the truth applies; that
interpretation is the agent's job, not the filename's.
interpretation is the agent's job, not the filename's. Avoid broad universal
imperatives unless universal retrieval is truly intended.

</DocSection>

Expand All @@ -128,8 +129,8 @@ and *how it is assembled* (the patterns — layouts, flows, states, content
patterns, behavior, visual arrangements). These are drafting prompts, never
frontmatter fields, and a node may answer only one. Each answer lands as a
steering dimension: stance prose is read first — weakest at moving output form
on its own, but the yardstick every later selection is measured against; materials
make a node concrete and drive pull ordering and review matching; patterns and
on its own, but the yardstick every later selection is measured against;
materials provide concrete payload and support review matching; patterns and
Skeletons steer strongest, and Skeleton fences are extracted and emitted dead
last so generation starts from them.

Expand Down
20 changes: 11 additions & 9 deletions apps/docs/src/content/docs/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ through a short loop:
```bash
ghost init # scaffold .ghost/ with the skeleton starter
ghost validate # make sure the fingerprint is well-formed
ghost gather <ask> # emit the menu for this task; your agent selects the truths it needs
ghost pull <ids> # read the selected truths' full bodies
ghost gather <ask> # emit Available guidance; your agent selects applicable truths
ghost pull <ids> # pull selected truths' full bodies
ghost pulse # inspect the local signal while tuning the fingerprint
```

Expand Down Expand Up @@ -122,20 +122,22 @@ applies in, never a filename destination. For a fuller human-agent workflow, rea

<DocSection title="Gather Context Before You Build">

Before generating, gather the fingerprint menu. `gather` does no selection: it
emits every node's id, kind, and description, and your agent reads the ask
against it and pulls the truths it judges relevant:
Before generating, gather Available guidance from the Ghost brand fingerprint.
`gather` does no selection: it emits the complete, unfiltered, unranked list of
node ids, kinds, and descriptions. Your agent reads the ask against
applicability and pulls every node whose stated situation governs the work:

```bash
ghost gather "checkout settings"
ghost gather "checkout settings" --format json
ghost pull principle.trust voice # read the selected truths' full bodies
ghost pull principle.trust voice # pull selected truths' full bodies
```

This is "the right context at the right time": the agent selects just-in-time
against the actual task, then manifests the truths into whatever it is building.
Run it before generation, so the agent builds with the brand in hand rather than
discovering the gaps in review.
against the actual task. Topic overlap alone is not applicability; if nothing
applies, it should name the fingerprint's silence and avoid inventing
Ghost-backed guidance. Run it before generation, so the agent builds with the
brand in hand rather than discovering the gaps in review.

Each `gather` and `pull` also adds a line to a private local log at
`.ghost/.events`; it stays on your machine and never enters version control.
Expand Down
13 changes: 8 additions & 5 deletions apps/docs/src/content/docs/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,25 @@ do about each.

<DocSection title="`ghost gather` returns nothing relevant">

`gather` does no filtering or ranking; it always emits the whole menu. If your
agent reads the menu and pulls nothing useful, the problem is retrieval, not
missing coverage.
`gather` does no filtering or ranking; it always emits the whole guidance menu.
If your agent reads the menu and pulls nothing useful, the problem may be
retrieval, applicability, or true fingerprint silence.

- **Check the description, not the body.** An agent selects against a node's
`description` alone. A vague description (`Our trust principles.`) is
invisible at selection time no matter how good the prose underneath is.
Rewrite it as a task-shaped phrase: what moment, surface, or question should
make an agent realize this node applies.
Rewrite it as a task-shaped phrase: what the node governs, what observable
condition makes it apply, and what it contributes where useful.
- **Check `ghost pulse`.** It shows whether a node appeared on the menu, got
pulled, was missed by an id the agent tried and failed, or stayed cold
every time. A cold node with real content is a description problem, not a
content problem.
- **Don't add more nodes to fix a retrieval miss.** A weak description with a
strong body is worse than a strong description with a thin body; the agent
never reaches the body.
- **Respect silence.** If no description indicates an applicable situation, name
the fingerprint's silence, follow the cover silence posture, and do not claim
provisional local reasoning as Ghost-backed.

```bash
ghost gather "checkout settings" --format json
Expand Down
6 changes: 3 additions & 3 deletions apps/docs/src/generated/cli-manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"generatedAt": "2026-07-14T04:00:29.832Z",
"generatedAt": "2026-07-15T12:11:34.119Z",
"tools": [
{
"tool": "ghost",
Expand Down Expand Up @@ -96,11 +96,11 @@
"tool": "ghost",
"name": "gather",
"rawName": "gather [...ask]",
"description": "Emit the fingerprint menu — every node's id, kind, and description — for the agent to select from.",
"description": "Emit the complete available guidance menu so the agent can pull applicable nodes.",
"group": "core",
"defaultHelp": true,
"compactName": "gather [ask]",
"summary": "Emit the fingerprint menu for the agent to select from.",
"summary": "Emit the complete guidance menu so the agent can pull applicable nodes.",
"options": [
{
"rawName": "--package <dir>",
Expand Down
4 changes: 2 additions & 2 deletions docs/purposes.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ into folders is a browsing convenience only.
One resolution mechanism, read-only:

- **The menu.** `ghost gather` emits every node's id, kind, description, and
material count. The agent reads the ask against descriptions and pulls the
truths it judges relevant. Ghost does no NLP and no selection.
material count. The agent reads the ask against descriptions and pulls every
truth whose stated situation applies. Ghost does no NLP and no selection.

The optional `cover` in `manifest.yml` names the human-curated front door.
`ghost gather` inlines that node before the menu and excludes it from the
Expand Down
11 changes: 6 additions & 5 deletions packages/context-control/lib/model.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,12 @@ following the ghost skill's recall recipe.
You will get an ask, the cover already in context, and the ghost gather menu.
Select only menu node ids against their descriptions. Do not select the cover.

- Pull a small set: 3-5 nodes is normal; 10 is a bad selection unless the
task is unusually broad.
- Prefer nodes with concrete material for the surface being made.
- Anti-goal nodes are review-critical negative space; include one when the
ask enters the territory its description names.
- Pull every node whose description indicates its stated situation applies and
whose truth, material, structure, or refusal governs the work.
- Skip inapplicable nodes. Topic overlap alone is not applicability.
- Do not add nodes for completeness or omit applicable nodes to meet a count.
- Anti-goal nodes are review-critical negative space; pull each one whose
description names territory the ask enters.

Respond with ONLY a JSON array of node id strings, nothing else.`;

Expand Down
3 changes: 2 additions & 1 deletion packages/ghost/src/commands/command-discovery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ const COMMAND_DISCOVERY = [
group: "core",
defaultHelp: true,
compactName: "gather [ask]",
summary: "Emit the fingerprint menu for the agent to select from.",
summary:
"Emit the complete guidance menu so the agent can pull applicable nodes.",
},
{
name: "pull",
Expand Down
Loading
Loading