title: SZL Second Brain emoji: 🧠 colorFrom: indigo colorTo: green sdk: docker app_port: 7860 pinned: false license: apache-2.0 short_description: Governed retrieval and review-gated continuous frontier memory. tags:
A governed memory plane for SZL inference: public handles and digests outside; authorized content hydration inside the trusted controller.
The public projection contains 575 governed chunks. The private 9,464-node graph is not published, is not queried by this package, and is never admitted to gradients. The index is data, not model weights. Lambda uniqueness remains Conjecture 1.
Version 1.3 packages the public corpus, schemas, and the review-gated frontier
candidate index into the wheel. Installing szl-second-brain in a clean
environment can build the 575-chunk index, run governed hybrid retrieval, inspect
the exact frontier state, search review candidates by handles, and perform
controller-only authorized hydration without a source checkout.
The wheel contains only public material. It contains no private graph rows, credentials, model weights, signing keys, or execution authority. CI builds the wheel, installs it into an isolated environment, changes outside the repository, and proves corpus discovery, frontier discovery, retrieval, digest parity, Living Anatomy feed generation, and authorized hydration.
An operator may still provide a different governed projection through
SECOND_BRAIN_CORPUS or AYLLU_BRAIN_CORPUS. Explicit corpus paths remain
controller decisions and must pass the same per-row digest checks.
The hourly Continuous frontier memory workflow is a bounded discovery loop,
not autonomous retraining. It reads only seven fixed public source contracts:
szl-formulas formula/quant atlas;szl-ouroboros bounded-loop kernel README;szl-kernels governed suite and MiniEmbed truth card;Each source is resolved to the latest exact commit that changed its admitted path, fetched from immutable raw GitHub, scanned for secret-like material, and converted into content-addressed candidates. The committed state records the exact candidate count and digest, including 30 attributed formulas, 21 executable formulas, nine quant domains, the active kernel/model truth cards, the A11oy public topology, Forge controller contracts, and source-document sections.
A changed candidate set creates one content-addressed review branch and attempts
to open its pull request. When organization policy blocks Actions from opening
pull requests, the receipt reports BRANCH_READY_EXTERNAL_PR_REQUIRED and an
authorized founder must open that exact branch without rewriting it. The workflow
cannot force-push, merge, train, publish weights, reveal candidate content through
the public API, load the private graph, or mutate a provider. Candidate state is
always DISCOVERED_REVIEW_REQUIRED until a separate reviewed process acts.
This is the operational meaning of “the Brain keeps learning” here:
fixed public sources
↓ exact path revisions + SHA-256
bounded candidate extraction
↓
handles-only review index
↓
content-addressed review PR
↓
human-governed acceptance or rejection
It is continuous evidence acquisition, not silent model self-modification.
The frontier memory consumes szl-holdings/szl-formulas as the active executable
kernel and its source-attributed formula/quant atlas. The atlas preserves all 30
attributed records and nine quant domains while keeping three different concepts
strictly separate:
PROOF_STATUS on the 21 executable functions;No status string promotes a formula. The F-number-to-executable mapping remains
UNKNOWN_NOT_INFERRED, and Lambda remains CONJECTURE_1_OPEN_ADVISORY_ONLY.
Empirical and conjectural records are evidence or review inputs, never execution
authority.
HybridSecondBrain is an engine-neutral retrieval coordinator:
BM25 candidates
+
optional revision-pinned dense candidates
↓
reciprocal-rank fusion
↓
optional reranker
↓
source-diversity limit
↓
handles + source/content digests only
The public Space deliberately has no opaque dense provider configured, so it
reports BM25_ONLY. A trusted Forge deployment can inject a qualified dense
provider and reranker. If a provider fails, the response either blocks or
explicitly reports BM25_FALLBACK_DENSE_UNAVAILABLE; it never claims a hybrid
run that did not occur. Similarity and ranking are never represented as
correctness.
AuthorizedHydrator and AuthorizedFrontierHydrator are library-only controller
components. They require:
Any denial, provider error, duplicate, unknown handle, source mismatch, or digest mismatch fails the whole hydration request closed. Hydrated text is never exposed by the public FastAPI application.
from second_brain import (
AuthorizedFrontierHydrator,
AuthorizedHydrator,
HybridSecondBrain,
frontier_search,
)
retriever = HybridSecondBrain(
dense_provider=my_dense_provider,
reranker=my_reranker,
)
context = retriever.context("locked formula authority", k=6)
hydrator = AuthorizedHydrator(my_authorizer)
hydrated = hydrator.hydrate(
context["handles"],
principal_id="principal-123",
tenant_id="tenant-abc",
policy_revision="<full immutable revision>",
)
review = frontier_search("formula quant anatomy ouroboros", k=12)
review_hydrator = AuthorizedFrontierHydrator(my_frontier_authorizer)
review_content = review_hydrator.hydrate(
review["handles"],
principal_id="reviewer-123",
tenant_id="tenant-abc",
policy_revision="<review policy revision>",
)
| Surface | Contract |
|---|---|
GET /health | Base 575-chunk index state |
GET /api/v1/index | Public chunk counts by source |
GET /api/v1/retrieve?q= | Legacy lexical handles-only retrieval |
GET /api/v1/navigator?q= | Legacy navigator context |
GET /api/v1/hybrid?q= | Governed retrieval with an explicit ranking receipt |
POST /api/v1/hybrid | JSON alias for governed retrieval |
GET /api/v1/retrieval-capabilities | Truthful runtime capability declaration |
GET /api/v1/frontier-status | Exact candidate/source/digest state, no content |
GET /api/v1/frontier-handles?q= | Handles-only review-candidate search |
GET /api/v1/anatomy-feed | Read-only Brain/formula/quant/Ouroboros feed for Living Anatomy |
GitHub is the source of truth; the Hugging Face Space is a deployed public surface. Apache-2.0. Doctrine v11.
19 commits
Python
89.9%
HTML
10.0%
title: SZL Second Brain emoji: 🧠 colorFrom: indigo colorTo: green sdk: docker app_port: 7860 pinned: false license: apache-2.0 short_description: Governed retrieval and review-gated continuous frontier memory. tags:
A governed memory plane for SZL inference: public handles and digests outside; authorized content hydration inside the trusted controller.
The public projection contains 575 governed chunks. The private 9,464-node graph is not published, is not queried by this package, and is never admitted to gradients. The index is data, not model weights. Lambda uniqueness remains Conjecture 1.
Version 1.3 packages the public corpus, schemas, and the review-gated frontier
candidate index into the wheel. Installing szl-second-brain in a clean
environment can build the 575-chunk index, run governed hybrid retrieval, inspect
the exact frontier state, search review candidates by handles, and perform
controller-only authorized hydration without a source checkout.
The wheel contains only public material. It contains no private graph rows, credentials, model weights, signing keys, or execution authority. CI builds the wheel, installs it into an isolated environment, changes outside the repository, and proves corpus discovery, frontier discovery, retrieval, digest parity, Living Anatomy feed generation, and authorized hydration.
An operator may still provide a different governed projection through
SECOND_BRAIN_CORPUS or AYLLU_BRAIN_CORPUS. Explicit corpus paths remain
controller decisions and must pass the same per-row digest checks.
The hourly Continuous frontier memory workflow is a bounded discovery loop,
not autonomous retraining. It reads only seven fixed public source contracts:
szl-formulas formula/quant atlas;szl-ouroboros bounded-loop kernel README;szl-kernels governed suite and MiniEmbed truth card;Each source is resolved to the latest exact commit that changed its admitted path, fetched from immutable raw GitHub, scanned for secret-like material, and converted into content-addressed candidates. The committed state records the exact candidate count and digest, including 30 attributed formulas, 21 executable formulas, nine quant domains, the active kernel/model truth cards, the A11oy public topology, Forge controller contracts, and source-document sections.
A changed candidate set creates one content-addressed review branch and attempts
to open its pull request. When organization policy blocks Actions from opening
pull requests, the receipt reports BRANCH_READY_EXTERNAL_PR_REQUIRED and an
authorized founder must open that exact branch without rewriting it. The workflow
cannot force-push, merge, train, publish weights, reveal candidate content through
the public API, load the private graph, or mutate a provider. Candidate state is
always DISCOVERED_REVIEW_REQUIRED until a separate reviewed process acts.
This is the operational meaning of “the Brain keeps learning” here:
fixed public sources
↓ exact path revisions + SHA-256
bounded candidate extraction
↓
handles-only review index
↓
content-addressed review PR
↓
human-governed acceptance or rejection
It is continuous evidence acquisition, not silent model self-modification.
The frontier memory consumes szl-holdings/szl-formulas as the active executable
kernel and its source-attributed formula/quant atlas. The atlas preserves all 30
attributed records and nine quant domains while keeping three different concepts
strictly separate:
PROOF_STATUS on the 21 executable functions;No status string promotes a formula. The F-number-to-executable mapping remains
UNKNOWN_NOT_INFERRED, and Lambda remains CONJECTURE_1_OPEN_ADVISORY_ONLY.
Empirical and conjectural records are evidence or review inputs, never execution
authority.
HybridSecondBrain is an engine-neutral retrieval coordinator:
BM25 candidates
+
optional revision-pinned dense candidates
↓
reciprocal-rank fusion
↓
optional reranker
↓
source-diversity limit
↓
handles + source/content digests only
The public Space deliberately has no opaque dense provider configured, so it
reports BM25_ONLY. A trusted Forge deployment can inject a qualified dense
provider and reranker. If a provider fails, the response either blocks or
explicitly reports BM25_FALLBACK_DENSE_UNAVAILABLE; it never claims a hybrid
run that did not occur. Similarity and ranking are never represented as
correctness.
AuthorizedHydrator and AuthorizedFrontierHydrator are library-only controller
components. They require:
Any denial, provider error, duplicate, unknown handle, source mismatch, or digest mismatch fails the whole hydration request closed. Hydrated text is never exposed by the public FastAPI application.
from second_brain import (
AuthorizedFrontierHydrator,
AuthorizedHydrator,
HybridSecondBrain,
frontier_search,
)
retriever = HybridSecondBrain(
dense_provider=my_dense_provider,
reranker=my_reranker,
)
context = retriever.context("locked formula authority", k=6)
hydrator = AuthorizedHydrator(my_authorizer)
hydrated = hydrator.hydrate(
context["handles"],
principal_id="principal-123",
tenant_id="tenant-abc",
policy_revision="<full immutable revision>",
)
review = frontier_search("formula quant anatomy ouroboros", k=12)
review_hydrator = AuthorizedFrontierHydrator(my_frontier_authorizer)
review_content = review_hydrator.hydrate(
review["handles"],
principal_id="reviewer-123",
tenant_id="tenant-abc",
policy_revision="<review policy revision>",
)
| Surface | Contract |
|---|---|
GET /health | Base 575-chunk index state |
GET /api/v1/index | Public chunk counts by source |
GET /api/v1/retrieve?q= | Legacy lexical handles-only retrieval |
GET /api/v1/navigator?q= | Legacy navigator context |
GET /api/v1/hybrid?q= | Governed retrieval with an explicit ranking receipt |
POST /api/v1/hybrid | JSON alias for governed retrieval |
GET /api/v1/retrieval-capabilities | Truthful runtime capability declaration |
GET /api/v1/frontier-status | Exact candidate/source/digest state, no content |
GET /api/v1/frontier-handles?q= | Handles-only review-candidate search |
GET /api/v1/anatomy-feed | Read-only Brain/formula/quant/Ouroboros feed for Living Anatomy |
GitHub is the source of truth; the Hugging Face Space is a deployed public surface. Apache-2.0. Doctrine v11.
19 commits
Python
89.9%
HTML
10.0%