Extracted sandcastle core: shared Nix flake + orchestrator for autonomous agent PR loops
- TypeScript 54.9%
- Nix 45.1%
Shared Nix flake in the standard shape (flake-utils.eachDefaultSystem +
rust-overlay), exposing:
- lib.${system}.mkSandcastleImage { name, tag, extraContents, extraEnv,
forgeUrl } — wraps dockerTools.fakeNss + streamLayeredImage over the base
package set; bakes configure-tea (parameterized by forgeUrl), fmt, and check.
- apps.${system}.sandcastle — the orchestrator as a self-contained
buildNpmPackage node app bundling @ai-hero/sandcastle + zod + the plan prompt.
- checks.${system}.sandcastle — builds the app and runs the loadConfig tests.
The orchestrator has a pure loadConfig(tomlString) -> ResolvedConfig step
(defaults applied; throws on missing repo/forgeHost) and runs the read-only
planner lane only: reads .sandcastle/config.toml, builds a sandbox from
imageName with the configure-tea hook, runs the planner, and validates the
<plan> JSON. No execute phase yet.
The plan prompt is genericized: --repo dropped from all tea calls (slug
auto-derived from the sandbox remote); branch format sandcastle/issue-{id}
and label lifecycle hardcoded.
Refs weiwen/sandcastle#2
|
||
|---|---|---|
| prompts | ||
| src | ||
| .gitignore | ||
| AGENTS.md | ||
| CLAUDE.md | ||
| flake.lock | ||
| flake.nix | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
sandcastle
Extracted sandcastle core: shared Nix flake + orchestrator for autonomous agent PR loops