Skip to content

Commit 364ce39

Browse files
committed
docs: add generalized stack implementation guides
1 parent 52038bc commit 364ce39

7 files changed

Lines changed: 265 additions & 0 deletions

File tree

.blitz/test_state_v1/indexes/task_states.ndjson

Lines changed: 47 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,3 +228,33 @@ Expected local contract: `127.0.0.1:7233`, UI `http://127.0.0.1:8233`, namespace
228228
## Persistence Documentation
229229

230230
See `docs/persistence.md` for tiers, defaults, adapters, unsupported selections, config examples, restart claims, durability claims, debug sidecar behavior, redaction guarantees, migration or preflight behavior, and no-bypass scope when applicable.
231+
232+
## gn-ten Implementation Guides
233+
234+
OuterBrain is the semantic runtime gateway. It turns language-facing input into
235+
bounded semantic facts, action requests, quality evidence, and publication
236+
state without owning product workflow, provider credentials, connector
237+
execution, or policy authority.
238+
239+
Read these repo-specific guides before changing semantic runtime behavior:
240+
241+
- [Generalized Stack Boundary](https://github.com/nshkrdotcom/outer_brain/blob/main/guides/generalized_stack.md)
242+
- [QC And Operations](https://github.com/nshkrdotcom/outer_brain/blob/main/guides/qc_and_operations.md)
243+
244+
Operational rules:
245+
246+
- Public interfaces are owned by the `core/outer_brain_*`, prompt/context/
247+
memory/guardrail/eval/token packages, bridge packages, and host surface.
248+
- OuterBrain may consume Citadel authority facts and GroundPlane primitives. It
249+
must not bypass Citadel for governance, Jido Integration for connectors, or
250+
Mezzanine for admitted workflow truth.
251+
- Provider vocabulary is allowed only as semantic input data, failure
252+
classification data, trace facts, receipt facts, or adapter evidence. Generic
253+
semantic routing must use manifest, action, authority, and lease refs.
254+
- OuterBrain does not own GitHub or Linear live commands. If a product or proof
255+
command exercises those providers through an OuterBrain path, prefix it with
256+
`~/scripts/with_bash_secrets`.
257+
- Local development uses `mix deps.get`, `mix ci`, package-local tests, and the
258+
Mezzanine-owned Temporal workflow only when a cross-repo proof requires it.
259+
- Evidence is emitted through semantic journal tests, restart-durability
260+
receipts, quality/provenance refs, StackLab proofs, and AITrace events.

apps/host_surface/mix.lock

Lines changed: 35 additions & 0 deletions
Large diffs are not rendered by default.

examples/console_chat/mix.lock

Lines changed: 35 additions & 0 deletions
Large diffs are not rendered by default.

guides/generalized_stack.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# OuterBrain Generalized Stack Boundary
2+
3+
## Responsibility
4+
5+
OuterBrain owns semantic-session state, context assembly, prompt and strategy
6+
shaping, semantic failure carriers, action-request synthesis, provisional/final
7+
reply publication, restart replay, and quality/provenance evidence.
8+
9+
It does not own product workflow truth, connector SDKs, credential leases,
10+
governance policy, lower lanes, or primitive persistence semantics.
11+
12+
## Public Interfaces
13+
14+
Primary package groups:
15+
16+
- `core/outer_brain_contracts`, `core/outer_brain_core`,
17+
`core/outer_brain_journal`, `core/outer_brain_runtime`,
18+
`core/outer_brain_persistence`, `core/outer_brain_restart_authority`, and
19+
`core/outer_brain_quality`;
20+
- prompt, context, memory, guardrail, eval, token, artifact, and optimization
21+
packages;
22+
- bridges for Citadel, typed domains, publication, review, and GroundPlane
23+
projections;
24+
- `apps/host_surface` and proof examples.
25+
26+
## Dependency Rules
27+
28+
Allowed dependencies:
29+
30+
- Citadel contracts for authority and governed route facts;
31+
- GroundPlane primitives for leases, refs, persistence posture, and projection
32+
helpers;
33+
- AppKit or host-surface DTOs at the northbound edge;
34+
- AITrace/export contracts for replay and evidence.
35+
36+
Forbidden dependencies:
37+
38+
- direct connector/runtime calls;
39+
- product workflow mutation;
40+
- policy decisions that should be made by Citadel;
41+
- raw provider payloads or private prompt/context bodies in public receipts;
42+
- unsupervised semantic workers or background tasks.
43+
44+
## Provider Vocabulary Zoning
45+
46+
Provider terms may describe external refusal, adapter unavailability, model
47+
family metadata, or trace/evidence data. They must not select generic semantic
48+
control flow. Routing should use stored manifest snapshots, action refs,
49+
authority refs, and credential lease refs.
50+
51+
## Migration And Cleanup Ownership
52+
53+
OuterBrain cleanup work removes semantic runtime shortcuts, prompt/context
54+
leaks, stale env access, old atomization hazards, unsupervised task runners,
55+
and proof-only compatibility paths after the replacement semantic evidence is
56+
covered by tests and StackLab receipts.

guides/index.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# OuterBrain Guides
2+
3+
Implementation-facing guides:
4+
5+
- [Generalized Stack Boundary](https://github.com/nshkrdotcom/outer_brain/blob/main/guides/generalized_stack.md)
6+
- [QC And Operations](https://github.com/nshkrdotcom/outer_brain/blob/main/guides/qc_and_operations.md)
7+
8+
The root [README](../README.md) remains the package and runtime entrypoint.

guides/qc_and_operations.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# OuterBrain QC And Operations
2+
3+
## Local Commands
4+
5+
```bash
6+
mix deps.get
7+
mix ci
8+
```
9+
10+
Use package-local tests for focused semantic, persistence, prompt, or bridge
11+
changes, then root `mix ci` before commit.
12+
13+
## Scanner And Proof Obligations
14+
15+
OuterBrain changes must keep these obligations green:
16+
17+
- restart-durability and semantic-session tests;
18+
- prompt/context redaction and provenance tests;
19+
- StackLab `examples/outer_brain_restart_durability` and session-lineage proof
20+
coverage when semantic replay behavior changes;
21+
- no Regex usage in touched code/tests;
22+
- no dynamic atom construction from runtime input;
23+
- supervised ownership for any process, worker, session fence, publication
24+
runner, or background task.
25+
26+
## Secrets And Live Providers
27+
28+
OuterBrain does not read GitHub or Linear secrets. Semantic evidence may refer
29+
to provider facts through lower receipts, but credential material stays in Jido
30+
Integration leases and product/live commands.
31+
32+
If a proof command reaches GitHub or Linear through an OuterBrain-backed product
33+
path, prefix it with:
34+
35+
```bash
36+
~/scripts/with_bash_secrets
37+
```
38+
39+
## Tenant, Observability, And Replay
40+
41+
Every semantic journal, publication, failure carrier, and quality evidence ref
42+
must carry tenant/session/causal-unit scope. Public evidence should expose
43+
redacted refs, not raw prompt, context, provider, or private reasoning bodies.
44+
AITrace receives semantic lineage events needed for replay.
45+
46+
## Documentation Checks
47+
48+
After doc edits, run:
49+
50+
```bash
51+
test -f README.md
52+
find guides -maxdepth 1 -type f -name '*.md' -print | sort
53+
git diff --check -- README.md guides
54+
```

0 commit comments

Comments
 (0)