Repository navigation
docs: ADR-reference cleanup, rule hygiene, module AGENTS.md files - #2148
Merged
Merged
Conversation
Correct statements verified against the current code, and carry over the two sections from #2107 worth keeping: - HTTP run controls: the public reference and two architecture pages documented /approve, /cancel, /steer, and /cancel-steer, removed in #1725. Document the registered controls/resolve-ask, controls/cancel, controls/steer, and controls/cancel-steer routes with their required expected_run_id, bodies, responses, and 409 stale_run_control; steer no longer promotes to a new run. - Placement: server.Config.EnvironmentResolver no longer exists. Reattachment goes through the required PlacementProvider's PlacementReattacher capability and fails closed; a zero ref is rejected, not backfilled. Same fix on the public execution page. - Caller identity: identity alone is attribution; refusal comes from caller ownership enforcement when an OIDC verifier is wired. - Scheduler delivery queue: durable only with a local store directory; Redis-backed deployments use an in-memory queue. - Redis read ledger: name the opt-in flag. - apps/README.md: Studio boundary section (exact SDK pin, Biome import rules); task studio:check is the local gate, CI runs more. - deployment-and-hardening.md: command-runner credential-grant section. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The ADR directory was removed, leaving "(ADR NNNN)" residue in user docs, the SDK example design notes, the deploy README, and skills. Rewrite each sentence to stand on its own, and state the facts a reader still needs (the chart's operator-owned edge resources, links to current docs) where the ADR used to carry them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The rule loaded for every file under cmd/, internal/app, internal/adapter, engine/adapter, and engine/port. Logger and sink composition actually live in the command mains, mecatui's diagnostic log and embed packages, internal/cliconfig/logging.go, and internal/adapter/slogdiag. Scope the rule to those and drop the sentence that restated the root AGENTS.md contract split. Co-Authored-By: Claude Opus 5.5 <[email protected]>
engine/AGENTS.md holds the module's own commands (focused tests, the GOWORK=off standalone proof, running api:update from the root), the fact that layering is enforced in both depguard and arch/layering_test.go, and the engine invariants moved from the root. internal/AGENTS.md maps where settings.yaml keys and event actor stamping live, and takes the placement and runner credential-grant invariants. cmd/ gets no file: its flag metadata gaps fail with an exact fix, and the flag-to-docs map already lives in user-docs/_README.md. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Engine tags through engine/v0.15.0 exist, but the skill still described engine/v0.0.1 as the upcoming first cut and told agents gorelease had no base tag to compare against. Describe the steady-state flow instead. Co-Authored-By: Claude Opus 5.5 <[email protected]>
JAORMX
approved these changes
Oct 7, 2026
This was referenced Oct 7, 2026
Merged
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.
Stacked on #2144 (
docs/close-out-pr4). Merge that first; this PR's diff is only the commits below.1. Drop plain-text ADR references outside
docs/architecture*Rewrote every
ADR NNNNmention inuser-docs/,sdk/**/*.md,deploy/, and.claude/skills/**so each sentence stands on its own:user-docs/reference/grpc-api.md,user-docs/building/api-stability.md, and the skills (cut-release,perf-optimization,perf-mcp-interpretation,mecatl-model-router-config): the number was only a pointer, so I dropped it.deploy/README.md: replaced "the full operator contract … is ADR 0278" with what the operator owns: the chart creates no Gateway, Route, or Certificate (checked againstdeploy/helm/mecak8s/chart_test.go), and the operator forwards the bearer header and keeps/drain,/healthz,/readyzoff public routes. Dropped "(ADR 0213)" from the raw-driver note.sdk/typescript/examples/slack-bot/DESIGN.md: the "See also" ADR list now links to the current docs (live-run controls, caller identity). ADR 0253's mocking testkit was dropped (superseded by 0279), so that entry and its mention are gone.panel-reviewskill: removed the generic "ADR indexes / ADR knowledge" wording.Left alone:
apps/README.md: docs: fix docs that contradict the code (salvaged from #2107) #2144 already removed its ADR references.sdk/typescript/CHANGELOG.md:28: it quotes the linked commit's subject verbatim. This is release history, likeengine/CHANGELOG.md.blob/<sha>/docs/adr/...permalinks, plus everything else out of scope:docs/architecture*,docs/design/,engine/docs (engine/api/README.mdstill cites ADRs 0036/0037), proto/Go comments, generated output.2. Rule hygiene
log-delivery.md, narrowed. It used to load for all ofcmd/**,internal/app/**,internal/adapter/**,engine/adapter/**, andengine/port/**. Logger and sink composition actually lives incmd/*/main.go,cmd/mecatui/diaglog*.go,cmd/mecatui/embed/**,internal/cliconfig/logging*.go, andinternal/adapter/slogdiag/**(found by grepping forNewTextLogger,slog.SetDefault,slogdiag.New*, and the diag-log writer).internal/apponly mentions slogdiag in a comment;engine/portandengine/adapterhold no sinks. I also dropped the "keep … distinct" clause, because root AGENTS.md already states it. The rule still spanscmd/andinternal/, so it stays a rule.catalog-metadata.md, unchanged. It spansengine/tool/**andinternal/app/learned_skills.go, it's 9 lines, and its invariant still holds.test-isolation.md, unchanged. It applies to**/*_test.gorepo-wide;buildIsolated/isolateConfigandUserModelDirstill exist.domain-model.md, unchanged. It applies to**/*.modelith.*and is 16 lines.All four keep their
paths:andmatlatl: orphan-intentionalfrontmatter.3. Module AGENTS.md files
engine/: added. It holds:engine/;task test:engine-standalonemeans imports must resolve fromengine/go.modalone;task api:updateruns from the root becauseinternal/apichecklives there, and onlyarch.CorePackagesis guarded..golangci.ymldepguard allowlist andcoreImportRulesinarch/layering_test.go; a new core package goes inarch.CorePackages;engine/adapter/*never importsagent.toolownsFileSystem/Workspace/Environment,governanceis session-free,Sessionaggregate plus tool-call pairing, provider-neutralport.LLMRequestwith stateless replay.internal/: added. It holds:settings.yamlkeys arepermconfig/schema.gosection fields, and the reference generator reads doc comments from that file only; a new section needs a pinnedTierinconfiggen/build.go;Service.appendEventis the only place that stampssession.Event.Actor.EnvironmentRefreattachment (app/placement.go), and thecommand_runner.environment.inheritgrant scope (app/command_runner.go,app/build.go).cmd/: skipped. Its only candidates fail the "would an agent get this wrong?" test: missinghelpmeta.goflag metadata fails with an exact "add an entry" error in both mecated and mecatui, and the flag-to-docs map is already inuser-docs/_README.md, which root AGENTS.md points to. The one unguarded fact (mecademo must stay offinternal/app/internal/cliconfigbecause of the link-size cost) belongs in a depguard rule, not a one-line file.Some suggested move-downs stay in root because the code spans modules:
engine/governanceandengine/agent;engine/portand implementations ininternal/.Root
AGENTS.mdlinks the module files. Each new file has aCLAUDE.mdsymlink and stays well under 200 lines.4.
cut-release: drop stale first-engine-tag guidanceEngine tags through
engine/v0.15.0exist, but the skill still calledengine/v0.0.1the upcoming first cut and saidgoreleasehad no base tag to compare against. The bullet and steps 1–2 now describe the normal flow: engine tags are cut on their own schedule, you increment the latest tag perengine/COMPATIBILITY.md, andtask api:release-checkpreviews the version classification against the previous tag. Theapi:release-checkdescription inTaskfile.ymlhas the same stale "none exists yet" wording; I left it alone because this PR is docs only.Verification
task docspasses: instruction-files ok; matlatl 0 broken, 0 orphans, 0 dead-ends.task site:buildpasses.go test ./internal/adapter/ -run TestRedisFollowCapacity_Scenario4passes.task lint,task test:race, and the mecademo demo. This PR is Markdown only.🤖 Generated with Claude Code