You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bias report's consistency badge paints every out-of-band cell the same red, whether the ledger validated it as "this language cannot express that" or as an open engine defect — so the scoreboard could not tell an extraction problem from a language fact, and the work kept looking like an extraction problem. Rolling the 267 gated red cells up by cause: 102 echo (derived), ~45 language inherency, ~50 extraction defects, 38 proximity-correlation effects, ~32 scoring choices. The largest engine-side finding is a layer leak, not a regex: core/spatial_correlation.py edits recorded signal counts in place (×3 cascading flux, silencer dampeners, ×5/×100 amplifiers; documented and pinned by #2631), so the count the corpus reads is never the raw count. The fix is a stated contract at each of the engine's three layers — what text a rule sees (stream), what one hit means (count), how counts combine (score) — and tooling that enforces them.
The goal restated: equal counts for equal constructs. Every remaining cross-language difference comes from one of three declared sources — a strictness stratum (design), an n/a (the language cannot express it), or a filed defect. After that a red dot is a defect by construction. The close criterion is open-defect share 0 and no draft row in the contract sheet, replacing "nothing unexplained".
Session start protocol (every session, every time)
gh issue view <this> --comments — the last comment per item is its true state. Claim by comment: claiming <item> — <model> — branch <name>; stop with status <item>: <done|blocked|partial> — <branch/PR> — <what remains>. Unfinished branches are pushed, never left local.
Read keyword-rosetta docs/bias_report.mdfrom main (regenerated on every corpus push and nightly): the "What the red cells are" section and the open-defect share. Do not regenerate locally to triage; regenerate only to verify a change before a PR.
Read the signal's row in gitgalaxy/standards/signal_contracts.py and the ledger entries naming it before calling any rule a defect (two of the four issues filed from the args audit were already settled in the ledger).
D1 Recorded signal counts become raw counts; correlation weights move to the formulas that read them (score-neutral by construction; one golden-master bless + one corpus re-bless). → Phase 2.
D3 The contract sheet is gitgalaxy/standards/signal_contracts.py (machine-readable), rendered to docs/signal_contracts.md, checked by tests/signal_contract_audit.py --ci; how_to_add_a_language.md's comment lines are its prompt form.
D4 Add the open-defect share now; switch the chart badge in a follow-up PR with the README copy.
Phases
0 · Scoreboardkeyword-rosettaT2 — bias_report.py cause roll-up (categorize_out_of_band, open_defect_share, decayed_entries), "What the red cells are" section, bias_data.json["cell_categories"] / ["open_defect_share"], GATING.md category semantics, rosetta-language-sweep re-scoped, issue_status.py --post retired. → keyword-rosetta#77 (+ triage Implement Lustre/SCADE Fly-By-Wire Signatures #81). Closed keyword-rosetta#75 as a standing check.
3 · Count contracts, by familygitgalaxy + keyword-rosetta — one signal → stated per family via the rule-contract-audit skill. 10 of 14 planted families stated; 4 remain. Done when every sheet row is stated.
docsafety_bypassesplanned_debtfragile_debttelemetry — planted, no open cell; contract flips the row, moves no cell
8 unplanted risk inputs (concurrencydead_codedebug_printsimmutability_locksreflection_metaprogrammingspec_exposuresync_locksllm_api): each gets a plant or a contract-level absence
~41 unplanted domain sensors (architecture/subsystems/hybrid/ai-ml/appsec/literate — crypto, ml, closures, generics, …): batch a transcribed sentence + kind/unit + contract-level absence; no 46-language audit (no corpus cell to move)
Phases 0–2 done; Phase 3 in progress; Phase 4 not started. Corpus is healthy — the remaining work is completing the sheet, not repairing a broken scoreboard.
Scoreboard: open-defect share 31 of 2296 comparable cells (1.4%) pending #2854/kr#94 merge, average consistency 93% (was 88% at the roadmap's start). test was the latest family cleared; every one of its 43 comparable cells is now in band.
full 46-language rule-contract-audit (engine PR + corpus PR)
6 of 11 do (~9 cells)
unplanted risk inputs
8
a plant or a contract-level absence
no (reported, not gated)
unplanted domain sensors
41
transcribed sentence + kind/unit + absence; batchable, no audit
no (no corpus cell)
What percentage needs a contract, and how much is left:
The epic's literal close criterion is no draft row → all 62 remaining rows, but only the first two buckets (planted + risk inputs = 27 rows, 40% of the sheet) are load-bearing on the scoreboard or a gated formula. 6 of those 27 are done (22%).
The other 60% (41 domain sensors) are documentation-grade: a batch of sentences, not audits.
gitgalaxy/standards/fidelity_table.py is stale against corpus main (tests/tools/fidelity_table.py --check fails on main since keyword-rosetta#74) — regen owed by the next PR touching the fidelity layer.
Untracked scratch files in the engine working tree (gitgalaxy/tests.py, gen_tests.py, parse_regex.py, regexes.txt, temp_search.txt) trip the local ruff/mypy audits; CLAUDE.md's scratch rule applies.
Child of #2560; supersedes #2669 as the handoff surface for cross-language consistency work. Strategy approved 2026-09-06. The document is
docs/contract_roadmap.md(lands with #2811; formatted copy: https://claude.ai/code/artifact/debf7286-7958-48d6-91e5-48b1bbc4abc0). Read it before claiming anything here.Why this epic exists (one paragraph)
The bias report's consistency badge paints every out-of-band cell the same red, whether the ledger validated it as "this language cannot express that" or as an open engine defect — so the scoreboard could not tell an extraction problem from a language fact, and the work kept looking like an extraction problem. Rolling the 267 gated red cells up by cause: 102 echo (derived), ~45 language inherency, ~50 extraction defects, 38 proximity-correlation effects, ~32 scoring choices. The largest engine-side finding is a layer leak, not a regex:
core/spatial_correlation.pyedits recorded signal counts in place (×3 cascading flux, silencer dampeners, ×5/×100 amplifiers; documented and pinned by #2631), so the count the corpus reads is never the raw count. The fix is a stated contract at each of the engine's three layers — what text a rule sees (stream), what one hit means (count), how counts combine (score) — and tooling that enforces them.The goal restated: equal counts for equal constructs. Every remaining cross-language difference comes from one of three declared sources — a strictness stratum (design), an
n/a(the language cannot express it), or a filed defect. After that a red dot is a defect by construction. The close criterion is open-defect share 0 and nodraftrow in the contract sheet, replacing "nothing unexplained".Session start protocol (every session, every time)
gh issue view <this> --comments— the last comment per item is its true state. Claim by comment:claiming <item> — <model> — branch <name>; stop withstatus <item>: <done|blocked|partial> — <branch/PR> — <what remains>. Unfinished branches are pushed, never left local.docs/bias_report.mdfrom main (regenerated on every corpus push and nightly): the "What the red cells are" section and the open-defect share. Do not regenerate locally to triage; regenerate only to verify a change before a PR.gitgalaxy/standards/signal_contracts.pyand the ledger entries naming it before calling any rule a defect (two of the four issues filed from theargsaudit were already settled in the ledger).Closes #Nper line. Labelrosetta:rebless-owedwhen the corpus moves; corpus re-bless PR opens against engine main after the engine PR merges (no pins since Cross-repo choreography is circular, and every way it broke today failed green — drop the ENGINE_REF dance, machine-check the invariants #2682/ci: rosetta-audit without pins -- baseline-classified, refuses to no-op (#2682) #2699).rosetta-language-sweepskill, called from a family audit, and live standing ispython tools/language_deviations.py <lang>.Decisions (approved 2026-09-06)
docs/language_status/<lang>.md§10) are written when a language reads clean bylanguage_deviations.py, decoupled from any issue.gitgalaxy/standards/signal_contracts.py(machine-readable), rendered todocs/signal_contracts.md, checked bytests/signal_contract_audit.py --ci;how_to_add_a_language.md's comment lines are its prompt form.Phases
keyword-rosettaT2—bias_report.pycause roll-up (categorize_out_of_band,open_defect_share,decayed_entries), "What the red cells are" section,bias_data.json["cell_categories"]/["open_defect_share"],GATING.mdcategory semantics,rosetta-language-sweepre-scoped,issue_status.py --postretired. → keyword-rosetta#77 (+ triage Implement Lustre/SCADE Fly-By-Wire Signatures #81). Closed keyword-rosetta#75 as a standing check.gitgalaxyT2—signal_contracts.py(68 rows),signal_contract_audit.py+ baseline + workflow,docs/signal_contracts.md, RULE 18 + pointer inhow_to_add_a_language.md,rule-contract-auditskill,ecosystem.md. → docs(contracts): contract roadmap, signal contract sheet + baseline-gated audit, rule-contract-audit skill #2811.gitgalaxy— the six proximity pairs write tomitigationsonly;_weighted()helper insignal_processor.py; recorders carry the weighted figure under its own key;test_spatial_correlation.pypins moved;core/README.mdproximity table. Both golden mastersrisk_*-identical; corpusstate_mutationon 2 where planted;state-flux-branch-weightingdecayed. → feat(core): recorded signal counts are raw counts; proximity weights move to a weighted view (#2813, D1) #2815 (+ corpus re-bless). Unblocked state_mutation has no stated contract: three incompatible definitions across 46 languages, and it governs the corpus's two worst metrics #2765.gitgalaxy + keyword-rosetta— one signal →statedper family via therule-contract-auditskill. 10 of 14 planted families stated; 4 remain. Done when every sheet row isstated.state_mutationstate_mutation has no stated contract: three incompatible definitions across 46 languages, and it governs the corpus's two worst metrics #2765 → engine feat(contracts): state_mutation gets a stated contract — a statement that writes to existing state (#2765, Phase 3) #2818 / corpus kr#79unreferenced_by_name(orphan census) orphaned_logic reports 100% dead code for five languages whose invocation model never names the callee — the family #2727 closed without covering #2806 → engine unreferenced_by_name: state the census contract, and stop asking the one language that cannot answer it #2825 / corpus kr#82args/globalscobol args −92%: the overlap-cost rejection was priced before #2729 planted ENTRY on every paragraph — the api cost it avoids is already paid #2804 cobol globals counts WORKING-STORAGE SECTION: a region header stacked on top of the item-level GLOBAL/EXTERNAL clauses, unconditional on every COBOL program #2805 → engine fix(cobol): globals drops WORKING-STORAGE header (#2805); args counts operands not clauses (#2804) #2830 / corpus kr#84 (args general half; corpus shape (a) of cobol args −92%: the overlap-cost rejection was priced before #2729 planted ENTRY on every paragraph — the api cost it avoids is already paid #2804 still owed)branchbranch has no stated contract: handler keywords, the syntax words of one conditional, and goto count as decisions in some languages and not in others #2822 → engine fix(standards): branch counts decisions — not handlers, closing words or gotos (#2822 contract, roadmap Phase 3) #2834 / corpus kr#86ioio has no stated contract: javascript counts an identifier named path, sqlite counts every DML keyword, and tcl's source/close are claimed by two rules each #2841 → engine fix(standards): io counts boundary operations — one owner, one statement, one boundary (#2841 contract, roadmap Phase 3) #2844 / corpus kr#90testtest has no stated contract: c and embedded_python count safety's planted assert, and perl's Test::More::ok( fires the rule twice #2852 → engine fix(standards): test counts framework engagement sites -- the runtime guard is safety's, a qualifier is not a second hit (#2852 contract, roadmap Phase 3) #2854 / corpus kr#94func_start+class_start(the structure pair) func_start & class_start have no stated contract: 5 open cells are all collective-entry cross-product mis-marks, not rule defects #2856 → engine feat(standards): func_start and class_start contracts -- 5 open cells are collective-entry cross-product mis-marks, not rule defects (#2856, roadmap Phase 3) #2857 / corpus kr#95 — no rule change; the 5 open cells were collective-entry cross-product mis-marks (batch4/batch5/kotlin-object), now inherency/scoring. Container residue stays with functions_found[markdown] −100%: func_start is n/a for markdown but functions_found scores it anyway — the structure-count rows have no n/a mechanism #2795/classes_found: five red cells on a 0 median are language morphology, not extraction — the row needs a declaration-requirement stratum #2796/classes_found[css] red on a 0 median: a CSS class is a selector, and #1295 already ruled it out of scope on the other two charts #2798.globalsglobalshas no stated contract: 2 open cells are one-owner/ambiguity misfires, and the crucible shows the rule counting local declarations, function prototypes and hyphenated identifiers #2858 → engine feat(standards): globals counts program-lifetime bindings and ambient handles -- a local, a prototype, a section header and a constant reference are not globals (#2858 contract, roadmap Phase 3) #2860 / corpus kr#96import— planted, 2 open cells (dockerfile, embedded_python)safetysafetyhas no stated contract: 2 open cells are token-double-counts and one-owner misfires, and haskell's rule countspure,returnand type constructors as runtime guards #2869 → engine safety contract (#2869): stated sentence + corollaries, 15 rules edited, two open cells to zero, golden masters re-blessed #2873 / corpus kr#101 — both cells were one-owner/type-level misfires; 15 rules edited on the corollaries; deferred menusafetycontract corollary menu: type-level tokens, one-owner duals and narrow rules left in place by #2869, with no cell evidence to move them #2870high_risk_execution— planted, 1 open cell (agc_assembly)ownership— planted, 1 open cell (solidity)cleanup— planted, 1 open cell (makefile); ownership residue from io has no stated contract: javascript counts an identifier named path, sqlite counts every DML keyword, and tcl's source/close are claimed by two rules each #2841 filed as cleanup contract: destruction of external state has no owner — c remove() left io (#2841 C2) but c's cleanup rule does not claim it #2843encapsulationencapsulation has no stated contract: rust counts pub (the public modifier) and agc_assembly's rule matches every column-0 token #2766 (rule half) ·immutability_locksimmutability_locks has no contract: rust'sletis invisible while swift'sletscores 11 — and it is subtracted from the corpus's worst gated metric #2772 (rule half) — planted-adjacent, no open cell today but named in D2/roadmapdocsafety_bypassesplanned_debtfragile_debttelemetry— planted, no open cell; contract flips the row, moves no cellconcurrencydead_codedebug_printsimmutability_locksreflection_metaprogrammingspec_exposuresync_locksllm_api): each gets a plant or a contract-level absencekind/unit+ contract-level absence; no 46-language audit (no corpus cell to move)statedcontracts (do not block Phase 3 close): args abap args counts call-site parameter keywords (CALL FUNCTION ... EXPORTING, PERFORM ... CHANGING) as declared parameters #2824, state_mutation state_mutation: python, embedded_python and ruby never count a plain re-assignment (narrower than the #2765 contract) #2817, branch branch still counts the break/continue family: the unconditional transfers #2822 deferred #2832 branch counts non-decision tokens the #2822 audit measured but did not touch: ruby bare ?, java bare :, python with #2833, api api_declared_orphans tokenizes api lines with\b\w+\b, so a hyphenated or qualified name is never recognised as already-declared (#2731's double count returns for cobol and scheme) #2827gitgalaxy—tests/tools/audit_commensurability.py(walks_calc_*ASTs, reads units from the sheet, flags+/−between unlike units, ungated inputs,tallydenominators), then one PR per formula. Open-defect cells waiting on this layer:raw_arch_api(raw_arch_api bands a per-file declaration count against a per-function median — one granularity mismatch, three red columns #2771, 2 cells),risk_api_exposure(3 unexplained),risk_documentation(2 unexplained),risk_tech_debt(1),func_complexity_gini(1). Closes control_flow_ratio is the corpus's worst metric (33%): it divides a pinned numerator by structural_boundaries, an ungoverned 0-45 vocabulary tally #2770, raw_arch_api bands a per-file declaration count against a per-function median — one granularity mismatch, three red columns #2771, immutability_locks has no contract: rust'sletis invisible while swift'sletscores 11 — and it is subtracted from the corpus's worst gated metric #2772 (formula half), length leaks: func_internal_density, avg_func_loc and control_flow_ratio read file length with content and tier held equal (rosetta F.1 design pass) #2705's residue.Status snapshot (updated 2026-09-07)
Phases 0–2 done; Phase 3 in progress; Phase 4 not started. Corpus is healthy — the remaining work is completing the sheet, not repairing a broken scoreboard.
Scoreboard: open-defect share 31 of 2296 comparable cells (1.4%) pending #2854/kr#94 merge, average consistency 93% (was 88% at the roadmap's start).
testwas the latest family cleared; every one of its 43 comparable cells is now in band.The sheet — 68 rows, 6
stated(9%), 62draft:apiargsbranchiostate_mutationtestfunc_startclass_start)rule-contract-audit(engine PR + corpus PR)kind/unit+ absence; batchable, no auditWhat percentage needs a contract, and how much is left:
raw_arch_api/risk_api_exposure/risk_documentation/risk_tech_debt/func_complexity_gini), plus the stated-contract corollary fixes (cobol args −92%: the overlap-cost rejection was priced before #2729 planted ENTRY on every paragraph — the api cost it avoids is already paid #2804 corpus half, state_mutation: python, embedded_python and ruby never count a plain re-assignment (narrower than the #2765 contract) #2817, abap args counts call-site parameter keywords (CALL FUNCTION ... EXPORTING, PERFORM ... CHANGING) as declared parameters #2824, api_declared_orphans tokenizes api lines with\b\w+\b, so a hyphenated or qualified name is never recognised as already-declared (#2731's double count returns for cobol and scheme) #2827, branch still counts the break/continue family: the unconditional transfers #2822 deferred #2832, branch counts non-decision tokens the #2822 audit measured but did not touch: ruby bare ?, java bare :, python with #2833). Estimate: ~8 Phase-3 sessions + ~6 Phase-4 PRs + ~6 corollary fixes, then a single batch PR to state the 41 domain sensors and close the sheet.Housekeeping owed (not blocking)
gitgalaxy/standards/fidelity_table.pyis stale against corpus main (tests/tools/fidelity_table.py --checkfails onmainsince keyword-rosetta#74) — regen owed by the next PR touching the fidelity layer.gitgalaxy/tests.py,gen_tests.py,parse_regex.py,regexes.txt,temp_search.txt) trip the local ruff/mypy audits; CLAUDE.md's scratch rule applies.Issue disposition
statedcontracts (args/state_mutation/api/branch/io→cleanup); do not block Phase 3 closeclasses_founddeclaration-requirement stratum, Phase 3 structure)