Person/codekiln/GitHub/sourcer/Project/v0 AI Spec/DevContainer
DevContainer integration
- Parent: Person/codekiln/GitHub/sourcer/Project/v0 AI Spec
- DevContainers, DevContainer/Features, and GitHub Codespaces usually open one repository. Sourcer provides a repeatable way to materialize many trusted repos into predictable paths inside the container filesystem.
Problem being solved
Design fit
- Declarative
srcr.tomlin the project repo lists[sources]required for this codebase. srcr installduring image build or container create populatesroot(default~/sources).srcr wheregives stable paths for editor multi-root, scripts, and agent tools.- Access policy (see Person/codekiln/GitHub/sourcer/Project/v0 AI Spec/Trust): MVP
[sources]defines whatinstallfetches; Phase 2[allow]may permit optionalsrcr use— important for images baked with credentials.
- Declarative
Recommended placement in devcontainer lifecycle
Image build (best cache behavior)
postCreateCommand (developer iteration)
- Run
srcr doctorthensrcr installto pick up config changes without rebuild. - Pair with mise: install
srcrtool, thenmise run sources-install.
- Run
postStartCommand
devcontainer.jsonsketchDev Container Features
- A DevContainer/Feature can wrap Sourcer for consumers who do not author full Dockerfiles:
- MVP constraint: config is file-edited — feature should ship a
srcr.tomlfragment or env-injected temp config, not mutate user's global dotfiles; runsrcr install, notsrcr use. - Phase 2:
srcr use github.com/org/libinside feature install enables one-line feature definitions and cache-friendly layers (see Person/codekiln/GitHub/sourcer/Project/v0 AI Spec Phase 2).
Codespaces and CI parity
AI agent configuration inside containers
- Pre-cloned corpus means agents need not hold git hosting credentials if network policy blocks outbound git.
- Agent instructions reference identities, not paths:
- Phase 2: structured
srcr use … --jsonfor optional repos not baked into image (must match[allow]or[sources]withinstall = false). - Combines with overview goal: explicit structural boundaries for agents in DevContainer environments.
Networking and secrets
Multi-root workspace
mise integration in containers
Anti-patterns
- Cloning ad hoc in
postCreateCommandwithoutsrcr.toml— paths drift, access policy is unauditable. - Giving agents PAT with repo:all while also using Sourcer — bypasses the corpus boundary.
- Baking secrets into
srcr.toml; use build-args and secret mounts. - Relying on host-only paths in agent prompts — breaks Codespaces and fresh clones.
- Cloning ad hoc in
Long-term devcontainer directions (out of MVP)
- Content-addressed image layers per source snapshot.
- GitHub/Action publishing a feature proxy for a repo version.
- Automatic
llms.txtindex generation over baked corpus for agent retrieval.