Skip to content

Commit 2e8e1d5

Browse files
docs(bridge): canonical Echo Types / Ochrance bridge + estate-wide enforcement (#125)
* docs(bridge): land canonical Echo Types / Ochrance bridge for Valence Shell Three-layer architecture document + machine-readable manifest + agent pointer. The bridge is documentation-and-orientation-only, not a mechanised dependency. ## Files - docs/ECHO-TYPES-OCHRANCE-BRIDGE.adoc — canonical .adoc, owner-authored. - .machine_readable/ECHO_TYPES_OCHRANCE_BRIDGE.a2ml — A2ML companion capturing layers, key concepts, valence-shell cases, ochrance roles, agent required-framing rules, and the forbidden-moves list. - .claude/CLAUDE.md — READ-FIRST pointer added at top. ## Forbidden moves (codified) - No "Valence Shell is production-ready" - No "Lean-to-Rust correspondence is mechanised" - No "RMO/GDPR support exists beyond stubs" - No "Echo Types proves Valence Shell implementation correctness" - No "Ochrance cryptographic integrity" while upstream gaps remain - No merging exploratory Echo bridges into core claims without checking echo-types/docs/bridge-status.md ## Editorial cleanup Source had mangled source-block delimiters (== [source,agda] mixing section syntax with language tags). Normalised to proper [source,LANG] + ---- blocks so the doc renders. Text content preserved verbatim. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(bridge): README + EXPLAINME + 6a2 + contractiles + CI enforcement Threads the Echo Types / Ochrance bridge into every load-bearing project artefact and adds a CI check so the forbidden-moves rules don't drift. - README.adoc — new "Bridge to Echo Types + Ochrance" section (three-layer table + canonical doc link). Fixed pre-existing claim "Production-Ready Rust CLI: 95% complete" → "Advanced-prototype Rust CLI: 95% feature-complete (NOT production-ready)". Renamed Q&A heading "Is this production-ready?" → "Is this ready to put in production?" so the heading parses cleanly under the forbidden- phrases check. - EXPLAINME.adoc — new "Architectural Bridge" section + bridge doc added to the file reference table. - CHANGELOG.adoc — fixed two stale "production-ready" claims that preceded the bridge: * "Rust CLI: 95% complete, production-ready" → "Rust CLI: 95% feature-complete (advanced research prototype — NOT production- ready; extraction gap not formally closed)". * "1.0.0: Production-ready (future)" → "1.0.0: Production-grade target (future — not yet attempted)". - MUST.contractile — new `invariants-bridge` block codifying the 8 forbidden-moves rules + `forbidden-phrases-validator` enforcement block wiring in the CI script. - INTENT.contractile — added three-layer architecture as an architectural-invariant; added bridge files to `ask-before-touching`; added `bridges-with` ecosystem section listing echo-types + ochrance. - 6a2/ECOSYSTEM.a2ml — populated `[architecture]`, `[bridges.echo- types]`, `[bridges.ochrance]`, `[bridge-entry-points]`. - 6a2/STATE.a2ml — added `bridge-status` / `bridge-doc` / `bridge- a2ml` keys to project-context. - .github/scripts/check-bridge-forbidden-phrases.sh — bash checker that scans README/EXPLAINME/CHANGELOG for forbidden phrases. Smart negation context (NOT, never, future, target, stub etc) + bridge- section awareness so the bridge doc can NAME the phrases without flagging itself. Local-runnable. Exit codes: 0 clean / 1 violation / 2 missing bridge artefact. - .github/workflows/bridge-forbidden-phrases.yml — runs the checker on every push/PR. This is the seed for hoisting into hyperpolymath/standards governance-reusable.yml so other bridge-tagged repos pick it up. A follow-up issue against `standards` is planned. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(bridge): AGENTIC.a2ml — surface bridge forbidden-moves to agents Add to [agent-constraints] the six bridge forbidden-moves rules and a new [bridge-aware-rules] section listing the canonical entry points, the documentation-and-orientation-only status, the echo-types audit obligation, and the CI enforcement script/workflow. This is the last 6a2 file to absorb the bridge — STATE/ECOSYSTEM were updated in the previous commit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 80a7e1d commit 2e8e1d5

13 files changed

Lines changed: 668 additions & 7 deletions

.claude/CLAUDE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,20 @@
22
SPDX-License-Identifier: MPL-2.0
33
Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
44
-->
5+
## Canonical bridge — READ FIRST
6+
7+
Before making claims about reversibility, obliteration, Lean↔Rust mechanisation, or cryptographic attestation, read both:
8+
9+
- `docs/ECHO-TYPES-OCHRANCE-BRIDGE.adoc` — three-layer architecture (Valence Shell / Echo Types / Ochrance) + forbidden-moves rules
10+
- `.machine_readable/ECHO_TYPES_OCHRANCE_BRIDGE.a2ml` — machine-readable companion
11+
12+
The bridge is **documentation-and-orientation-only**, not a mechanised dependency. Keep RMR (reversible) and RMO (irreversible + audit residue) distinct.
13+
514
## Machine-Readable Artefacts
615

716
The following files in `.machine_readable/` contain structured project metadata:
817

18+
- `.machine_readable/ECHO_TYPES_OCHRANCE_BRIDGE.a2ml` - Bridge to echo-types + ochrance (READ FIRST)
919
- `.machine_readable/6a2/STATE.a2ml` - Current project state and progress
1020
- `.machine_readable/6a2/META.a2ml` - Architecture decisions and development practices
1121
- `.machine_readable/6a2/ECOSYSTEM.a2ml` - Position in the ecosystem and related projects
Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
#!/usr/bin/env bash
2+
# SPDX-License-Identifier: MPL-2.0
3+
# check-bridge-forbidden-phrases.sh
4+
#
5+
# Enforces the Echo Types / Ochrance bridge "forbidden moves" rules from
6+
# docs/ECHO-TYPES-OCHRANCE-BRIDGE.adoc on user-facing docs.
7+
#
8+
# The bridge is documentation-and-orientation-only — claiming production-
9+
# readiness, mechanised Lean→Rust correspondence, RMO beyond stubs, etc.
10+
# would misrepresent the project's status. This script greps for phrasing
11+
# that signals such over-claims.
12+
#
13+
# Scope is intentionally limited to *current* claim surfaces:
14+
# - README.adoc, EXPLAINME.adoc
15+
# - CHANGELOG.adoc (current section only)
16+
# - .machine_readable/*.contractile (except MUST + INTENT which NAME the
17+
# phrases to forbid them; see exempt-paths)
18+
#
19+
# Historical docs/*.md reports (PHASE_REPORT, CONTINUATION_REPORT,
20+
# SEAM_SEALING_REPORT, VERIFICATION_STRATEGY_ANALYSIS, ROADMAP_TO_V1)
21+
# are out of scope — they capture the state as of their author date.
22+
#
23+
# Negation context: a forbidden phrase is treated as OK if the surrounding
24+
# line contains a negation marker (NOT, not, No, no, never, neither,
25+
# isn't, doesn't, lacks, missing, "downgrade") within 80 characters either
26+
# side. This catches "**NOT production-ready**", "Q: Is this production-
27+
# ready? A: No.", "lacks production-ready X", etc.
28+
#
29+
# Run locally: bash .github/scripts/check-bridge-forbidden-phrases.sh
30+
# Exit codes: 0 = clean, 1 = forbidden phrase found, 2 = misconfig.
31+
32+
set -euo pipefail
33+
34+
ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
35+
cd "$ROOT"
36+
37+
required=(
38+
"docs/ECHO-TYPES-OCHRANCE-BRIDGE.adoc"
39+
".machine_readable/ECHO_TYPES_OCHRANCE_BRIDGE.a2ml"
40+
)
41+
for f in "${required[@]}"; do
42+
if [ ! -e "$f" ]; then
43+
echo "ERROR: required bridge artefact missing: $f" >&2
44+
exit 2
45+
fi
46+
done
47+
48+
scan_globs=(
49+
"README.adoc"
50+
"EXPLAINME.adoc"
51+
"CHANGELOG.adoc"
52+
)
53+
54+
# Files allowed to name the forbidden phrases verbatim (because they
55+
# forbid them, document them, or carry the policy itself).
56+
exempt=(
57+
"docs/ECHO-TYPES-OCHRANCE-BRIDGE.adoc"
58+
".machine_readable/ECHO_TYPES_OCHRANCE_BRIDGE.a2ml"
59+
".machine_readable/MUST.contractile"
60+
".machine_readable/INTENT.contractile"
61+
".github/scripts/check-bridge-forbidden-phrases.sh"
62+
)
63+
64+
# Bridge sections inside README.adoc / EXPLAINME.adoc list forbidden
65+
# phrases as a teaching aid. We mark those line ranges as exempt by
66+
# detecting the section heading "Bridge to Echo Types + Ochrance" and
67+
# "Architectural Bridge" — a forbidden phrase inside that block is OK.
68+
BRIDGE_SECTION_RE='(== Bridge to Echo Types|== Architectural Bridge|=== Forbidden moves)'
69+
70+
forbidden=(
71+
"production-ready"
72+
"production grade"
73+
"production-grade"
74+
"mechanised lean-to-rust"
75+
"mechanized lean-to-rust"
76+
"mechanised lean→rust"
77+
"mechanized lean→rust"
78+
"fully verified"
79+
"echo types proves valence-shell"
80+
"ochrance cryptographic integrity"
81+
)
82+
83+
is_exempt_file() {
84+
local p="$1"
85+
for e in "${exempt[@]}"; do
86+
[ "$p" = "$e" ] && return 0
87+
done
88+
return 1
89+
}
90+
91+
# Build a list of (file, start_line, end_line) tuples covering bridge
92+
# sections. We use awk to find heading offsets then emit ranges.
93+
bridge_ranges_for() {
94+
local file="$1"
95+
[ -f "$file" ] || return 0
96+
awk -v re="$BRIDGE_SECTION_RE" '
97+
/^==[^=]/ {
98+
# New top-level section — close any open bridge range.
99+
if (in_bridge) {
100+
printf "%d %d\n", start, NR - 1
101+
in_bridge = 0
102+
}
103+
if ($0 ~ re) {
104+
in_bridge = 1
105+
start = NR
106+
}
107+
}
108+
/^===[^=]/ {
109+
if ($0 ~ re && !in_bridge) {
110+
in_bridge = 1
111+
start = NR
112+
}
113+
}
114+
END {
115+
if (in_bridge) printf "%d %d\n", start, NR
116+
}
117+
' "$file"
118+
}
119+
120+
in_bridge_range() {
121+
local file="$1"
122+
local line="$2"
123+
while read -r start end; do
124+
if [ "$line" -ge "$start" ] && [ "$line" -le "$end" ]; then
125+
return 0
126+
fi
127+
done < <(bridge_ranges_for "$file")
128+
return 1
129+
}
130+
131+
# Negation / future-aspiration context check.
132+
# Looks at the full line for markers indicating the phrase is being
133+
# negated, talked about historically, or named as a future target.
134+
has_negation_context() {
135+
local content="$1"
136+
local lower
137+
lower=$(printf '%s' "$content" | tr '[:upper:]' '[:lower:]')
138+
# Standalone "no"/"not"/etc as a word.
139+
if printf '%s' "$lower" | grep -qE "(^|[^[:alnum:]'])(not|no|never|neither|isn'?t|doesn'?t|don'?t|lacks?|missing|downgrade|forbid|caveat|≠|stub|stubs|aspirational)([^[:alnum:]]|$)"; then
140+
return 0
141+
fi
142+
# Forward-looking targets ("future", "target", "goal", "aim", "roadmap",
143+
# "(future)") are not present-tense claims.
144+
if printf '%s' "$lower" | grep -qE "(^|[^[:alnum:]])(future|target|goal|aim|aiming|roadmap|aspiration|aspire|when|once|after)([^[:alnum:]]|$)"; then
145+
return 0
146+
fi
147+
# "is NOT" / "are NOT" framing.
148+
if printf '%s' "$lower" | grep -qE "(is|are|was|were|will be|would be)[[:space:]]+not[[:space:]]"; then
149+
return 0
150+
fi
151+
return 1
152+
}
153+
154+
failures=0
155+
shopt -s nullglob
156+
for glob in "${scan_globs[@]}"; do
157+
for file in $glob; do
158+
is_exempt_file "$file" && continue
159+
[ -f "$file" ] || continue
160+
for phrase in "${forbidden[@]}"; do
161+
while IFS=: read -r lineno content; do
162+
[ -z "${lineno:-}" ] && continue
163+
if in_bridge_range "$file" "$lineno"; then
164+
continue
165+
fi
166+
if has_negation_context "$content"; then
167+
continue
168+
fi
169+
echo "FORBIDDEN: $file:$lineno: '$phrase'" >&2
170+
echo " context: $(printf '%s' "$content" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//' | cut -c1-120)" >&2
171+
echo " → rephrase, or add explicit negation, or document via docs/ECHO-TYPES-OCHRANCE-BRIDGE.adoc" >&2
172+
failures=$((failures + 1))
173+
done < <(grep -ni -- "$phrase" "$file" 2>/dev/null || true)
174+
done
175+
done
176+
done
177+
178+
if [ "$failures" -gt 0 ]; then
179+
echo "" >&2
180+
echo "Found $failures forbidden-phrase occurrence(s)." >&2
181+
echo "See docs/ECHO-TYPES-OCHRANCE-BRIDGE.adoc § 'Forbidden moves'." >&2
182+
exit 1
183+
fi
184+
185+
echo "Bridge forbidden-phrases check: OK"
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
# bridge-forbidden-phrases.yml — enforce the Echo Types / Ochrance
3+
# bridge "forbidden moves" rules on user-facing docs.
4+
#
5+
# Per docs/ECHO-TYPES-OCHRANCE-BRIDGE.adoc + .machine_readable/
6+
# ECHO_TYPES_OCHRANCE_BRIDGE.a2ml: the bridge is documentation-and-
7+
# orientation-only. Claims of production-readiness, mechanised
8+
# Lean↔Rust correspondence, RMO beyond stubs, Echo-proves-implementation,
9+
# or Ochrance cryptographic integrity are forbidden in current claim
10+
# surfaces (README.adoc, EXPLAINME.adoc, CHANGELOG.adoc).
11+
#
12+
# The check runs locally too: bash .github/scripts/check-bridge-forbidden-phrases.sh
13+
#
14+
# Future estate-wide enforcement: hyperpolymath/standards governance-
15+
# reusable.yml should pick up this rule for all bridge-tagged repos.
16+
17+
name: Bridge Forbidden Phrases
18+
19+
on:
20+
push:
21+
branches: [main, master]
22+
pull_request:
23+
workflow_dispatch:
24+
25+
concurrency:
26+
group: ${{ github.workflow }}-${{ github.ref }}
27+
cancel-in-progress: true
28+
29+
permissions:
30+
contents: read
31+
32+
jobs:
33+
check:
34+
name: docs/ECHO-TYPES-OCHRANCE-BRIDGE forbidden-phrases
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@1cce3390c2bfda521930d01229c073c7ff920824 # v4
38+
- name: Run forbidden-phrases checker
39+
run: bash .github/scripts/check-bridge-forbidden-phrases.sh

.machine_readable/6a2/AGENTIC.a2ml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,23 @@ 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 violate the Echo Types / Ochrance bridge forbidden-moves:
26+
# no "production-ready", no "mechanised Lean-to-Rust", no "RMO/GDPR beyond stubs",
27+
# no "Echo Types proves Valence Shell implementation correctness",
28+
# no "Ochrance cryptographic integrity" while upstream gaps remain.
29+
# See docs/ECHO-TYPES-OCHRANCE-BRIDGE.adoc + MUST.contractile invariants-bridge.
30+
# CI-enforced via .github/scripts/check-bridge-forbidden-phrases.sh.
31+
32+
[bridge-aware-rules]
33+
# Bridge entry points agents must read before changing related code/docs.
34+
read-first = "docs/ECHO-TYPES-OCHRANCE-BRIDGE.adoc"
35+
manifest = ".machine_readable/ECHO_TYPES_OCHRANCE_BRIDGE.a2ml"
36+
status = "documentation-and-orientation-only"
37+
mechanised = false
38+
# When working on Lean→Rust correspondence, RMR/RMO vocabulary, or
39+
# Ochrance attestation surfaces, the bridge doc's forbidden-moves
40+
# section MUST be re-checked. Cross-doc echo-types audit obligation
41+
# also applies (per estate memory feedback_proofs_must_check_and_cross_doc_echo_types).
42+
echo-types-audit-required = true
43+
ci-enforcement-script = ".github/scripts/check-bridge-forbidden-phrases.sh"
44+
ci-workflow = ".github/workflows/bridge-forbidden-phrases.yml"
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,57 @@
11
# SPDX-License-Identifier: MPL-2.0
22
# ECOSYSTEM.a2ml — Ecosystem position
33
# Converted from ECOSYSTEM.scm on 2026-03-15
4+
# Bridge section added 2026-06-02 alongside docs/ECHO-TYPES-OCHRANCE-BRIDGE.adoc
45

56
[metadata]
67
project = "valence-shell"
78
ecosystem = "hyperpolymath"
89

910
[position]
1011
type = "component"
12+
role = "operational-shell-layer"
13+
14+
# Three-layer architecture (canonical: docs/ECHO-TYPES-OCHRANCE-BRIDGE.adoc).
15+
# The bridge is documentation-and-orientation-only — NOT a mechanised
16+
# dependency. Forbidden-moves codified in .machine_readable/MUST.contractile.
17+
[architecture]
18+
layer = 1
19+
layer-name = "operational-shell"
20+
semantics-layer = "echo-types"
21+
receipts-layer = "ochrance"
22+
23+
[bridges]
24+
25+
[bridges.echo-types]
26+
repo = "hyperpolymath/echo-types"
27+
role = "semantic theory of structured loss"
28+
foundation = "Echo f y := Σ (x : A) , (f x ≡ y)"
29+
status = "documentation-and-orientation-only"
30+
mechanised = false
31+
required-reading = [
32+
"README.md",
33+
"proofs/agda/EchoCanonicalIdentitySuite.agda",
34+
"docs/echo-types/MAP.adoc",
35+
"docs/bridge-status.md",
36+
"CLAUDE.md",
37+
]
38+
39+
[bridges.ochrance]
40+
repo = "hyperpolymath/ochrance"
41+
role = "receipt + attestation substrate"
42+
provides = [
43+
"A2ML manifests + validators",
44+
"Verified Merkle structure (once cryptographic hashing is no longer placeholder)",
45+
"Linear repair operations + proof witnesses",
46+
]
47+
status = "documentation-and-orientation-only"
48+
mechanised = false
49+
current-gaps = [
50+
"placeholder XOR hashes",
51+
"incomplete cryptographic attestation",
52+
"ongoing linear-repair work",
53+
]
54+
55+
[bridge-entry-points]
56+
prose = "docs/ECHO-TYPES-OCHRANCE-BRIDGE.adoc"
57+
machine-readable = ".machine_readable/ECHO_TYPES_OCHRANCE_BRIDGE.a2ml"

.machine_readable/6a2/STATE.a2ml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# SPDX-License-Identifier: MPL-2.0
22
# STATE.a2ml — Project state checkpoint
33
# Last updated: 2026-06-02 (afternoon sweep — PRs #110/#112/#113/#114/#115/#116/#121/#123/#124 landed; LICENSE SPDX + 4 admits annotated; #119 Cat-A non-theorems redesigned)
4+
# Evening: bridge added — docs/ECHO-TYPES-OCHRANCE-BRIDGE.adoc + .machine_readable/ECHO_TYPES_OCHRANCE_BRIDGE.a2ml (PR #125)
45

56
[metadata]
67
project = "valence-shell"
@@ -12,6 +13,9 @@ status = "active"
1213
name = "valence-shell"
1314
completion-percentage = 78
1415
phase = "advanced-research-prototype"
16+
bridge-status = "documentation-and-orientation-only (echo-types + ochrance; NOT mechanised)"
17+
bridge-doc = "docs/ECHO-TYPES-OCHRANCE-BRIDGE.adoc"
18+
bridge-a2ml = ".machine_readable/ECHO_TYPES_OCHRANCE_BRIDGE.a2ml"
1519

1620
[recent-work-2026-06-02]
1721
session = "2026-06-02 morning + afternoon sweep — inbox cleanup + root-cause main fixes"

0 commit comments

Comments
 (0)