Dev-Process Private Boundary
This document defines the architectural boundary between public fak (the open-source agent kernel and model runtime) and private fak-private (the proprietary serving product and autonomous development factory).
Context: As detailed in
NOTES-serving-product-economics-and-hardware-architecture-2026-09-03.md(infak-private), our autonomous development flywheel (“The Factory”) is as much a competitive advantage as the kernel itself (“The Engine”). This document establishes the boundary, encapsulation rules, and migration phases for moving development process modules intofak-private.For GPU hardware boundaries, see
docs/gpu-server-private-boundary.md. For public fleet status, seedocs/fleet.md. For multi-repo workspace topology and synchronization mechanics, seedocs/notes/2026-09-03-dual-repo-workspace-and-safe-sync.md. For harness-level contracts and isolation rules across the public/private seam, seedocs/architecture/public-private-harness-boundary.md.
1. The Core Split: The Engine vs. The Factory
┌─────────────────────────────────────────────────────────────────────────────┐
│ PUBLIC REPOSITORY (fak) │
│ "The Open Source Core" │
│ │
│ - Core Go runtime: cmd/fak, internal/engine, internal/abi, internal/ctxmmu│
│ - Client drop-in proxy & safety gate: fak guard, fak preflight, fak serve │
│ - Exported SDK & Public API: pkg/abi, pkg/scorecard, pkg/fakclient │
│ - Open-source benchmark runners: livecodebench, radixbench │
│ - Standard diagnostic probes: cfgprobe, gpucheck │
└──────────────────────────────────────┬──────────────────────────────────────┘
│ Imports via go.work / pkg/*
│ CLI process boundary via fak dev
▼
┌─────────────────────────────────────────────────────────────────────────────┐
│ PRIVATE REPOSITORY (fak-private) │
│ "The Commercial Serving & Factory" │
│ │
│ 1. THE SERVING PRODUCT │
│ - Multi-tenant KV-MMU memory multiplexer & scheduler │
│ - Speculative branch rollback & zero-recompute engine │
│ - Multi-tenant OpenAI / Anthropic-compatible metering proxy │
│ - Hardware tiering: GDS / AMD Smart Access Storage daemons │
│ │
│ 2. THE AUTONOMOUS FACTORY ("How We Develop fak") │
│ - Autonomous wave dispatchers & queueing: platform/dispatch/ │
│ - Paced contract leases: refs/fak/locks/contract-* │
│ - Metric scorecards & regression ratchets: platform/scorecards/ │
│ - Session watchdogs & self-healing reapers: platform/watchdogs/ │
│ - Hardware control bridge: tools/dgxbridge, dgxsh │
│ - Durable agent memory archives & sync hooks │
└─────────────────────────────────────────────────────────────────────────────┘
2. Public Tree (fak)
The public repository owns the open-source kernel, developer SDKs, runtime capabilities, and verifiable public benchmarks.
What stays in public fak:
- Core Kernel Runtime:
- Model serving, tokenizers, KV-MMU, and execution engines (
internal/engine,internal/model,internal/compute,internal/kvmmu). - Context MMU, capability floors, policy evaluation, and tool adjudication (
internal/adjudicator,internal/policy,internal/ctxmmu). - The primary CLI entry point (
cmd/fak).
- Model serving, tokenizers, KV-MMU, and execution engines (
- Exported Public Seam (
pkg/):pkg/abi: Frozen ABI verdicts, capabilities, and tool envelopes.pkg/scorecard: Public scorecard primitives, grading, and rendering.pkg/fakclient: Agent-RPC client and event streaming wrappers.pkg/harnesskit&pkg/harnesssidecar: Public harness integration abstractions.
- Open Benchmarks & Probes:
- Standard, reproducible benchmark suites (
livecodebench,radixbench,tokensim). - Hardware detection and readiness probes (
cfgprobe,gpucheck).
- Standard, reproducible benchmark suites (
- Transition Process Boundary:
cmd/fak-dev: Dedicated CLI for repo maintainers during migration.cmd/fak/dev.go: Compatibility process handoff redirectingfak dev <verb>tofak-devas a separate child process.
3. Private Tree (fak-private)
The private repository owns commercial serving components and the autonomous development process engine that powers continuous development sweeps.
What lives in fak-private:
- The Autonomous Factory Modules:
platform/dispatch/: Wave dispatchers, ticket DAG resolution, and worker life-cycle orchestrators (migratingtools/issue_dispatch.py,tools/worker_worktree.py,cmd/dispatchworker).- Contract Leases: Distributed, CAS-guarded contract leases (
refs/fak/locks/contract-<id>) governing token/IO pacing across autonomous agents. platform/scorecards/: Autonomous development scorecards, control panes, and regression ratchets (migratingtools/scorecard_control_pane.pyand proprietary scorecard scripts).platform/watchdogs/: Fleet and session watchdogs, background autohealers, and reapers (migratingtools/fleet_resume_watchdog.*and session monitor daemons).- Hardware Control: Private lab bridges (
tools/dgxbridge), remote cluster fabrics, and unredacted GPU execution runbooks. - Durable Memory Store: Historical agent memory archives (
agent-memory/fak/) and sync infrastructure.
4. Architectural Contracts Across the Seam
4.1 Go Workspace & Module Encapsulation Rule
The Go compiler enforces that packages under internal/ within module github.com/anthony-chaudhary/fak cannot be imported by an external module such as github.com/anthony-chaudhary/fak-private.
Therefore, the Go-level boundary adheres strictly to:
go.workWorkspace Setup:fak-privatecontains a rootgo.workreferencing.and../fak, enabling unified local resolution.pkg/Export Rule: Any Go types or abstractions required by both the public runtime and private factory must live infak/pkg/*(e.g.,pkg/abi,pkg/scorecard,pkg/fakclient,pkg/harnesskit), NEVER ininternal/*. Seedocs/architecture/public-private-harness-boundary.mdfor the complete export invariant and isolation rules.- Zero Runtime Import of Private Code: Public
fakmust never reference or import any module or package infak-private.
4.2 Process Boundary Seam (fak dev)
For complex maintainer operations, fak and fak-private decouple through the CLI process boundary:
fak dev <verb>in runtimefakdoes not compile dev tooling intocmd/fak. Instead, it locates and executesfak-devas a subprocess via standard I/O streams.- Private factory tools in
fak-privateinvoke publicfakorfak-devvia CLI subcommands with--jsonoutputs, ensuring complete binary separation.
4.3 Ref-Based and JSON Storage Seams
- Git Refs: Autonomous workers coordinate state through namespaced git references (
refs/fak/locks/contract-*for contracts,refs/fak/locks/<lane>for file trees). - Scrubbed JSON: Public status readers (e.g.,
fleetctl) consume scrubbed status manifests produced across the boundary without exposing raw hostnames, private IPs, or API keys.
4.4 Cross-Repo Bundle Distribution & Air-Gap Verification (.fakpack)
To distribute hermetic models, capabilities, and harness collections securely across the private-to-public boundary:
- Creation & Packaging (Private Factory):
fak-privatebundles internal model weights, binaries, policies, and assets withharness.lock.jsoninto an air-gapped.fakpackOCI collection:fak pack create --lock harness.lock.json --bin ./bin --assets ./assets --model model.bin --out bundle.fakpack
- Cosign SimpleSigning (Private Factory Seam):
- The factory signs the bundle’s manifest digest using standard Go crypto (Ed25519/ECDSA) via Cosign simple signing payloads (
application/vnd.dev.cosign.simplesigning.v1+json):fak pack sign --bundle bundle.fakpack --key /path/to/private.key - The resulting signature is embedded directly within the
.fakpackarchive assignature.json.
- The factory signs the bundle’s manifest digest using standard Go crypto (Ed25519/ECDSA) via Cosign simple signing payloads (
- Distribution & Air-Gap Verification (Public / Production Runtime):
- The signed
.fakpackbundle is transferred across the boundary to public deployments or air-gapped target environments. - On
fak upor bundle deployment, publicfakperforms offline cryptographic and integrity verification:fak pack verify --bundle bundle.fakpack --verify-key /path/to/public.key - Verification strictly enforces:
- Hermetic content digests: SHA-256 validation of all layer blobs and manifest descriptors (
BUNDLE_DIGEST_MISMATCH/BUNDLE_CORRUPT). - Harness completeness: Checks that all components and assets declared in
harness.lock.jsonare present in the archive. - Air-gap safety gate: Immediate rejection of any outbound
http://orhttps://URLs in asset or component references (AIRGAP_URL_FORBIDDEN). - Cosign signature verification: Cryptographic verification of the embedded signature against the operator’s pinned public key (
BUNDLE_SIGNATURE_INVALIDon failure).
- Hermetic content digests: SHA-256 validation of all layer blobs and manifest descriptors (
- See
docs/architecture/public-private-harness-boundary.mdfor OCI layer layout specifications, RFC 8785 canonical lock generation, and airgap validation.
- The signed
5. Asymmetric Leak Gate & Scrub Policy
Because fak is open source and fak-private contains proprietary flywheels and credentials:
- Git Hooks:
tools/check_committed_files.pyandtools/githooks/pre-commitruntools/scrub_public_copy.py --audit-stagedon every commit infak. - Forbidden Needles: GPU server hostnames, Slack tokens, private paths, private repo URLs, and raw execution logs are blocked from entering
fak. - Boundary Refusal: Any attempt to commit private platform code directly into the public
internal/tree is blocked underFILE_ADMISSION.
6. Migration Roadmap
The migration of dev process modules to fak-private proceeds in five sequential phases:
| Phase | Milestone | Deliverables |
|---|---|---|
| Phase 1 | Groundwork & Boundary Contract (Current) | docs/dev-process-private-boundary.md, docs/architecture/public-private-harness-boundary.md, go.work integration in fak-private, clean workspace compilation, issues #11166 and #11611. |
| Phase 2 | Private Platform Scaffolding | Scaffold platform/dispatch/, platform/scorecards/, and platform/watchdogs/ in fak-private with clean pkg/* imports. |
| Phase 3 | Autonomous Dispatch & Contract Leases | Implement contract lease queueing (refs/fak/locks/contract-*) and dispatch workers in fak-private/platform/dispatch/. |
| Phase 4 | Scorecards & Watchdogs Relocation | Migrate scorecard control panes and session recovery watchdogs to fak-private/platform/. |
| Phase 5 | Public Deprecation & Handoff | Deprecate legacy in-tree dev scripts in fak/tools/, leaving thin process handoffs. |