Skip to content

feat(context): wire workspace context pack into execution (§0.1)#8

Merged
casabre merged 1 commit into
mainfrom
feat/workspace-wiring
Jul 4, 2026
Merged

feat(context): wire workspace context pack into execution (§0.1)#8
casabre merged 1 commit into
mainfrom
feat/workspace-wiring

Conversation

@casabre

@casabre casabre commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Finishes the Workspace wiring follow-up — the context pack now reaches the agent.

What

  • context/augment.tsaugmentTaskPrompt(task, pack): compact <workspace-context> header (conventions, symbols, file list w/ truncation); returns the task unchanged for an empty pack.
  • context/index.tscreateWorkspace(config)InProcessWorkspace when WORKSPACE_ENABLED, else undefined.
  • A2A AgentTaskExecutor — optional workspace; execute augments the task when present (routing still classifies the original prompt).
  • MCP coding_agent_run — async handler augments via the workspace before startJob (keeps McpTaskManager synchronous, zero task-manager churn).
  • server.ts / mcp/server.ts build the workspace from config and inject it.

Byte-identical when off

WORKSPACE_ENABLED=false (default) ⇒ createWorkspace returns undefined ⇒ no context call, prompt verbatim. The full pre-existing suite passes unchanged.

Gates

typecheck ✅ · lint ✅ · test:coverage ✅ (394 tests, 100%) · build ✅.

🤖 Generated with Claude Code

Inject the Workspace context pack (file tree + conventions) into the task
prompt so an agent gets repo context instead of cold-scanning. Opt-in via
WORKSPACE_ENABLED; when off (default), no workspace is constructed and the
prompt is used verbatim — byte-identical to before.

- context/augment.ts: augmentTaskPrompt(task, pack) — compact <workspace-context>
  header; returns the task unchanged for an empty pack.
- context/index.ts: createWorkspace(config) → InProcessWorkspace when enabled,
  else undefined.
- AgentTaskExecutor: optional workspace; execute augments the task when present
  (classification still uses the original prompt).
- MCP coding_agent_run: async handler augments via the workspace before startJob;
  McpTaskManager stays synchronous.
- server.ts / mcp/server.ts build the workspace from config and inject it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@casabre casabre merged commit 4307ed8 into main Jul 4, 2026
10 checks passed
@casabre casabre deleted the feat/workspace-wiring branch July 4, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant