Skip to content

Commit 8eb88f9

Browse files
hyperpolymathclaude
andcommitted
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. ## Surface updates - 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)". ## Contractile updates - 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 manifests - 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. ## CI enforcement (so this self-maintains) - .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. ## Future estate-wide enforcement 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>
1 parent 546ec4e commit 8eb88f9

9 files changed

Lines changed: 355 additions & 8 deletions

File tree

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
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: 5 additions & 1 deletion
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
3-
# Last updated: 2026-06-02 (post-merge sweep — PRs #105/#106/#108/#109 closed #60/#61/#70/#89)
3+
# Last updated: 2026-06-02 (post-merge sweep — PRs #105/#106/#108/#109/#117/#118/#120/#121/#122/#123 closed #60/#61/#70/#89/#94 (Gap 9))
4+
# Bridge added: docs/ECHO-TYPES-OCHRANCE-BRIDGE.adoc + .machine_readable/ECHO_TYPES_OCHRANCE_BRIDGE.a2ml
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]
1721
session = "2026-04-19 CRG-AUDIT-2026-04-18 closure pass (8 of 10 items closed)"

.machine_readable/INTENT.contractile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
("Reversibility predicate is conditional — theorems are of the form `precondition p fs -> reverse(op(p, fs)) = fs`; never weaken to unconditional reversibility")
8989
("Proof-hole audit is authoritative — `docs/PROOF_HOLES_AUDIT.md` is the single source of truth for remaining gaps; CLAUDE.md and README MUST be kept in sync with it")
9090
("Six-tool boundary policy is in force — Zig for APIs/FFIs, Idris2 for ABIs, SNIFs for BEAM↔native, typed-wasm for compile targets, Groove Protocol for cross-system service discovery; bash/POSIX is the user surface, not an internal interop layer")
91+
("Three-layer architecture is fixed — Valence Shell (this repo) is the operational layer; echo-types is the semantic-loss theory; ochrance is the receipt/attestation substrate. The bridge between them is documentation-and-orientation-only, NOT a mechanised dependency. Canonical reference: docs/ECHO-TYPES-OCHRANCE-BRIDGE.adoc + .machine_readable/ECHO_TYPES_OCHRANCE_BRIDGE.a2ml. Forbidden-moves (production-ready / mechanised Lean-Rust / RMO beyond stubs / Echo-proves-implementation / Ochrance crypto / merging exploratory bridges into core claims) are codified in MUST.contractile.")
9192
)
9293

9394
; === Sensitive Areas (if in doubt, ask) ===
@@ -100,6 +101,7 @@
100101
"impl/rust-cli/src/commands/secure_deletion.rs and proofs/idris2/RMO.idr — RMO/GDPR claims; the entire compliance story rides on these"
101102
"EXPLAINME.adoc — the per-claim-caveat scaffold; do not delete or 'simplify' without owner sign-off"
102103
"LICENSE + LICENSES/ — REUSE-format SPDX; the project migrated PMPL-1.0 → MPL-2.0 in commit 990b147 and must not regress"
104+
"docs/ECHO-TYPES-OCHRANCE-BRIDGE.adoc + .machine_readable/ECHO_TYPES_OCHRANCE_BRIDGE.a2ml — bridge entry points; do not reframe the bridge as mechanised, or merge exploratory Echo/Ochrance claims into core scope, without owner sign-off"
103105
)
104106

105107
; === Ecosystem Position ===
@@ -131,5 +133,12 @@
131133
; Conceptual / aspirational relationships (NOT current code dependencies):
132134
"absolute-zero (conceptual ancestor) — CNO composition theory predates this project; vsh implements it for filesystem ops"
133135
)
136+
137+
(bridges-with
138+
; The three-layer bridge: documentation-and-orientation-only, NOT
139+
; mechanised. Canonical doc: docs/ECHO-TYPES-OCHRANCE-BRIDGE.adoc.
140+
"hyperpolymath/echo-types — semantic theory of structured loss; provides Echo f y := Σ (x : A) , (f x ≡ y) as the fibre/residue object"
141+
"hyperpolymath/ochrance — receipt + attestation substrate (A2ML manifests, Merkle-backed state commitments, repair witnesses)"
142+
)
134143
)
135144
)

.machine_readable/MUST.contractile

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,42 @@
8181
)
8282

8383
; === Project-Specific Invariants ===
84-
; *REMINDER: Add invariants specific to this repo*
85-
; (must "# Add project-specific invariants here")
84+
85+
; Echo Types / Ochrance bridge forbidden-moves (codified from
86+
; docs/ECHO-TYPES-OCHRANCE-BRIDGE.adoc — load-bearing for the honesty
87+
; rule about the three-layer architecture).
88+
(invariants-bridge
89+
(must "no claim that valence-shell is production-ready")
90+
(must "no claim that the Lean-to-Rust correspondence is mechanised")
91+
(must "no claim that RMO/GDPR support exists beyond stubs")
92+
(must "no claim that Echo Types proves valence-shell implementation correctness")
93+
(must "no claim of Ochrance cryptographic integrity while hash/attestation gaps remain upstream")
94+
(must "no merging of exploratory Echo bridges into core claims without checking echo-types/docs/bridge-status.md")
95+
(must "docs/ECHO-TYPES-OCHRANCE-BRIDGE.adoc and .machine_readable/ECHO_TYPES_OCHRANCE_BRIDGE.a2ml MUST both exist")
96+
(must "keep RMR (reversible) and RMO (irreversible + audit residue) terminologically distinct")
97+
)
8698

8799
(enforcement
88100
(k9-validator "contractiles/k9/must-check.k9.ncl")
101+
(forbidden-phrases-validator
102+
; CI scans README.adoc / EXPLAINME.adoc / CHANGELOG.* / docs/*.adoc /
103+
; docs/*.md for the forbidden phrases below. Match is case-insensitive
104+
; and respects the "no claim of …" framing — quoting them inside the
105+
; bridge doc itself is exempt (the doc is allowed to NAME the
106+
; forbidden moves in order to forbid them).
107+
(scan
108+
(files "README.adoc" "EXPLAINME.adoc" "CHANGELOG.adoc"
109+
"docs/*.adoc" "docs/*.md" ".machine_readable/*.contractile")
110+
(exempt-paths "docs/ECHO-TYPES-OCHRANCE-BRIDGE.adoc"
111+
".machine_readable/ECHO_TYPES_OCHRANCE_BRIDGE.a2ml"
112+
".machine_readable/MUST.contractile"))
113+
(phrases
114+
"production-ready"
115+
"mechanised lean-to-rust"
116+
"mechanized lean-to-rust"
117+
"production-grade"
118+
"fully verified" )
119+
(script ".github/scripts/check-bridge-forbidden-phrases.sh"))
89120
(ci "quality.yml runs must-check on every PR")
90-
)
121+
(ci "bridge-forbidden-phrases runs on every PR via governance workflow"))
91122
)

CHANGELOG.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
146146
=== Statistics
147147
- Phase 6 progress: 11/14 milestones complete (78%)
148148
- Overall completion: 82%
149-
- Rust CLI: 95% complete, production-ready
149+
- Rust CLI: 95% feature-complete (advanced research prototype — NOT production-ready; extraction gap not formally closed)
150150

151151
=== Documentation
152152
- PHASE6_M10_DESIGN.md (job control)
@@ -411,7 +411,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
411411
- Formal proofs stable
412412
- Implementation unstable
413413

414-
- **1.0.0**: Production-ready (future)
414+
- **1.0.0**: Production-grade target (future — not yet attempted)
415415
- Extraction gap closed
416416
- FFI verified
417417
- Security audit complete

0 commit comments

Comments
 (0)