docs: add production engineering contract for AI agents - #302
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 852fe891e3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Presentation / XAML / View | ||
| -> Application / orchestration / use cases | ||
| -> Domain / engineering models / calculations | ||
| -> Infrastructure / device / file / network / OS adapters |
There was a problem hiding this comment.
Reverse the infrastructure dependency arrow
When an agent follows these arrows as the declared dependency direction, the diagram instructs the Domain layer to depend on Infrastructure, allowing engineering models/calculations to couple directly to file, network, device, or OS implementations. That reverses the service/adapter boundary described immediately below; Infrastructure adapters should instead depend inward on application/domain contracts rather than sit downstream of Domain.
AGENTS.md reference: AGENTS.md:L41-L46
Useful? React with 👍 / 👎.
Summary
Adds a repository-level
AGENTS.mdthat makes production architecture, root-cause-first debugging, UI-thread safety, bounded data processing, lifecycle management, regression protection, measurable performance, Result-oriented failure handling, and asynchronous diagnostics part of the implementation contract for every AI/code agent.Added failure architecture
TryXxx/ typedResult<T>/ structured status instead of exception-driven control flowWhy
ARSAS already has strong PR validation gates. This moves the same discipline earlier into reconnaissance, architecture, implementation, debugging, and failure handling so agents do not accumulate trial-and-error patches before validation.
Documentation-only change; no runtime behavior is modified.