Skip to content

Commit e5bd80b

Browse files
hyperpolymathclaude
andcommitted
feat(launcher+contractiles): add launcher config and improve all 6 Xfiles + contractile.just
Launcher: - .machine_readable/launcher/the-nash-equilibrium.launcher.a2ml: new per-standard compliant launcher config (launcher-standard.a2ml v0.2.0): design-phase docs server on port 4242, full mode set, soft-attach tools, exception documented - scripts/run.sh: dev docs server (Ruby primary / Deno / Python3 fallback) Mustfile.a2ml: - Add RSR-extended file checks: READINESS.md, AUDIT.adoc, EXPLAINME.adoc, ROADMAP.adoc, STATE.a2ml (with not-template-residue guard), contractile INDEX.a2ml + _base.ncl - Split spdx-headers into source (.idr/.zig) and ncl (.ncl) variants - Fix agpl-not-in-tooling (was `no-agpl`, wrong semantics for an AGPL project) - Add no-template-residue check (Justfile project var guard) - Exclude-dir=.git on all grep-based probes Trustfile.a2ml: - Fix license-content: was grep for PMPL|MPL|MIT|Apache|LGPL — missed AGPL; now checks specifically for 'AGPL' and SPDX-License-Identifier: AGPL-3.0-or-later - Add agpl-spdx-in-license and co-author-attribution checks - Rename and narrow no-believe-me to no-banned-proof-shortcuts (covers all patterns) - Add --exclude-dir=.git to all greps Bustfile.a2ml: - Full rewrite: old `// SPDX` + `Bust { }` domain-specific syntax → standard A2ML `# SPDX` + @abstract/@EnD format (matches all other Xfiles) - Replace generic submodule scenarios with Nash-specific failure modes: wrong-spdx-header, game-design-doc-overwritten, state-a2ml-template-residue, abi-breaking-change-without-version-bump, accidental-private-leak Dustfile.a2ml: - Add no-stale-scm-files (migration to A2ML complete 2026-04-12) - Add no-template-placeholder-tokens ({{PLACEHOLDER}} residue guard) - Add no-pmpl-in-source (AGPL project — PMPL drift advisory) - Add zig-cache/zig-out to tracked-artifacts check Adjustfile.a2ml: - Add motor-friendly-tokens and no-fiddly-small-parts (physical game) - Add complexity-level-documented, game-theory-glossary, rule-complexity-bounded (cognitive accessibility — a 6X game with game theory needs these) Intentfile.a2ml: - Strengthen rsr-scaffolding-complete probe (now checks launcher, INDEX.a2ml, _base.ncl, READINESS.md, not-template-residue in one probe) - Add create-dogfood-log intent (required for CRG grade C promotion) - Add abi-validation-complete intent (ABI stubs need validating against real types) - Add formal-game-mechanics-proofs horizon wish (Idris2 dependent types for Nash equilibrium existence, strategy-space completeness, termination proofs) contractile.just: - Full expansion: was a stub with 4 must + 3 trust recipes; now covers all Mustfile checks (must-check: 13 sub-recipes), all Trustfile checks (trust-verify: 8 sub-recipes), bust-check (3), dust-check (6), adjust-check (4), intend-status (human-readable table) + intend-probe-scaffolding Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 93af4f2 commit e5bd80b

9 files changed

Lines changed: 591 additions & 123 deletions

File tree

.machine_readable/contractiles/adjust/Adjustfile.a2ml

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,48 @@ docs/game-design/playtesting-plan.adoc.
7878
- probe: test -f docs/print/RULEBOOK.pdf || test -f docs/print/RULEBOOK.adoc
7979
- notes: AsciiDoc source is screen-reader-friendly; PDF export is a bonus.
8080

81-
## Digital Companion (Future)
81+
## Physical Game — Motor Accessibility
82+
83+
### motor-friendly-tokens
84+
- description: Player tokens sized and shaped for easy grip (≥ 30mm diameter, raised edges)
85+
- status: declared
86+
- probe: grep -q 'motor\|grip\|size' docs/game-design/board-design.adoc
87+
- notes: Relevant for players with reduced hand strength or dexterity. Record in board design doc.
88+
89+
### no-fiddly-small-parts
90+
- description: No game component smaller than 15mm in any dimension (choking-hazard and dexterity concern)
91+
- status: declared
92+
- probe: grep -q 'minimum.*size\|component.*size' docs/game-design/board-design.adoc
93+
- notes: Applies to all physical components: tokens, cards, markers.
94+
95+
## Cognitive Accessibility
96+
97+
### complexity-level-documented
98+
- description: Game complexity level documented in OVERVIEW.adoc (e.g. BGG weight estimate)
99+
- status: declared
100+
- probe: grep -qi 'complexity\|weight\|difficulty' docs/game-design/OVERVIEW.adoc
101+
- compliance: WCAG Cognitive accessibility principles
102+
- notes: Lets players know what they're signing up for. A 6X game with game theory is likely high complexity (BGG weight 3.5+).
103+
104+
### game-theory-glossary
105+
- description: Glossary of game theory terms included (Nash equilibrium, dominant strategy, payoff matrix, etc.)
106+
- status: declared
107+
- probe: grep -qi 'glossary\|Glossary' docs/game-design/OVERVIEW.adoc
108+
- notes: Critical for players unfamiliar with game theory. Lowers cognitive barrier to entry.
109+
110+
### rule-complexity-bounded
111+
- description: Core rules summarised on a single reference card (not more than 2 sides of A5)
112+
- status: declared
113+
- probe: test -f docs/game-design/QUICK-REF.adoc || grep -qi 'reference card\|quick ref' docs/game-design/OVERVIEW.adoc
114+
- notes: Complex game mechanics require an accessible at-a-glance summary. Teach the full game separately.
115+
116+
## Digital Companion (Future — Tauri 2.0+)
82117

83118
### keyboard-only-play
84119
- description: Digital companion fully operable via keyboard (no mouse required)
85120
- status: declared
86121
- compliance: WCAG 2.1 §2.1 (Keyboard Accessible)
87-
- notes: Relevant when Tauri 2.0+ companion is built. Track here now, implement then.
122+
- notes: Track now; implement when Tauri companion is built.
88123

89124
### screen-reader-compatible
90125
- description: Digital companion compatible with common screen readers (NVDA, VoiceOver)
Lines changed: 72 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,72 @@
1-
// Bustfile.a2ml — meta-repo bust contractile (breakage / rollback)
2-
// SPDX-License-Identifier: PMPL-1.0-or-later
3-
4-
Bust {
5-
name: "the-nash-equilibrium"
6-
version: "1.0.0"
7-
description: "Rollback procedures when something breaks in the meta-repo"
8-
9-
scenarios: {
10-
"bad-pointer-bump": "git revert <bump-commit> in meta-repo; child repo itself untouched"
11-
"submodule-pointer-points-at-missing-sha": "git submodule update --init --checkout <path> resets child to parent-recorded SHA; OR revert the stale bump commit"
12-
"submodule-orphan-after-local-only-commit": "roll back locally with git reset to before the stranded commit; fix remote situation before re-attempting"
13-
"accidental-private-repo-content-leaked-to-public-submodule": "hard-rotate the leaked secret immediately; git-filter-repo or BFG on the submodule's own history; public re-publication only after rotation complete"
14-
}
15-
16-
escalation-ladder: [
17-
"1. revert the meta-repo commit (reversible, low blast radius)",
18-
"2. reset the local submodule clone (affects only local workspace)",
19-
"3. force-push to main — PROHIBITED without explicit user confirmation (violates branch protection)",
20-
"4. registry-level (delete/archive the GitHub repo) — human-only action, never by AI"
21-
]
22-
23-
backup-points: [
24-
"GitHub serves as the durable backup for every submodule's own history",
25-
"Meta-repo history on origin/main is the durable backup for pointer state",
26-
"Local backup tags (backup/pre-<operation>-<date>) retained on risky rewrites"
27-
]
28-
}
1+
# SPDX-License-Identifier: AGPL-3.0-or-later
2+
# Bustfile — Error-handling / failure-recovery contract
3+
# Author: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
4+
#
5+
# Rewritten 2026-04-24: old `Bust { }` domain-specific format → standard A2ML
6+
# @abstract/@end format. Scenarios updated from generic submodule scenarios to
7+
# Nash-specific ones.
8+
9+
@abstract:
10+
Declared failure modes for The Nash Equilibrium. Every failure mode must
11+
have a recovery path. Hard gate on any failure mode with missing or broken
12+
recovery.
13+
@end
14+
15+
## License Integrity
16+
17+
### wrong-spdx-header
18+
- description: AGPL-3.0-or-later header accidentally replaced by PMPL-1.0-or-later in source files
19+
- class: rollback
20+
- injection-probe: "grep -rl 'SPDX-License-Identifier: PMPL-1.0-or-later' src/ .machine_readable/ 2>/dev/null | head -1 | grep -q ."
21+
- recovery-probe: "! grep -rl 'SPDX-License-Identifier: PMPL-1.0-or-later' src/ .machine_readable/ 2>/dev/null | head -1 | grep -q ."
22+
- expected-recovery-time-seconds: 60
23+
- status: declared
24+
- notes: This project is AGPL-3.0-or-later. PMPL is the template default and can drift in when files are copied from rsr-template-repo. Recovery — sed replace + commit.
25+
26+
## Game Design Integrity
27+
28+
### game-design-doc-overwritten
29+
- description: docs/game-design/OVERVIEW.adoc accidentally replaced with stub or empty file
30+
- class: rollback
31+
- injection-probe: "! grep -q '6X\\|eXchange\\|Nash' docs/game-design/OVERVIEW.adoc 2>/dev/null"
32+
- recovery-probe: "grep -q '6X\\|eXchange\\|Nash' docs/game-design/OVERVIEW.adoc 2>/dev/null"
33+
- expected-recovery-time-seconds: 120
34+
- status: declared
35+
- notes: Recovery — git checkout HEAD -- docs/game-design/OVERVIEW.adoc
36+
37+
### state-a2ml-template-residue
38+
- description: STATE.a2ml reverts to rsr-template-repo content after a bad merge
39+
- class: rollback
40+
- injection-probe: "grep -q 'project = .rsr-template-repo.' .machine_readable/6a2/STATE.a2ml 2>/dev/null"
41+
- recovery-probe: "! grep -q 'project = .rsr-template-repo.' .machine_readable/6a2/STATE.a2ml 2>/dev/null"
42+
- expected-recovery-time-seconds: 120
43+
- status: declared
44+
- notes: Recovery — restore from last good commit.
45+
46+
## ABI Integrity
47+
48+
### abi-breaking-change-without-version-bump
49+
- description: Idris2 ABI types changed without version bump recorded in META.a2ml
50+
- class: rollback
51+
- injection-probe: "git diff HEAD~1 -- src/interface/abi/ 2>/dev/null | grep -q '^-'"
52+
- recovery-probe: "git diff HEAD~1 -- .machine_readable/6a2/META.a2ml 2>/dev/null | grep -q 'version\\|ADR'"
53+
- expected-recovery-time-seconds: 300
54+
- status: declared
55+
- notes: Recovery — revert ABI change or add ADR entry + version bump in META.a2ml before merging.
56+
57+
## Secrets and Privacy
58+
59+
### accidental-private-leak
60+
- description: Private key, credential, or personal data accidentally committed
61+
- class: rollback
62+
- injection-probe: "git log --all --oneline -- '*.pem' '*.key' '.env' 'credentials.json' 2>/dev/null | head -1 | grep -q ."
63+
- recovery-probe: "! git log --all --oneline -- '*.pem' '*.key' '.env' 'credentials.json' 2>/dev/null | head -1 | grep -q ."
64+
- expected-recovery-time-seconds: 3600
65+
- status: declared
66+
- notes: |
67+
Escalation ladder (in order):
68+
1. Rotate the leaked secret IMMEDIATELY before anything else.
69+
2. git-filter-repo or BFG to purge from all history.
70+
3. Force-push to main only with explicit user confirmation.
71+
4. If a GitHub token: contact GitHub support.
72+
Public re-publication only after rotation confirmed complete.

.machine_readable/contractiles/dust/Dustfile.a2ml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
@abstract:
66
What should be cleaned up or removed from this repository.
7-
These are housekeeping items, not blockers.
7+
These are housekeeping items, not hard blockers.
88
@end
99

1010
## Stale Files
@@ -20,25 +20,43 @@ These are housekeeping items, not blockers.
2020
- severity: warning
2121

2222
### no-next-steps
23-
- description: NEXT_STEPS.md superseded by ROADMAP
23+
- description: NEXT_STEPS.md superseded by ROADMAP.adoc
2424
- run: test ! -f NEXT_STEPS.md
2525
- severity: info
2626

27+
### no-stale-scm-files
28+
- description: No legacy .scm files in .machine_readable/ (migration to A2ML complete 2026-04-12)
29+
- run: "! find .machine_readable/ -name '*.scm' 2>/dev/null | head -1 | grep -q ."
30+
- severity: warning
31+
32+
### no-template-placeholder-tokens
33+
- description: No {{PLACEHOLDER}} tokens left in A2ML or AsciiDoc files (template residue)
34+
- run: "! grep -rl '{{[A-Z_]*}}' --include='*.a2ml' --include='*.adoc' --exclude-dir='.git' . 2>/dev/null | head -1 | grep -q ."
35+
- severity: critical
36+
2737
## Build Artifacts
2838

2939
### no-tracked-artifacts
3040
- description: No build artifacts tracked in git
31-
- run: "! git ls-files lib/bs/ lib/ocaml/ target/release/ _build/ 2>/dev/null | head -1 | grep -q ."
41+
- run: "! git ls-files lib/bs/ lib/ocaml/ target/release/ _build/ zig-cache/ zig-out/ 2>/dev/null | head -1 | grep -q ."
3242
- severity: warning
3343

3444
## Format Duplicates
3545

3646
### no-duplicate-contributing
37-
- description: Only one CONTRIBUTING format (keep .md)
47+
- description: Only one CONTRIBUTING format (keep .md for GitHub health)
3848
- run: "! (test -f CONTRIBUTING.md && test -f CONTRIBUTING.adoc)"
3949
- severity: warning
4050

4151
### no-duplicate-readme
42-
- description: Only one README format
52+
- description: Only one README format (keep .adoc)
4353
- run: "! (test -f README.md && test -f README.adoc && [ $(wc -l < README.md) -gt 5 ])"
4454
- severity: warning
55+
56+
## AGPL Drift
57+
58+
### no-pmpl-in-source
59+
- description: No PMPL-1.0-or-later headers in source or machine-readable files (AGPL project — PMPL is drift)
60+
- run: "! grep -rl 'SPDX-License-Identifier: PMPL-1.0-or-later' src/ .machine_readable/ 2>/dev/null | head -1 | grep -q ."
61+
- severity: warning
62+
- notes: Reported in Bustfile as a rollback scenario; tracked here for advisory cleanup sweep.

.machine_readable/contractiles/intend/Intentfile.a2ml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ If you are unsure whether a change is in scope, check docs/game-design/DESIGN-DE
4242

4343
[[intents]]
4444
id = "rsr-scaffolding-complete"
45-
description = "RSR scaffolding complete: 6A2 files, contractiles (6 verbs), CI/CD, READINESS.md"
46-
probe = "test -f .machine_readable/contractiles/intend/Intentfile.a2ml && test -f READINESS.md && test -f .machine_readable/6a2/STATE.a2ml"
45+
description = "RSR scaffolding complete: all 6 contractile verbs with NCL runners + _base.ncl + INDEX.a2ml, 6A2 files, READINESS.md, EXPLAINME.adoc, AUDIT.adoc, launcher config"
46+
probe = "test -f .machine_readable/contractiles/INDEX.a2ml && test -f .machine_readable/contractiles/_base.ncl && test -f READINESS.md && test -f .machine_readable/6a2/STATE.a2ml && test -f .machine_readable/launcher/the-nash-equilibrium.launcher.a2ml && ! grep -q 'project = .rsr-template-repo.' .machine_readable/6a2/STATE.a2ml"
4747
status = "done"
48-
notes = "Completed 2026-04-24 (this session)"
48+
notes = "Completed 2026-04-24: launcher config, full 6-verb contractile set, READINESS.md, template residue cleared"
4949

5050
[[intents]]
5151
id = "game-design-docs-complete"
@@ -78,6 +78,20 @@ description = "Core game loop implemented (minimum: text-mode prototype two play
7878
probe = "test -d src/core && find src/core -name '*.gleam' -o -name '*.rs' | grep -q ."
7979
status = "declared"
8080

81+
[[intents]]
82+
id = "create-dogfood-log"
83+
description = "docs/practice/DOGFOOD-LOG.adoc created with first session entry — required for CRG grade C promotion"
84+
probe = "test -f docs/practice/DOGFOOD-LOG.adoc && grep -q 'Session' docs/practice/DOGFOOD-LOG.adoc"
85+
status = "declared"
86+
notes = "Grade C requires 4+ weeks of active dogfooding with no home-context failures. Start the log as soon as first playtest happens."
87+
88+
[[intents]]
89+
id = "abi-validation-complete"
90+
description = "ABI types in src/interface/abi/ validated against actual game entities once game engine design is settled"
91+
probe = "grep -q 'ADR-001.*validated\\|ABI.*validated' .machine_readable/6a2/META.a2ml 2>/dev/null"
92+
status = "declared"
93+
notes = "Current ABI stubs (Types.idr, Layout.idr, Foreign.idr) are scaffolding only. Must be validated against real game data model."
94+
8195
## Horizon Aspirations
8296

8397
[[wishes]]
@@ -103,3 +117,9 @@ id = "open-source-community"
103117
description = "External game designers and game-theory educators contributing improvements"
104118
horizon = "far"
105119
why = "Broader impact: game theory literacy through play"
120+
121+
[[wishes]]
122+
id = "formal-game-mechanics-proofs"
123+
description = "Core game invariants formally proven in Idris2 — e.g. Nash equilibrium existence, strategy-space completeness, no-infinite-loop termination"
124+
horizon = "far"
125+
why = "The ABI is already in Idris2; formal proofs of game properties would be a compelling demonstration of the Idris2/Zig/SPARK stack applied to game design. Dependent types can model equilibrium properties that are impossible to express in standard type systems."

.machine_readable/contractiles/must/Mustfile.a2ml

Lines changed: 59 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ What MUST be true about this repository's files and configuration.
77
These are hard requirements — CI fails if any check fails.
88
@end
99

10-
## File Presence
10+
## Required Files — RSR Core
1111

1212
### license-present
1313
- description: LICENSE file must exist
@@ -39,31 +39,78 @@ These are hard requirements — CI fails if any check fails.
3939
- run: test -f .editorconfig
4040
- severity: warning
4141

42-
## SPDX Compliance
42+
## Required Files — RSR Extended
43+
44+
### readiness-present
45+
- description: READINESS.md must exist (CRG grade tracking)
46+
- run: test -f READINESS.md
47+
- severity: critical
4348

44-
### spdx-headers
45-
- description: All source files must have SPDX-License-Identifier
46-
- run: "! find src/ -name '*.rs' -o -name '*.res' -o -name '*.idr' -o -name '*.zig' 2>/dev/null | head -20 | xargs grep -L 'SPDX-License-Identifier' 2>/dev/null | head -1 | grep -q ."
49+
### audit-present
50+
- description: AUDIT.adoc must exist (audit gate)
51+
- run: test -f AUDIT.adoc
52+
- severity: critical
53+
54+
### explainme-present
55+
- description: EXPLAINME.adoc must exist (RSR requirement)
56+
- run: test -f EXPLAINME.adoc
57+
- severity: critical
58+
59+
### roadmap-present
60+
- description: ROADMAP.adoc must exist
61+
- run: test -f ROADMAP.adoc
4762
- severity: warning
4863

49-
### no-agpl
50-
- description: No AGPL-3.0 references in dotfiles
51-
- run: "! grep -r 'AGPL-3.0' .gitignore .gitattributes .editorconfig 2>/dev/null | head -1 | grep -q ."
64+
### state-a2ml-present
65+
- description: .machine_readable/6a2/STATE.a2ml must exist and name this project (not rsr-template-repo)
66+
- run: "test -f .machine_readable/6a2/STATE.a2ml && ! grep -q 'project = .rsr-template-repo' .machine_readable/6a2/STATE.a2ml"
5267
- severity: critical
5368

69+
### contractile-index-present
70+
- description: .machine_readable/contractiles/INDEX.a2ml must exist
71+
- run: test -f .machine_readable/contractiles/INDEX.a2ml
72+
- severity: warning
73+
74+
### contractile-base-present
75+
- description: .machine_readable/contractiles/_base.ncl must exist
76+
- run: test -f .machine_readable/contractiles/_base.ncl
77+
- severity: warning
78+
79+
## SPDX Compliance
80+
81+
### spdx-headers-source
82+
- description: All Idris2 and Zig source files must have SPDX-License-Identifier
83+
- run: "! find src/ -name '*.idr' -o -name '*.zig' 2>/dev/null | head -20 | xargs grep -L 'SPDX-License-Identifier' 2>/dev/null | head -1 | grep -q ."
84+
- severity: warning
85+
86+
### spdx-headers-ncl
87+
- description: All Nickel runner files must have SPDX-License-Identifier
88+
- run: "! find .machine_readable/contractiles -name '*.ncl' 2>/dev/null | xargs grep -L 'SPDX-License-Identifier' 2>/dev/null | head -1 | grep -q ."
89+
- severity: warning
90+
91+
### agpl-not-in-tooling
92+
- description: SPDX headers must not appear in non-source tooling files (.gitignore, .editorconfig, .gitattributes)
93+
- run: "! grep -l 'SPDX-License-Identifier' .gitignore .gitattributes .editorconfig 2>/dev/null | head -1 | grep -q ."
94+
- severity: warning
95+
5496
## Dangerous Patterns
5597

5698
### no-believe-me
5799
- description: No believe_me in Idris2 code
58-
- run: "! grep -r 'believe_me' --include='*.idr' . 2>/dev/null | grep -v node_modules | head -1 | grep -q ."
100+
- run: "! grep -r 'believe_me' --include='*.idr' --exclude-dir='.git' . 2>/dev/null | head -1 | grep -q ."
59101
- severity: critical
60102

61103
### no-sorry
62104
- description: No sorry in Lean code
63-
- run: "! grep -r 'sorry' --include='*.lean' . 2>/dev/null | grep -v node_modules | head -1 | grep -q ."
105+
- run: "! grep -r 'sorry' --include='*.lean' --exclude-dir='.git' . 2>/dev/null | head -1 | grep -q ."
64106
- severity: critical
65107

66108
### no-admitted
67-
- description: No Admitted in Coq code
68-
- run: "! grep -r 'Admitted' --include='*.v' . 2>/dev/null | grep -v node_modules | head -1 | grep -q ."
109+
- description: No Admitted in Coq/Rocq code
110+
- run: "! grep -r 'Admitted' --include='*.v' --exclude-dir='.git' --exclude-dir='node_modules' . 2>/dev/null | head -1 | grep -q ."
111+
- severity: critical
112+
113+
### no-template-residue
114+
- description: No rsr-template-repo placeholder text in Justfile project vars
115+
- run: "! grep -q 'project := .rsr-template-repo.' Justfile 2>/dev/null"
69116
- severity: critical

0 commit comments

Comments
 (0)