@open-agent-toolkit/cli 0.2.20 → 0.2.22

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 (58) hide show
  1. package/assets/docs/workflows/projects/artifacts.md +1 -1
  2. package/assets/docs/workflows/skills/explainer-kit.md +188 -23
  3. package/assets/docs/workflows/skills/index.md +1 -1
  4. package/assets/public-package-versions.json +4 -4
  5. package/assets/skills/explainer-kit/SKILL.md +87 -25
  6. package/assets/skills/explainer-kit/briefs/deep-dive.md +35 -0
  7. package/assets/skills/explainer-kit/briefs/engineer-tour.md +45 -0
  8. package/assets/skills/explainer-kit/briefs/program-recap.md +41 -0
  9. package/assets/skills/explainer-kit/briefs/project-explainer.md +38 -0
  10. package/assets/skills/explainer-kit/briefs/project-page.md +38 -0
  11. package/assets/skills/explainer-kit/briefs/project-recap.md +47 -0
  12. package/assets/skills/explainer-kit/briefs/supporting-diagram.md +28 -0
  13. package/assets/skills/explainer-kit/briefs/walkthrough-deck.md +35 -0
  14. package/assets/skills/explainer-kit/examples/project-recap/content.md +57 -14
  15. package/assets/skills/explainer-kit/examples/project-recap/fact-base.json +104 -0
  16. package/assets/skills/explainer-kit/examples/project-recap/fact-base.md +26 -4
  17. package/assets/skills/explainer-kit/recipes/engineer-tour.json +27 -10
  18. package/assets/skills/explainer-kit/recipes/program-recap.json +35 -11
  19. package/assets/skills/explainer-kit/recipes/project-explainer.json +27 -10
  20. package/assets/skills/explainer-kit/recipes/project-recap.json +43 -11
  21. package/assets/skills/explainer-kit/references/contracts.md +45 -19
  22. package/assets/skills/explainer-kit/schemas/author-request.v2.schema.json +41 -0
  23. package/assets/skills/explainer-kit/schemas/author-result.v2.schema.json +52 -0
  24. package/assets/skills/explainer-kit/scripts/lib/browser-runtime.mjs +442 -0
  25. package/assets/skills/explainer-kit/scripts/lib/content-approval.mjs +223 -10
  26. package/assets/skills/explainer-kit/scripts/lib/contracts.mjs +28 -43
  27. package/assets/skills/explainer-kit/scripts/lib/diagram.mjs +237 -0
  28. package/assets/skills/explainer-kit/scripts/lib/html-safety.mjs +687 -0
  29. package/assets/skills/explainer-kit/scripts/lib/markdown.mjs +414 -0
  30. package/assets/skills/explainer-kit/scripts/lib/qa.mjs +313 -14
  31. package/assets/skills/explainer-kit/scripts/lib/recipes.mjs +314 -41
  32. package/assets/skills/explainer-kit/scripts/lib/records.mjs +61 -0
  33. package/assets/skills/explainer-kit/scripts/lib/render.mjs +166 -12
  34. package/assets/skills/explainer-kit/scripts/render-qa.mjs +152 -2
  35. package/assets/skills/explainer-kit/scripts/run.mjs +789 -272
  36. package/assets/skills/explainer-kit/templates/deck-shell.html +25 -5
  37. package/assets/skills/explainer-kit/templates/diagram-shell.html +29 -7
  38. package/assets/skills/explainer-kit/templates/engineer-tour.html +133 -9
  39. package/assets/skills/explainer-kit/templates/house-style.html +82 -0
  40. package/assets/skills/oat-brainstorm/SKILL.md +1 -1
  41. package/assets/skills/oat-brainstorm/scripts/helper.js +18 -11
  42. package/assets/skills/oat-brainstorm/scripts/server.cjs +109 -55
  43. package/assets/skills/oat-explainer-kit/SKILL.md +16 -9
  44. package/assets/skills/oat-explainer-kit/references/author-callback.md +51 -0
  45. package/assets/skills/oat-explainer-kit/references/lifecycle-contract.md +10 -8
  46. package/assets/skills/oat-explainer-kit/scripts/resolve-intent.mjs +14 -0
  47. package/assets/skills/oat-explainer-kit/scripts/run.mjs +7 -11
  48. package/assets/skills/oat-project-complete/SKILL.md +18 -2
  49. package/assets/skills/oat-project-implement/SKILL.md +1 -1
  50. package/assets/skills/oat-project-implement/references/completion-and-closeout.md +7 -1
  51. package/assets/skills/oat-wave-execute/SKILL.md +12 -19
  52. package/assets/skills/oat-wave-program/SKILL.md +12 -13
  53. package/dist/commands/init/tools/index.d.ts.map +1 -1
  54. package/dist/commands/init/tools/index.js +4 -4
  55. package/dist/engine/compute-plan.js +3 -3
  56. package/package.json +2 -2
  57. package/assets/skills/explainer-kit/schemas/author-request.schema.json +0 -85
  58. package/assets/skills/explainer-kit/schemas/author-result.schema.json +0 -65
@@ -58,7 +58,7 @@ failure outcomes and successful intermediates, rejects an existing dated
58
58
  destination, and requires the selected path to stay under the project's
59
59
  `explainers/` directory with a `project-recap` manifest. Verification covers
60
60
  the exact retained bytes for the privacy-safe request, content approval, fact
61
- base JSON and Markdown, declared author results, authored Markdown, resolved
61
+ base JSON and Markdown, declared author results, authored content, resolved
62
62
  theme, and every built artifact. Canonical fact-base and theme hashes remain
63
63
  normalized-object identities; `manifest.immutableHashes` independently covers
64
64
  serialized file bytes. Missing, stale, or tampered coverage fails before the
@@ -20,14 +20,21 @@ OAT lifecycle callers use the adapter.
20
20
 
21
21
  ## Recipes
22
22
 
23
- The core ships four versioned recipes:
24
-
25
- | Recipe | Use | Required narrative |
26
- | ------------------- | ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- |
27
- | `project-explainer` | Working explanation after project planning | planned architecture, decisions, risks, phases, and validation approach |
28
- | `project-recap` | Final record after implementation and final review | original request, key agent decisions, as-built architecture, implementation record, validation evidence, and outcome |
29
- | `program-recap` | Bird's-eye record of a multi-wave delivery program | program overview, wave map and outcomes, convention evolution, aggregate numbers, and follow-up ledger |
30
- | `engineer-tour` | Engineer-facing orientation to a codebase and its flow | orientation, architecture, execution flow, key code, and validation |
23
+ The core ships four versioned recipes on the `explainer-kit.recipe/v2` file
24
+ schema. Each recipe's own `version` selector remains `"1"`, so `{id, version}`
25
+ callers and manifest cross-checks are unaffected by the schema move.
26
+
27
+ A v2 recipe declares a **floor** the artifacts every run must produce plus
28
+ a licensed **expansion** set, instead of one exact artifact list. The floor is
29
+ identical to the artifact set each recipe produced before, so no published URL
30
+ changes:
31
+
32
+ | Recipe | Use | Floor artifact | Required narrative |
33
+ | ------------------- | ------------------------------------------------------ | ----------------------------- | --------------------------------------------------------------------------------------------------------------------- |
34
+ | `project-explainer` | Working explanation after project planning | one Markdown `hub` | planned architecture, decisions, risks, phases, and validation approach |
35
+ | `project-recap` | Final record after implementation and final review | one Markdown `hub` | original request, key agent decisions, as-built architecture, implementation record, validation evidence, and outcome |
36
+ | `program-recap` | Bird's-eye record of a multi-wave delivery program | one Markdown `hub` | program overview, wave map and outcomes, convention evolution, aggregate numbers, and follow-up ledger |
37
+ | `engineer-tour` | Engineer-facing orientation to a codebase and its flow | one HTML-composed `explainer` | orientation, architecture, execution flow, key code, and validation |
31
38
 
32
39
  The OAT project lifecycle owns `project-explainer` and `project-recap`. Both
33
40
  bind one project source set. The adapter binds `plan.md`, `design.md`, and
@@ -36,25 +43,183 @@ bind one project source set. The adapter binds `plan.md`, `design.md`, and
36
43
  set for `program-recap`; direct core callers can use `engineer-tour` without
37
44
  adding an OAT dependency.
38
45
 
46
+ ### Expansion profiles
47
+
48
+ Each recipe declares the expansion it licenses as a list of profiles. A profile
49
+ fixes everything the pipeline needs to build a follow-up author request —
50
+ artifact `type`, authoring path, brief, optional shell, and a mandatory
51
+ `maxCount`. Every recipe also carries a mandatory `expansion.limits.maxArtifacts`
52
+ that caps the whole expansion set; floor artifacts do not count against it.
53
+
54
+ | Recipe | Profiles (max per profile) | `maxArtifacts` |
55
+ | ------------------- | ----------------------------------------------------------- | -------------- |
56
+ | `project-recap` | `supporting-diagram` 4, `deep-dive` 3, `walkthrough-deck` 1 | 6 |
57
+ | `program-recap` | `supporting-diagram` 3, `project-page` 12 | 12 |
58
+ | `project-explainer` | `supporting-diagram` 4 | 4 |
59
+ | `engineer-tour` | `supporting-diagram` 4 | 4 |
60
+
61
+ `supporting-diagram` produces an HTML-composed `diagram` on the diagram shell,
62
+ `walkthrough-deck` an HTML-composed `deck` on the deck shell, and `deep-dive`
63
+ and `project-page` Markdown `explainer` pages. Every declared type stays inside
64
+ the frozen `manifest/v1` enum — narrative sub-pages use `explainer` rather than
65
+ introducing a new type.
66
+
39
67
  ## Content authoring and review
40
68
 
41
- Every unattended run requires one provider-neutral author. The core invokes
42
- the author once per recipe artifact with the exact narrative outline,
43
- reconciled fact base, and bounded-discovery context. It accepts only a
44
- schema-valid result with the required section IDs, substantive prose, and
45
- non-secret provenance. Each section is checked independently for excessive
46
- verbatim overlap with the fact base so one copied section cannot be hidden by
47
- otherwise original prose.
69
+ ### Two authoring paths
70
+
71
+ Each artifact is authored on exactly one of two paths, and the **recipe**
72
+ chooses which the author never does:
73
+
74
+ - **Narrative path** (`authoring: markdown`). The author writes Markdown. The
75
+ core parses it to a validated AST and renders it deterministically through a
76
+ themed block library: headings with anchors, GFM tables, lists including task
77
+ lists, strikethrough, GFM alert callouts (`> [!NOTE]`, `> [!TIP]`,
78
+ `> [!IMPORTANT]`, `> [!WARNING]`, `> [!CAUTION]`), fenced ` ```timeline `
79
+ blocks, code blocks, and figures. Fenced ` ```diagram ` blocks are rendered to
80
+ inline SVG at build time with no client-side script. Raw HTML passthrough and
81
+ links that violate the publish contract are hard errors; style findings are
82
+ warnings.
83
+ - **Artistic path** (`authoring: html`). The author composes a complete HTML
84
+ document, starting from a curated shell delivered inside the request. The core
85
+ validates the result at the DOM level rather than re-rendering it. Non-script
86
+ markup is free within the allowlist, so decks, standalone diagrams, and tours
87
+ keep full visual latitude.
88
+
89
+ Script safety on the artistic path is enforced by hash pinning rather than a
90
+ blanket ban, because the bundled shells legitimately contain scripts. The
91
+ validator derives an ordered multiset of script hashes from the declared core
92
+ shell and requires the authored document's scripts to match it exactly — same
93
+ hashes, same count, same order, compared over exact bytes. Missing, added,
94
+ duplicated, reordered, replaced, or mutated scripts all hard-fail, as do inline
95
+ event-handler attributes and external active content.
96
+
97
+ ### Briefs carry the editorial bar
98
+
99
+ Quality expectations live in versioned prose briefs shipped with the core under
100
+ `briefs/`, not in the content schema. There is one brief per floor entry and one
101
+ per expansion profile. A brief states audience, voice, per-section intent, the
102
+ artifact's depth floors (for example "at least one high-level architecture
103
+ diagram"), and the expansion license. The core inlines the brief into every
104
+ author request, so an unattended author receives everything it needs in one
105
+ payload. Changing a brief changes output expectations with no contract
106
+ migration.
107
+
108
+ ### The author seam
109
+
110
+ Every run requires one provider-neutral author callback, in **both** modes —
111
+ there is no synthetic content model to fall back on. A run without one fails
112
+ with `E_AUTHOR_REQUIRED`.
48
113
 
49
114
  In-process core callers supply `options.author`; core CLI callers use
50
115
  `--author-module`. The OAT adapter accepts either an in-process `author` or an
51
- `authorModulePath` and rejects zero or two seams for unattended runs before it
52
- invokes the core. Callback and module paths are transient. Validated results
53
- are retained under `source/author/` and covered by the run's immutable hashes.
54
-
55
- Interactive runs may omit an author. They pause after writing
56
- `source/content/*.md`, require an explicit content-review decision, and resume
57
- the same run only after approval. Content approval never authorizes publishing.
116
+ `authorModulePath`, and rejects zero or two seams before it invokes the core.
117
+ Callback and module paths are transient and never persisted in the run request.
118
+ Validated results are retained under `source/author/` and authored content under
119
+ `source/content/<artifact>.md` or `.html`; both are covered by the run's
120
+ immutable hashes.
121
+
122
+ The core invokes the author once per artifact with an
123
+ `explainer-kit.author-request/v2` payload carrying the artifact identity and
124
+ type, its authoring path, the inlined brief, the reconciled fact base, the
125
+ resolved theme, the shell source for artistic artifacts, and — for narrative
126
+ floor artifacts — the required narrative section IDs. It accepts only a
127
+ schema-valid `explainer-kit.author-result/v2` containing exactly one of
128
+ `content.markdown` or `content.html` plus non-secret provenance. Authored
129
+ content is still checked for excessive verbatim overlap with the fact base.
130
+
131
+ ### Content-driven expansion
132
+
133
+ An author that judges the material to warrant more than the floor may return
134
+ `proposedArtifacts` on the floor result, where each entry is only
135
+ `{id, profileId, rationale}`. Proposals deliberately cannot carry an authoring
136
+ path, brief, or shell — those are read from the referenced profile, so policy
137
+ stays recipe-owned.
138
+
139
+ The pipeline validates each proposal, enforces the per-profile and recipe-level
140
+ caps, then issues one author request per accepted proposal. The two outcomes are
141
+ distinct on purpose:
142
+
143
+ - A **malformed** proposal — unknown `profileId`, unsafe or duplicate `id`, or a
144
+ collision with a floor artifact ID — is a hard error, because it signals a
145
+ broken author rather than thin content.
146
+ - An **over-limit** proposal is rejected with a stable warning and the run
147
+ continues.
148
+
149
+ Accepted expansion artifacts render to ID-bearing paths
150
+ (`site/{directory}/{slug}/{artifactId}/index.html`) and are linked from the floor
151
+ hub, while floor artifacts keep their existing paths unchanged.
152
+
153
+ ### Approval and marking
154
+
155
+ The interactive approval gate sits **after** theme, render, safety validation,
156
+ the guideline checker, and render QA — immediately before publish and
157
+ durability. Rendering is local and non-destructive, and nothing leaves the
158
+ machine before approval, so the reviewer now approves the rendered artifacts and
159
+ the complete warning set instead of raw prose.
160
+
161
+ An interactive run therefore stops with an `incomplete` outcome once the
162
+ artifacts are built and checked. Review the rendered `site/` tree, the sources
163
+ under `source/content/`, and the accumulated warnings, then supply an explicit
164
+ JSON decision and rerun the same request. A rejection persists its correction
165
+ list; after the sources are edited, approving resumes the same run, which
166
+ re-renders and re-runs QA against the edited sources before approval is
167
+ processed rather than publishing the stale render.
168
+
169
+ Unattended runs — including recaps triggered by automated project completion —
170
+ flow through end-to-end and auto-approve. The approval record distinguishes the
171
+ two honestly: `explainer-kit.content-approval/v2` carries
172
+ `marking: human-approved` for an interactive approval and `auto-drafted` for an
173
+ unattended run, and the marking is surfaced in the core and adapter run results.
174
+ It is deliberately **not** written to the manifest, which stays frozen on
175
+ `manifest/v1`.
176
+
177
+ The approval record is also the durable source of truth for the resolved
178
+ artifact set. It records every floor and accepted expansion artifact for all
179
+ approval states, including pending and rejected, so a paused expanded run
180
+ rehydrates with stable artifact IDs, paths, hub links, and hashes without
181
+ re-invoking the author.
182
+
183
+ Content approval never authorizes publishing.
184
+
185
+ ## Warnings and QA severity
186
+
187
+ QA findings are split by severity, and the split is what lets thin content ship
188
+ visibly instead of failing a run. Safety and provenance violations — unsafe DOM
189
+ or AST content, external assets, link-form violations, unresolved tokens,
190
+ denylisted strings, tag imbalance, cohesion breaks, and source dumping — still
191
+ throw `E_QA` and fail the run. Editorial and layout findings append stable
192
+ warning identifiers to the manifest's `warnings[]` array and let the run
193
+ succeed in both modes.
194
+
195
+ | Warning ID | Meaning |
196
+ | ---------------------------------------- | --------------------------------------------------------------- |
197
+ | `guideline-narrative-coverage-missing` | A required narrative section is not covered by the artifact |
198
+ | `guideline-architecture-diagram-missing` | No architecture diagram, inline or standalone, was produced |
199
+ | `guideline-structured-depth-missing` | The artifact lacks the structured blocks its floor expects |
200
+ | `expansion-profile-limit-exceeded` | A proposal was rejected against its profile's `maxCount` |
201
+ | `expansion-artifact-limit-exceeded` | A proposal was rejected against `expansion.limits.maxArtifacts` |
202
+ | `render-qa-document-overflow` | The document overflows the viewport at a probed width |
203
+ | `render-qa-inner-container-overflow` | An inner container overflows horizontally |
204
+ | `render-qa-viewport-clipping` | Content is clipped and unreachable |
205
+ | `render-qa-heading-unreadable` | A heading fails the readability probe |
206
+ | `render-qa-animations-enabled` | Animation remained active where it should be suppressed |
207
+ | `render-qa-reduced-motion` | The reduced-motion preference was not honored |
208
+ | `render-qa-keyboard-navigation` | Keyboard navigation did not reach expected targets |
209
+ | `render-qa-theme-toggle` | The theme toggle did not behave as expected |
210
+ | `render-qa-deck-no-js-layout` | A deck degrades incorrectly without JavaScript |
211
+ | `render-qa-deck-print-layout` | A deck degrades incorrectly in print layout |
212
+ | `render-qa-skipped-no-probe` | Render QA was skipped because no browser probe was supplied |
213
+
214
+ Render QA is opt-in. When a caller supplies a browser probe, the stage serves
215
+ the built site directory, loads each artifact with animations disabled, and runs
216
+ the layout-probe battery at representative widths. Viewport clipping
217
+ deliberately exempts content inside a horizontally scrollable ancestor, so
218
+ intentionally paged deck slides are not reported as clipped while genuinely
219
+ unreachable content still is. The core never launches a browser on its own:
220
+ without an injected probe the stage records the single
221
+ `render-qa-skipped-no-probe` warning and the run continues rather than failing
222
+ closed.
58
223
 
59
224
  ## Curated styles and themes
60
225
 
@@ -87,7 +252,7 @@ intermediates and recovery information.
87
252
 
88
253
  `manifest.immutableHashes` covers the exact retained bytes for
89
254
  `run-request.json`, content approval, fact-base JSON and Markdown, declared
90
- author results, authored Markdown, the resolved theme, and every built
255
+ author results, authored content, the resolved theme, and every built
91
256
  artifact. Canonical fact-base and theme hashes identify normalized objects;
92
257
  they are intentionally distinct from serialized file-byte hashes. The mutable
93
258
  manifest and build record are excluded from their own durability evidence and
@@ -11,7 +11,7 @@ Use this section when you want to choose the right OAT skill for a task. If you
11
11
 
12
12
  - [Writing Skills](../../contributing/skills.md) - Contributor guide to skill authoring, contracts, and governance.
13
13
  - [Docs Workflows](../../docs-tooling/workflows.md) - How docs CLI helpers and docs skills work together.
14
- - [Explainer Kit](explainer-kit.md) - Core and OAT adapter usage, recipes, themes, lifecycle policy, durability, and publishing.
14
+ - [Explainer Kit](explainer-kit.md) - Core and OAT adapter usage, recipes and expansion profiles, the two authoring paths, warnings and QA severity, themes, lifecycle policy, durability, and publishing.
15
15
  - [Repo Improve](repo-improve.md) - Source modes, external-plan boundaries, optional tracking, and OAT import handoff.
16
16
 
17
17
  ## Key Skills by Use Case
@@ -1,6 +1,6 @@
1
1
  {
2
- "cli": "0.2.20",
3
- "docs-config": "0.2.20",
4
- "docs-theme": "0.2.20",
5
- "docs-transforms": "0.2.20"
2
+ "cli": "0.2.22",
3
+ "docs-config": "0.2.22",
4
+ "docs-theme": "0.2.22",
5
+ "docs-transforms": "0.2.22"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: explainer-kit
3
- version: 1.0.2
3
+ version: 2.0.1
4
4
  description: Use when building destination-neutral visual explainer artifacts from explicit, versioned inputs.
5
5
  user-invocable: true
6
6
  allowed-tools: Read, Write, Edit, Bash, Grep, Glob, Agent, mcp__*
@@ -16,7 +16,11 @@ user, vault, or destination configuration.
16
16
  - Validate versioned run, source, theme, artifact, durability, and publishing
17
17
  contracts.
18
18
  - Reconcile one cited fact base before producing narrative content.
19
+ - Author every artifact against a bundled brief on one of two paths, and scale
20
+ the artifact set with the content through recipe-declared expansion profiles.
19
21
  - Render neutral, self-contained artifacts from bundled recipes and templates.
22
+ - Report editorial and layout findings as manifest warnings while keeping
23
+ safety and provenance violations hard failures.
20
24
  - Record build outcomes and verify caller-supplied durability evidence.
21
25
  - Publish only through an explicitly requested, human-gated connector.
22
26
 
@@ -51,25 +55,63 @@ node scripts/run.mjs --request /path/to/request.json
51
55
  ```
52
56
 
53
57
  The core composes validation, fact-base processing, bounded recipe/content
54
- discovery, theme resolution, rendering, QA, and manifest/build-record
55
- persistence. It runs without OAT files or ambient configuration. Supplied fact
56
- bases receive only lightweight consistency/freshness checks. Federated inputs
57
- require a provider-neutral critic callback and invoke it exactly once.
58
- Optional claim `sections` tags route facts to matching recipe narrative
59
- sections; untagged claims remain shared context for every required section.
60
-
61
- Unattended calls use explicit, already-approved source artifacts and require a
62
- provider-neutral author callback once per recipe artifact. In-process callers
63
- supply `options.author`; JSON-only CLI callers supply `--author-module`. The
64
- core validates exact narrative sections and non-secret author provenance,
65
- rejects excessive verbatim source overlap, retains each validated result under
66
- `source/author/`, persists review provenance in
67
- `source/content-approval.json`, and never prompts. Keep executable callback
68
- references out of the persisted run request.
69
-
70
- Interactive runs stop with an `incomplete` outcome after writing
71
- `source/content/*.md`. Review and correct that Markdown, then provide an
72
- explicit JSON decision and rerun the same request:
58
+ discovery, authoring, theme resolution, rendering, QA, approval, and
59
+ manifest/build-record persistence. It runs without OAT files or ambient
60
+ configuration. Supplied fact bases receive only lightweight
61
+ consistency/freshness checks. Federated inputs require a provider-neutral
62
+ critic callback and invoke it exactly once. Optional claim `sections` tags
63
+ route facts to matching recipe narrative sections; untagged claims remain
64
+ shared context for every required section.
65
+
66
+ ## Authoring
67
+
68
+ Every run requires a provider-neutral author callback in **both** modes; there
69
+ is no synthetic content model. A run without one fails `E_AUTHOR_REQUIRED`.
70
+ In-process callers supply `options.author`; JSON-only CLI callers supply
71
+ `--author-module`. Keep executable callback references out of the persisted run
72
+ request.
73
+
74
+ The recipe never the author selects each artifact's authoring path. Floor
75
+ entries and expansion profiles declare `authoring: markdown` for the narrative
76
+ path or `authoring: html` for the artistic path. The core invokes the author
77
+ once per artifact with an `explainer-kit.author-request/v2` payload carrying the
78
+ artifact identity and type, its authoring path, the inlined brief from
79
+ `briefs/`, the reconciled fact base, the resolved theme, the shell source for
80
+ artistic artifacts, and the required narrative sections for narrative floor
81
+ artifacts. It accepts only a schema-valid
82
+ `explainer-kit.author-result/v2` with exactly one of `content.markdown` or
83
+ `content.html` plus non-secret provenance, rejects excessive verbatim source
84
+ overlap, retains each validated result under `source/author/` and its content
85
+ under `source/content/<artifact>.md` or `.html`, and never prompts.
86
+
87
+ Markdown content is parsed to a validated AST and rendered through the themed
88
+ block library, including GFM tables and task lists, GFM alert callouts, fenced
89
+ `timeline` blocks, and fenced `diagram` blocks rendered to inline SVG at build
90
+ time. HTML content is validated at the DOM level: the authored document's
91
+ scripts must match the declared core shell's ordered multiset of script hashes
92
+ exactly, and inline event handlers and external active content are rejected.
93
+ Non-script markup stays free within the allowlist.
94
+
95
+ A floor artifact may return `proposedArtifacts` of `{id, profileId, rationale}`
96
+ to grow the set when the content earns it. The referenced profile supplies the
97
+ type, authoring path, brief, and shell, so the author never chooses policy.
98
+ Unknown profiles and unsafe, duplicate, or floor-colliding IDs are hard errors;
99
+ proposals over a profile's `maxCount` or the recipe's
100
+ `expansion.limits.maxArtifacts` are rejected with a warning and the run
101
+ continues. Accepted expansion artifacts render to
102
+ `site/{directory}/{slug}/{artifactId}/index.html` and are linked from the floor
103
+ hub; floor artifacts keep their existing paths.
104
+
105
+ ## Review, Approval, and Warnings
106
+
107
+ Approval runs after theme, render, safety validation, the guideline checker, and
108
+ render QA, immediately before publish and durability — so a reviewer approves
109
+ rendered artifacts and the complete warning set, not raw prose.
110
+
111
+ Interactive runs stop with an `incomplete` outcome once artifacts are built and
112
+ checked. Review the rendered `site/` tree, the sources under `source/content/`,
113
+ and the accumulated warnings, then provide an explicit JSON decision and rerun
114
+ the same request:
73
115
 
74
116
  ```bash
75
117
  node scripts/run.mjs \
@@ -77,11 +119,31 @@ node scripts/run.mjs \
77
119
  --reviewed-source /path/to/content-review.json
78
120
  ```
79
121
 
80
- An approval decision resumes the existing run at theme/render; a rejection
81
- persists its correction list and leaves downstream stages pending. Approval
82
- does not authorize publishing: a publish request still requires the separate
83
- human-gated publisher callback. See `references/contracts.md` for source
84
- formats, callback modules, retained intermediates, and result semantics.
122
+ An approval decision resumes the existing run; a rejection persists its
123
+ correction list, and a later approval re-renders and re-runs QA against the
124
+ edited sources before proceeding. Approval does not authorize publishing: a
125
+ publish request still requires the separate human-gated publisher callback.
126
+
127
+ Review provenance persists in `source/content-approval.json` as an
128
+ `explainer-kit.content-approval/v2` record. It carries
129
+ `marking: human-approved` for interactive approval and `auto-drafted` for
130
+ unattended runs, surfaced in the run result and never written to the manifest,
131
+ plus the complete resolved artifact set so a paused expanded run rehydrates
132
+ without re-invoking the author.
133
+
134
+ Safety and provenance violations fail the run with `E_QA`. Editorial and layout
135
+ findings — narrative-coverage, architecture-diagram, and structured-depth
136
+ guideline misses, rejected over-limit proposals, and render-QA layout findings —
137
+ append stable warning IDs to the manifest's `warnings[]` and let the run
138
+ succeed.
139
+
140
+ Render QA is opt-in. It runs only against an injected `browserProbe`, and the
141
+ core never launches a browser of its own — reviewing the rendered output in a
142
+ browser is the generating agent's job. Without a probe the stage records
143
+ `render-qa-skipped-no-probe` and the run continues.
144
+
145
+ See `references/contracts.md` for source formats, callback modules, retained
146
+ intermediates, and result semantics.
85
147
 
86
148
  Durability and publishing run only when the request selects them and the caller
87
149
  supplies the matching callback. The core does not create commits, discover
@@ -0,0 +1,35 @@
1
+ # Deep-dive author brief
2
+
3
+ ## Audience
4
+
5
+ Write for a technical reader who already understands the parent project recap
6
+ and needs enough detail to evaluate or work on one subsystem.
7
+
8
+ ## Voice
9
+
10
+ Be precise without becoming encyclopedic. Start with the question this page
11
+ answers and the boundary it covers. Use evidence tables, code or data examples,
12
+ and diagrams where they reduce explanation time. Define assumptions and call
13
+ out unresolved behavior.
14
+
15
+ ## Section intent
16
+
17
+ Structure the page around:
18
+
19
+ 1. the subsystem's purpose and boundary;
20
+ 2. its inputs, outputs, and dependencies;
21
+ 3. the important execution or data flow;
22
+ 4. the decisions and trade-offs that shaped it;
23
+ 5. failure modes, operational concerns, and validation evidence.
24
+
25
+ ## Floor
26
+
27
+ Produce a self-contained Markdown explainer that adds information not already
28
+ present in the parent hub. Include at least one structured evidence block and
29
+ link claims back to durable sources when available.
30
+
31
+ ## Expansion license
32
+
33
+ Depth is licensed, repetition is not. Add inline diagrams, examples, tables,
34
+ and callouts when they make a difficult mechanism easier to verify. Keep
35
+ adjacent topics in the parent hub or a separate justified artifact.
@@ -0,0 +1,45 @@
1
+ # Engineer tour author brief
2
+
3
+ ## Audience
4
+
5
+ Write for an engineer entering an unfamiliar codebase who needs a reliable
6
+ mental model before making a change.
7
+
8
+ ## Voice
9
+
10
+ Teach through concrete paths and execution flows. Use exact symbols and file
11
+ references when supported by the fact base, but explain why each location
12
+ matters. Distinguish architecture from incidental folder structure. Keep the
13
+ tour navigable rather than exhaustive.
14
+
15
+ ## Narrative intent
16
+
17
+ - **Orientation:** Explain the product purpose, runtime shape, and where a new
18
+ engineer should begin.
19
+ - **Architecture:** Show the major components and dependency direction.
20
+ - **Execution flow:** Walk one representative request, command, or event from
21
+ entry point to observable result.
22
+ - **Key code:** Highlight the small set of files, modules, and extension seams
23
+ that carry the design.
24
+ - **Validation:** Explain how to run the relevant checks and how failures
25
+ surface.
26
+
27
+ ## Floor
28
+
29
+ Compose one complete HTML engineer tour from the supplied `engineer-tour`
30
+ shell. Cover all five sections, include a high-level architecture view, and
31
+ provide enough concrete navigation that a reader can locate the described
32
+ code. Keep all required shell anchors, theme tokens, and core scripts intact.
33
+
34
+ ## Shell-composition license
35
+
36
+ The shell is a safe starting canvas, not a slot-filling ceiling. You may
37
+ recompose and enrich non-script markup, layout, diagrams, and navigation when
38
+ the codebase warrants it. Preserve the supplied core scripts exactly and do
39
+ not add scripts, event-handler attributes, or external active content.
40
+
41
+ ## Expansion license
42
+
43
+ Propose a supporting diagram when a subsystem or execution path needs a
44
+ dedicated visual. The diagram must answer a specific onboarding question that
45
+ the main tour cannot answer cleanly.
@@ -0,0 +1,41 @@
1
+ # Program recap author brief
2
+
3
+ ## Audience
4
+
5
+ Write for program sponsors, project leads, and teammates who need the whole
6
+ program at a glance before following a specific project.
7
+
8
+ ## Voice
9
+
10
+ Use plain language, active voice, and consistent program vocabulary. Lead with
11
+ the aggregate story, then support it with concrete project evidence. Prefer
12
+ maps, tables, and short lists to dense status prose. Distinguish confirmed
13
+ outcomes from forecasts and unresolved follow-up.
14
+
15
+ ## Narrative intent
16
+
17
+ - **Program overview:** Explain the shared objective, scope, current state, and
18
+ definition of done.
19
+ - **Wave map:** Show the ordering and dependency structure across waves.
20
+ - **Per-wave outcomes:** Summarize what each wave delivered, deferred, or
21
+ learned. Keep statuses comparable.
22
+ - **Convention evolution:** Record standards or working agreements that changed
23
+ as the program progressed and why.
24
+ - **Aggregate numbers:** Present totals and trends in an evidence table with
25
+ clear units and source context.
26
+ - **Follow-up ledger:** List remaining work with owner or owning group, status,
27
+ dependency, and next action when known.
28
+
29
+ ## Floor
30
+
31
+ Produce one self-contained narrative hub covering all six sections. Include a
32
+ program-level map or architecture diagram and at least one table that makes
33
+ cross-project comparison easy.
34
+
35
+ ## Expansion license
36
+
37
+ Propose a project page when a project's evidence, decisions, or remaining work
38
+ cannot be summarized accurately in the hub. Propose a supporting diagram when
39
+ the program's wave or dependency structure needs a dedicated visual. Every
40
+ project page must add project-specific substance and link cleanly back to the
41
+ program story.
@@ -0,0 +1,38 @@
1
+ # Project explainer author brief
2
+
3
+ ## Audience
4
+
5
+ Write for reviewers, implementers, and stakeholders who need to understand a
6
+ planned project before or during delivery.
7
+
8
+ ## Voice
9
+
10
+ Be concrete and decision-oriented. Explain technical terms in place. Separate
11
+ settled choices from assumptions and open risks. Use tables for alternatives,
12
+ phases, and verification coverage. Avoid repeating the same claim across
13
+ sections.
14
+
15
+ ## Narrative intent
16
+
17
+ - **Planned architecture:** Show the proposed components, boundaries, data
18
+ flow, and external dependencies. Include a high-level architecture diagram.
19
+ - **Decisions:** Explain each load-bearing choice, its rationale, rejected
20
+ alternatives, and consequences.
21
+ - **Risks:** State the failure mode, likelihood or trigger, impact, and
22
+ mitigation. Do not soften unknowns.
23
+ - **Phases:** Describe the delivery sequence, dependencies, and observable
24
+ completion conditions.
25
+ - **Validation approach:** Map important requirements and risks to specific
26
+ tests, checks, or review evidence.
27
+
28
+ ## Floor
29
+
30
+ Produce one narrative hub covering all five sections. It must stand alone,
31
+ contain at least one architecture diagram, and make phase and validation
32
+ coverage scannable.
33
+
34
+ ## Expansion license
35
+
36
+ Propose a supporting diagram when one subsystem, protocol, or execution flow
37
+ needs more visual detail than the hub can carry. Add no expansion solely for
38
+ decoration.
@@ -0,0 +1,38 @@
1
+ # Program project-page author brief
2
+
3
+ ## Audience
4
+
5
+ Write for a program reader who followed a link from the program recap and now
6
+ needs the evidence and decisions for one project.
7
+
8
+ ## Voice
9
+
10
+ Keep program terminology and statuses consistent with the parent hub. Be
11
+ specific about this project's scope, dependencies, and outcome. Avoid
12
+ repeating program-wide context unless it changes how this project should be
13
+ understood.
14
+
15
+ ## Section intent
16
+
17
+ Cover:
18
+
19
+ - the project's objective and place in the program;
20
+ - delivered scope and current status;
21
+ - architecture or dependency details unique to this project;
22
+ - load-bearing decisions and their consequences;
23
+ - validation evidence and known limits;
24
+ - remaining work, owner or owning group, and next action.
25
+
26
+ ## Floor
27
+
28
+ Produce a self-contained Markdown explainer with a clear route back to the
29
+ program story. Include at least one structured table for delivery or
30
+ validation evidence and enough source references for a reader to verify the
31
+ status.
32
+
33
+ ## Expansion license
34
+
35
+ Use inline diagrams, callouts, and evidence blocks when this project's
36
+ substance warrants them. Stay within the single-project boundary. If a detail
37
+ applies across the program, improve the parent recap instead of duplicating it
38
+ here.