Files changed: - CHANGES.md - INSTALL.md - VERSION - docs/explanation/configuration-tiers.md - docs/how-to/README.md - docs/how-to/back-up-to-a-synced-folder.md - docs/reference/commands/README.md - docs/reference/commands/git.md - docs/reference/commands/instance-health.md - docs/reference/configuration.md - instructions/publish-cycle.md - instructions/setup-instance.md - tools/CONTRACT.md - tools/README.md - tools/chemenu/backup.py - tools/chemenu/cli.py - tools/chemenu/cli_contract.py - tools/chemenu/commands/backup_cmd.py - tools/chemenu/commands/doctor.py - tools/chemenu/commands/git_publish.py - tools/chemenu/config_shapes.py - tools/chemenu/reference_doc.py - tools/chemenu/tests/conftest.py - tools/chemenu/tests/test_backup.py - tools/chemenu/tests/test_config_shapes.py Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SnAJ7Z3CpVD3PRbN73QtU2
2.8 KiB
type, name, description
| type | name | description |
|---|---|---|
| types/instruction.md | publish-cycle | Close out a change to the wiki - rebuild the provenance index and catalog, append the audit entry, and publish. |
Close out a change
Run after any change to pages under kb/, in this order. The order matters: the catalog is
built from page frontmatter, and the audit entry should describe a tree that is already
consistent.
Steps
-
Rebuild the provenance index - after any change to a source page or an inline citation:
tools/wikitool sources rebuild-index -
Rebuild the catalog - after any page was added, removed, renamed, or had its summary/date changed:
tools/wikitool index rebuildThis regenerates
kb/index.mdand everykb/**/INDEX.md. Never edit those by hand. -
Append the audit entry - one per operation:
tools/wikitool log append --op ingest|query|lint|create|update|delete|rename|move \ --title "<what>" --body "<outcome>"This is the one non-idempotent step. If a previous run's outcome is uncertain, read the tail of
kb/log.mdbefore repeating it. -
Publish:
tools/wikitool publish --message "<op>: <description>"
Decision points
- Ten or more files changed?
publishexits 42. Show the user its output and stop; see gates.md. - Remote unreachable or not configured?
publishends with exit 1 before it commits: nothing is staged, committed or pushed, and the message names the remote. Ask the user whether to commit locally with--no-push, and run that only on their answer. Never push by hand (AGENTS.md invariant 5): the nextpublishthat reaches the remote sends the local commit together with whatever is new. A local-only instance, which has no remote at all, passes--no-pushon every call (setup-instance.md, step 3). - A
WARNthat the machine-data backup failed? The commit and the push stand, andpublishexited 0. Show the user the line - it names the reason, a synced folder that is not there or not writable, say. Do not runpublishagain: it would have nothing to push and back nothing up. Once the user has fixed the cause,tools/wikitool backup runrepeats the backup (docs/how-to/back-up-to-a-synced-folder.md). - Query or lint pass? Neither auto-publishes. Run
publishonly if asked to. - Nothing under
kb/changed? Skip steps 1 and 2; a change totools/orinstructions/does not affect the catalog.
Scope
This is the close-out for wiki content. Changes to skills also need
tools/wikitool instructions sync (see bootstrap.md), and changes to the CLI
or a contract need tools/wikitool docs verify.