Version: 2.0 Date: 2026-03-17 Author: PRD Compiler Quality Score: 93/100 Status: Final
Goal: Reduce agentsdk-go from ~34K lines / 24 packages to ~15-20K lines / ~11 packages via big-bang rewrite on a new branch, producing a simpler, faster, more testable SDK. Non-Goals: Incremental migration, backward API compatibility, new external dependencies, moving OTel out of middleware/trace. Primary Workflow: New branch rewrite -> merge single Model interface -> consolidate packages -> prompt-compression compaction (strip tool I/O) -> reduce tools/events/middleware -> delete dead code -> rewrite key tests. Success Metric:
go test ./...passes; total non-test LOC in pkg/ <= 20K; package count <= 11; examples require API keys (no offline mode). Key Constraints: Zero new dependencies; YOLO-default security with safety hook; must preserve gitignore matcher (grep/glob depend on it); message package kept as-is. Verification Path:wc -lon non-test .go files;go test ./...; package count viafind pkg -maxdepth 1 -type d | tail -n +2 | wc -l; manual example smoke test. Domain: Go SDK, CLI/CI/enterprise agent runtime.
agentsdk-go v1 grew organically to ~34K non-test lines across 24+ packages. The architecture has two Model interfaces that require a bridge adapter, a compaction system that calls LLMs (~450 lines), 16 event types, 6 middleware stages, 11+ built-in tools, and a Runtime struct carrying 10+ fields that most users never touch. This complexity violates the project's KISS/YAGNI principles and makes the SDK harder to understand, test, and extend.
v2 is a big-bang rewrite on a new branch. It merges the dual Model interface into one, simplifies compaction to a prompt-compression step that strips tool I/O, consolidates 24 packages into ~11, reduces events from 16 to 7, middleware stages from 6 to 4, reduces built-in tools from 11 to 7, and deletes ACP/Tasks from core. The Runtime struct drops 10 fields. Target: 15-20K lines that do the same useful work.
Current Situation: The SDK has accumulated structural debt:
- Two Model interfaces (
agent.Model.Generateandmodel.Model.Complete/CompleteStream) require a bridge inpkg/apithat adds ~200 lines of glue. pkg/api/agent.gois 1804 lines (target <600). The Runtime struct has 17+ fields, 10 of which are rarely used.- Compaction (
compact.go, 450 lines) calls an LLM for summarization — an external dependency in what should be a deterministic operation. - 16 event types when 7 suffice. 6 middleware stages when 4 cover all real use cases.
pkg/acp(2618 lines) andpkg/runtime/tasks(543 lines) serve niche use cases but live in core.todo_writetool is dead code.pkg/prompts(1105 lines) splits prompt logic between two packages unnecessarily.- Total: ~34K non-test lines across 24 packages.
Proposed Outcome: A rewritten SDK with ~15-20K non-test lines across ~11 packages, a single Model interface, prompt-compression compaction that strips tool I/O, and a clean Runtime struct — while preserving all user-facing capabilities.
Why Now: The codebase is at an inflection point where further feature work compounds the structural debt. The project's Linus Torvalds-inspired KISS philosophy demands correction before the surface area grows further.
- G1: Merge dual Model interface into a single
model.ModelwithCompleteandCompleteStream. - G2: Reduce
pkg/api/agent.goto <600 lines. Remove 10 fields from Runtime struct. - G3: Simplify compaction to prompt compression while stripping tool I/O (tool calls/results) from the compressed portion.
- G4: Consolidate 24 packages to ~11 packages.
- G5: Reduce events 16 -> 7, middleware 6 -> 4 stages, tools 11 -> 7.
- G6: Delete ACP and Tasks from core (no
contrib/). - G7: Delete dead code (
todo_writetool, unused event types, deprecated fields). - G8: Rewrite key tests (not ported from v1) that cover core paths.
- G9: All examples require API keys (no offline mode / no silent fallback).
- NG1: Incremental migration path or backward API compatibility with v1.
- NG2: Moving OpenTelemetry out of
middleware/trace— it stays where it is. - NG3: Adding new external dependencies.
- NG4: Rewriting or removing
pkg/gitignore— grep/glob tools depend on it. - NG5: Changing
pkg/message— kept as-is. - NG6: Porting old tests as a safety net — key tests are rewritten from requirements.
- NG7: Achieving specific coverage percentage targets in this PRD (coverage is a separate concern).
- Current codebase: ~34K non-test lines, 24+ packages.
agent.Modelinterface (Generate) andmodel.Modelinterface (Complete/CompleteStream) both exist with a bridge adapter inpkg/api.compact.gois 450 lines and calls LLM for summarization.- Runtime struct has fields:
cmdExec,taskStore,tokens,recorder,sessionGate,historyPersister,rulesLoader,ownsTaskStore— all confirmed for removal. todo_writetool (163 lines) is dead code — confirmed for deletion.pkg/acp(2618 lines) andpkg/runtime/tasks(543 lines) are deleted from core.- Migration is big-bang on a new branch — no incremental migration needed.
- OTel stays in
middleware/trace. pkg/gitignore(267 lines) stays — grep/glob depend on it.pkg/message(275 lines) stays as-is.- Skill-related prompt templates merge into
pkg/runtime/skills; system prompt construction stays inpkg/api.
- A1: The 7 surviving events are:
PreToolUse,PostToolUse,SessionStart,SessionEnd,Stop,SubagentStart,SubagentStop. The 9 removed events are:PostToolUseFailure,PreCompact,ContextCompacted,UserPromptSubmit,PermissionRequest,Notification,TokenUsage,ModelSelected,MCPToolsChanged. - A2: The 4 surviving middleware stages are:
BeforeAgent,BeforeTool,AfterTool,AfterAgent. Removed:BeforeModel,AfterModel(model call is observable via BeforeAgent/AfterAgent and trace). - A3: The 7 surviving tools are:
bash,read,write,edit,glob,grep,skill. Removed:todo_write,task*(4 tools),slashcommand,askuserquestion,killtask,webfetch,websearch,bash_output,bash_status. (Task tools are deleted; others are rarely used or can be added as custom tools.) - A4: Compaction uses LLM prompt compression for old messages, but strips tool-call/tool-result content from the compressed portion to reduce noise and token usage.
- OQ1: Exact naming for the merged Model interface methods —
Complete/CompleteStreamis the likely choice since it already exists. - OQ2: Whether
askuserquestionshould remain as a core tool — currently assumed removed from core. - OQ3: Final event naming conventions for v2 — cosmetic, does not block implementation.
- None. All 10 open questions from the previous round have been resolved.
- Role: Go developer embedding agent capabilities into their application.
- Goal: Initialize runtime, send prompts, receive streaming responses, execute tools — with minimal boilerplate.
- Pain Point: v1 requires understanding two Model interfaces, navigating 24 packages, and configuring fields on a Runtime struct where 10 of 17 fields are irrelevant to most use cases.
- Role: Developer adding custom tools, middleware, or event hooks.
- Goal: Extend SDK behavior without understanding internal wiring.
- Pain Point: 6 middleware stages, 16 event types, and tool registration spread across multiple packages make extension points hard to discover.
As a SDK integrator I want to implement one Model interface to connect any LLM provider So that I don't need to understand two interfaces and a bridge adapter.
Acceptance Criteria:
- Only
model.ModelwithComplete(ctx, Request) (*Response, error)andCompleteStream(ctx, Request, StreamHandler) errorexists. -
agent.Modelinterface (Generate) is deleted. - No bridge adapter code exists in
pkg/apito convert between the two interfaces. -
AnthropicProviderandOpenAIProviderimplement the single interface directly. -
go build ./...compiles with zero references to the oldagent.Modelinterface.
As a SDK integrator I want to construct a Runtime with only essential fields So that I can understand the system by reading one struct definition.
Acceptance Criteria:
- Runtime struct does not contain:
cmdExec,taskStore,tokens,recorder,sessionGate,historyPersister,rulesLoader,ownsTaskStore. -
pkg/api/agent.gois <= 600 non-test lines. -
runtime.New()succeeds with onlyModelFactoryandProjectRootprovided.
As a SDK integrator I want to context compaction that reduces prompt size while keeping key intent So that long sessions remain usable, and tool I/O does not dominate context.
Acceptance Criteria:
- Compaction preserves the last N messages (configurable) unmodified.
- Compaction compresses older messages into a summary using an LLM prompt compression step.
- The compressed portion strips tool-call/tool-result content (no tool JSON or tool output copied verbatim into the summary input).
- Compaction logic is <= 200 non-test lines in a single file.
- Tool transaction boundaries are respected (no orphaned tool-result messages in the preserved tail).
- Compaction triggers when token count exceeds threshold ratio of context limit.
As a SDK contributor I want to navigate <= 11 packages to understand the full SDK So that onboarding time is reduced and dependency graph is simple.
Acceptance Criteria:
-
find pkg -type d | wc -lreturns <= 11. -
pkg/core/eventsandpkg/core/hooksmerge into a singlepkg/hooks(or equivalent). -
pkg/core/middleware(24 lines) merges intopkg/middleware. -
pkg/promptsskills-related templates merge intopkg/runtime/skills. -
pkg/promptssystem prompt construction stays inpkg/api(or merged appropriately). -
pkg/agent(233 lines) merges intopkg/apisince the agent loop and runtime are tightly coupled. - No circular import exists.
go build ./...succeeds.
As a extension author I want to hook into <= 7 well-defined events So that the event system is learnable in minutes.
Acceptance Criteria:
- Exactly 7 event types exist:
PreToolUse,PostToolUse,SessionStart,SessionEnd,Stop,SubagentStart,SubagentStop. - Removed events (
PostToolUseFailure,PreCompact,ContextCompacted,UserPromptSubmit,PermissionRequest,Notification,TokenUsage,ModelSelected,MCPToolsChanged) have no references in core code. - Event payload structs for removed events are deleted.
As a extension author I want to implement middleware with 4 stages instead of 6 So that the interception model is simpler.
Acceptance Criteria:
-
middleware.Stageenum has 4 values:BeforeAgent,BeforeTool,AfterTool,AfterAgent. -
BeforeModelandAfterModelstages are removed. -
Middlewareinterface has 4 methods (plusName()), not 6. - Model-level interception is not needed — model call is observable via request/response boundary middleware.
As a SDK integrator I want to have 7 focused built-in tools So that the default tool set covers essential operations without bloat.
Acceptance Criteria:
- Core built-in tools:
bash,read,write,edit,glob,grep,skill. -
todo_writetool source files are deleted. - Task-related tools (
task,taskcreate,taskget,tasklist,taskupdate,killtask) are deleted. -
slashcommand,askuserquestion,webfetch,websearch,bash_output,bash_statustools are removed from core. - Tool registration in Runtime defaults to the 7 core tools.
As a SDK maintainer I want to remove ACP and task management from the SDK So that core remains small and focused.
Acceptance Criteria:
-
pkg/acpis deleted and there are zero references to it inpkg/andcmd/. -
pkg/runtime/tasksis deleted and there are zero references to it inpkg/andcmd/. - CLI does not offer an ACP server mode (no
-acpbehavior in core). - Root
go.modhas no dependency ongithub.com/coder/acp-go-sdk.
As a SDK maintainer I want to fresh tests written against v2 interfaces So that tests validate actual requirements rather than carrying v1 implementation assumptions.
Acceptance Criteria:
- Key tests cover: Runtime creation, single-prompt run, streaming run, tool execution, compaction trigger, middleware chain, event dispatch, context cancellation.
- Tests use mock/stub Model implementations, not real API calls.
-
go test ./pkg/...passes. - No v1 test files are copied wholesale — tests are rewritten.
- Description: Eliminate
agent.Model(Generate-based). The agent core loop callsmodel.Model.CompleteStreamdirectly. Remove all bridge/adapter code. - Trigger: v2 rewrite begins.
- Expected Result: One interface in
pkg/model/interface.go. Zero adapter structs. Agent loop usesCompleteStreamfor streaming andCompletefor blocking calls. - Traces to: Story 1 / G1.
- Description: Remove 10 fields from Runtime:
cmdExec,taskStore,tokens,recorder,sessionGate,historyPersister,rulesLoader,ownsTaskStore, and associated initialization/cleanup code. - Trigger: v2 rewrite begins.
- Expected Result: Runtime struct has ~7 essential fields.
agent.goshrinks to <= 600 lines. - Traces to: Story 2 / G2.
- Description: When token count exceeds
threshold * limit, preserve the lastPreserveCountmessages and compress older messages into a short summary using an LLM prompt compression step. Tool-call/tool-result content is stripped from the compressed portion. - Trigger: Token count exceeds threshold during a run.
- Expected Result: Compaction reduces token usage materially while keeping intent. The preserved tail is not modified. Tool transactions are never split in the preserved tail.
- Traces to: Story 3 / G3.
- Description: Merge packages as follows:
pkg/agent-> merge intopkg/api(agent loop becomes internal to runtime).pkg/core/events+pkg/core/hooks-> single package (e.g.,pkg/hooks).pkg/core/middleware-> merge intopkg/middleware.pkg/promptsskill templates -> merge intopkg/runtime/skills.pkg/promptssystem prompt -> stays inpkg/apior dedicated small file.pkg/acp-> deleted.pkg/runtime/tasks-> deleted.
- Trigger: v2 rewrite begins.
- Expected Result: <= 11 directories under
pkg/. Clean import graph. No circular dependencies. - Traces to: Story 4 / G4.
- Description: Keep 7 events:
PreToolUse,PostToolUse,SessionStart,SessionEnd,Stop,SubagentStart,SubagentStop. Delete all others and their payload structs. - Trigger: v2 rewrite begins.
- Expected Result:
hooks/events.go(or equivalent) defines exactly 7EventTypeconstants and their payload structs. - Traces to: Story 5 / G5.
- Description: Remove
BeforeModelandAfterModelstages. Keep 4:BeforeAgent,BeforeTool,AfterTool,AfterAgent. UpdateMiddlewareinterface andFuncshelper. - Trigger: v2 rewrite begins.
- Expected Result:
middleware.Stagehas 4 values:BeforeAgent,BeforeTool,AfterTool,AfterAgent.Middlewareinterface has 4 hook methods +Name(). Trace middleware, HTTP trace middleware, and all examples updated. - Traces to: Story 6 / G5.
- Description: Core tools:
bash,read,write,edit,glob,grep,skill. Deletetodo_write,webfetch,websearch,bash_output,bash_status. Delete task tools. Removeslashcommand,askuserquestion,killtaskfrom core. - Trigger: v2 rewrite begins.
- Expected Result:
pkg/tool/builtin/contains files for exactly 7 tools plus shared helpers (file_sandbox.go,grep_helpers.go,grep_params.go, platform files). - Traces to: Story 7 / G5.
- Description: Remove ACP (
pkg/acp) and task management (pkg/runtime/tasks) from core. Remove ACP server mode from CLI. Drop ACP SDK dependency from rootgo.mod. - Trigger: v2 rewrite begins.
- Expected Result: No ACP/task code remains in core;
go build ./...andgo test ./...pass without ACP/task dependencies. - Traces to: Story 8 / G6.
- Description: Default security mode allows all tool executions (YOLO). A Go-native safety hook (not shell, <1ms overhead) blocks catastrophic operations (
rm -rf /,dd,mkfs,shutdown,reboot,sudo). The safety hook runs as a built-inPreToolUsehandler before user-configured shell hooks. Users can disable viaDisableSafetyHook=true. The fullpkg/security/package (permission matcher, approval workflow) is absorbed intopkg/hooks/safety.go. - Trigger: Any tool execution in default configuration.
- Expected Result: Tool calls succeed without permission prompts by default. The safety hook rejects a defined blocklist of destructive patterns. No
pkg/security/package exists as a separate module. - Traces to: G2 (simplified runtime) / G7 (dead code removal).
| ID | Requirement | Priority | How to Verify |
|---|---|---|---|
| A1 | Single Model interface, zero bridge adapters | P0 | grep -r "agent.Model" pkg/ returns 0 matches |
| A2 | Runtime struct <= 7 core fields | P0 | Manual inspection of Runtime struct definition |
| A3 | pkg/api/agent.go <= 600 non-test lines |
P0 | wc -l pkg/api/agent.go |
| A4 | Compaction uses LLM prompt compression and strips tool-call/tool-result content | P0 | Compaction test asserts model compression is invoked and tool content is excluded from compression input |
| A5 | Compaction file <= 200 lines | P1 | wc -l on compact file |
| A6 | <= 11 package directories in pkg/ | P0 | find pkg -maxdepth 1 -type d -mindepth 1 | wc -l |
| A7 | 7 event types: PreToolUse, PostToolUse, SessionStart, SessionEnd, Stop, SubagentStart, SubagentStop | P0 | Count EventType constants |
| A8 | 4 middleware stages: BeforeAgent, BeforeTool, AfterTool, AfterAgent | P0 | Count Stage constants |
| A9 | 7 built-in tools: bash, read, write, edit, grep, glob, skill | P0 | Count tool registrations in default setup |
| A10 | ACP removed from core | P0 | rg -n \"\\bpkg/acp\\b\" pkg cmd -S returns 0 and test ! -d pkg/acp |
| A11 | Tasks removed from core | P0 | rg -n \"\\bpkg/runtime/tasks\\b\" pkg cmd -S returns 0 and test ! -d pkg/runtime/tasks |
| A12 | todo_write deleted |
P0 | find . -name 'todo_write*' returns 0 in pkg/ |
| A13 | go build ./... passes |
P0 | CI green |
| A14 | go test ./pkg/... passes |
P0 | CI green |
| A15 | Examples require API keys | P1 | Run each example without API keys → error message is clear; with keys → no panic/hang |
| A16 | Total non-test LOC in pkg/ <= 20K | P1 | find pkg -name '*.go' ! -name '*_test.go' | xargs wc -l | tail -1 |
-
Case: Prompt compression compaction encounters a tool transaction that spans the cut boundary.
- Expected behavior: Move the cut point earlier to avoid splitting the transaction. If all messages are in one transaction, skip compaction.
-
Case: User registers a custom middleware with old 6-stage interface.
- Expected behavior: Compilation fails with clear type error. No runtime fallback or silent drop.
-
Failure: Model provider returns error during streaming.
- Expected behavior: Error propagates through
CompleteStreamreturn value. No retry logic in the core (retry is a middleware concern).
- Expected behavior: Error propagates through
-
Recovery: Runtime.Close() called multiple times.
- Expected behavior: Idempotent via
sync.Once. No panic. Second call returns same error as first.
- Expected behavior: Idempotent via
- Prompt compression compaction performs an extra model call only when the compaction trigger fires.
- Runtime initialization completes in <100ms excluding model provider setup.
- Zero additional memory allocations in middleware dispatch hot path compared to v1.
- YOLO default: all tool executions allowed without prompts.
- Safety hook blocks:
rm -rf /,dd if=,mkfs,fdisk,shutdown,reboot,sudo(same patterns as currentpkg/security/validator.go). - Safety hook is Go-native (function call), not shell-based, for <1ms overhead.
- Sandbox (
pkg/sandbox) remains available for opt-in stricter isolation.
- All external boundaries (HTTP, process execution, clock, filesystem) have minimal seams (single-method interfaces or
var-injection). - Core loop is testable with a stub
model.Modelthat returns canned responses. - No test depends on network, API keys, or real LLM responses.
- Go 1.24+ required (matches current
go.mod). - No new external dependencies added. Existing dependency list may shrink after deleting ACP/tasks.
- Anthropic SDK (
github.com/anthropics/anthropic-sdk-go): Core dependency for Anthropic provider. - OpenAI SDK (
github.com/openai/openai-go): Core dependency for OpenAI provider. - MCP SDK (
github.com/modelcontextprotocol/go-sdk): Core dependency for MCP tool integration. - OTel (
go.opentelemetry.io/otel): Stays inmiddleware/trace, core dependency. - ACP SDK (
github.com/coder/acp-go-sdk): Not used in v2 core.
- Create new branch.
- Merge
agent.Modelintomodel.Model. Deletepkg/agent/or merge intopkg/api/. - Strip Runtime struct: remove 10 fields.
- Replace compaction: prompt compression (<=200 lines), strip tool I/O from compression input, delete old
compact.go. - Merge packages:
core/events+core/hooks-> single package;core/middleware->middleware. - Reduce events 16 -> 7.
- Reduce middleware 6 -> 4 stages.
- Delete
todo_write,webfetch,websearch,bash_output,bash_status. - Delete task tools and
pkg/runtime/tasks/. - Delete
pkg/acp/and remove CLI ACP mode. - Remove
slashcommand,askuserquestion,killtaskfrom core tools. Deletepkg/runtime/commands/. - Merge prompts: skill templates ->
runtime/skills; system prompt stays in api. - Absorb
pkg/security/intopkg/hooks/safety.go(Go-native safety hook).
- Rewrite key tests for: Runtime lifecycle, single-prompt run, streaming, tool execution, compaction, middleware, events, context cancellation.
- Verify all examples compile and run with API keys.
- Verify line count and package count targets.
- NH1: Performance benchmarks comparing v1 vs v2 initialization and compaction.
- NH2: Migration guide documenting v1 -> v2 API changes (for external users, if any).
- NH4: Structured logging replacing
log.Printfcalls.
After v2, a new developer reads pkg/api/agent.go (<=600 lines), sees a Runtime struct with ~7 fields, and understands the entire orchestration. They implement model.Model with two methods, register it, and call runtime.Run(). Compaction keeps the last N messages and compresses older content while stripping tool I/O so it doesn't dominate context.
Copying v1's bridge adapter pattern into v2 "for compatibility" — creating type modelAdapter struct that wraps model.Model into agent.Model.Generate. This defeats the purpose of the merge and must not happen.
Another counterexample: keeping BeforeAgent/AfterAgent middleware stages "just in case" — if no middleware in the codebase or examples uses them, they are dead weight. Delete them.
| Risk | Probability | Impact | Mitigation |
|---|---|---|---|
| Scope creep: discovering hidden dependencies between packages during merge | Medium | Medium | Strict phase ordering. Phase 1 handles structural changes before tool cleanup. Use go build ./... as gate between phases. |
| Removing tools that some users rely on (askuserquestion, skill) | Low | Medium | These tools can be re-added by users as custom tools. Document in migration guide. |
| Prompt compression may change summary wording across runs | Medium | Medium | Keep preserved tail unmodified; bound summary size; make compaction behavior testable with a stub model. |
| Big-bang rewrite takes longer than expected | Medium | High | Phase structure allows shipping Phase 1+2 as useful checkpoint even if Phase 3 (testing polish) is incomplete. |
Dependencies:
- No external dependency changes needed for core.
- All work happens on a new branch — zero risk to current main.
- Critical path: FR-1 (Model merge) must happen first because every other change depends on the simplified interface. FR-2 (Runtime field removal) follows immediately as it defines the new struct shape.
- Compaction (FR-3): Keep compaction small and testable: preserve the tail unmodified, strip tool I/O from the compressed portion, and invoke the model with a dedicated compression prompt.
- Package merge order matters: Merge
pkg/agentintopkg/apifirst (removes the dual-interface problem). Then mergecore/*packages. Then delete ACP/tasks and the remaining removed tools. This order minimizes intermediate broken states. - Testing priority: Test the agent core loop first (Runtime creation + single run + tool call). Then compaction. Then middleware/events. These three paths cover 80%+ of the codebase.
- Examples: After structural changes, update all 12 examples. Most changes are import path updates. Examples 08 (askuserquestion) and 09 (task-system) may need rewriting or removal since those tools are removed.
- What is NOT ambiguous: The 10 Runtime fields to remove, the 9 events to delete, the 2 middleware stages to remove, and the tools to delete are all explicitly listed. No judgment calls needed.
- Fastest verification path: After each phase, run
go build ./...andgo test ./pkg/.... Count lines withfind pkg -name '*.go' ! -name '*_test.go' | xargs wc -l | tail -1. Count packages withfind pkg -type d | wc -l.
| Current Package | Lines | Target |
|---|---|---|
pkg/api |
5,898 | pkg/api (~2,000) — absorbs agent loop |
pkg/agent |
233 | Merged into pkg/api |
pkg/model |
2,356 | pkg/model (~2,000) — single interface |
pkg/tool |
1,960 | pkg/tool (~1,500) |
pkg/tool/builtin |
7,856 | pkg/tool/builtin (~4,500) — 7 tools |
pkg/middleware |
2,142 | pkg/middleware (~1,800) — 4 stages, absorbs core/middleware |
pkg/config |
1,977 | pkg/config (~1,500) |
pkg/security |
1,345 | Absorbed into pkg/hooks/safety.go (~100) — YOLO default, safety hook only |
pkg/core/events |
549 | Merged into pkg/hooks (~500) |
pkg/core/hooks |
732 | Merged into pkg/hooks |
pkg/core/middleware |
24 | Merged into pkg/middleware |
pkg/runtime/skills |
1,237 | pkg/runtime/skills (~1,000) — absorbs prompt templates |
pkg/runtime/subagents |
850 | pkg/runtime/subagents (~700) — adds result summary injection |
pkg/runtime/commands |
828 | Deleted — slash commands removed |
pkg/runtime/tasks |
543 | Deleted |
pkg/acp |
2,618 | Deleted |
pkg/prompts |
1,105 | Split: skills part -> runtime/skills; system part -> api |
pkg/sandbox |
429 | pkg/sandbox (~400) |
pkg/message |
275 | pkg/message (as-is) |
pkg/gitignore |
267 | pkg/gitignore (as-is) |
pkg/mcp |
502 | pkg/mcp (~450) |
| Total | ~33,766 | Target ~15,000-18,000 |
This PRD was created through interactive requirements gathering and is optimized for autonomous agent consumption, implementation handoff, testability, and scope clarity.