@design-intelligence/ghost 0.26.1 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/gather-command.js +5 -5
- package/dist/commands/gather-command.js.map +1 -1
- package/dist/commands/pull-command.js +5 -3
- package/dist/commands/pull-command.js.map +1 -1
- package/dist/commands/review-command.d.ts.map +1 -1
- package/dist/commands/review-command.js +0 -2
- package/dist/commands/review-command.js.map +1 -1
- package/dist/embed/gather.d.ts.map +1 -1
- package/dist/embed/gather.js +4 -2
- package/dist/embed/gather.js.map +1 -1
- package/dist/embed/inspect.d.ts.map +1 -1
- package/dist/embed/inspect.js +21 -28
- package/dist/embed/inspect.js.map +1 -1
- package/dist/embed/pull.d.ts.map +1 -1
- package/dist/embed/pull.js +32 -1
- package/dist/embed/pull.js.map +1 -1
- package/dist/embed/types.d.ts +4 -0
- package/dist/embed/types.d.ts.map +1 -1
- package/dist/ghost-core/catalog/assemble.d.ts.map +1 -1
- package/dist/ghost-core/catalog/assemble.js +5 -1
- package/dist/ghost-core/catalog/assemble.js.map +1 -1
- package/dist/ghost-core/catalog/closest.d.ts +1 -1
- package/dist/ghost-core/catalog/closest.js +1 -1
- package/dist/ghost-core/catalog/menu.d.ts +8 -6
- package/dist/ghost-core/catalog/menu.d.ts.map +1 -1
- package/dist/ghost-core/catalog/menu.js +5 -3
- package/dist/ghost-core/catalog/menu.js.map +1 -1
- package/dist/ghost-core/catalog/types.d.ts +5 -1
- package/dist/ghost-core/catalog/types.d.ts.map +1 -1
- package/dist/ghost-core/check/lint.d.ts.map +1 -1
- package/dist/ghost-core/check/lint.js +0 -10
- package/dist/ghost-core/check/lint.js.map +1 -1
- package/dist/ghost-core/check/load.d.ts.map +1 -1
- package/dist/ghost-core/check/load.js +0 -2
- package/dist/ghost-core/check/load.js.map +1 -1
- package/dist/ghost-core/check/types.d.ts +0 -2
- package/dist/ghost-core/check/types.d.ts.map +1 -1
- package/dist/ghost-core/index.d.ts +1 -2
- package/dist/ghost-core/index.d.ts.map +1 -1
- package/dist/ghost-core/index.js +1 -3
- package/dist/ghost-core/index.js.map +1 -1
- package/dist/ghost-core/material-transport.d.ts +4 -8
- package/dist/ghost-core/material-transport.d.ts.map +1 -1
- package/dist/ghost-core/material-transport.js +39 -91
- package/dist/ghost-core/material-transport.js.map +1 -1
- package/dist/ghost-core/materials.d.ts +1 -1
- package/dist/ghost-core/materials.d.ts.map +1 -1
- package/dist/ghost-core/materials.js +4 -1
- package/dist/ghost-core/materials.js.map +1 -1
- package/dist/ghost-core/node/schema.d.ts +3 -1
- package/dist/ghost-core/node/schema.d.ts.map +1 -1
- package/dist/ghost-core/node/schema.js +4 -2
- package/dist/ghost-core/node/schema.js.map +1 -1
- package/dist/ghost-core/node/serialize.d.ts +7 -5
- package/dist/ghost-core/node/serialize.d.ts.map +1 -1
- package/dist/ghost-core/node/serialize.js +18 -9
- package/dist/ghost-core/node/serialize.js.map +1 -1
- package/dist/ghost-core/node/types.d.ts +9 -6
- package/dist/ghost-core/node/types.d.ts.map +1 -1
- package/dist/init-payloads/median/cliche.median.md +1 -1
- package/dist/init-payloads/skeleton/brand.md +1 -1
- package/dist/init-payloads/skeleton/context.conversation.md +1 -1
- package/dist/init-payloads/skeleton/foundation.color.md +1 -1
- package/dist/init-payloads/skeleton/foundation.composition.md +1 -1
- package/dist/init-payloads/skeleton/foundation.controls.md +1 -1
- package/dist/init-payloads/skeleton/foundation.layout.md +1 -1
- package/dist/init-payloads/skeleton/foundation.motion.md +1 -1
- package/dist/init-payloads/skeleton/foundation.type.md +1 -1
- package/dist/init-payloads/skeleton/foundation.voice.md +1 -1
- package/dist/init-payloads/vessel-light/anti-goal.median.md +1 -1
- package/dist/init-payloads/vessel-light/anti-goal.tells.md +1 -1
- package/dist/init-payloads/vessel-light/grammar.color-roles.md +1 -3
- package/dist/init-payloads/vessel-light/grammar.conversation.md +1 -2
- package/dist/init-payloads/vessel-light/grammar.deletion.md +1 -1
- package/dist/init-payloads/vessel-light/grammar.hierarchy.md +1 -3
- package/dist/init-payloads/vessel-light/grammar.job.md +1 -1
- package/dist/init-payloads/vessel-light/grammar.motion.md +1 -3
- package/dist/init-payloads/vessel-light/grammar.rhythm.md +1 -3
- package/dist/init-payloads/vessel-light/grammar.surfaces.md +1 -3
- package/dist/init-payloads/vessel-light/index.md +1 -1
- package/dist/init-payloads/vessel-light/register.data-density.md +1 -1
- package/dist/init-payloads/vessel-light/register.editorial.md +1 -1
- package/dist/init-payloads/vessel-light/register.email.md +1 -1
- package/dist/init-payloads/vessel-light/signature.palette.md +1 -1
- package/dist/init-payloads/vessel-light/signature.shape.md +1 -1
- package/dist/init-payloads/vessel-light/signature.temperature.md +1 -1
- package/dist/init-payloads/vessel-light/signature.type.md +8 -2
- package/dist/review/baseline.d.ts +1 -1
- package/dist/review/baseline.d.ts.map +1 -1
- package/dist/review/baseline.js +2 -6
- package/dist/review/baseline.js.map +1 -1
- package/dist/review/review-packet.d.ts +2 -6
- package/dist/review/review-packet.d.ts.map +1 -1
- package/dist/review/review-packet.js +6 -20
- package/dist/review/review-packet.js.map +1 -1
- package/dist/scan/fingerprint-package-lint.d.ts.map +1 -1
- package/dist/scan/fingerprint-package-lint.js +20 -15
- package/dist/scan/fingerprint-package-lint.js.map +1 -1
- package/dist/skill-bundle/SKILL.md +10 -11
- package/dist/skill-bundle/references/adapting-a-starter.md +8 -2
- package/dist/skill-bundle/references/authoring-scenarios.md +1 -1
- package/dist/skill-bundle/references/blocks.md +10 -10
- package/dist/skill-bundle/references/brief.md +1 -1
- package/dist/skill-bundle/references/capture.md +23 -20
- package/dist/skill-bundle/references/distill.md +1 -1
- package/dist/skill-bundle/references/making.md +7 -7
- package/dist/skill-bundle/references/recall.md +1 -1
- package/dist/skill-bundle/references/schema.md +21 -20
- package/dist/skill-bundle/references/self-check.md +2 -2
- package/dist/skill-bundle/references/steering-audit.md +3 -3
- package/package.json +1 -1
- package/dist/ghost-core/glob.d.ts +0 -5
- package/dist/ghost-core/glob.d.ts.map +0 -1
- package/dist/ghost-core/glob.js +0 -68
- package/dist/ghost-core/glob.js.map +0 -1
- package/dist/review/glob.d.ts +0 -2
- package/dist/review/glob.d.ts.map +0 -1
- package/dist/review/glob.js +0 -2
- package/dist/review/glob.js.map +0 -1
- package/dist/review/probes.d.ts +0 -13
- package/dist/review/probes.d.ts.map +0 -1
- package/dist/review/probes.js +0 -45
- package/dist/review/probes.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readFile } from "node:fs/promises";
|
|
2
2
|
import { relative, resolve } from "node:path";
|
|
3
|
-
import { classifyMaterialLocator, closestIds,
|
|
3
|
+
import { classifyMaterialLocator, closestIds, extractSkeletonSections, listBundledMaterialFiles, materialLocator, materialLocatorClaimsPath, parseGlossary, parseSourceRef, resolveLocalMaterialFile, sliceNodeSection, } from "#ghost-core";
|
|
4
4
|
import { isMissingPathError } from "../internal/fs.js";
|
|
5
5
|
import { GHOST_GLOSSARY_FILENAME, GHOST_MATERIALS_DIR } from "./constants.js";
|
|
6
6
|
import { resolveGhostPackage, } from "./fingerprint-package.js";
|
|
@@ -43,7 +43,7 @@ export async function lintGhostPackage(dirArg, cwd = process.cwd()) {
|
|
|
43
43
|
await lintGlossary(paths.glossary, issues);
|
|
44
44
|
lintCover(manifest.cover, catalog, issues);
|
|
45
45
|
await lintKindPrefixes(paths, catalog, issues);
|
|
46
|
-
|
|
46
|
+
lintNodeContexts(catalog, issues);
|
|
47
47
|
lintSkeletonSections(catalog, issues);
|
|
48
48
|
await lintMaterialLocators(paths, catalog, issues, cwd);
|
|
49
49
|
lintCheckReferences(catalog, checks, issues);
|
|
@@ -131,20 +131,27 @@ async function lintKindPrefixes(paths, catalog, issues) {
|
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
/**
|
|
134
|
-
*
|
|
135
|
-
* the
|
|
136
|
-
*
|
|
137
|
-
*
|
|
134
|
+
* `context` is a node's entire retrieval payload: `gather` lists it as the text
|
|
135
|
+
* the agent selects against. A node without one renders as a bare id and cannot
|
|
136
|
+
* show when it applies, so `validate` makes that loud. `description` remains a
|
|
137
|
+
* read alias for one release and produces a migration warning.
|
|
138
138
|
*/
|
|
139
|
-
function
|
|
139
|
+
function lintNodeContexts(catalog, issues) {
|
|
140
140
|
for (const node of catalog.nodes.values()) {
|
|
141
|
-
if (node.
|
|
142
|
-
|
|
141
|
+
if (node.usesDeprecatedDescription) {
|
|
142
|
+
issues.push({
|
|
143
|
+
severity: "warning",
|
|
144
|
+
rule: "node-description-deprecated",
|
|
145
|
+
message: "node uses deprecated `description`; rename it to `context` (the retrieval payload shown by `gather`)",
|
|
146
|
+
path: `${node.id}.md.description`,
|
|
147
|
+
});
|
|
143
148
|
}
|
|
149
|
+
if (node.context !== undefined && node.context.trim().length > 0)
|
|
150
|
+
continue;
|
|
144
151
|
issues.push({
|
|
145
152
|
severity: "warning",
|
|
146
|
-
rule: "node-
|
|
147
|
-
message: "node has no `
|
|
153
|
+
rule: "node-context-missing",
|
|
154
|
+
message: "node has no `context`, so `gather` lists it as a bare id without applicability context; add one line naming the observable condition under which this node applies",
|
|
148
155
|
path: `${node.id}.md`,
|
|
149
156
|
});
|
|
150
157
|
}
|
|
@@ -178,10 +185,8 @@ async function lintMaterialLocators(paths, catalog, issues, cwd) {
|
|
|
178
185
|
if (classifyMaterialLocator(locator).kind === "url")
|
|
179
186
|
continue;
|
|
180
187
|
claimedLocators.push(locator);
|
|
181
|
-
const
|
|
182
|
-
|
|
183
|
-
});
|
|
184
|
-
if (expanded.matches.length > 0)
|
|
188
|
+
const resolved = await resolveLocalMaterialFile(locator, options);
|
|
189
|
+
if (resolved.match !== undefined)
|
|
185
190
|
continue;
|
|
186
191
|
issues.push({
|
|
187
192
|
severity: "warning",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fingerprint-package-lint.js","sourceRoot":"","sources":["../../src/scan/fingerprint-package-lint.ts"],"names":[],"mappings":"AAAA,OAAO,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C,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,MAAM;QACvE,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC,MAAM;KACjE,CAAC;AACJ,CAAC"}
|
|
@@ -26,10 +26,11 @@ it applies, and an agent reads the relevant guidance before building.
|
|
|
26
26
|
|
|
27
27
|
## The model in one breath
|
|
28
28
|
|
|
29
|
-
- A **node** is a markdown file: `
|
|
29
|
+
- A **node** is a markdown file: `context`, optional `materials`, and prose brand guidance. `description` is a deprecated compatibility alias for one release.
|
|
30
30
|
- `materials` is one list of locators for the concrete stuff the guidance is about:
|
|
31
|
-
repo-relative paths
|
|
32
|
-
[schema.md](references/schema.md))
|
|
31
|
+
explicit repo-relative file paths or supported external locators (see
|
|
32
|
+
[schema.md](references/schema.md)); name each file rather than
|
|
33
|
+
reaching for a glob. A bare locator is enough
|
|
33
34
|
when it explains itself. An opaque locator may use `{ locator, note }` to say
|
|
34
35
|
what it contains. `materials/` is reserved for bundled materials; reference
|
|
35
36
|
living implementations where they already live. Guidance stays in prose.
|
|
@@ -46,9 +47,7 @@ it applies, and an agent reads the relevant guidance before building.
|
|
|
46
47
|
- **Checks** are optional review assertions in a flat `.ghost/checks/*.md`
|
|
47
48
|
directory. Checks are feed-back only; they never leak into generation
|
|
48
49
|
context. Each check declares `references` to node ids and is used by
|
|
49
|
-
`ghost review`.
|
|
50
|
-
include `probe: <command>`; review runs it as evidence unless `--no-probes` is
|
|
51
|
-
set. Checks are never emitted by `ghost gather` or `ghost pull`.
|
|
50
|
+
`ghost review`. Checks are never emitted by `ghost gather` or `ghost pull`.
|
|
52
51
|
|
|
53
52
|
## The loop
|
|
54
53
|
|
|
@@ -64,7 +63,7 @@ ghost pulse # summarize local gather/pull events while tuning
|
|
|
64
63
|
```
|
|
65
64
|
|
|
66
65
|
`gather` does no selection. It emits the complete, unfiltered, unranked menu
|
|
67
|
-
from the ghost package. You read the ask against
|
|
66
|
+
from the ghost package. You read the ask against contexts, then
|
|
68
67
|
pull every applicable node and skip inapplicable nodes. Topic overlap alone is
|
|
69
68
|
not applicability. Its header includes a coverage line: total nodes and nodes
|
|
70
69
|
carrying concrete material. `gather` labels materials, substantial fenced
|
|
@@ -78,8 +77,8 @@ concrete nodes, prose rules), extracts Skeletons dead last, and appends
|
|
|
78
77
|
structured events to `.ghost/.events` for local tuning.
|
|
79
78
|
|
|
80
79
|
`review` does no grading. It assembles an advisory packet: touched files,
|
|
81
|
-
matched material-backed nodes, offered checks,
|
|
82
|
-
|
|
80
|
+
matched material-backed nodes, offered checks, coverage gaps, and the diff. The
|
|
81
|
+
host agent renders findings.
|
|
83
82
|
|
|
84
83
|
For visual work, do not stop at generation. Continue through material inspection,
|
|
85
84
|
compact briefing, rendered verification, bounded repair, and grounded review in
|
|
@@ -94,7 +93,7 @@ this same host-agent session.
|
|
|
94
93
|
| `ghost validate [file-or-dir]` | Validate manifest, nodes, material locators, check references, and glossary kind prefixes. |
|
|
95
94
|
| `ghost gather [ask…] [--format json]` | Emit the complete guidance menu plus coverage line; log exposed ids. |
|
|
96
95
|
| `ghost pull <id> [<id>…]` | Emit selected nodes' full bodies and materials in steering order; log selected/missed ids. |
|
|
97
|
-
| `ghost review [--diff <path|->] [--base <ref>] [--format json]
|
|
96
|
+
| `ghost review [--diff <path|->] [--base <ref>] [--format json]` | Emit an advisory review packet for a diff (requires `.ghost/checks/`). |
|
|
98
97
|
| `ghost export [--out <path>] [--no-checks] [--strict] [--format json]` | Package `.ghost/` as a portable brand artifact and report which material locators will not travel. |
|
|
99
98
|
| `ghost pulse [--format json]` | Summarize local `.ghost/.events`. |
|
|
100
99
|
| `ghost skill install` | Install this skill bundle. |
|
|
@@ -126,7 +125,7 @@ against the unpacked package with `--package <dir>`.
|
|
|
126
125
|
- Gather applicable guidance for a task: follow [references/recall.md](references/recall.md).
|
|
127
126
|
- Make a visual artifact end to end: follow [references/making.md](references/making.md).
|
|
128
127
|
- Shape a pre-generation brief: follow [references/brief.md](references/brief.md).
|
|
129
|
-
-
|
|
128
|
+
- Check readiness before generating: follow [references/self-check.md](references/self-check.md).
|
|
130
129
|
- Audit steering coverage: follow [references/steering-audit.md](references/steering-audit.md).
|
|
131
130
|
- Understand the package shape: see [references/schema.md](references/schema.md).
|
|
132
131
|
|
|
@@ -48,8 +48,14 @@ that contradicts itself.
|
|
|
48
48
|
failures this brand actually needs to avoid.
|
|
49
49
|
4. **Add or edit materials.** Record literal values where the implementation or
|
|
50
50
|
asset materials live, then add `materials` locators to the nodes that explain
|
|
51
|
-
them.
|
|
52
|
-
|
|
51
|
+
them. Name each file explicitly; do not reach for glob patterns, which in a
|
|
52
|
+
live repo can capture unintended files into pulls. Role names can stay
|
|
53
|
+
stable while values change. The point is that a realizing agent can inspect
|
|
54
|
+
the same concrete source the prose governs. Starter and vendored packages
|
|
55
|
+
ship locators written against the source repo's layout, so after vendoring,
|
|
56
|
+
verify every locator resolves against this repo's actual paths, repoint the
|
|
57
|
+
ones that moved, and run `ghost validate` — `material-locator-dead` warnings
|
|
58
|
+
name the stale ones.
|
|
53
59
|
5. **Re-tune contexts.** Revisit each `context.*` node after the foundation
|
|
54
60
|
answers exist. Keep only inversions that apply in that situation; delete
|
|
55
61
|
generic foundation rules repeated there, and add new contexts only when a
|
|
@@ -89,7 +89,7 @@ and enforced in review, not repeated as the model's main example.
|
|
|
89
89
|
## 4. Draft The Nodes
|
|
90
90
|
|
|
91
91
|
Write the smallest useful set of nodes, each carrying purpose-coherent prose guidance with
|
|
92
|
-
a one-line `
|
|
92
|
+
a one-line `context`, named `<kind>.<slug>.md` (or a bare slug when no kind is present). Ask three questions of each node body: why (the stance), with what
|
|
93
93
|
(the materials), and how it is assembled (the patterns). These are drafting
|
|
94
94
|
prompts, not fields.
|
|
95
95
|
|
|
@@ -18,7 +18,7 @@ This is opinionated method, not new schema. **"Block node" is shorthand in this
|
|
|
18
18
|
recipe, not a ghost concept**: it means any node whose guidance is a reusable
|
|
19
19
|
building block, whatever kind the author's glossary declares for it (`block`,
|
|
20
20
|
`asset`, `pattern`, …). A block node is a node like any other: a markdown file
|
|
21
|
-
with a `
|
|
21
|
+
with a `context` and a prose body, named `<kind>.<slug>.md` (or a bare
|
|
22
22
|
slug). See [capture.md](capture.md) for the node shape. Block prose can be one
|
|
23
23
|
paragraph inside a broader node, or split across many nodes, one per block,
|
|
24
24
|
whatever keeps each node purpose-coherent.
|
|
@@ -46,7 +46,7 @@ Neither is correct. A concrete block node is a deliberate trade, not a leak.
|
|
|
46
46
|
|
|
47
47
|
- **Primitives** (button, input, badge, avatar, spinner…) get **no prose body**
|
|
48
48
|
when the generic form serves. They are shared vocabulary, not stance. If you
|
|
49
|
-
record one at all, give it only a `
|
|
49
|
+
record one at all, give it only a `context` so `gather` can surface it;
|
|
50
50
|
the absence of a body is the signal that training priors are acceptable here.
|
|
51
51
|
When a primitive is itself brand-distinctive (a button whose shape, weight, or
|
|
52
52
|
focus treatment is a recognizable brand move), its *divergence from the
|
|
@@ -64,9 +64,9 @@ primitive.
|
|
|
64
64
|
|
|
65
65
|
## The shape of a block node
|
|
66
66
|
|
|
67
|
-
A node like any other. Frontmatter carries `
|
|
68
|
-
write one on every block worth matching
|
|
69
|
-
over.
|
|
67
|
+
A node like any other. Frontmatter carries `context`, the direct applicability
|
|
68
|
+
payload; write one on every block worth matching. The body is prose the agent
|
|
69
|
+
reasons over.
|
|
70
70
|
|
|
71
71
|
**Body:** one short paragraph in a consistent rhythm, *for / reach when / not
|
|
72
72
|
when (use X instead) / never*:
|
|
@@ -90,7 +90,7 @@ not a swappable implementation detail.
|
|
|
90
90
|
## How a match runs
|
|
91
91
|
|
|
92
92
|
The agent reads the package's stance, `gather`s the menu, pulls block nodes
|
|
93
|
-
whose
|
|
93
|
+
whose contexts apply, separates near-neighbors on *not when* and *never*,
|
|
94
94
|
and assembles. The realizing surface authors the chosen blocks in its medium.
|
|
95
95
|
The guidance never named a component; the agent bridged via documented
|
|
96
96
|
purpose.
|
|
@@ -118,7 +118,7 @@ kinds:
|
|
|
118
118
|
|
|
119
119
|
```markdown
|
|
120
120
|
---
|
|
121
|
-
|
|
121
|
+
context: A consequential action needs explicit user approval before it runs.
|
|
122
122
|
---
|
|
123
123
|
Gates a tool action behind explicit user approval. Reach for it when the user's
|
|
124
124
|
first question is "do I allow this?", when a consequential action needs a human
|
|
@@ -131,7 +131,7 @@ with no decision to make, it only manufactures friction.
|
|
|
131
131
|
|
|
132
132
|
```markdown
|
|
133
133
|
---
|
|
134
|
-
|
|
134
|
+
context: Many records need comparison across shared columns.
|
|
135
135
|
---
|
|
136
136
|
Presents many records across shared, comparable columns. Reach for it when the
|
|
137
137
|
user's first question is "how do these compare across the same attributes?" Not
|
|
@@ -144,11 +144,11 @@ record's detail view.
|
|
|
144
144
|
|
|
145
145
|
```markdown
|
|
146
146
|
---
|
|
147
|
-
|
|
147
|
+
context: A person can trigger an action.
|
|
148
148
|
---
|
|
149
149
|
```
|
|
150
150
|
|
|
151
|
-
(A primitive the generic form serves: a `
|
|
151
|
+
(A primitive the generic form serves: a `context` so `gather` can surface
|
|
152
152
|
it, no body. If this brand's button were itself a recognizable brand move, its
|
|
153
153
|
divergence from the generic form would earn a short body.)
|
|
154
154
|
|
|
@@ -8,7 +8,7 @@ description: Build a compact pre-generation packet from pulled ghost guidance.
|
|
|
8
8
|
A brief is an ephemeral steering packet for the generating pass. It is not a new
|
|
9
9
|
schema and is never written back into `.ghost/`.
|
|
10
10
|
|
|
11
|
-
1. Run `ghost gather <ask> --format json` and select against
|
|
11
|
+
1. Run `ghost gather <ask> --format json` and select against contexts.
|
|
12
12
|
2. The cover is already in context and outside selection. Pull every applicable
|
|
13
13
|
node with `ghost pull <id> [<id>…]`; skip nodes whose stated situation does
|
|
14
14
|
not apply. Topic overlap alone is not applicability.
|
|
@@ -23,7 +23,7 @@ ghost treats the `.ghost/` package as canonical.
|
|
|
23
23
|
voice.md # guidance without a kind
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
A **node** is a markdown file: a `
|
|
26
|
+
A **node** is a markdown file: a `context`, optional `materials`, and a
|
|
27
27
|
prose body. The package is **flat** — no hierarchy, no inheritance, no edges. A
|
|
28
28
|
node's kind comes from its filename prefix; the glossary declares the kinds.
|
|
29
29
|
|
|
@@ -37,7 +37,7 @@ should preserve and what is incidental.
|
|
|
37
37
|
|
|
38
38
|
````markdown
|
|
39
39
|
---
|
|
40
|
-
|
|
40
|
+
context: Building or reviewing a status card.
|
|
41
41
|
materials:
|
|
42
42
|
- src/components/status-card.tsx
|
|
43
43
|
---
|
|
@@ -99,7 +99,7 @@ out-steers a paragraph about error-message voice:
|
|
|
99
99
|
|
|
100
100
|
```markdown
|
|
101
101
|
---
|
|
102
|
-
|
|
102
|
+
context: Writing or reviewing an error message.
|
|
103
103
|
---
|
|
104
104
|
|
|
105
105
|
Normative for rhythm and stance at failure moments; match its form, not its words.
|
|
@@ -170,7 +170,7 @@ thing.
|
|
|
170
170
|
|
|
171
171
|
```markdown
|
|
172
172
|
---
|
|
173
|
-
|
|
173
|
+
context: Building or reviewing an AI dashboard.
|
|
174
174
|
---
|
|
175
175
|
|
|
176
176
|
Not: rounded-xl cards on gray-50, indigo primary buttons, gradient hero text,
|
|
@@ -184,8 +184,8 @@ SaaS template, the anti-goal failed even when every token is technically valid.
|
|
|
184
184
|
```
|
|
185
185
|
|
|
186
186
|
The strongest anti-goal is silent: purged from exemplars, absent from starter
|
|
187
|
-
structures, and
|
|
188
|
-
|
|
187
|
+
structures, and reinforced by a check in review. Use anti-goal prose to name the
|
|
188
|
+
replacement; use checks to catch regressions.
|
|
189
189
|
|
|
190
190
|
## The node shape
|
|
191
191
|
|
|
@@ -193,7 +193,7 @@ A node at `principle.trust.md` (id `principle.trust`, kind `principle`):
|
|
|
193
193
|
|
|
194
194
|
```markdown
|
|
195
195
|
---
|
|
196
|
-
|
|
196
|
+
context: A person is about to pay. # the retrieval payload
|
|
197
197
|
# optional: materials, audience, stage, or other free-form keys
|
|
198
198
|
---
|
|
199
199
|
|
|
@@ -201,16 +201,17 @@ Near the moment of payment, reduce felt risk. Proximity of reassurance to the
|
|
|
201
201
|
action beats completeness...
|
|
202
202
|
```
|
|
203
203
|
|
|
204
|
-
- **`
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
204
|
+
- **`context`** tells the agent when to gather the node. Name the observable
|
|
205
|
+
condition under which it applies, and nothing else. Put the guidance and what
|
|
206
|
+
the node contributes in the body. State the condition directly; use “gather
|
|
207
|
+
when” only when the direct condition cannot carry a necessary routing
|
|
208
|
+
constraint. `ghost gather` emits id, kind, context, concrete coverage, payload
|
|
209
|
+
labels, and material count; the agent matches the ask against applicability.
|
|
209
210
|
- **Kind is the filename prefix** and must be a kind the glossary declares. A
|
|
210
211
|
bare name (`voice.md`) has no kind.
|
|
211
212
|
- **Altitude lives in the prose.** State universal guidance plainly; give a
|
|
212
213
|
narrower guidance a **condition** — the situation it applies in — in the prose
|
|
213
|
-
and usually in the
|
|
214
|
+
and usually in the context. Do not use broad universal imperatives unless
|
|
214
215
|
universal retrieval is intended. Never file a node by destination
|
|
215
216
|
(`for-emails.md`).
|
|
216
217
|
- **Concreteness is derived.** A node carries concrete material when it has
|
|
@@ -258,7 +259,7 @@ Everywhere else:
|
|
|
258
259
|
- **No aspirational abstractions.** "We value clarity and trust" steers
|
|
259
260
|
nothing. Name the decision the guidance forces: what gets picked when two goods
|
|
260
261
|
compete, and what gets given up.
|
|
261
|
-
- **
|
|
262
|
+
- **Contexts must discriminate.** Read the context alone. If it also
|
|
262
263
|
fits a competitor's brand, it is retrieval-dead; rewrite it until it could
|
|
263
264
|
belong to no one else.
|
|
264
265
|
- **Cut unratified hedges.** "Generally," "where possible," and "consider" in a
|
|
@@ -279,7 +280,7 @@ dimension:
|
|
|
279
280
|
| Dimension | Question |
|
|
280
281
|
| --- | --- |
|
|
281
282
|
| Testimony | Can you quote the human words or artifact this node came from? |
|
|
282
|
-
| Discrimination | Does the
|
|
283
|
+
| Discrimination | Does the context fit only this brand? |
|
|
283
284
|
| Force | Does the node body decide something, or merely describe something? |
|
|
284
285
|
| Altitude | Is it universal on purpose, or given its condition? |
|
|
285
286
|
| Residue | Is it free of starter-demo prose and brand-deck filler? |
|
|
@@ -295,11 +296,11 @@ strongest form that fixes the observed failure.
|
|
|
295
296
|
|
|
296
297
|
| If the agent keeps... | Author... |
|
|
297
298
|
| --- | --- |
|
|
298
|
-
| missing the guidance | sharper `
|
|
299
|
+
| missing the guidance | sharper `context`; move universal guidance to the cover |
|
|
299
300
|
| inventing values | `asset.*` node with materials and exact names |
|
|
300
301
|
| producing generic output | `anti-goal.*` replacement plus annotated `exemplar.*` |
|
|
301
302
|
| choosing the wrong structure | `pattern.*` with bound/open and a `## Skeleton` |
|
|
302
|
-
| crossing hard lines | invariant prose plus a check
|
|
303
|
+
| crossing hard lines | invariant prose plus a review check |
|
|
303
304
|
| applying guidance too broadly | condition in prose |
|
|
304
305
|
| making bad tradeoffs | `decision.*` trace |
|
|
305
306
|
| producing correct but forgettable work | scoped `concept.*` |
|
|
@@ -352,9 +353,11 @@ non-negotiables that apply to every task, what the package covers, and any
|
|
|
352
353
|
stricter silence posture. `ghost gather` inlines it before the menu, so anything
|
|
353
354
|
that must never be missed belongs there.
|
|
354
355
|
|
|
355
|
-
Nodes may carry a `materials` list in frontmatter: repo-relative
|
|
356
|
-
supported external locators (see [schema.md](schema.md)) for the
|
|
357
|
-
materials the prose governs.
|
|
356
|
+
Nodes may carry a `materials` list in frontmatter: explicit repo-relative file
|
|
357
|
+
paths or supported external locators (see [schema.md](schema.md)) for the
|
|
358
|
+
concrete materials the prose governs. Name each file; glob patterns are not
|
|
359
|
+
supported and fail validation, because in a live repo a glob can capture
|
|
360
|
+
unintended files into pulls. Use a bare locator when it explains itself. Use
|
|
358
361
|
`{ locator, note }` when an opaque locator needs a short retrieval cue. The
|
|
359
362
|
external locator tells the host how to connect;
|
|
360
363
|
ghost does not fetch or authenticate. Put brand-owned materials that should
|
|
@@ -51,7 +51,7 @@ ghost pull <potentially-affected-node-ids>
|
|
|
51
51
|
Treat the gathered menu as a reconciliation index. Read affected node bodies
|
|
52
52
|
before proposing edits.
|
|
53
53
|
|
|
54
|
-
Pull nodes whose
|
|
54
|
+
Pull nodes whose contexts or materials touch the evidence, the situation,
|
|
55
55
|
the medium, or the likely contradiction. If no node applies, say so and continue
|
|
56
56
|
with a new-node proposal only after inspection and human ratification.
|
|
57
57
|
|
|
@@ -23,7 +23,7 @@ selects, inspects, makes, renders, judges, and repairs in the same session.
|
|
|
23
23
|
|
|
24
24
|
1. **Gather for the actual ask.** Follow [recall.md](recall.md): run
|
|
25
25
|
`ghost gather <ask>` with the user's real task, not a generic label.
|
|
26
|
-
2. **Select applicable nodes.** Read
|
|
26
|
+
2. **Select applicable nodes.** Read contexts against the situation. Pull
|
|
27
27
|
guidance whose stated condition, material, structure, refusal, or decision
|
|
28
28
|
governs the work. Topic overlap alone is not applicability.
|
|
29
29
|
3. **Pull selected nodes.** Run `ghost pull <id> [<id>…]`. Prefer the pulled
|
|
@@ -38,7 +38,7 @@ selects, inspects, makes, renders, judges, and repairs in the same session.
|
|
|
38
38
|
- read inlined text materials;
|
|
39
39
|
- open referenced source, token, or component files;
|
|
40
40
|
- view image inspect-pointers instead of relying on filenames;
|
|
41
|
-
- inspect rendered exemplars, not just their
|
|
41
|
+
- inspect rendered exemplars, not just their contexts;
|
|
42
42
|
- use an available host connection for an external locator only when inspecting
|
|
43
43
|
it could materially affect the task;
|
|
44
44
|
- let the host run its normal authentication and permission flow;
|
|
@@ -75,14 +75,14 @@ selects, inspects, makes, renders, judges, and repairs in the same session.
|
|
|
75
75
|
completion states, and localization.
|
|
76
76
|
11. **Verify in two lanes.** Keep mechanical evidence and visual read
|
|
77
77
|
separate:
|
|
78
|
-
- **Mechanical evidence:**
|
|
79
|
-
|
|
78
|
+
- **Mechanical evidence:** browser measurements, tests, and computed checks
|
|
79
|
+
own exact claims: overflow, overlap, dimensions, contrast, touch
|
|
80
80
|
targets, focus order, accessibility violations, required content, and
|
|
81
81
|
forbidden implementation patterns. Never estimate what software can
|
|
82
82
|
measure.
|
|
83
83
|
- **Visual read:** inspect screenshots, recordings, or the live render
|
|
84
84
|
for hierarchy, composition, density, rhythm, imagery, motion, brand fit,
|
|
85
|
-
and generic tells. Never treat a passing
|
|
85
|
+
and generic tells. Never treat a passing test as proof that the surface
|
|
86
86
|
feels right.
|
|
87
87
|
12. **Repair within a bounded budget.** Fix visible or mechanical problems with
|
|
88
88
|
coherent changes grounded in the evidence and pulled guidance. Default to two
|
|
@@ -104,7 +104,7 @@ visual success from source code alone. You may still report source-level checks,
|
|
|
104
104
|
local reasoning, and the exact verification gap.
|
|
105
105
|
|
|
106
106
|
If rendering is possible but incomplete, be precise: name the viewports, states,
|
|
107
|
-
fixtures,
|
|
107
|
+
fixtures, measurements, and materials checked, and name what was not checked. A narrow
|
|
108
108
|
verified claim is better than broad confidence without evidence.
|
|
109
109
|
|
|
110
110
|
## What to report back
|
|
@@ -114,7 +114,7 @@ Keep the final report short and evidence-based:
|
|
|
114
114
|
- ghost nodes pulled and the main decisions they forced.
|
|
115
115
|
- Materials inspected and materials unavailable.
|
|
116
116
|
- Render matrix used: viewport, state, fixture, or preview path.
|
|
117
|
-
- Mechanical
|
|
117
|
+
- Mechanical measurements or tests run, with failures fixed or remaining.
|
|
118
118
|
- Visual issues found and repaired.
|
|
119
119
|
- Review result when `ghost review` ran, or why it did not.
|
|
120
120
|
- Residual risks, including any unavailable render or image-inspection capability.
|
|
@@ -8,7 +8,7 @@ description: Gather and pull the applicable ghost brand guidance for a task.
|
|
|
8
8
|
1. Run `ghost gather <ask>` for the actual task. The cover is inlined by gather;
|
|
9
9
|
do not pull it separately. Read the coverage line: all-prose packages are
|
|
10
10
|
weak steering.
|
|
11
|
-
2. Select against `
|
|
11
|
+
2. Select against `context`; ghost never selects for you. Pull every node
|
|
12
12
|
whose stated situation applies and whose guidance, material, structure, or
|
|
13
13
|
refusal governs the work. Skip inapplicable nodes. Topic overlap alone is not
|
|
14
14
|
applicability.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: schema
|
|
3
|
-
description: The ghost package shape: flat nodes, derived concreteness, Skeletons,
|
|
3
|
+
description: The ghost package shape: flat nodes, derived concreteness, Skeletons, and checks.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# ghost Package Reference
|
|
@@ -37,7 +37,7 @@ A node is markdown with frontmatter and a prose body:
|
|
|
37
37
|
|
|
38
38
|
```markdown
|
|
39
39
|
---
|
|
40
|
-
|
|
40
|
+
context: Placing, sizing, or choosing a logo lockup or glyph.
|
|
41
41
|
materials:
|
|
42
42
|
- brand/logo*.svg
|
|
43
43
|
- https://figma.com/file/example?node-id=logo-lockups
|
|
@@ -50,16 +50,21 @@ Use the full lockup when recognition matters.
|
|
|
50
50
|
|
|
51
51
|
- Identity is the filename minus `.md`.
|
|
52
52
|
- Kind is the first dotted segment of the filename.
|
|
53
|
-
- `
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
53
|
+
- `context` is the retrieval payload shown by `ghost gather`. Its only job is
|
|
54
|
+
to tell the agent when to gather the node. Name the observable applicability
|
|
55
|
+
condition directly; put guidance and contribution in the body. Say “gather
|
|
56
|
+
when” only when an explicit routing instruction is necessary. Avoid broad
|
|
57
|
+
universal wording unless universal retrieval is intended. `description`
|
|
58
|
+
remains a deprecated read alias for one release; `ghost validate` warns until
|
|
59
|
+
it is renamed.
|
|
60
|
+
- `materials` accepts repo-relative file paths plus supported external locators
|
|
61
|
+
using `https:`, `mcp:`, `figma:`, or `github:`. Name each file explicitly:
|
|
62
|
+
glob patterns are not supported and fail validation, because in a live
|
|
63
|
+
repo a glob can capture unintended files into pulls. Items may be bare
|
|
64
|
+
locator strings or `{ locator, note }` objects. Use a short `note` only when
|
|
65
|
+
an opaque locator needs retrieval context. The external locator tells the
|
|
66
|
+
host how to connect; ghost does not fetch or authenticate. The list locates
|
|
67
|
+
material, while guidance stays in the node body.
|
|
63
68
|
|
|
64
69
|
ghost derives whether a node carries concrete material from structure:
|
|
65
70
|
non-empty `materials`, a fenced code block of at least 3 lines, or a
|
|
@@ -97,17 +102,14 @@ description: Logo usage preserves clearspace and lockup integrity.
|
|
|
97
102
|
severity: medium
|
|
98
103
|
references:
|
|
99
104
|
- asset.logo
|
|
100
|
-
probe: pnpm test:logo-clearspace
|
|
101
105
|
---
|
|
102
106
|
|
|
103
107
|
Grade whether the change preserves the logo guidance in `asset.logo`.
|
|
104
108
|
```
|
|
105
109
|
|
|
106
|
-
`references` are node ids with optional heading anchors.
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
ghost pass/fail verdict. Use `ghost review --no-probes` to skip. Trust model:
|
|
110
|
-
probes are the same class as npm scripts; Git review is the boundary.
|
|
110
|
+
`references` are node ids with optional heading anchors. Check bodies contain
|
|
111
|
+
review instructions for the host agent; they are not run by ghost and are never
|
|
112
|
+
part of generation context.
|
|
111
113
|
|
|
112
114
|
## Gather / Pull / Review
|
|
113
115
|
|
|
@@ -117,5 +119,4 @@ probes are the same class as npm scripts; Git review is the boundary.
|
|
|
117
119
|
materials. Binary local materials become inspect-pointers. External materials
|
|
118
120
|
remain locators for the host agent to access only when the task requires them.
|
|
119
121
|
- `ghost review` matches diff files to local node materials, offers relevant
|
|
120
|
-
checks,
|
|
121
|
-
judge.
|
|
122
|
+
checks, and emits a packet for the host agent to judge.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: self-check
|
|
3
|
-
description: A pre-generation
|
|
3
|
+
description: A pre-generation check that reveals whether you have actually gathered and reasoned about the brand guidance before you build.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Recipe: Self-Check Before Generating
|
|
@@ -55,7 +55,7 @@ Classify readiness:
|
|
|
55
55
|
When you cannot answer the grounding questions:
|
|
56
56
|
|
|
57
57
|
1. Run `ghost gather <ask>` to emit the menu for the actual task, then match the
|
|
58
|
-
work to nodes by their
|
|
58
|
+
work to nodes by their contexts.
|
|
59
59
|
2. Read the selected nodes' bodies and re-ask the questions, citing node ids.
|
|
60
60
|
|
|
61
61
|
A genuinely silent package is an expected state, not a blocker. When it does
|
|
@@ -30,13 +30,13 @@ Report first:
|
|
|
30
30
|
- **Pulse by concreteness:** concrete-material exposure/pull rate vs prose-only
|
|
31
31
|
exposure/pull rate. In markdown this is the `Concrete material` row. This is
|
|
32
32
|
the tuning instrument: if concrete nodes are not pulled when applicable,
|
|
33
|
-
|
|
33
|
+
contexts or task selection are failing.
|
|
34
34
|
|
|
35
35
|
## Corpus-level table
|
|
36
36
|
|
|
37
37
|
| Row | Status | Evidence | Next move |
|
|
38
38
|
| --- | --- | --- | --- |
|
|
39
|
-
| Retrieval | strong / weak |
|
|
39
|
+
| Retrieval | strong / weak | contexts, ids, cover | sharpen contexts or move universal guidance to the cover |
|
|
40
40
|
| Concreteness | strong / thin | materials, fenced examples, Skeletons | add concrete locators, exemplars, or opening structures |
|
|
41
41
|
| Anti-goals | present / missing / vague | `anti-goal.*`, review packet | write not-X-instead-Y replacements and material locators |
|
|
42
42
|
| Consistency | clean / conflicting | concrete bodies vs rules | update stale examples; examples average with rules |
|
|
@@ -44,7 +44,7 @@ Report first:
|
|
|
44
44
|
| Materials | present / missing | `materials`, inspect-pointers | point at real assets/components/tokens |
|
|
45
45
|
| Exemplars | annotated / unannotated / converging / missing | fenced samples, screenshots, repeated runs | say what to copy and what is incidental; tighten applicability when unrelated tasks converge |
|
|
46
46
|
| Patterns | bound-open / loose / missing | `pattern.*`, Skeletons | state applies / bound / open and add a Skeleton when opening structure matters |
|
|
47
|
-
| Checks | covered / partial / missing | checks/,
|
|
47
|
+
| Checks | covered / partial / missing | checks/, review packet | add checks for high-risk invariants |
|
|
48
48
|
| Silence posture | defined / missing | cover | say when to proceed provisionally or ask |
|
|
49
49
|
|
|
50
50
|
## Exemplar convergence
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@design-intelligence/ghost",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"description": "ghost CLI for portable .ghost/ packages of brand guidance your agent reads before it builds, with advisory review after",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Block, Inc.",
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/** Tiny dependency-free glob matcher for repo-relative paths. */
|
|
2
|
-
export declare function matchesGlob(glob: string, path: string): boolean;
|
|
3
|
-
export declare function hasGlobMagic(path: string): boolean;
|
|
4
|
-
export declare function normalizeGlobPath(path: string): string;
|
|
5
|
-
//# sourceMappingURL=glob.d.ts.map
|