Skip to content

Commit eea9cea

Browse files
claudehyperpolymath
authored andcommitted
governance: enforce coordination-repo boundary so bots stop dumping project code
nextgen-typing is the coordination monorepo (no compiler/application code), but its bot-facing steering still carried RSR-template instructions to put ABI/FFI code in src/interface/ and to "add proofs here". The repo's identity files said one thing while the files agents actually read said another, so agents kept landing typing-project content here instead of in the constituent repos. Prevention (correct boundary at every surface agents actually read): - add root AGENTS.md + CLAUDE.md and root .clinerules/.cursorrules/.windsurfrules carrying the placement boundary + a routing table (none existed before) - add .machine_readable/bot_directives/placement.a2ml as the authoritative, machine-readable routing table; reference it from 0-AI-MANIFEST.a2ml, AI-CONVENTIONS.adoc, AGENTIC.a2ml and bot_directives/README.adoc - strip the src/interface ABI/FFI instructions from copilot-instructions.md, the .machine_readable/ai/ rule files and AI-CONVENTIONS.adoc - rewrite the template-residue AI.a2ml (it still called the repo rsr-template-repo) Enforcement: - add scripts/check-coordination-boundary.sh + the coordination-boundary.yml workflow + a pre-commit hook: fail when project code or a non-allowlisted proof appears in the coordination repo Resite / cleanup: - remove the RSR ABI/TP proof scaffold from verification/proofs/ (those obligations belong in typed-wasm/typell); keep the genuinely cross-project echo-types proof (EchoTyping + Verification aggregator) - reconcile PROOF-NEEDS.md, PROOF-STATUS.md and verification/proofs/README.adoc to coordination reality; record the change in STATE.a2ml Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X2UKV63H4584CQ66qdgxZy
1 parent 8535183 commit eea9cea

33 files changed

Lines changed: 638 additions & 797 deletions

.clinerules

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
# Cline rules for nextgen-typing. Full rules: AGENTS.md / CLAUDE.md.
3+
4+
# ⛔ COORDINATION REPO — NOT A CODE REPO.
5+
# nextgen-typing documents and connects the type-theory pipeline
6+
# (katagoria → typell → typed-wasm → PanLL). It does NOT hold compiler,
7+
# kernel, language, or single-project code — including single-project proofs,
8+
# benchmarks, and tests.
9+
#
10+
# Before creating ANY implementation file or single-project proof here: STOP.
11+
# Put it in the owning repo. Routing table:
12+
# .machine_readable/bot_directives/placement.a2ml (authoritative)
13+
# AGENTS.md (human-readable)
14+
# CI enforces this: scripts/check-coordination-boundary.sh
15+
#
16+
# Only these belong here: coordination/architecture docs, .machine_readable/
17+
# state, estate governance/CI scaffold, and CROSS-project proofs in
18+
# verification/proofs/ that import >=2 constituent repos (e.g. agda/EchoTyping.agda).
19+
20+
# Then: read 0-AI-MANIFEST.a2ml, then .machine_readable/6a2/STATE.a2ml.
21+
# Licence MPL-2.0 (never AGPL) + SPDX header on every file.
22+
# Banned langs: TypeScript->ReScript, npm/Node->Deno, Go->Rust, Python->Julia/Rust.
23+
# Containers: Podman + Containerfile. Build via just.
24+
# No believe_me / assert_total / postulate / sorry / Admitted / unsafeCoerce.

.cursorrules

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
# Cursor rules for nextgen-typing. Full rules: AGENTS.md / CLAUDE.md.
3+
4+
# ⛔ COORDINATION REPO — NOT A CODE REPO.
5+
# nextgen-typing documents and connects the type-theory pipeline
6+
# (katagoria → typell → typed-wasm → PanLL). It does NOT hold compiler,
7+
# kernel, language, or single-project code — including single-project proofs,
8+
# benchmarks, and tests.
9+
#
10+
# Before creating ANY implementation file or single-project proof here: STOP.
11+
# Put it in the owning repo. Routing table:
12+
# .machine_readable/bot_directives/placement.a2ml (authoritative)
13+
# AGENTS.md (human-readable)
14+
# CI enforces this: scripts/check-coordination-boundary.sh
15+
#
16+
# Only these belong here: coordination/architecture docs, .machine_readable/
17+
# state, estate governance/CI scaffold, and CROSS-project proofs in
18+
# verification/proofs/ that import >=2 constituent repos (e.g. agda/EchoTyping.agda).
19+
20+
# Then: read 0-AI-MANIFEST.a2ml, then .machine_readable/6a2/STATE.a2ml.
21+
# Licence MPL-2.0 (never AGPL) + SPDX header on every file.
22+
# Banned langs: TypeScript->ReScript, npm/Node->Deno, Go->Rust, Python->Julia/Rust.
23+
# Containers: Podman + Containerfile. Build via just.
24+
# No believe_me / assert_total / postulate / sorry / Admitted / unsafeCoerce.

.github/copilot-instructions.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
77

88
# Copilot Instructions
99

10+
## ⛔ Before Writing Anything — Placement Boundary
11+
12+
`nextgen-typing` is a **coordination repo**, not a code repo. Do NOT add
13+
compiler/application code or single-project proofs here. If content implements
14+
or proves something about ONE project, put it in that project's repo. Routing
15+
table: `.machine_readable/bot_directives/placement.a2ml` (enforced in CI by
16+
`scripts/check-coordination-boundary.sh`). Full guidance: `AGENTS.md`.
17+
18+
Only these belong here: coordination/architecture docs, `.machine_readable/`
19+
state, estate governance/CI scaffold, and CROSS-project proofs (importing ≥2
20+
constituent repos) under `verification/proofs/`.
21+
1022
## Before Writing Code
1123

1224
- Read `0-AI-MANIFEST.a2ml` in the repo root for canonical file locations.
@@ -47,12 +59,6 @@ Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
4759
- Name the file `Containerfile`, never `Dockerfile`.
4860
- Base image: `cgr.dev/chainguard/wolfi-base:latest`.
4961

50-
## ABI/FFI
51-
52-
- ABI definitions in Idris2 (`src/interface/abi/`).
53-
- FFI implementations in Zig (`src/interface/ffi/`).
54-
- Generated C headers in `src/interface/generated/`.
55-
5662
## State Files
5763

5864
Never create these in the repo root:
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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+
# Coordination-boundary guard: nextgen-typing must stay docs + machine-readable
5+
# state + estate scaffold + CROSS-project proofs only — no compiler/application
6+
# code and no single-project proofs. Routing table:
7+
# .machine_readable/bot_directives/placement.a2ml
8+
name: Coordination Boundary
9+
10+
on:
11+
push:
12+
branches: [main, master, develop]
13+
pull_request:
14+
branches: [main, master, develop]
15+
16+
permissions:
17+
contents: read
18+
19+
concurrency:
20+
group: coord-boundary-${{ github.ref }}
21+
cancel-in-progress: true
22+
23+
jobs:
24+
boundary:
25+
runs-on: ubuntu-latest
26+
timeout-minutes: 5
27+
permissions:
28+
contents: read
29+
steps:
30+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
31+
- name: Enforce coordination boundary
32+
run: bash scripts/check-coordination-boundary.sh

.machine_readable/6a2/AGENTIC.a2ml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ can-create-files = true
2222
# - Never use banned languages (TypeScript, Python, Go, etc.)
2323
# - Never place state files in repository root (must be in .machine_readable/)
2424
# - Never use AGPL license (use MPL-2.0)
25+
# - Never add compiler/application code or single-project proofs to this
26+
# coordination repo; route them to the owning repo per
27+
# .machine_readable/bot_directives/placement.a2ml (CI-enforced by
28+
# scripts/check-coordination-boundary.sh).
2529

2630
[maintenance-integrity]
2731
fail-closed = true

.machine_readable/6a2/STATE.a2ml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[metadata]
77
project = "nextgen-typing"
88
version = "0.1.0"
9-
last-updated = "2026-06-15"
9+
last-updated = "2026-06-19"
1010
status = "active"
1111

1212
[project-context]
@@ -24,6 +24,11 @@ Does NOT contain compiler code.
2424
# scaffold was removed (it was a strict subset of the canonical proofs in
2525
# verification/proofs/); "no compiler code" is affirmed. Completion still reflects
2626
# early state: the verification proofs in verification/proofs/ are not yet built in CI.
27+
# 2026-06-19: the "7 mandated proofs" were RSR template residue (ABI/TP proofs
28+
# owned by typed-wasm/typell); PROOF-NEEDS/PROOF-STATUS reconciled to track only
29+
# cross-project proofs. The coordination boundary is now CI-enforced
30+
# (scripts/check-coordination-boundary.sh) and documented in AGENTS.md/CLAUDE.md
31+
# + .machine_readable/bot_directives/placement.a2ml.
2732
completion-percentage = 10
2833

2934
[position]
@@ -84,6 +89,7 @@ events = [
8489
{ date = "2026-05-30", kind = "ci", detail = "CI reusable-wrapper rework (2026-05-26..2026-05-30): hypatia-scan, scorecard, secret-scanner, rust-ci, and mirror workflows converted to thin wrappers of standards reusables; reusable SHA pins repinned to live merge-commit SHAs (commit 4a848fd)." },
8590
{ date = "2026-06-09", kind = "docs", detail = "README.adoc: TypeFix Zero (TF0) calibration-calculus section added (commits f11cc29..ec3496f)." },
8691
{ date = "2026-06-12", kind = "governance", detail = "Estate standardization merged (governance docs, bot_directives, self-validating, flat contractiles, flake.nix removal); codeql cron monthly; checkpoint layer: dual STATE reconciled (root pointer-ized to 6a2), bot_directives trio added, contractiles populated with repo-true obligations." },
92+
{ date = "2026-06-19", kind = "governance", detail = "Coordination-boundary remediation: added AGENTS.md/CLAUDE.md + root .clinerules/.cursorrules/.windsurfrules, placement.a2ml routing directive, and a coordination-boundary CI guard + pre-commit hook; stripped the RSR src/interface ABI/FFI instructions from copilot-instructions/cline/cursor/windsurf/AI-CONVENTIONS and rewrote the template-residue AI.a2ml; removed the RSR ABI/TP proof scaffold from verification/proofs/ (owned by typed-wasm/typell), keeping the cross-project echo-types proof; reconciled PROOF-NEEDS/PROOF-STATUS." },
8793
]
8894

8995
[ecosystem]

.machine_readable/ai/.clinerules

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@
3434
# File: Containerfile (never Dockerfile).
3535
# Base: cgr.dev/chainguard/wolfi-base:latest or cgr.dev/chainguard/static:latest.
3636

37-
# ABI/FFI
38-
# ABI: Idris2 with dependent types (src/interface/abi/).
39-
# FFI: Zig with C ABI (src/interface/ffi/).
40-
# Headers: src/interface/generated/.
37+
# COORDINATION REPO — NO PROJECT CODE
38+
# nextgen-typing is coordination-only: docs, .machine_readable/ state, estate
39+
# scaffold, and CROSS-project proofs (>=2 constituent repos) in
40+
# verification/proofs/. Do NOT add compiler/app code or single-project proofs.
41+
# Route per .machine_readable/bot_directives/placement.a2ml (CI-enforced).
4142

4243
# BUILD: Use just (justfile) for all tasks.
4344
# STYLE: Descriptive names. Document all files. SPDX headers everywhere.

.machine_readable/ai/.cursorrules

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@
3333
# File: Containerfile (never Dockerfile)
3434
# Base: cgr.dev/chainguard/wolfi-base:latest
3535

36-
# ABI/FFI STANDARD
37-
# ABI definitions: Idris2 with dependent types (src/interface/abi/)
38-
# FFI implementation: Zig with C ABI (src/interface/ffi/)
39-
# Generated C headers: src/interface/generated/
36+
# COORDINATION REPO — NO PROJECT CODE
37+
# nextgen-typing is coordination-only: docs, .machine_readable/ state, estate
38+
# scaffold, and CROSS-project proofs (>=2 constituent repos) in
39+
# verification/proofs/. Do NOT add compiler/app code or single-project proofs.
40+
# Route per .machine_readable/bot_directives/placement.a2ml (CI-enforced).
4041

4142
# BUILD SYSTEM
4243
# Use just (justfile) for all build, test, lint, and format tasks.

.machine_readable/ai/.windsurfrules

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@
3434
# File: Containerfile (never Dockerfile).
3535
# Base: cgr.dev/chainguard/wolfi-base:latest or cgr.dev/chainguard/static:latest.
3636

37-
# ABI/FFI
38-
# ABI: Idris2 with dependent types (src/interface/abi/).
39-
# FFI: Zig with C ABI (src/interface/ffi/).
40-
# Headers: src/interface/generated/.
37+
# COORDINATION REPO — NO PROJECT CODE
38+
# nextgen-typing is coordination-only: docs, .machine_readable/ state, estate
39+
# scaffold, and CROSS-project proofs (>=2 constituent repos) in
40+
# verification/proofs/. Do NOT add compiler/app code or single-project proofs.
41+
# Route per .machine_readable/bot_directives/placement.a2ml (CI-enforced).
4142

4243
# BUILD: Use just (justfile) for all tasks.
4344
# STYLE: Descriptive names. Document all files. SPDX headers everywhere.

.machine_readable/ai/AI.a2ml

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
# SPDX-License-Identifier: MPL-2.0
2+
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
23

3-
# AI Assistant Instructions
4+
# AI Assistant Instructions — nextgen-typing
45

5-
## Repository Focus
6-
- `rsr-template-repo` is treated as a Rhodium Standard Repository; obey the Rhodium policies and keep `.machine_readable/` authoritative.
7-
- All machine-readable content lives under `.machine_readable/` — state files (a2ml), bot directives, and contractiles.
8-
- Prefer to keep generated files out of source control, and regenerate them with the documented commands before committing.
6+
## ⛔ Placement Boundary (read first)
7+
8+
nextgen-typing is the **coordination repo** for the type-theory pipeline
9+
(katagoria → typell → typed-wasm → PanLL). It is NOT a code repo: no compiler,
10+
kernel, language, or single-project code — and no single-project proofs,
11+
benchmarks, or tests.
12+
13+
If content implements or proves something about ONE project, it belongs in that
14+
project's repo. Use the routing table:
15+
- `.machine_readable/bot_directives/placement.a2ml` (authoritative, CI-enforced)
16+
- `AGENTS.md` / `CLAUDE.md` (human-readable)
17+
18+
Only these belong here: coordination/architecture docs, `.machine_readable/`
19+
state, estate governance/CI scaffold, and CROSS-project proofs (importing ≥2
20+
constituent repos) under `verification/proofs/`.
921

1022
## Workflow
11-
1. Inspect `.machine_readable/6a2/STATE.a2ml` for blockers and next actions.
12-
2. Respect any constraints listed inside `.machine_readable/AGENTIC.a2ml` when tooling changes are requested.
13-
3. After finishing edits, update STATE with your outcomes and commit with a concise, imperative message.
14-
15-
## Delivery Promises
16-
- Mention in summaries whether STATE, `.machine_readable/contractiles/`, or `.machine_readable/bot_directives/` changed.
17-
- Keep this file in sync with the repository's status; update it if the governance changes.
18-
19-
[foundational-integrations]
20-
# These tools form the architectural floor for all hyperpolymath repos.
21-
# Integrate them incrementally as the project matures.
22-
23-
proven = "Formally verified safety library — replace raw string/JSON/URL/crypto ops"
24-
panic-attacker = "Static analysis — run `just assail` before every commit"
25-
feedback-o-tron = "Autonomous bug filing — auto-report upstream dependency failures"
26-
verisimdb = "Cross-repo analytics — emit scan results and build metrics"
27-
vexometer = "Irritation surface analysis — measure friction in CLI/UI tools"
28-
hypatia = "Neurosymbolic CI/CD — safety-triangle routing for automated fixes"
29-
boj-server = "MCP gateway — all external service integrations route through BoJ"
30-
31-
[floor-raise-checklist]
32-
step-1 = "Ensure 0-AI-MANIFEST.a2ml exists at repo root"
33-
step-2 = "Ensure Mustfile.a2ml + Trustfile.a2ml + Dustfile.a2ml in .machine_readable/contractiles/"
34-
step-3 = "Add `assail` recipe to Justfile and wire into pre-commit hook"
35-
step-4 = "Add proven integration reference in .machine_readable/integrations/"
36-
step-5 = "Add verisimdb feed configuration"
37-
step-6 = "Add feedback-o-tron integration for upstream reporting"
38-
step-7 = "Add vexometer hooks for friction measurement (CLI/UI repos)"
23+
24+
1. Read `0-AI-MANIFEST.a2ml`, then `.machine_readable/6a2/STATE.a2ml` for
25+
blockers and next actions.
26+
2. Respect `.machine_readable/6a2/AGENTIC.a2ml` constraints.
27+
3. Before creating any file, confirm placement against `placement.a2ml`.
28+
4. After edits, update STATE with outcomes; commit with a concise message.
29+
30+
## Conventions
31+
32+
- Licence MPL-2.0 + SPDX header on every file (never AGPL).
33+
- `.a2ml` state files live in `.machine_readable/` only, never the repo root.
34+
- Banned languages: TypeScript→ReScript, npm/Node→Deno, Go→Rust, Python→Julia/Rust.
35+
- Containers: Podman + `Containerfile`. Build/test via `just`.
36+
- No unsound escape hatches: believe_me, assert_total, postulate, sorry,
37+
Admitted, unsafeCoerce, Obj.magic.
38+
- Full rules: `docs/practice/AI-CONVENTIONS.adoc`.

0 commit comments

Comments
 (0)