Repository navigation
Wave 2 — repo provisioning + repo-aware coding agents - #3
Merged
Merged
Conversation
… ENG-001) ENG-013: two-root workspace (workspace.ts) — persistent working-code root for cloned target repos (AGENT_CODE_WORKSPACE), distinct from throwaway agent-state sandboxes; PM granted git/gh (ROLES.pm.tools + prompt); sandboxEnv(source, role) forwards a PM-scoped AGENT_PM_GITHUB_TOKEN only to the PM sandbox (host token never forwarded); idempotent ensureRepoCloned (provision.ts) shallow clone/ff-pull with token via http.extraheader, no-op when unconfigured, wired+audited in implementTicket. ENG-001: WorkerInput.workdir — CLI backend runs the agent in the cloned repo cwd (persistent, not cleaned up) so it reads/edits real source; implementTicket passes the clone path; product tree never touched. typecheck + lint + 85 tests green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wave 2 — repo-context critical path
Implements Wave 2 of the roadmap — the path that takes coding agents from writing blind to working
against real source. Stacked on #2 (base
wave-1-safety-and-enablers); this diff is Wave 2only. Merge order: #1 ← #2 ← #3.
ENG-013 — Repo provisioning + two-root workspace
packages/agents/src/workspace.ts): a persistent working-code root(
workspace/, envAGENT_CODE_WORKSPACE) holding cloned target repos, distinct from the throwawayworkspaces/agent-state sandboxes./workspace/is gitignored.ROLES.pm.toolsnow includesgit+gh, with a prompt coveringlist/reuse/create/clone (idempotent).
sandboxEnv(source, role)forwardsAGENT_PM_GITHUB_TOKEN(asGITHUB_TOKEN/GH_TOKEN) only to the PM sandbox — the host token is never forwarded to anyagent.
provision.ts): shallow clone-or-ff-pull into the working-codeworkspace, token passed via
http.extraheader(never written to.git/config), no-op when GitHubisn't configured. Wired into
implementTicketwithrepo_context_ready/repo_context_skippedaudit events.
ENG-001 — Repo-aware coding agents
WorkerInput.workdir: the CLI backend runsclaude -pin the cloned repo cwd (persistent — notcleaned up like the throwaway sandbox) so the agent reads/edits real files;
implementTicketpassesthe clone path. The product's own tree is never touched. Test: the agent reads a seeded file in the
workdir and the workdir is left intact.
Verification
pnpm typecheck·pnpm lint·pnpm test(85 tests) all green.Deferred (noted in the tickets)
claude --allowedToolstool-name gating — the security boundary is enforced via thePM-scoped token, so the abstract→Claude-Code tool-name mapping is a follow-up.
GITHUB_OWNER/GITHUB_REPOfor now); API-backendfile-context injection (the CLI backend is the real repo-aware path).
🤖 Generated with Claude Code