Repository navigation
docs: Add agent-compatible code problem document - #1
Conversation
30b0239 to
3e415b1
Compare
|
I think my only question here is:
|
b88a987 to
a7ef7e5
Compare
|
Good question. I considered both options earlier today. repo-readiness.md is diagnostic — it describes current state (coverage tables, CI maturity) and asks what needs to improve before agents can be trusted. Language choice is prescriptive — it defines properties that new code should have. Expanding repo-readiness to include language guidance changes the character of that document. The topic cross-cuts beyond readiness. Type safety reduces agent drift (security-threat-model.md), simplifies code review by offloading categories of checks to the compiler (code-review.md), and enables boundary typing for consumed dependencies like hermeto — a concern that doesn't exist in repo-readiness at all. Folding it into repo-readiness would either force that doc to absorb concerns from other domains or require the language guidance to be artificially narrow. I applied the same reasoning when creating codebase-context.md (merged in #3) — that topic also cross-cuts review, drift, invariants, and readiness without fitting cleanly into any single existing doc. That said, repo-readiness.md could reference agent-compatible-code.md as a related concern — the way it already references CLAUDE.md as a readiness criterion. Happy to add that cross-link if it helps. |
|
Yeah, I like the cross link! Thanks! |
No existing problem document addresses what properties of code make it suitable for autonomous agent operation. This is distinct from repo-readiness (which is diagnostic) and architectural-invariants (which derives from the architecture repo). The new document defines criteria-based language selection (static type checking, error locality, refactoring safety, tooling, deployment simplicity) without prescribing specific languages. It distinguishes between in-house code (which should meet the criteria) and consumed dependencies (where the requirement shifts to typed integration boundaries), using hermeto/cachi2 as a concrete example. Assisted-by: Claude Code (Opus 4.6) Signed-off-by: arewm <[email protected]>
a7ef7e5 to
8188963
Compare
|
Done! 😄 |
Seven specialized agents for working on the fullsend project: - fullsend-architect (opus): architectural coherence guardian; knows all ADRs, five execution layers, story dependencies, repo-as-coordinator invariant - go-developer (sonnet): CLI specialist; forge abstraction, layered config, multi-role GitHub App model, known gaps in PR #132 - doc-architect (sonnet): problem doc and ADR writer; design-exploration conventions, org-agnostic authoring rules - stage-prompt-designer (opus): designs/reviews stage agent prompts; triage/implement/review/fix constraints, injection surface rules, known failure modes from live operation (Issues #4, #5, #010a) - security-reviewer (opus): applies fullsend threat model; prompt injection, ADR 0017 credential isolation, sandbox integrity, workflow file protection - workflow-engineer (sonnet): GitHub Actions and dispatch layer; label state machine, slash commands, concurrency groups, fixes for Issues #1 #003b #4 #5 #7 #9 #010a - e2e-integrator (opus): full flow tracing; integration gap analysis, demo readiness checklist, sprint prioritization across stories Also adds .claude/AGENTS.md with usage guide and team composition patterns.
On the pi runtime, runtime.NeedsOpenAIProvider decided whether to create the run-scoped OpenAI credential from the parent's own model alone. A persona or subagents entry that named an openai/ model never influenced that decision, so a Vertex parent with an OpenAI persona (agents[].subagents, subagents.default, or a persona's own frontmatter model:) skipped the credential even when the harness declared the openai provider, and Bootstrap then rejected the persona because openai was never in the run's trusted model set. Fix, in two parts: 1. internal/runtime/openai_seeder.go adds SubagentsNeedOpenAIProvider, which reports whether any configured child - a subagents.<persona> override, subagents.default, or a discovered persona's frontmatter model: - resolves to the openai provider. internal/cli/run.go ORs this into the provider-creation gate while keeping the parent-only check for the credential path the parent's own call uses (runInferenceProvider): a Vertex parent with an OpenAI persona still needs its own Vertex ADC validated. 2. Gate #1 alone was not enough: resolvePersonaModels' trusted-spec set never admitted an arbitrary openai/<id> spec (only the parent's own one), so a configured persona would still be rejected even once the credential existed. internal/runtime/pi_personas.go adds piConfiguredOpenAIIDs, which extends the manifest's openai allowlist with ids from pre-configured (repo-controlled) children, the same way piGoogleVertexModels/piXaiVertexModels extend theirs - but only when OpenAIProviderAttached (a new BootstrapInput method, threaded from run.go's actual provider-creation result) confirms the credential is really in the sandbox. A model an Agent call chooses at dispatch time is deliberately never admitted this way. Also names the actual remedy in the Bootstrap error ("declare openai in the harness's providers list, or run the parent on an openai/ model") instead of only listing accepted specs, and documents the rule in docs/runtimes/pi.md. Not implemented: validating a subagents.<persona> entry against the harness's declared providers at `agent set --subagent` time. The issue ties that to #7804's model/runtime pairing rule, which does not exist yet; the Bootstrap-time error above covers the same case today. Closes #7981
Summary
No existing problem document addresses what properties of code make it suitable for autonomous agent operation. This is distinct from repo-readiness (which is diagnostic) and architectural-invariants (which derives from the architecture repo).
The new document defines criteria-based language selection (static type checking, error locality, refactoring safety, tooling, deployment simplicity) without prescribing specific languages. It distinguishes between in-house code (which should meet the criteria) and consumed dependencies (where the requirement shifts to typed integration boundaries), using hermeto/cachi2 as a concrete example.
Assisted-by: Claude Code (Opus 4.6)