Provide a docs-toolbox build script for consuming projects - #59
Conversation
Consuming projects had no guided way to run the vendored validators, generators, and documentation render in the reproducible docs-toolbox image: the bootstrap skill and the "Consuming This Toolkit From a Project" guidance never mentioned a build script, the example project shipped none, and the toolkit's own root build.sh is wired to the toolkit itself. - Add templates/scripts/build.sh: a generic, parameterizable docs-toolbox task runner (validate, generate, adapters, check-adapters, build, all, clean) that a project copies to its root. Container-by-default with a DOCS_TOOLBOX_LOCAL host fallback; SOURCE_DOC/image are overridable. It wraps only the docs toolchain and leaves application builds on their own tooling. - Reference it from skills/bootstrap-project/SKILL.md (generator-support list, Reference-Don't-Copy copied-tooling list, and the complete-bootstrap list) and from the README "Consuming This Toolkit From a Project" section (copied vs. referenced, and a wiring step), mirroring the existing build-agent-adapters.js guidance: copy the templates/scripts/ version, not the toolkit's own root build.sh. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
dieterbaier
left a comment
There was a problem hiding this comment.
Die Richtung passt: Der generische Runner schließt eine echte Lücke zwischen vendortem Toolkit und reproduzierbarer Ausführung im Projekt. Die Container-/Local-Trennung, explizite Image-Version und Trennung vom Application-Build sind sauber. Ich habe einen Absicherungspunkt kommentiert: Der neue ausführbare Templatepfad wird aktuell weder im Beispiel noch durch einen gezielten Test ausgeführt. Für ein Bootstrap-Artefakt mit Shell-, Docker- und Argumentweiterleitungslogik sollte wenigstens Syntax und Local-Mode-Verhalten in CI geprüft werden.
| @@ -0,0 +1,201 @@ | |||
| #!/usr/bin/env sh | |||
There was a problem hiding this comment.
Der neue Runner ist produktive Bootstrap-Logik, wird in diesem PR aber offenbar nur dokumentiert und nicht selbst getestet. Bitte mindestens sh -n templates/scripts/build.sh sowie einen kleinen Test des Local-Mode-Dispatchs (validate/generate/check-adapters, gern mit Stub-Kommandos in PATH) in CI aufnehmen. Noch besser wäre, das example/ mit einer wörtlichen Kopie des Templates auszustatten und dort check/build auszuführen. Sonst kann der Templatepfad unbemerkt brechen, während die toolkit-eigene build.sh weiterhin grün bleibt.
The generic templates/scripts/build.sh was only documented, not exercised. Add test/build-sh-template.test.mjs: assert `sh -n` validates the script, and that local-mode dispatch invokes the expected vendored tool for validate, generate, and check-adapters using stub ruby/node on PATH. Wire it into the test-js task (and README) so `./build.sh test` and CI run it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Addressed in f3f6366: added |
dieterbaier
left a comment
There was a problem hiding this comment.
Nachprüfung der Änderung: Der neue Test deckt den zuvor fehlenden Templatepfad sinnvoll ab (sh -n plus Local-Mode-Dispatch für validate, generate und check-adapters). Die aktuelle CI ist grün. Keine weiteren Findings.
Problem
Consuming projects have no guided way to run the vendored architecture
validators, generators, and documentation render inside the reproducible
docs-toolboximage:skills/bootstrap-project/SKILL.mdmentions neitherbuild.shnordocs-toolbox.example/consuming project ships no build script.build.shonly for the toolkit itself; the "ConsumingThis Toolkit From a Project" section lists schemas/templates/scripts and the
agent-adapter generator to copy, but no build runner.
So each project reinvents how to invoke the toolchain (and often runs it on an
unpinned host toolchain), which undercuts the reproducibility guarantee.
Change
templates/scripts/build.sh— a generic, parameterizable docs-toolboxtask runner a project copies to its root. Tasks:
validate,generate,adapters,check-adapters,build,all,clean. Container-by-default(Docker/Podman) against the pinned
docs-toolboximage, with aDOCS_TOOLBOX_LOCAL=1host fallback;SOURCE_DOCandDOCS_TOOLBOX_IMAGEare overridable. It wraps only the docs toolchain and explicitly leaves
application builds (JDK/Gradle, npm, …) on their own tooling.
Reference-Don't-Copy copied-tooling list, and the complete-bootstrap list.
a new wiring step.
The guidance mirrors the existing
build-agent-adapters.jspattern: copy theparameterizable
templates/scripts/version, not the toolkit's own rootbuild.sh, which is wired to the toolkit itself.Notes / possible follow-ups
bootstrap-projectflow copy it automatically, nor add it toexample/.Happy to extend to either if preferred.
and a hand-written copy of exactly this script to wire validation + a GitHub
Pages publish.
🤖 Generated with Claude Code