docs(architecture): ADR-0004 — engine anchor files as instructions spine#582
Merged
Conversation
…pine Captures the pattern that emerged from PR #577 (gender anchor) and PR #581 (wow anchor): - Every engine domain subfolder has exactly one anchor file -- its single clear entry point. - Two anchor flavours, picked by what the axis is: position-anchor (HOLD: Has/Orders/Loses/Drives) for axes the room *reads* statically on the persona process-anchor (IDLE: Initiated by/Direction/Lever/Echo) for axes that *happen* dynamically - The anchor enumerates its expressions in prose (with sibling links) so zip-deployed readers can navigate the axis without the README (engine READMEs are excluded from shipped zips by scripts/build_zips.py). - engine/stack/instructions.md is the registry: every anchor is declared there with an invocation mode -- "global" (every persona, e.g. language, stress, gender, wow) or "per-khai-type" (when a specific khai entity is in scope, e.g. group, org, adoption). Status: Proposed. The implementation work to update instructions.md with the full engines registry is left as Open follow-up #1 -- this ADR documents the contract; the registry update is a separate culture/engine PR. The pattern is architecture-relevant at the khai-spine level (a KAIHACKS concern), not Cultures-specific. Open follow-up #4 calls for mirroring the contract in KAIHACKS' ARCHITECTURE.md so other khai projects inherit the same engine-entry pattern. Files: docs/architecture/adrs/0004-engine-anchor-as-instructions-entry.md NEW docs/architecture/README.md +1 line (added ADR-0004 to the ADR index table) Refs: #577 (gender precedent), #581 (wow precedent), engine/org/ process_operate_org.md (existing process-anchor convention).
This was referenced May 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
New ADR capturing the architectural pattern that emerged from #577 (gender anchor) and #581 (wow anchor): every engine domain subfolder has one anchor file, which is the entry point
engine/stack/instructions.mdplugs into.Files
docs/architecture/adrs/0004-engine-anchor-as-instructions-entry.mddocs/architecture/README.mdThe decision in one block
One anchor per engine axis. Every
engine/<axis>/carries exactly one anchor file. The integration layerengine/stack/is exempt.Two flavours:
position_<axis>.mdprocess_<verb>_<axis>.mdAnchor enumerates expressions in prose (sibling links), so zip readers can navigate without the README (READMEs are excluded from shipped zips).
instructions.mdis the registry — every anchor declared with mode:Why this ADR
Until now the pattern was implicit. Three problems:
instructions.mddrift — only 5 of 7 engines were declaredscripts/build_zips.pyexcludes them)This ADR makes the contract explicit so future axes follow it by default.
What this PR does NOT do (Open follow-ups in the ADR)
instructions.mdwith the full engines registry — separateculture/enginePR (follow-up chore: switch PDF engine from pdflatex to weasyprint #1)## Anchorsections in the existing READMEs that already have entries but no formal## Anchorframing (adoption/language/stress/org/group) — separateculture/enginePR (follow-up fix: add NRW and Ruhrdeutsch culture files #2)engine/*/to assert exactly one anchor per axis — separate governance PR (follow-up chore: trigger PDF build on release #3)ARCHITECTURE.mdat the khai-spine level — separate KAIHACKS PR (follow-up feat: per-platform engine instructions (claude, copilot, gemini) #4)Relationship to KAIHACKS
The pattern is khai-spine-level architecture, not Cultures-specific. This ADR documents the Cultures-side concrete instance; the KAIHACKS-side abstract spec is follow-up #4. Other khai projects building on the same spine inherit the same engine-entry contract.
Verification
docs/architecture/README.md✅Refs: #577, #581
Generated by Claude Code