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/cascade-handoff-housekeeping.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@anarchitecture/ghost": patch
---

Polish selected-context handoff wording and review context formatting.
5 changes: 5 additions & 0 deletions .changeset/fresh-falcons-validate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@anarchitecture/ghost": minor
---

Rename the portable fingerprint intent and validation artifacts to `intent.yml` and `validate.yml` with `ghost.validate/v1` refs.
5 changes: 5 additions & 0 deletions .changeset/relay-cascade-brief.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@anarchitecture/ghost": minor
---

Compile Relay gather output into selected context grouped by stack, intent, composition, inventory, validation, and gaps.
5 changes: 5 additions & 0 deletions .changeset/relay-context-hits.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@anarchitecture/ghost": minor
---

Change Relay gather output to the `ghost.relay.gather/v2` context hits contract.
5 changes: 5 additions & 0 deletions .changeset/review-cascade-context.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@anarchitecture/ghost": minor
---

Use selected context in advisory review packets.
5 changes: 5 additions & 0 deletions .changeset/smart-cooks-posture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@anarchitecture/ghost": minor
---

Expose Relay posture summaries in selected context.
5 changes: 5 additions & 0 deletions .changeset/sparse-spiders-scan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@anarchitecture/ghost": minor
---

Report sparse fingerprint package contribution facets in `ghost scan` instead of all-or-nothing readiness.
17 changes: 9 additions & 8 deletions .ghost/fingerprint/composition.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
patterns:
- id: core-layers-stay-prominent
- id: sparse-contribution-before-completeness
kind: structure
pattern: Portable Ghost packages keep prose.yml, inventory.yml, and composition.yml prominent in fingerprint/ while checks.yml remains optional validation support.
pattern: Ghost scan and docs describe what each package contributes instead of treating absent facets as incomplete packages.
guidance:
- Do not require generated signal files for a valid new project.
- Do not require every package to contain intent, inventory, composition, and validate.
- Treat nested packages as patches in the broad-to-local fingerprint stack.
- Keep ghost signals as stdout-only reconnaissance for agents, not package material.
- Allow sparse layer authoring; omitted layer files normalize to empty layers internally.
- 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
- path: docs/fingerprint-format.md
- path: packages/ghost/src/scan/fingerprint-contribution.ts
- id: compact-agent-handoff
kind: content
pattern: CLI and emitted prompts should tell the host agent exactly which fingerprint layers to read and which findings can block.
pattern: CLI and emitted prompts should tell the host agent exactly which fingerprint facets to read and which findings can block.
guidance:
- Prefer short ordered workflows over broad conceptual lectures.
- Name missing fingerprint grounding or layer coverage plainly without creating a separate fingerprint-change workflow.
- Name missing fingerprint grounding or facet coverage plainly without creating a separate fingerprint-change workflow.
evidence:
- path: packages/ghost/src/context/package-review-command.ts
- id: editorial-workbench-docs
Expand All @@ -33,7 +34,7 @@ patterns:
- Keep concepts plain and examples inspectable.
- Avoid oversized marketing composition for reference pages.
check_refs:
- check:component-pages-use-display-scale
- validate.check:component-pages-use-display-scale
evidence:
- path: apps/docs/src/components/docs/page-header.tsx
- path: apps/docs/src/components/docs/component-page-shell.tsx
Expand All @@ -55,6 +56,6 @@ patterns:
- Treat one-off literal colors in UI surfaces as review-worthy drift.
- Using the right token is not enough if hierarchy, disclosure, or operability regresses.
check_refs:
- check:no-hardcoded-surface-hex
- validate.check:no-hardcoded-surface-hex
evidence:
- path: packages/ghost-ui/src/styles/main.css
54 changes: 32 additions & 22 deletions .ghost/fingerprint/prose.yml → .ghost/fingerprint/intent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ summary:
goals:
- Keep product-surface composition fingerprints repo-local, portable, and easy for agents to read.
- Preserve surface composition across generation, review, and remediation.
- Make prose, inventory, and composition feel like the three core model layers.
- Treat intent, inventory, composition, and validate as sparse package facets.
- Use Git as the staging and approval boundary for fingerprint edits.
anti_goals:
- Treat raw inventory as canonical surface guidance.
- Turn support files into peers of prose, inventory, and composition.
- Turn support files into peers of intent, inventory, and composition.
- Turn Ghost into a design-system snapshot or screenshot archive.
- Become a fingerprint lifecycle manager or proposal system.
- Let advisory review block work without deterministic checks.
tradeoffs:
- Prefer compact durable prose over exhaustive surveys.
- Keep optional checks in the fingerprint package without treating them as core generation layers.
- Prefer compact durable intent over exhaustive surveys.
- Keep validation checks in the fingerprint package without treating them as generation input.
- Preserve OSS-friendly language over company-specific strategy.
tone:
- plain
Expand All @@ -26,57 +26,67 @@ summary:
- product-minded
situations:
- id: capturing-fingerprint
title: Capturing fingerprint layers
title: Capturing fingerprint facets
user_intent: Create or update the Ghost fingerprint for a project.
product_obligation: Help the agent distinguish canonical prose/inventory/composition from optional checks and raw repo signals.
product_obligation: Help the agent distinguish sparse fingerprint contributions from optional checks and raw repo signals.
principles:
- prose.principle:fingerprint-folder-is-canonical
- prose.principle:signals-are-authoring-evidence
- intent.principle:fingerprint-folder-is-canonical
- intent.principle:signals-are-authoring-evidence
- intent.principle:sparse-packages-are-patches
experience_contracts:
- prose.experience_contract:git-is-approval-boundary
- intent.experience_contract:git-is-approval-boundary
patterns:
- composition.pattern:core-layers-stay-prominent
- composition.pattern:sparse-contribution-before-completeness
- id: reviewing-generated-ui
title: Reviewing generated or changed UI
user_intent: Know whether a change preserves the product surface.
product_obligation: Separate deterministic blocking checks from advisory critique.
principles:
- prose.principle:checks-are-enforcement
- intent.principle:checks-are-enforcement
experience_contracts:
- prose.experience_contract:review-cites-fingerprint-and-diff
- intent.experience_contract:review-cites-fingerprint-and-diff
patterns:
- composition.pattern:compact-agent-handoff
- id: documenting-ghost
title: Explaining Ghost in public docs
user_intent: Understand the model without internal company context.
product_obligation: Use OSS-safe language and examples that fit many repo shapes.
principles:
- prose.principle:oss-language-is-portable
- intent.principle:oss-language-is-portable
patterns:
- composition.pattern:editorial-workbench-docs
principles:
- id: fingerprint-folder-is-canonical
principle: fingerprint/ is the portable surface-composition package; prose.yml, inventory.yml, and composition.yml are its core model layers.
principle: fingerprint/ is the portable surface-composition package; intent, inventory, composition, and validate are sparse facets.
guidance:
- Describe the fingerprint as product-surface composition, not as an operational archive.
- Keep durable surface intent, hierarchy, behavior, copy, accessibility, trust, and flow in the core layer files.
- Keep durable surface intent, hierarchy, behavior, copy, accessibility, trust, and flow in the appropriate facet files.
- Treat uncommitted or unmerged fingerprint edits as drafts handled by Git, not by a Ghost-specific lifecycle.
evidence:
- path: docs/fingerprint-format.md
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/.
note: init writes manifest.yml and starter facet files under fingerprint/.
- 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:
- Use ghost signals as scratch evidence while authoring or refreshing fingerprint layers.
- Use ghost signals as scratch evidence while authoring or refreshing fingerprint facets.
- Curate durable building blocks, files, routes, libraries, assets, source links, notes, and exemplars into inventory.yml.
- Do not let signals or building blocks become surface authority without prose and composition.
- Do not let signals or building blocks become surface authority without intent and composition.
evidence:
- path: README.md
note: README frames ghost signals as authoring evidence.
- id: sparse-packages-are-patches
principle: A fingerprint package contributes only the facets it knows; it does not need to restate inherited context.
guidance:
- Treat absent intent, inventory, composition, or validate files as absent local contributions, not automatic incompleteness.
- Use nested packages to add local patches to the broad-to-local stack.
- Let scan report contribution state instead of telling users every package must contain every facet.
evidence:
- path: packages/ghost/src/scan/fingerprint-contribution.ts
- path: docs/fingerprint-format.md
- id: checks-are-enforcement
principle: Deterministic checks live in fingerprint/checks.yml and should cite typed fingerprint refs when they enforce surface-composition rules.
principle: Deterministic checks live in fingerprint/validate.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.
Expand Down Expand Up @@ -105,13 +115,13 @@ experience_contracts:
- id: git-is-approval-boundary
contract: Fingerprint edits use ordinary Git workflow; checked-in fingerprint/ files are truth.
obligations:
- Do not rewrite canonical fingerprint layers silently during generation or review.
- Do not rewrite canonical fingerprint facets 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 checks.yml.
- Record durable surface-composition guidance in intent.yml, inventory.yml, and composition.yml; deterministic gates belong in validate.yml.
evidence:
- path: packages/ghost/src/skill-bundle/references/capture.md
- id: emitted-context-prefers-fingerprint-layers
contract: Emitted context bundles and review commands should prefer split fingerprint layers over legacy survey or markdown artifacts.
contract: Emitted context bundles and review commands should prefer split fingerprint facets over legacy survey or markdown artifacts.
obligations:
- Default emit paths load the resolved fingerprint package or stack.
- Legacy direct markdown emit is unsupported for package context.
Expand Down
16 changes: 8 additions & 8 deletions .ghost/fingerprint/inventory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,27 +64,27 @@ building_blocks:
- packages/ghost/src/context/entrypoint-markdown.ts
- packages/ghost/src/context/package-review-command.ts
notes:
- Inventory is replaceable material; prose captures intent and composition captures how material is assembled.
- Inventory is replaceable material; intent captures what must remain true and composition captures how material is assembled.
- Correct components or tokens do not prove a surface is aligned.
exemplars:
- id: public-readme-fingerprint-model
path: README.md
title: Public README fingerprint model
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, raw signals, and Git-reviewed approval.
note: Public entry point describes split fingerprint facets and sparse contribution state.
why: Shows how Ghost explains repo-local sparse fingerprint facets, curated inventory, raw signals, and Git-reviewed approval.
refs:
- prose.principle:fingerprint-folder-is-canonical
- prose.principle:signals-are-authoring-evidence
- intent.principle:fingerprint-folder-is-canonical
- intent.principle:signals-are-authoring-evidence
- id: review-command-fingerprint-packet
path: packages/ghost/src/context/package-review-command.ts
title: Generated review command
surface_type: emitted-agent-prompt
scope: public-cli
note: Review command is generated from split fingerprint prose/inventory/composition.
why: Shows how Ghost turns fingerprint layers into an agent-facing review instruction.
note: Review command is generated from split fingerprint intent/inventory/composition.
why: Shows how Ghost turns fingerprint facets into an agent-facing review instruction.
refs:
- prose.experience_contract:review-cites-fingerprint-and-diff
- intent.experience_contract:review-cites-fingerprint-and-diff
- composition.pattern:compact-agent-handoff
sources: []
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
schema: ghost.checks/v1
schema: ghost.validate/v1
id: ghost
checks:
- id: no-hardcoded-surface-hex
Expand Down
24 changes: 12 additions & 12 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ The canonical root `.ghost/` package follows:
config.yml
fingerprint/
manifest.yml
prose.yml
intent.yml
inventory.yml
composition.yml
checks.yml
validate.yml
```

The three root layer files under `fingerprint/` are the core model:
The three root facet files under `fingerprint/` are the core model:

- `prose.yml` for surface intent.
- `intent.yml` for surface intent.
- `inventory.yml` for curated material, exemplars, and source links.
- `composition.yml` for experience patterns.

`checks.yml` validates output and can enforce deterministic gates; it is not
`validate.yml` validates output through deterministic checks; 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.
Expand All @@ -74,30 +74,30 @@ fingerprint input for new Ghost work.

| Command | Description |
| --- | --- |
| `ghost init` | Create `.ghost/fingerprint/` with manifest, core layers, and deterministic checks. |
| `ghost scan` | Report fingerprint layer readiness and BYOA next-step guidance. |
| `ghost init` | Create `.ghost/fingerprint/` with manifest, facets, and deterministic checks. |
| `ghost scan` | Report fingerprint contribution facets and BYOA next-step guidance. |
| `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, and typed check refs. |
| `ghost describe` | Print direct markdown section ranges. |
| `ghost diff` | Structural prose-level diff between direct fingerprints. |
| `ghost diff` | Structural direct-fingerprint prose diff between direct fingerprints. |
| `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 check` | Run active `ghost.validate/v1` deterministic gates against a diff. |
| `ghost review` | Emit an evidence-routed advisory review packet grounded in fingerprint facets, inventory exemplars, checks, and the diff. |
| `ghost compare` | Pairwise or composite comparison over packages or direct fingerprints. |
| `ghost ack` | Record stance toward the tracked fingerprint in `.ghost-sync.json`. |
| `ghost track` | Shift the tracked fingerprint. |
| `ghost diverge` | Declare intentional divergence on a dimension. |
| `ghost emit <kind>` | Emit `review-command`. |
| `ghost skill install` | Install the unified `ghost` agentskills.io bundle. |

`ghost scan --format json` is deterministic readiness and source-signal state.
`ghost scan --format json` is deterministic contribution and source-signal state.
It does not run an LLM.

## Public Exports

- `@anarchitecture/ghost` for the combined surface.
- `@anarchitecture/ghost/scan` for scan readiness, source signals, and stack discovery.
- `@anarchitecture/ghost/scan` for scan contribution, source signals, and stack discovery.
- `@anarchitecture/ghost/fingerprint` for fingerprint package authoring, linting, verification, parsing, and serialization.
- `@anarchitecture/ghost/drift` for check/review/compare/stance helpers.
- `@anarchitecture/ghost/core` for shared schemas, types, and loaders.
Expand Down
Loading
Loading