KEDDEH SYSTEMS
Menu
K
KEDDEH / BRAINKRecursive carrier-agnostic referential volume · v24 · P18/A18
VOLUMEvolume://keddeh/braink/root
Volume of volumes · resident applications · referential standards

The recursive Volume carries the machine
without becoming one carrier.

HTML, workbooks, source, compilers, assemblers, firmware, kernels, emulators, runtimes, servers, network fabrics, applications and proof objects remain independently addressable resident carriers or machine objects. The logical Volume sits above those carriers, resolves them by typed address, and can materialise successor KEX machines only through explicit state and signal paths.

15 AUGUST 2026 · ADDITIVE ENGINEERING DELTA

One Keddeh Systems service.
Multiple execution domains.

The local build and the hosted/online builds remain distinct first-class execution environments. They converge through shared capability identity, contracts, state policy, evidence semantics, compatibility verification and release lineage—not by flattening every implementation into one runtime.

LOCALHOSTEDSHAREDBRIDGEEXTERNAL_ACQUISITIONRESEARCH_ONLY
UNIFIED SERVICE TOPOLOGY
LOCAL EXECUTION DOMAIN

Sovereign/device-local state, native OS integration, offline/local-first execution, local agents, hardware coupling and user-specific computation.

⇄
HOSTED / ONLINE EXECUTION DOMAIN

Server runtime, public/API surfaces, tenancy, distributed execution, hosted state, service ingress, routing, observability and deployment infrastructure.

LOCAL IMPLEMENTATION \ > KEDDEH SYSTEMS UNIFIED CAPABILITY / HOSTED IMPLEMENTATION CONVERGENCE = identity + contracts + state rules + evidence + compatibility
DOMAIN_LOCAL

Local is not a reduced cloud client.

  • May be stronger in device-native and offline dimensions.
  • Own runtime and evidence lifecycle.
  • Local success remains local evidence until bridge qualification.
DOMAIN_HOSTED

Hosted is not the local filesystem on a server.

  • Own ingress, identity, tenancy, scaling and recovery concerns.
  • Own runtime and evidence lifecycle.
  • Hosted limitations must not artificially reduce local capability.
DOMAIN_BRIDGE

Unification occurs through verified contracts.

  • Capability negotiation.
  • Authenticated state exchange.
  • Compatibility and reconciliation receipts.
EVIDENCE MODEL

Capability state is multidimensional.

CAPABILITY × TARGET_DOMAIN × IMPLEMENTATION × VERSION × MATURITY_STATE × EVIDENCE

External GitHub/web acquisition is separately typed and cannot be treated as hosted-service proof.

STATE CLASSIFICATION

Only explicitly synchronisable state crosses domains.

LOCAL_ONLYHOSTED_ONLYSYNCABLEDERIVEDIMMUTABLE_REFERENCEEPHEMERALSECRET_NON_EXPORTABLE
TODAY'S GOVERNING ENGINEERING REFERENCE
Open the full 15 August 2026 engineering-context amendment
# BRAINK / KEX Engineering Context Reference
## Evidence-Governed Reconstruction of the 15 August 2026 Terminal Record

**Reference ID:** `BRAINK-ENG-CONTEXT-2026-08-15-V1`  
**Source:** `Pasted markdown(20260815-063751).md`  
**Source lines processed:** 100,289  
**Source bytes:** 12,458,004  
**Source characters:** 12,103,830  
**SHA-256:** `b3383c83847b831b36858b240883295b57daa7703e99530b1fba8ae34354ee0e`  
**Status:** Governing engineering reference for subsequent work based on this transcript  
**Method:** Complete-file programmatic pass plus targeted semantic and line-level review of the decisive execution ranges.

---

## 1. Purpose

This document converts the raw terminal record into a durable engineering context.

The source is not treated as a sequence of commands that must be continued blindly. It is treated as an **evidence record** containing several different things at once:

1. actual shell commands;
2. command outputs;
3. source code being constructed interactively;
4. generated status strings;
5. static file-discovery evidence;
6. AST/static-analysis evidence;
7. graph and manifest generation;
8. runtime probes;
9. failed runtime probes;
10. user architecture encoded in names, registries, paths and policies;
11. generated descriptions of intended capabilities;
12. Python namespace/docstring introspection.

These are not equivalent forms of proof.

The governing correction is therefore:

> **A discovered or indexed capability is not an executable capability. A written graph state is not a live runtime state. A success string is not a test result.**

---

## 2. Coverage statement: every source line is accounted for

The complete 100,289-line source was processed. Repetitive machine-generated regions are compressed into bounded ranges rather than reproduced line-by-line. This preserves complete coverage without pretending that 37,000 vendor-path listings represent 37,000 independent architectural decisions.

### Coverage map

| Source lines | Record class | Engineering interpretation |
|---|---|---|
| 1–291 | Failed `K-Legacy` cleanup/search attempts and macOS TCC denials | Initial path assumption was false; subsequent `find` traversed the wrong root and generated permission noise. |
| 292–360 | `SOVEREIGN_DRIVE` discovery, profile/bootstrap manipulation, seed execution, missing UI | External volume is real and `seed_stability.sh` exists; UI path and persistent background-harvest assumptions were not valid. |
| 361–39,775 | Recursive `.py`/`.sh` inventory | Large file-presence inventory, heavily contaminated by virtual environments, `site-packages`, tests and vendor code. This is discovery evidence only. |
| 39,776–39,812 | First compilation attempt | Escaping/quoting defect causes a syntax failure. |
| 39,813–79,079 | Corrected parse/concatenation cycle | Large-scale AST parsing and payload preservation. Strong static-ingestion evidence; not runtime integration. |
| 79,080–79,115 | Shell/heredoc transition | Additional command-construction and shell parsing problems. |
| 79,116–79,208 | `sovereign_harvester.py` and ingest fallback | Large corpus successfully read; `brain ingest` path is not proven and a broken pipe occurs before seed fallback. |
| 79,209–79,289 | Physical-host harvest and threaded delegate | 27k+ source records are readable/processable in parallel; “COGNITIVE_BOUND” is a local classification result, not proof those modules became executable capabilities. |
| 79,290–79,368 | Architecture compiler | Initial shell construction error followed by successful JSON architecture-map creation. |
| 79,369–79,521 | Multi-type harvest and topology compiler | Concrete inventory and topology manifests are produced. Classification/mapping is structural. |
| 79,522–79,830 | Virtual matrix hydrator and VFS projection | Files are mapped/copy-projected into a VFS and topology JSON is rewritten. Important implementation defects exist in classification, identity, copying and rejection evidence. |
| 79,831–97,749 | `core-query braink` and very large JSON graph output | Queryable graph/index capability is demonstrated. The huge output is primarily indexed metadata and raw source, not thousands of independently validated BRAINK runtime components. |
| 97,750–97,927 | Recursive growth/evolution attempts | First growth produces zero mutation; VFS permissions block writes; later graph evolution works after correcting a function-name defect. |
| 97,928–98,143 | Full-stack manifest plus online-learning attempts | Manifest transformation succeeds structurally. Network acquisition fails, returns 0/4 connections and 0 bytes, while a misleading success banner is printed. |
| 98,144–98,364 | Runtime probes, binary/route reconnaissance and agent registry | Crucial ground truth: `brain` command is absent; intended CS module import fails; agent registry and local files exist. |
| 98,365–98,590 | VFS inspection, metadata ingestion and ledger mutation | `cs_theory` path is absent; selected Python files are mapped into the graph; later synthetic CS capabilities are written into JSON metadata. |
| 98,591–98,628 | JSON-RPC/socket test | Direct shell JSON invocation fails; actual connection to `127.0.0.1:8799` times out, contradicting the preceding “port active” assertion. |
| 98,629–100,289 | `ai.py` namespace and documentation introspection | Importable local Python scaffold and extensive declared functions/constants are demonstrated. Much of this range is standard-library/type documentation emitted by introspection, not custom runtime-test evidence. |

This coverage map is the canonical compression of the source. Future engineering work should refer to the exact source range when a finer-grained determination is required.

---

## 3. Quantitative record profile

The source contains:

- **39,392** inventory `TARGET:` records.
- **37,515** of those inventory records contain `site-packages` — approximately **95.2%** of the target inventory.
- **39,153** `[PARSED & LOCKED]` records.
- **37,442** parsed records contain `site-packages`.
- **75** malformed-AST markers.
- **284** macOS permission-denial lines.
- **14** `command not found` occurrences.
- **4** shell parse-error occurrences.
- **6** `SyntaxError` occurrences.
- **1** explicit Python traceback occurrence.
- **14** printed `FULLY_REPLICATED` statuses.
- **14** printed `100_PERCENT_STABLE` statuses.

The most important quantitative implication is that the corpus is **not a curated BRAINK codebase**. The initial inventory is overwhelmingly third-party Python environment material. Any capability count derived directly from that corpus must therefore be treated as a **discovery/index metric**, not a measure of proprietary system capability.

---

## 4. Executive engineering judgement

### 4.1 What exists

The transcript demonstrates a substantial and useful local engineering substrate:

- a connected `SOVEREIGN_DRIVE`;
- a local `seed_stability.sh`;
- large-scale recursive source discovery;
- AST parsing and source preservation;
- multi-format harvesting;
- generated architecture/topology JSON;
- a VFS-like projection of harvested material;
- queryable graph metadata;
- a graph-evolution pass;
- an importable `/Users/ak/Desktop/ai.py`;
- an agent classification registry;
- declared K-MINES components and promotion constraints;
- local design concepts for safety gates, ledgers, virtual RAM, KEX execution, BRAINK processing and mining-related reporting.

Those are real assets.

### 4.2 What does not yet follow

The transcript does **not** prove that:

- all mapped files have been installed as runtime capabilities;
- all “BRAINK_CORE” nodes are genuine BRAINK modules;
- copied VFS files are dependency-complete or importable;
- `brain` exists as an executable command;
- the graph is the same thing as active process memory;
- the local API is reliably listening on port 8799;
- the online-learning process acquired any external code;
- the manually inserted graph-search/stack capabilities exist as executable implementations;
- recursive “self-growth” successfully modifies runnable software;
- the scaffold itself is a Bitcoin miner.

The strongest source-level description of `ai.py` explicitly characterises BRAINKbyK-SYSTEMS as a **local, VM-wrapped, Desktop-aware AI scaffold**, and states that it indexes, preserves terminology, creates bounded virtual-RAM shards, separates status/index operations from heavy engines, and does **not** itself mine or perform uncontrolled external execution.

That statement should be treated as an architectural boundary, not as a defect. Mining can exist as a separate product/runtime plane with explicit contracts rather than being falsely inferred from the knowledge scaffold.

---

## 5. Evidence-state model

From this point onward, every system claim should carry one of these states.

| State | Meaning | Promotion requirement |
|---|---|---|
| `OBSERVED` | Directly present in source/output | Preserve exact evidence. |
| `SOURCE_DECLARED` | Code/registry/docstring says a capability exists | Must not be called operational without a test. |
| `DISCOVERED` | File/path/object was found | Static inspection required. |
| `PARSED` | Syntax/static representation was processed | Contract and dependency analysis required. |
| `INDEXED` | Metadata entered a graph/index | Executable binding required. |
| `STATICALLY_VERIFIED` | Structure, syntax or invariant tested without execution | Runtime test required where execution is claimed. |
| `RUNTIME_TESTED` | Executed with a concrete expected/actual result | Integration test required before product promotion. |
| `INTEGRATION_TESTED` | Multiple real components interacted successfully | Product acceptance gate required. |
| `PRODUCT_QUALIFIED` | Required acceptance suite passed | Eligible for release. |
| `FAILED` | Concrete attempted operation did not meet its criterion | Retain evidence and diagnosis. |
| `CONTRADICTED` | A stronger/direct test conflicts with an earlier assertion | Stronger evidence governs. |
| `INFERRED` | Engineering conclusion derived from evidence | Keep separate from observation. |
| `SUPERSEDED` | Replaced by stronger implementation/evidence | Preserve lineage. |

This status vocabulary should replace ambiguous words such as *wired*, *ingested*, *stabilised*, *locked*, *replicated*, *evolved* and *secured* unless those words have formally defined predicates.

---

## 6. The most important contradictions in the record

### 6.1 “Seed stability” is a status emitter, not an integrity verifier

Repeated output says:

- `SEED_STATUS: FULLY_REPLICATED`
- `OVERLAP_STATUS: 100_PERCENT_STABLE`

Later inspection of `seed_stability.sh` shows that its operative behaviour is essentially to print these strings around `sync`. No comparison, hash validation, replica quorum, dependency check, process check or semantic overlap calculation is shown.

**Engineering classification:** the strings are `SOURCE_DECLARED`, not `RUNTIME_TESTED` integrity evidence.

**Required repair:** make each status the result of a predicate with evidence, e.g. expected hash == observed hash, expected replica count == observed count, required process/socket actually responds.

---

### 6.2 “Re-ingestion loop active” is contradicted by process and file evidence

The terminal prints that the re-ingestion loop is active. Immediately afterward:

- expected stability output is absent;
- no matching process appears;
- the background `nohup` job exits;
- `aura_command_dash.py` is missing in both expected locations.

**Classification:** `CONTRADICTED`.

**Required repair:** startup should fail closed and surface which executable, PID, health endpoint and durable state prove the service is alive.

---

### 6.3 “Components wired” means graph/index insertion, not executable integration

The topology compiler reports 16,529 components wired. The implementation:

- parses source or metadata;
- classifies by path substrings;
- creates JSON graph nodes;
- stores raw source;
- increments a `components_wired` counter.

No import, dependency resolution, function invocation, service start, ABI check, IPC handshake or behavior test is required for this counter.

**Classification:** those 16,529 are `INDEXED`, not `INTEGRATION_TESTED`.

---

### 6.4 Classification is path-string classification

The hydrator uses rules equivalent to:

- path contains `kex` → `KEX_SEEDS`;
- path contains `llm` or `ai.py` → `IL_LLMS`;
- path contains `braink` or `bannai` → `BRAINK_CORE`;
- path contains `server` or `util` → `SERVER_UTIL`;
- otherwise → `DATASETS`.

This is useful for preliminary routing, but it cannot establish semantic capability or ownership.

**Required repair:** classification should be a typed manifest with provenance, explicit module identity, interfaces, dependencies, tests and source authority. Filename heuristics can remain as a discovery hint only.

---

### 6.5 VFS projection loses path identity and silently suppresses failures

Each projected file is written to:

`/Volumes/SOVEREIGN_DRIVE/vfs/<file_type>/<basename>`

The original directory hierarchy is discarded. Therefore two source files with the same basename can target the same VFS location. Copy failures are suppressed by a blanket `except Exception: pass`.

**Consequences:**

- collision/overwrite risk;
- loss of package-relative import structure;
- loss of contextual provenance in the projected filesystem;
- inability to distinguish failed writes from successful syncs except through the counter;
- potential incompatibility with Python packages.

**Required repair:** use content-addressed or source-relative paths, collision detection, immutable provenance, explicit failure records and package-aware materialisation.

---

### 6.6 Node identity is nondeterministic

The hydrator generates node IDs with a random UUID fragment. The same corpus can therefore receive different node IDs on different runs.

For a system that values deterministic reconstruction and proof lineage, identity should be derived from stable inputs.

**Required repair:** derive identity from canonical namespace + content hash + schema version, while preserving aliases for moved paths.

---

### 6.7 Rejection evidence is discarded

The earlier compiler creates a `REJECTION_EVIDENCE_LEDGER`. The later hydrator outputs only:

- `TOPOLOGY_METRICS`;
- `INTEGRATED_SYSTEM_GRAPH`.

The audit subsequently reports 36 components rejected but zero rejection evidence.

This is not merely a reporting issue: a stated engineering principle — failures remain evidence — is broken by the data model.

**Required repair:** every rejection gets a durable record containing source identity, reason, stage, error, timestamp/run ID and recovery/supersession link.

---

### 6.8 The VFS is made immutable before a growth stage that needs to write to it

The transcript applies `chmod -R 555` to the VFS and then later attempts to create `vfs/growth_manifold`. The operation fails with `Permission denied`; recursive growth reports zero mutated capabilities and zero bytes.

**Classification:** deterministic self-conflict in lifecycle policy.

**Required repair:** immutable accepted artifacts and writable development/staging areas must be separate planes. Never make the entire substrate read-only if later lifecycle stages require mutation.

---

### 6.9 Graph evolution is real, but it is graph evolution

After a `NameError` is corrected, the knowledge-matrix evolver reports:

- 4,528 cognitive components wired;
- 1,357 logical edges generated;
- an `EVOLVED_KNOWLEDGE_MATRIX.json`.

This is meaningful transformation of a data structure.

It is **not** by itself proof that 4,528 executable components now interact in memory. The later raw `INGEST_EVOLVED_MATRIX:` text is interpreted by zsh and fails as a command.

**Correct classification:** `INDEXED/GRAPH_TRANSFORMED`, not `RUNTIME_INTEGRATED`.

---

### 6.10 Online-learning “success” reports zero success

The online acquisition stage tries four network targets. All fail. It then prints a success banner while reporting:

- 0 / 4 active connection tunnels;
- 0 bytes absorbed.

This is the clearest example of status semantics being inverted.

**Required repair:** the banner must be derived from the acceptance criterion. `0/4` must produce `FAILED`, or `DEGRADED` if zero external acquisition is an explicitly acceptable mode.

---

### 6.11 Intended CS runtime binding fails

A direct runtime test adds the supposed CS-theory path and attempts to import `stack`. It fails:

`No module named 'stack'`.

This is stronger evidence than earlier graph statements saying stack/search capabilities were ingested.

**Classification:** executable CS binding is `FAILED/NOT_PROVEN`.

Later manually writing descriptions such as stack/Dijkstra/BST capabilities into a JSON ledger changes metadata, not the result of this import test.

---

### 6.12 `brain` is not an available executable route

Direct reconnaissance reports:

- `brain not found`;
- no relevant alias;
- no matching memory-resident orchestration function.

A BRAINK matrix environment variable exists, but an environment variable is not an executable runtime.

**Required repair:** either implement and test a canonical `brain` CLI/API entry point, or stop routing commands through an interface that is absent.

---

### 6.13 Port 8799 assertion is contradicted by an actual connection attempt

One audit prints that port 8799 is active. A later direct socket connection to `127.0.0.1:8799` times out.

**Evidence rule:** the actual transport probe outranks the printed assertion.

`ai.py` importing successfully proves an importable Python module. It does not prove a listening service.

---

## 7. What should be retained

The correct response is not wholesale replacement. Several parts should be preserved and matured.

### A. Source preservation and provenance

The transcript shows a useful instinct: retain raw source and metadata rather than destructively rewriting the original corpus.

Preserve this, but make provenance canonical and content-addressed.

### B. Static AST analysis

AST parsing is useful for:

- syntax qualification;
- function/class extraction;
- imports;
- static dependency graph construction;
- identifying candidate interfaces.

Keep it as a **static-analysis stage**, not as a proxy for execution.

### C. Knowledge/topology graph

The graph is useful as a routing and evidence surface if nodes are typed by maturity state.

A node should be able to say:

`DISCOVERED → PARSED → STATICALLY_VERIFIED → RUNTIME_TESTED → INTEGRATION_TESTED → PRODUCT_QUALIFIED`

rather than merely `BRAINK_CORE`.

### D. Agent registry and promotion authority

The K-agent registry contains a strong governance concept: an agent has a classification, scope and promotion authority, and promotion requires validator evidence.

That is much closer to the correct engineering model than the later unconditional “wired” counters.

Generalise this principle to **every module, skill, agent, service and product component**.

### E. Local-first `ai.py` scaffold

The source demonstrates that `ai.py` imports and exposes a broad local scaffold. Its own documentation establishes sensible boundaries between indexing/status functions and heavy engines.

Retain it as a control/knowledge plane unless tests prove a stronger role.

---

## 8. Architectural reconstruction

The transcript is best understood as several planes that were accidentally conflated.

### 8.1 Corpus plane

Raw local material:

- source files;
- Markdown;
- JSON;
- spreadsheets;
- third-party packages;
- fixtures/tests;
- user-authored projects.

### 8.2 Knowledge/index plane

Processes that:

- discover;
- parse;
- classify;
- index;
- preserve source;
- build graph nodes and edges.

### 8.3 Control plane

Potentially includes:

- `ai.py`;
- registries;
- policy/safety gates;
- routing;
- state/ledger;
- manifest resolution.

### 8.4 Execution plane

Must contain actual executable modules/services with:

- canonical entry points;
- dependencies;
- environment;
- process lifecycle;
- IPC/RPC contracts;
- deterministic inputs/outputs;
- tests.

### 8.5 Product planes

Specialised products such as K-MINES should consume accepted contracts from the control/knowledge planes but must have their **own executable qualification**.

This is essential because `ai.py` explicitly says its scaffold does not mine. A functioning mining engine therefore cannot be inferred merely because mining-related registry entries or planning functions exist.

### 8.6 Evidence plane

Every stage writes receipts:

- source hash;
- parser result;
- test input;
- expected result;
- actual result;
- exit status;
- log/evidence location;
- dependency versions;
- promotion decision.

### 8.7 Release plane

Only product-qualified states are promoted here.

---

## 9. Recommended repository/substrate model

A clean structure consistent with the evidence in this record is:

```text
BRAINK/
├── product/
│   ├── control/
│   ├── runtime/
│   └── products/
│       └── k-mines/
├── modules/
│   ├── contracts/
│   ├── accepted/
│   └── adapters/
├── development/
│   ├── candidates/
│   ├── experiments/
│   ├── failures/
│   └── fixtures/
├── corpus/
│   ├── authored/
│   ├── external/
│   └── vendor/
├── knowledge/
│   ├── graph/
│   ├── manifests/
│   └── decisions/
├── evidence/
│   ├── static/
│   ├── runtime/
│   ├── integration/
│   └── product/
├── tests/
│   ├── unit/
│   ├── contract/
│   ├── integration/
│   └── acceptance/
├── skills/
│   ├── source/
│   ├── qualified/
│   └── manifests/
├── state/
│   ├── mutable/
│   ├── checkpoints/
│   └── immutable/
└── releases/
```

The external SOVEREIGN volume can remain the broad substrate, but it should not flatten every file into a single extension directory or declare every harvested source object part of the live runtime.

---

## 10. Correct lifecycle for a “skill” or component

A reusable component should move through this exact reasoning chain:

```text
SOURCE
  ↓
DISCOVERED
  ↓
HASHED + PROVENANCE RECORDED
  ↓
PARSED
  ↓
CLASSIFIED BY MANIFEST
  ↓
DEPENDENCIES RESOLVED
  ↓
STATIC TEST
  ↓
ISOLATED RUNTIME TEST
  ↓
CONTRACT TEST
  ↓
INTEGRATION TEST
  ↓
EVIDENCE RECEIPT
  ↓
PROMOTION DECISION
  ↓
ACCEPTED MODULE / SKILL
```

A graph may reference all states, but only accepted modules should be advertised as operational capabilities.

---

## 11. Memory, state saving and “warm boot”

The transcript contains the ingredients for a genuine warm-state architecture, but a graph file and shell environment variable are not enough.

A defensible warm boot requires a checkpoint containing at least:

- schema version;
- immutable source/content hashes;
- accepted component identities;
- dependency lock;
- runtime configuration;
- open/required services and expected ports;
- last successful test receipts;
- mutable state journal;
- graph root/hash;
- checkpoint timestamp/sequence;
- recovery policy.

Warm boot then means:

1. load checkpoint;
2. verify hashes/schema;
3. resolve accepted modules;
4. restore mutable state;
5. re-establish required services;
6. run health/contract probes;
7. expose the system as `READY` only when predicates pass.

That is fundamentally different from sourcing a profile and printing `100_PERCENT_STABLE`.

---

## 12. Determinism corrections

If deterministic identity and reconstruction are objectives, make these changes:

1. Replace random UUID node IDs with stable content/namespace-derived IDs.
2. Canonicalise JSON before hashing.
3. Keep source-relative paths or content-addressed object paths.
4. Eliminate silent exceptions from ingestion.
5. Record exact dependency/environment manifests.
6. Separate mutable state from immutable accepted artifacts.
7. Make every derived graph reproducible from the same input corpus.
8. Record external inputs and versions explicitly.
9. Do not use wall-clock timestamps as the sole identity component.
10. Require replay tests: same input state must produce the same graph root and acceptance result where nondeterminism is not intentionally permitted.

---

## 13. Corpus hygiene

Because roughly 95.2% of the initial `TARGET:` inventory is under `site-packages`, the present inventory grossly mixes:

- authored code;
- dependencies;
- vendored libraries;
- tests;
- examples;
- environment tooling.

This destroys the semantic meaning of raw “capability count”.

Recommended ingestion classes:

```text
AUTHORED_PRODUCT
AUTHORED_EXPERIMENT
AUTHORED_SKILL
EXTERNAL_REFERENCE
VENDORED_DEPENDENCY
TEST_FIXTURE
GENERATED_ARTIFACT
DATASET
UNKNOWN
```

Default capability promotion should only start automatically for explicitly authored/candidate classes. Vendor code may remain indexed for dependency resolution and research but should not inflate BRAINK capability counts.

---

## 14. The K-MINES implication

The record contains a registry that identifies K-MINES worker/watch components and applies owner-only scope and validator-gated promotion. That is useful evidence of an intended specialised execution plane.

However the `ai.py` scaffold expressly says it does not itself mine.

Therefore the correct mining architecture is:

```text
BRAINK knowledge/control plane
        ↓ explicit tested contract
K-MINES execution plane
        ↓
Bitcoin/node/RPC adapter plane
        ↓
real protocol/runtime tests
        ↓
submission/result evidence
```

The product claim must be proven at the K-MINES execution boundary, not inferred from BRAINK indexing, graph density, registry presence or generated mining reports.

This also means work on a miner should not destructively rewrite the stronger general BRAINK knowledge substrate. It should consume it through explicit contracts.

---

## 15. Revised engineering rules for subsequent work

These rules are now the recommended operating convention for any work derived from this transcript.

### Rule 1 — Objective before operation
Every substantial action begins with the requirement it is intended to satisfy.

### Rule 2 — Inspect before mutation
Read the relevant implementation, dependencies, tests, lineage and evidence before changing it.

### Rule 3 — Evidence outranks labels
A direct failed test outranks a string saying “SUCCESS”.

### Rule 4 — Graph state is not runtime state
Writing JSON does not establish in-memory or executable integration.

### Rule 5 — Discovery is not capability
File existence and AST validity are preliminary evidence only.

### Rule 6 — Failures are durable records
No `except: pass` in evidence-bearing pathways.

### Rule 7 — Preserve alternatives
New ideas become candidates/branches/modules until comparative evidence justifies promotion.

### Rule 8 — Promotion is explicit
No component becomes accepted because it is newer, copied, indexed or committed.

### Rule 9 — Interfaces must be real
Do not route through `brain`, port 8799, a shell alias or any other interface until an actual probe establishes it.

### Rule 10 — Status must be computed
Every health/status label is derived from measurable predicates.

### Rule 11 — Separate immutable and mutable planes
Accepted artifacts may be read-only; development/state areas required for later mutation must remain deliberately writable.

### Rule 12 — Counts need semantics
“16,529 wired” is unacceptable without defining what “wired” means and what test each count represents.

### Rule 13 — Preserve provenance
Every derived node must retain a stable relationship to original source, content hash and transformation stage.

### Rule 14 — Product tests end at the product objective
A successful indexer does not prove a successful miner; a successful API import does not prove a listening service.

### Rule 15 — Report uncertainty precisely
Use `NOT_PROVEN`, `FAILED`, `CONTRADICTED` or `INFERRED` rather than filling gaps with plausible narrative.

---

## 16. Assistant operating adjustment

When I work from this reference, I should use the following control loop:

```text
GOAL
→ EXISTING EVIDENCE
→ CURRENT VERIFIED STATE
→ INVARIANTS
→ CANDIDATE CHANGE
→ EXPECTED EFFECT
→ TEST DESIGN
→ EXECUTION
→ ACTUAL RESULT
→ EVIDENCE CLASSIFICATION
→ PROMOTION / REJECT / RETAIN AS EXPERIMENT
```

I should **not** use:

```text
tool ran
→ file changed
→ command printed success
→ assume system improved
```

For each proposed change I should be able to answer:

1. What requirement does this satisfy?
2. What source evidence justifies acting?
3. What existing functionality or invariant may be affected?
4. Is this a corpus, knowledge, control, execution, evidence or product-plane change?
5. What exact test proves the desired outcome?
6. What is the rollback/lineage path?
7. What evidence state will result if the test passes or fails?

---

## 17. Immediate remediation sequence

### Priority 0 — Preserve current evidence
- Keep the original transcript immutable.
- Retain its SHA-256 from this document.
- Preserve the existing generated manifests before changing their schemas.

### Priority 1 — Replace fake health semantics
Create one canonical `doctor`/verification command whose fields are computed, not echoed.

Minimum checks:

- SOVEREIGN volume exists and is writable/readable as intended;
- expected source/manifests exist and hashes match;
- VFS collision/rejection counts;
- `ai.py` import result;
- canonical control interface existence;
- actual socket/API response if a service is claimed;
- K-MINES executable/path checks;
- test-suite summary;
- checkpoint/root hash.

### Priority 2 — Repair ingestion topology
- Exclude or separately classify virtual environments and `site-packages`.
- Preserve full relative paths or use content addressing.
- Detect filename/content collisions.
- Remove silent write failures.
- make rejection evidence durable.

### Priority 3 — Introduce a capability manifest
For each candidate capability:

```yaml
id:
source:
content_hash:
authority:
class:
entry_point:
dependencies:
contracts:
static_tests:
runtime_tests:
integration_tests:
evidence:
state:
supersedes:
```

### Priority 4 — Rebuild graph semantics
The graph should link **evidence-bearing component records**, not infer capability from a filename substring.

### Priority 5 — Establish a genuine execution entry point
Either:
- implement and test `brain`, or
- define another canonical local control interface.

Do not keep issuing commands to a nonexistent abstraction.

### Priority 6 — Prove API transport
Start the real service, verify bind/listen state, perform a request/response contract test, then persist evidence.

### Priority 7 — Separate BRAINK scaffold from specialised products
Keep the general knowledge/control system intact and give K-MINES its own product acceptance suite.

### Priority 8 — Qualify modules, not descriptions
For a stack/search/graph module to become accepted:
- source must exist;
- import must pass;
- unit tests must pass;
- interface contract must pass;
- integration consumer must pass.

Writing its name/functions into JSON is not qualification.

---

## 18. Governing professional conclusion

The work in the transcript should **not** be dismissed as “nothing happened.” A substantial local corpus processor, topology mapper, VFS projection and importable BRAINKbyK scaffold are visible.

The problem is more precise:

> **The engineering lifecycle repeatedly promotes structural evidence into operational claims without the tests required to justify that promotion.**

That causes the system to look far more complete than the executable evidence supports, and then forces later work to rediscover missing commands, paths, imports and sockets.

The correct evolution is therefore not another broad rewrite. It is an **evidence-governed maturation layer** around the existing substrate.

The highest-value architectural change is to make the system itself incapable of confusing:

```text
PRESENT
PARSED
INDEXED
DECLARED
EXECUTABLE
INTEGRATED
QUALIFIED
```

Once those states are explicit and machine-tested, the graph, VFS, IL-LLM/BRAINK knowledge model, warm-state concepts, agent registry and specialised product runtimes can coexist without one layer falsely claiming the maturity of another.

---

## 19. Reference protocol for future discussion

For subsequent work in this conversation, the short reference name is:

**`BRAINK-ENG-CONTEXT-V1`**

When a future decision conflicts with the raw transcript, use this priority:

1. new direct execution evidence;
2. prior direct execution evidence;
3. source code behavior;
4. generated manifests/registries;
5. static analysis;
6. declared status strings;
7. inference.

New evidence may supersede this document, but it should do so explicitly with:
- the changed fact;
- its test/evidence;
- what earlier conclusion it supersedes;
- the resulting architectural consequence.

---

## Appendix A — Key observed metrics from the transcript

| Observation | Recorded result | Correct interpretation |
|---|---:|---|
| Host/source harvest | ~27,675 valid records | Large readable/static corpus |
| Multi-type harvest | 16,565 records | Curated/filtered material set for graph pass |
| Python modules in multi-type harvest | 11,512 | File-type inventory, not accepted modules |
| Markdown records | 559 | Indexed documentation candidates |
| JSON records | 4,306 | Indexed configuration/data candidates |
| Tabular records | 189 | Indexed tabular data candidates |
| Topology “wired” count | 16,529 | JSON graph/index nodes |
| Topology rejected | 36 | Static rejections; evidence later lost |
| KEX path-classified | 1,138 | Heuristic path classification |
| IL-LLM path-classified | 25 | Heuristic path classification |
| BRAINK path-classified | 3,390 | Heuristic path classification |
| Server/util path-classified | 1,027 | Heuristic path classification |
| First recursive growth | 0 mutations / 0 bytes | Failed/no-op growth stage |
| Knowledge graph evolution | 4,528 nodes / 1,357 edges | Successful graph transformation |
| Online acquisition | 0/4 / 0 bytes | Failed external acquisition |
| `stack` import | module missing | Runtime capability not established |
| `brain` command | not found | Canonical CLI not established |
| Port 8799 real socket probe | timeout | Transport service not established by that test |
| `ai.py` import/introspection | succeeds | Local Python scaffold exists and is inspectable |

---

## Appendix B — Ground-truth interpretation rules

- **A path existing** proves presence.
- **A file being readable** proves readable presence.
- **AST parse success** proves syntactic parseability under the parser used.
- **A JSON node existing** proves index/ledger state.
- **A registry saying `exists: true`** is a registry assertion until filesystem/execution is independently checked.
- **A function name extracted by regex/AST** proves a declaration, not successful invocation.
- **A module import** proves importability in that specific environment.
- **A unit test pass** proves only the tested unit behavior.
- **A socket listen check** proves a listener at the instant checked.
- **A successful protocol request** proves that request/response contract under the tested conditions.
- **A product acceptance suite** is the appropriate basis for a product-level claim.
- **A printed banner** proves only that code printed the banner.

---

## Appendix C — Source integrity

The governing source analysed for this version is exactly:

- Filename: `Pasted markdown(20260815-063751).md`
- Lines: 100,289
- Bytes: 12,458,004
- SHA-256: `b3383c83847b831b36858b240883295b57daa7703e99530b1fba8ae34354ee0e`

If a later copy differs in hash, it is a different evidence source and should receive a new reference version.

---

# V2 Architectural Amendment — Local / Online / Unified Keddeh Systems Service

**Additional source:** `Pasted markdown(20260815-081117).md`  
**Additional source lines:** 101,307  
**SHA-256:** `6c289d0d12179269b1b0b4490b5fa1d5ba16b84932a4120f286ae89e99ea811f`

## 20. Deployment-domain correction

The local build and the online builds are **not interchangeable runtime instances**. They are distinct execution domains with different operating constraints, trust boundaries, resource models, failure modes, deployment mechanisms and evidence requirements.

They nevertheless evolve into **one unified Keddeh Systems service**.

```text
                         KEDDEH SYSTEMS
                    UNIFIED SERVICE MODEL
                            │
             ┌──────────────┴──────────────┐
             │                             │
      LOCAL EXECUTION               HOSTED / ONLINE
          DOMAIN                         DOMAIN
             │                             │
             └──────────────┬──────────────┘
                            │
                 BRIDGE / CONVERGENCE PLANE
                            │
             identity / contracts / state /
             evidence / capability / policy
```

The unification point is **not identical binaries, filesystems or runtime topology**. The unification point is shared service semantics, capability identity, contracts, evidence rules, compatible state and controlled interoperability.

## 21. “Online” has three separate meanings

From now on, the architecture must distinguish:

### `DOMAIN_LOCAL`
Device-resident, local-first execution: SOVEREIGN substrate, native application/runtime, local agents, local specialised engines, local state and local evidence.

### `DOMAIN_HOSTED`
Actual Keddeh Systems online/public/server/cloud execution: service ingress, hosted APIs, distributed runtimes, tenancy, authentication, hosted state, server resources and public-facing infrastructure.

### `EXTERNAL_ACQUISITION`
Network research, dependency acquisition, GitHub/web retrieval, learning inputs and quarantined external candidates.

An outbound GitHub acquisition failure is **not** evidence that the Keddeh Systems hosted service is down. It is evidence about an external-acquisition route only.

## 22. Artifact state becomes multidimensional

Every significant component should be identified by:

```text
CAPABILITY
× TARGET DOMAIN
× MATURITY STATE
× VERSION
× EVIDENCE
```

Example:

```yaml
capability_id: kex.braink.knowledge.search
target_domain: LOCAL
implementation_state: RUNTIME_TESTED
contract_version: 7
```

and separately:

```yaml
capability_id: kex.braink.knowledge.search
target_domain: HOSTED
implementation_state: INTEGRATION_TESTED
contract_version: 7
```

These may implement the **same Keddeh Systems service capability** without being the same binary.

## 23. Local build role

The local build is a first-class system, not merely a developer copy of the hosted service.

It may legitimately provide capabilities that are stronger locally:

- offline/local-first operation;
- device-local storage;
- hardware coupling;
- native OS integration;
- sovereign state;
- low-latency local resources;
- local specialised engines;
- user-specific private computation;
- local recovery and evidence.

Local capability must not be reduced merely to make hosted deployment easier.

## 24. Hosted build role

The online builds are not the local filesystem moved onto a server.

They require their own engineering for:

- service ingress;
- authentication/authorization;
- tenancy/isolation;
- public APIs/web surfaces;
- server-side state;
- scaling;
- service discovery;
- observability;
- release/deployment management;
- public network security;
- durable hosted persistence;
- distributed recovery;
- DNS/TLS/routing;
- multi-node resource orchestration.

Hosted capability must not be inferred from local success.

## 25. Unified service invariant

The governing relationship is:

```text
LOCAL IMPLEMENTATION
                 > KEDDEH SYSTEMS UNIFIED CAPABILITY
        /
HOSTED IMPLEMENTATION
```

Where both domains claim the same service capability, they must satisfy a common semantic contract or explicitly document domain-specific behavior.

The target is **service convergence without runtime flattening**.

## 26. Convergence plane

The local and hosted domains should converge through explicit mechanisms:

1. **Canonical capability identity** — stable IDs independent of deployment location.
2. **Versioned contracts** — shared request/response, state and behavior schemas.
3. **Capability negotiation** — each domain declares what it supports, at what version and evidence state.
4. **State classification** — `LOCAL_ONLY`, `HOSTED_ONLY`, `SYNCABLE`, `DERIVED`, `IMMUTABLE_REFERENCE`, `EPHEMERAL`, `SECRET_NON_EXPORTABLE`.
5. **Evidence exchange** — receipts can be shared without using one domain’s evidence to falsely promote another.
6. **Conflict resolution** — deterministic reconciliation policy, not accidental last-write-wins.
7. **Release compatibility** — a Keddeh Systems service release identifies compatible local and hosted builds.

## 27. Bridge, not forced merger

The new source contains candidate lineage already pointing toward this topology:

- OPUS server runtime modules such as `backplane.py`, `runtime_state.py`, `runtime_pulse.py`, `resource_profile.py` and `front_facing.py`;
- native/local application builds;
- `BRAINK_NATIVE_API_MODULAR_BRIDGE_V3` with `native_api.py`, `local_fallback.py`, `external_quarantine.py` and adapter/base layers;
- historical online DNS gateway and bridge launchers;
- remote-server, global-mesh and bilateral-sync concepts.

These should be assessed as **domain-specific implementations and bridge candidates**, not flattened into one giant runtime.

## 28. Repository locality is not deployment locality

A file stored on the Mac may target:

- local runtime;
- hosted runtime;
- shared contracts;
- bridge logic;
- external research.

Therefore repository/path location must never be used as the deployment-domain classifier.

Each artifact should explicitly declare:

```yaml
target_domain:
  - LOCAL
  - HOSTED
  - SHARED
  - BRIDGE
  - RESEARCH_ONLY
```

## 29. Unified qualification

A unified service capability requires:

```text
LOCAL TEST SUITE
      +
HOSTED TEST SUITE
      +
BRIDGE / CONTRACT TESTS
      +
STATE RECONCILIATION TESTS
      =
UNIFIED KEDDEH SYSTEMS QUALIFICATION
```

A local failure must not automatically trigger hosted redesign.
A hosted limitation must not automatically reduce a working local capability.
A local success must not automatically promote hosted readiness.
An external research/acquisition result must not be treated as either local or hosted service evidence.

## 30. Revised assistant operating rule

Before reasoning about any implementation, establish:

1. What Keddeh Systems capability is involved?
2. What target domain is this artifact for: `LOCAL`, `HOSTED`, `SHARED`, `BRIDGE`, or `RESEARCH`?
3. What maturity is proven in that domain?
4. What evidence is domain-specific?
5. What shared contract connects it to the unified service?
6. Is convergence intended at code, protocol, state, data, user-experience or service-semantic level?
7. Would modifying it destroy a stronger implementation in another domain?

## 31. Governing topology

```text
KEDDEH SYSTEMS
│
├── SHARED SEMANTIC / GOVERNANCE CORE
│   ├── identity
│   ├── contracts
│   ├── capability registry
│   ├── evidence schema
│   ├── IL-LLM / knowledge semantics
│   └── release lineage
│
├── LOCAL EXECUTION DOMAIN
│   ├── BRAINK local runtime
│   ├── SOVEREIGN substrate
│   ├── native apps / OS surfaces
│   ├── local agents
│   └── local state/evidence
│
├── HOSTED EXECUTION DOMAIN
│   ├── server/runtime fabric
│   ├── public/API surfaces
│   ├── distributed services
│   ├── tenancy/auth
│   └── hosted state/evidence
│
├── BRIDGE / CONVERGENCE PLANE
│   ├── protocol adapters
│   ├── capability negotiation
│   ├── authenticated sync
│   ├── state reconciliation
│   ├── evidence exchange
│   └── compatibility verification
│
└── EXTERNAL ACQUISITION / RESEARCH
    ├── GitHub/web research
    ├── dependencies
    ├── external references
    └── quarantined candidates
```

This amendment supersedes any V1 wording that could imply the local scaffold is the entirety of Keddeh Systems, or that the hosted service is merely an extension of the local process.

The system is unified **above the deployment domains**, through contracts, identity, state rules, evidence, capability semantics and release compatibility.
BRAINK V76 · RESIDENT ENGINEERING / RESEARCH VMstate owner: braink://local/orchestrator · projection ≠ system