Repository navigation
docs: state the agent contract for this repo (#30) - #35
antoinetoussaint-byte merged 3 commits into
Conversation
An agent starting here had no statement of what this runtime owns, what it does not, or how to behave when something does not work. The failure that produced the fleet standard was measured against these runtimes: an agent hand-wrote the environment they exist to resolve, and a sibling runtime skipped registration silently. Commands are derived from the workflow and were run in this worktree. Refs obin-ai/handbook#68 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Review of the new file found it asserting a safety property this runtime does not have: the consumed-API projection is read at serve time, never reaches validate(), and a malformed one degrades to a log line while the solution serves. A file stating otherwise would send an agent toward the silent absence the rules exist to prevent, so the exception is now stated as the dangerous path it is. The exported surface was also enumerated partially, omitting Manifest, Handler, RequestHandler and the exported constants — read as exhaustive, it would let a breaking change ship without a bang. Also drops an invented rationale for CI's test timeout and records the stale v0.0.2 Release object rather than implying tags are the only artifact. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Self-review of this diff (three passes, on the premise that agent-context files are followed literally). Two blockers found and fixed in 5ae0758; both were mine. 1. The file asserted a safety property the runtime does not have. It said boot configuration is resolved in That is the same "boots, serves, and is simply absent" shape rule 1 tells the story about, which is what made it a blocker rather than a wording nit: an agent adding configuration on that path would have believed a bad value fails the boot, or would have "fixed" 2. The exported surface was enumerated partially but reads as exhaustive. The list named the calls and omitted Two smaller corrections in the same commit: "hence the 5m timeout" was an invented rationale (I measured the two wall-clock tests; I never established why CI picked 5m), and the release line now records that a stale GitHub Release object for v0.0.2 is still marked Latest while tags run to v0.0.9. Checked and refuted, so deliberately not changed: the Not examined: the runtime's own code for defects — this diff adds no behaviour, so a docs error's blast radius is an agent's future decisions, which is where I spent the passes instead. Hermeticity is verified statically, not by severing the network. And no consumer of this module was verified to exist, so the intro now says "consumed as the Go module …" rather than naming consumers I did not check. File is 152 lines, within the standard's ~150 guidance and well under the ~200 cap. |
The file now tells an agent that boot configuration is resolved in loadConfig and refused by validate(), with one serve-time exception whose failure is a log line rather than a refusal. That claim was prose with nothing holding it: a second interior read would make the file quietly wrong again, which is the defect the file was just corrected for. The guard is structural rather than a list of function names — an enumeration rots the same way the exported-surface list did. It asserts every environment read sits in loadConfig's call tree, where validate() governs the result, or is the documented exception; that the exception still reads the environment and is still unreachable from loadConfig; and that this file still names it. Proven red three ways before landing: an os.Getenv added to a serve-path handler, the exception's name removed from AGENTS.md, and the exception's own read replaced by a constant. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Follow-up: the correction in 5ae0758 left a code invariant stated in prose with nothing holding it, which is how the file became wrong in the first place. bd58d23 pins it. CI green (42s).
Why structural rather than a list of names. My first version was a hand-written allow-list, and it immediately failed on Proven red three ways before landing, one probe per assertion, each reverted with
A gate proven red one way can be inert on its other branches, which is why each got its own probe. Not done, and not claimed: the portable checks from obin-ai/module-document-store#290 — cited paths resolve from the repo root, a |
Closes #30.
Summary
AGENTS.md(143 lines, under the ~150 guidance): what this runtime owns and does not own, the six behavioural rules from obin-ai/handbook#68, the build/test loop derived from.github/workflows/go.yml, and where depth lives.loadConfigresolving every address, port and secret through the SDK and at the derived token-exchange URLs; rule 5 points atvalidate()already separating three causes a single generic message used to conflate; rule 6 points at the suite being hermetic, so a green run says nothing about a real composition..claude/skills/and noCLAUDE.md. Neither is invented: this repo is one package and one CI job, so there is no repeated procedure to push out of the root file, and the standard makesCLAUDE.mda pointer only where one already exists.AGENTS.mdnames.claude/skills/as the place to add one instead of growing the file.Classification: neither fix nor hack. This adds no behaviour; no source file is touched.
Test plan
Every command in the new file was run in this worktree, not read off the workflow:
go mod download && go mod verify—all modules verifiedgo test -race ./... -count=1 -timeout=5m— ok, 18.5sgo vet ./...— cleantest -z "$(gofmt -l ./*.go)"— emptygo mod tidyleavesgo.mod/go.sumunchanged (the file claims this)AGENTS.mdresolves from the repository root; every exported name it lists exists insolution.go/gateway_error.goTestHeartbeatStopsQuotingAnEndlesslyChangingReason10.01s,TestBeatIsBoundedByTheCredentialsExpiry5.04s./*.goformatting glob covering only the root package is read from the workflow, not assumedNot verified: nothing in
AGENTS.mdwas exercised against a real composition — nocodefly run solution, no live host, gateway or accounts. The claims about those surfaces are restatements ofREADME.mdand of the issues it cites (codefly-dev/core#382, #365, codefly-dev/cli#717), not observations I made. The release sentence is inferred from the repository's state —v0.0.9points atmain's HEAD and there is no release workflow — not from having cut one.🤖 Generated with Claude Code