Repository navigation
features capability packs
Optional capability activation for root-scaffolded projects.
Optional modules — Stripe, email, Electron, WXT, AI, and Python — activated via pnpm capability:add. They are not the runtime baseline. Activation is R2; the tool records selection in capabilities.json and leaves runtime integration as a separate project-scoped R2 task.
This is not how SentraBot got Electron/Expo/AI. Those are first-class apps inside the SentraBot capsule. Do not run pnpm capability:add against an excluded sovereign capsule as if it were golden-path.
| File | Role |
|---|---|
tools/capabilities/manifests/stripe.json |
Stripe pack manifest |
tools/capabilities/manifests/email.json |
Email pack manifest |
tools/capabilities/manifests/electron.json |
Electron pack manifest |
tools/capabilities/manifests/wxt.json |
WXT pack manifest |
tools/capabilities/manifests/ai.json |
AI pack manifest |
tools/capabilities/manifests/python.json |
Python pack manifest |
tools/capabilities/src/catalog.mjs |
Catalog loader + applyCapability logic |
tools/capabilities/src/schema.mjs |
Manifest/capabilities validation |
tools/capabilities/package.json |
Tool workspace manifest (@safrs/capabilities) |
projects/internal/golden-path/capabilities.json |
The golden-path project's active packs |
docs/governance/SAFRS_PROJECT_CAPSULES.md |
Project capsule / capability convention |
The catalog in tools/capabilities/src/catalog.mjs loads every .json file in tools/capabilities/manifests/, validates it with schema.mjs, and enforces that the filename matches the manifest id. Each manifest describes the pack's boundary:
{
"id": "email",
"label": "Local email development",
"description": "React Email preview and provider delivery boundary ...",
"risk": "R2",
"dependencies": ["@react-email/components", "react-email", "resend"],
"environment": ["EMAIL_FROM", "RESEND_API_KEY"],
"commands": ["pnpm dev:email"],
"tests": ["render email templates", "block non-local recipients in development"],
"sensitivePaths": ["projects/<domain>/<capsule>/emails/**", "projects/<domain>/<capsule>/src/email/**"],
"sideEffects": ["Provider delivery is disabled by default in local development."],
"removal": "Remove project email code, environment entries, and the project capability record ..."
}pnpm capability:add runs node tools/capabilities/src/cli.mjs (wired in the root package.json). The core logic in applyCapability:
- Loads and validates the catalog, finds the manifest for the requested capability.
- Sanitizes the project slug and verifies the target is a real directory inside
projects/(rejecting symlinks and escaping paths). - Requires an exact confirmation string
ENABLE <id> FOR <slug>— nothing is written otherwise. - For the
pythonpack, requires a recorded technical justification that Node.js is unsuitable. - Reads the project's existing
capabilities.json, appends or updates the capability record ({ id, risk }, risk raised tomaximumRiskif already present), sorts, and writes{ version: 1, capabilities }back.
Activation records the selection; it does not install runtime integration. The manifest's own note is explicit: "Runtime integration is not installed by this selector; it remains a project-scoped R2 task."
| Pack | Risk | Boundary |
|---|---|---|
| Stripe | R2 | Sandbox-only payment integration with local webhook forwarding (pnpm stripe:listen); no live charges permitted; verifies signatures; rejects live keys in local defaults |
| R2 | React Email preview + provider delivery; provider delivery disabled in local development; blocks non-local recipients in dev | |
| Electron | R2 | Desktop shell with explicit preload allowlist and IPC validation; requires a project-scoped threat model |
| WXT | R2 | Browser extension with permission-minimized manifest review and content-script isolation |
| AI | R2 | Provider-neutral AI boundary with structured Zod output and deterministic test doubles; explicit request/token bounds |
| Python | R2 | Available only with a recorded technical justification proving Node.js is unsuitable |
All six are R2: they cross the shared-package/dependency boundary and add new runtime capability, so each requires the enhanced review mandated by the SAFRS control matrix.
Every pack is declared R2 in its manifest because activation touches dependencies, environment keys, and sensitive paths. The golden-path project currently activates exactly two: email and stripe (projects/internal/golden-path/capabilities.json). Sensitive paths for each pack (for example projects/<domain>/<capsule>/src/payments/**, src/webhooks/**, emails/**, apps/desktop/**, apps/extension/**, src/ai/**, python/**) map into .safrs/sensitive-paths.json's R2 review posture.
graph LR
CLI["pnpm capability:add<br/>tools/capabilities/src/cli.mjs"]
CAT["catalog.mjs<br/>loads manifests/ + validates"]
MF["stripe | email | electron | wxt | ai | python .json"]
P["project directory check<br/>real dir under projects/"]
CI["confirmation + capability record"]
CAP["projects/<domain>/<capsule>/capabilities.json"]
RT["Runtime integration:<br/>project-scoped R2 task"]
CLI --> CAT
CAT --> MF
CAT --> P
P --> CI
CI --> CAP
CAP --> RT
-
Golden-path:
projects/internal/golden-path/capabilities.jsonactivates email + stripe; see golden-path-web for the email template and Stripe webhook route. -
Project capsules: capability selection is part of the capsule convention in
docs/governance/SAFRS_PROJECT_CAPSULES.md. - Tooling: the catalog tool is documented in tools/capabilities.md.
- Governance: activation and its sensitive paths are governed by the risk tiers in SAFRS governance.
SAFRS — the Sentra Agent-First Repository Standard — defines how a software repository should be structured, governed, and enforced when autonomous Artificial Intelligence agents perform a substantial share of engineering work by Sentra Artificial Intelligence.
SAFRS v1.1 addresses that problem through five coupled mechanisms:
- a six-layer repository architecture from Trust Boundary to Human Authority;
- a role-based permission model in which capability never implies trust;
- a four-tier risk model with cumulative mandatory controls;
- a multi-agent execution protocol with explicit task states and one mutation owner per bounded scope;
- a knowledge governance model that distinguishes current architecture, historical decisions, execution plans, Git history, and running code.
Built in Indonesia as part of the Sentra Artificial Intelligence ecosystem.
Sentra Artificial Intelligence · Source Repository · Official Website
Dr Ferdi Iskandar — Creator & Maintainer
LinkedIn ·
ORCID ·
Hugging Face ·
Kaggle ·
Medium ·
Substack ·
X ·
Threads
MyPrompt · Sentra Artificial Intelligence · Indonesia
- SentraBot
- Kediri History
- Academic Smartboard
- Avery
- Portfolio Dr. Novia
- Golden Path (legacy demonstrator)
- Control Center
- Capsule template
- Risk model (R0–R3)
- Agent roles and permissions
- Capsule sovereignty
- Multi-agent protocol
- Document lifecycle
- Sensitive paths
- Verification integrity
Lore — how this repository grew
- Schemas (
@safrs/schemas) - Environment (
@safrs/env) - Database (
@safrs/database) - API (
@safrs/api) - UI (
@safrs/ui) - Telemetry (
@safrs/telemetry) - Token (
@sentra/token) - Config (
@safrs/config) - Auth (
packages/auth)
- SAFRS governance checkers
- SAFRS Automation Control Plane
- Gaffer Runtime
- Doctor
- Project wizard
- project-standalone
- Capabilities
- Codegen
- Deps-graph
- Status CLI
- Task CLI