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/quiet-signals-major.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@anarchitecture/ghost": major
---

Remove optional memory and cache fingerprint package support, flatten checks to `fingerprint/checks.yml`, and rename `ghost inventory` to `ghost signals`.
8 changes: 4 additions & 4 deletions .ghost/fingerprint/composition.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
patterns:
- id: core-layers-stay-prominent
kind: structure
pattern: Portable Ghost packages keep prose.yml, inventory.yml, and composition.yml at the root of fingerprint/ while enforcement, memory, and source material sit in purpose folders.
pattern: Portable Ghost packages keep prose.yml, inventory.yml, and composition.yml prominent in fingerprint/ while checks.yml remains optional validation support.
guidance:
- Do not require generated cache for a valid new project.
- Do not create cache during initialization; cache appears only after explicit inventory work.
- Do not require generated signal files for a valid new project.
- Keep ghost signals as stdout-only reconnaissance for agents, not package material.
- Allow sparse layer authoring; omitted layer files normalize to empty layers internally.
- Keep generated cache outside canonical inventory while allowing inventory.yml to cite it as a source.
- Curate durable building blocks and exemplars into inventory.yml instead of treating raw signals as inventory authorship.
- Use Git review for fingerprint approval instead of Ghost-specific draft files.
evidence:
- path: README.md
Expand Down
10 changes: 3 additions & 7 deletions .ghost/fingerprint/inventory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ exemplars:
surface_type: docs-home
scope: docs-site
note: Public entry point describes the split fingerprint folder as canonical prose, inventory, and composition.
why: Shows how Ghost explains repo-local fingerprint layers, curated inventory, generated cache, and Git-reviewed approval.
why: Shows how Ghost explains repo-local fingerprint layers, curated inventory, raw signals, and Git-reviewed approval.
refs:
- prose.principle:fingerprint-folder-is-canonical
- prose.principle:generated-cache-is-source-material
- prose.principle:signals-are-authoring-evidence
- id: review-command-fingerprint-packet
path: packages/ghost/src/context/package-review-command.ts
title: Generated review command
Expand All @@ -87,8 +87,4 @@ exemplars:
refs:
- prose.experience_contract:review-cites-fingerprint-and-diff
- composition.pattern:compact-agent-handoff
sources:
- id: generated-inventory
kind: cache
ref: sources/cache/inventory.json
note: Optional refreshable repo facts produced by ghost inventory.
sources: []
22 changes: 0 additions & 22 deletions .ghost/fingerprint/memory/intent.md

This file was deleted.

24 changes: 12 additions & 12 deletions .ghost/fingerprint/prose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ summary:
- Let advisory review block work without deterministic checks.
tradeoffs:
- Prefer compact durable prose over exhaustive surveys.
- Keep enforcement, memory, and sources organized around the core layer files.
- Keep optional checks in the fingerprint package without treating them as core generation layers.
- Preserve OSS-friendly language over company-specific strategy.
tone:
- plain
Expand All @@ -28,10 +28,10 @@ situations:
- id: capturing-fingerprint
title: Capturing fingerprint layers
user_intent: Create or update the Ghost fingerprint for a project.
product_obligation: Help the agent distinguish canonical prose/inventory/composition from generated cache, enforcement, and rationale history.
product_obligation: Help the agent distinguish canonical prose/inventory/composition from optional checks and raw repo signals.
principles:
- prose.principle:fingerprint-folder-is-canonical
- prose.principle:generated-cache-is-source-material
- prose.principle:signals-are-authoring-evidence
experience_contracts:
- prose.experience_contract:git-is-approval-boundary
patterns:
Expand Down Expand Up @@ -66,22 +66,22 @@ principles:
note: Public format docs define the split fingerprint folder as the source of truth.
- path: packages/ghost/src/scan/fingerprint-package.ts
note: init writes manifest.yml and the three core layer files under fingerprint/.
- id: generated-cache-is-source-material
principle: Generated cache answers what exists; curated inventory points to the building blocks, sources, and precedents an agent can inspect or use.
- id: signals-are-authoring-evidence
principle: Raw repo signals answer what exists; curated inventory points to the building blocks, sources, and precedents an agent can inspect or use.
guidance:
- Store generated cache under fingerprint/sources/cache/ when useful.
- Use ghost signals as scratch evidence while authoring or refreshing fingerprint layers.
- Curate durable building blocks, files, routes, libraries, assets, source links, notes, and exemplars into inventory.yml.
- Do not let cache or building blocks become surface authority without prose and composition.
- Do not let signals or building blocks become surface authority without prose and composition.
evidence:
- path: README.md
note: README frames generated cache as optional source material.
note: README frames ghost signals as authoring evidence.
- id: checks-are-enforcement
principle: Deterministic checks live under fingerprint/enforcement/ and should cite typed fingerprint refs when they enforce surface-composition rules.
principle: Deterministic checks live in fingerprint/checks.yml and should cite typed fingerprint refs when they enforce surface-composition rules.
guidance:
- Active checks can block; advisory findings cannot block unless check-backed.
- Prefer typed refs such as composition.pattern:token-first-interface.
- Ungrounded checks may exist, but lint should make their missing grounding visible.
- Checks keep enforcement status because gates need lifecycle state.
- Checks keep explicit status because gates need lifecycle state.
evidence:
- path: packages/ghost/src/ghost-core/checks/lint.ts
note: Check grounding is validated and missing derivation is reported as a warning.
Expand All @@ -98,7 +98,7 @@ experience_contracts:
contract: Advisory review findings must cite the diff location and the relevant fingerprint refs.
obligations:
- Use active checks only when a finding should block.
- Use missing-memory or experience-gap when the fingerprint cannot support a confident finding.
- Use missing-fingerprint or experience-gap when the fingerprint cannot support a confident finding.
evidence:
- path: packages/ghost/src/context/package-review-command.ts
note: Emitted review command tells agents what to cite.
Expand All @@ -107,7 +107,7 @@ experience_contracts:
obligations:
- Do not rewrite canonical fingerprint layers silently during generation or review.
- Treat uncommitted or unmerged fingerprint edits as draft work.
- Record durable surface-composition guidance in prose.yml, inventory.yml, and composition.yml; deterministic gates belong in enforcement/checks.yml.
- Record durable surface-composition guidance in prose.yml, inventory.yml, and composition.yml; deterministic gates belong in checks.yml.
evidence:
- path: packages/ghost/src/skill-bundle/references/capture.md
- id: emitted-context-prefers-fingerprint-layers
Expand Down
1 change: 0 additions & 1 deletion .ghost/fingerprint/sources/cache/.gitkeep

This file was deleted.

28 changes: 11 additions & 17 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pnpm --filter @anarchitecture/ghost exec ghost <command>

Ghost is **BYOA (bring your own agent)**. Claude Code, Codex, Cursor, Goose, or
another host agent reads, decides, and writes. Ghost is the deterministic
calculator the agent reaches for: schema validation, inventory/cache helpers,
calculator the agent reaches for: schema validation, repo-signal helpers,
structural diffs, drift checks, comparison math, and handoff packets.

The canonical root `.ghost/` package follows:
Expand All @@ -42,10 +42,7 @@ fingerprint/
prose.yml
inventory.yml
composition.yml
enforcement/checks.yml
memory/intent.md
memory/decisions/
sources/cache/
checks.yml
```

The three root layer files under `fingerprint/` are the core model:
Expand All @@ -54,13 +51,10 @@ The three root layer files under `fingerprint/` are the core model:
- `inventory.yml` for curated material, exemplars, and source links.
- `composition.yml` for experience patterns.

Supporting files live under purpose folders. `enforcement/checks.yml` is
validation and enforcement, not generation input. `memory/intent.md` and
`memory/decisions/` hold optional human context and rationale. Generated cache
in `sources/cache/` is optional source material; it answers what exists, while
core fingerprint layers answer what the surface is trying to do. `.ghost/config.yml`
remains local adapter/routing config outside portable context. Ordinary Git
review is the approval boundary for fingerprint edits.
`checks.yml` validates output and can enforce deterministic gates; it is not
generation input.
`.ghost/config.yml` remains local adapter/routing config outside portable
context. Ordinary Git review is the approval boundary for fingerprint edits.

Legacy `resources.yml`, `map.md`, `survey.json`, and `patterns.yml` may still
appear in older repos or as migration source material. They are not canonical
Expand All @@ -80,14 +74,14 @@ fingerprint input for new Ghost work.

| Command | Description |
| --- | --- |
| `ghost init` | Create `.ghost/fingerprint/` with manifest, core layers, and enforcement checks. |
| `ghost init` | Create `.ghost/fingerprint/` with manifest, core layers, and deterministic checks. |
| `ghost scan` | Report fingerprint layer readiness and BYOA next-step guidance. |
| `ghost inventory` | Emit raw repo signals as JSON for optional cache/source material. |
| `ghost signals` | Emit raw repo signals as JSON for fingerprint authoring. |
| `ghost lint` | Validate a fingerprint package or single artifact. |
| `ghost verify` | Validate fingerprint evidence and exemplar paths, typed check refs, and optional rationale files. |
| `ghost describe` | Print optional `fingerprint/memory/intent.md` or direct markdown section ranges. |
| `ghost verify` | Validate fingerprint evidence and exemplar paths, and typed check refs. |
| `ghost describe` | Print direct markdown section ranges. |
| `ghost diff` | Structural prose-level diff between direct fingerprints. |
| `ghost survey <op>` | Legacy/cache helpers for optional `ghost.survey/v1` workflows. |
| `ghost survey <op>` | Legacy survey helpers for optional `ghost.survey/v1` workflows. |
| `ghost check` | Run active `ghost.checks/v1` deterministic gates against a diff. |
| `ghost review` | Emit an evidence-routed advisory review packet grounded in fingerprint layers, inventory exemplars, checks, and the diff. |
| `ghost compare` | Pairwise or composite comparison over packages or direct fingerprints. |
Expand Down
32 changes: 14 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ The canonical package is intentionally small:
prose.yml # surface intent
inventory.yml # curated material and exemplars
composition.yml # patterns, flows, states, and arrangements
enforcement/checks.yml # optional deterministic gates
memory/intent.md # optional human-approved intent
memory/decisions/ # optional rationale history
sources/cache/ # optional generated observations
checks.yml # optional deterministic gates
```

Generation uses the three core layers:
Expand All @@ -37,14 +34,14 @@ Generation uses the three core layers:
- `composition.yml` captures the patterns that make those materials feel like
one intentional product.

Checks, memory, generated cache, nested packages, and custom host-wrapper
package locations are supporting features. They do not replace the core
fingerprint layers. Generated cache answers what exists; curated fingerprint
layers answer what the surface is trying to preserve.
Checks, nested packages, custom host-wrapper package locations, and raw repo
signals are supporting features. They do not replace the core fingerprint
layers. `ghost signals` answers what exists; curated fingerprint layers answer
what the surface is trying to preserve.

Older `resources.yml`, `map.md`, `survey.json`, `patterns.yml`, and direct
`fingerprint.yml` artifacts can still inform migration or cache workflows, but
new Ghost work should target `.ghost/fingerprint/`.
`fingerprint.yml` artifacts can still inform migration workflows, but new Ghost
work should target `.ghost/fingerprint/`.

## Project Status: Beta

Expand Down Expand Up @@ -96,14 +93,13 @@ edits, and asks you to curate the claims.
```bash
ghost init
ghost scan --format json
mkdir -p .ghost/fingerprint/sources/cache
ghost inventory > .ghost/fingerprint/sources/cache/inventory.json
ghost signals .
ghost lint .ghost
ghost verify .ghost --root .
```

Use `--with-intent`, `--with-config`, `--reference`, or `--scope` only when the
repo needs those optional files, reference libraries, or nested product areas.
Use `--with-config`, `--reference`, or `--scope` only when the repo needs local
routing, reference libraries, or nested product areas.
For monorepos, `ghost init --monorepo` creates or preserves the root package,
detects workspace child roots, and prints proposed `ghost init --scope ...`
commands by default. Run `ghost init --monorepo --apply` to create the detected
Expand Down Expand Up @@ -134,7 +130,7 @@ same fingerprint:

```bash
ghost check --base main
ghost review --base main --include-memory
ghost review --base main
```

`ghost check` runs active `ghost.checks/v1` gates and can fail. `ghost review`
Expand Down Expand Up @@ -165,15 +161,15 @@ useful layer content. It does not call an LLM.
| `ghost init` | Create `.ghost/fingerprint/` package layers. |
| `ghost scan` | Report fingerprint layer readiness for prose, inventory, and composition. |
| `ghost lint` | Validate a fingerprint package or individual artifact. |
| `ghost verify` | Validate evidence paths, exemplar paths, typed check refs, and optional rationale files. |
| `ghost verify` | Validate evidence paths, exemplar paths, and typed check refs. |
| `ghost check` | Run active deterministic gates against a diff. |
| `ghost review` | Emit an evidence-routed advisory packet from fingerprint layers and a diff. |
| `ghost relay gather` | Gather fingerprint-grounded context for an agent target. |
| `ghost emit <kind>` | Emit `review-command` artifacts. |
| `ghost skill install` | Install the unified Ghost skill bundle. |
| `ghost stack` | Inspect resolved root-to-leaf fingerprint stacks. |
| `ghost inventory` | Emit raw repo signals as JSON for optional cache material. |
| `ghost describe` | Print optional intent or markdown section ranges. |
| `ghost signals` | Emit raw repo signals as JSON for fingerprint authoring. |
| `ghost describe` | Print markdown section ranges. |
| `ghost compare` | Compare fingerprint packages. |
| `ghost ack` / `track` / `diverge` | Record stance toward tracked drift. |
| `ghost diff` / `survey` | Maintain direct markdown fingerprints or survey/cache files for compatibility workflows. |
Expand Down
30 changes: 9 additions & 21 deletions apps/docs/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,9 @@ export default function Home() {
surface together, and which examples show it at its best.
</p>
<p className="thesis-item">
Components, tokens, libraries, and generated cache become
implementation material. Ghost does not replace them. It gives
agents the surface context that tells them when and how those
materials belong.
Components, tokens, and libraries become implementation material.
Ghost does not replace them. It gives agents the surface context
that tells them when and how those materials belong.
</p>
<p className="thesis-item">Ghost keeps that model compact:</p>
<ul className="thesis-item list-disc space-y-2 pl-6">
Expand All @@ -72,35 +71,24 @@ export default function Home() {
<code>composition.yml</code> store the three core layers
</li>
<li>
<code>enforcement/checks.yml</code> stores optional
deterministic gates grounded in fingerprint refs
<code>checks.yml</code> stores optional deterministic gates
grounded in fingerprint refs
</li>
<li>
ordinary Git review separates draft fingerprint edits from
checked-in truth
</li>
<li>
<code>memory/intent.md</code> and <code>memory/decisions</code>{" "}
record optional human-approved context inside the package
</li>
<li>
<code>sources/cache</code> holds generated cache without
becoming canonical truth
</li>
</ul>
<p className="thesis-item">
The split is deliberate. <code>prose.yml</code> captures the
intent behind the surface. <code>inventory.yml</code> captures the
materials it draws from. <code>composition.yml</code> captures the
patterns that make it feel intentional. Cache answers what exists.
Checks validate output; they are not generation input.
patterns that make it feel intentional. Checks validate output;
they are not generation input.
</p>
<p className="thesis-item">A typical loop becomes:</p>
<ol className="thesis-item list-decimal space-y-2 pl-6">
<li>
Brief from the fingerprint layers, generated cache when useful,
and exemplars
</li>
<li>Brief from the fingerprint layers and exemplars</li>
<li>Generate or edit with the host agent</li>
<li>Run active deterministic checks and advisory review</li>
<li>
Expand All @@ -127,7 +115,7 @@ export default function Home() {
</p>
<ul className="thesis-item list-disc space-y-2 pl-6">
<li>incorrect generation: agent failure</li>
<li>missing-memory: under-specified surface context</li>
<li>missing-fingerprint: under-specified surface context</li>
<li>intentional product evolution</li>
</ul>
<p className="thesis-item">
Expand Down
Loading
Loading