Skip to content

docs: explain architecture in place of deleted ADR citations - #2107

Closed
rdimitrov wants to merge 5 commits into
mainfrom
docs/architecture-consolidation
Closed

rdimitrov wants to merge 5 commits into
mainfrom
docs/architecture-consolidation

Conversation

@rdimitrov

@rdimitrov rdimitrov commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Summary

Fourth of four stacked PRs. Stacked on #2106; review only the top commit. This is the one PR with real writing. It turns the "see ADR NNNN" residue left by #2105 into explanations on the architecture pages themselves.

ADR residue (~180 mentions across docs/architecture.md and 14 subsystem pages, plus bare docs/adr/... paths). For each mention, the ADR was read from 7c7206e8d and then:

  • Dropped when the page already stated the behaviour (the large majority).
  • Explained in 1–3 present-tense sentences, verified against the code. Examples: the ACP adapter wire behaviour, durable EnvironmentRef reattachment, the steer queue and its crash semantics, and the ToolHive sole-provider boot.

Where the deleted ADR or the old page text disagreed with the code, the page now follows the code. Notable fixes:

  • ACP framing is newline-delimited JSON, not Content-Length headers (internal/adapter/acp/conn.go).
  • HTTP steer routes are /v1/sessions/{id}/controls/steer and /controls/cancel-steer.
  • server.Config.EnvironmentResolver no longer exists. Reattachment goes through PlacementProvider.Reattach, and an empty EnvironmentRef is rejected rather than backfilled.
  • The Redis read ledger is available as an opt-in (mecak8s --redis-read-ledger).
  • docs/architecture.md's caller-identity section said nothing is refused on identity grounds, which contradicted the ownership-enforcement section below it.

Maintained inventories moved into living docs:

  • New docs/architecture/resource-lifetimes.md holds ADR 0027's List 1 (resources that outlive a call) and List 2 (restart fidelity). Every row was re-checked against the code: 191 of 194 rows kept, about 120 corrected (moved owners, renamed symbols, stale line numbers), 3 dropped (code gone or duplicate). AGENTS.md now tells contributors to add a row.
  • Runner credential-grant rules (ADR 0343) are now a subsection of deployment-and-hardening.md.
  • The Studio boundary (ADR 0351) is now in apps/README.md. apps/biome.json lint messages no longer cite it.

docs/usage/ resolved. All 20 pages plus docs/usage.md and docs/configuration-reference.md were redirect stubs kept "so historical ADR links resolve". They are deleted, and their four inbound links now point at the canonical user-docs microVM guide.

Not done here (needs an owner)

  • The eight speculative top-level drafts (agent-identity-model.md, agent-identity-outbound.md, scoped-resource-grants.md, session-state-and-read-ledger.md, cloud-native-harness-{kit,systems}.md, agent-fabric-protocol.md, perf-measurement-survey.md) and the four docs/design/*.md pages. The plan requires an owner check before folding or deleting them; they still contain plain-text ADR residue.
  • History phrasing that isn't an ADR citation ("Phase 2a", "gauntlet ACP: accept client-provided streaming-HTTP MCP servers #7", "MUST-FIX 2"), left in several pages.
  • The cold-read acceptance test: someone unfamiliar reads docs/architecture.md and lists what they still can't answer.

Test plan

  • task docs: matlatl strict 0 broken / 0 orphans (163 documents)
  • go test ./internal/adapter/ -run TestRedisFollowCapacity_Scenario4 (asserts Go-version prose in two edited pages)
  • No ADR residue left in docs/architecture.md, docs/architecture/* (excluding the generated modelith page), README.md, docs/READING.md
  • apps/biome.json parses
  • Cold read by someone unfamiliar with the codebase

🤖 Generated with Claude Code

rdimitrov and others added 5 commits October 5, 2026 23:05
Remove the acceptance-spine content now that PR 1 stopped enforcing it.
Git history is the archive; deleted content is readable at
7c7206e.

- Delete docs/adr (except 0019, moved to docs/perf-tracking.md as a
  living doc), docs/acceptance, docs/superpowers, .claude/plans, the
  devils-advocate and tdd-worker agents, six process skills,
  docs/development-process.md, and docs/design/README.md. The
  panel-review skill and its nine reviewer agents stay as an optional
  tool; nothing requires them any more. The .agents/skills symlink stays so
  Codex-style agents still discover the remaining skills.
- Copy the tech-writer style guide to user-docs/_STYLE.md.
- Mechanically unlink every Markdown link into deleted paths (the ADR
  number stays as plain text); pin public GitHub permalinks in
  user-docs to the SHA above.
- AGENTS.md: delete the Change routing section and the sentences that
  linked to the deleted docs. No other rewrites.
- Add inbound/onward links for pages the deletion orphaned so matlatl
  strict stays green.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Rewrite AGENTS.md to build/test commands, module layout, enforceable
implementation boundaries, and working conventions. Drop change
routing, ADR references, and process meta-guidance. Delete the
documentation rule and strip spine citations from the domain-model
rule. Remove the frozen-ADR framing from the reader map and the
internal-workflow sentence from CONTRIBUTING.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reword runtime strings that cited deleted ADRs so they describe the
behaviour instead: the learning posture system-prompt note, the
product-metrics notice, mecated and learning-driver errors, and the
config field docs that generate user-docs/reference/configuration.md
and the settings skeleton (regenerated with task docs:configref).
Point perfconvert comments at the moved docs/perf-tracking.md.

Go doc comments elsewhere, TestADR_* names, and .proto comments are
unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Orchestrator mode only triggered when /plan-orchestrate invoked the
skill; that skill is deleted, so the mode could never run. With one
mode left, the confirmation rules live at the steps that use them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Replace every ADR residue in docs/architecture.md and
docs/architecture/* with either nothing (the page already stated the
behaviour) or a short present-tense explanation verified against the
code. Where an ADR disagreed with the code, the page now follows the
code.

- New docs/architecture/resource-lifetimes.md carries ADR 0027's
  maintained inventories (resources outliving a call; restart
  fidelity), re-verified row by row. AGENTS.md points contributors at it.
- Runner credential-grant rules (ADR 0343) move into
  deployment-and-hardening.md; the Studio boundary (ADR 0351) into
  apps/README.md.
- Delete the docs/usage redirect stubs, docs/usage.md, and
  docs/configuration-reference.md; repoint their four inbound links at
  the canonical user-docs microVM guide.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Base automatically changed from chore/process-layer-3-polish to main October 6, 2026 12:15
@rdimitrov

Copy link
Copy Markdown
Member Author

Closing without merging. The parts worth keeping moved to #2144, re-verified against current main:

The ADR-citation rewrites and the resource-lifetimes inventory are intentionally dropped; the planned lean docs rewrite replaces those pages. The branch stays available for reference.

@rdimitrov rdimitrov closed this Oct 7, 2026
rdimitrov added a commit that referenced this pull request Oct 7, 2026
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Oct 7, 2026
2 tasks

This branch was successfully deployed

1 active deployment
Preview — 49ebd839 Deployed Oct 5, 2026 by vercel[bot]
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.

2 participants