|
| 1 | +# SPDX-License-Identifier: MPL-2.0 |
| 2 | +# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk> |
| 3 | +# |
| 4 | +# PLAYBOOK.a2ml — Operational playbook |
| 5 | +# Runbooks, incident response, deployment procedures. |
| 6 | + |
| 7 | +[metadata] |
| 8 | +version = "0.1.0" |
| 9 | +last-updated = "2026-04-11" |
| 10 | + |
| 11 | +[deployment] |
| 12 | +# method = "gitops" # gitops | manual | ci-triggered |
| 13 | +# target = "container" # container | binary | library | wasm |
| 14 | + |
| 15 | +[incident-response] |
| 16 | +# 1. Check .machine_readable/STATE.a2ml for current status |
| 17 | +# 2. Review recent commits and CI results |
| 18 | +# 3. Run `just validate` to check compliance |
| 19 | +# 4. Run `just security` to audit for vulnerabilities |
| 20 | + |
| 21 | +[release-process] |
| 22 | +# 1. Update version in STATE.a2ml, META.a2ml, Justfile |
| 23 | +# 2. Run `just release-preflight` (validate + quality + security + maint-hard-pass) |
| 24 | +# 3. Optional local permission hardening: `just perms-snapshot && just perms-lock` |
| 25 | +# 4. Tag and push |
| 26 | +# 5. Restore local permissions if needed: `just perms-restore` |
| 27 | +# 6. Run `just container-push` if applicable |
| 28 | + |
| 29 | +[maintenance-operations] |
| 30 | +# Baseline audit: |
| 31 | +# just maint-audit |
| 32 | +# Hard release gate: |
| 33 | +# just maint-hard-pass |
| 34 | +# Permission audit: |
| 35 | +# just perms-audit |
| 36 | + |
| 37 | +[rsr-repo-skeleton] |
| 38 | +# Canonical organisation of any RSR-derived repository. |
| 39 | +# Used by tooling, human onboarding, and the scheduled downstream sweep agent. |
| 40 | +# The 5-PR cleanup pattern (below) brings a non-conforming repository into |
| 41 | +# compliance with this skeleton. |
| 42 | +# |
| 43 | +# This section is the single source of truth for "what does an RSR repo look |
| 44 | +# like?". Other docs (TOPOLOGY, AUDIT, etc.) describe the repo at hand; |
| 45 | +# this describes the canonical shape that all RSR repos share. |
| 46 | + |
| 47 | +skeleton-version = "1.0" |
| 48 | +last-updated = "2026-04-30" |
| 49 | +authority-allowlist = ".machine_readable/root-allow.txt" |
| 50 | +enforcement-workflow = ".github/workflows/estate-rules.yml" |
| 51 | + |
| 52 | +# === Required at root === |
| 53 | +# README.adoc High-level pitch (project entry point) |
| 54 | +# AUDIT.adoc Local gate summary (release-readiness) |
| 55 | +# EXPLAINME.adoc Developer deep-dive (architecture & invariants) |
| 56 | +# 0-AI-MANIFEST.a2ml AI agent work-allocation policy |
| 57 | +# LICENSE Repo license (root-bound by convention) |
| 58 | +# CHANGELOG.md One of the recognised .md exceptions (see below) |
| 59 | +# Justfile Task runner — thin, imports per-section files from build/just/ |
| 60 | +# coordination.k9 Repo-local session binding |
| 61 | + |
| 62 | +# === Required directories === |
| 63 | +# .github/ CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md, workflows/ |
| 64 | +# .machine_readable/ AI manifests (0.1-AI-MANIFEST.a2ml), 6a2/ checkpoints, |
| 65 | +# contractiles/, configs/, anchors/, policies/, scripts/, svc/ |
| 66 | +# build/ contractile.just, flake.nix, guix.scm, Containerfile, |
| 67 | +# just/*.just (Justfile section imports) |
| 68 | +# docs/ onboarding/, status/, architecture/, governance/ (all .adoc) |
| 69 | +# session/ dispatch.sh, custom-checks.k9, local-hooks.sh |
| 70 | +# src/ Project source (Idris2 ABI under abi/, Zig FFI under ffi/) |
| 71 | +# tests/, benches/, examples/, features/, scripts/, verification/, container/ |
| 72 | + |
| 73 | +# === Documentation format rule === |
| 74 | +# `.adoc` is the default for all general docs (TOPOLOGY, READINESS, ROADMAP, |
| 75 | +# TEST-NEEDS, PROOF-NEEDS, PROOF-STATUS, llm-warmup-*, etc.). |
| 76 | +# |
| 77 | +# `.md` is reserved ONLY for files GitHub's community-health rules |
| 78 | +# special-case by name: |
| 79 | +# CONTRIBUTING.md CODE_OF_CONDUCT.md SECURITY.md CHANGELOG.md |
| 80 | +# |
| 81 | +# Enforcement: `scripts/check-no-md-in-docs.sh` (fails if any *.md under docs/). |
| 82 | + |
| 83 | +# === Banned: ziguage === |
| 84 | +# V (vlang.io) is banned estate-wide. Replaced by `zig-unified-api-adapter` |
| 85 | +# (16 endpoints + transaction-based firewall gating). Do not introduce |
| 86 | +# zig code, scaffolders, or references. Note that Coq theorem files use |
| 87 | +# the same `.v` extension and are unaffected — the rule looks at content |
| 88 | +# patterns, not the extension. |
| 89 | +# |
| 90 | +# Enforcement: `scripts/check-no-vlang.sh`. |
| 91 | + |
| 92 | +# === Justfile structure (post-split) === |
| 93 | +# The root Justfile is thin — it holds `set` directives, project metadata |
| 94 | +# variables, and the `default`/`help`/`info` recipes. Each major section |
| 95 | +# lives in its own file under build/just/ and is brought in via `import?`. |
| 96 | +# |
| 97 | +# Imported sections (in the canonical split): |
| 98 | +# build/just/init.just INIT recipe (template bootstrap) |
| 99 | +# build/just/assess.just self-assess + verify (OpenSSF compliance) |
| 100 | +# build/just/validate.just validate-rsr/state/ai-install + aggregate |
| 101 | +# build/just/proofs.just proof-check-{all,idris2,lean4,agda,coq}, |
| 102 | +# proof-scan-dangerous, proof-status |
| 103 | +# build/just/groove.just Groove protocol setup (after zig removed) |
| 104 | +# |
| 105 | +# Daily-use recipes (BUILD, TEST, LINT, RUN, DEPS, DOCS, CONTAINER, CI, |
| 106 | +# SECURITY, STATE, GUIX/NIX, MATRIX, VERSION CONTROL, UTILITIES, SESSION) |
| 107 | +# stay in the root Justfile where users expect to find them. |
| 108 | + |
| 109 | +# === 5-PR cleanup pattern === |
| 110 | +# Apply these branches (in order) to bring a non-conforming downstream repo |
| 111 | +# into compliance with this skeleton: |
| 112 | +# |
| 113 | +# 1. chore/root-cleanup Relocate root sprawl per root-allow.txt; add |
| 114 | +# scripts/check-root-shape.sh; remove stub |
| 115 | +# health files shadowed by .github/ versions. |
| 116 | +# 2. chore/remove-zig Purge zig remnants (gen-v-connector recipe, |
| 117 | +# "V-TRIPLE" section header, "V-triple |
| 118 | +# connectors" comment in groove.a2ml). |
| 119 | +# 3. chore/md-to-adoc Port general docs in docs/ from .md to .adoc; |
| 120 | +# update validate-template.sh to accept .adoc |
| 121 | +# fallbacks. |
| 122 | +# 4. chore/estate-rules-ci Add scripts/check-no-md-in-docs.sh + check-no- |
| 123 | +# vlang.sh + .github/workflows/estate-rules.yml. |
| 124 | +# 5. chore/<repo>-hygiene Repo-specific drift cleanup (case collisions, |
| 125 | +# template-derivation drift in titles, etc.). |
| 126 | + |
| 127 | +# === Reference scripts === |
| 128 | +# scripts/check-root-shape.sh Root allowlist validator |
| 129 | +# scripts/check-no-md-in-docs.sh AsciiDoc-by-default validator |
| 130 | +# scripts/check-no-vlang.sh zig ban validator |
| 131 | +# scripts/validate-template.sh Aggregate RSR compliance (workflows, SPDX, etc.) |
| 132 | + |
| 133 | +# === Reference memory entries (for AI agents) === |
| 134 | +# feedback_adoc_default_md_for_githealth AsciiDoc-by-default rule |
| 135 | +# feedback_v_lang_banned zig ban |
| 136 | +# project_zig_unified_api Replacement for v-triple/zig |
| 137 | +# feedback_gh_workflow_scope OAuth scope for workflow files |
0 commit comments