Skip to content

Commit c030966

Browse files
hyperpolymathclaude
andcommitted
feat(contractiles+mcp): complete trident framework + fix Gemini drift
Contractile framework additions (from 2026-04-23 session, clean content): - Add _base.ncl: shared pedigree_schema, probe_schema, run_defaults for all verb runners. Eliminates copy-paste; runners merge with '&' operator. - Add INDEX.a2ml: machine-readable verb registry for CLI + CI discovery. - Add ANCHOR.a2ml: project anchor with SSG config and ecosystem parents. - Add must.ncl, trust.ncl, dust.ncl: runners for the three verbs that previously lacked them. All import _base.ncl; correct semantics. - Add adjust.k9.ncl, intend.k9.ncl: K9 trident components. intend.k9.ncl carries sessional drift detection hooks and failure-mode defenses. - Add adjust.manifest.a2ml, intend.manifest.a2ml: trident coherence manifests with sha256 pin schema. 6a2 repairs (reverting Gemini content-pollution from 2026-04-23): - META.a2ml: restore ADR-002 (hermeneutic branching), ADR-003 (Rust rationale), ADR-005 (dual-use label); keep Gemini-added ADR-006 (typed-wasm). Restore maintenance-axes + axis-2/3 audit rules. - NEUROSYM.a2ml: keep improvements (rulesets, confidence-threshold, no-unsafe-idris/rust rules replacing no-unsafe-transmute). - PLAYBOOK.a2ml: keep reformatted content (equivalent, slightly clearer). - Reverted: AGENTIC.a2ml (lost fail-closed/require-evidence constraints), Intentfile.a2ml (replaced with template placeholders), Adjustfile.a2ml (replaced with Burble accessibility content), intend.ncl / bust.ncl / adjust.ncl (wrong semantics / wrong project). 007-mcp FFI: - oo7_mcp_ffi.zig: implement coordDeregister (was a stub). Now POSTs coord_report_outcome before clearing peer_id/token. Best-effort fire-and-forget; peer watchdog handles lost calls. STATE.a2ml left uncommitted pending user decision on v2 format. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 4979bb3 commit c030966

14 files changed

Lines changed: 1188 additions & 60 deletions

File tree

.machine_readable/6a2/ANCHOR.a2ml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# ⚓ ANCHOR: 007-lang
2+
# Canonical authority and project recalibration trigger for 007-lang.
3+
# Template from: https://github.com/hyperpolymath/standards
4+
5+
id: "org.hyperpolymath.007-lang"
6+
version: "1.0.0"
7+
clade: "language"
8+
status: "active"
9+
10+
# SSG Configuration (Unified boj-server build)
11+
ssg:
12+
engine: "casket"
13+
output_dir: "public"
14+
boj_trigger: true
15+
cartridge: "ssg-mcp"
16+
17+
# Relationships
18+
parents:
19+
- "org.hyperpolymath.standards"
20+
- "org.hyperpolymath.boj-server"
21+
- "org.hyperpolymath.nextgen-languages"

.machine_readable/6a2/META.a2ml

Lines changed: 62 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,58 +4,97 @@
44
# META.a2ml — Project meta-level information
55
# Architecture decisions, design rationale, governance.
66

7-
[metadata]
7+
# ── Project Identity ───────────────────────────────────────────────────────
8+
[project-meta]
89
version = "1.0.0"
9-
last-updated = "2026-03-24"
10-
11-
[project-info]
12-
type = "language" # library | binary | monorepo | service | website | language
10+
name = "007-lang"
11+
type = "language"
1312
languages = ["rust"]
1413
license = "PMPL-1.0-or-later"
1514
author = "Jonathan D.A. Jewell (hyperpolymath)"
1615

17-
[architecture-decisions]
18-
adrs = [
19-
{ id = "ADR-001", title = "Harvard architecture — data and control are separate grammars", status = "accepted", date = "2026-03-20" },
20-
{ id = "ADR-002", title = "Hermeneutic branching — branch is the only nondeterminism", status = "accepted", date = "2026-03-20" },
21-
{ id = "ADR-003", title = "Rust compiler — correctness and safety", status = "accepted", date = "2026-03-20" },
22-
{ id = "ADR-004", title = "BEAM primary target — actor model native support", status = "accepted", date = "2026-03-20" },
23-
{ id = "ADR-005", title = "Dual-use label — anti-scrape measure for private repo", status = "accepted", date = "2026-03-20" },
24-
]
16+
# ── Architecture Decisions ─────────────────────────────────────────────────
17+
[project-meta.architecture-decisions]
18+
19+
[project-meta.architecture-decisions.adr-001]
20+
status = "accepted"
21+
date = "2026-03-20"
22+
context = "Agent injection is the primary vulnerability in multi-agent systems."
23+
decision = "Harvard architecture — data and control are separate grammars."
24+
consequences = "Agent injection is a parse error, not a runtime check. Structurally impossible to inject control into data."
25+
26+
[project-meta.architecture-decisions.adr-002]
27+
status = "accepted"
28+
date = "2026-03-20"
29+
context = "Agent behaviour must be auditable and reproducible."
30+
decision = "Hermeneutic branching — branch is the only nondeterminism."
31+
consequences = "Every branch decision generates a trace record explaining why. Behaviour is auditable and reproducible."
32+
33+
[project-meta.architecture-decisions.adr-003]
34+
status = "accepted"
35+
date = "2026-03-20"
36+
context = "Correctness and memory safety are non-negotiable for a meta-language."
37+
decision = "Rust compiler — correctness and safety."
38+
consequences = "No GC pauses, ownership model enforced at compile time, SPARK integration path via Idris2-ABI + Zig-FFI."
2539

26-
[development-practices]
40+
[project-meta.architecture-decisions.adr-004]
41+
status = "accepted"
42+
date = "2026-03-20"
43+
context = "Need a robust concurrent runtime for lightweight agents."
44+
decision = "BEAM primary target via Elixir/OTP codegen."
45+
consequences = "Native support for actor model, isolation, and fault tolerance."
46+
47+
[project-meta.architecture-decisions.adr-005]
48+
status = "accepted"
49+
date = "2026-03-20"
50+
context = "007 is a private repo; naming must not be a scraping surface."
51+
decision = "Dual-use label — anti-scrape measure for private repo."
52+
consequences = "The name '007' is intentionally ambiguous; the codebase is not discoverable by naive scanning."
53+
54+
[project-meta.architecture-decisions.adr-006]
55+
status = "accepted"
56+
date = "2026-04-13"
57+
context = "Verification needs a stable binary target."
58+
decision = "Adopt typed-wasm as the only verified codegen target."
59+
consequences = "007 IR is lifted onto typed-wasm surface sugar for formal verification."
60+
61+
# ── Development Practices ──────────────────────────────────────────────────
62+
[project-meta.development-practices]
2763
build-tool = "just"
2864
container-runtime = "podman"
2965
ci-platform = "github-actions"
3066
package-manager = "cargo"
3167
development-model = "claude-only"
68+
code-style = "rust-stable"
69+
security = "harvard-separation"
70+
testing = "canonical-proof-suite"
71+
versioning = "semver"
72+
documentation = "asciidoc"
73+
branching = "trunk-based"
3274

33-
[maintenance-axes]
75+
# ── Maintenance Axes ───────────────────────────────────────────────────────
76+
[project-meta.maintenance-axes]
3477
scoping-first = true
3578
execution-order = "axis-1 > axis-2 > axis-3"
3679
axis-1 = "must > intend > like"
3780
axis-2 = "corrective > adaptive > perfective"
3881
axis-3 = "systems > compliance > effects"
3982

40-
[scoping]
41-
sources = "README, spec/, docs/, STATE.a2ml"
42-
marker-scan = "TODO/FIXME/XXX/HACK/STUB/PARTIAL"
43-
idris-unsound-scan = "N/A — Rust project"
44-
45-
[axis-2-maintenance-rules]
83+
[project-meta.axis-2-maintenance-rules]
4684
corrective-first = true
4785
adaptive-second = true
4886
adaptive-focus = "spec-implementation alignment, parser-EBNF sync, stale test removal"
4987
perfective-third = true
5088
perfective-source = "axis-1 honest state after corrective/adaptive updates"
5189

52-
[axis-3-audit-rules]
90+
[project-meta.axis-3-audit-rules]
5391
audit-focus = "Harvard separation holds, no agent injection paths, session type soundness"
5492
compliance-focus = "EBNF coverage, test coverage per language feature, dual-use notice present"
5593
drift-risk-example = "runtime check replacing parse-time rejection (violates Harvard architecture)"
5694
effects-evidence = "test suite results, parser coverage metrics"
5795

58-
[design-rationale]
96+
# ── Design Rationale ──────────────────────────────────────────────────────
97+
[project-meta.design-rationale]
5998
harvard-architecture = "Agent injection is a parse error, not a runtime check. Data and control flow through separate grammars, preventing prompt-injection-like attacks at the language level."
6099
hermeneutic-branching = "Every branch decision generates a trace record explaining why. This makes agent behaviour auditable and reproducible."
61100
six-pillars = "Harvard architecture, actors, capabilities, session types, linear handles, choreographies — each pillar addresses a specific failure mode in existing agent frameworks."
Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
11
# SPDX-License-Identifier: PMPL-1.0-or-later
2-
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3-
#
4-
# NEUROSYM.a2ml — Neurosymbolic integration metadata
5-
# Configuration for Hypatia scanning and symbolic reasoning.
2+
# NEUROSYM.a2ml — Neurosymbolic integration metadata for 007-lang
3+
# Template from: https://github.com/hyperpolymath/standards
64

75
[metadata]
86
version = "1.0.0"
9-
last-updated = "2026-03-24"
7+
last-updated = "2026-04-23"
108

119
[hypatia-config]
1210
scan-enabled = true
13-
scan-depth = "deep" # quick | standard | deep — deep for language compiler
11+
scan-depth = "deep"
1412
report-format = "logtalk"
13+
rulesets = ["rsr-baseline", "compiler-safety", "license-compliance"]
1514

1615
[symbolic-rules]
17-
# Custom symbolic rules for 007-lang
1816
rules = [
1917
{ name = "harvard-separation", pattern = "data grammar must not contain control constructs", severity = "critical" },
20-
{ name = "no-unsafe-transmute", pattern = "transmute", severity = "critical" },
18+
{ name = "no-unsafe-idris", pattern = "believe_me|assert_total", severity = "critical" },
19+
{ name = "no-unsafe-rust", pattern = "unsafe {", severity = "major" },
2120
{ name = "hermeneutic-trace", pattern = "every branch must generate trace record", severity = "warning" },
2221
]
2322

2423
[neural-config]
25-
# Neural pattern detection settings
26-
# confidence-threshold = 0.85
27-
# model = "hypatia-v2"
24+
confidence-threshold = 0.85
25+
model = "hypatia-v2-compiler"
26+
notes = "Uses the compiler-specialized model to detect grammar-level vulnerabilities and invariant drift."
Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
# SPDX-License-Identifier: PMPL-1.0-or-later
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.
2+
# PLAYBOOK.a2ml — Operational playbook for 007-lang
3+
# Template from: https://github.com/hyperpolymath/standards
64

75
[metadata]
86
version = "1.0.0"
9-
last-updated = "2026-03-24"
7+
last-updated = "2026-04-23"
108

119
[deployment]
12-
method = "ci-triggered" # gitops | manual | ci-triggered
13-
target = "binary" # container | binary | library | wasm
10+
method = "ci-triggered"
11+
target = "binary"
12+
notes = "Primary binary output is the 007 compiler (oo7). Codegen targets BEAM and typed-wasm."
1413

1514
[incident-response]
16-
# 1. Check .machine_readable/STATE.a2ml for current status
17-
# 2. Review recent commits and CI results
18-
# 3. Run `just test` to verify evaluator passes all 29 tests
19-
# 4. Run `just validate` to check compliance
20-
# 5. Verify Harvard separation: `just check-harvard`
15+
steps = [
16+
"1. Read 0-AI-MANIFEST.a2ml for canonical locations.",
17+
"2. Check .machine_readable/6a2/STATE.a2ml for active blockers (clippy, proof-debt).",
18+
"3. Run `just test` to verify evaluator/parser core.",
19+
"4. Verify Harvard separation: `just check-harvard` (parser-level grammar check).",
20+
]
2121

2222
[release-process]
23-
# 1. Update version in STATE.a2ml, META.a2ml, Cargo.toml
24-
# 2. Run `just release-preflight` (validate + quality + security + maint-hard-pass)
25-
# 3. Ensure all EBNF sections have corresponding Pest rules
26-
# 4. Tag and push
27-
# 5. Run `just container-push` if applicable
23+
steps = [
24+
"1. Update version and last-updated in all 6A2 files and Cargo.toml.",
25+
"2. Run `just validate-rsr` and ensuring EBNF parity with the Pest parser.",
26+
"3. Verify all canonical proofs pass with `just canonical-proof-suite`.",
27+
"4. Tag the release with `vX.Y.Z`.",
28+
"5. Push tags and update the 'last-updated' field in META.a2ml.",
29+
]
2830

2931
[maintenance-operations]
30-
# Baseline audit:
31-
# just maint-audit
32-
# Hard release gate:
33-
# just maint-hard-pass
34-
# Parser coverage check:
35-
# just parser-coverage
32+
audit = "just maint-audit"
33+
hard-pass = "just maint-hard-pass"
34+
canonical-proofs = "just canonical-proof-suite"
35+
parser-coverage = "just parser-coverage"
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# INDEX.a2ml — Contractile Registry
3+
# Author: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
4+
#
5+
# Machine-readable catalogue of all contractile verbs in this template set.
6+
# Consumers (CI scripts, the contractile CLI, Hypatia rules) SHOULD read this
7+
# file to discover available verbs rather than hard-coding the list.
8+
#
9+
# See: docs/CONTRACTILE-SPEC.adoc §Registry
10+
11+
---
12+
id = "contractiles-registry"
13+
version = "2.0.0" # 2.0.0 (2026-04-18): all 6 verbs on trident shape; verb set complete.
14+
spec = "docs/CONTRACTILE-SPEC.adoc"
15+
last_updated = "2026-04-18"
16+
base_schema = ".machine_readable/contractiles/_base.ncl"
17+
meta_schema_status = "pending — see CONTRACTILE-SPEC §validator-meta-schema"
18+
19+
## Verbs
20+
21+
[[verbs]]
22+
name = "adjust"
23+
semantics = "drift tolerances + corrective actions"
24+
trident = [
25+
"adjust/Adjustfile.a2ml",
26+
"adjust/adjust.ncl",
27+
"adjust/adjust.k9.ncl",
28+
]
29+
manifest = "adjust/adjust.manifest.a2ml"
30+
status = "active"
31+
tier = "Yard"
32+
authority = "advisory"
33+
gating = "advisory (continue-with-warnings)"
34+
cardinality = "one per repo"
35+
notes = "Fifth trident instance (2026-04-18). First (Yard, advisory) authority pattern. Specialises in cumulative-drift catchment — tolerance bands + trend tracking across sessions. auto_fix_when_available applies deterministic patches; advisory otherwise."
36+
37+
[[verbs]]
38+
name = "bust"
39+
semantics = "hard-stop / expiry / must-not-run declarations"
40+
trident = [
41+
"bust/Bustfile.a2ml",
42+
"bust/bust.ncl",
43+
"bust/bust.k9.ncl",
44+
]
45+
manifest = "bust/bust.manifest.a2ml"
46+
status = "active"
47+
tier = "Hunt-read-only"
48+
authority = "blocking"
49+
gating = "hard (exit-nonzero)"
50+
cardinality = "one per repo"
51+
notes = "Fourth trident instance (2026-04-18). Completes the blocking-authority triple (must + trust + bust). Specialises in deprecated-path-reintroduction catchment. Injects failures via declared probes and verifies recovery paths."
52+
53+
[[verbs]]
54+
name = "dust"
55+
semantics = "rollback / recovery / deprecation / audit-trail preservation"
56+
trident = [
57+
"dust/Dustfile.a2ml",
58+
"dust/dust.ncl",
59+
"dust/dust.k9.ncl",
60+
]
61+
manifest = "dust/dust.manifest.a2ml"
62+
status = "active"
63+
tier = "Yard"
64+
authority = "advisory"
65+
gating = "advisory (continue-with-warnings)"
66+
cardinality = "one per repo"
67+
notes = "Sixth and FINAL trident instance (2026-04-18) — completes the full verb set. Specialises in audit-trail preservation + rollback-path verification. Destructive actions gated behind --apply flag + per-item approval; dry-run default."
68+
69+
[[verbs]]
70+
name = "intend"
71+
semantics = "north-star (commitments + aspirations)"
72+
trident = [
73+
"intend/Intentfile.a2ml",
74+
"intend/intend.ncl",
75+
"intend/intend.k9.ncl",
76+
]
77+
manifest = "intend/intend.manifest.a2ml"
78+
status = "active"
79+
tier = "Hunt"
80+
authority = "reporting"
81+
gating = "non-gating (continue)"
82+
cardinality = "one per repo"
83+
notes = "First trident instance in the estate (2026-04-18). Reports progress toward committed next-actions AND lists horizon aspirations. Absorbed the deprecated `lust` verb 2026-04-18. Never blocks. Remaining 5 verbs still on file_pair shape until tridents are built."
84+
85+
[[verbs]]
86+
name = "k9"
87+
semantics = "trust-tier templates (EXCEPTION to one-verbfile rule)"
88+
file_pair = [
89+
"k9/template-hunt.k9.ncl",
90+
"k9/template-kennel.k9.ncl",
91+
"k9/template-yard.k9.ncl",
92+
]
93+
status = "exception"
94+
gating = "not applicable"
95+
notes = "k9 is service-automation meta-infrastructure, not a verb contractile. Three trust-tier templates (Kennel/Yard/Hunt). Does not have a Verbfile.a2ml. See CONTRACTILE-SPEC §k9-exception."
96+
97+
# [[verbs]] lust REMOVED 2026-04-18 — name had unwanted associations;
98+
# the horizon/aspiration semantics were always meant to live inside `intend`
99+
# (the north-star verb). The [[wishes]] schema was absorbed into
100+
# intend/Intentfile.a2ml. Any `lust/` dir found in an estate repo is drift
101+
# and should be deleted.
102+
103+
[[verbs]]
104+
name = "must"
105+
semantics = "invariant assertion — release-blocking"
106+
trident = [
107+
"must/Mustfile.a2ml",
108+
"must/must.ncl",
109+
"must/must.k9.ncl",
110+
]
111+
manifest = "must/must.manifest.a2ml"
112+
status = "active"
113+
tier = "Hunt-read-only"
114+
authority = "blocking"
115+
gating = "hard (exit-nonzero)"
116+
cardinality = "one per repo"
117+
notes = "Third trident instance (2026-04-18). Completes the blocking-authority pair with trust: must = concrete + persistent invariants; trust = concrete + ephemeral transactions. Specialises in subtle invariant-erosion (tracking per-session trend; flagging silent regression). Single failure blocks merge. Simplest and most commonly populated verb."
118+
119+
[[verbs]]
120+
name = "trust"
121+
semantics = "security + provenance + safe-hacking"
122+
trident = [
123+
"trust/Trustfile.a2ml",
124+
"trust/trust.ncl",
125+
"trust/trust.k9.ncl",
126+
]
127+
manifest = "trust/trust.manifest.a2ml"
128+
status = "active"
129+
tier = "Hunt"
130+
authority = "blocking"
131+
gating = "hard (exit-nonzero)"
132+
cardinality = "one per repo"
133+
notes = "Second trident instance (2026-04-18). First (Hunt, blocking) verb — hard gate. Primary defense against threat-model misclassification (B1) and 'turn off the firewall' capability-collapse (C2). Inherits on_open negotiation+accountability+translation from intend.k9.ncl v2.0.0; adds threat_model_foregrounding + block_session_close_on_critical_drift."

0 commit comments

Comments
 (0)