@design-intelligence/ghost 0.20.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.
Files changed (269) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +75 -0
  3. package/dist/bin.d.ts +3 -0
  4. package/dist/bin.d.ts.map +1 -0
  5. package/dist/bin.js +19 -0
  6. package/dist/bin.js.map +1 -0
  7. package/dist/cli.d.ts +4 -0
  8. package/dist/cli.d.ts.map +1 -0
  9. package/dist/cli.js +29 -0
  10. package/dist/cli.js.map +1 -0
  11. package/dist/commands/checks-command.d.ts +9 -0
  12. package/dist/commands/checks-command.d.ts.map +1 -0
  13. package/dist/commands/checks-command.js +45 -0
  14. package/dist/commands/checks-command.js.map +1 -0
  15. package/dist/commands/command-discovery.d.ts +57 -0
  16. package/dist/commands/command-discovery.d.ts.map +1 -0
  17. package/dist/commands/command-discovery.js +220 -0
  18. package/dist/commands/command-discovery.js.map +1 -0
  19. package/dist/commands/errors.d.ts +7 -0
  20. package/dist/commands/errors.d.ts.map +1 -0
  21. package/dist/commands/errors.js +19 -0
  22. package/dist/commands/errors.js.map +1 -0
  23. package/dist/commands/export-command.d.ts +3 -0
  24. package/dist/commands/export-command.d.ts.map +1 -0
  25. package/dist/commands/export-command.js +157 -0
  26. package/dist/commands/export-command.js.map +1 -0
  27. package/dist/commands/fingerprint-commands.d.ts +10 -0
  28. package/dist/commands/fingerprint-commands.d.ts.map +1 -0
  29. package/dist/commands/fingerprint-commands.js +74 -0
  30. package/dist/commands/fingerprint-commands.js.map +1 -0
  31. package/dist/commands/gather-command.d.ts +3 -0
  32. package/dist/commands/gather-command.d.ts.map +1 -0
  33. package/dist/commands/gather-command.js +152 -0
  34. package/dist/commands/gather-command.js.map +1 -0
  35. package/dist/commands/init-command.d.ts +3 -0
  36. package/dist/commands/init-command.d.ts.map +1 -0
  37. package/dist/commands/init-command.js +79 -0
  38. package/dist/commands/init-command.js.map +1 -0
  39. package/dist/commands/manifest-command.d.ts +9 -0
  40. package/dist/commands/manifest-command.d.ts.map +1 -0
  41. package/dist/commands/manifest-command.js +33 -0
  42. package/dist/commands/manifest-command.js.map +1 -0
  43. package/dist/commands/pull-command.d.ts +3 -0
  44. package/dist/commands/pull-command.d.ts.map +1 -0
  45. package/dist/commands/pull-command.js +224 -0
  46. package/dist/commands/pull-command.js.map +1 -0
  47. package/dist/commands/pulse-command.d.ts +3 -0
  48. package/dist/commands/pulse-command.d.ts.map +1 -0
  49. package/dist/commands/pulse-command.js +257 -0
  50. package/dist/commands/pulse-command.js.map +1 -0
  51. package/dist/commands/review-command.d.ts +3 -0
  52. package/dist/commands/review-command.d.ts.map +1 -0
  53. package/dist/commands/review-command.js +77 -0
  54. package/dist/commands/review-command.js.map +1 -0
  55. package/dist/commands/skill-command.d.ts +3 -0
  56. package/dist/commands/skill-command.d.ts.map +1 -0
  57. package/dist/commands/skill-command.js +96 -0
  58. package/dist/commands/skill-command.js.map +1 -0
  59. package/dist/fingerprint.d.ts +5 -0
  60. package/dist/fingerprint.d.ts.map +1 -0
  61. package/dist/fingerprint.js +3 -0
  62. package/dist/fingerprint.js.map +1 -0
  63. package/dist/ghost-core/catalog/assemble.d.ts +30 -0
  64. package/dist/ghost-core/catalog/assemble.d.ts.map +1 -0
  65. package/dist/ghost-core/catalog/assemble.js +38 -0
  66. package/dist/ghost-core/catalog/assemble.js.map +1 -0
  67. package/dist/ghost-core/catalog/closest.d.ts +16 -0
  68. package/dist/ghost-core/catalog/closest.d.ts.map +1 -0
  69. package/dist/ghost-core/catalog/closest.js +63 -0
  70. package/dist/ghost-core/catalog/closest.js.map +1 -0
  71. package/dist/ghost-core/catalog/index.d.ts +10 -0
  72. package/dist/ghost-core/catalog/index.d.ts.map +1 -0
  73. package/dist/ghost-core/catalog/index.js +9 -0
  74. package/dist/ghost-core/catalog/index.js.map +1 -0
  75. package/dist/ghost-core/catalog/menu.d.ts +36 -0
  76. package/dist/ghost-core/catalog/menu.d.ts.map +1 -0
  77. package/dist/ghost-core/catalog/menu.js +27 -0
  78. package/dist/ghost-core/catalog/menu.js.map +1 -0
  79. package/dist/ghost-core/catalog/types.d.ts +37 -0
  80. package/dist/ghost-core/catalog/types.d.ts.map +1 -0
  81. package/dist/ghost-core/catalog/types.js +2 -0
  82. package/dist/ghost-core/catalog/types.js.map +1 -0
  83. package/dist/ghost-core/check/index.d.ts +12 -0
  84. package/dist/ghost-core/check/index.d.ts.map +1 -0
  85. package/dist/ghost-core/check/index.js +12 -0
  86. package/dist/ghost-core/check/index.js.map +1 -0
  87. package/dist/ghost-core/check/lint.d.ts +9 -0
  88. package/dist/ghost-core/check/lint.d.ts.map +1 -0
  89. package/dist/ghost-core/check/lint.js +119 -0
  90. package/dist/ghost-core/check/lint.js.map +1 -0
  91. package/dist/ghost-core/check/load.d.ts +7 -0
  92. package/dist/ghost-core/check/load.d.ts.map +1 -0
  93. package/dist/ghost-core/check/load.js +44 -0
  94. package/dist/ghost-core/check/load.js.map +1 -0
  95. package/dist/ghost-core/check/parse.d.ts +12 -0
  96. package/dist/ghost-core/check/parse.d.ts.map +1 -0
  97. package/dist/ghost-core/check/parse.js +13 -0
  98. package/dist/ghost-core/check/parse.js.map +1 -0
  99. package/dist/ghost-core/check/source-ref.d.ts +27 -0
  100. package/dist/ghost-core/check/source-ref.d.ts.map +1 -0
  101. package/dist/ghost-core/check/source-ref.js +58 -0
  102. package/dist/ghost-core/check/source-ref.js.map +1 -0
  103. package/dist/ghost-core/check/types.d.ts +48 -0
  104. package/dist/ghost-core/check/types.d.ts.map +1 -0
  105. package/dist/ghost-core/check/types.js +4 -0
  106. package/dist/ghost-core/check/types.js.map +1 -0
  107. package/dist/ghost-core/errors.d.ts +30 -0
  108. package/dist/ghost-core/errors.d.ts.map +1 -0
  109. package/dist/ghost-core/errors.js +33 -0
  110. package/dist/ghost-core/errors.js.map +1 -0
  111. package/dist/ghost-core/glob.d.ts +5 -0
  112. package/dist/ghost-core/glob.d.ts.map +1 -0
  113. package/dist/ghost-core/glob.js +68 -0
  114. package/dist/ghost-core/glob.js.map +1 -0
  115. package/dist/ghost-core/glossary.d.ts +38 -0
  116. package/dist/ghost-core/glossary.d.ts.map +1 -0
  117. package/dist/ghost-core/glossary.js +76 -0
  118. package/dist/ghost-core/glossary.js.map +1 -0
  119. package/dist/ghost-core/index.d.ts +13 -0
  120. package/dist/ghost-core/index.d.ts.map +1 -0
  121. package/dist/ghost-core/index.js +19 -0
  122. package/dist/ghost-core/index.js.map +1 -0
  123. package/dist/ghost-core/markdown.d.ts +15 -0
  124. package/dist/ghost-core/markdown.d.ts.map +1 -0
  125. package/dist/ghost-core/markdown.js +30 -0
  126. package/dist/ghost-core/markdown.js.map +1 -0
  127. package/dist/ghost-core/material-transport.d.ts +43 -0
  128. package/dist/ghost-core/material-transport.d.ts.map +1 -0
  129. package/dist/ghost-core/material-transport.js +231 -0
  130. package/dist/ghost-core/material-transport.js.map +1 -0
  131. package/dist/ghost-core/materials.d.ts +14 -0
  132. package/dist/ghost-core/materials.d.ts.map +1 -0
  133. package/dist/ghost-core/materials.js +52 -0
  134. package/dist/ghost-core/materials.js.map +1 -0
  135. package/dist/ghost-core/node/index.d.ts +11 -0
  136. package/dist/ghost-core/node/index.d.ts.map +1 -0
  137. package/dist/ghost-core/node/index.js +11 -0
  138. package/dist/ghost-core/node/index.js.map +1 -0
  139. package/dist/ghost-core/node/parse.d.ts +16 -0
  140. package/dist/ghost-core/node/parse.d.ts.map +1 -0
  141. package/dist/ghost-core/node/parse.js +55 -0
  142. package/dist/ghost-core/node/parse.js.map +1 -0
  143. package/dist/ghost-core/node/schema.d.ts +17 -0
  144. package/dist/ghost-core/node/schema.d.ts.map +1 -0
  145. package/dist/ghost-core/node/schema.js +49 -0
  146. package/dist/ghost-core/node/schema.js.map +1 -0
  147. package/dist/ghost-core/node/serialize.d.ts +11 -0
  148. package/dist/ghost-core/node/serialize.d.ts.map +1 -0
  149. package/dist/ghost-core/node/serialize.js +21 -0
  150. package/dist/ghost-core/node/serialize.js.map +1 -0
  151. package/dist/ghost-core/node/steering.d.ts +18 -0
  152. package/dist/ghost-core/node/steering.d.ts.map +1 -0
  153. package/dist/ghost-core/node/steering.js +65 -0
  154. package/dist/ghost-core/node/steering.js.map +1 -0
  155. package/dist/ghost-core/node/types.d.ts +42 -0
  156. package/dist/ghost-core/node/types.d.ts.map +1 -0
  157. package/dist/ghost-core/node/types.js +2 -0
  158. package/dist/ghost-core/node/types.js.map +1 -0
  159. package/dist/ghost-core/package-manifest.d.ts +12 -0
  160. package/dist/ghost-core/package-manifest.d.ts.map +1 -0
  161. package/dist/ghost-core/package-manifest.js +14 -0
  162. package/dist/ghost-core/package-manifest.js.map +1 -0
  163. package/dist/ghost-core/skill-bundle-loader.d.ts +28 -0
  164. package/dist/ghost-core/skill-bundle-loader.d.ts.map +1 -0
  165. package/dist/ghost-core/skill-bundle-loader.js +51 -0
  166. package/dist/ghost-core/skill-bundle-loader.js.map +1 -0
  167. package/dist/index.d.ts +5 -0
  168. package/dist/index.d.ts.map +1 -0
  169. package/dist/index.js +5 -0
  170. package/dist/index.js.map +1 -0
  171. package/dist/internal/fs.d.ts +4 -0
  172. package/dist/internal/fs.d.ts.map +1 -0
  173. package/dist/internal/fs.js +24 -0
  174. package/dist/internal/fs.js.map +1 -0
  175. package/dist/observability-events.d.ts +27 -0
  176. package/dist/observability-events.d.ts.map +1 -0
  177. package/dist/observability-events.js +56 -0
  178. package/dist/observability-events.js.map +1 -0
  179. package/dist/package-version.d.ts +3 -0
  180. package/dist/package-version.d.ts.map +1 -0
  181. package/dist/package-version.js +10 -0
  182. package/dist/package-version.js.map +1 -0
  183. package/dist/review/baseline.d.ts +11 -0
  184. package/dist/review/baseline.d.ts.map +1 -0
  185. package/dist/review/baseline.js +35 -0
  186. package/dist/review/baseline.js.map +1 -0
  187. package/dist/review/diff.d.ts +7 -0
  188. package/dist/review/diff.d.ts.map +1 -0
  189. package/dist/review/diff.js +41 -0
  190. package/dist/review/diff.js.map +1 -0
  191. package/dist/review/glob.d.ts +2 -0
  192. package/dist/review/glob.d.ts.map +1 -0
  193. package/dist/review/glob.js +2 -0
  194. package/dist/review/glob.js.map +1 -0
  195. package/dist/review/probes.d.ts +13 -0
  196. package/dist/review/probes.d.ts.map +1 -0
  197. package/dist/review/probes.js +45 -0
  198. package/dist/review/probes.js.map +1 -0
  199. package/dist/review/resolve.d.ts +29 -0
  200. package/dist/review/resolve.d.ts.map +1 -0
  201. package/dist/review/resolve.js +87 -0
  202. package/dist/review/resolve.js.map +1 -0
  203. package/dist/review/review-packet.d.ts +40 -0
  204. package/dist/review/review-packet.d.ts.map +1 -0
  205. package/dist/review/review-packet.js +139 -0
  206. package/dist/review/review-packet.js.map +1 -0
  207. package/dist/scan/check-files.d.ts +23 -0
  208. package/dist/scan/check-files.d.ts.map +1 -0
  209. package/dist/scan/check-files.js +90 -0
  210. package/dist/scan/check-files.js.map +1 -0
  211. package/dist/scan/check-scaffold.d.ts +7 -0
  212. package/dist/scan/check-scaffold.d.ts.map +1 -0
  213. package/dist/scan/check-scaffold.js +37 -0
  214. package/dist/scan/check-scaffold.js.map +1 -0
  215. package/dist/scan/constants.d.ts +21 -0
  216. package/dist/scan/constants.d.ts.map +1 -0
  217. package/dist/scan/constants.js +21 -0
  218. package/dist/scan/constants.js.map +1 -0
  219. package/dist/scan/file-kind.d.ts +12 -0
  220. package/dist/scan/file-kind.d.ts.map +1 -0
  221. package/dist/scan/file-kind.js +114 -0
  222. package/dist/scan/file-kind.js.map +1 -0
  223. package/dist/scan/fingerprint-package-loader.d.ts +5 -0
  224. package/dist/scan/fingerprint-package-loader.d.ts.map +1 -0
  225. package/dist/scan/fingerprint-package-loader.js +105 -0
  226. package/dist/scan/fingerprint-package-loader.js.map +1 -0
  227. package/dist/scan/fingerprint-package.d.ts +58 -0
  228. package/dist/scan/fingerprint-package.d.ts.map +1 -0
  229. package/dist/scan/fingerprint-package.js +301 -0
  230. package/dist/scan/fingerprint-package.js.map +1 -0
  231. package/dist/scan/index.d.ts +3 -0
  232. package/dist/scan/index.d.ts.map +1 -0
  233. package/dist/scan/index.js +3 -0
  234. package/dist/scan/index.js.map +1 -0
  235. package/dist/scan/lint.d.ts +15 -0
  236. package/dist/scan/lint.d.ts.map +1 -0
  237. package/dist/scan/lint.js +2 -0
  238. package/dist/scan/lint.js.map +1 -0
  239. package/dist/scan/node-files.d.ts +25 -0
  240. package/dist/scan/node-files.d.ts.map +1 -0
  241. package/dist/scan/node-files.js +114 -0
  242. package/dist/scan/node-files.js.map +1 -0
  243. package/dist/scan/package-paths.d.ts +10 -0
  244. package/dist/scan/package-paths.d.ts.map +1 -0
  245. package/dist/scan/package-paths.js +49 -0
  246. package/dist/scan/package-paths.js.map +1 -0
  247. package/dist/scan/steering-template.d.ts +8 -0
  248. package/dist/scan/steering-template.d.ts.map +1 -0
  249. package/dist/scan/steering-template.js +266 -0
  250. package/dist/scan/steering-template.js.map +1 -0
  251. package/dist/scan/tarball.d.ts +23 -0
  252. package/dist/scan/tarball.d.ts.map +1 -0
  253. package/dist/scan/tarball.js +145 -0
  254. package/dist/scan/tarball.js.map +1 -0
  255. package/dist/scan/templates.d.ts +24 -0
  256. package/dist/scan/templates.d.ts.map +1 -0
  257. package/dist/scan/templates.js +295 -0
  258. package/dist/scan/templates.js.map +1 -0
  259. package/dist/skill-bundle/SKILL.md +140 -0
  260. package/dist/skill-bundle/references/authoring-scenarios.md +147 -0
  261. package/dist/skill-bundle/references/blocks.md +180 -0
  262. package/dist/skill-bundle/references/brief.md +49 -0
  263. package/dist/skill-bundle/references/capture.md +377 -0
  264. package/dist/skill-bundle/references/recall.md +38 -0
  265. package/dist/skill-bundle/references/schema.md +119 -0
  266. package/dist/skill-bundle/references/self-check.md +65 -0
  267. package/dist/skill-bundle/references/steering-audit.md +61 -0
  268. package/dist/skill-bundle/references/wild.md +30 -0
  269. package/package.json +79 -0
@@ -0,0 +1,377 @@
1
+ ---
2
+ name: capture
3
+ description: Author repo-local Ghost brand fingerprints as a flat set of prose nodes.
4
+ handoffs:
5
+ - label: Inspect the package
6
+ command: ghost validate
7
+ prompt: Does this fingerprint package validate, and what is absent?
8
+ ---
9
+
10
+ # Recipe: Author Ghost Fingerprint
11
+
12
+ **Goal:** record durable brand truths in `.ghost/` as a flat set of prose
13
+ **nodes**. If a change is uncommitted, it is draft work. If it is checked in,
14
+ Ghost treats the fingerprint package as canonical.
15
+
16
+ ```text
17
+ .ghost/
18
+ manifest.yml # schema + id
19
+ glossary.md # the kind vocabulary + what each kind means
20
+ principle.trust.md # a brand truth of kind `principle`
21
+ pattern.invoice.md # a pattern with an optional ## Skeleton
22
+ anti-goal.generic.md # a guard when its kind declares posture: guard
23
+ voice.md # a brand truth without a kind
24
+ ```
25
+
26
+ A **node** is a markdown file: a `description`, optional `materials`, and a
27
+ prose body. The package is **flat** — no hierarchy, no inheritance, no edges. A
28
+ node's kind comes from its filename prefix; the glossary declares the kinds and
29
+ may declare consumption posture such as `posture: guard`.
30
+
31
+ ## Lead with an annotated exemplar over a complete artifact
32
+
33
+ The strongest steering artifact is not a summary; it is a complete on-brand
34
+ artifact with annotation. Capture the whole thing, then name what the agent
35
+ should preserve and what is incidental.
36
+
37
+ `exemplar.status-card.md`:
38
+
39
+ ````markdown
40
+ ---
41
+ description: Complete status card exemplar — normative for density, evidence placement, and action language.
42
+ materials:
43
+ - src/components/status-card.tsx
44
+ ---
45
+
46
+ Normative for the opening fact, square edge, evidence placement, and accountable
47
+ action. The exact invoice count and dates are incidental.
48
+
49
+ ```tsx
50
+ <section className="border-l border-[#D8DED8] bg-[#F7F5EF] p-6 text-[#17201B]">
51
+ <p className="text-xs uppercase tracking-[0.14em] text-[#2F6F4F]">Bank sync</p>
52
+ <h1 className="mt-3 text-2xl font-semibold">3 deposits need matching</h1>
53
+ <p className="mt-2 max-w-prose text-sm">
54
+ They total $8,410 and arrived between Jul 12 and Jul 15.
55
+ </p>
56
+ <button className="mt-6 border border-[#17201B] px-4 py-2 text-sm">
57
+ Match deposits — about 4 minutes
58
+ </button>
59
+ </section>
60
+ ```
61
+
62
+ What makes it ours: the surface opens with an accountable fact, keeps evidence
63
+ next to the claim, uses square structure instead of floating cards, and prices
64
+ the user's next action in time. Do not copy the exact amounts, dates, or class
65
+ names unless the implementation path confirms them.
66
+ ````
67
+
68
+ The annotation is load-bearing. A bare sample teaches form; the annotation
69
+ teaches which features of the form are intentional, which stops an agent from
70
+ copying incidental details.
71
+
72
+ Protect exact voice artifacts the same way. A real on-brand error message
73
+ out-steers a paragraph about error-message voice:
74
+
75
+ `exemplar.error-voice.md`:
76
+
77
+ ```markdown
78
+ ---
79
+ description: A verbatim on-brand error message — the voice at failure moments.
80
+ ---
81
+
82
+ Normative for rhythm and stance at failure moments; match its form, not its words.
83
+
84
+ > We couldn't save your changes. Your work is still here — try again, and if it
85
+ > keeps failing, we'll hold onto everything while you sort it out.
86
+
87
+ What makes it ours: leads with what happened, not with apology. States what is
88
+ safe before what to do. One calm next step. No "Oops," no exclamation points,
89
+ no blame on the user or the network.
90
+ ```
91
+
92
+ ## Add Skeletons when the opening structure matters
93
+
94
+ A `## Skeleton` section contains the literal opening structure the agent should
95
+ start from. Use it on a pattern node when the first tokens determine whether the
96
+ surface lands in the right shape.
97
+
98
+ Rules:
99
+
100
+ - Put exactly one fenced block in each `## Skeleton` section. `ghost validate`
101
+ warns when there are zero or multiple fences.
102
+ - Make the block complete enough to begin from, but not so complete that it
103
+ invents task-specific facts.
104
+ - Keep explanation above the `## Skeleton`; `ghost pull` extracts skeleton
105
+ fences and emits them dead last under the banner to begin from this structure.
106
+ - If a pulled skeleton matches the requested surface, write it first verbatim,
107
+ then fill it with the task's facts and materials.
108
+
109
+ ## Write rules only after concrete artifacts
110
+
111
+ Rules are useful when they name the decision that survives across examples.
112
+ Keep them short, specific, and attached to concrete objects whenever possible:
113
+
114
+ - exact values when the agent keeps inventing values;
115
+ - never/always invariants when a hard line is crossed;
116
+ - conditions in prose when guidance applies only in a situation;
117
+ - decision traces when two plausible choices keep competing.
118
+
119
+ Do not turn every observation into a rule. Stale or generic rules average
120
+ against the exemplars and pull the packet back toward the median.
121
+
122
+ ## Write guards as replacement, not as blacklist
123
+
124
+ A guard is ordinary node prose whose kind declares `posture: guard` in
125
+ `glossary.md`:
126
+
127
+ ```yaml
128
+ kinds:
129
+ - name: anti-goal
130
+ posture: guard
131
+ ```
132
+
133
+ A good guard states **not X; instead Y; recognize the switch by Z**. The
134
+ replacement matters because negation alone raises the salience of the rejected
135
+ thing.
136
+
137
+ `anti-goal.generic-ui.md`:
138
+
139
+ ```markdown
140
+ ---
141
+ description: Review-critical replacement for the generic AI dashboard default.
142
+ ---
143
+
144
+ Not: rounded-xl cards on gray-50, indigo primary buttons, gradient hero text,
145
+ emoji headings, and "You're crushing it" optimism.
146
+
147
+ Instead: flat paper surfaces, one restrained accent, square alignment, and a
148
+ next action backed by the number or source that justifies it.
149
+
150
+ Recognize the switch: if removing the logo would make the surface look like any
151
+ SaaS template, the guard failed even when every token is technically valid.
152
+ ```
153
+
154
+ The strongest anti-goal is silent: purged from exemplars, absent from starter
155
+ structures, and enforced by a probe-backed check in review. Use guard prose to
156
+ name the replacement; use checks and `probe:` commands to catch regressions.
157
+
158
+ ## The node shape
159
+
160
+ A node at `principle.trust.md` (id `principle.trust`, kind `principle`):
161
+
162
+ ```markdown
163
+ ---
164
+ description: Trust at the payment moment. # the retrieval payload
165
+ # optional: materials, audience, stage, or other free-form keys
166
+ ---
167
+
168
+ Near the moment of payment, reduce felt risk. Proximity of reassurance to the
169
+ action beats completeness...
170
+ ```
171
+
172
+ - **`description`** is how an agent finds the node: a one-line "what this is and
173
+ when to gather it." `ghost gather` emits the menu of id, kind, description,
174
+ concrete coverage, and material count; the agent matches the ask against it.
175
+ - **Kind is the filename prefix** and must be a kind the glossary declares. A
176
+ bare name (`voice.md`) has no kind.
177
+ - **Altitude lives in the prose.** State a universal truth plainly; give a
178
+ narrower truth its **condition** — the situation it applies in — in the prose.
179
+ Never file a truth by destination (`for-emails.md`).
180
+ - **Concreteness is derived.** A node carries concrete material when it has
181
+ `materials`, a substantial fenced example, or a `## Skeleton`. You do not
182
+ declare a separate type.
183
+
184
+ ## What a body answers
185
+
186
+ While drafting, ask three questions of every truth — *why* (the stance), *with
187
+ what* (the materials), and *how it is assembled* (the patterns). These are
188
+ drafting prompts, never frontmatter keys, node types, or required sections, and
189
+ a node may answer only one. Each answer lands as a steering dimension the
190
+ machinery already scores:
191
+
192
+ - **why** lands as stance prose — read first in `ghost pull`, weakest at
193
+ moving output form on its own; it is the yardstick every later selection is
194
+ measured against.
195
+ - **with what** lands as `materials` and concreteness — drives pull ordering
196
+ and `ghost review` matching. See [blocks.md](blocks.md) for authoring
197
+ material-backed nodes.
198
+ - **how it is assembled** lands as patterns and `## Skeleton` sections — the
199
+ strongest steering; Skeleton fences are extracted and emitted dead last so
200
+ generation starts from them.
201
+
202
+ Keep a node **purpose-coherent**: one truth, any length. Split only when it is
203
+ genuinely a different truth.
204
+
205
+ ## Node prose stances
206
+
207
+ Node prose is steering payload. A generic sentence in a body averages every
208
+ future generation toward the median, so hold drafts to these stances before the
209
+ human sees them.
210
+
211
+ Two carve-outs come first, because they invert ordinary prose advice:
212
+
213
+ - **Guards keep their negation.** "Not X; instead Y; recognize the switch by Z"
214
+ is the required guard form. Naming the rejected thing is the guard's job;
215
+ never "improve" a guard by stating only the replacement.
216
+ - **Invariants keep their absolutes.** "Never" and "always" are correct in an
217
+ invariant when the hard line is real and human-ratified. Absolutes are lazy
218
+ only when they stand in for an uncurated stance.
219
+
220
+ Everywhere else:
221
+
222
+ - **No aspirational abstractions.** "We value clarity and trust" steers
223
+ nothing. Name the decision the truth forces: what gets picked when two goods
224
+ compete, and what gets given up.
225
+ - **Descriptions must discriminate.** Read the description alone. If it also
226
+ fits a competitor's brand, it is retrieval-dead; rewrite it until it could
227
+ belong to no one else.
228
+ - **Cut unratified hedges.** "Generally," "where possible," and "consider" in a
229
+ body mean the human never picked a side. Get the ratification or cut the
230
+ sentence.
231
+ - **Ban brand-deck filler.** "Elevate," "delight," "seamless," "best-in-class,"
232
+ "empower." When a brand doc supplies these words, they are testimony to
233
+ distill, never prose to keep.
234
+ - **Settle the altitude on purpose.** Every truth is either claimed universal
235
+ or given its condition in the prose. A body that does neither was never
236
+ curated for altitude; ask the human which it is.
237
+
238
+ ## Score drafts before curation
239
+
240
+ Before handing drafts to the human (step 5), rate each node 1 to 5 per
241
+ dimension:
242
+
243
+ | Dimension | Question |
244
+ | --- | --- |
245
+ | Testimony | Can you quote the human words or artifact this node came from? |
246
+ | Discrimination | Does the description fit only this brand? |
247
+ | Force | Does the body decide something, or merely describe something? |
248
+ | Altitude | Is it universal on purpose, or given its condition? |
249
+ | Residue | Is it free of starter-demo prose and brand-deck filler? |
250
+
251
+ Below 20 of 25, the node goes back to the interview, not into the package. The
252
+ score is a drafting gate for the agent; the human's keep/soften/reject verdict
253
+ in curation still decides what becomes canonical.
254
+
255
+ ## Author through steering jobs
256
+
257
+ The steering jobs are questions, not mandatory fields. Encode the truth in the
258
+ strongest form that fixes the observed failure.
259
+
260
+ | If the agent keeps... | Author... |
261
+ | --- | --- |
262
+ | missing the truth | sharper `description` / `index` mention |
263
+ | inventing values | `asset.*` node with materials and exact names |
264
+ | producing generic output | `anti-goal.*` guard plus annotated `exemplar.*` |
265
+ | choosing the wrong structure | `pattern.*` with bound/open and a `## Skeleton` |
266
+ | crossing hard lines | invariant prose plus a check, optionally with `probe:` |
267
+ | applying guidance too broadly | condition in prose |
268
+ | making bad tradeoffs | `decision.*` trace |
269
+ | producing correct but forgettable work | scoped `concept.*` |
270
+
271
+ Ask while authoring:
272
+
273
+ - What complete artifact shows the brand at its best?
274
+ - What should be copied from this exemplar, and what is incidental?
275
+ - What generic output would an agent probably produce?
276
+ - What does this brand refuse, and what replaces it?
277
+ - What real material should the agent inspect?
278
+ - What opening structure should be preserved?
279
+ - What hard line would you block in review?
280
+ - When would this guidance reverse?
281
+
282
+ ## Steps
283
+
284
+ ### 1. Classify the authoring scenario
285
+
286
+ Decide which posture fits before scaffolding. Follow
287
+ [authoring-scenarios.md](authoring-scenarios.md) when setting up or substantially
288
+ revising a fingerprint. Human intent anchors the truths; what the human says and
289
+ shows — words, images, links, exemplars — is the evidence; agent synthesis is
290
+ draft work until a human curates it and Git review accepts it.
291
+
292
+ Monorepos and product suites run **one contract per package**.
293
+
294
+ ### 2. Initialize
295
+
296
+ ```bash
297
+ ghost init # scaffolds the steering starter
298
+ ghost validate
299
+ ```
300
+
301
+ `ghost init` seeds the steering starter: the manifest, a starter `glossary.md`
302
+ (with suggested kinds you keep, rename, or replace), the package-root
303
+ `index.md`, and worked demo nodes for stance, composition, anti-goals, patterns,
304
+ exemplars, materials, and decisions. Replace demo claims, paths, examples, and
305
+ decisions with real product truth before using it to steer generation. Use
306
+ `ghost init --template minimal` when you only want the small
307
+ manifest/glossary/index starter.
308
+
309
+ Write `index.md` as the human-curated front door: non-negotiables that apply to
310
+ every task, what this fingerprint covers, how its kinds organize the corpus, and
311
+ any stricter silence posture. It is an ordinary node mechanically, but by
312
+ convention agents pull it first — anything that must never be missed belongs
313
+ here.
314
+
315
+ Nodes may carry a `materials` list in frontmatter: repo-relative paths/globs or
316
+ HTTPS URLs for the concrete materials the prose governs. Put brand-owned
317
+ materials that should survive export or refactors under `materials/`; point at
318
+ living app code where the implementation itself should stay in place. Optional
319
+ review checks live under `.ghost/checks/` (`ghost checks init`) and are
320
+ feed-back only; they are never gathered.
321
+
322
+ ### 3. Shape the glossary
323
+
324
+ Declare the kinds you will use in `glossary.md` — the frontmatter `kinds` list
325
+ plus a `#` section per kind explaining its meaning and normative weight. Kinds
326
+ are your choice; Ghost ships no fixed vocabulary. A node's filename prefix must
327
+ match a declared kind (or the node has no kind). Use `posture: guard` for kinds
328
+ whose nodes are review-critical replacements; use `posture: wild` only for
329
+ truths that should stay opt-in.
330
+
331
+ The glossary is a dictionary of every term with defined meaning in the corpus.
332
+ A root `voice.md` with a `voice` glossary entry declares the scope for future
333
+ `voice.<slug>.md` nodes; declaring a kind with zero or one users is good
334
+ hygiene, not over-structure.
335
+
336
+ ### 4. Orient
337
+
338
+ Elicit the brand from the human, not from a codebase. Interview for stance,
339
+ audience, anti-goals, and exemplars; ask for the material they can show —
340
+ screenshots, links, exemplar products, brand docs, copy they love or hate. Treat
341
+ every artifact as testimony to curate, never truth to copy verbatim. Repo-bound
342
+ reality can be recorded as `materials` on the node whose prose explains its
343
+ purpose.
344
+
345
+ ### 5. Write sparse nodes
346
+
347
+ Add the smallest useful set of nodes, each a purpose-coherent prose truth
348
+ answering why, with what, or how it is assembled, named `<kind>.<slug>.md` or a
349
+ bare slug. Draft only what the
350
+ human said or showed. State conditions as situations in the prose. Prefer a few
351
+ high-confidence truths over a noisy catalog. Hold each draft to the node prose
352
+ stances and score it before curation; a node below the gate returns to the
353
+ interview. Ask the human to keep, soften,
354
+ reject, or re-title important claims before treating draft nodes as durable.
355
+
356
+ ### 6. Validate
357
+
358
+ ```bash
359
+ ghost validate .ghost
360
+ ```
361
+
362
+ `validate` checks artifact shape, per-node validity, glossary kind prefixes,
363
+ material locators, check references, and Skeleton fence counts.
364
+ Undeclared kind prefixes and malformed Skeleton sections are warnings.
365
+
366
+ ## Never
367
+
368
+ - Never describe any file outside `.ghost/` as canonical package input.
369
+ - Never derive a brand truth from repo code alone; what a codebase repeats may
370
+ be legacy, not stance. Use repo paths as `materials` only when the prose truth
371
+ has been curated.
372
+ - Never draft a node the human neither said nor showed.
373
+ - Never invent a hierarchy, inheritance, or cross-node edges — the package is
374
+ flat.
375
+ - Never file a truth by destination; state its condition in the prose.
376
+ - Never ship a blacklist-only anti-goal; state the replacement and enforce the
377
+ hard line in review.
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: recall
3
+ description: Gather and pull the applicable Ghost brand truths for a task.
4
+ ---
5
+
6
+ # Recipe: Recall Ghost Fingerprint
7
+
8
+ Wild posture is opt-in. Default `ghost gather` excludes kinds whose glossary
9
+ entry declares `posture: wild`; use `--wild` only when the brief names explicit
10
+ open territory where conformance is suspended. Guard posture stays visible by
11
+ default because guards are brand-defining.
12
+
13
+ 1. Run `ghost gather <ask>` for the actual task. Read the coverage line: all
14
+ prose-only fingerprints are weak steering, and guard count tells you whether
15
+ review-critical negative space exists.
16
+ 2. Select against `description`; Ghost never selects for you.
17
+ 3. Run `ghost pull <id> [<id>…]`. Prefer `pull` over reading files directly: it
18
+ orders the packet for steering, inlines small local materials, emits
19
+ inspect-pointers for binary materials, extracts Skeletons last, and logs the
20
+ pull to `.ghost/.events`.
21
+
22
+ ## Read order = pull emission order
23
+
24
+ `ghost pull` emits selected nodes in steering order:
25
+
26
+ 1. `index` / stance first: non-negotiables and silence posture.
27
+ 2. Concrete-material nodes: `materials`, substantial fenced examples, or
28
+ `## Skeleton` sections, with materials inlined or pointed to inspect.
29
+ 3. Prose-only rules: principles, conditions, decisions, and other rules without
30
+ concrete payload.
31
+ 4. Guard nodes: `posture: guard`, flagged review-critical; read the replacement
32
+ carefully.
33
+ 5. Skeleton fences dead last: if one matches the surface, start from that
34
+ structure verbatim.
35
+
36
+ Return the selected truths with node ids, how each applies, and where the
37
+ fingerprint is silent. If silence is safe, proceed provisionally and label it;
38
+ if it is brand-defining or high-risk, ask or author a node first.
@@ -0,0 +1,119 @@
1
+ ---
2
+ name: schema
3
+ description: The Ghost fingerprint package shape: flat nodes, derived concreteness, Skeletons, guards, probes, and checks.
4
+ ---
5
+
6
+ # Ghost Fingerprint Package Reference
7
+
8
+ Canonical package:
9
+
10
+ ```text
11
+ .ghost/
12
+ manifest.yml ghost.fingerprint-package/v1: schema + id
13
+ glossary.md kind vocabulary + meanings + optional posture
14
+ materials/ bundled materials; never a node source
15
+ <kind>.<slug>.md a brand truth of a declared kind
16
+ <slug>.md a brand truth without a kind
17
+ checks/ optional review assertions; never a node source
18
+ ```
19
+
20
+ Reserved at the root: `manifest.yml`, `glossary.md`, `materials/`, and
21
+ `checks/`. Every other `*.md` is a node.
22
+
23
+ ## Glossary posture
24
+
25
+ A kind may declare posture. Omitted posture defaults to `steady`.
26
+
27
+ ```yaml
28
+ kinds:
29
+ - name: principle
30
+ - name: anti-goal
31
+ posture: guard
32
+ - name: provocation
33
+ posture: wild
34
+ ```
35
+
36
+ - `steady`: default, gathered normally.
37
+ - `guard`: review-critical negative space. Stays in default gather, appears at
38
+ the tail of `ghost pull`, and is auto-offered by `ghost review` when its
39
+ materials match touched files.
40
+ - `wild`: deliberate push beyond the fingerprint. Default gather excludes wild
41
+ kinds unless `--wild` is explicit.
42
+
43
+ ## Nodes
44
+
45
+ A node is markdown with frontmatter and a prose body:
46
+
47
+ ```markdown
48
+ ---
49
+ description: Logo lockups, clearspace, and when the glyph can stand alone.
50
+ materials:
51
+ - brand/logo*.svg
52
+ - https://figma.com/file/example?node-id=logo-lockups
53
+ ---
54
+
55
+ Use the full lockup when recognition matters.
56
+ ```
57
+
58
+ - Identity is the filename minus `.md`.
59
+ - Kind is the first dotted segment of the filename.
60
+ - `description` is the retrieval payload shown by `ghost gather`.
61
+ - `materials` accepts repo-relative paths/globs plus absolute HTTPS URLs. It is
62
+ a locator list, not guidance.
63
+
64
+ Ghost derives whether a node carries concrete material from structure: non-empty
65
+ `materials`, a fenced code block of at least 3 lines, or a `## Skeleton` section.
66
+ This is reported in gather/pulse and used for pull ordering.
67
+
68
+ ## Skeleton convention
69
+
70
+ A `## Skeleton` section contains the literal opening structure for a surface.
71
+ It should contain exactly one fenced block; `ghost validate` warns, never fails,
72
+ when a Skeleton section has zero or multiple fences.
73
+
74
+ ```markdown
75
+ ## Skeleton
76
+
77
+ ```tsx
78
+ <section>
79
+ <h1>{status}</h1>
80
+ <button>{nextStep}</button>
81
+ </section>
82
+ ```
83
+ ```
84
+
85
+ `ghost pull` extracts Skeleton fences and emits them dead last under a banner
86
+ instructing the agent to begin from that structure verbatim.
87
+
88
+ ## Checks
89
+
90
+ Checks live under `.ghost/checks/*.md` and are never gathered or pulled:
91
+
92
+ ```markdown
93
+ ---
94
+ name: logo-clearspace-holds
95
+ description: Logo usage preserves clearspace and lockup integrity.
96
+ severity: medium
97
+ references:
98
+ - asset.logo
99
+ probe: pnpm test:logo-clearspace
100
+ ---
101
+
102
+ Grade whether the change preserves the logo guidance in `asset.logo`.
103
+ ```
104
+
105
+ `references` are node ids with optional heading anchors. `probe` is optional: a
106
+ repo-root shell command that `ghost review` runs for offered checks by default
107
+ (timeout 30s; stdout/stderr truncated). Probe output is evidence only, never a
108
+ Ghost pass/fail verdict. Use `ghost review --no-probes` to skip. Trust model:
109
+ probes are the same class as npm scripts; Git review is the boundary.
110
+
111
+ ## Gather / Pull / Review
112
+
113
+ - `ghost gather` emits the node menu, including coverage counts. Checks are
114
+ invisible.
115
+ - `ghost pull` emits selected nodes in steering order and inlines small local
116
+ materials. Binary local materials become inspect-pointers.
117
+ - `ghost review` matches diff files to local node materials, offers relevant
118
+ checks and matched guard nodes, embeds probe evidence, and emits a packet for
119
+ the host agent to judge.
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: self-check
3
+ description: A pre-generation probe that reveals whether you have actually gathered and reasoned about the brand fingerprint, before you build.
4
+ ---
5
+
6
+ # Recipe: Self-Check Before Generating
7
+
8
+ Before writing UI, copy, email, or any output, check whether you are grounded in
9
+ the fingerprint or about to fall back on generic instincts. These questions test
10
+ your **grounding and provenance**, not the fingerprint's contents, so they hold
11
+ for any fingerprint, however sparse, whatever the medium, whoever authored it.
12
+
13
+ Ask yourself:
14
+
15
+ 1. **What did you gather?** Which Ghost nodes did you pull for this task (from
16
+ `ghost gather`), and can you cite them by id? If you have not gathered, you
17
+ are not grounded. Gather first.
18
+ 2. **What is Ghost-backed vs. provisional?** For each claim you are about to
19
+ encode, is it backed by a gathered node (cite the id), or is it your own
20
+ provisional local reasoning? You must be able to label every claim as one or
21
+ the other.
22
+ 3. **Do the conditions apply?** For each conditional truth you pulled, does its
23
+ stated situation actually hold for this task? For each kind with conditional
24
+ or scoped meaning **per the glossary**, apply it only when its stated
25
+ situation holds; do not apply it where it does not, and do not ignore it
26
+ where it does.
27
+ 4. **Where is the fingerprint silent?** What does the fingerprint not cover for
28
+ your task, and what will carry the reasoning in those gaps? Naming the silence
29
+ is part of being grounded; pretending coverage you do not have is not.
30
+
31
+ ## Steering readiness
32
+
33
+ Before generating, can you cite:
34
+
35
+ - the governing principle, stance, or tradeoff?
36
+ - the concrete materials, if exactness matters?
37
+ - the applicable pattern, if structure matters?
38
+ - the relevant exemplar and what it is normative for?
39
+ - the anti-goal that blocks the generic version?
40
+ - the hard invariants?
41
+ - the conditions that apply or do not apply?
42
+ - any decision trace for ambiguous tradeoffs?
43
+ - where the fingerprint is silent?
44
+
45
+ Classify readiness:
46
+
47
+ - **Green:** enough Ghost-backed guidance and concrete material for this surface
48
+ to generate.
49
+ - **Yellow:** generation is safe, but some reasoning must be labeled
50
+ provisional; if there is no concrete material for this surface, readiness is
51
+ at most Yellow.
52
+ - **Red:** missing brand-defining, high-risk, or irreversible guidance; ask a
53
+ human or author a node first.
54
+
55
+ When you cannot answer the grounding questions:
56
+
57
+ 1. Run `ghost gather <ask>` to emit the menu for the actual task, then match the
58
+ work to nodes by their descriptions.
59
+ 2. Read the selected nodes' bodies and re-ask the questions, citing node ids.
60
+
61
+ A genuinely silent fingerprint is an expected state, not a blocker. When it does
62
+ not cover the task, say so plainly and proceed with provisional local reasoning
63
+ when safe; label it non-Ghost-backed. If the fingerprint's `index` node declares
64
+ a stricter silence posture, honor it over this default. Ask a human before
65
+ high-risk or brand-defining choices.
@@ -0,0 +1,61 @@
1
+ ---
2
+ name: steering-audit
3
+ description: Audit a Ghost fingerprint for concrete steering coverage and guard routing.
4
+ ---
5
+
6
+ # Recipe: Audit Steering Coverage
7
+
8
+ A steering audit asks whether a fingerprint can move generation away from the
9
+ generic median. It is not a validation pass; `ghost validate` handles package
10
+ shape.
11
+
12
+ Start with:
13
+
14
+ ```bash
15
+ ghost validate
16
+ ghost gather --format json
17
+ ghost pulse --format json
18
+ ```
19
+
20
+ If checks are installed and a diff exists, run `ghost review` too.
21
+
22
+ ## Headline the audit with concreteness + guards
23
+
24
+ Report first:
25
+
26
+ - **Concreteness coverage:** total nodes, concrete-material nodes, prose-only
27
+ nodes. Concrete means non-empty `materials`, a fenced code block of at least 3
28
+ lines, or a `## Skeleton` section.
29
+ - **Guard routing:** how many guard nodes exist, whether they stay in default
30
+ gather, and whether `ghost review` can auto-offer matched guards via
31
+ materials.
32
+ - **Pulse by concreteness:** concrete exposure/pull rate vs prose-only
33
+ exposure/pull rate. This is the tuning instrument: if concrete nodes are not
34
+ pulled, descriptions or task selection are failing.
35
+
36
+ ## Corpus-level table
37
+
38
+ | Row | Status | Evidence | Next move |
39
+ | --- | --- | --- | --- |
40
+ | Retrieval | strong / weak | descriptions, ids, `index` | sharpen descriptions or mention cold nodes in `index` |
41
+ | Concreteness | strong / thin | materials, fenced examples, Skeletons | add concrete locators, exemplars, or opening structures |
42
+ | Guards | routed / missing / vague | `posture: guard`, review packet | write not-X-instead-Y guards and material locators |
43
+ | Consistency | clean / conflicting | concrete bodies vs rules/guards | update stale examples; examples average with rules |
44
+ | Stance | present / missing | `index`, `principle.*` | write forced-choice principles |
45
+ | Materials | present / missing | `materials`, inspect-pointers | point at real assets/components/tokens |
46
+ | Exemplars | annotated / unannotated / missing | fenced samples, screenshots | say what to copy and what is incidental |
47
+ | Patterns | bound-open / loose / missing | `pattern.*`, Skeletons | state applies / bound / open and add a Skeleton when opening structure matters |
48
+ | Checks | covered / partial / missing | checks/, probes, review packet | add checks/probes for high-risk invariants |
49
+ | Silence posture | defined / missing | `index` | say when to proceed provisionally or ask |
50
+
51
+ ## Task-level readiness
52
+
53
+ For a task, gather, pull, and report:
54
+
55
+ - **Green:** enough Ghost-backed concrete guidance to generate.
56
+ - **Yellow:** safe to generate, but some reasoning is provisional. If there is
57
+ no concrete material for this surface, readiness is at most Yellow.
58
+ - **Red:** missing brand-defining, high-risk, irreversible, legal, privacy, or
59
+ security guidance; ask or author first.
60
+
61
+ Never present steering coverage as deterministic pass/fail.