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/skeleton-only-init-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@design-intelligence/ghost": major
---

Make `skeleton` the only `ghost init` template, removing `minimal`, `composition`, and the legacy `default` and `steering` aliases.
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Core workflow:

| Command | Description |
| --- | --- |
| `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 package instead. `--with checks` also adds the checks directory. |
| `ghost init` | Scaffold `.ghost/` with the skeleton starter: manifest, glossary, a `brand.md` cover, foundation chapters, context nodes, and the cliche floor. `--body vessel-light` installs a full inhabited package 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 complete guidance menu so the agent can pull applicable nodes. |
Expand Down
8 changes: 4 additions & 4 deletions apps/docs/src/content/docs/cli-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ unexpected code.
Scaffold a `.ghost/` package. The default starter includes a manifest,
glossary, `brand.md` cover, foundation nodes with open questions, and context
for the authoring conversation. These prompts tell the agent to ask rather than
invent brand values. Use `--template minimal` for a smaller starter. Add
guidance with files such as `principle.density.md`. Use `--package <dir>` for an
exact directory, or set `GHOST_PACKAGE_DIR` when a host wrapper stores ghost
invent brand values. Add guidance with files such as `principle.density.md`.
Use `--package <dir>` for an exact directory, or set `GHOST_PACKAGE_DIR` when a
host wrapper stores ghost
files outside `.ghost`. Pass `--with checks` to add the checks directory.

A template provides files and prompts for guidance you still need to author. A
Expand All @@ -80,7 +80,7 @@ your own. `--body` and `--template` are mutually exclusive.

```bash
ghost init
ghost init --template minimal
ghost init --template skeleton
ghost init --with checks
ghost init --package product-ghost
GHOST_PACKAGE_DIR=.agents/ghost ghost init
Expand Down
5 changes: 2 additions & 3 deletions apps/docs/src/content/docs/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,9 @@ it as one node, then add guidance when another repeated decision appears.

Your agent interviews you, works with the material you show it, drafts node
prose, and asks you to curate the claims. `ghost init` handles the repeatable
setup by writing a starter you adapt: a glossary, a `brand.md` cover, and
setup by writing the skeleton starter: a glossary, a `brand.md` cover, and
foundation nodes with open questions. Answer the questions with your brand's
decisions. Use `ghost init --template minimal` for a smaller starter. The
[CLI reference](/docs/cli) lists the generated files.
decisions. The [CLI reference](/docs/cli) lists the generated files.

```bash
ghost init
Expand Down
283 changes: 0 additions & 283 deletions packages/ghost/src/scan/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,283 +42,6 @@ function gitignoreFile(): TemplateFile {
};
}

/**
* The minimal starter: a manifest, a package-level glossary declaring the
* starter kind vocabulary, and a package-root `index.md` cover. Additional
* truths are plain markdown nodes; optional material locators live on the node
* that explains them. Checks are opt-in via `ghost checks init`.
*/
const MINIMAL_TEMPLATE: GhostInitTemplate = {
name: "minimal",
description:
"Minimal node package: manifest + glossary + a starter cover node.",
async files() {
const medianFile = await medianTemplateFile();
return [
manifestFile("index"),
gitignoreFile(),
{
relativePath: "glossary.md",
content: `---
kinds:
- name: principle
- name: condition
- name: exemplar
- name: anti-goal
- name: cliche
- name: asset
- name: pattern
---

# principle

Durable stance: true across media unless a narrower condition explicitly limits it.

# condition

Situational truth: fires only when the stated situation holds.

# exemplar

Illustrative reference. Match its form and quality; treat its specifics as
evidence unless the node says the sample itself is normative.

# anti-goal

What this brand must never look, sound, or feel like — named generic patterns
and rejected neighbors. Always-on, like a principle, but stated as the thing
to steer away from.

# cliche

The defaults a generative model falls back on when no brand is steering it.
These are nobody's brand. Each entry pairs the tired move with the honest
replacement. Gather before styling anything greenfield; enforced by paired
checks at review.

# asset

Material truth about concrete brand assets such as logos, illustrations, motion, imagery, or files.

# pattern

Reusable composition or product pattern whose purpose is distinguishable from neighboring patterns.
`,
},
{
relativePath: "index.md",
content: `---
description: Always read first — the non-negotiables and how to read this package.
---

Replace this placeholder prose with two things:

**The non-negotiables.** The handful of truths that apply to every task, every
medium, no matter what else is gathered — hard invariants, the anti-goals, the
one-sentence stance. Anything that must never be missed belongs here, stated
briefly; link out to the full node by id for depth.

**How to read the rest.** What this package covers, how its kinds organize
the corpus, and where the package deliberately stays silent — including, if
you want one, a stricter silence posture ("when this package is silent on X,
ask a human") that overrides the default proceed-provisionally behavior.

\`index\` is this package's manifest-declared cover: \`ghost gather\` inlines its
body before the menu and excludes it from selection. Its privilege comes from
\`cover: index\` in \`manifest.yml\`, not from the filename. You may rename it;
update the manifest's \`cover\` id at the same time.

The glossary declares the kind vocabulary. A node's kind comes from its
filename prefix: \`principle.density.md\` has kind \`principle\` and slug
\`density\`. A bare filename like \`voice.md\` has no kind, which is fine.
When a truth is narrower, state the condition in the prose — the situation where
it applies — never a filing destination.
`,
},
medianFile,
];
},
};

/**
* The composition starter: everything in `minimal`, plus a worked composition
* ladder — an invariants floor (`principle.composition`), one bound/open
* pattern, and a cover that teaches the convention. For teams whose
* package must steer *what agents build*, not only what they say.
*
* The ladder is an authoring convention, not a schema: patterns state what is
* bound (do not redecide) and what is open (the generator's call), and every
* pattern names the principles it refines. Nothing here adds frontmatter,
* edges, or routing — the corpus stays flat.
*/
const COMPOSITION_TEMPLATE: GhostInitTemplate = {
name: "composition",
description:
"Composition starter: minimal files + an invariants floor and a worked bound/open pattern.",
async files() {
const medianFile = await medianTemplateFile();
return [
manifestFile("index"),
gitignoreFile(),
{
relativePath: "glossary.md",
content: `---
kinds:
- name: principle
- name: condition
- name: exemplar
- name: anti-goal
- name: cliche
- name: asset
- name: pattern
---

# principle

Durable stance: true across media unless a narrower condition explicitly limits it.
Composition principles are the floor — when no pattern matches an ask, they are
what the agent composes against.

# condition

Situational truth: fires only when the stated situation holds.

# exemplar

Illustrative reference. Match its form and quality; treat its specifics as
evidence unless the node says the sample itself is normative. Pair an
exemplar with a screenshot or implementation path in \`materials\` so the blessed
render travels with the prose.

# anti-goal

What this brand must never look, sound, or feel like — named generic patterns
and rejected neighbors. Always-on, like a principle, but stated as the thing
to steer away from.

# cliche

The defaults a generative model falls back on when no brand is steering it.
These are nobody's brand. Each entry pairs the tired move with the honest
replacement. Gather before styling anything greenfield; enforced by paired
checks at review.

# asset

Material truth about concrete brand assets such as logos, illustrations, motion,
imagery, or files. For components, state the slot contract in prose: what the
asset admits, how many, and where.

# pattern

Reusable composition whose purpose is distinguishable from neighboring patterns.
A pattern states what is **bound** (decided — do not redecide) and what is
**open** (the generator's call, within named limits), and names the principles
it refines. A pattern may only narrow what its principles allow — never loosen
them.
`,
},
{
relativePath: "index.md",
content: `---
description: Start here — how this package steers composition, from patterns down to principles.
---

This package steers what gets built, not only what gets said. It is
organized as a ladder of binding depth:

1. **Patterns** (\`pattern.*\`) are mostly-decided compositions. When an ask
matches a pattern's stated purpose, use it: apply what it binds, decide only
what it leaves open.
2. **Principles** (\`principle.*\`) are the floor. When no pattern matches, do
not fall back to your own taste — compose freely *inside* the invariants in
\`principle.composition\` and its siblings.
3. **Exemplars and assets** carry the concrete vocabulary: blessed renders,
real components, real tokens, located via \`materials\`.

Two laws keep the ladder honest:

- **Narrowing only.** A pattern may bind or narrow what a principle leaves
open; it may never contradict one. If a pattern conflicts with a principle,
the principle wins and the pattern file is wrong.
- **Every "never" casts a shadow.** Each refusal-grade line in a principle
should be mirrored by a review check (\`ghost checks init\`) that
references the node it enforces, so the same opinion steers before building
and grades after.

Replace this prose with your own front door once the corpus has shape. The
starter nodes below are teaching placeholders — edit them into your real
opinions before trusting them.
`,
},
{
relativePath: "principle.composition.md",
content: `---
description: The composition floor — hard layout invariants that hold for every screen, whether or not a pattern matches the ask.
---

These invariants apply to everything built against this package. Patterns
narrow them; nothing loosens them. Each is written as a refusal or a limit with
a number, because a stance an agent can check is a stance that steers.

**The starter opinions below are placeholders. Keep the voice — refusals and
numbers, not vibes — and replace the values with yours.**

- **One focal point.** Every screen has exactly one element at the largest
scale. If two elements compete for primacy, the second one is wrong — demote
or delete it. Never resolve the tie by making both big.
- **Hierarchy descends.** Type scale strictly decreases with nesting depth.
Never give a child element a larger scale than its parent context.
- **Density has a budget.** State the budget per surface (for example: at most
N data points per viewport on consumer surfaces; a higher N on operational
ones). When content exceeds the budget, cut or collapse — never shrink type
below the ramp to make room.
- **Actions land last.** Calls to action render at the end of reading order.
At most one primary action per screen; never two.
- **Separation escalates.** To separate content, reach for whitespace first,
then a divider, then a container — in that order, never skipping a step.

Mirror each refusal here with a check under \`checks/\` that lists this
node in its \`references\`, so review enforces the same floor this prose sets.
`,
},
{
relativePath: "pattern.status-with-next-step.md",
content: `---
description: Status of an ongoing thing plus the single next step — reach for this when the ask is "where is X / how is X going."
---

**This is a worked example of the pattern convention — bound, open, refines.
Replace its content with a real pattern from your product, keep the structure.**

**When this applies:** the ask is about the state of something in flight — an
order, a transfer, a build, a goal.

**Bound (decided — do not redecide):**

- The current status renders first and largest; it is the focal point.
- A short line of meaning follows the status: why it matters or what changed,
never a restatement of it.
- Exactly one primary action, rendered last: the single next step.

**Open (your call, within these limits):**

- Supporting evidence may be a timeline or a compact stat list — whichever
fits the data. Never a full chart in this pattern.
- Density may flex one step tighter on operational surfaces.

**Refines:** \`principle.composition\`. If anything above conflicts with the
floor, the floor wins and this file is wrong.

When a blessed render of this pattern exists, add an \`exemplar.*\` node with
\`materials\` pointing at the screenshot and the implementation path.
`,
},
medianFile,
];
},
};

const SKELETON_FILE_ORDER = new Map(
[
"glossary.md",
Expand Down Expand Up @@ -363,8 +86,6 @@ async function medianTemplateFile(): Promise<TemplateFile> {
}

const TEMPLATES = new Map<string, GhostInitTemplate>([
[MINIMAL_TEMPLATE.name, MINIMAL_TEMPLATE],
[COMPOSITION_TEMPLATE.name, COMPOSITION_TEMPLATE],
[SKELETON_TEMPLATE.name, SKELETON_TEMPLATE],
]);

Expand Down Expand Up @@ -436,10 +157,6 @@ export const DEFAULT_TEMPLATE_NAME = SKELETON_TEMPLATE.name;

/** Look up a registered init template by name. */
export function getInitTemplate(name: string): GhostInitTemplate | undefined {
// `default` and `steering` are silent aliases for the skeleton starter:
// `default` for callers that never named a template, `steering` for
// callers pinned to the pre-skeleton default's name.
if (name === "default" || name === "steering") return SKELETON_TEMPLATE;
return TEMPLATES.get(name);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/ghost/src/skill-bundle/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ this same host-agent session.

| Verb | Purpose |
|---|---|
| `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. `--with checks` also adds the checks directory. |
| `ghost init` | Scaffold `.ghost/` with the skeleton starter: manifest, glossary, a `brand.md` cover, foundation chapters, context nodes, and the cliche floor. `--with checks` also adds the checks directory. |
| `ghost checks init` | Scaffold `.ghost/checks/` with an example review assertion. |
| `ghost validate [file-or-dir]` | Validate manifest, nodes, material locators, check references, and glossary kind prefixes. |
| `ghost gather [ask…] [--format json]` | Emit the complete guidance menu plus coverage line; log exposed ids. |
Expand Down
3 changes: 1 addition & 2 deletions packages/ghost/src/skill-bundle/references/capture.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,7 @@ ghost validate
`ghost init` seeds the skeleton starter: the manifest, a starter
`glossary.md`, a `brand.md` cover, foundation chapters with open questions, and
the model cliche floor. Replace open questions with real product guidance before
using it to steer generation. Use `ghost init --template minimal` for a
manifest, glossary, cover, and cliche floor.
using it to steer generation.

Write the manifest-declared cover as the human-curated front door:
non-negotiables that apply to every task, what the package covers, and any
Expand Down
Loading
Loading