AI-assisted upgrade: core-slim
This page is a procedure an AI assistant can follow to upgrade a core-slim
project to a newer Keystone release. Point your assistant at this page and your
project directory and ask it to perform the upgrade. It is written to be
deterministic and safe — follow it step by step, and stop if anything is
ambiguous.
For the human-readable version of what's happening here, see Upgrading your project.
Guardrails
- Work on a new git branch; never commit to the default branch directly.
- Never modify the author's content —
manuscript/,assets/, and any files the author added. These are not part of the template. - Preserve the author's configured values. When a config file gains new options, add them; never overwrite a value the author already set.
- Build at the end to prove the upgrade works. If the build fails or any step is unclear, stop and report rather than guessing.
Inputs
- Current version — read
.keystone/sync.json(version,template). - Target template — the current
core-slimtemplate from its public repository (https://github.com/knight-owl-dev/keystone-template-core-slim). Each release advances the default branch, so it is the latest release; per-releasevX.Y.Ztags preserve past snapshots, but upgrade to the branch head, not a tag. Its own.keystone/sync.jsonnames the Keystone version it carries; confirm that's newer than the project's before proceeding. - Change map —
.keystone/checksums.txt, a SHA-256 manifest of every file as the current template shipped. - Upstream diff (optional) — if the project's
versionis tagged on the template repo,git diff v<version> origin/maingives the exact file-level delta this upgrade applies (a tree comparison — releases aren't a linear history). Versions released before tagging began have no tag.
Procedure
-
Branch. Create and switch to an upgrade branch (e.g.
upgrade-keystone). -
Classify files. From the project root:
sha256sum -c .keystone/checksums.txt # Linux shasum -a 256 -c .keystone/checksums.txt # macOSOK— unchanged since assembly; belongs to the template.FAILED— the author changed it; handle it in step 4.- Files not listed are author-added content; leave them alone.
-
Re-sync template-owned files. Copy every
OKfile from the target template over the project's copy, wholesale. This includes.keystone/itself (sosync.jsonandchecksums.txtnow describe the new release),.docker/(so the pinned image tag updates with it), theMakefile, theREADME, and any new files the release adds. After this step, every non-authored file matches the target template. -
Reconcile the author's files (the
FAILEDones). They split in two:pandoc.yaml,project.conf(and.docker/docker-compose.yamlif the author changed it) — the template owns their structure. Start from the target template's version, which carries any new keys in their correct positions with their inline doc comments, and port the author's existing values into it. New options arrive documented; the author's choices are preserved; keep any keys the author added. The new template's compose file already points at the new release's image tag — keep it.shortcuts.yaml,publish.txt,fonts/fonts-registry.yaml— the author's own content. Keep them as-is; do not overwrite the author's entries.
-
Verify and build.
make verify # optional — confirm the new image signature make all # prove the project builds against the new release
Report
Summarize for the author: the version moved from → to, which files were reconciled and what new options arrived, the build result, and anything needing their attention. Leave the changes on the branch for review.