@design-intelligence/ghost 0.0.0-next-20260715121453

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 (327) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +89 -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 +52 -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 +69 -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 +214 -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 +89 -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 +230 -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 +248 -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 +78 -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 +26 -0
  64. package/dist/ghost-core/catalog/assemble.d.ts.map +1 -0
  65. package/dist/ghost-core/catalog/assemble.js +29 -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 +28 -0
  76. package/dist/ghost-core/catalog/menu.d.ts.map +1 -0
  77. package/dist/ghost-core/catalog/menu.js +23 -0
  78. package/dist/ghost-core/catalog/menu.js.map +1 -0
  79. package/dist/ghost-core/catalog/types.d.ts +33 -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 +25 -0
  116. package/dist/ghost-core/glossary.d.ts.map +1 -0
  117. package/dist/ghost-core/glossary.js +69 -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 +12 -0
  148. package/dist/ghost-core/node/serialize.d.ts.map +1 -0
  149. package/dist/ghost-core/node/serialize.js +39 -0
  150. package/dist/ghost-core/node/serialize.js.map +1 -0
  151. package/dist/ghost-core/node/steering.d.ts +19 -0
  152. package/dist/ghost-core/node/steering.d.ts.map +1 -0
  153. package/dist/ghost-core/node/steering.js +68 -0
  154. package/dist/ghost-core/node/steering.js.map +1 -0
  155. package/dist/ghost-core/node/types.d.ts +43 -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 +19 -0
  160. package/dist/ghost-core/package-manifest.d.ts.map +1 -0
  161. package/dist/ghost-core/package-manifest.js +24 -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/init-payloads/median/cliche.median.md +86 -0
  172. package/dist/init-payloads/median/median-tells.md +117 -0
  173. package/dist/init-payloads/skeleton/brand.md +23 -0
  174. package/dist/init-payloads/skeleton/context.conversation.md +24 -0
  175. package/dist/init-payloads/skeleton/foundation.color.md +39 -0
  176. package/dist/init-payloads/skeleton/foundation.composition.md +30 -0
  177. package/dist/init-payloads/skeleton/foundation.controls.md +29 -0
  178. package/dist/init-payloads/skeleton/foundation.layout.md +45 -0
  179. package/dist/init-payloads/skeleton/foundation.motion.md +34 -0
  180. package/dist/init-payloads/skeleton/foundation.type.md +44 -0
  181. package/dist/init-payloads/skeleton/foundation.voice.md +29 -0
  182. package/dist/init-payloads/skeleton/glossary.md +39 -0
  183. package/dist/init-payloads/vessel-light/anti-goal.median.md +86 -0
  184. package/dist/init-payloads/vessel-light/anti-goal.tells.md +38 -0
  185. package/dist/init-payloads/vessel-light/checks/conversation-grammar.md +20 -0
  186. package/dist/init-payloads/vessel-light/checks/median-tells.md +103 -0
  187. package/dist/init-payloads/vessel-light/checks/motion-restraint.md +20 -0
  188. package/dist/init-payloads/vessel-light/checks/relationships.md +33 -0
  189. package/dist/init-payloads/vessel-light/checks/shape-matches-job.md +43 -0
  190. package/dist/init-payloads/vessel-light/checks/values.md +51 -0
  191. package/dist/init-payloads/vessel-light/glossary.md +44 -0
  192. package/dist/init-payloads/vessel-light/grammar.color-roles.md +30 -0
  193. package/dist/init-payloads/vessel-light/grammar.conversation.md +30 -0
  194. package/dist/init-payloads/vessel-light/grammar.deletion.md +35 -0
  195. package/dist/init-payloads/vessel-light/grammar.hierarchy.md +58 -0
  196. package/dist/init-payloads/vessel-light/grammar.job.md +54 -0
  197. package/dist/init-payloads/vessel-light/grammar.motion.md +27 -0
  198. package/dist/init-payloads/vessel-light/grammar.rhythm.md +27 -0
  199. package/dist/init-payloads/vessel-light/grammar.surfaces.md +35 -0
  200. package/dist/init-payloads/vessel-light/index.md +33 -0
  201. package/dist/init-payloads/vessel-light/manifest.yml +3 -0
  202. package/dist/init-payloads/vessel-light/materials/fonts/HKGrotesk-Black.woff2 +0 -0
  203. package/dist/init-payloads/vessel-light/materials/fonts/HKGrotesk-Bold.woff2 +0 -0
  204. package/dist/init-payloads/vessel-light/materials/fonts/HKGrotesk-ExtraBold.woff2 +0 -0
  205. package/dist/init-payloads/vessel-light/materials/fonts/HKGrotesk-Light.woff2 +0 -0
  206. package/dist/init-payloads/vessel-light/materials/fonts/HKGrotesk-Medium.woff2 +0 -0
  207. package/dist/init-payloads/vessel-light/materials/fonts/HKGrotesk-Regular.woff2 +0 -0
  208. package/dist/init-payloads/vessel-light/materials/fonts/HKGrotesk-SemiBold.woff2 +0 -0
  209. package/dist/init-payloads/vessel-light/materials/primitives.css +351 -0
  210. package/dist/init-payloads/vessel-light/materials/ref/composition.conversation.html +63 -0
  211. package/dist/init-payloads/vessel-light/materials/ref/composition.editorial.html +74 -0
  212. package/dist/init-payloads/vessel-light/materials/ref/composition.form.html +89 -0
  213. package/dist/init-payloads/vessel-light/materials/ref/composition.overlay.html +66 -0
  214. package/dist/init-payloads/vessel-light/materials/ref/composition.table.html +104 -0
  215. package/dist/init-payloads/vessel-light/materials/ref/email.html +80 -0
  216. package/dist/init-payloads/vessel-light/materials/tokens.css +191 -0
  217. package/dist/init-payloads/vessel-light/register.data-density.md +39 -0
  218. package/dist/init-payloads/vessel-light/register.editorial.md +41 -0
  219. package/dist/init-payloads/vessel-light/register.email.md +43 -0
  220. package/dist/init-payloads/vessel-light/signature.palette.md +45 -0
  221. package/dist/init-payloads/vessel-light/signature.shape.md +27 -0
  222. package/dist/init-payloads/vessel-light/signature.temperature.md +44 -0
  223. package/dist/init-payloads/vessel-light/signature.type.md +37 -0
  224. package/dist/internal/fs.d.ts +4 -0
  225. package/dist/internal/fs.d.ts.map +1 -0
  226. package/dist/internal/fs.js +24 -0
  227. package/dist/internal/fs.js.map +1 -0
  228. package/dist/observability-events.d.ts +34 -0
  229. package/dist/observability-events.d.ts.map +1 -0
  230. package/dist/observability-events.js +68 -0
  231. package/dist/observability-events.js.map +1 -0
  232. package/dist/package-version.d.ts +3 -0
  233. package/dist/package-version.d.ts.map +1 -0
  234. package/dist/package-version.js +10 -0
  235. package/dist/package-version.js.map +1 -0
  236. package/dist/review/baseline.d.ts +11 -0
  237. package/dist/review/baseline.d.ts.map +1 -0
  238. package/dist/review/baseline.js +35 -0
  239. package/dist/review/baseline.js.map +1 -0
  240. package/dist/review/diff.d.ts +7 -0
  241. package/dist/review/diff.d.ts.map +1 -0
  242. package/dist/review/diff.js +41 -0
  243. package/dist/review/diff.js.map +1 -0
  244. package/dist/review/glob.d.ts +2 -0
  245. package/dist/review/glob.d.ts.map +1 -0
  246. package/dist/review/glob.js +2 -0
  247. package/dist/review/glob.js.map +1 -0
  248. package/dist/review/probes.d.ts +13 -0
  249. package/dist/review/probes.d.ts.map +1 -0
  250. package/dist/review/probes.js +45 -0
  251. package/dist/review/probes.js.map +1 -0
  252. package/dist/review/resolve.d.ts +28 -0
  253. package/dist/review/resolve.d.ts.map +1 -0
  254. package/dist/review/resolve.js +90 -0
  255. package/dist/review/resolve.js.map +1 -0
  256. package/dist/review/review-packet.d.ts +41 -0
  257. package/dist/review/review-packet.d.ts.map +1 -0
  258. package/dist/review/review-packet.js +128 -0
  259. package/dist/review/review-packet.js.map +1 -0
  260. package/dist/scan/check-files.d.ts +23 -0
  261. package/dist/scan/check-files.d.ts.map +1 -0
  262. package/dist/scan/check-files.js +75 -0
  263. package/dist/scan/check-files.js.map +1 -0
  264. package/dist/scan/check-scaffold.d.ts +8 -0
  265. package/dist/scan/check-scaffold.d.ts.map +1 -0
  266. package/dist/scan/check-scaffold.js +53 -0
  267. package/dist/scan/check-scaffold.js.map +1 -0
  268. package/dist/scan/constants.d.ts +21 -0
  269. package/dist/scan/constants.d.ts.map +1 -0
  270. package/dist/scan/constants.js +21 -0
  271. package/dist/scan/constants.js.map +1 -0
  272. package/dist/scan/file-kind.d.ts +12 -0
  273. package/dist/scan/file-kind.d.ts.map +1 -0
  274. package/dist/scan/file-kind.js +114 -0
  275. package/dist/scan/file-kind.js.map +1 -0
  276. package/dist/scan/fingerprint-package-lint.d.ts +8 -0
  277. package/dist/scan/fingerprint-package-lint.d.ts.map +1 -0
  278. package/dist/scan/fingerprint-package-lint.js +284 -0
  279. package/dist/scan/fingerprint-package-lint.js.map +1 -0
  280. package/dist/scan/fingerprint-package-loader.d.ts +5 -0
  281. package/dist/scan/fingerprint-package-loader.d.ts.map +1 -0
  282. package/dist/scan/fingerprint-package-loader.js +78 -0
  283. package/dist/scan/fingerprint-package-loader.js.map +1 -0
  284. package/dist/scan/fingerprint-package.d.ts +66 -0
  285. package/dist/scan/fingerprint-package.d.ts.map +1 -0
  286. package/dist/scan/fingerprint-package.js +101 -0
  287. package/dist/scan/fingerprint-package.js.map +1 -0
  288. package/dist/scan/index.d.ts +3 -0
  289. package/dist/scan/index.d.ts.map +1 -0
  290. package/dist/scan/index.js +3 -0
  291. package/dist/scan/index.js.map +1 -0
  292. package/dist/scan/lint.d.ts +15 -0
  293. package/dist/scan/lint.d.ts.map +1 -0
  294. package/dist/scan/lint.js +2 -0
  295. package/dist/scan/lint.js.map +1 -0
  296. package/dist/scan/node-files.d.ts +25 -0
  297. package/dist/scan/node-files.d.ts.map +1 -0
  298. package/dist/scan/node-files.js +112 -0
  299. package/dist/scan/node-files.js.map +1 -0
  300. package/dist/scan/package-paths.d.ts +10 -0
  301. package/dist/scan/package-paths.d.ts.map +1 -0
  302. package/dist/scan/package-paths.js +49 -0
  303. package/dist/scan/package-paths.js.map +1 -0
  304. package/dist/scan/packed-payloads.d.ts +4 -0
  305. package/dist/scan/packed-payloads.d.ts.map +1 -0
  306. package/dist/scan/packed-payloads.js +55 -0
  307. package/dist/scan/packed-payloads.js.map +1 -0
  308. package/dist/scan/tarball.d.ts +23 -0
  309. package/dist/scan/tarball.d.ts.map +1 -0
  310. package/dist/scan/tarball.js +145 -0
  311. package/dist/scan/tarball.js.map +1 -0
  312. package/dist/scan/templates.d.ts +42 -0
  313. package/dist/scan/templates.d.ts.map +1 -0
  314. package/dist/scan/templates.js +375 -0
  315. package/dist/scan/templates.js.map +1 -0
  316. package/dist/skill-bundle/SKILL.md +146 -0
  317. package/dist/skill-bundle/references/adapting-a-starter.md +104 -0
  318. package/dist/skill-bundle/references/authoring-scenarios.md +184 -0
  319. package/dist/skill-bundle/references/blocks.md +179 -0
  320. package/dist/skill-bundle/references/brief.md +50 -0
  321. package/dist/skill-bundle/references/capture.md +392 -0
  322. package/dist/skill-bundle/references/concrete-tiers.md +95 -0
  323. package/dist/skill-bundle/references/recall.md +36 -0
  324. package/dist/skill-bundle/references/schema.md +114 -0
  325. package/dist/skill-bundle/references/self-check.md +65 -0
  326. package/dist/skill-bundle/references/steering-audit.md +60 -0
  327. package/package.json +79 -0
@@ -0,0 +1,375 @@
1
+ import { GHOST_FINGERPRINT_PACKAGE_SCHEMA } from "#ghost-core";
2
+ import { GHOST_EVENTS_FILENAME, LEGACY_PULL_HISTORY_FILENAME, } from "./constants.js";
3
+ import { loadPackedPayload, loadPayloadFile } from "./packed-payloads.js";
4
+ function manifestFile(cover) {
5
+ return {
6
+ relativePath: "manifest.yml",
7
+ content: `schema: ${GHOST_FINGERPRINT_PACKAGE_SCHEMA}\nid: local\n${cover ? `cover: ${cover}\n` : ""}`,
8
+ };
9
+ }
10
+ /**
11
+ * Keep events tapes out of version control: they are disposable
12
+ * per-machine signals for authors iterating on the fingerprint, never canonical
13
+ * state.
14
+ */
15
+ function gitignoreFile() {
16
+ return {
17
+ relativePath: ".gitignore",
18
+ content: `${GHOST_EVENTS_FILENAME}\n${LEGACY_PULL_HISTORY_FILENAME}\n`,
19
+ };
20
+ }
21
+ /**
22
+ * The minimal starter: a manifest, a package-level glossary declaring the
23
+ * starter kind vocabulary, and a package-root `index.md` cover. Additional
24
+ * truths are plain markdown nodes; optional material locators live on the node
25
+ * that explains them. Checks are opt-in via `ghost checks init`.
26
+ */
27
+ const MINIMAL_TEMPLATE = {
28
+ name: "minimal",
29
+ description: "Minimal node package: manifest + glossary + a starter cover node.",
30
+ async files() {
31
+ const medianFile = await medianTemplateFile();
32
+ return [
33
+ manifestFile("index"),
34
+ gitignoreFile(),
35
+ {
36
+ relativePath: "glossary.md",
37
+ content: `---
38
+ kinds:
39
+ - name: principle
40
+ - name: condition
41
+ - name: exemplar
42
+ - name: anti-goal
43
+ - name: cliche
44
+ - name: asset
45
+ - name: pattern
46
+ ---
47
+
48
+ # principle
49
+
50
+ Durable stance: true across media unless a narrower condition explicitly limits it.
51
+
52
+ # condition
53
+
54
+ Situational truth: fires only when the stated situation holds.
55
+
56
+ # exemplar
57
+
58
+ Illustrative reference. Match its form and quality; treat its specifics as
59
+ evidence unless the node says the sample itself is normative.
60
+
61
+ # anti-goal
62
+
63
+ What this brand must never look, sound, or feel like — named generic patterns
64
+ and rejected neighbors. Always-on, like a principle, but stated as the thing
65
+ to steer away from.
66
+
67
+ # cliche
68
+
69
+ The defaults a generative model falls back on when no brand is steering it.
70
+ These are nobody's brand. Each entry pairs the tired move with the honest
71
+ replacement. Gather before styling anything greenfield; enforced by paired
72
+ checks at review.
73
+
74
+ # asset
75
+
76
+ Material truth about concrete brand assets such as logos, illustrations, motion, imagery, or files.
77
+
78
+ # pattern
79
+
80
+ Reusable composition or product pattern whose purpose is distinguishable from neighboring patterns.
81
+ `,
82
+ },
83
+ {
84
+ relativePath: "index.md",
85
+ content: `---
86
+ description: Always read first — the non-negotiables and how to read this fingerprint.
87
+ ---
88
+
89
+ Replace this placeholder prose with two things:
90
+
91
+ **The non-negotiables.** The handful of truths that apply to every task, every
92
+ medium, no matter what else is gathered — hard invariants, the anti-goals, the
93
+ one-sentence stance. Anything that must never be missed belongs here, stated
94
+ briefly; link out to the full node by id for depth.
95
+
96
+ **How to read the rest.** What this fingerprint covers, how its kinds organize
97
+ the corpus, and where the fingerprint deliberately stays silent — including, if
98
+ you want one, a stricter silence posture ("when this fingerprint is silent on X,
99
+ ask a human") that overrides the default proceed-provisionally behavior.
100
+
101
+ \`index\` is this package's manifest-declared cover: \`ghost gather\` inlines its
102
+ body before the menu and excludes it from selection. Its privilege comes from
103
+ \`cover: index\` in \`manifest.yml\`, not from the filename. You may rename it;
104
+ update the manifest's \`cover\` id at the same time.
105
+
106
+ The glossary declares the kind vocabulary. A node's kind comes from its
107
+ filename prefix: \`principle.density.md\` has kind \`principle\` and slug
108
+ \`density\`. A bare filename like \`voice.md\` has no kind, which is fine.
109
+ When a truth is narrower, state the condition in the prose — the situation where
110
+ it applies — never a filing destination.
111
+ `,
112
+ },
113
+ medianFile,
114
+ ];
115
+ },
116
+ };
117
+ /**
118
+ * The composition starter: everything in `minimal`, plus a worked composition
119
+ * ladder — an invariants floor (`principle.composition`), one bound/open
120
+ * pattern, and a cover that teaches the convention. For teams whose
121
+ * fingerprint must steer *what agents build*, not only what they say.
122
+ *
123
+ * The ladder is an authoring convention, not a schema: patterns state what is
124
+ * bound (do not redecide) and what is open (the generator's call), and every
125
+ * pattern names the principles it refines. Nothing here adds frontmatter,
126
+ * edges, or routing — the corpus stays flat.
127
+ */
128
+ const COMPOSITION_TEMPLATE = {
129
+ name: "composition",
130
+ description: "Composition starter: minimal files + an invariants floor and a worked bound/open pattern.",
131
+ async files() {
132
+ const medianFile = await medianTemplateFile();
133
+ return [
134
+ manifestFile("index"),
135
+ gitignoreFile(),
136
+ {
137
+ relativePath: "glossary.md",
138
+ content: `---
139
+ kinds:
140
+ - name: principle
141
+ - name: condition
142
+ - name: exemplar
143
+ - name: anti-goal
144
+ - name: cliche
145
+ - name: asset
146
+ - name: pattern
147
+ ---
148
+
149
+ # principle
150
+
151
+ Durable stance: true across media unless a narrower condition explicitly limits it.
152
+ Composition principles are the floor — when no pattern matches an ask, they are
153
+ what the agent composes against.
154
+
155
+ # condition
156
+
157
+ Situational truth: fires only when the stated situation holds.
158
+
159
+ # exemplar
160
+
161
+ Illustrative reference. Match its form and quality; treat its specifics as
162
+ evidence unless the node says the sample itself is normative. Pair an
163
+ exemplar with a screenshot or implementation path in \`materials\` so the blessed
164
+ render travels with the prose.
165
+
166
+ # anti-goal
167
+
168
+ What this brand must never look, sound, or feel like — named generic patterns
169
+ and rejected neighbors. Always-on, like a principle, but stated as the thing
170
+ to steer away from.
171
+
172
+ # cliche
173
+
174
+ The defaults a generative model falls back on when no brand is steering it.
175
+ These are nobody's brand. Each entry pairs the tired move with the honest
176
+ replacement. Gather before styling anything greenfield; enforced by paired
177
+ checks at review.
178
+
179
+ # asset
180
+
181
+ Material truth about concrete brand assets such as logos, illustrations, motion,
182
+ imagery, or files. For components, state the slot contract in prose: what the
183
+ asset admits, how many, and where.
184
+
185
+ # pattern
186
+
187
+ Reusable composition whose purpose is distinguishable from neighboring patterns.
188
+ A pattern states what is **bound** (decided — do not redecide) and what is
189
+ **open** (the generator's call, within named limits), and names the principles
190
+ it refines. A pattern may only narrow what its principles allow — never loosen
191
+ them.
192
+ `,
193
+ },
194
+ {
195
+ relativePath: "index.md",
196
+ content: `---
197
+ description: Start here — how this fingerprint steers composition, from patterns down to principles.
198
+ ---
199
+
200
+ This fingerprint steers what gets built, not only what gets said. It is
201
+ organized as a ladder of binding depth:
202
+
203
+ 1. **Patterns** (\`pattern.*\`) are mostly-decided compositions. When an ask
204
+ matches a pattern's stated purpose, use it: apply what it binds, decide only
205
+ what it leaves open.
206
+ 2. **Principles** (\`principle.*\`) are the floor. When no pattern matches, do
207
+ not fall back to your own taste — compose freely *inside* the invariants in
208
+ \`principle.composition\` and its siblings.
209
+ 3. **Exemplars and assets** carry the concrete vocabulary: blessed renders,
210
+ real components, real tokens, located via \`materials\`.
211
+
212
+ Two laws keep the ladder honest:
213
+
214
+ - **Narrowing only.** A pattern may bind or narrow what a principle leaves
215
+ open; it may never contradict one. If a pattern conflicts with a principle,
216
+ the principle wins and the pattern file is wrong.
217
+ - **Every "never" casts a shadow.** Each refusal-grade line in a principle
218
+ should be mirrored by a review check (\`ghost checks init\`) that
219
+ references the node it enforces, so the same opinion steers before building
220
+ and grades after.
221
+
222
+ Replace this prose with your own front door once the corpus has shape. The
223
+ starter nodes below are teaching placeholders — edit them into your real
224
+ opinions before trusting them.
225
+ `,
226
+ },
227
+ {
228
+ relativePath: "principle.composition.md",
229
+ content: `---
230
+ description: The composition floor — hard layout invariants that hold for every screen, whether or not a pattern matches the ask.
231
+ ---
232
+
233
+ These invariants apply to everything built against this fingerprint. Patterns
234
+ narrow them; nothing loosens them. Each is written as a refusal or a limit with
235
+ a number, because a stance an agent can check is a stance that steers.
236
+
237
+ **The starter opinions below are placeholders. Keep the voice — refusals and
238
+ numbers, not vibes — and replace the values with yours.**
239
+
240
+ - **One focal point.** Every screen has exactly one element at the largest
241
+ scale. If two elements compete for primacy, the second one is wrong — demote
242
+ or delete it. Never resolve the tie by making both big.
243
+ - **Hierarchy descends.** Type scale strictly decreases with nesting depth.
244
+ Never give a child element a larger scale than its parent context.
245
+ - **Density has a budget.** State the budget per surface (for example: at most
246
+ N data points per viewport on consumer surfaces; a higher N on operational
247
+ ones). When content exceeds the budget, cut or collapse — never shrink type
248
+ below the ramp to make room.
249
+ - **Actions land last.** Calls to action render at the end of reading order.
250
+ At most one primary action per screen; never two.
251
+ - **Separation escalates.** To separate content, reach for whitespace first,
252
+ then a divider, then a container — in that order, never skipping a step.
253
+
254
+ Mirror each refusal here with a check under \`checks/\` that lists this
255
+ node in its \`references\`, so review enforces the same floor this prose sets.
256
+ `,
257
+ },
258
+ {
259
+ relativePath: "pattern.status-with-next-step.md",
260
+ content: `---
261
+ description: Status of an ongoing thing plus the single next step — reach for this when the ask is "where is X / how is X going."
262
+ ---
263
+
264
+ **This is a worked example of the pattern convention — bound, open, refines.
265
+ Replace its content with a real pattern from your product, keep the structure.**
266
+
267
+ **When this applies:** the ask is about the state of something in flight — an
268
+ order, a transfer, a build, a goal.
269
+
270
+ **Bound (decided — do not redecide):**
271
+
272
+ - The current status renders first and largest; it is the focal point.
273
+ - A short line of meaning follows the status: why it matters or what changed,
274
+ never a restatement of it.
275
+ - Exactly one primary action, rendered last: the single next step.
276
+
277
+ **Open (your call, within these limits):**
278
+
279
+ - Supporting evidence may be a timeline or a compact stat list — whichever
280
+ fits the data. Never a full chart in this pattern.
281
+ - Density may flex one step tighter on operational surfaces.
282
+
283
+ **Refines:** \`principle.composition\`. If anything above conflicts with the
284
+ floor, the floor wins and this file is wrong.
285
+
286
+ When a blessed render of this pattern exists, add an \`exemplar.*\` node with
287
+ \`materials\` pointing at the screenshot and the implementation path.
288
+ `,
289
+ },
290
+ medianFile,
291
+ ];
292
+ },
293
+ };
294
+ const SKELETON_FILE_ORDER = new Map([
295
+ "glossary.md",
296
+ "brand.md",
297
+ "cliche.median.md",
298
+ "foundation.composition.md",
299
+ "foundation.color.md",
300
+ "foundation.type.md",
301
+ "foundation.controls.md",
302
+ "foundation.layout.md",
303
+ "foundation.motion.md",
304
+ "foundation.voice.md",
305
+ "context.conversation.md",
306
+ ].map((path, index) => [path, index]));
307
+ const SKELETON_TEMPLATE = {
308
+ name: "skeleton",
309
+ description: "Naked skeleton: a brand cover, foundation chapters with open questions, and the cliche floor.",
310
+ async files() {
311
+ const skeletonFiles = [
312
+ ...(await loadPackedPayload("skeleton")),
313
+ await medianTemplateFile(),
314
+ ];
315
+ skeletonFiles.sort((a, b) => (SKELETON_FILE_ORDER.get(a.relativePath) ?? Number.MAX_SAFE_INTEGER) -
316
+ (SKELETON_FILE_ORDER.get(b.relativePath) ??
317
+ Number.MAX_SAFE_INTEGER) ||
318
+ a.relativePath.localeCompare(b.relativePath));
319
+ return [manifestFile("brand"), gitignoreFile(), ...skeletonFiles];
320
+ },
321
+ };
322
+ async function medianTemplateFile() {
323
+ return {
324
+ relativePath: "cliche.median.md",
325
+ content: await loadPayloadFile("median", "cliche.median.md"),
326
+ };
327
+ }
328
+ const TEMPLATES = new Map([
329
+ [MINIMAL_TEMPLATE.name, MINIMAL_TEMPLATE],
330
+ [COMPOSITION_TEMPLATE.name, COMPOSITION_TEMPLATE],
331
+ [SKELETON_TEMPLATE.name, SKELETON_TEMPLATE],
332
+ ]);
333
+ const VESSEL_LIGHT_BODY = {
334
+ name: "vessel-light",
335
+ description: "Vessel's design language at full strength: corpus, tokens, fonts, refs, and checks.",
336
+ includesChecks: true,
337
+ async files() {
338
+ const payload = await loadPackedPayload("vessel-light");
339
+ payload.sort((a, b) => {
340
+ const ao = BODY_FILE_ORDER.get(a.relativePath);
341
+ const bo = BODY_FILE_ORDER.get(b.relativePath);
342
+ return ((ao ?? Number.MAX_SAFE_INTEGER) - (bo ?? Number.MAX_SAFE_INTEGER) ||
343
+ a.relativePath.localeCompare(b.relativePath));
344
+ });
345
+ // The payload carries its own manifest.yml (id stays `vessel-light`);
346
+ // only the gitignore is generated locally.
347
+ return [gitignoreFile(), ...payload];
348
+ },
349
+ };
350
+ /** Listing order for the body scaffold output: anchors first, then the rest. */
351
+ const BODY_FILE_ORDER = new Map(["manifest.yml", "glossary.md", "index.md"].map((path, i) => [path, i]));
352
+ const BODIES = new Map([
353
+ [VESSEL_LIGHT_BODY.name, VESSEL_LIGHT_BODY],
354
+ ]);
355
+ /** Look up a registered init body by name. */
356
+ export function getInitBody(name) {
357
+ return BODIES.get(name);
358
+ }
359
+ export function listInitBodies() {
360
+ return [...BODIES.keys()];
361
+ }
362
+ export const DEFAULT_TEMPLATE_NAME = SKELETON_TEMPLATE.name;
363
+ /** Look up a registered init template by name. */
364
+ export function getInitTemplate(name) {
365
+ // `default` and `steering` are silent aliases for the skeleton starter:
366
+ // `default` for callers that never named a template, `steering` for
367
+ // callers pinned to the pre-skeleton default's name.
368
+ if (name === "default" || name === "steering")
369
+ return SKELETON_TEMPLATE;
370
+ return TEMPLATES.get(name);
371
+ }
372
+ export function listInitTemplates() {
373
+ return [...TEMPLATES.keys()];
374
+ }
375
+ //# sourceMappingURL=templates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/scan/templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EACL,qBAAqB,EACrB,4BAA4B,GAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAoB1E,SAAS,YAAY,CAAC,KAAc;IAClC,OAAO;QACL,YAAY,EAAE,cAAc;QAC5B,OAAO,EAAE,WAAW,gCAAgC,gBAAgB,KAAK,CAAC,CAAC,CAAC,UAAU,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE;KACvG,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,SAAS,aAAa;IACpB,OAAO;QACL,YAAY,EAAE,YAAY;QAC1B,OAAO,EAAE,GAAG,qBAAqB,KAAK,4BAA4B,IAAI;KACvE,CAAC;AACJ,CAAC;AAED;;;;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C;AAED,MAAM,UAAU,cAAc;IAC5B,OAAO,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;AAC5B,CAAC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG,iBAAiB,CAAC,IAAI,CAAC;AAE5D,kDAAkD;AAClD,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,wEAAwE;IACxE,oEAAoE;IACpE,qDAAqD;IACrD,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,UAAU;QAAE,OAAO,iBAAiB,CAAC;IACxE,OAAO,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC/B,OAAO,CAAC,GAAG,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC;AAC/B,CAAC"}
@@ -0,0 +1,146 @@
1
+ ---
2
+ name: ghost
3
+ description: Author, validate, consume, and review against a repo-local Ghost fingerprint — the medium-agnostic articulation of a product's brand. Use when the user wants to set up a .ghost fingerprint, write or update brand-truth nodes, gather brand context before generation, or assemble a review packet from Ghost checks.
4
+ license: Apache-2.0
5
+ metadata:
6
+ homepage: https://github.com/block/ghost
7
+ cli: ghost
8
+ ---
9
+
10
+ # Ghost — Brand Fingerprints
11
+
12
+ A Ghost fingerprint is the medium-agnostic articulation of a brand: its truths,
13
+ its stance, its conditions, and optional pointers to the concrete materials those
14
+ truths govern. One brand truth is stated once, at the altitude it is actually
15
+ true, and an agent reads the relevant truths before building.
16
+
17
+ ```text
18
+ .ghost/
19
+ manifest.yml # schema + id (the package anchor)
20
+ glossary.md # the author's kind vocabulary
21
+ materials/ # bundled materials; reserved, never nodes
22
+ <kind>.<slug>.md # a brand truth of a declared kind
23
+ <slug>.md # a brand truth without a kind
24
+ checks/ # optional review assertions; never nodes
25
+ ```
26
+
27
+ ## The model in one breath
28
+
29
+ - A **node** is a markdown file: `description`, optional `materials`, and a prose
30
+ brand truth.
31
+ - `materials` is one list of locators for the concrete stuff the truth is about:
32
+ repo-relative paths/globs or absolute HTTPS URLs. `materials/` is reserved for
33
+ bundled materials; reference living implementations where they already live.
34
+ Guidance stays in prose.
35
+ - A node's **kind** comes from its filename prefix (`principle.density.md` →
36
+ kind `principle`). A bare name (`voice.md`) has no kind.
37
+ - The **glossary** declares the kind vocabulary and what each kind means.
38
+ - The manifest's `cover` names the node `gather` inlines above the menu every
39
+ time. It carries essence, temperature, and brand-only refusals. Admission
40
+ test: a violation visible in one element belongs in that element's chapter;
41
+ visible in one view, in the composition chapter; visible only across the
42
+ whole body of work, on the cover.
43
+ - There is **no hierarchy, no inheritance, no edges**. Directories are for browsing
44
+ only; the model reads a flat menu.
45
+ - **Checks** are optional review assertions in a flat `.ghost/checks/*.md`
46
+ directory. Checks are feed-back only; they never leak into generation
47
+ context. Each check declares `references` to node ids and is used by
48
+ `ghost review`. A check may
49
+ include `probe: <command>`; review runs it as evidence unless `--no-probes` is
50
+ set. Checks are never emitted by `ghost gather` or `ghost pull`.
51
+
52
+ ## The loop
53
+
54
+ ```bash
55
+ ghost init # scaffold .ghost/ with the steering starter
56
+ ghost checks init # opt in to review assertions
57
+ ghost validate # artifact shape + node/material/check validation
58
+ ghost gather <ask> # emit Available guidance for this task
59
+ ghost pull <ids> # pull selected node bodies and materials
60
+ ghost review # assemble diff + matched material-backed nodes + checks
61
+ ghost export # package .ghost/ as a portable brand artifact
62
+ ghost pulse # summarize local gather/pull events while tuning
63
+ ```
64
+
65
+ `gather` does no selection. It emits the complete, unfiltered, unranked menu
66
+ from the Ghost brand fingerprint. You read the ask against descriptions, then
67
+ pull every applicable truth and skip inapplicable nodes. Topic overlap alone is
68
+ not applicability. Its header includes a coverage line: total nodes and nodes
69
+ carrying concrete material. `gather` labels materials, substantial fenced
70
+ examples, and Skeletons separately, so an all-prose fingerprint is visible
71
+ before generation.
72
+
73
+ Prefer `ghost pull` over reading files directly: it emits the same prose,
74
+ inlines small local materials by default, turns binary materials into
75
+ inspect-pointers, orders the packet for steering (cover when selected,
76
+ concrete nodes, prose rules), extracts Skeletons dead last, and appends
77
+ structured events to `.ghost/.events` for local tuning.
78
+
79
+ `review` does no grading. It assembles an advisory packet: touched files,
80
+ matched material-backed nodes, offered checks, probe
81
+ evidence, coverage gaps, and the diff. The host agent renders findings.
82
+
83
+ ## CLI verbs
84
+
85
+ | Verb | Purpose |
86
+ |---|---|
87
+ | `ghost init` | Scaffold `.ghost/` with the skeleton starter: manifest, glossary, a `brand.md` cover, foundation chapters, context nodes, and the cliche floor. `--template minimal` writes a smaller cover-led starter. `--with checks` also adds the checks directory. |
88
+ | `ghost checks init` | Scaffold `.ghost/checks/` with an example review assertion. |
89
+ | `ghost validate [file-or-dir]` | Validate manifest, nodes, material locators, check references, and glossary kind prefixes. |
90
+ | `ghost gather [ask…] [--format json]` | Emit the complete guidance menu plus coverage line; log exposed ids. |
91
+ | `ghost pull <id> [<id>…]` | Emit selected nodes' full bodies and materials in steering order; log selected/missed ids. |
92
+ | `ghost review [--diff <path|->] [--base <ref>] [--format json] [--no-probes]` | Emit an advisory review packet for a diff (requires `.ghost/checks/`). |
93
+ | `ghost export [--out <path>] [--no-checks] [--strict] [--format json]` | Package `.ghost/` as a portable brand artifact and report which material locators will not travel. |
94
+ | `ghost pulse [--format json]` | Summarize local `.ghost/.events`. |
95
+ | `ghost skill install` | Install this skill bundle. |
96
+ | `ghost manifest [--format json]` | Emit a self-describing JSON manifest of every command and flag. |
97
+
98
+ ## Skeleton convention
99
+
100
+ A `## Skeleton` section in a node contains the literal opening structure for a
101
+ surface, usually on a `pattern.*` node. `ghost validate` warns unless each
102
+ Skeleton section has exactly one fenced block. `ghost pull` removes Skeletons
103
+ from the node body and emits the fences at the end under a begin-from-this banner.
104
+ If a pulled Skeleton matches the task, start the artifact from it verbatim, then
105
+ fill with task facts.
106
+
107
+ ## Receiving a fingerprint
108
+
109
+ Unpack the exported archive, run `ghost validate --package <dir>`, then run
110
+ `ghost skill install` in the receiving workspace. From there, gather and pull
111
+ against the unpacked package with `--package <dir>`.
112
+
113
+ ## Workflows
114
+
115
+ - Author or update the fingerprint: follow [references/capture.md](references/capture.md).
116
+ - Author material-backed nodes: follow [references/blocks.md](references/blocks.md).
117
+ - Choose which concrete code tiers the package carries: follow [references/concrete-tiers.md](references/concrete-tiers.md).
118
+ - Choose the right human-agent authoring workflow: follow [references/authoring-scenarios.md](references/authoring-scenarios.md).
119
+ - Adapt a starter (a body or the skeleton) to your brand: follow [references/adapting-a-starter.md](references/adapting-a-starter.md).
120
+ - Gather applicable truths for a task: follow [references/recall.md](references/recall.md).
121
+ - Shape a pre-generation brief: follow [references/brief.md](references/brief.md).
122
+ - Probe readiness before generating: follow [references/self-check.md](references/self-check.md).
123
+ - Audit steering coverage: follow [references/steering-audit.md](references/steering-audit.md).
124
+ - Understand the package shape: see [references/schema.md](references/schema.md).
125
+
126
+ Fingerprint authoring is **elicitation, not scanning**. The raw material is what
127
+ the human brings and points at: words, images, links, exemplar products, brand
128
+ docs, copy they love or hate. Repo code can supply material locators and local
129
+ conventions, but durable brand truth should be curated by the human.
130
+
131
+ ## When the fingerprint is silent
132
+
133
+ A silent fingerprint does not require stopping. Proceed from nearby product
134
+ surfaces, local conventions, and ordinary reasoning when safe, and label that
135
+ reasoning as provisional and non-Ghost-backed unless the fingerprint itself
136
+ declares a stricter silence posture (check the cover), which overrides
137
+ this default. Ask a human before high-risk, irreversible, privacy, security,
138
+ legal, or brand-defining choices.
139
+
140
+ ## Never
141
+
142
+ - Never invent hierarchy, inheritance, or cross-node edges.
143
+ - Never file a truth by destination (`for-emails.md`); state its condition in prose.
144
+ - Never put guidance in `materials`; it belongs in the node body.
145
+ - Never gather checks as generation context.
146
+ - Never claim provisional or local-convention reasoning as Ghost-backed.
@@ -0,0 +1,104 @@
1
+ ---
2
+ name: adapting-a-starter
3
+ description: Transplant a starter fingerprint — a body like vessel-light or the naked skeleton — into your own brand, one procedure from manifest id to regenerated refs.
4
+ handoffs:
5
+ - label: Validate the adapted package
6
+ command: ghost validate --format json
7
+ prompt: Does the adapted fingerprint validate, and did any pruned rule orphan a check reference?
8
+ ---
9
+
10
+ # Recipe: Adapt A Starter Fingerprint
11
+
12
+ **Goal:** turn an installed starter — a full body (`ghost init --body
13
+ vessel-light`) or the naked skeleton (`ghost init`) — into *your* brand's
14
+ fingerprint without shipping a self-contradicting package.
15
+
16
+ The naked skeleton is factored by what must happen during adaptation:
17
+
18
+ | Stratum | Files | On adaptation |
19
+ | --- | --- | --- |
20
+ | Cover | `brand.md` | Write it — essence in one paragraph, temperature, and brand-only refusals. Apply the admission test to every line: a violation visible in one element belongs in that element's chapter; visible in one view, in the composition chapter; visible only across the whole body of work, here. Keep a one-screen budget and delete every scaffolding sentence when real. |
21
+ | Foundation | `foundation.*` | Answer each chapter's open section (`Palette`, `Typeface`, `Radius`, `Character`, `Warmth`), restate it as the brand's current answer, and edit misuse lists to the brand's real failure modes. |
22
+ | Context | `context.*` | Add or re-tune after the open questions are answered; context nodes state only what inverts in a matching situation. |
23
+ | Cliche floor | `cliche.*` | Prune — delete entries a foundation misuse list absorbs, delete the paired check flag with it, and replace generic entries with refusals only this brand makes. If a refusal passes the cover admission test, graduate it to `brand.md`. |
24
+ | Materials and refs | `materials/*`, referenced implementations, refs | Add or regenerate so the prose has concrete material to inspect. |
25
+ | Checks | `checks/*` | Keep paired with the nodes they enforce; delete or rewrite flags when their source rule changes. |
26
+
27
+ Do the steps **in order and in one sitting** where possible. A half-adapted
28
+ package is worse than an unadapted one: stale refs steer harder than any prose
29
+ you rewrote, so stopping before refs and checks are current ships a fingerprint
30
+ that contradicts itself.
31
+
32
+ ## The procedure
33
+
34
+ 1. **Change the manifest id.** Edit `id:` in `manifest.yml` to your brand's
35
+ name. This is deliberately first: it is the explicit act that marks the
36
+ adaptation as begun. Until it changes, the package honestly claims to be the
37
+ starter, and every consuming agent cites it as a starter default.
38
+ 2. **Write the cover.** Replace `brand.md` with the brand's essence in one
39
+ paragraph, the shared temperature of words and motion, and the refusals only
40
+ this brand makes. Test every line: a violation visible in one element moves
41
+ to that element's chapter; visible in one view, to the composition chapter;
42
+ only what shows solely across the whole body of work stays. Keep the cover
43
+ to one screen and delete every scaffolding sentence when it is real.
44
+ 3. **Answer the foundation chapters.** Walk each `foundation.*` node. Keep the
45
+ usage rules that describe the closed vocabulary; answer the open section as
46
+ the brand's current answer. Ask the human for undecided values; never
47
+ freehand a value and present it as brand-backed. Edit each misuse list to the
48
+ failures this brand actually needs to avoid.
49
+ 4. **Add or edit materials.** Record literal values where the implementation or
50
+ asset materials live, then add `materials` locators to the nodes that explain
51
+ them. Role names can stay stable while values change. The point is that a
52
+ realizing agent can inspect the same concrete source the prose governs.
53
+ 5. **Re-tune contexts.** Revisit each `context.*` node after the foundation
54
+ answers exist. Keep only inversions that apply in that situation; delete
55
+ generic foundation rules repeated there, and add new contexts only when a
56
+ task situation truly bends the defaults.
57
+ 6. **Prune `cliche.median`.** Each rule is a `###` heading section; delete the
58
+ whole section for every rule a foundation misuse list now absorbs or your
59
+ brand legitimately violates. Do not rewrite surviving measured defaults into
60
+ taste. Then run `ghost validate`: every check reference orphaned by a pruned
61
+ heading surfaces as its own warning — delete the paired flag and its
62
+ reference from the check.
63
+ 7. **Regenerate refs.** Exemplars dominate prose: a prose rule contradicted by a
64
+ stale ref loses. Rebuild each ref against the new values and chapter answers,
65
+ keep any annotation headers current, and make each ref demonstrate its closed
66
+ sets completely. If the starter shipped no refs, generate them now — a
67
+ fingerprint with no exemplars steers at half strength.
68
+ 8. **Rewrite checks and near-miss nodes.** For each answered foundation chapter,
69
+ name the failure mode one step away from the answer and its replacement. Put
70
+ pre-generation guidance in nodes and review assertions in `checks/`; never
71
+ leave a check that asserts an obligation no node states.
72
+ 9. **Re-run the checks, including against refs.** `ghost validate` for package
73
+ shape, then review the regenerated refs against the median and value checks
74
+ (stage the ref changes and run `ghost review`). The floor only holds if the
75
+ refs hold it too: a ref that trips a median flag will teach every future
76
+ generation the violation.
77
+
78
+ ## Consuming an unadapted starter
79
+
80
+ Work does not block on adaptation. Before the procedure runs (or midway through
81
+ it), cite starter content honestly:
82
+
83
+ - Cover scaffolding and unanswered foundation sections: **provisional** — never
84
+ plain brand truth.
85
+ - Foundation usage rules: **Ghost-backed starter structure** until the human
86
+ answers the open sections and edits the misuse lists.
87
+ - Surviving median rules: **owner-backed after init** — Ghost stamps this
88
+ measured model truth into every initialized package; you own the pruning and
89
+ any adaptation thereafter.
90
+ - Context nodes: **conditional** — read only when their situation matches, and
91
+ revisit them after the foundation answers change.
92
+ - The manifest id tells you which state you are in: a starter id means
93
+ unadapted.
94
+
95
+ ## Never
96
+
97
+ - Never leave cover scaffolding in a real fingerprint.
98
+ - Never present your provisional value as the brand's answer.
99
+ - Never leave stale refs alongside new values — regenerate or delete; a stale
100
+ exemplar outweighs rewritten prose.
101
+ - Never prune a median rule without deleting its paired check flag, or keep a
102
+ check that asserts an obligation no node states.
103
+ - Never pre-write the manifest id change into automation — it is the human's
104
+ act of ownership, the one step an agent should not take alone.