Skip to content

Commit faa21ab

Browse files
V45 Gate 9: Define Gate Taxonomy Readiness
Classify V45 gate types before formal specification consolidation, including notes atoms, formal spec consolidation, parity matrix, proof-only, interface-only, implementation, rehearsal, and promotion gates. Add a focused Gate 9 checker and package script while preserving the V44 active canon pointer.
1 parent 6e0972f commit faa21ab

3 files changed

Lines changed: 216 additions & 0 deletions

File tree

BITCODE_SPEC_V45_NOTES.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,68 @@ than authority, Bitcoin finality as payment truth, storage and repository roots
618618
as delivery truth, database projections as reconciled read models, and
619619
fail-closed repair for every evidence mismatch.
620620

621+
## V45 protocol-development atom 8: gate taxonomy and formal spec readiness
622+
623+
Audit classification: the opening V45 questions have now been reduced into
624+
accepted notes-level protocol atoms for Bitcode identity, AssetPack lifecycle,
625+
BTD scalar-volume, BTC settlement, notes-to-spec sequencing, interface
626+
authority, disclosure boundaries, proof readback, and operational authority.
627+
The remaining opening question is process taxonomy: which gates are allowed to
628+
change notes, formal specification, parity matrices, proofs, interfaces,
629+
implementations, rehearsals, and promotion state.
630+
631+
Protocol-development law:
632+
633+
V45 gates must be classified before the formal specification consolidation
634+
begins. A gate's class defines what it may change, what it must not claim, and
635+
which proof obligations close it. No gate may claim a stronger class than its
636+
accepted artifacts prove. Notes-level atom gates are discussion-to-law
637+
preparation; formal specification gates are draft canon authoring; parity gates
638+
are implementation audit; proof-only gates harden validation; interface-only
639+
gates adjust protocol windows; implementation gates close audited parity gaps;
640+
rehearsal gates prove whole-system behavior; promotion gates alone may advance
641+
`BITCODE_SPEC.txt`.
642+
643+
The canonical V45 gate taxonomy is:
644+
645+
| Gate class | Allowed output | Required closure evidence | Forbidden shortcut |
646+
| --- | --- | --- | --- |
647+
| `notes-specification-atom` | one small accepted note atom in `BITCODE_SPEC_V45_NOTES.md` plus its checker | local atom check, prior atom checks, draft-canon posture check, clean diff, PR into `version/v45` | changing source behavior, claiming implementation parity, or updating `BITCODE_SPEC.txt` |
648+
| `formal-specification-consolidation` | V45 specification family documents updated from all accepted notes atoms | spec-family validation, terminology reconciliation, prior notes checks, generated proof posture when applicable | auditing implementation from loose notes or leaving accepted atoms outside the formal spec |
649+
| `specification-parity-matrix` | matrix mapping formal V45 law to code, tests, proofs, workflows, docs, generated artifacts, and interfaces | cited formal V45 specification sections, source-grounded audit, categorized gaps, closure groups | using PR discussion, memory, or notes as primary implementation authority |
650+
| `proof-only` | validators, generated proofs, workflow checks, replay checks, or CI hardening | deterministic command output, CI greenability, no product-state mutation unless specified | silently changing protocol behavior under validation work |
651+
| `interface-only` | source-safe UX/UI, route, API/MCP, ChatGPT App, Bitcode Chat, docs, or landing-page presentation changes | entitlement/disclosure trace to formal spec, accessible UI proof when relevant, read-model tests | making interface copy or telemetry authoritative over protocol readback |
652+
| `implementation` | commercial source code, schemas, APIs, pipelines, storage, ledger, settlement, delivery, or package behavior closing accepted parity gaps | focused tests, integration proof where relevant, source-safety checks, parity row closure | implementing behavior not traced to formal spec and parity matrix |
653+
| `rehearsal` | end-to-end proof run, browser/API/database/ledger/storage replay, staged or local system validation | replayable receipts, logs, screenshots when relevant, ledger/database/storage reconciliation | counting a mocked unit test as whole-system commercial proof |
654+
| `promotion` | formal version promotion PR into `main` and promotion workflow result | complete gate ledger, green promotion workflow, generated proof update, standalone `BITCODE_SPEC.txt` pointer update after validations | promoting while accepted gates, parity gaps, proofs, or required checks remain open |
655+
656+
Readiness law:
657+
658+
- The notes-specification atom set for the V45 opening is complete enough to
659+
begin formal specification consolidation after this atom is accepted.
660+
- Formal consolidation must preserve the accepted semantics of all notes atoms:
661+
AssetPack as commodity, Need-relative BTD scalar-volume, BTC settlement
662+
finality, source-safe disclosure boundaries, proof-backed readback, and
663+
fail-closed repair.
664+
- Formal consolidation may reorganize, rename headings, or split sections for
665+
clarity, but it must not weaken or omit accepted atom law without an explicit
666+
new notes-specification atom.
667+
- After consolidation, the parity matrix gate must treat the formal V45
668+
specification family as the only implementation-audit authority.
669+
- Proof-only and interface-only gates may occur after the parity matrix when
670+
their changes close matrix rows; they are not loopholes for speculative
671+
product behavior.
672+
- Promotion remains prohibited until formal specification, parity, grouped
673+
implementation, proof, interface, rehearsal, and promotion-readiness gates
674+
are accepted according to this taxonomy.
675+
676+
Acceptance for this atom: later V45 process work may split gate classes or add
677+
stricter closure evidence, but it must preserve class-scoped authority,
678+
formal-specification consolidation as the next movement after accepted notes,
679+
parity auditing from the formal V45 specification, implementation only from
680+
accepted parity gaps, and `BITCODE_SPEC.txt` promotion only through the
681+
promotion gate.
682+
621683
## Non-goals during V45 opening
622684

623685
- Do not implement V45 gate behavior before the V45 intent discussion is

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,7 @@
394394
"check:v45-gate6": "node scripts/check-v45-gate6-spec-consolidation-sequencing.mjs",
395395
"check:v45-gate7": "node scripts/check-v45-gate7-interface-authority-disclosure-boundaries.mjs",
396396
"check:v45-gate8": "node scripts/check-v45-gate8-proof-readback-operational-boundaries.mjs",
397+
"check:v45-gate9": "node scripts/check-v45-gate9-gate-taxonomy-formal-spec-readiness.mjs",
397398
"generate:v38-inference-surface-inventory": "node scripts/generate-v38-inference-surface-inventory.mjs",
398399
"check:v38-inference-surface-inventory": "node scripts/generate-v38-inference-surface-inventory.mjs --check",
399400
"check:v38-gate2": "node scripts/check-v38-gate2-inference-surface-inventory.mjs",
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
#!/usr/bin/env node
2+
3+
import { execFileSync } from 'node:child_process';
4+
import { existsSync, readFileSync } from 'node:fs';
5+
import path from 'node:path';
6+
import { fileURLToPath } from 'node:url';
7+
8+
const __filename = fileURLToPath(import.meta.url);
9+
const __dirname = path.dirname(__filename);
10+
const defaultRepoRoot = path.resolve(__dirname, '..');
11+
12+
function read(root, relativePath) {
13+
return readFileSync(path.join(root, relativePath), 'utf8');
14+
}
15+
16+
function exists(root, relativePath) {
17+
return existsSync(path.join(root, relativePath));
18+
}
19+
20+
function git(root, args) {
21+
return execFileSync('git', args, { cwd: root, encoding: 'utf8' }).trim();
22+
}
23+
24+
function assertCheck(failures, condition, message) {
25+
if (!condition) failures.push(message);
26+
}
27+
28+
function normalize(content) {
29+
return content.replace(/\s+/gu, ' ').trim();
30+
}
31+
32+
function parseArgs(argv) {
33+
const args = { repoRoot: defaultRepoRoot, skipBranchCheck: false };
34+
for (let index = 0; index < argv.length; index += 1) {
35+
const arg = argv[index];
36+
if (arg === '--repo-root') args.repoRoot = path.resolve(argv[++index]);
37+
else if (arg === '--skip-branch-check') args.skipBranchCheck = true;
38+
else if (arg === '--help' || arg === '-h') args.help = true;
39+
else throw new Error(`Unknown argument ${arg}`);
40+
}
41+
return args;
42+
}
43+
44+
function printHelp() {
45+
process.stdout.write(
46+
[
47+
'Usage: node scripts/check-v45-gate9-gate-taxonomy-formal-spec-readiness.mjs [--skip-branch-check] [--repo-root <path>]',
48+
'',
49+
'Checks the V45 gate taxonomy and formal specification readiness atom.',
50+
].join('\n'),
51+
);
52+
process.stdout.write('\n');
53+
}
54+
55+
function main() {
56+
const args = parseArgs(process.argv.slice(2));
57+
if (args.help) {
58+
printHelp();
59+
return;
60+
}
61+
62+
const root = args.repoRoot;
63+
const failures = [];
64+
const pointer = read(root, 'BITCODE_SPEC.txt').trim();
65+
66+
assertCheck(failures, pointer === 'V44', `BITCODE_SPEC.txt must remain V44 during V45 atom work. Observed ${pointer || 'empty'}.`);
67+
68+
if (!args.skipBranchCheck) {
69+
const branch = git(root, ['branch', '--show-current']);
70+
assertCheck(
71+
failures,
72+
branch === 'version/v45' || /^v45\/gate-\d+-[a-z0-9][a-z0-9-]*$/u.test(branch),
73+
`V45 work must occur on version/v45 or v45/gate-N-* branches. Observed ${branch || 'detached HEAD'}.`,
74+
);
75+
}
76+
77+
for (const relativePath of [
78+
'BITCODE_SPEC_V45_NOTES.md',
79+
'BITCODE_SPEC_V44.md',
80+
'BITCODE_SPEC.txt',
81+
'package.json',
82+
'scripts/check-v45-gate8-proof-readback-operational-boundaries.mjs',
83+
]) {
84+
assertCheck(failures, exists(root, relativePath), `Missing required V45 Gate 9 file: ${relativePath}`);
85+
}
86+
87+
const notes = read(root, 'BITCODE_SPEC_V45_NOTES.md');
88+
const normalizedNotes = normalize(notes);
89+
const packageJson = read(root, 'package.json');
90+
91+
for (const phrase of [
92+
'V45 protocol-development atom 8: gate taxonomy and formal spec readiness',
93+
'The remaining opening question is process taxonomy',
94+
'V45 gates must be classified before the formal specification consolidation begins',
95+
'No gate may claim a stronger class than its accepted artifacts prove',
96+
'Notes-level atom gates are discussion-to-law preparation',
97+
'formal specification gates are draft canon authoring',
98+
'parity gates are implementation audit',
99+
'proof-only gates harden validation',
100+
'interface-only gates adjust protocol windows',
101+
'implementation gates close audited parity gaps',
102+
'rehearsal gates prove whole-system behavior',
103+
'promotion gates alone may advance `BITCODE_SPEC.txt`',
104+
'The canonical V45 gate taxonomy is',
105+
'notes-specification-atom',
106+
'formal-specification-consolidation',
107+
'specification-parity-matrix',
108+
'proof-only',
109+
'interface-only',
110+
'implementation',
111+
'rehearsal',
112+
'promotion',
113+
'source-safe UX/UI',
114+
'entitlement/disclosure trace to formal spec',
115+
'using PR discussion, memory, or notes as primary implementation authority',
116+
'Readiness law',
117+
'The notes-specification atom set for the V45 opening is complete enough to begin formal specification consolidation',
118+
'Formal consolidation must preserve the accepted semantics of all notes atoms',
119+
'AssetPack as commodity, Need-relative BTD scalar-volume, BTC settlement finality',
120+
'After consolidation, the parity matrix gate must treat the formal V45 specification family as the only implementation-audit authority',
121+
'Promotion remains prohibited until formal specification, parity, grouped implementation, proof, interface, rehearsal, and promotion-readiness gates are accepted',
122+
'Acceptance for this atom',
123+
'formal-specification consolidation as the next movement after accepted notes',
124+
'parity auditing from the formal V45 specification',
125+
'implementation only from accepted parity gaps',
126+
'`BITCODE_SPEC.txt` promotion only through the promotion gate',
127+
]) {
128+
assertCheck(failures, normalizedNotes.includes(phrase), `V45 Gate 9 notes must include phrase: ${phrase}`);
129+
}
130+
131+
assertCheck(
132+
failures,
133+
packageJson.includes('"check:v45-gate9": "node scripts/check-v45-gate9-gate-taxonomy-formal-spec-readiness.mjs"'),
134+
'package.json must expose check:v45-gate9.',
135+
);
136+
137+
if (failures.length > 0) {
138+
process.stderr.write('V45 Gate 9 gate taxonomy and formal spec readiness check failed:\n');
139+
for (const failure of failures) process.stderr.write(`- ${failure}\n`);
140+
process.exitCode = 1;
141+
return;
142+
}
143+
144+
process.stdout.write('V45 Gate 9 gate taxonomy and formal spec readiness check passed.\n');
145+
}
146+
147+
try {
148+
main();
149+
} catch (error) {
150+
const detail = error instanceof Error ? error.message : String(error);
151+
process.stderr.write(`${detail}\n`);
152+
process.exitCode = 1;
153+
}

0 commit comments

Comments
 (0)