Local development
Prerequisites
Section titled “Prerequisites”- Go 1.25+
golangci-lintv2 (brew install golangci-lint/apt install golangci-lint)ripgrep(brew install ripgrep/apt install ripgrep)bash(preinstalled on macOS and most Linux)- Docker (for image builds)
The Makefile’s test, lint, fmt targets work from a plain clone; docker-build additionally needs Docker.
Common flows
Section titled “Common flows”# Unit + integration tests, race detector onmake test
# Lintmake lint
# Format (gofmt + goimports — goimports must be on PATH)make fmt
# Build the local binarymake build./bin/sandbox -workspace=/tmp/ws
# Build + run the Docker imagemake docker-buildmake docker-runProject layout
Section titled “Project layout”cmd/sandbox/ Entry point (main + Run + graceful shutdown)internal/workspace/ Path containment + read trackerinternal/server/ MCP server + scrubbing middlewareinternal/tools/ MCP tool handlers + shared exec helperinternal/verify/ Project detection + lint parserinternal/scrub/ Secret-pattern redactiondocs/ This Astro docs siteDockerfile Multi-stage container imageConventions
Section titled “Conventions”- Conventional commits (
feat:,fix:,chore:,docs:). - TDD by default: failing test → minimal impl → green → commit. Bootstrapping is the documented exception.
golangci-lintmust pass before commit. Runmake lintlocally.- Path containment is non-negotiable: every filesystem-touching tool resolves paths via
workspace.Resolvebefore I/O. - Structured tool output: tools return structured fields (e.g.
file:line:rule:messagefor lint), not raw subprocess stdout dumps. - Same MCP server across all eval methodologies: no forks for benchmark variants.
Implementation plans
Section titled “Implementation plans”The full implementation history is in docs/plans/ — one document per feature, written before implementation and versioned with the code. Each plan has:
- Spec + architecture + tech stack.
- File structure (what’s created/modified).
- Numbered tasks with TDD steps.
- Self-review notes.
Plans are organised by date:
- 2026-04-22 foundation, search, bash, verification, scrubbing
- 2026-04-23 docker, bash-background, web
Plans are executed via the superpowers:subagent-driven-development skill, which dispatches a fresh implementer subagent per task with spec-compliance and code-quality review checkpoints.
Adding a feature
Section titled “Adding a feature”See Extending for the common extension points (new tool, new detector, new WebSearch backend, new scrub pattern).
For anything bigger, write a plan first and execute it task-by-task. Prior plans under docs/plans/ are a reference for the expected shape.
Running the docs locally
Section titled “Running the docs locally”cd docsnpm installnpm run devVisit http://localhost:4321/. Astro hot-reloads on file save.
Docs hygiene
Section titled “Docs hygiene”cd docsnpm run build # Catches broken frontmatter and typecheck errors.npm run check-links # Catches broken internal + external links.