Skip to content

Ghost stack 4/6 — One-road: remove the binding, drive from the prompt#192

Draft
nahiyankhan wants to merge 10 commits into
ghost/03-polish-cutsfrom
ghost/04-one-road
Draft

Ghost stack 4/6 — One-road: remove the binding, drive from the prompt#192
nahiyankhan wants to merge 10 commits into
ghost/03-polish-cutsfrom
ghost/04-one-road

Conversation

@nahiyankhan

Copy link
Copy Markdown
Collaborator

Stacked PR 4 of 6 · base: `ghost/03-polish-cuts`

Remove the repo binding layer; gather/checks/review take agent-stated surfaces.

Contents

  • Exploration docs (contract-storage, one-road plan, parked survey decision)
  • step 0 — rescue path helpers to `scan/package-paths.ts`
  • step 1 — gather/checks/review take agent-stated surfaces, drop path resolution
  • steps 2–3 — delete binding verify + file-kind dispatch + binding modules
  • step 4 — remove nesting (stacks, `--all`, `--scope`, `--include-nested`, emit `--path`, monorepo init)
  • step 5 — skill bundle, migrate note, file-size manifest; changeset

Stack order

  1. ghost/01-surface-spec
  2. ghost/02-surface-model
  3. ghost/03-polish-cuts
  4. ➡️ ghost/04-one-road (this PR)
  5. ghost/05-node-graph
  6. ghost/06-cleanup

A deliberate not-to-act note. Survey is isolated, works, and is unexposed (its
command was removed in Phase 8; only internal importers remain). Removal is an
excavation, not a deletion: comparable-fingerprint and perceptual-prior may
depend on survey evidence, so the real question is whether ghost compare can
compare from the fingerprint alone — a design call in a corner the reset never
touched. Parked, not debt; surfaced only if a reason appears. Records what it is
and the first move (read compare + perceptual-prior) if ever revisited.
…rompt

The binding is the last place Ghost infers intent from repo location — the same
drift-prone pattern the reset killed in the merge, the map, and relay. Since
Cut C made all checks agent-evaluated, the no-LLM routing the binding protected
no longer exists to protect. The agent already does whole-repo analysis, so it
states the touched surfaces; Ghost keeps only what it alone does — deterministic
slice composition for a named surface.

Plan: reshape gather/checks/review off path-resolution first (gather drops
--path; checks/review take agent-stated --surface, diff becomes embed-only),
then delete the binding verify + file-kind dispatch, then the modules, then
docs/skill/changeset. External-contract use survives via gather --package.
Surface engine, cascade, grounding, and nested-package discovery untouched.
Major changeset.
Corrects the plan after a sharp catch: keeping nested-package discovery was
scaffolding for a concept being removed. Nesting only ever meant merge (killed
7b Cut 1) or binding (killed here) — so it has no meaning left. Decision: one
contract per package; a monorepo's independent products run Ghost per-package
or via --package. The cut now also removes the stack machinery,
discoverGhostPackages, lint/verify --all, scan --include-nested, emit --path,
and init --scope — after rescuing the load-bearing path helpers (resolveGitRoot,
normalizeGhostDir, resolveGhostDirDefault, GHOST_PACKAGE_DIR_ENV,
fingerprintPackageDisplayPath) into a neutral module. --package and
GHOST_PACKAGE_DIR survive as direct addressing.
The real question under 'one giant yml': how should the contract file itself?
We never chose — the facet files predate surfaces and surface: was bolted on.
Applies purposes.md's one-model-many-projections to STORAGE for the first time:
layout is a projection, the loader (assembleFingerprint) is the only boundary,
and the in-memory GhostFingerprintDocument + every read consumer (resolve,
gather, checks, grounding, compare) are untouched. Traces the domino effect:
one hard change (the loader becomes a fold over surface dirs), a few writer/
scaffold updates (init, migrate, lint, scan-status), zero model change.
Surface-first colocates concepts, makes surface: implicit-by-location inside the
contract (not the repo — no binding coupling), removes the tag from the schema,
and mirrors the cascade with core/ as the cross-cutting home. Open questions:
the fork itself, one-file-vs-many per surface, keep surfaces.yml flat (yes —
avoid dir-implied hierarchy reintroducing the flat-vs-nested trap). Composes
after one-road. Exploration, not decision.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant