Skip to content

overview

Claude edited this page Sep 23, 2026 · 3 revisions

SAFRS Monorepo overview

The SAFRS Monorepo lets one human Chief operate many software projects through autonomous AI engineering with machine-enforced constraints.

Canonical purpose: docs/architecture/MONOREPO_PURPOSE.md. Canonical specification: SAFRS_SPEC.md. Canonical routing: root AGENTS.md.

Wiki home: README.

Operating model

Human-Governed · Agent-Executed · Machine-Enforced

  • Chief defines objectives, policy, authority boundaries, and genuine high-impact decisions.
  • Agents execute engineering inside that envelope.
  • Machines enforce topology, verification, isolation, and evidence.

The monorepo succeeds only when it reduces Chief's operational burden. It must not turn Chief into a terminal operator or per-command approval service.

Two layers (do not collapse them)

flowchart TB
  subgraph control["Root — optional control plane"]
    AGENTS["AGENTS.md + .agents/"]
    POLICY[".safrs/ policy, schemas, inventory"]
    TOOLS["tools/ + scripts/safrs-verify"]
    PKGS["packages/@safrs/*  authoring / legacy"]
  end
  subgraph products["projects/ — sovereign capsules"]
    D["domain folders: academic, corporate, healthcare, internal, product"]
    C["capsules: sentrabot, kediri-history, avery, smartboard, portfolio, golden-path, control-center"]
    D --> C
  end
  TOOLS -->|"orchestrate, never become runtime"| C
  PKGS -.->|"legacy only: golden-path, control-center"| C
Loading

Deleting access to the root must not break an extracted capsule's normal lifecycle (invariants I-01 … I-03 in MONOREPO_PURPOSE.md).

What lives here

Area Role
projects/<domain>/<capsule>/ Independently operable products
packages/ Product-neutral @safrs/* and @sentra/token for legacy root-integrated apps
tools/ Doctor, task, automation, SAFRS checkers, wizard, standalone verifier
.safrs/ Machine policy and JSON Schema contracts
.agents/ Agent memory (HANDOFF, decisions, lessons) — not runtime
docs/ Canonical architecture, ADRs, governance, plans
tests/ Repository integration and governance tests
scripts/ Root orchestration (safrs-verify, setup, dev)
database/ Gitignored medical-guideline corpus (not Prisma)
sentrawiki/ This wiki — derived navigation

Capsule inventory (current)

Capsule Domain Standalone posture
sentrabot product Own pnpm workspace; excluded from root workspace
kediri-history product Own pnpm workspace; excluded from root workspace
academic-smartboard academic Own pnpm workspace; excluded from root workspace
portfolio-drnovia corporate Contract present; vendored static site
avery healthcare Hermes configuration capsule, not a Node app
golden-path internal Legacy root-coupled demonstrator
control-center internal Root-coupled local operator UI
_template n/a Scaffold only

Full map: Project capsules.

Tech stack (root control plane)

Layer Technology
Package manager pnpm 11.21.0 (packageManager in root package.json)
Runtime Node.js >=24.18.0 <25
Language TypeScript (strict); Python 3 for governance checkers
Legacy demo web Next.js 16 App Router, Node runtime
Legacy demo API Hono 4 + @hono/zod-validator
Schema Zod 4 (packages); JSON Schema 2020-12 (automation)
Legacy demo DB PostgreSQL 17 via root compose.yaml on 127.0.0.1:54329
Build Turborepo 2
Lint/format Biome 2
Test Vitest 4, Playwright, Node --test, Python unittest
Observability OpenTelemetry OTLP/HTTP to local Jaeger (optional)
CI GitHub Actions: ci, safrs-governance, safrs-pr-gates, safrs-publish, safrs-task-control

Product capsules may pin different stacks. SentraBot, Kediri, and Avery are not this table.

Declared conformance

SAFRS Core is declared (docs/governance/safrs_conformance.md, assessment 2026-08-10). Controlled / Secure / Regulated are not claimed.

See Conformance.

Quick links

Clone this wiki locally