Ghost stack 7/7 — Directory-tree graph, corridor gather, docs + cleanup#196
Draft
nahiyankhan wants to merge 12 commits into
Draft
Ghost stack 7/7 — Directory-tree graph, corridor gather, docs + cleanup#196nahiyankhan wants to merge 12 commits into
nahiyankhan wants to merge 12 commits into
Conversation
202f824 to
f141d98
Compare
The README, docs site, published package README, and CLAUDE.md still described the removed facet model (intent/inventory/composition/validate.yml plus relay/compare/stack/ack/track/diverge/lint/verify). Rewrite them onto the node-graph model and the current 9-command surface, and tighten the homepage thesis and hero into a strong, simple intro.
Collapse the on-disk node model into the directory tree. A node's id is its file path (`marketing/email.md` → `marketing/email`) and its parent is its containing directory; a surface is just a directory, and a directory's own prose lives in its `index.md` (the package-root `index.md` is the implicit `core` node). Removed: - `surfaces.yml` spine file and the `ghost.surfaces/v1` artifact/module - the `nodes/` directory convention (any `*.md` outside `checks/` is a node) - node frontmatter `id` and `under` — identity and containment come from the file's location, never from frontmatter or a declared spine Node frontmatter is now descriptive properties only (`description`, `relates`, `incarnation`, plus passthrough keys). `relates`/`extends` refs are path ids (`core/trust`, `brand:core/trust`). Moving a node is a rename; `ghost validate` reports `relates` that no longer resolve. The graph query layer (gather/checks/review/slice) is unchanged — it was already id-based; this only changes discovery, schema, and scaffolding. `ghost init` scaffolds `manifest.yml` + a core `index.md`; `ghost migrate` writes a directory tree. Skill bundle, docs, README, and CLAUDE.md updated; unreleased changesets re-pointed so the 0.19.0 changelog reads as one coherent facet→directory-tree story.
The corridor model keys composition off a node's file folder (the directory its source sits in), which diverges from graph-parent for index nodes: features/ bitcoin/index.md has folder features/bitcoin but parent features. Thread folder through PlacedNode and GhostGraphNode; inherited nodes get a package-qualified folder so they never sit on a local corridor. Purely additive.
Recompose resolveGraphSlice on the agreed model — folders are walls, files fill
the corridor:
- spine (full bodies): every node whose file folder is on the corridor from the
package root down to the surface's own folder. A sibling folder is a wall; its
nodes never enter the slice. This deletes the old leak where every child of an
ancestor (incl. every core-level sibling) cascaded into every surface.
- edges (full bodies, one hop): relates targets of every spine node, so a broad
rule authored once high in the corridor (relates: { to: arcade } on features/)
reaches every descendant.
- spokes (pointers): the surface's own descendants and each edge hub's subtree,
as id + description for the agent to pull on demand.
GraphSlice gains spokes[]; gather markdown gains an Available-to-pull section.
Tests encode the six confirmed behaviors against a synthetic feature-tree.
The Architecture paragraph described Ghost as 'the deterministic calculator the agent reaches for', which amputated the skill bundle. Ghost grounds agent work with both a deterministic CLI and an interpretive skill bundle that teaches authoring and use.
…odel getting-started referenced a pile of removed commands (relay, lint, verify, check, compare, stack, ack, track, diverge) and dead concepts (stacks, selected_context, fingerprint.md). Rewrote its gather/govern sections onto the real verbs (gather/checks/review), led the directory example with root nodes + a marketing surface (no more bare checkout), and taught the corridor model. fingerprint-authoring: drop lint/verify/stack; replace the nested-package section with the extends-based shared-brand model. cli-reference: drop the 'surfaces spine' phrasing. Docs build, frontmatter, and terminology all pass.
Cut adverb crutches ('simply'), a negative-contrast tail ('not only after a
review finds drift'), 'This is the pre-generation step' throat-clearing, and the
'navigable optionality' quotable. Plain, active phrasing.
Em dashes were repo-wide slop, not house style. Rewrote every one in the user-facing surfaces as a colon, period, comma, or parenthetical, and recast two negative-listing structures on the landing page. Covers README, CLAUDE.md, the package README, the skill bundle (SKILL + references), the docs site pages, and the ghost-ui marketing copy. Left typography specimens (the em dash is demo content there). Patch changeset for the shipped skill-bundle/README prose.
Remove three orphaned artifacts from the pre-node-graph fingerprint.md format: - schemas/fingerprint.schema.json: JSON Schema requiring palette/typography/ spacing frontmatter — a format that no longer exists. Not published, last touched before the node-graph reset, referenced nowhere. - scripts/emit-fingerprint-schema.mjs: its generator. Broken — reads from a deleted dist/scan/schema.js and a toJsonSchema() that no longer exists. - scripts/strip-signature.mjs: one-shot helper for stripping '# Signature' blocks from fingerprint.md files. Dead format, referenced nowhere. No code, build step, or CI references any of them.
Remove the Design Language catalogue (/ui/* pages, the /tools/ui landing) and everything that only served it: the component/foundation demo components (ai-elements, primitives, bento, examples, foundations), the registry loader (lib/component-docs, registry-sidebar, demo-loader, component-page-shell, open-in-v0), and the catalogue's theme editor (theme-panel, ThemePanelContext). Drop the ghost-ui entries from the tools index and the dock search. Keep ghost-ui as the docs site's runtime dependency (ThemeProvider, useTheme, useStaggerReveal) — that is the shell the site is built with, not documented content. 150 files removed; build, tests, and checks green.
Delete two orphaned catalogue data loaders missed in the prior cut (lib/component-registry, lib/component-source). Drop the ghost-ui row from the root README package table so it is not advertised on any public surface. In CLAUDE.md (agent orientation, not public), mark it parked: a standalone shadcn registry + ghost-mcp server, not coupled to Ghost. The package stays in the repo for anyone browsing; it is referenced nowhere public.
c3a8672 to
42e7f6d
Compare
5d2f7d9 to
a193c02
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked PR 7 of 7 · base:
ghost/06-cleanupTwo structural changes plus a documentation and cleanup pass.⚠️ Breaking (minor, pre-1.0).
1. Directory-as-architecture: the tree is the graph
The flat
nodes/*.mdfolder +surfaces.ymlspine + frontmatterid/underare replaced by the directory tree as the graph:idmarketing/email.md→marketing/email)surfaces.yml+undersurfaces.ymlindex.mdcorerootindex.mdis its prosesurfaces.ymland thenodes/convention are gone. Node frontmatter carries descriptive properties only (description,relates,incarnation, passthrough).relates/extendsrefs are path ids (core/trust,brand:core/trust). Moving a node is a rename;ghost validatereportsrelatesthat no longer resolve.The
ghost-core/surfacesmodule is deleted. This touched discovery, schema, and scaffolding only — the graph query layer was already id-based.2.
gatherrecomposed on a corridor + hub-and-spoke model (fixes a context leak)The old cascade leaked every
core-level sibling into every surface's slice (gathering one feature screen pulled in every other top-level feature). Replaced by folders are walls; files fill the corridor:relatestargets, so a broad rule authored once high in the tree (relates: { to: arcade }onfeatures/) reaches every descendant.GraphSliceJSON gains aspokesarray; graph nodes carry their filefolder. Grounding forchecks/reviewstays the full-body spine + edges. Validated against a realistic 51-feature monorepo shape.3. Docs, prose, and dead-code cleanup
getting-started/fingerprint-authoringreferenced ~10 removed commands (relay,lint,verify,check,compare,stack,ack,track,diverge) and dead concepts (stacks,selected_context,fingerprint.md). Rewritten onto the real verbs (gather/checks/review) and the corridor model; nested-package guidance replaced with theextendsshared-brand model.schemas/fingerprint.schema.json(a facet-era JSON Schema requiring palette/typography/spacing — a format that no longer exists), its broken generator, andstrip-signature.mjs./ui/*,/tools/ui) and everything that only served it from the docs site; dropped its public mentions. The package stays in the repo, referenced nowhere public.Decisions locked with the author
relatesis the one cross-wall connector and a broad rule is authored at the broadest folder where it is true.checks/stays a reserved top-level subtree (hard-coded for now; a follow-up makes the reserved set configurable for nested.agents-style reuse).index.md= thecorenode;corestays the implicit root.Validation
pnpm checkgreen (biome, typecheck, file-size, terminology, CLI manifest).init→ add nodes →validate→scan→gather(corridor spine + edges + spokes, no sibling leak).Stack