deepseek-harness/docs/rfc
Tianyi Cui f3906af225 feat(acp): honor per-session cwd — run each ACP session in its own workspace
Lifts the RFC 010 § Deferred restriction that the server had to launch in the
workspace ("cwd must equal the launch directory"). An editor can now open any
project folder, and N concurrent sessions over one connection can each target a
different directory.

- packages/acp: drop the `cwd === process.cwd()` guard in validateWorkspaceParams
  (keep "must be absolute" — the cwd becomes the session header / bash workdir),
  and drop the persisted-cwd-vs-launch-dir check in session/load (a resumed
  session keeps its original header.cwd, so its bash tools run in its workspace).
- packages/tool-bash: the missing link — default the bash workdir to the calling
  agent's session cwd (`exec.agent.session.header.cwd`) via a new resolveWorkdir
  helper. An explicit model `workdir` still wins; a relative one resolves against
  the session cwd. This is the only correct spot for multi-session: N sessions
  share one ctx.bash executor, so the workdir must come per-call from exec.agent,
  not executor config. Falls back to the executor default when no session cwd is
  available (preserves non-ACP behavior).
- Trust: the cwd originates from the ACP client (the user's editor) at
  session/new — same trust level as the old launch dir; no new untrusted-input
  path. `additionalDirectories` (scope widening / sandbox) stays rejected.
- Tests: bridge accepts any absolute cwd + records it on the header; session/load
  honors the persisted cwd; bash defaults to / resolves relative against the
  session cwd; two sessions with different cwds each run bash in their own dir;
  non-absolute cwd still rejected. 100% per-file coverage maintained.
- Docs: RFC 010 status + § Deferred cwd bullet marked RESOLVED; acp README adds a
  Per-session cwd section; tool-bash + example READMEs and e2e comments updated.
2026-06-17 10:53:40 +08:00
..
001-property-based-testing.md test: property-based tests for protocol-shaped code (RFC 001) 2026-06-14 00:06:25 +08:00
002-mutation-testing.md docs: unwrap hard-wrapped Markdown to one line per paragraph 2026-06-13 20:27:04 +08:00
003-deterministic-and-stress-testing.md docs: unwrap hard-wrapped Markdown to one line per paragraph 2026-06-13 20:27:04 +08:00
004-architectural-conformance.md docs: unwrap hard-wrapped Markdown to one line per paragraph 2026-06-13 20:27:04 +08:00
005-runtime-validation-and-error-taxonomy.md feat(llm): structured error taxonomy with a shared HarnessError base (RFC 005 pt 2) 2026-06-14 01:07:28 +08:00
006-doc-sync-and-api-reports.md build: doc-sync gates — typecheck doc code blocks + verify event taxonomy (RFC 006 pts 1-2) 2026-06-14 00:47:38 +08:00
007-supply-chain-and-vendor-drift.md feat: migrate to pnpm 2026-06-16 14:55:37 +08:00
008-immutable-public-surfaces.md fix(invariants): address Codex review of dev invariants (PR 2) 2026-06-13 23:50:43 +08:00
009-session-persistence-and-resumability.md Merge branch 'split/turn-enclosure' into split/session-persistence 2026-06-16 17:01:36 +08:00
010-acp-agent-client-protocol.md feat(acp): honor per-session cwd — run each ACP session in its own workspace 2026-06-17 10:53:40 +08:00
011-acp-multi-session.md feat(acp): multiplex N concurrent ACP sessions + bash task ownership (RFC 011) 2026-06-16 19:47:13 +08:00
012-optional-code-mode.md feat: migrate to pnpm 2026-06-16 14:55:37 +08:00
013-typed-event-schemas.md feat(session-persistence): preserve interrupted turns on crash; don't truncate (review #33) 2026-06-16 21:27:50 +08:00
README.md feat(session-persistence): preserve interrupted turns on crash; don't truncate (review #33) 2026-06-16 21:27:50 +08:00

RFCs

Proposals for substantial future work — reviewed before implementation, unlike ADRs (which record decisions already made). Each RFC groups a related set of ideas from the quality/robustness proposal (2026-06-11); statuses move proposed → accepted → implemented (then usually graduate to an ADR).

# Title Status
001 Property-based testing for protocol-shaped code implemented
002 Mutation testing as the coverage counterweight proposed
003 Deterministic tests + replay invariant fixture + race stress proposed
004 Architectural rules: dependency-cruiser, adapter conformance kit proposed
005 Runtime arg validation, structured error taxonomy, dev-mode invariants implemented
006 Doc-sync enforcement and API extractor reports implemented (pts 1-2; pt 3 deferred)
007 Supply chain checks and vendor drift verification proposed
008 Deep-readonly public surfaces implemented (revised)
009 Durable session persistence — abstract, append-only, event-based store proposed
010 Agent Client Protocol (ACP) support for external editors proposed
011 Multiplex concurrent ACP sessions over one connection proposed
012 Optional Code Mode — model writes TypeScript against an SDK of all tools proposed
013 Runtime schemas for the event vocabulary (Zod vs the merge-extensible-map pattern) proposed