Skip to content

Development

Sandbox Loom is currently a Ruby modular monolith. Changes should preserve the boundaries between policy, gateway, lifecycle, brokers, backend adapters, executor, and closed-loop orchestration.

Verification

Install the pinned development toolchain first:

bundle install

Run the complete quality harness with:

bin/ci quality

Individual gates are available when narrowing a failure:

bin/ci lint
bin/ci unit_tests
bin/ci integration_tests
bin/ci security_tests
bin/ci coverage

The suite covers policy decisions, gateway behavior, security boundaries, broker contracts, executor/session lifecycle, OCI backend lifecycle, and closed-loop repair/escalation. The coverage gate requires at least 90% line coverage and 70% branch coverage. Provider-specific OCI acceptance runs remain additional evidence beyond the local default suite.

Where to change what

  • Add authorization semantics under src/policy_engine/.
  • Add agent-facing local capabilities under src/gateway/.
  • Add external or host-facing mediation under src/brokers/.
  • Add isolation adapters under src/backends/.
  • Add sandbox identity and lifecycle behavior under src/sandbox_manager/.
  • Add sandbox-side protocol behavior under src/executor/.
  • Add workflow orchestration under src/development_loop/.

Normative changes belong in specifications/ and should be reflected in tests and consumer-facing documentation.

Maintain the technical documentation

Treat implementation, schemas, and accepted decisions as the source of truth. Update the published page in the same change whenever one of those sources changes a reader-facing contract.

Documentation topic Source of truth Published projection
Current project and phase status specifications/architecture/implementation-plan.md Root README and audience guides
CLI commands and side effects bin/sandbox-loom and its command handlers CLI reference
Workflow fields and validation specifications/workflows/ schemas and validators Workflow guide
Architecture and security decisions specifications/architecture/, specifications/security/, and specifications/decisions/ Architecture, Security, and Decisions
Runtime acceptance for this host specifications/decisions/0013-runc-accepted-youki-host-blocker.md and retained acceptance evidence Operations runbook

Keep acceptance records historical. Put current operating instructions in a maintained guide or runbook and link to the record when its evidence matters. Label host-specific results as host-specific, and update them when new acceptance evidence changes the decision.

Before publishing documentation changes:

  1. Check commands, defaults, and status claims against their source of truth.
  2. Keep public pages explicit about source access, credentials, and external effects.
  3. Build the site with strict link and snippet validation:
./.venv-zensical/bin/zensical build --clean --strict
  1. Review the generated diff and update the relevant page when a source contract changes. The build validates site structure, links, and snippets; it does not execute shell commands shown in documentation.

The publishing guide describes the current build and deployment workflow.