Skip to content

governance: enforce coordination-repo boundary so bots stop dumping project code#63

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/nice-sagan-meezoh
Jun 19, 2026
Merged

governance: enforce coordination-repo boundary so bots stop dumping project code#63
hyperpolymath merged 1 commit into
mainfrom
claude/nice-sagan-meezoh

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Problem

nextgen-typing is the coordination monorepo — its README.adoc / 0-AI-MANIFEST.a2ml say it "does NOT contain compiler code … claims are made in constituent repos, never in this coordination layer." But it was scaffolded from rsr-template-repo (a code-project template), and the bot-facing steering was never updated to match the identity. The files agents actually read still told them to write code here:

  • .github/copilot-instructions.md, the .machine_readable/ai/ rule files, and the "authoritative" docs/practice/AI-CONVENTIONS.adoc all instructed: "ABI definitions in src/interface/abi/, FFI in src/interface/ffi/" — pointing at directories deleted in OQ-001.
  • .machine_readable/ai/AI.a2ml was pure template residue (still called the repo rsr-template-repo).
  • verification/proofs/README.adoc invited "Adding New Proofs" with no cross-project gate; AGENTIC.a2ml granted can-edit-source/can-create-files with no routing constraint.
  • There was no root CLAUDE.md, AGENTS.md, or root .clinerules/.cursorrules/.windsurfrules — so the correct "no code here" rule (buried in 0-AI-MANIFEST.a2ml / .machine_readable/) was invisible to most tools, while the visible surfaces misdirected.

Net effect: agents kept landing typing-project content here (e.g. #33 integrated a 164-line echo-types Agda proof) instead of in the dedicated repos (kategoria, typell, typed-wasm, echo-types, choreographic-types, typefix-zero, …).

What this PR does

Prevention — correct boundary at every surface agents read

  • New root AGENTS.md + CLAUDE.md, root .clinerules / .cursorrules / .windsurfrules — each carries a STOP gate + routing table.
  • New .machine_readable/bot_directives/placement.a2ml — the authoritative, machine-readable routing table (what this repo accepts vs. what to route where). Referenced from 0-AI-MANIFEST.a2ml, AI-CONVENTIONS.adoc, AGENTIC.a2ml, bot_directives/README.adoc.
  • Stripped the src/interface ABI/FFI instructions from copilot-instructions.md, the .machine_readable/ai/ rule files, and AI-CONVENTIONS.adoc; rewrote the residue AI.a2ml.

Enforcement (the hard stop)

  • New scripts/check-coordination-boundary.sh + .github/workflows/coordination-boundary.yml + a pre-commit hook. Fails when a code scaffold (src/, Cargo.toml, …), implementation source, or a non-allowlisted proof appears. Verified locally: flags the residue pre-cleanup, passes after.

Resite / cleanup

  • Removed the RSR ABI/TP proof scaffold from verification/proofs/ (idris2/ABI/*, Types.idr, generic Properties.agda / ApiTypes.lean / TypeSafety.v / StateMachine.tla) — those obligations belong in typed-wasm / typell.
  • Kept the genuinely cross-project agda/EchoTyping.agda (+ Verification.agda aggregator), which imports echo-types and relates it to the AffineScript/typed-wasm pipeline — the one documented "allowed here" example.
  • Reconciled PROOF-NEEDS.md, PROOF-STATUS.md, verification/proofs/README.adoc; recorded in STATE.a2ml.

How the routing works

The boundary is defined once in placement.a2ml and mirrored in AGENTS.md/CLAUDE.md. Rule of thumb baked into every file: if it implements or proves something about one project, it does not go here — open an issue instead of committing on spec.

Notes / follow-ups (out of scope here)

  • The canonical relocation targets for the removed ABI proofs (typed-wasm) and any echo-types library work (echo-types) live in repos outside this session's write scope — those are not modified by this PR.
  • This repo still carries broader rsr-template-repo residue (e.g. Justfile project := "rsr-template-repo", docs/developer/ABI-FFI-README.adoc, several src/interface mentions in governance docs) tracked under OQ-002. Left untouched to keep this PR focused on the bot-dumping problem; the same template should ideally be fixed upstream so coordination repos don't re-inherit code-repo steering.

🤖 Generated with Claude Code

https://claude.ai/code/session_01X2UKV63H4584CQ66qdgxZy


Generated by Claude Code

…roject 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
@hyperpolymath hyperpolymath marked this pull request as ready for review June 19, 2026 22:38
@hyperpolymath hyperpolymath merged commit eea9cea into main Jun 19, 2026
21 of 22 checks passed
@hyperpolymath hyperpolymath deleted the claude/nice-sagan-meezoh branch June 19, 2026 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants