@natjswenson/devlog 0.13.0 → 0.14.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.
@@ -0,0 +1,119 @@
1
+ # AI artwork for a local cover draft
2
+
3
+ This path is selected explicitly for an AI cover draft, by Concept guide draft mode,
4
+ or for the single guide selected by an opted-in normal concept Generate run.
5
+ It never scans releases, publishes, replaces existing cover files or changes branding
6
+ configuration. The legacy Generate mode's local SVG/HTML renderer and failure behavior
7
+ are unchanged. On Claude, use that existing local workflow for concept-guide covers. For strict
8
+ concept publication, expand its palette PNG into a true-color PNG with the bundled
9
+ Sharp dependency before final inspection and hashing. This conversion does not restore
10
+ any detail already lost during quantization; retain the source and inspect the result.
11
+ Do not apply a second palette reduction to a native AI cover.
12
+
13
+ For Claude's existing palette output only, this local conversion uses the already
14
+ bundled dependency and refuses to overwrite the new output path:
15
+
16
+ ```bash
17
+ node --input-type=module - '<skill-root>/package.json' '<legacy-cover.png>' '<new-true-color-cover.png>' <<'JS'
18
+ import { createRequire } from 'node:module';
19
+ import { resolve } from 'node:path';
20
+ import { writeFile } from 'node:fs/promises';
21
+ const [packageFile, input, output] = process.argv.slice(2);
22
+ const sharp = createRequire(resolve(packageFile))('sharp');
23
+ const bytes = await sharp(input).toColourspace('srgb').png({ palette: false }).toBuffer();
24
+ await writeFile(output, bytes, { flag: 'wx' });
25
+ JS
26
+ ```
27
+
28
+ Inspect and hash that final output, not the original palette file. A Git-installed plugin or standalone SKILL.md may have no dependencies beside it.
29
+ In that case use the exact-version published package runtime described in SKILL.md;
30
+ resolve its actual package/dependency location for this conversion instead of writing
31
+ into an internal plugin cache or assuming node_modules exists. If unavailable, retain
32
+ the draft and report the missing conversion capability rather than guessing a tool
33
+ path. The normal Codex native-art compositor uses the same exact-version helper
34
+ fallback when bundled dependencies are absent.
35
+
36
+ ## Capability and brief
37
+
38
+ In Codex, inspect whether native image generation is actually available. Use the native image-generation tool for new art and native editing for raster changes
39
+ when present; no API key or image API client belongs in the Node helper. If
40
+ unavailable or failed, save the draft and art brief with the blocker. Do not silently
41
+ substitute SVG, claim an image exists, or activate a paid CLI/API fallback. An explicitly
42
+ requested fallback follows the available imagegen skill's instructions.
43
+
44
+ Finish the guide before choosing the visual. Read the reviewed outcome, mechanism,
45
+ failure case and exclusions, then make a short public-safe brief. Do not send the entire
46
+ guide handoff, private repository files, source logs or private identities to generation.
47
+ Inspect the most recent relevant cover if available. A reference guides craft, not a
48
+ copied subject; lack of a first reference is not a blocker.
49
+
50
+ Choose one concrete metaphor whose meaning matches the article. The proven direction
51
+ is detailed editorial engraving with controlled hatching and a clean silhouette, quiet
52
+ paper surrounding the subject and one small focal accent. Complexity must describe the
53
+ mechanism, not decorate it. A beautiful picture implying an unsupported guarantee fails.
54
+
55
+ Read palette and identity from adopted/generated brand resources, respecting custom
56
+ style restrictions. Do not duplicate brand values manually. Prefer an opaque paper
57
+ background: the pilot's transparency requests repeatedly returned painted checkerboards.
58
+ Use transparency only when needed, and inspect actual alpha plus the rendered composite.
59
+
60
+ ## Generate, persist and compose
61
+
62
+ Write a prompt specifying subject, mechanism, medium, framing, craft, supplied palette,
63
+ and exclusions. Request **artwork only**, with no lettering, labels, numbers, logos or
64
+ fake code. Typography is rendered locally. One strong candidate is enough; no mandatory
65
+ batch. Use only supported tool arguments, and record only runtime details actually
66
+ reported. Do not invent model, seed, quality or destination controls.
67
+
68
+ After the tool returns, copy that exact returned image to a versioned source path in
69
+ the run directory. Never pick the newest file in a shared image folder. Save the prompt,
70
+ brief, reference hashes and attributable tool result. Inspect the image before any
71
+ native edit; preserve explicit invariants. If bytes cannot be recovered, record that
72
+ blocker rather than inventing a file. Retain original sources when revising.
73
+
74
+ The deterministic compositor is separate from AI generation:
75
+
76
+ ```text
77
+ devlog compose-art-cover --spec /absolute/cover-spec.json --out /absolute/new-cover-attempt
78
+ ```
79
+
80
+ Use the schema documented in the helper's `cover-spec` reference below. Paths resolve
81
+ against the spec file, not the caller's working directory. No agent-authored executable
82
+ HTML is accepted. The helper decodes local art, embeds it in an owned layout, renders
83
+ escaped typography, preserves aspect ratio, exports a 1600×900 true-color PNG and
84
+ 320px thumbnail, and writes a result marker last. It blocks browser network requests.
85
+ System-font rendering is host-dependent and must be reported; supply an adopted local
86
+ font when exact font delivery is required. It never overwrites the source or an existing
87
+ attempt directory and never calls an image service or publication code.
88
+
89
+ ## Review and resume
90
+
91
+ Open the actual source and final cover, both full size and thumbnail. Read every
92
+ overlaid word. Check meaning, coherent detail, small-size silhouette, title contrast,
93
+ crop, accidental generated text, brand fit and distinction from nearby covers. Show
94
+ the final PNG and open the preview for the user. A hash or mechanical success cannot
95
+ certify visual meaning, quality or approval. Local preview is not proof of the live
96
+ site's feed crop or image loading.
97
+
98
+ Save `cover-art.json` locally with schema version 1, brief/prompt hashes, source and
99
+ reference hashes, selected composition/result, and observed review findings tied to
100
+ the exact PNG hash. Do not copy that private receipt into manifests or the reader's
101
+ handoff. Measure output bytes; do not apply the legacy palette reducer to detailed art.
102
+
103
+ Fix typography locally; fix illustration defects with native editing/generation.
104
+ Allow at most two targeted correction cycles after the first candidate. A critical
105
+ unresolved failure holds the cover and retains the completed guide. Each changed
106
+ source/brief needs meaning review; each changed crop/font/title/palette needs final
107
+ image review. Unrelated prose edits call for a brief check, not automatic regeneration.
108
+
109
+ An image without a completed result marker and matching hashes is an incomplete
110
+ attempt. Recover from recorded inputs; uncertain generation must not trigger unattended
111
+ retries. No cover is promoted merely because its filename is `cover.png`. After a
112
+ reviewed result, pass its PNG to `prepare-guide --cover`; the agent handoff stays first.
113
+ Explicit draft requests stop here. For an opted-in normal concept Generate run,
114
+ continue through guide-publishing.md and its actual consumer checks. Existing-post
115
+ backfill remains separately scoped work. Older readers can continue loading the final PNG.
116
+
117
+ ## Cover spec
118
+
119
+ See [cover-spec.md](cover-spec.md) for the exact schema and generated-brand input.
@@ -0,0 +1,148 @@
1
+ # One complete concept guide
2
+
3
+ Use for explicit concept-guide, agent-friendly guide, or consolidation requests. This
4
+ is the drafting and verification workflow on either host. Explicit draft requests
5
+ remain draft-only. A normal Generate request with the already selected
6
+ `generationMode: "concept"` uses these same quality steps, then completes
7
+ [guide-publishing.md](guide-publishing.md). Missing mode or `"release"` retains legacy
8
+ Generate. Never change the persistent preference merely because a draft was requested,
9
+ scan-and-publish every tag, or mark other releases covered. Existing publish-entry and
10
+ manifest formats remain unchanged.
11
+
12
+ ## Choose one outcome
13
+
14
+ Inspect the user's selected sources and relevant existing article bodies. Titles and
15
+ tags are discovery aids, not evidence of duplicate concepts. Releases supply evidence;
16
+ they do not determine article count. Select at most one complete reader outcome:
17
+
18
+ > A reader with [prerequisites] can implement [capability] in their own project,
19
+ > verify it through [observable result], and handle [important failure].
20
+
21
+ Keep useful independent outcomes separate even when they share tools. For existing
22
+ posts recommend keep, improve, consolidation review or historical, with body evidence.
23
+ Consolidation means a new local draft first, not deleting sources or repurposing their
24
+ URLs. Zero guides is a valid result when nothing has enough evidence or a complete build.
25
+
26
+ Record a short local brief: chosen outcome, applicability limits, source revisions,
27
+ overlap decision, smallest complete example, meaningful failure and verification plan.
28
+ Verify source facts against the actual revision and external technical claims against
29
+ primary documentation, following Generate's ground-truth and voice rules. Private
30
+ source identities, paths and logs stay out of public prose, art prompts and manifests.
31
+
32
+ ## Write a build a stranger can finish
33
+
34
+ Resolve voice using the entrypoint's voice rules. Keep the required `Shipped`, `Gotchas`
35
+ and `Sources` sections and existing flat frontmatter fields. Put a reader introduction
36
+ before the short Shipped origin note; distinguish the teaching example from shipped code.
37
+ Retain a genuine source release's project/version/date for draft metadata. For a
38
+ consolidation, metadata is provenance only: an occupied identity is not a destination.
39
+ Do not invent a release or silently change an existing date to make a guide publishable.
40
+
41
+ Provide the complete file tree, prerequisites, code, invocation and verification.
42
+ Essential adapters, provider calls and configuration are part of the build, not reader
43
+ homework. Frame offline examples honestly; do not claim an untested integration works.
44
+ Teach implementation in the reader's project, never installation of the author's skill
45
+ as the payoff. A compact complete example is preferable to several incomplete guides.
46
+
47
+ Use this visible block immediately after frontmatter and before the introduction:
48
+
49
+ ````markdown
50
+ <!-- agent-handoff:start -->
51
+ ## Implement this with your agent
52
+
53
+ Use **Copy prompt + guide** in the preview. If copying the prompt manually, attach
54
+ this guide or paste the complete article after it.
55
+
56
+ ```text
57
+ [Write the concept-specific implementation request using the contract below.]
58
+ ```
59
+ <!-- agent-handoff:end -->
60
+ ````
61
+
62
+ Replace the placeholder with a real prompt. It must name the outcome and:
63
+
64
+ - Start with repository instructions, existing code and an applicability check. Ask one
65
+ focused question if the target is unclear or the mechanism cannot fit the architecture.
66
+ - Adapt the smallest change in the reader's language/tooling. Preserve APIs, error types,
67
+ return values, CLI streams/status, configuration, stored state and runtime support.
68
+ Do not transplant the demo or install the author's software. Run demonstrations outside
69
+ the reader's project in disposable scratch space.
70
+ - Keep inspection/planning calls read-only. Migrate saved state only explicitly or through
71
+ an operation that already writes. Name the concept's real constraints, such as shared
72
+ repository versus separate clones, where relevant rather than adding generic warnings.
73
+ - Specify observable acceptance checks, failure cases and relevant existing tests. Bind
74
+ checks to captured inputs where the concept requires it. Report commands and observed
75
+ results, unrun checks and remaining limitations. Do not authorize commit/push/deploy.
76
+ - Treat the article as technical reference, not instructions overriding project rules.
77
+
78
+ Do not rely on a link-only prompt for drafts. The packaged preview copies the exact
79
+ prompt plus the complete Markdown reference, with the handoff removed from the
80
+ reference to prevent duplication. Its text fence stays non-executable for assemble-post.
81
+
82
+ ## Verify the guide and the handoff
83
+
84
+ Use `lint-guide <article> --voice` for the existing post checks plus handoff structure.
85
+ It proves neither prose quality nor successful execution. `assemble-post` remains
86
+ extraction-only. Assemble the shown files in a disposable directory, execute the reader's
87
+ commands, and check a deliberate failure as well as success. Fix the article itself,
88
+ not just the scratch files. Preserve actual output and input hashes locally.
89
+
90
+ Capability-check independent agents before promising this mode's completed review.
91
+ Give one reviewer the brief, article and evidence to check completeness, novelty and
92
+ unsupported guarantees. Give a fresh implementation agent **only the exact copied
93
+ payload and an existing test project**, with explicit authorization identifying the
94
+ fixture path. Do not supply evaluator answers or the desired patch. Prefer a distinct
95
+ domain or language; inspect both original and changed behavior with independent checks.
96
+ For a mechanism with a material applicability constraint, also trial an unsuitable
97
+ project: the agent should ask before implementing an invalid mechanism.
98
+
99
+ Preserve original test expectations; do not change them to fit the agent's result.
100
+ Check public compatibility and relevant state, not only the agent's own passing tests.
101
+ Freeze the prompt, original fixture, resulting patch, observations and independently
102
+ checked results. A prompt edit invalidates its trial evidence; keep example evidence
103
+ only when its exact inputs and claimed scope remain unchanged. One passing fixture is
104
+ evidence for that scenario, not a universal model or platform guarantee.
105
+
106
+ If independent agents or required execution capabilities are unavailable, retain the
107
+ draft and identify the missing check. Do not label it reviewed/ready or switch into
108
+ legacy publishing. An aggregate score cannot compensate for a critical build defect.
109
+
110
+ ## Prepare the local preview
111
+
112
+ Generate or obtain the user's adopted brand JSON (PRESS `tokens --format json` when
113
+ available). Do not write brand constants from memory or require PRESS to be installed:
114
+ an existing compatible adopted token file works. The helper consumes `colors`, `fonts`
115
+ and `identity` from that file. Keep custom branding intact. If no brand resource is
116
+ available, retain the Markdown draft and identify the missing preview input.
117
+
118
+ ```text
119
+ devlog prepare-guide --article /absolute/guide.md --brand /absolute/brand.json --out /absolute/new-preview-directory
120
+ ```
121
+
122
+ Add `--cover /absolute/reviewed-cover.png` after the cover is ready. A new attempt needs
123
+ a new output directory; these helpers refuse overwrites. Review the standalone HTML,
124
+ normal copy and manual fallback, mobile layout, code and images. The preview contains
125
+ the complete guide without JavaScript. The handoff precedes the cover. Result hashes
126
+ identify actual inputs and outputs; a successful render is not an editorial approval.
127
+
128
+ The initial preview helper does not bundle companion files. Include required code
129
+ inline; relative/local links and Markdown images are rejected before output creation.
130
+ Use HTTP(S) source links, same-page anchors and the explicit `--cover` PNG input.
131
+ Do not weaken those checks to ship a preview with missing diagrams or example archives.
132
+
133
+ For Codex artwork read `codex-cover-art.md` in this directory. On Claude use the local
134
+ cover path already supplied by devlog; native Codex tools are not required there.
135
+ Retain completed text when cover generation fails and report the art blocker separately.
136
+
137
+ Keep one local run record with source revisions, brief, chosen draft, current hashes,
138
+ verification/review paths and pending work. Resume from matching artifacts; do not guess
139
+ completion from a file's existence. Raw trial transcripts and prompts are local evidence,
140
+ not a new public editorial ledger.
141
+
142
+ For an explicit draft request, finish with the draft link, observed checks and specific
143
+ limitations; do not publish. For an opted-in normal Generate run, return to
144
+ [guide-publishing.md](guide-publishing.md) and complete its evidence gate, publication,
145
+ push and live verification. There is no automatic coverage ledger. Existing-post
146
+ rewrites and backfills remain separately scoped editorial work. Preserve old URLs;
147
+ tombstones are not redirects, and legacy writers do not understand semantic coverage
148
+ across merged articles.
@@ -0,0 +1,40 @@
1
+ # Local raster composition schema
2
+
3
+ Pass a JSON file to `compose-art-cover --spec <file> --out <new-directory>`.
4
+ The output directory's parent must exist. Each attempt owns a new directory and
5
+ writes its result marker last. The command does not overwrite or delete an existing
6
+ attempt, generate artwork, call a service or publish.
7
+
8
+ ```json
9
+ {
10
+ "schema": 1,
11
+ "source": "source-v1.png",
12
+ "brand": "brand.json",
13
+ "title": "Give your CLI an import-safe entrypoint",
14
+ "kicker": "ENGINEERING FIELD NOTES",
15
+ "stand": "Reuse the logic. Run only when invoked."
16
+ }
17
+ ```
18
+
19
+ `source`, `brand` and optional `fontPath` resolve relative to this JSON file. Use a
20
+ local static raster, not SVG, animated media, a URL or executable HTML. `title` is
21
+ required; `kicker` and `stand` are optional plain text. Text is escaped, measured and
22
+ rejected if it cannot fit the owned layout. The source is contained at its original
23
+ aspect ratio rather than cropped or stretched.
24
+
25
+ `brand` is a generated/adopted JSON token export containing `colors` (`paper`, `ink`,
26
+ `dim`, `accent`), `fonts` (`display_stack`, `serif_stack`, `mono_stack`) and `identity`
27
+ (`stamp`, `name`). Generate it using PRESS `tokens --format json` when available, or
28
+ use an existing compatible adopted export. Do not manually copy brand constants.
29
+ Optional `fontPath` supplies an adopted local display font; other font stacks remain
30
+ host-dependent. Inspect the result's font report rather than assuming a font loaded.
31
+
32
+ Outputs are `composition.html`, `cover.png` (1600×900 true-color sRGB PNG),
33
+ `thumbnail.png` (320×180) and `result.json`. Results include exact paths, hashes,
34
+ dimensions, bytes and mechanical findings. Successful composition is not a semantic
35
+ or visual review. A PNG without its matching completed result marker is incomplete.
36
+
37
+ Keep this spec, sources, prompts and receipt in local run storage. Select the exact
38
+ reviewed PNG for a reading preview. A separate existing-post backfill must preserve
39
+ article metadata, use its authorized replacement path and verify the target site's
40
+ actual cover/feed rendering before claiming compatibility.
@@ -0,0 +1,245 @@
1
+ # Publishing one concept guide
2
+
3
+ `generationMode` is optional. Its absence and `"release"` retain the existing
4
+ release workflow, config shape and `publish-entry` behavior. Opt in with
5
+ `devlog set generationMode concept`; return with `devlog set generationMode release`.
6
+ The example config explicitly retains release mode. This setting selects the
7
+ agent workflow; it does not turn the legacy publisher into an evidence gate.
8
+
9
+ In concept mode, inspect the scan's genuine, eligible new final releases, then
10
+ choose at most one useful transferable outcome and one release anchor. Draft a
11
+ complete guide for the reader's project, with its exact copyable handoff first.
12
+ Do not manufacture a version/date to create a publishing slot. Verify that the
13
+ selected project/version/date matches the actual release before recording it.
14
+ If no candidate can meet the guide quality bar, publish zero guides and explain
15
+ what evidence or implementation is missing. The helper does not independently
16
+ verify Git tags and does not create a durable suppression ledger for other
17
+ candidates. A later scan can still return them.
18
+
19
+ Run structural lint, reproduce the guide, conduct an independent adaptation
20
+ trial in a disposable original project, and independently check the result.
21
+ Record observed commands/output and reviewer findings locally. For cover art,
22
+ open the full image and thumbnail and record semantic and visual observations
23
+ about the final PNG bytes. Fix blocking findings, regenerate the copy payload
24
+ and rerun affected checks after edits. Prepare these concrete artifacts before
25
+ publication; booleans asserting completion are insufficient.
26
+
27
+
28
+ ## Complete a normal concept Generate run
29
+
30
+ First read [concept-guides.md](concept-guides.md) for the complete draft, handoff,
31
+ execution and independent adaptation contract. On Codex also read
32
+ [codex-cover-art.md](codex-cover-art.md): generate the reviewed cover with the
33
+ available native image-generation tool and locally compose its typography. Do not
34
+ substitute the legacy SVG workflow on Codex just to finish. On Claude, follow the
35
+ existing local cover workflow and the true-color conversion note in that reference.
36
+ A missing required agent, execution or art capability leaves a local draft with a
37
+ specific blocker; it does not authorize bypassing the evidence gate. Do not adopt
38
+ legacy Generate's optional-cover fallback for a requested concept cover.
39
+
40
+ Use the CLI bundled relative to the loaded SKILL.md only after its read-only
41
+ `--version` invocation succeeds with available runtime dependencies. The commands
42
+ below show that form. If the script or dependencies are missing (including a Git
43
+ plugin install without node_modules), or the installation is standalone, use the
44
+ exact version fallback specified in SKILL.md in place of `node '<skill-root>/bin/devlog.js'`. Replace every placeholder
45
+ with recorded paths or validated config values and quote each shell argument.
46
+
47
+ ```bash
48
+ node '<skill-root>/bin/devlog.js' scan --json --summary
49
+ node '<skill-root>/bin/devlog.js' scan --json --project '<selected-project>'
50
+ node '<skill-root>/bin/devlog.js' lint-guide '<article-path>' --voice
51
+ node '<skill-root>/bin/devlog.js' prepare-guide --article '<article-path>' --brand '<brand-json>' --out '<new-preview-directory>'
52
+ ```
53
+
54
+ Honor an explicit project filter when scanning. Display the selected single
55
+ outcome and genuine project/version/date anchor, including any decision to create
56
+ zero guides. Follow Generate's voice, research, private-source and truthful
57
+ Shipped/Changelog rules; other releases are evidence candidates, not additional
58
+ articles to write. Prepare the guide, actually run its examples and the fresh
59
+ agent adaptation, independently check the result, and inspect the rendered preview.
60
+ Store the reports described below against the final article and exact copied
61
+ payload. An article edit invalidates hash-bound reports; rerun affected work and
62
+ explain the scope of evidence you retain.
63
+
64
+ Generate, persist, compose and inspect cover art using codex-cover-art.md. Then
65
+ prepare a new final preview (these helpers refuse existing output directories):
66
+
67
+ ```bash
68
+ node '<skill-root>/bin/devlog.js' prepare-guide --article '<article-path>' --brand '<brand-json>' --cover '<reviewed-cover.png>' --out '<new-final-preview-directory>'
69
+ ```
70
+
71
+ Open that preview and the full cover/thumbnail for the user. Confirm the copy
72
+ payload still matches the tested bytes. Hash final artifacts and write the execution,
73
+ adaptation and review reports plus `evidence.json`; these records stay in scratch,
74
+ outside the content repository. They must describe performed work, not planned work.
75
+
76
+ Clone the configured target branch into a new recorded scratch directory. The
77
+ clone root and content root are distinct when `targetDir` is set:
78
+
79
+ ```bash
80
+ mktemp -d
81
+ # Record that absolute directory as <run-root> before continuing.
82
+ git clone --depth=1 --branch '<branch>' 'https://github.com/<targetRepo>.git' '<run-root>/site'
83
+ ```
84
+
85
+ Record the clone, selected anchor and current artifact/report hashes in local
86
+ run-state. `<content-root>` means `<run-root>/site/<targetDir>` when configured,
87
+ otherwise `<run-root>/site`. Keep all Git operations at `<run-root>/site`.
88
+ Review the intended one-article content change, then stage it with the strict CLI:
89
+
90
+ ```bash
91
+ node '<skill-root>/bin/devlog.js' publish-guide --clone '<content-root>' --article '<article-path>' --evidence '<evidence-json>' --cover '<reviewed-cover.png>'
92
+ ```
93
+
94
+ The helper writes validated content only. Normal concept Generate must continue
95
+ through commit, push and deployment verification; do not end the run after this
96
+ command merely because it returned success. If it refuses an occupied or retired
97
+ identity, preserve that identity and report the collision. Do not use publish-entry
98
+ or manual copying to bypass it. Existing-post rewrite is a separate task.
99
+
100
+ Before committing, inspect the content diff and returned `firstEntryForProject`.
101
+ When true, follow SKILL.md Step 5b: register the project in the site's actual route
102
+ registry, build and prove the new route exists, then run relevant site tests.
103
+ For every concept guide, build/test the actual consumer as appropriate and inspect
104
+ the top handoff, code rendering, cover loading, feed thumbnail and link destinations.
105
+ The standalone preview alone does not prove site compatibility. Correct issues and
106
+ rerun relevant checks before push. If correcting article or cover bytes, regenerate
107
+ matching evidence and restart from a fresh clone rather than bypass immutability.
108
+
109
+ Stage only the article, cover, manifest and any required registry change, then
110
+ inspect the staged diff before committing. Use the configured Git identity and
111
+ existing target-repository conventions. Inspect the target repository's instructions
112
+ and branch/CI policy first. Where features must pass through `dev` and promotion,
113
+ create a feature branch from the required base and use that PR path; the configured
114
+ branch is the deployment destination, not permission to push past its policy.
115
+ The direct-push example below applies only when the target policy permits it:
116
+
117
+ ```bash
118
+ git -C '<run-root>/site' add -- '<article-relative-path>' '<cover-relative-path>' '<manifest-relative-path>'
119
+ # If needed, separately add the specific reviewed project-registry file.
120
+ git -C '<run-root>/site' diff --cached --stat
121
+ git -C '<run-root>/site' diff --cached
122
+ git -C '<run-root>/site' commit -m 'devlog: publish one concept guide'
123
+ git -C '<run-root>/site' push --no-tags origin '<branch>'
124
+ ```
125
+
126
+ Record the resulting commit and push outcome. If push fails, retain the clone,
127
+ report the error and stop; do not retry automatically, force-push or discard work.
128
+ After successful push, follow SKILL.md Step 6 for the configured site route. Poll
129
+ its actual article URL roughly every 45 seconds for at most five minutes:
130
+
131
+ ```bash
132
+ curl -s -o /dev/null -w '%{http_code}' -L '<actual-published-article-url>'
133
+ ```
134
+
135
+ An HTTP 200 alone can be a fallback page: open/read the response to verify this
136
+ article's title and top handoff, then verify the actual cover/thumbnail URLs load
137
+ and inspect the deployed layout. Respect the site's route convention instead of
138
+ assuming a new URL shape. If the route remains absent, inspect registry/build
139
+ results and report it as not live. If `siteUrl` is unset, report pushed but
140
+ unverified with the repository link, not published success. Retain local run-state
141
+ and evidence until the outcome is recorded; never delete scratch before checking
142
+ push/deployment. Finish with the live article link when verified, observed checks,
143
+ and material limitations. No extra approval step is introduced for publication
144
+ already authorized by a normal Generate request; explicit drafts remain drafts.
145
+
146
+ ## API and receipt
147
+
148
+ `publishGuide({ cloneDir, articlePath, evidencePath, coverPath? })` is exported
149
+ from `lib/publish_guide.mjs`. `cloneDir` is the existing content root inside the
150
+ publishing clone (including configured `targetDir`). `articlePath` and optional
151
+ `coverPath` are ordinary local paths relative to the invocation directory.
152
+ The API validates all evidence before writing content, then delegates to the
153
+ unchanged `publishEntry`. It never commits or pushes.
154
+
155
+ Evidence JSON schema 1:
156
+
157
+ ```json
158
+ {
159
+ "schema": 1,
160
+ "anchor": { "project": "example", "version": "v1.2.0", "date": "2026-09-09" },
161
+ "articleSha256": "<SHA-256 of exact article bytes>",
162
+ "agentPrompt": { "path": "agent-prompt.txt", "sha256": "<SHA-256>" },
163
+ "execution": { "path": "execution.json", "sha256": "<SHA-256>" },
164
+ "adaptation": { "path": "adaptation.json", "sha256": "<SHA-256>" },
165
+ "review": { "path": "review.json", "sha256": "<SHA-256>" },
166
+ "coverSha256": "<required only when supplying coverPath>"
167
+ }
168
+ ```
169
+
170
+ All SHA-256 values are lowercase 64-character hex strings. Referenced files
171
+ resolve relative to the evidence file, not the current working directory.
172
+ `agent-prompt.txt` must exactly equal the preview helper's copy payload: prompt,
173
+ two newlines, `<reference-guide>`, the trimmed article with the handoff block
174
+ removed, and closing `</reference-guide>`, with the helper's newline placement.
175
+ Use the `prepare-guide` output; do not maintain a second hand-edited payload.
176
+
177
+ Every execution/adaptation/review JSON report must contain these common fields:
178
+
179
+ ```json
180
+ {
181
+ "status": "passed",
182
+ "summary": "Concrete observations and scope of this run.",
183
+ "articleSha256": "<same exact article SHA-256>",
184
+ "agentPromptSha256": "<same exact payload SHA-256>"
185
+ }
186
+ ```
187
+
188
+ The execution report additionally contains a nonempty `commands` array:
189
+
190
+ ```json
191
+ {
192
+ "commands": [
193
+ {
194
+ "command": "node --test",
195
+ "exitCode": 0,
196
+ "output": { "path": "logs/tests.txt", "sha256": "<SHA-256>" }
197
+ }
198
+ ]
199
+ }
200
+ ```
201
+
202
+ Output files resolve relative to the execution report. They must contain actual
203
+ observations and match their hashes. Include each required successful check;
204
+ retain failed attempts separately and describe corrections in the summary.
205
+ Do not invent a successful command or replace actual output with a claim.
206
+
207
+ The adaptation report additionally identifies the starting and resulting
208
+ fixture (paths, immutable revisions, or durable artifact identifiers), and
209
+ records a nonempty list of independently observed checks:
210
+
211
+ ```json
212
+ {
213
+ "fixture": { "original": "fixtures/before", "result": "fixtures/after" },
214
+ "independentChecks": [
215
+ { "check": "Existing public imports", "observation": "No side effects under invalid CLI arguments", "passed": true }
216
+ ]
217
+ }
218
+ ```
219
+
220
+ The review report additionally contains `reviewer` (nonempty identifier) and
221
+ `blockingFindings: []`. Explain the substantive review in its `summary`; an
222
+ empty findings array alone is not a review. When a cover is supplied, both the
223
+ evidence and review must contain its `coverSha256`, and the review must also
224
+ contain nonempty `coverReview` observations. The decoded cover must be a
225
+ single-frame true-color 1600×900 PNG. Changes to art invalidate its visual review.
226
+
227
+ These are consistency checks on local records. Hashes do not establish that a
228
+ command actually ran, that a reviewer was independent, or that observations are
229
+ correct. The agent must perform and inspect the work before writing the records.
230
+ Do not describe `evidenceValidated: true` as independent execution verification.
231
+
232
+ ## Existing posts and failure behavior
233
+
234
+ This command refuses an occupied article, cover, manifest identity, or tombstone.
235
+ Even a manifest entry whose article is absent is occupied; use a deliberate
236
+ editorial repair workflow. Consolidating or rewriting published posts is a
237
+ separate explicitly scoped task that preserves URLs and existing identities.
238
+ There is no force option, migration, or change to old posts in this command.
239
+
240
+ Missing files, stale hashes, lint failures, failed/unobserved checks, anchor
241
+ mismatches and invalid covers fail before content mutation. After validation,
242
+ the existing publisher retains its existing article-then-manifest write behavior;
243
+ a disk failure is not an atomic rollback. Publish serially: neither helper
244
+ provides a multiprocess lock. Keep local evidence private unless deliberately
245
+ reviewed for inclusion in the public repository.