Person/codekiln/GitHub/sourcer/Project/v0 AI Spec/Trust
Access boundary
- Sourcer's access model defines which repository identities may be cloned, updated, or exposed to automation. Everything else is out of scope for the tool and should be unreachable via
srcrcommands. - Parent concepts: Person/codekiln/GitHub/sourcer/Project/v0 AI Spec/Config (install by default vs allow-only), Person/codekiln/GitHub/sourcer/Project/v0 AI Spec/CLI (enforcement per command).
Why an access boundary exists
- AI agents need primary sources — implementation code, not only summaries — to plan and refactor accurately.
- Unrestricted access creates two classes of risk:
- Whitelisting "all of GitHub" does not solve injection; allowed libraries still have untrusted adjacent surfaces on the hosting site.
- Local materialization inside a declared corpus lets agents
rgand read files without live hosting access.
Threat model (practical)
Policy expression
- Policies are declarative over canonical identity
provider/owner/repo. There is no separate[trust]table. - MVP
- Phase 2
- Wildcards should match path segments predictably; document whether
*crosses/boundaries. - Evaluation order for Phase 2: deny-wins vs allow-wins TBD (recommend default deny for ad-hoc
use, explicit[sources]+[allow]only).
- Policies are declarative over canonical identity
Enforcement points
srcr install(MVP) — materialize only[sources]entries with default install; fail closed on config errors (recommend fail with non-zero exit for CI and agents).srcr use <identity>(Phase 2) — reject before any network or git operation if identity is not allowed; replaces defunctsrcr ensure.srcr where— resolves path without clone; JSON reportsallowed: falseso planners do not treat the tree as approved for fetch.- Future: read-only mode where agents may read existing allowed paths but cannot trigger clone.
JSON and fail-closed behavior
- Access verdict surfaces in structured output (see Person/codekiln/GitHub/sourcer/Project/v0 AI Spec/CLI):
- Agents should treat
allowed: falseas hard stop unless a human overrides policy. - Human CLI: print actionable message ("add identity to
[sources]or pattern to[allow]" — Phase 2; break-glass flag only if product allows).
Pre-configured corpora for agents
- DevContainer images and CI runners build a fixed corpus at image build time:
- Skills and prompts can say: "read dependencies under
~/sourcesviasrcr where" without embedding paths. - Aligns with overview motivation: repositories as installable context packages for agentic work.
Soft links vs hard dependencies
- Sourcer supports contextually related repos — libraries you should read, platforms you integrate with, internal docs repos — without git submodules.
- Submodules remain appropriate when:
- Sourcer fits when:
Documentation vs source
- llms.txt and domain allowlists reduce risk for published docs at a stable URL.
- When docs live only in git, or research needs implementation truth, local allowed clone wins.
- Access policy for repos does not remove the need to read code for edge cases.
Operational patterns
- MVP — service repo
srcr.tomllists[sources];srcr installin CI and devcontainer builds. - Phase 2 — org-wide baseline — security publishes
allow.d/org.tomlfragment; projects include it. - Phase 2 — project overlay —
[sources]for install set;[allow]for org wildcards without auto-install. - Agent sandbox — minimal
[sources]list (3–10 repos); expand only via human-approved config PR. - Shared laptop cache — permissive
[allow]for developer convenience (Phase 2), stricter merged policy for agent sandbox profile.
- MVP — service repo
Relationship to shared cache
Future access features (Phase 2 and beyond)
- Signed policy bundles.
- Per-source audit log (who cloned what, when).
- Time-bound allow (
expires_aton pattern). - Integration with DevContainer/Feature to inject
[allow]without merging into developer global config.
- Sourcer's access model defines which repository identities may be cloned, updated, or exposed to automation. Everything else is out of scope for the tool and should be unreachable via