monoforge 0.0.0-stage → 1.0.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 (82) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +72 -2
  3. package/bin/forge.mjs +98 -0
  4. package/package.json +56 -4
  5. package/packs/README.md +62 -0
  6. package/packs/public/forge-shapes/index.mjs +161 -0
  7. package/packs/public/forge-shapes/pack.json +13 -0
  8. package/packs/public/forge-shapes/test/fixtures/bad-publish/.github/workflows/publish.yml +11 -0
  9. package/packs/public/forge-shapes/test/fixtures/bad-publish/.monoforge-stamp.json +12 -0
  10. package/packs/public/forge-shapes/test/fixtures/bad-publish/README.md +3 -0
  11. package/packs/public/forge-shapes/test/fixtures/bad-publish/bin/probe.mjs +2 -0
  12. package/packs/public/forge-shapes/test/fixtures/bad-publish/package.json +14 -0
  13. package/packs/public/forge-shapes/test/fixtures/clean/.github/workflows/publish.yml +12 -0
  14. package/packs/public/forge-shapes/test/fixtures/clean/.monoforge-stamp.json +12 -0
  15. package/packs/public/forge-shapes/test/fixtures/clean/README.md +3 -0
  16. package/packs/public/forge-shapes/test/fixtures/clean/bin/probe.mjs +2 -0
  17. package/packs/public/forge-shapes/test/fixtures/clean/package.json +14 -0
  18. package/packs/public/forge-shapes/test/fixtures/missing-file/.github/workflows/publish.yml +12 -0
  19. package/packs/public/forge-shapes/test/fixtures/missing-file/.monoforge-stamp.json +13 -0
  20. package/packs/public/forge-shapes/test/fixtures/missing-file/README.md +3 -0
  21. package/packs/public/forge-shapes/test/fixtures/missing-file/bin/probe.mjs +2 -0
  22. package/packs/public/forge-shapes/test/fixtures/missing-file/package.json +14 -0
  23. package/packs/public/forge-shapes/test/fixtures/token/.github/workflows/publish.yml +12 -0
  24. package/packs/public/forge-shapes/test/fixtures/token/.monoforge-stamp.json +12 -0
  25. package/packs/public/forge-shapes/test/fixtures/token/README.md +3 -0
  26. package/packs/public/forge-shapes/test/fixtures/token/bin/probe.mjs +2 -0
  27. package/packs/public/forge-shapes/test/fixtures/token/package.json +14 -0
  28. package/packs/public/forge-shapes/test/fixtures/unfilled/.github/workflows/publish.yml +12 -0
  29. package/packs/public/forge-shapes/test/fixtures/unfilled/.monoforge-stamp.json +12 -0
  30. package/packs/public/forge-shapes/test/fixtures/unfilled/README.md +3 -0
  31. package/packs/public/forge-shapes/test/fixtures/unfilled/bin/probe.mjs +2 -0
  32. package/packs/public/forge-shapes/test/fixtures/unfilled/package.json +14 -0
  33. package/packs/public/forge-shapes/test/run.mjs +67 -0
  34. package/spec/refusals.json +35 -0
  35. package/src/cut.mjs +244 -0
  36. package/src/doctor.mjs +253 -0
  37. package/src/fs-adapter.mjs +143 -0
  38. package/src/fs-node.mjs +15 -0
  39. package/src/harness.mjs +118 -0
  40. package/src/index.mjs +19 -0
  41. package/src/lint-packs.mjs +77 -0
  42. package/src/lock.mjs +37 -0
  43. package/src/packs.mjs +200 -0
  44. package/src/paths.mjs +48 -0
  45. package/src/refusals.mjs +45 -0
  46. package/src/sha256.mjs +61 -0
  47. package/src/stamp.mjs +215 -0
  48. package/src/templates.mjs +147 -0
  49. package/src/workers.mjs +16 -0
  50. package/templates/monoforge/AGENTS.md +30 -0
  51. package/templates/monoforge/CHANGELOG.md +19 -0
  52. package/templates/monoforge/DEPLOY.md +53 -0
  53. package/templates/monoforge/LICENSE +21 -0
  54. package/templates/monoforge/README.md +16 -0
  55. package/templates/monoforge/TEMPLATE.md +19 -0
  56. package/templates/monoforge/docs/Gemfile +5 -0
  57. package/templates/monoforge/docs/_config.yml +36 -0
  58. package/templates/monoforge/docs/_layouts/default.html +29 -0
  59. package/templates/monoforge/docs/assets/css/style.css +14 -0
  60. package/templates/monoforge/docs/freestruct.config.yml +7 -0
  61. package/templates/monoforge/docs/index.md +27 -0
  62. package/templates/monoforge/docs/search.md +28 -0
  63. package/templates/monoforge/functions/api/health.js +10 -0
  64. package/templates/monoforge/gitignore.tmpl +9 -0
  65. package/templates/monoforge/horcrux/HORCRUX.md +7 -0
  66. package/templates/monoforge/labs/.eyes/ledger.json +1 -0
  67. package/templates/monoforge/labs/.eyes/manifest.yml +5 -0
  68. package/templates/monoforge/labs/TASKS.md +11 -0
  69. package/templates/monoforge/scripts/build-docs.sh +12 -0
  70. package/templates/monoforge/scripts/check-docs-frontmatter.cjs +112 -0
  71. package/templates/monoforge/scripts/check-docs-links.cjs +81 -0
  72. package/templates/monoforge/scripts/check-docs-style.cjs +79 -0
  73. package/templates/monoforge/scripts/check-fiction-signatures.cjs +69 -0
  74. package/templates/monoforge/scripts/check-jekyll-filters.cjs +62 -0
  75. package/templates/monoforge/scripts/check-language.cjs +171 -0
  76. package/templates/monoforge/site/robots.txt +4 -0
  77. package/templates/monoforge/wrangler.toml +11 -0
  78. package/templates/monoforge-headless/.github/workflows/docs.yml +102 -0
  79. package/templates/monoforge-headless/.github/workflows/publish.yml +141 -0
  80. package/templates/monoforge-headless/.github/workflows/staging-ff-sync.yml +44 -0
  81. package/templates/monoforge-headless/.github/workflows/test.yml +21 -0
  82. package/templates/monoforge-headless/TEMPLATE.md +17 -0
@@ -0,0 +1,147 @@
1
+ // src/templates.mjs - the template registry and the CHAIN resolver.
2
+ //
3
+ // A template is a named profile of the fleet scaffold. Profiles CHAIN the way
4
+ // vant chains skills (docs/essential/extensibility.md) and the way coreforge
5
+ // chains its site profiles: a profile's TEMPLATE.md frontmatter carries a
6
+ // `chain:` list of child profiles, and the parent COMPOSES them rather than
7
+ // duplicating their files. `monoforge` chains `monoforge-headless`, so the CI
8
+ // battery (`.github/`) lives ONCE in the headless profile and the full stamp
9
+ // inherits it - one copy, no drift between the two shapes.
10
+ //
11
+ // Resolution mirrors vant's override rule: children first (depth-first, in
12
+ // `chain` order), then the parent's own files on top, so a parent file of the
13
+ // same path WINS. A cycle is refused, named.
14
+ //
15
+ // node src/templates.mjs --list the profiles + their chains
16
+ // node src/templates.mjs --resolve NAME print the resolved file set
17
+ //
18
+ // The registry is the source of truth for `stamp` (which copies a resolved
19
+ // profile into a new repo) and for the tests. It is the only place a profile
20
+ // is declared; adding one is one entry here.
21
+ import { join } from './paths.mjs'
22
+ import { getDefaultFs } from './fs-adapter.mjs'
23
+
24
+ // The template root is computed lazily from `import.meta.url` with a pure-JS
25
+ // file-URL reader, so the engine core imports NO `node:*` and stays bundleable
26
+ // for workerd. A worker consumer always passes an explicit `root` (it has no
27
+ // repo tree on disk), so this default is only ever evaluated under Node.
28
+ let ROOT_CACHE
29
+ const fileUrlToPath = (u) => decodeURIComponent(String(u).replace(/^file:\/\//, '').replace(/^\/([A-Za-z]:)/, '$1'))
30
+ const defaultRoot = () => (ROOT_CACHE ??= join(fileUrlToPath(new URL('..', import.meta.url))))
31
+ const defaultFs = () => {
32
+ const fs = getDefaultFs()
33
+ if (!fs) throw new Error('no storage adapter is set - pass { fs: memoryFs() } (see src/fs-adapter.mjs)')
34
+ return fs
35
+ }
36
+
37
+ // The profiles. `from` names the template dirs/files the stamp copies;
38
+ // `chain` names child profiles composed underneath this one. A leaf profile
39
+ // carries its files and chains nothing.
40
+ export const TEMPLATES = {
41
+ // The full fleet scaffold: the docs system + gates + root docs + the labs /
42
+ // horcrux convention + the Pages canary, chaining the CI battery. A stamped
43
+ // repo gets the whole tree from one call.
44
+ monoforge: {
45
+ description: 'The full fleet scaffold - docs, gates, root docs, labs/horcrux, canary - chaining the CI battery.',
46
+ chain: ['monoforge-headless'],
47
+ },
48
+ // CI only: the `.github/` battery (test / docs / publish). A repo that brings
49
+ // its own docs tree still inherits the gates, the docs lane, and the release
50
+ // ladder.
51
+ 'monoforge-headless': {
52
+ description: 'CI only - the .github/ battery (test, docs, publish), no scaffold.',
53
+ chain: [],
54
+ },
55
+ }
56
+
57
+ // Parse a TEMPLATE.md manifest (vant SKILL.md shape: YAML frontmatter, then a
58
+ // human body). Returns { name, description, chain } or null when absent.
59
+ // Minimal frontmatter reader (no yaml dep - monoforge is zero-dependency):
60
+ // it understands the two shapes the manifests use, a scalar and a `- item`
61
+ // list.
62
+ export function parseManifest(text) {
63
+ const m = text.match(/^---\n([\s\S]*?)\n---/)
64
+ if (!m) return null
65
+ const fm = m[1]
66
+ const name = (fm.match(/^name:\s*(.+)$/m) || [])[1]?.trim()
67
+ let description = (fm.match(/^description:\s*(.+)$/m) || [])[1]?.trim()
68
+ if (description === '>' || description === '|') description = ''
69
+ let chain = []
70
+ const inline = fm.match(/^chain:\s*\[([^\]]*)\]/m)
71
+ if (inline) {
72
+ chain = inline[1].split(',').map((s) => s.trim()).filter(Boolean)
73
+ } else {
74
+ const block = fm.match(/^chain:\s*\n((?:[ \t]*-[ \t]*.+\n?)*)/m)
75
+ if (block) chain = [...block[1].matchAll(/^[ \t]*-[ \t]*(.+)$/gm)].map((x) => x[1].trim())
76
+ }
77
+ return { name, description, chain }
78
+ }
79
+
80
+ // Resolve a profile's chain depth-first: children first (in order), then the
81
+ // profile itself. Parent overrides child on a path collision, which falls out
82
+ // of applying children before parents. A cycle or an unknown child refuses.
83
+ export function resolveChain(name, seen = []) {
84
+ if (seen.includes(name)) {
85
+ throw new Error(`template chain cycle: ${[...seen, name].join(' -> ')}`)
86
+ }
87
+ const cfg = TEMPLATES[name]
88
+ if (!cfg) throw new Error(`unknown template profile "${name}" (known: ${Object.keys(TEMPLATES).join(', ')})`)
89
+ const order = []
90
+ for (const child of cfg.chain) order.push(...resolveChain(child, [...seen, name]))
91
+ order.push(name)
92
+ return order
93
+ }
94
+
95
+ // Load a profile's file map (rel -> source path) by walking templates/<name>/.
96
+ // TEMPLATE.md is forge metadata, not payload, so it is skipped. The walk runs
97
+ // through the storage adapter, so a workers consumer seeding the template tree
98
+ // into memoryFs resolves the SAME chain as Node does on disk.
99
+ export function loadProfile(name, { fs = defaultFs(), root = defaultRoot() } = {}) {
100
+ const dir = join(root, 'templates', name)
101
+ if (!fs.existsSync(dir)) throw new Error(`template "${name}" is not present - the scaffold is missing templates/${name}/`)
102
+ const files = new Map()
103
+ const walk = (d, rel) => {
104
+ for (const e of fs.readdirSync(d, { withFileTypes: true })) {
105
+ const r = rel ? `${rel}/${e.name}` : e.name
106
+ if (e.isDirectory()) { walk(join(d, e.name), r); continue }
107
+ if (r === 'TEMPLATE.md') continue
108
+ files.set(r, join(d, e.name))
109
+ }
110
+ }
111
+ walk(dir, '')
112
+ return files
113
+ }
114
+
115
+ // Resolve a profile into the file map `stamp` copies: children first, then the
116
+ // parent, parent wins on collision (vant's override rule).
117
+ export function resolveTemplate(name, opts = {}) {
118
+ const merged = new Map()
119
+ for (const profile of resolveChain(name)) {
120
+ for (const [rel, src] of loadProfile(profile, opts)) merged.set(rel, src)
121
+ }
122
+ return merged
123
+ }
124
+
125
+ // CLI: --list / --resolve NAME, for eyeballing and for the tests. Guarded so a
126
+ // worker bundle (no `process.argv`) evaluates nothing here.
127
+ const isNodeCli = typeof process !== 'undefined' && Array.isArray(process.argv) && process.argv[1]
128
+ if (isNodeCli && fileUrlToPath(import.meta.url) === fileUrlToPath(process.argv[1])) {
129
+ const argv = process.argv.slice(2)
130
+ if (argv.includes('--list')) {
131
+ for (const [name, cfg] of Object.entries(TEMPLATES)) {
132
+ console.log(`${name}: ${cfg.description}`)
133
+ if (cfg.chain.length) console.log(` chain: ${cfg.chain.join(', ')}`)
134
+ }
135
+ process.exit(0)
136
+ }
137
+ const i = argv.indexOf('--resolve')
138
+ if (i !== -1) {
139
+ const name = argv[i + 1]
140
+ const files = resolveTemplate(name, { root: defaultRoot() })
141
+ for (const rel of [...files.keys()].sort()) console.log(rel)
142
+ console.log(`# ${files.size} file(s) from ${resolveChain(name).join(' + ')}`)
143
+ process.exit(0)
144
+ }
145
+ console.log('usage: node src/templates.mjs --list | --resolve <name>')
146
+ process.exit(2)
147
+ }
@@ -0,0 +1,16 @@
1
+ // src/workers.mjs - the workers-native surface (monoforge#27).
2
+ //
3
+ // The coreforge rig vendored a fork of the stamp engine because workerd has no
4
+ // `node:fs`. This module is the surface that retires the fork: the stamp engine
5
+ // plus the storage adapters, with NO import that reaches `node:fs` statically.
6
+ // A Cloudflare Worker imports this, seeds its templates into `memoryFs()`, and
7
+ // calls `stamp(dir, { fs, root })` - the same truth machinery as Node, only the
8
+ // storage differs.
9
+ //
10
+ // Unlike `src/index.mjs`, this surface deliberately omits `doctor` and `lock`
11
+ // (they shell out to git and use `node:fs`); a worker that wants the battery
12
+ // runs it in Node. The engine (`stamp`) and the adapters are what the runtime
13
+ // boundary needs.
14
+ export { default as stamp, readFactoryConfig, tokenReplacements, stampToolName, sha256, RECEIPT } from './stamp.mjs'
15
+ export { memoryFs, FS_ADAPTER_METHODS, setDefaultFs, getDefaultFs } from './fs-adapter.mjs'
16
+ export { resolveTemplate, resolveChain, TEMPLATES } from './templates.mjs'
@@ -0,0 +1,30 @@
1
+ # AGENTS.md - __NAME__
2
+
3
+ ## Identity
4
+ - **Name:** __NAME__ (__SPECIES__)
5
+ - **Repo:** dhaupin/__NAME__
6
+ - **Core law:** FORGE-TODO:truth (the one-line law this tool enforces; the doctor reads this section down, so fill it, never stub it)
7
+
8
+ ## Mechanical conventions (this repo)
9
+ - Source lives in `src/`, CLI in `bin/`. Keep `package.json` exports/bin
10
+ pointing at both.
11
+ - Fixtures are law: the negative test in `test/` asserts exact expected
12
+ ids. Update fixtures and assertions in the same commit as a check change,
13
+ and run `npm test` FIRST to see whether the change is planned or a
14
+ regression you just caught by accident.
15
+ - All prose submits to the voice law: zero dashes of any kind, no
16
+ AI-cliche constructions, plain declarative sentences only. The doctor
17
+ enforces the dash part mechanically.
18
+ - The walk-exit rule (the promotion rule, family law 2026-10-28, eyestruct@70dfbea): a manual walk is not done until nothing it found is uncommissioned. A probe that only ever lived in prose is a one-mortem; the walk's exit criterion is that every finding became permanent in the same session (a battery leg, a pack verdict row, or a named docket row) so future walks only see fresh ground. Walks DISCOVER classes; the battery REMEMBERS them. Worked example (eyestruct@70dfbea): a walk found a real product bug (served octet-stream for brand jpgs) and two prose-only probe claims; all three were commissioned same-session - the jpg refusal became a served-contract leg, the serve-dist HTTP-shape probes became a battery file, and the lint-packs exit-fidelity claim became its adapter-api leg.
19
+
20
+ ## Release
21
+ - 0.9.0 = current manual npm. Bump to 1.0.0, tag v1.0.0, publish.yml runs
22
+ (see DEPLOY.md; OIDC trusted publishing; the workflow refuses 0.x
23
+ versions at the gate).
24
+ - CHANGELOG.md is Keep-a-Changelog. The `[Unreleased]` section is staged
25
+ content: it flips to the dated version header in the same commit that
26
+ carries the tag. Never mint a patch version for a docs-only change.
27
+
28
+ ## Landing & docs
29
+ - Landing: __SITE_URL__ (Cloudflare Pages; functions under `functions/`)
30
+ - Docs: __DOCS_URL__ (Jekyll + Pagefind + Freestruct via docs.yml)
@@ -0,0 +1,19 @@
1
+ # Changelog
2
+
3
+ All notable changes to __NAME__ will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Added
11
+ - Scaffold stamped by __STAMP_TOOL__ from the proven template blocks (docs
12
+ system, workflows, release ladder, gate scripts). FORGE-TODO:truth
13
+ here: list what the tool actually ships.
14
+
15
+ ## [__VERSION__] - __STAMP_DATE__
16
+
17
+ ### Notes
18
+ - 0.9.x is the manual npm release ladder; publish.yml refuses 0.x.
19
+ - 1.0.0 flips OIDC trusted publishing.
@@ -0,0 +1,53 @@
1
+ # DEPLOY.md - __NAME__ release runbook
2
+
3
+ __NAME__ is an npm tool. Deploy = publish. The ladder follows the proven
4
+ fleet convention:
5
+
6
+ 1. **0.9.x is manual.** While the major is 0.x, publish by hand
7
+ (`npm publish`). The workflow refuses 0.x versions.
8
+
9
+ ## The trifecta audit (run before every tag)
10
+
11
+ One walk over four artifacts, receipts over vibes (monoforge#10). Each member is
12
+ checked against what the tree ACTUALLY does, not what a prior cut said:
13
+
14
+ 1. **README** - usage lines match the real bin dispatch (no phantom flags), the
15
+ status line describes what is live, surfaces link docs/npm/workshop.
16
+ 2. **AGENTS.md** - the agent's first read: where things live, the battery/lane
17
+ workflow file names, the receipt inventory an agent may cite.
18
+ 3. **Deploy lanes** - the `.github/workflows/*.yml` set: deploy env still matches
19
+ what README/DEPLOY claim, each lane discoverable from AGENTS.md.
20
+ 4. **CHANGELOG** - keep-a-changelog discipline: one type heading per section,
21
+ `[Unreleased]` carries only REAL futures.
22
+
23
+ The walk is not done until every catch is commissioned in the same session (a
24
+ battery leg, a doc fix, or a named docket row) - the walk-exit rule in AGENTS.md.
25
+
26
+ ## Release atomicity (ruled 2026-10-24 on crashtest#20)
27
+
28
+ - CHANGELOG `[Unreleased]` flips to the dated version header in the same
29
+ commit that carries the tag.
30
+ - Never mint a patch version for a docs-only change. Prefer retagging
31
+ that same commit.
32
+
33
+ ## Ladder to automated publishes
34
+
35
+ 1. Bump `package.json` + `CHANGELOG.md` to 1.0.0 (Unreleased, then dated).
36
+ 2. `npm test` + `npm pack --dry-run` locally. Tag `v1.0.0`, push.
37
+ 3. publish.yml: tags `v*` + `workflow_dispatch`, idempotent
38
+ already-published check (`npm view __NAME__@<version>`), `npm test`,
39
+ provenance publish (`id-token: write`). Refuses 0.x refs.
40
+
41
+ ## Landing site (Cloudflare Pages, __SITE_URL__)
42
+
43
+ - `wrangler.toml` pins `pages_build_output_dir = "FORGE-TODO:dist-or-site"`:
44
+ whatever builds the site must emit there. (The author wires the real
45
+ build; Forge doctor flags this slot until it is filled.)
46
+ - `functions/api/health.js`: `GET /api/health` canary ships ready.
47
+
48
+ ## Docs site (GitHub Pages via Actions, __DOCS_URL__)
49
+
50
+ - `.github/workflows/docs.yml`: docs-truth gates first (the six ported
51
+ checkers), Jekyll, `freestruct --strict` (basePath-aware), `pagefind`
52
+ from the proven musl tarball, official artifact deploy. First run needs
53
+ the Pages source set to "GitHub Actions" in repo settings.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 dhaupin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,16 @@
1
+ # __NAME__ __VERSION__
2
+
3
+ __PITCH__.
4
+
5
+ ## What this shipping skeleton provides
6
+
7
+ (forge leaves this section to the author; it must describe what the tool
8
+ actually does. Replace this slot before the first push. FORGE-TODO:truth)
9
+
10
+ ## Status
11
+
12
+ FORGE-TODO:truth (honest status; see AGENTS.md law: statuses must be true)
13
+
14
+ ## Related
15
+
16
+ - [__NAME__](https://github.com/dhaupin/__NAME__): this repo is stamped from its template blocks
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: monoforge
3
+ description: >
4
+ The full fleet scaffold - docs, gates, root docs, labs/horcrux, canary -
5
+ chaining the CI battery.
6
+ chain:
7
+ - monoforge-headless
8
+ ---
9
+
10
+ # monoforge
11
+
12
+ The full fleet scaffold - docs, gates, root docs, labs/horcrux, canary - chaining the CI battery.
13
+
14
+ GENERATED metadata for the template layer - `stamp` resolves this profile by reading this file's `chain:`.
15
+
16
+ This profile CHAINS monoforge-headless: `monoforge new` composes the child
17
+ profile(s) first, then overlays this profile's own files (parent wins on a path
18
+ collision). The `.github/` battery therefore lives once, in the headless
19
+ profile, and both shapes inherit it - one copy, no drift.
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+ # No theme gem (docs use the custom layout, matching the fleet's docs) and
3
+ # no sitemap/seo-tag plugins: freestruct generates sitemap.xml post-build
4
+ # and owns all meta injection.
5
+ gem 'jekyll', '~> 4.4'
@@ -0,0 +1,36 @@
1
+ # Jekyll config - docs.creadev.org path-scoped docs, fleet-shaped after the
2
+ # live dhaupin/prestruct docs (same host, baseurl /<repo>, no theme gem -
3
+ # presentation lives in _layouts/default.html, kramdown GFM + rouge,
4
+ # permalink pretty; freestruct generates the sitemap post-build).
5
+ title: __NAME__ docs
6
+ description: The shared /packs SPEC - manifest contract, entry profiles, lifecycle, and the lint CLI.
7
+ url: https://docs.creadev.org
8
+ baseurl: /__NAME__
9
+
10
+ show_downloads: false
11
+
12
+ markdown: kramdown
13
+ highlighter: rouge
14
+
15
+ permalink: pretty
16
+
17
+ exclude:
18
+ - README.md
19
+ - freestruct.config.yml
20
+ - Gemfile
21
+ - Gemfile.lock
22
+ - _site
23
+ - pagefind
24
+ - pagefind-*.tar.gz
25
+
26
+ keep_files: ["pagefind", "assets"]
27
+
28
+ kramdown:
29
+ input: GFM
30
+ syntax_highlighter: rouge
31
+ syntax_highlighter_opts:
32
+ default_lang: plaintext
33
+ css_class: 'highlight'
34
+ toc_levels: [1, 2, 3, 4, 5, 6]
35
+ auto_ids: true
36
+ auto_id_prefix: ''
@@ -0,0 +1,29 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>{{ page.title | default: site.title }}</title>
7
+ <!-- freestruct completes canonical/OG/Twitter/JSON-LD post-render -->
8
+ <link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}">
9
+ </head>
10
+ <body>
11
+ <header>
12
+ <button class="burger" aria-label="Toggle menu" aria-expanded="false">☰</button>
13
+ <nav class="nav-list">
14
+ <a href="{{ '/' | relative_url }}">home</a> ·
15
+ <a href="{{ '/spec' | relative_url }}">SPEC v1</a> ·
16
+ <a href="{{ '/linter' | relative_url }}">linter</a> ·
17
+ <a href="{{ '/search' | relative_url }}">search</a> ·
18
+ <a href="__SITE_URL__">web</a>
19
+ </nav>
20
+ </header>
21
+ <main>
22
+ {{ content }}
23
+ </main>
24
+ <footer>
25
+ <p>© 2026 Creadev.org · __NAME__ - the shared /packs spec · \1 · <a href="__SITE_URL__/terms">Terms</a> · <a href="__SITE_URL__/privacy">Privacy</a> · part of the struct family</p>
26
+ </footer>
27
+ <script>document.querySelector('.burger').addEventListener('click',()=>{const n=document.querySelector('.nav-list');n.classList.toggle('open');document.querySelector('.burger').setAttribute('aria-expanded',n.classList.contains('open'))})</script>
28
+ </body>
29
+ </html>
@@ -0,0 +1,14 @@
1
+ /* __NAME__ docs theme — the fleet stone look, dark. */
2
+ :root { --bg: #0c0f0a; --fg: #e6e8dd; --accent: #a8c000; --muted: #9aa38f; --card: #14180f; }
3
+ body { background: var(--bg); color: var(--fg); max-width: 42rem; margin: 0 auto; padding: 2rem 1.25rem 4rem; font: 16px/1.65 system-ui, sans-serif }
4
+ nav a, a { color: var(--accent) }
5
+ table { width: 100%; border-collapse: collapse }
6
+ th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid #22281b }
7
+ th { color: var(--muted); text-transform: uppercase; font-size: .75rem; letter-spacing: .08em }
8
+ code, pre { background: var(--card); border-radius: 6px; font: .9em ui-monospace, monospace }
9
+ pre { padding: .75rem 1rem; overflow-x: auto }
10
+ footer { margin-top: 3rem; color: var(--muted); font-size: .85rem }
11
+ header nav { margin-bottom: 2.5rem; font-size: .9rem }
12
+ h1, h2 { letter-spacing: -0.02em }
13
+ .crosslinks { border-top: 1px solid #22281b; margin-top: 2.5rem; padding-top: 1.25rem; color: var(--muted); font-size: .92rem }
14
+ footer { border-top: 1px solid #22281b; padding-top: 1.25rem }
@@ -0,0 +1,7 @@
1
+ # Freestruct post-render SEO layer for the baked docs.
2
+ # Canonical math: site.url + basePath + relSlug => __DOCS_URL__/<page>
3
+ site:
4
+ name: __NAME__ docs
5
+ url: https://docs.creadev.org
6
+ description: The shared /packs SPEC — manifest contract, entry profiles, lifecycle, and the lint CLI.
7
+ basePath: /__NAME__
@@ -0,0 +1,27 @@
1
+ ---
2
+ title: "__NAME__"
3
+ description: "__DESCRIPTION_LONG__"
4
+ author: "Creadev.org"
5
+ lang: "en"
6
+ date: __STAMP_DATE__
7
+ last_modified_at: __STAMP_DATE__
8
+ nav_order: 1
9
+ permalink: /
10
+ layout: default
11
+ version: __VERSION__
12
+ ---
13
+ # __NAME__
14
+
15
+ __PITCH__.
16
+
17
+ ```bash
18
+ # documented usage here (keep this line honest: usage in docs must match the CLI)
19
+ ```
20
+
21
+ The release ladder: 0.9.x is manual npm; 1.0.0 flips OIDC trusted publishing
22
+ (publish.yml refuses 0.x versions). See DEPLOY.md in the repo.
23
+
24
+ <div class="crosslinks">
25
+ <p><strong>More in these docs:</strong>
26
+ <a href="{{ '/search/' | relative_url }}">search</a></p>
27
+ </div>
@@ -0,0 +1,28 @@
1
+ ---
2
+ title: "Search"
3
+ description: "Static full-text search over the __NAME__ docs, powered by Pagefind indexing the final baked HTML."
4
+ author: "Creadev.org"
5
+ lang: "en"
6
+ date: 2026-10-23
7
+ last_modified_at: 2026-10-23
8
+ nav_order: 4
9
+ layout: default
10
+ version: 0.9.0
11
+ permalink: /search
12
+ ---
13
+
14
+ # Search
15
+
16
+ <div id="search"></div>
17
+ <link href="{{ '/pagefind/pagefind-ui.css' | relative_url }}" rel="stylesheet">
18
+ <script src="{{ '/pagefind/pagefind-ui.js' | relative_url }}"></script>
19
+ <script>
20
+ new PagefindUI({ element: '#search', showSubResults: true })
21
+ </script>
22
+
23
+ <div class="crosslinks">
24
+ <p><strong>More in these docs:</strong>
25
+ <a href="{{ '/' | relative_url }}">home</a> ·
26
+ <a href="{{ '/spec' | relative_url }}">SPEC v1</a> ·
27
+ <a href="{{ '/linter' | relative_url }}">linter</a></p>
28
+ </div>
@@ -0,0 +1,10 @@
1
+ // Pages Function: GET /api/health - the house "prove the Functions wire works" canary.
2
+ export async function onRequestGet(context) {
3
+ return Response.json({
4
+ ok: true,
5
+ name: context.env.SITE_NAME || '__NAME__',
6
+ service: 'landing',
7
+ spec: '__NAME__@1',
8
+ ts: new Date().toISOString(),
9
+ })
10
+ }
@@ -0,0 +1,9 @@
1
+ node_modules/
2
+ .DS_Store
3
+ *.log
4
+ _site/
5
+ dist/
6
+ docs/_site/
7
+ docs/pagefind/
8
+ pagefind-*.tar.gz
9
+ .DS_Store
@@ -0,0 +1,7 @@
1
+ # horcrux - __NAME__
2
+
3
+ Continuance stones live in dhaupin/creadev `horcrux/` (the fleet's private
4
+ workspace) until this repo earns its public copy. Boot convention:
5
+ `<agent>-p_<password>.svg`, the text after p_ IS the key. The mind itself
6
+ lives in the vant workspace at models/public/__NAME__/ (identity, goals,
7
+ lessons).
@@ -0,0 +1,5 @@
1
+ pin:
2
+ browser-image: UNSET-edit-me
3
+ renderer: UNSET-edit-me
4
+ routes:
5
+ - path: / view: desktop-1280 theme: dark viewport: 1280x800
@@ -0,0 +1,11 @@
1
+ # labs/TASKS.md - __NAME__
2
+
3
+ Last updated: __STAMP_DATE__ (stamped by __STAMP_TOOL__; queue is empty by design)
4
+
5
+ ## Landing queue
6
+ - [ ] Fill every FORGE-TODO:truth slot before the first push (README,
7
+ AGENTS core law, CHANGELOG
8
+ Added list, DEPLOY pages output dir, docs PITCH). The doctor
9
+ flags unfilled slots; statuses must be true.
10
+ - [ ] Push pending: repo connection (the Freebuff app reconnect gates
11
+ both the push and the CI).
@@ -0,0 +1,12 @@
1
+ #!/bin/sh
2
+ # scripts/build-docs.sh - local docs pipeline (CI's proven inline steps).
3
+ # Invoke as: sh ./scripts/build-docs.sh (hosted builders drop the executable bit)
4
+ # Expects: ruby + bundler (Gemfile lives inside docs/) and node >= 20.
5
+ # Pagefind via npx fallback is local-dev OK only; CI uses the musl tarball
6
+ # (the npx path died in CI once - see .github/workflows/docs.yml note).
7
+ set -e
8
+ cd "$(dirname "$0")/.."
9
+ ( cd docs && bundle exec jekyll build )
10
+ npx --yes freestruct@1.1.0 --strict # discovers docs/freestruct.config.yml + docs/_site
11
+ npx --yes pagefind --site docs/_site # local-dev only, see note
12
+ echo "docs build complete: docs/_site"