Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
5f821cb
feat: three-stage scan pipeline (map → bucket → expression); fold gho…
nahiyankhan Apr 29, 2026
916e728
fix(compare): backfill palette oklch on load; tighten survey exhausti…
nahiyankhan Apr 29, 2026
008e7ea
dogfood(attempt-2): exhaustive ghost-ui scan post-recipe-tightening
nahiyankhan Apr 29, 2026
a468f4f
schema(bucket): drop libraries section
nahiyankhan Apr 29, 2026
469e0bc
docs: align READMEs and docs site with the four-tool / three-stage to…
nahiyankhan Apr 29, 2026
1495024
schema(expression): drop roles[] in favor of decisions + bucket compo…
nahiyankhan Apr 30, 2026
35109ef
feat(expression): canonical vocabulary for decision dimensions
nahiyankhan Apr 30, 2026
810a107
feat(core): perceptual prior + Rule type for drift severity calibration
nahiyankhan Apr 30, 2026
16f0ab5
feat(install): one-liner curl installer for the skill bundle
nahiyankhan Apr 30, 2026
3a21b4e
schema(expression): drop based_on rule provenance field
nahiyankhan Apr 30, 2026
56df6dc
dogfood(ghost-ui): canonical stage-2 bucket at package root
nahiyankhan Apr 30, 2026
2474219
invariant: drop signature from the body partition
nahiyankhan Apr 30, 2026
4d06f4d
schema(expression): drop signature section and distinctiveTraits field
nahiyankhan Apr 30, 2026
b397451
dogfood(managerbot): three-stage scan of square-web/apps/managerbot
nahiyankhan Apr 30, 2026
edc0913
dogfood(ghost-ui): attempt-3 — three-stage scan post schema-trim
nahiyankhan Apr 30, 2026
213bdfb
recipe(survey): require Tailwind class-atom pass
nahiyankhan Apr 30, 2026
83c2b64
Tighten expression scans and terminal context
nahiyankhan May 1, 2026
0406424
Improve expression review and generation steering
nahiyankhan May 3, 2026
acd67db
Rename bucket evidence to survey
nahiyankhan May 3, 2026
4043b7e
Make expression.md portable across projects
nahiyankhan May 4, 2026
abec98c
dogfood(dsgn-playground): three-stage scan
nahiyankhan May 4, 2026
65c59b8
test: update writer test for # Local References rename
nahiyankhan May 4, 2026
23b28fe
Upgrade scans to map/v2 + survey/v2 with implemented-surface evidence
nahiyankhan May 4, 2026
3e0ef1a
dogfood(cash-ios-moneybot): three-stage scan
nahiyankhan May 4, 2026
69b38bf
Add ghost-expression survey summarize for bounded profile context
nahiyankhan May 4, 2026
a7e4af7
dogfood(ghost-ui): attempt-7 — profile via bounded survey summary
nahiyankhan May 4, 2026
407f9c0
Make expression.md an authored-only contract; add verify-profile gate
nahiyankhan May 5, 2026
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/add-composition-pattern-steering.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ghost-expression": minor
---

Add composition-pattern steering so generated expressions and context bundles distinguish article, tracker, comparison, and card output shapes.
27 changes: 27 additions & 0 deletions .changeset/add-survey-schema-and-merge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
"ghost-expression": minor
---

Land the three-stage scan pipeline: map (`map.md`) → survey (`survey.json`) → express (`expression.md`). All three stages are now owned by `ghost-expression`; the previously separate `ghost-map` package is folded in.

**New artifact: `ghost.survey/v1`** — catalogues every concrete design value with structured specs, occurrence counts, and deterministic content-hashed IDs.

**New verbs:**
- `ghost-expression inventory [path]` — emit deterministic raw repo signals as JSON (manifests, language histogram, registry, top-level tree, git remote). Feeds the topology recipe. (Migrated from `ghost-map inventory`.)
- `ghost-expression survey <op>` — `merge` (concat with id-based dedup, idempotent — useful for modular rollups and fleet cohort views), `fix-ids` (recompute every row's `id` from content, so surveyor agents can author rows with empty `id` fields and finalize in one pass).
- `ghost-expression scan-status [dir]` — report which scan stages have produced artifacts (`map.md`, `survey.json`, `expression.md`) and which stage to run next. The build-system glue orchestrators call between stages.

**Updated verbs:**
- `ghost-expression lint` now auto-detects file kind by extension/content and dispatches to the right validator (`expression.md`, `map.md`, or `survey.json`).

**New skill recipes:**
- `map.md` — author `map.md` from a target (the topology stage). Migrated from the standalone `ghost-map` package.
- `survey.md` — author `survey.json` from a target (the observed evidence stage). Walks the agent through LLM-driven extraction with dialect-specific grep strategies, exhaustiveness discipline, and saturation predicate.
- `scan.md` — meta-recipe that orchestrates map → survey → profile end-to-end via `scan-status` checkpoints. Use when the user wants a full scan rather than a specific stage.

**Refactored skill recipe:**
- `profile.md` — now strictly the expression stage. Reads `survey.json` as ground truth; cannot fabricate values not in the survey; cites survey rows as evidence. Pre-requires `map.md` + `survey.json`. Hard split from the previous one-pass extract+interpret recipe.

**Removed:** the `ghost-map` package is deleted. `ghost.map/v1` schema and types now live in `@ghost/core`; `inventory` and `lint` (for `map.md`) move to `ghost-expression`. Consumers that imported from `ghost-map` should switch to `@ghost/core` (schemas/types) or `ghost-expression` (CLI verbs / library functions).

Survey schema, deterministic-id generation, lint, merge, and fix-ids primitives live in `@ghost/core`.
5 changes: 5 additions & 0 deletions .changeset/add-survey-summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ghost-expression": minor
---

Add a bounded `ghost-expression survey summarize` digest for profiling large surveys without loading full raw evidence into agent context.
5 changes: 5 additions & 0 deletions .changeset/add-verify-profile-gate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ghost-expression": minor
---

Add a deterministic profile verification command that checks expression palette provenance and promoted check calibration against survey evidence.
5 changes: 5 additions & 0 deletions .changeset/authored-expression-contract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ghost-expression": major
---

Make expression.md an authored-only contract, remove fragment-era on-disk embedding and check fields, add survey catalog, and expand profile verification.
5 changes: 5 additions & 0 deletions .changeset/canonical-decision-vocabulary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ghost-expression": minor
---

Add a controlled vocabulary of 12 canonical decision dimensions (`color-strategy`, `surface-hierarchy`, `shape-language`, `typography-voice`, `spatial-system`, `density`, `motion`, `elevation`, `theming-architecture`, `interactive-patterns`, `token-architecture`, `font-sourcing`) so fleet-aggregation primitives can group decisions across members. Profile recipe nudges authors toward canonical slugs; novel project-flavored slugs may pair with an optional `dimension_kind` that maps to a canonical survey. New soft `non-canonical-dimension` lint warning suggests the closest canonical match. The schema accepts the optional `dimension_kind` field on `decisions[]`; existing expressions remain valid.
8 changes: 1 addition & 7 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,5 @@
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [
"ghost-ui",
"ghost-docs",
"@ghost/core",
"ghost-fleet",
"ghost-map"
]
"ignore": ["ghost-ui", "ghost-docs", "@ghost/core", "ghost-fleet"]
}
6 changes: 6 additions & 0 deletions .changeset/drop-roles.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"ghost-expression": major
"ghost-drift": patch
---

Drop `roles[]` from the `expression.md` schema. Slot → token bindings either fall out of decisions[] (pattern consequences) or live in survey.json components[] (exhaustive catalog). The hybrid `roles[]` slot was filling neither role cleanly and didn't scale to systems with many components. Existing files that carry `roles:` will fail strict lint — drop the section to migrate. Drift skill recipes that referenced `roles[]` as part of the expression frontmatter have been updated.
5 changes: 5 additions & 0 deletions .changeset/expression-signature-references-checks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ghost-expression": major
---

Make `expression.md` the generation and drift root by restoring first-class `# Signature`, adding direct `references` for living specs/components/examples, and using `checks[]` for promoted review gates.
14 changes: 14 additions & 0 deletions .changeset/fix-oklch-backfill-and-tighten-survey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"ghost-expression": patch
"ghost-drift": patch
---

Fix self-distance bug + tighten the survey recipe's exhaustiveness rule.

**Bug fix.** `loadExpression` now backfills `oklch` on palette colors that arrive hex-only (frontmatter without an explicit `oklch` tuple). Without this, `comparePalette` treated hex-only colors as fully unmatched and contributed distance `1.0` per color — even when comparing an expression to itself. Self-distance was reported as 17.5% on a freshly authored expression. Backfill is deterministic (same hex → same oklch), so re-parsing the same file always yields the same in-memory shape.

**Defensive fallback.** `comparePalette` also now resolves oklch on-the-fly when missing, and falls back to hex-string equality when even on-the-fly compute can't parse the color (CSS variables, opaque external refs). This covers third-party producers that don't backfill on write.

**Recipe tightening.** `survey.md` now states the exhaustiveness rule up front and applies it per section. The rule is repo-agnostic — the recipe doesn't name specific signal sources (no "use registry.json"); the agent identifies the canonical signal in *this* repo, enumerates exhaustively, and cross-checks counts. New `Never sample` rule and explicit guidance against placeholder/glob names. Triggered by a dogfood scan that produced ~10% recall on `components[]` (6 rows for a 97-component package).

**Schema cut: `survey.libraries[]` removed.** External libraries (icon sets, primitive collections, motion libs, charting) no longer have a top-level survey section. Whether a system uses Radix or hand-rolls primitives doesn't change what its design language *is*. When a library is load-bearing for the design language (icon family, font sourcing), it surfaces as prose evidence in the interpreter stage under the relevant decision dimension. Survey sections are now `values`, `tokens`, `components`. `LibraryRow` / `LibraryRowSchema` / `libraryRowId` removed from `@ghost/core` exports. Existing `survey.json` files with a `libraries` field will fail lint (use a no-op migration: drop the field).
5 changes: 5 additions & 0 deletions .changeset/fix-review-severity-counts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ghost-expression": patch
---

Clarify emitted terminal context by reporting final review-command severity counts after escalation and naming lower-enforcement prompt context when no checks are promoted.
5 changes: 5 additions & 0 deletions .changeset/implemented-surface-evidence.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ghost-expression": major
---

Upgrade scans to `ghost.map/v2` and `ghost.survey/v2`, requiring implemented UI surface evidence and using those surfaces to guide expression profiling.
5 changes: 5 additions & 0 deletions .changeset/rename-evidence-to-survey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ghost-expression": major
---

Rename the observed design evidence artifact to survey across the schema, CLI, public types, recipes, and generated scan artifacts.
5 changes: 5 additions & 0 deletions .changeset/source-graph-scans.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ghost-expression": minor
---

Scans can now declare a source graph: one primary subject supplies usage and salience while resolver sources supply concrete values for imported symbols, with survey rows preserving resolution provenance.
5 changes: 5 additions & 0 deletions .changeset/tailwind-class-atom-pass.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ghost-expression": minor
---

survey.md now requires a Tailwind class-atom pass for Tailwind targets — class atoms (`p-2`, `bg-orange-500`) get resolved to literals and recorded as survey rows alongside declared `@theme` tokens. Without it, surveys undercount the rendered spacing/typography/color scale because Tailwind synthesizes most of it from `--spacing` / `--text-*` / `--color-*` rather than declaring each step.
5 changes: 5 additions & 0 deletions .changeset/tighten-terminal-context.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ghost-expression": patch
---

Sharpen emitted generation and review context around promoted checks, and add advisory lint hints for under-curated expressions.
5 changes: 5 additions & 0 deletions .changeset/update-drift-expression-recap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ghost-drift": patch
---

Update the drift skill's expression recap to reference Signature, direct references, and human-promoted checks.
5 changes: 5 additions & 0 deletions .changeset/v0-checks-and-perceptual-prior.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ghost-expression": minor
---

Add `checks[]` as the v0 authoring surface for drift review and a perceptual-weight prior that calibrates emitted severity. An `expression.md` can now declare human-promoted grep-friendly checks in frontmatter (id, canonical, kind, pattern, optional severity / match / tolerance / observed_count / presence_floor / support); the emitter renders them as a Rams-shaped slash command grouped by Critical / Serious / Nit, with rationale + match shape + observed count + support cited per check and a calibration footer that explains why severities landed where they did. Severity is computed from a fixed perceptual tier (color and font-family are loud, shape and elevation structural, spacing and motion-detail rhythmic) plus presence-floor escalation against the guarded pattern — adding to a silent pattern is louder than tweaking a populated one. Existing `decisions[]`-driven expressions continue to emit the previous structured-section layout; the new checks-driven path activates only when `checks[]` is present. Ships a one-liner curl installer at `install/install.sh` so the skill bundle can be installed without npm or a build step; recipes carry prose fallbacks for the most-called CLI verbs (`scan-status`, `inventory`, `lint`) so the no-CLI path is real, not degraded.
87 changes: 0 additions & 87 deletions .github/workflows/ghost-ci.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ packages/ghost-ui/.ghost/

# Emitted skill bundle — re-generate with `ghost emit skill`
.claude/skills/

# Scratch dir for dogfood scans and ad-hoc experiments
.scratch/
Loading
Loading