@fundamental-engine/core 0.9.4 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/dist/engine/field.d.ts.map +1 -1
  2. package/dist/engine/field.js +10 -0
  3. package/dist/engine/field.js.map +1 -1
  4. package/dist/engine/types.d.ts +29 -0
  5. package/dist/engine/types.d.ts.map +1 -1
  6. package/dist/inspect/report.js +2 -2
  7. package/dist/inspect/report.js.map +1 -1
  8. package/dist/recipes/catalog.d.ts +14 -9
  9. package/dist/recipes/catalog.d.ts.map +1 -1
  10. package/dist/recipes/catalog.js +9 -5
  11. package/dist/recipes/catalog.js.map +1 -1
  12. package/dist/recipes/compile.d.ts +26 -16
  13. package/dist/recipes/compile.d.ts.map +1 -1
  14. package/dist/recipes/compile.js +14 -10
  15. package/dist/recipes/compile.js.map +1 -1
  16. package/dist/recipes/index.d.ts +2 -0
  17. package/dist/recipes/index.d.ts.map +1 -1
  18. package/dist/recipes/index.js +5 -3
  19. package/dist/recipes/index.js.map +1 -1
  20. package/dist/recipes/schema.d.ts +27 -17
  21. package/dist/recipes/schema.d.ts.map +1 -1
  22. package/dist/recipes/schema.js +11 -6
  23. package/dist/recipes/schema.js.map +1 -1
  24. package/dist/recipes/wayfinding.d.ts +1 -1
  25. package/dist/version.d.ts +1 -1
  26. package/dist/version.d.ts.map +1 -1
  27. package/dist/version.js +1 -1
  28. package/dist/version.js.map +1 -1
  29. package/dist/world/ablation/ablation.d.ts +39 -0
  30. package/dist/world/ablation/ablation.d.ts.map +1 -0
  31. package/dist/world/ablation/ablation.js +449 -0
  32. package/dist/world/ablation/ablation.js.map +1 -0
  33. package/dist/world/adapters/field-runtime.d.ts +56 -0
  34. package/dist/world/adapters/field-runtime.d.ts.map +1 -0
  35. package/dist/world/adapters/field-runtime.js +250 -0
  36. package/dist/world/adapters/field-runtime.js.map +1 -0
  37. package/dist/world/adapters/fsm-runtime.d.ts +18 -0
  38. package/dist/world/adapters/fsm-runtime.d.ts.map +1 -0
  39. package/dist/world/adapters/fsm-runtime.js +153 -0
  40. package/dist/world/adapters/fsm-runtime.js.map +1 -0
  41. package/dist/world/adapters/governor-runtime.d.ts +23 -0
  42. package/dist/world/adapters/governor-runtime.d.ts.map +1 -0
  43. package/dist/world/adapters/governor-runtime.js +185 -0
  44. package/dist/world/adapters/governor-runtime.js.map +1 -0
  45. package/dist/world/adapters/planner-runtime.d.ts +20 -0
  46. package/dist/world/adapters/planner-runtime.d.ts.map +1 -0
  47. package/dist/world/adapters/planner-runtime.js +144 -0
  48. package/dist/world/adapters/planner-runtime.js.map +1 -0
  49. package/dist/world/conformance/corpus.d.ts +89 -0
  50. package/dist/world/conformance/corpus.d.ts.map +1 -0
  51. package/dist/world/conformance/corpus.js +195 -0
  52. package/dist/world/conformance/corpus.js.map +1 -0
  53. package/dist/world/conformance/discoveries.d.ts +50 -0
  54. package/dist/world/conformance/discoveries.d.ts.map +1 -0
  55. package/dist/world/conformance/discoveries.js +71 -0
  56. package/dist/world/conformance/discoveries.js.map +1 -0
  57. package/dist/world/conformance/evidence.d.ts +37 -0
  58. package/dist/world/conformance/evidence.d.ts.map +1 -0
  59. package/dist/world/conformance/evidence.js +53 -0
  60. package/dist/world/conformance/evidence.js.map +1 -0
  61. package/dist/world/conformance/negative-results.d.ts +57 -0
  62. package/dist/world/conformance/negative-results.d.ts.map +1 -0
  63. package/dist/world/conformance/negative-results.js +73 -0
  64. package/dist/world/conformance/negative-results.js.map +1 -0
  65. package/dist/world/conformance/predictions.d.ts +66 -0
  66. package/dist/world/conformance/predictions.d.ts.map +1 -0
  67. package/dist/world/conformance/predictions.js +141 -0
  68. package/dist/world/conformance/predictions.js.map +1 -0
  69. package/dist/world/cross-substrate.d.ts +19 -0
  70. package/dist/world/cross-substrate.d.ts.map +1 -0
  71. package/dist/world/cross-substrate.js +123 -0
  72. package/dist/world/cross-substrate.js.map +1 -0
  73. package/dist/world/dynamics.d.ts +166 -0
  74. package/dist/world/dynamics.d.ts.map +1 -0
  75. package/dist/world/dynamics.js +30 -0
  76. package/dist/world/dynamics.js.map +1 -0
  77. package/dist/world/envelope.d.ts +44 -0
  78. package/dist/world/envelope.d.ts.map +1 -0
  79. package/dist/world/envelope.js +77 -0
  80. package/dist/world/envelope.js.map +1 -0
  81. package/dist/world/episodes/episodes.d.ts +64 -0
  82. package/dist/world/episodes/episodes.d.ts.map +1 -0
  83. package/dist/world/episodes/episodes.js +104 -0
  84. package/dist/world/episodes/episodes.js.map +1 -0
  85. package/dist/world/equivalence.d.ts +70 -0
  86. package/dist/world/equivalence.d.ts.map +1 -0
  87. package/dist/world/equivalence.js +205 -0
  88. package/dist/world/equivalence.js.map +1 -0
  89. package/dist/world/experiments/declarative-dynamics.d.ts +87 -0
  90. package/dist/world/experiments/declarative-dynamics.d.ts.map +1 -0
  91. package/dist/world/experiments/declarative-dynamics.js +153 -0
  92. package/dist/world/experiments/declarative-dynamics.js.map +1 -0
  93. package/dist/world/governor-equivalence.d.ts +51 -0
  94. package/dist/world/governor-equivalence.d.ts.map +1 -0
  95. package/dist/world/governor-equivalence.js +126 -0
  96. package/dist/world/governor-equivalence.js.map +1 -0
  97. package/dist/world/kernel.d.ts +49 -0
  98. package/dist/world/kernel.d.ts.map +1 -0
  99. package/dist/world/kernel.js +64 -0
  100. package/dist/world/kernel.js.map +1 -0
  101. package/dist/world/observatory/capture.d.ts +10 -0
  102. package/dist/world/observatory/capture.d.ts.map +1 -0
  103. package/dist/world/observatory/capture.js +371 -0
  104. package/dist/world/observatory/capture.js.map +1 -0
  105. package/dist/world/observatory/evidence-log.d.ts +131 -0
  106. package/dist/world/observatory/evidence-log.d.ts.map +1 -0
  107. package/dist/world/observatory/evidence-log.js +43 -0
  108. package/dist/world/observatory/evidence-log.js.map +1 -0
  109. package/dist/world/opportunity/opportunity.d.ts +85 -0
  110. package/dist/world/opportunity/opportunity.d.ts.map +1 -0
  111. package/dist/world/opportunity/opportunity.js +67 -0
  112. package/dist/world/opportunity/opportunity.js.map +1 -0
  113. package/dist/world/projection/evidence-profile.d.ts +51 -0
  114. package/dist/world/projection/evidence-profile.d.ts.map +1 -0
  115. package/dist/world/projection/evidence-profile.js +93 -0
  116. package/dist/world/projection/evidence-profile.js.map +1 -0
  117. package/dist/world/projection/projection.d.ts +162 -0
  118. package/dist/world/projection/projection.d.ts.map +1 -0
  119. package/dist/world/projection/projection.js +145 -0
  120. package/dist/world/projection/projection.js.map +1 -0
  121. package/dist/world/properties/properties.d.ts +87 -0
  122. package/dist/world/properties/properties.d.ts.map +1 -0
  123. package/dist/world/properties/properties.js +172 -0
  124. package/dist/world/properties/properties.js.map +1 -0
  125. package/dist/world/substrates/fsm.d.ts +59 -0
  126. package/dist/world/substrates/fsm.d.ts.map +1 -0
  127. package/dist/world/substrates/fsm.js +57 -0
  128. package/dist/world/substrates/fsm.js.map +1 -0
  129. package/dist/world/substrates/governor.d.ts +53 -0
  130. package/dist/world/substrates/governor.d.ts.map +1 -0
  131. package/dist/world/substrates/governor.js +73 -0
  132. package/dist/world/substrates/governor.js.map +1 -0
  133. package/dist/world/substrates/planner.d.ts +82 -0
  134. package/dist/world/substrates/planner.d.ts.map +1 -0
  135. package/dist/world/substrates/planner.js +114 -0
  136. package/dist/world/substrates/planner.js.map +1 -0
  137. package/dist/world/world.d.ts +73 -0
  138. package/dist/world/world.d.ts.map +1 -0
  139. package/dist/world/world.js +2 -0
  140. package/dist/world/world.js.map +1 -0
  141. package/package.json +1 -1
@@ -0,0 +1,195 @@
1
+ /**
2
+ * Substrate conformance corpus (EXPERIMENTAL, internal).
3
+ *
4
+ * The corpus answers one measured question, pre-registered in
5
+ * `docs/planning/world-substrate/substrate-conformance-corpus.md`:
6
+ *
7
+ * How little does DynamicsContract change as independently-written substrates are adapted to it?
8
+ *
9
+ * Two pieces live here: a **churn ledger** (what each substrate cost the contract, and whether the cost
10
+ * was a missing general concept or a rejected convenience) and a **substrate-agnostic conformance
11
+ * battery** that exercises any contract through the generic surface only — if the battery ever needs to
12
+ * know which substrate it is driving, the abstraction has failed.
13
+ */
14
+ import { hostWorld } from "../kernel.js";
15
+ import { validateDynamicsContract } from "../dynamics.js";
16
+ /** Weights fixed by the pre-registration; not tunable after the fact. */
17
+ export const CHURN_WEIGHTS = {
18
+ 'required-member': 3,
19
+ 'optional-member': 1,
20
+ 'union-variant': 1,
21
+ 'consistency-rule': 1,
22
+ 'changed-semantics': 3,
23
+ };
24
+ export function churnOf(changes) {
25
+ return changes.reduce((sum, c) => sum + CHURN_WEIGHTS[c.churnClass], 0);
26
+ }
27
+ /**
28
+ * The corpus as it actually stands. Adapted entries record what each substrate cost; pending entries
29
+ * record what is not yet evidence. `pending` rows must never be read as support for generality.
30
+ */
31
+ export function corpus() {
32
+ return [
33
+ {
34
+ substrate: 'FieldRuntime',
35
+ role: 'continuous, opaque, non-terminating',
36
+ status: 'adapted',
37
+ executionKind: 'opaque-native',
38
+ outcome: 'generalized-with-refinement',
39
+ changes: [],
40
+ rejectedChanges: [],
41
+ note: 'the substrate the contract was extracted from; establishes nothing about generality on its own',
42
+ },
43
+ {
44
+ substrate: 'QualityGovernor',
45
+ role: 'discrete thresholds, declared law, non-terminating',
46
+ status: 'adapted',
47
+ executionKind: 'interpreted',
48
+ outcome: 'generalized-with-refinement',
49
+ changes: [
50
+ {
51
+ member: 'describeTransitionLaw()',
52
+ churnClass: 'optional-member',
53
+ classification: 'structural',
54
+ rationale: 'declareTransitionLaw could be claimed truthfully with no way to obtain the law — a capability that cannot be exercised is incoherent',
55
+ },
56
+ {
57
+ member: 'declareTransitionLaw ⇔ describeTransitionLaw',
58
+ churnClass: 'consistency-rule',
59
+ classification: 'structural',
60
+ rationale: 'the capability and the accessor must agree in both directions',
61
+ },
62
+ ],
63
+ rejectedChanges: [],
64
+ },
65
+ {
66
+ substrate: 'FiniteStateMachine',
67
+ role: 'control — expected to require zero change',
68
+ status: 'adapted',
69
+ executionKind: 'declarative',
70
+ outcome: 'generalized-with-refinement',
71
+ predictedChurn: 0,
72
+ changes: [
73
+ {
74
+ member: 'Transition.lifecycle',
75
+ churnClass: 'optional-member',
76
+ classification: 'structural',
77
+ rationale: 'accepting states finish; without a generic terminal signal a kernel must read substrate-specific output to know whether to keep advancing',
78
+ },
79
+ ],
80
+ rejectedChanges: [],
81
+ note: 'PREDICTION FALSIFIED (predicted 0, actual 1). The control exposing the gap is the stronger result: termination is general, not search-specific.',
82
+ },
83
+ {
84
+ substrate: 'SearchPlanner',
85
+ role: 'falsification candidate — terminates, partially declarable law',
86
+ status: 'adapted',
87
+ executionKind: 'hybrid',
88
+ outcome: 'generalized',
89
+ predictedChurn: 1,
90
+ changes: [], // the FSM had already paid for termination
91
+ rejectedChanges: [
92
+ {
93
+ member: 'TransitionLawDescription.completeness',
94
+ classification: 'convenience',
95
+ rationale: 'declareTransitionLaw:false already answers truthfully — this substrate cannot declare THE law; publishing part of it is a feature request, not a missing concept',
96
+ },
97
+ ],
98
+ note: 'first substrate to exercise executionKind "hybrid", declared in F1.3 but never used until now',
99
+ },
100
+ { substrate: 'EventSourcedAggregate', role: 'replay-semantics probe', status: 'pending', outcome: 'not-yet-run', predictedChurn: 0, changes: [], rejectedChanges: [] },
101
+ { substrate: 'WorkflowEngine', role: 'external/async effects', status: 'pending', outcome: 'not-yet-run', changes: [], rejectedChanges: [] },
102
+ { substrate: 'RuleEngine', role: 'declarative law, conflict resolution', status: 'pending', outcome: 'not-yet-run', changes: [], rejectedChanges: [] },
103
+ { substrate: 'GameTurnSystem', role: 'multi-participant turn order', status: 'pending', outcome: 'not-yet-run', changes: [], rejectedChanges: [] },
104
+ ];
105
+ }
106
+ export function corpusLedger() {
107
+ const entries = corpus();
108
+ const adapted = entries.filter((e) => e.status === 'adapted');
109
+ const last = adapted[adapted.length - 1];
110
+ return {
111
+ adapted: adapted.length,
112
+ pending: entries.length - adapted.length,
113
+ totalChurn: adapted.reduce((sum, e) => sum + churnOf(e.changes), 0),
114
+ churnBySubstrate: adapted.map((e) => ({ substrate: e.substrate, churn: churnOf(e.changes), ...(e.predictedChurn !== undefined ? { predicted: e.predictedChurn } : {}) })),
115
+ executionKindsExercised: [...new Set(adapted.map((e) => e.executionKind).filter((k) => k !== undefined))],
116
+ convergingOnLastAdapted: last !== undefined && churnOf(last.changes) === 0,
117
+ structuralAccepted: adapted.reduce((n, e) => n + e.changes.filter((c) => c.classification === 'structural').length, 0),
118
+ representationalAccepted: adapted.reduce((n, e) => n + e.changes.filter((c) => c.classification === 'representational').length, 0),
119
+ conveniencesAccepted: adapted.reduce((n, e) => n + e.changes.filter((c) => c.classification === 'convenience').length, 0),
120
+ conveniencesRejected: adapted.reduce((n, e) => n + e.rejectedChanges.length, 0),
121
+ };
122
+ }
123
+ function finding(check, passed, detail) {
124
+ return { check, passed, detail };
125
+ }
126
+ /**
127
+ * Drive any contract through the GENERIC surface only and report what it does. Deliberately knows
128
+ * nothing about any substrate: it reads capabilities and behaves accordingly, so a substrate cannot
129
+ * pass by being recognized.
130
+ */
131
+ export function runConformance(makeWorld, makeContract, inputs) {
132
+ const findings = [];
133
+ const world = makeWorld();
134
+ const contract = makeContract(world);
135
+ const problems = validateDynamicsContract(contract);
136
+ findings.push(finding('declarations self-consistent', problems.length === 0, problems.map((p) => p.rule).join(', ') || 'no problems'));
137
+ const host = hostWorld(world, contract);
138
+ let transitions = 0;
139
+ let terminated = false;
140
+ let lifecycleSeen = false;
141
+ for (const input of inputs) {
142
+ const r = host.advance(input);
143
+ if (!r.ok) {
144
+ findings.push(finding('advance succeeded', false, `failed at ${transitions}: ${r.error.code}`));
145
+ break;
146
+ }
147
+ transitions++;
148
+ if (host.lastLifecycle === 'terminal') {
149
+ terminated = true;
150
+ lifecycleSeen = true;
151
+ break;
152
+ }
153
+ }
154
+ findings.push(finding('advance succeeded', true, `${transitions} transition(s)`));
155
+ // terminal substrates must be IDEMPOTENT: asking again is neither progress nor an error
156
+ if (terminated) {
157
+ const again = host.advance(inputs[inputs.length - 1]);
158
+ findings.push(finding('terminal is idempotent', again.ok && host.lastLifecycle === 'terminal', again.ok ? `still ${host.lastLifecycle}` : `errored: ${again.error.code}`));
159
+ }
160
+ // snapshot / restore, driven purely by declared capability
161
+ if (contract.capabilities.snapshot) {
162
+ const snap = host.readState();
163
+ findings.push(finding('snapshot available', snap.ok, snap.ok ? `restorable=${snap.value.restorable}` : 'failed'));
164
+ if (snap.ok && contract.capabilities.restore) {
165
+ const restored = contract.restore(snap.value, { step: 0 });
166
+ findings.push(finding('restore round-trips', restored.ok, restored.ok ? 'state reconstructed' : 'restore failed'));
167
+ findings.push(finding('restore matches snapshot claim', snap.value.restorable === true, 'a restorable capability requires a restorable snapshot'));
168
+ }
169
+ }
170
+ // determinism: a contract declaring `deterministic` must produce identical readings twice
171
+ if (contract.determinism.classification === 'deterministic') {
172
+ const w2 = makeWorld();
173
+ const h2 = hostWorld(w2, makeContract(w2));
174
+ for (const input of inputs.slice(0, transitions))
175
+ h2.advance(input);
176
+ const a = host.readState();
177
+ const b = h2.readState();
178
+ const same = a.ok && b.ok && JSON.stringify(a.value.reading.metrics) === JSON.stringify(b.value.reading.metrics);
179
+ findings.push(finding('declared determinism holds', same, same ? 'identical readings' : 'readings diverged'));
180
+ }
181
+ if (contract.capabilities.declareTransitionLaw) {
182
+ const law = contract.describeTransitionLaw();
183
+ findings.push(finding('declared law retrievable', law.ok, law.ok ? `${law.value.rules.length} rule(s)` : 'failed'));
184
+ }
185
+ host.dispose();
186
+ return {
187
+ contract: contract.identity.id,
188
+ executionKind: contract.executionKind,
189
+ findings,
190
+ conformant: findings.every((f) => f.passed),
191
+ terminated: terminated || lifecycleSeen,
192
+ transitions,
193
+ };
194
+ }
195
+ //# sourceMappingURL=corpus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"corpus.js","sourceRoot":"","sources":["../../../src/world/conformance/corpus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,O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CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;QAC3C,UAAU,EAAE,UAAU,IAAI,aAAa;QACvC,WAAW;KACZ,CAAC;AACJ,CAAC"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Discovery registry (EXPERIMENTAL, internal).
3
+ *
4
+ * A **discovery** is a concept the contract was missing, found because a substrate could not be
5
+ * expressed without it. Discoveries get permanent identifiers because they are the empirical record of
6
+ * how this theory changed — and unlike a changelog entry, an identifier survives refactoring, renaming
7
+ * and rewriting.
8
+ *
9
+ * The registry exists to make one property auditable: **the contract is only ever allowed to change
10
+ * because reality demanded it.** There is deliberately no procedure anywhere in this program called
11
+ * "design a better contract". A discovery must name the substrate that forced it and the reason the
12
+ * prior contract was incoherent or incomplete — not merely improvable.
13
+ *
14
+ * A `representational` refinement is NOT a discovery. It expresses an existing concept better; it finds
15
+ * nothing. Recording it separately keeps the discovery count honest.
16
+ */
17
+ import type { ContractChange } from './corpus.ts';
18
+ import type { EvidenceProvenance } from './evidence.ts';
19
+ export type DiscoveryId = `D-${string}`;
20
+ export interface Discovery {
21
+ readonly id: DiscoveryId;
22
+ readonly concept: string;
23
+ /** The substrate whose adaptation made the gap visible. */
24
+ readonly discoveredBy: string;
25
+ /** Why the PRIOR contract was wrong — incoherent or incomplete, not merely improvable. */
26
+ readonly reason: string;
27
+ /** Why no existing substrate could have revealed it. This is what makes it a discovery. */
28
+ readonly invisibleBecause: string;
29
+ readonly accepted: string;
30
+ /** Where the evidence came from. A discovery must not rest on an architectural argument. */
31
+ readonly provenance: EvidenceProvenance;
32
+ /** The contract changes this discovery cost. A discovery may cost more than one change. */
33
+ readonly changes: readonly ContractChange[];
34
+ /** Concepts deliberately NOT added at the same time, and why. Guards against over-generalizing. */
35
+ readonly deliberatelyExcluded?: readonly string[];
36
+ }
37
+ /**
38
+ * Every accepted structural refinement, in discovery order. Identifiers are permanent: an entry may be
39
+ * superseded or corrected, never renumbered or removed.
40
+ */
41
+ export declare function discoveries(): Discovery[];
42
+ export interface DiscoveryLedger {
43
+ readonly count: number;
44
+ readonly bySubstrate: Readonly<Record<string, number>>;
45
+ readonly totalChanges: number;
46
+ readonly exclusionsRecorded: number;
47
+ }
48
+ export declare function discoveryLedger(): DiscoveryLedger;
49
+ export declare function discoveryById(id: DiscoveryId): Discovery | undefined;
50
+ //# sourceMappingURL=discoveries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discoveries.d.ts","sourceRoot":"","sources":["../../../src/world/conformance/discoveries.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD,MAAM,MAAM,WAAW,GAAG,KAAK,MAAM,EAAE,CAAC;AAExC,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,EAAE,WAAW,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,2DAA2D;IAC3D,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,0FAA0F;IAC1F,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,2FAA2F;IAC3F,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,4FAA4F;IAC5F,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;IACxC,2FAA2F;IAC3F,QAAQ,CAAC,OAAO,EAAE,SAAS,cAAc,EAAE,CAAC;IAC5C,mGAAmG;IACnG,QAAQ,CAAC,oBAAoB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACnD;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,SAAS,EAAE,CAsDzC;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACvD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;CACrC;AAED,wBAAgB,eAAe,IAAI,eAAe,CAUjD;AAED,wBAAgB,aAAa,CAAC,EAAE,EAAE,WAAW,GAAG,SAAS,GAAG,SAAS,CAEpE"}
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Every accepted structural refinement, in discovery order. Identifiers are permanent: an entry may be
3
+ * superseded or corrected, never renumbered or removed.
4
+ */
5
+ export function discoveries() {
6
+ return [
7
+ {
8
+ id: 'D-001',
9
+ concept: 'transition-law retrieval',
10
+ discoveredBy: 'QualityGovernor',
11
+ reason: 'a capability that cannot be exercised is incoherent: `declareTransitionLaw` could be set truthfully while the contract offered no way to obtain the law',
12
+ invisibleBecause: 'the only prior substrate (FieldRuntime) is opaque-native and declares the capability false, so the unusable branch was never taken',
13
+ accepted: '2026-07-19',
14
+ provenance: 'revealed-by-independent-substrate',
15
+ changes: [
16
+ {
17
+ member: 'describeTransitionLaw()',
18
+ churnClass: 'optional-member',
19
+ classification: 'structural',
20
+ rationale: 'the capability must be exercisable, or it asserts something the contract cannot honour',
21
+ },
22
+ {
23
+ member: 'declareTransitionLaw <-> describeTransitionLaw',
24
+ churnClass: 'consistency-rule',
25
+ classification: 'structural',
26
+ rationale: 'capability and accessor must agree in both directions, so neither can be claimed silently',
27
+ },
28
+ ],
29
+ deliberatelyExcluded: [
30
+ 'TransitionLawDescription.completeness — rejected as a convenience when the planner wanted to publish a partial law',
31
+ ],
32
+ },
33
+ {
34
+ id: 'D-002',
35
+ concept: 'termination',
36
+ discoveredBy: 'FiniteStateMachine',
37
+ reason: 'the contract could not express termination without leaking substrate semantics: a kernel could only learn a substrate was finished by reading substrate-specific output, which is the abstraction leak the contract exists to prevent',
38
+ invisibleBecause: 'neither prior substrate ever finishes — a field simulates indefinitely and a governor consumes frames indefinitely — so termination was not absent from the contract, it was unobservable',
39
+ accepted: '2026-07-19',
40
+ provenance: 'revealed-by-independent-substrate',
41
+ changes: [
42
+ {
43
+ member: 'Transition.lifecycle',
44
+ churnClass: 'optional-member',
45
+ classification: 'structural',
46
+ rationale: 'a substrate must be able to say that no further transition is defined, generically',
47
+ },
48
+ ],
49
+ deliberatelyExcluded: [
50
+ 'the finished-with-result vs finished-without split (goal-reached vs exhausted) — both corpus substrates exhibit it, but the evidence only forces "must the kernel keep going?"',
51
+ 'folding lifecycle into advance\'s result shape — better long-term design, deferred to avoid perturbing the F1.4 equivalence authority mid-program',
52
+ ],
53
+ },
54
+ ];
55
+ }
56
+ export function discoveryLedger() {
57
+ const all = discoveries();
58
+ const bySubstrate = {};
59
+ for (const d of all)
60
+ bySubstrate[d.discoveredBy] = (bySubstrate[d.discoveredBy] ?? 0) + 1;
61
+ return {
62
+ count: all.length,
63
+ bySubstrate,
64
+ totalChanges: all.reduce((n, d) => n + d.changes.length, 0),
65
+ exclusionsRecorded: all.reduce((n, d) => n + (d.deliberatelyExcluded?.length ?? 0), 0),
66
+ };
67
+ }
68
+ export function discoveryById(id) {
69
+ return discoveries().find((d) => d.id === id);
70
+ }
71
+ //# sourceMappingURL=discoveries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discoveries.js","sourceRoot":"","sources":["../../../src/world/conformance/discoveries.ts"],"names":[],"mappings":"AAuCA;;;GAGG;AACH,MAAM,UAAU,WAAW;IACzB,OAAO;QACL;YACE,EAAE,EAAE,OAAO;YACX,OAAO,EAAE,0BAA0B;YACnC,YAAY,EAAE,iBAAiB;YAC/B,MAAM,EACJ,yJAAyJ;YAC3J,gBAAgB,EACd,oIAAoI;YACtI,QAAQ,EAAE,YAAY;YACtB,UAAU,EAAE,mCAAmC;YAC/C,OAAO,EAAE;gBACP;oBACE,MAAM,EAAE,yBAAyB;oBACjC,UAAU,EAAE,iBAA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AC,CAAC,CAAC,oBAAoB,EAAE,MAAM,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;KACvF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,EAAe;IAC3C,OAAO,WAAW,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;AAChD,CAAC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Evidence provenance (EXPERIMENTAL, internal).
3
+ *
4
+ * Maturity and provenance are different dimensions and were previously conflated. Two claims can both
5
+ * be "fixture-supported" while differing completely in what backs them: one may exercise a mechanism
6
+ * that already existed and could have behaved otherwise, the other may only exercise an API introduced
7
+ * in the same commit as the test. The first can fail; the second is a tautology with assertions.
8
+ *
9
+ * So every claim and every discovery carries BOTH a maturity level and a provenance, and provenance
10
+ * carries an independence rating that is a property of the source, not of the author's confidence.
11
+ */
12
+ export type EvidenceProvenance =
13
+ /** Fell out of a mechanism built earlier for another purpose — it could have come out otherwise. */
14
+ 'emerged-from-prior-mechanism'
15
+ /** A substrate written without knowledge of the thing it ended up testing. */
16
+ | 'revealed-by-independent-substrate'
17
+ /** A test written to break the design, by someone or something not working from its internals. */
18
+ | 'independent-adversarial-test'
19
+ /** A test written against the API it was designed alongside. Cannot falsify its own design. */
20
+ | 'fixture-against-same-implementation'
21
+ /** Asserted by the design. No observation involved. */
22
+ | 'architectural-argument';
23
+ export type Independence = 'high' | 'medium' | 'low' | 'none';
24
+ export declare function independenceOf(provenance: EvidenceProvenance): Independence;
25
+ /** Maturity of a claim — how settled it is, independent of what backs it. */
26
+ export type EvidenceGrade = 'experimentally-grounded' | 'fixture-supported' | 'architectural-hypothesis';
27
+ export interface ProvenanceProblem {
28
+ readonly rule: string;
29
+ readonly detail: string;
30
+ }
31
+ /**
32
+ * Maturity may not outrun provenance. A claim cannot be `experimentally-grounded` on the strength of a
33
+ * fixture written against its own implementation, and a claim resting on an architectural argument
34
+ * cannot be anything but a hypothesis.
35
+ */
36
+ export declare function gradeProvenanceProblems(grade: EvidenceGrade, provenance: EvidenceProvenance): ProvenanceProblem[];
37
+ //# sourceMappingURL=evidence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evidence.d.ts","sourceRoot":"","sources":["../../../src/world/conformance/evidence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,MAAM,kBAAkB;AAC5B,oGAAoG;AAClG,8BAA8B;AAChC,8EAA8E;GAC5E,mCAAmC;AACrC,kGAAkG;GAChG,8BAA8B;AAChC,+FAA+F;GAC7F,qCAAqC;AACvC,uDAAuD;GACrD,wBAAwB,CAAC;AAE7B,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;AAE9D,wBAAgB,cAAc,CAAC,UAAU,EAAE,kBAAkB,GAAG,YAAY,CAY3E;AAED,6EAA6E;AAC7E,MAAM,MAAM,aAAa,GAAG,yBAAyB,GAAG,mBAAmB,GAAG,0BAA0B,CAAC;AAEzG,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,kBAAkB,GAAG,iBAAiB,EAAE,CAuBjH"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Evidence provenance (EXPERIMENTAL, internal).
3
+ *
4
+ * Maturity and provenance are different dimensions and were previously conflated. Two claims can both
5
+ * be "fixture-supported" while differing completely in what backs them: one may exercise a mechanism
6
+ * that already existed and could have behaved otherwise, the other may only exercise an API introduced
7
+ * in the same commit as the test. The first can fail; the second is a tautology with assertions.
8
+ *
9
+ * So every claim and every discovery carries BOTH a maturity level and a provenance, and provenance
10
+ * carries an independence rating that is a property of the source, not of the author's confidence.
11
+ */
12
+ export function independenceOf(provenance) {
13
+ switch (provenance) {
14
+ case 'emerged-from-prior-mechanism':
15
+ case 'revealed-by-independent-substrate':
16
+ return 'high';
17
+ case 'independent-adversarial-test':
18
+ return 'medium';
19
+ case 'fixture-against-same-implementation':
20
+ return 'low';
21
+ case 'architectural-argument':
22
+ return 'none';
23
+ }
24
+ }
25
+ /**
26
+ * Maturity may not outrun provenance. A claim cannot be `experimentally-grounded` on the strength of a
27
+ * fixture written against its own implementation, and a claim resting on an architectural argument
28
+ * cannot be anything but a hypothesis.
29
+ */
30
+ export function gradeProvenanceProblems(grade, provenance) {
31
+ const independence = independenceOf(provenance);
32
+ const problems = [];
33
+ if (grade === 'experimentally-grounded' && (independence === 'low' || independence === 'none')) {
34
+ problems.push({
35
+ rule: 'grounded-requires-independence',
36
+ detail: `experimentally-grounded requires high or medium independence, got ${independence} (${provenance})`,
37
+ });
38
+ }
39
+ if (grade === 'fixture-supported' && independence === 'none') {
40
+ problems.push({
41
+ rule: 'fixture-requires-observation',
42
+ detail: 'an architectural argument is not a fixture — this is a hypothesis',
43
+ });
44
+ }
45
+ if (grade === 'architectural-hypothesis' && independence !== 'none') {
46
+ problems.push({
47
+ rule: 'hypothesis-understates-evidence',
48
+ detail: `${provenance} is real evidence; grading it a hypothesis understates what is known`,
49
+ });
50
+ }
51
+ return problems;
52
+ }
53
+ //# sourceMappingURL=evidence.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evidence.js","sourceRoot":"","sources":["../../../src/world/conformance/evidence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAgBH,MAAM,UAAU,cAAc,CAAC,UAA8B;IAC3D,QAAQ,UAAU,EAAE,CAAC;QACnB,KAAK,8BAA8B,CAAC;QACpC,KAAK,mCAAmC;YACtC,OAAO,MAAM,CAAC;QAChB,KAAK,8BAA8B;YACjC,OAAO,QAAQ,CAAC;QAClB,KAAK,qCAAqC;YACxC,OAAO,KAAK,CAAC;QACf,KAAK,wBAAwB;YAC3B,OAAO,MAAM,CAAC;IAClB,CAAC;AACH,CAAC;AAUD;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAAoB,EAAE,UAA8B;IAC1F,MAAM,YAAY,GAAG,cAAc,CAAC,UAAU,CAAC,CAAC;IAChD,MAAM,QAAQ,GAAwB,EAAE,CAAC;IAEzC,IAAI,KAAK,KAAK,yBAAyB,IAAI,CAAC,YAAY,KAAK,KAAK,IAAI,YAAY,KAAK,MAAM,CAAC,EAAE,CAAC;QAC/F,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,gCAAgC;YACtC,MAAM,EAAE,qEAAqE,YAAY,KAAK,UAAU,GAAG;SAC5G,CAAC,CAAC;IACL,CAAC;IACD,IAAI,KAAK,KAAK,mBAAmB,IAAI,YAAY,KAAK,MAAM,EAAE,CAAC;QAC7D,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,8BAA8B;YACpC,MAAM,EAAE,mEAAmE;SAC5E,CAAC,CAAC;IACL,CAAC;IACD,IAAI,KAAK,KAAK,0BAA0B,IAAI,YAAY,KAAK,MAAM,EAAE,CAAC;QACpE,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,iCAAiC;YACvC,MAAM,EAAE,GAAG,UAAU,sEAAsE;SAC5F,CAAC,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Negative results registry (EXPERIMENTAL, internal).
3
+ *
4
+ * A negative result is a hypothesis that **survived pre-registration and adaptation and was then
5
+ * disproven**. It is not a rejected convenience (those are refinements the contract declined) and not
6
+ * merely a regraded prediction — when a prediction is regraded, the intuition behind it disappears from
7
+ * the record unless it is captured here.
8
+ *
9
+ * The history of what a research program stopped believing is often more informative than the list of
10
+ * what it accepted, because the abandoned intuitions are the ones a later reader is most likely to
11
+ * re-propose. Entries are therefore **permanent**: never deleted, never renumbered, never rewritten into
12
+ * a prediction update. A superseded entry is marked, not removed.
13
+ *
14
+ * Several entries below predate the registry and were reconstructed from Stage-1 findings that are
15
+ * documented elsewhere in the repository. That is noted per entry — a reconstructed entry is weaker
16
+ * evidence of protocol discipline than one recorded at the time, and should not be presented otherwise.
17
+ */
18
+ import type { PredictionId } from './predictions.ts';
19
+ export type NegativeResultId = `N-${string}`;
20
+ export type NegativeStatus =
21
+ /** Held as a working assumption, then disproven by evidence. */
22
+ 'falsified'
23
+ /** Registered, not yet tested. */
24
+ | 'pending'
25
+ /** Falsified earlier, then replaced by a better-stated hypothesis (which gets its own id). */
26
+ | 'superseded';
27
+ export interface NegativeResult {
28
+ readonly id: NegativeResultId;
29
+ /** The belief, stated as it was actually held — not softened in hindsight. */
30
+ readonly hypothesis: string;
31
+ readonly status: NegativeStatus;
32
+ /** What disproved it. Required once falsified. */
33
+ readonly falsifiedBy?: string;
34
+ readonly reason?: string;
35
+ /** True when the entry was reconstructed after the fact rather than recorded when abandoned. */
36
+ readonly reconstructed?: boolean;
37
+ readonly prediction?: PredictionId;
38
+ readonly supersededBy?: NegativeResultId;
39
+ }
40
+ export declare function negativeResults(): NegativeResult[];
41
+ export interface NegativeResultProblem {
42
+ readonly id: NegativeResultId;
43
+ readonly rule: string;
44
+ readonly detail: string;
45
+ }
46
+ export declare function negativeResultProblems(): NegativeResultProblem[];
47
+ export interface NegativeLedger {
48
+ readonly total: number;
49
+ readonly falsified: number;
50
+ readonly pending: number;
51
+ readonly superseded: number;
52
+ /** Entries reconstructed after the fact — weaker evidence of discipline than contemporaneous ones. */
53
+ readonly reconstructed: number;
54
+ readonly auditable: boolean;
55
+ }
56
+ export declare function negativeLedger(): NegativeLedger;
57
+ //# sourceMappingURL=negative-results.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"negative-results.d.ts","sourceRoot":"","sources":["../../../src/world/conformance/negative-results.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM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Ac,IAAI,cAAc,CAW/C"}
@@ -0,0 +1,73 @@
1
+ export function negativeResults() {
2
+ return [
3
+ {
4
+ id: 'N-001',
5
+ hypothesis: 'Termination is specific to search and planning substrates.',
6
+ status: 'falsified',
7
+ falsifiedBy: 'FiniteStateMachine',
8
+ reason: 'the FSM control reached termination first via accepting states, showing it is a general property of lawful evolution rather than a search idiosyncrasy. The contract had not merely omitted it — no prior substrate could exhibit it, because neither the field nor the governor ever finishes',
9
+ prediction: 'P-002',
10
+ },
11
+ {
12
+ id: 'N-002',
13
+ hypothesis: 'Projection composition preserves subtractive power: projecting a projection cannot launder what the first layer withheld.',
14
+ status: 'pending',
15
+ prediction: 'P-006',
16
+ },
17
+ {
18
+ id: 'N-003',
19
+ hypothesis: 'A CompiledPattern is a complete world declaration, so the kernel can host field evolution directly.',
20
+ status: 'falsified',
21
+ falsifiedBy: 'F1.1 field-integration audit',
22
+ reason: 'lawful evolution exists only as executable force code, not as data. This falsification reframed the whole of Stage 1: the field became one execution substrate behind a contract rather than the world itself',
23
+ reconstructed: true,
24
+ },
25
+ {
26
+ id: 'N-004',
27
+ hypothesis: 'Field dynamics is fully expressible as declarative data given a sufficient expression IR.',
28
+ status: 'falsified',
29
+ falsifiedBy: 'F1.5 declarative-dynamics experiment',
30
+ reason: '8 of 11 corpus laws were expressible; 3 remained opaque (hidden mutable state, host/callback dependence, nonlinear time). The IR was deliberately not expanded to force success, so the result stands as partial-with-opaque-extensions',
31
+ reconstructed: true,
32
+ },
33
+ {
34
+ id: 'N-005',
35
+ hypothesis: 'DynamicsExecutionContext.now is needed by real substrates.',
36
+ status: 'pending',
37
+ reason: 'four of four adapted substrates have now declined to use it — the field injects its own clock, the governor, FSM and planner have none. Evidence against is accumulating but the concept was deliberately kept rather than removed, since absence of use across four substrates is not proof of uselessness',
38
+ reconstructed: true,
39
+ },
40
+ ];
41
+ }
42
+ export function negativeResultProblems() {
43
+ const problems = [];
44
+ for (const n of negativeResults()) {
45
+ if (n.status === 'falsified') {
46
+ if (!n.falsifiedBy)
47
+ problems.push({ id: n.id, rule: 'falsified-requires-source', detail: 'must name what disproved it' });
48
+ if (!n.reason || n.reason.length < 40) {
49
+ problems.push({ id: n.id, rule: 'falsified-requires-reason', detail: 'must record why, at enough length to be useful later' });
50
+ }
51
+ }
52
+ if (n.status === 'superseded' && !n.supersededBy) {
53
+ problems.push({ id: n.id, rule: 'superseded-requires-successor', detail: 'a superseded entry must name its successor, never simply vanish' });
54
+ }
55
+ if (n.status === 'pending' && n.falsifiedBy) {
56
+ problems.push({ id: n.id, rule: 'pending-has-no-source', detail: 'a pending hypothesis cannot already have been falsified' });
57
+ }
58
+ }
59
+ return problems;
60
+ }
61
+ export function negativeLedger() {
62
+ const all = negativeResults();
63
+ const count = (s) => all.filter((n) => n.status === s).length;
64
+ return {
65
+ total: all.length,
66
+ falsified: count('falsified'),
67
+ pending: count('pending'),
68
+ superseded: count('superseded'),
69
+ reconstructed: all.filter((n) => n.reconstructed).length,
70
+ auditable: negativeResultProblems().length === 0,
71
+ };
72
+ }
73
+ //# sourceMappingURL=negative-results.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"negative-results.js","sourceRoot":"","sources":["../../../src/world/conformance/negative-results.ts"],"names":[],"mappings":"AA2CA,MAAM,UAAU,eAAe;IAC7B,OAAO;QACL;YACE,EAAE,EAAE,OAAO;YACX,UAAU,EAAE,4DAA4D;YACxE,MAAM,EAAE,WAAW;YACnB,WAAW,EAAE,oBAAoB;YACjC,MAAM,EACJ,gSAAgS;YAClS,UAAU,EAAE,OAAO;SACpB;QACD;YACE,EAAE,EAAE,OAAO;YACX,UAAU,EAAE,2HAA2H;YACvI,MAAM,EAAE,SAAS;YACjB,UAAU,EAAE,OAAO;SACpB;QACD;YACE,EAAE,EAAE,OAAO;YACX,UAAU,EAAE,qGAAqG;YACjH,MAAM,EAAE,WAAW;YACnB,WAAW,EAAE,8BAA8B;YAC3C,MAAM,EACJ,+MAA+M;YACjN,aAAa,EAAE,IAA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