mivia-agentkit
AGENTS.md2 starsChanged 4 months agoMITView on GitHub
AGENTS.md is the canonical repo-level instruction file. Tool-specific files in CLAUDE.md, .codex/, .claude/, .github/, and .agents/ must point back here and to .ai/; they must not introduce conflicting policy. Sources: https://agents.md/, https://developers.openai.com/codex/guides/agents-md, https://code.claude.com/docs/en/claude-directory, https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/add-custom-instructions/add-repository-instructions. Mivia AgentKit is a greenfield Go CLI named mivia-agent. It will be Cobra-based and will install, validate, and orchestrate a canonical agent-control surface for multi-CLI agent workflows. The product goal is not another hosted service: it is a single local binary that configures .ai/, wraps agent…
- Reads credentials
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,700 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository17 other files it gives its agents.
- .codex/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- adversarial-test-reviewSkill
- agent-dag-plannerSkill
- agent-plan-implementerSkill
- airtight-feature-deliverySkill
- deep-bug-auditSkill
- mivia-agent-workflowsSkill
- test-coverage-auditSkill
- adversarial-test-reviewSkill
- agent-dag-plannerSkill
- agent-plan-implementerSkill
- airtight-feature-deliverySkill
- deep-bug-auditSkill
- mivia-agent-workflowsSkill
- test-coverage-auditSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
27 rules. About 0 are common, 8 are distinctive, and 19 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
19
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 11
Do not write Go product code unless a specific docs/plans/agentkit-implementation-roadmap/ws-XX/tasks.md task is in scope.
- Very specific: line 28
Read docs/plans/agentkit-implementation-roadmap/_conventions.md before any implementation workstream.
- Very specific: line 31
Every code change must either update or explicitly reference the relevant docs/plans/agentkit-implementation-roadmap/ws-XX/tasks.md.
- Very specific: line 39
Use lowercase, single-word package names.
- Very specific: line 40
Every .go file starts with the package doc header required by docs/plans/agentkit-implementation-roadmap/_conventions.md, including WS and …
- Very specific: line 41
Every exported package, type, function, var, and const needs a doc comment.
- Very specific: line 43
Keep initialisms consistent: URL, HTTP, ID, and API, not Url, Http, Id, or Api.
- Very specific: line 44
Use //go:embed only at package scope.
- Very specific: line 45
Do not add network calls to mivia-agent itself.
- Distinctive: line 51
Write tests before or alongside production code.
- Distinctive: line 52
Use table-driven tests for multi-case behavior, with named subtests and failure messages that include got/want context.
- Very specific: line 53
Use t.TempDir() for any test that writes files.
- Distinctive: line 54
Do not mock the thing under test.
- Very specific: line 56
Test helpers must call t.Helper() and must not hide failures behind booleans or swallowed errors.
- Distinctive: line 57
Every guard, rejection path, fail-closed path, and idempotent writer needs a mutation proof recorded in the workstream completion report.
- Very specific: line 63
No raw prompts, raw model output, provider payloads, plausible secrets, tokens, .env contents, or credential files may be persisted.
- Distinctive: line 67
Do not add CI, hooks, docs, samples, or fixtures that require network access by default.
- Distinctive: line 73
Use these once Go code exists:
- Very specific: line 99
When adding or changing a durable repo standard, forbidden pattern, hook policy, security invariant, or repeated agent failure mode, update …
- Very specific: line 105
Use branch names like codex/<short-scope> for agent-created branches unless the user asks otherwise.
- Very specific: line 106
Commit messages must follow type(scope): imperative subject.
- Very specific: line 107
Do not force-push dev.
- Distinctive: line 108
Do not commit product code without green relevant tests and mutation proofs for guards.
- Distinctive: line 109
If existing unrelated changes are present, do not revert them.
- Very specific: line 126
Before implementing any WS task, read the task file, docs/plans/agentkit-implementation-roadmap/_conventions.md, the PRD sections named by …
- Very specific: line 127
When a task completes, append its completion report to that task file and update docs/plans/agentkit-implementation-roadmap/00-overview.md …
- Very specific: line 128
Do not free-form tasks.md.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Mivia AgentKit Agent Instructions
AGENTS.md is the canonical repo-level instruction file. Tool-specific files in CLAUDE.md, .codex/, .claude/, .github/, and .agents/ must point back here and to .ai/; they must not introduce conflicting policy.
Sources: https://agents.md/, https://developers.openai.com/codex/guides/agents-md, https://code.claude.com/docs/en/claude-directory, https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/add-custom-instructions/add-repository-instructions.
Project Overview
Mivia AgentKit is a greenfield Go CLI named mivia-agent. It will be Cobra-based and will install, validate, and orchestrate a canonical agent-control surface for multi-CLI agent workflows. The product goal is not another hosted service: it is a single local binary that configures .ai/, wraps agent CLIs behind adapters, runs bounded workflows, and gates protected actions with deterministic local checks.
Do not write Go product code unless a specific docs/plans/agentkit-implementation-roadmap/ws-XX/tasks.md task is in scope. This repo currently starts from docs and agent infrastructure.
Sources: https://agents.md/, https://go.dev/doc/modules/layout. Repo sources: docs/prd/0001-mivia-agentkit.md, docs/plans/agentkit-implementation-roadmap/00-overview.md.
Repository Structure
docs/contains the PRD, product proposal, workstream roadmap, and task files. Treat it as the source for product behavior..ai/is the project-level canonical control surface for rules, skills, workflows, quality contracts, and future run artifacts..agents/contains generic cross-agent registries and hook declarations that delegate back to.ai/policy..claude/,.codex/, and.github/are tool adapters that referenceAGENTS.mdand.ai/.- Future Go code belongs in
cmd/mivia-agent/andinternal/following the package map indocs/plans/agentkit-implementation-roadmap/_conventions.md. - Runtime output belongs under
.ai/runs/and must stay gitignored.
Sources: https://www.dot-agents.com/, https://code.claude.com/docs/en/claude-directory, https://developers.openai.com/codex/guides/agents-md, https://go.dev/doc/modules/layout. Repo source: docs/plans/agentkit-implementation-roadmap/_conventions.md.
Operating Doctrine
- Read
docs/plans/agentkit-implementation-roadmap/_conventions.mdbefore any implementation workstream. - Work in dependency order from
docs/plans/agentkit-implementation-roadmap/00-overview.md; do not start a workstream whose dependencies are not green. - Each task is one production file plus its test file. If a task needs more, split the task before implementing.
- Every code change must either update or explicitly reference the relevant
docs/plans/agentkit-implementation-roadmap/ws-XX/tasks.md. - Generated or updated files must be idempotent: rerunning the same writer with the same inputs produces no diff.
- Agents must report what was verified and what remains unverified before claiming completion.
Sources: https://agents.md/, https://developers.openai.com/codex/learn/best-practices. Repo source: docs/plans/agentkit-implementation-roadmap/_conventions.md.
Go Standards
- Use lowercase, single-word package names; keep command entrypoints under
cmd/mivia-agent/and shared implementation underinternal/. - Every
.gofile starts with the package doc header required bydocs/plans/agentkit-implementation-roadmap/_conventions.md, including WS and PRD references. - Every exported package, type, function, var, and const needs a doc comment. Package comments start with
Package <name>. - Return errors instead of panicking in library code. Use
%wfor wrapping anderrors.Is/errors.Asfor checks across error chains. - Keep initialisms consistent:
URL,HTTP,ID, andAPI, notUrl,Http,Id, orApi. - Use
//go:embedonly at package scope; patterns must be module-local and deterministic. - Do not add network calls to
mivia-agentitself. Fake runners are valid for unit tests, but shipped command and adapter behavior must also be covered by real subprocess or built-binary integration tests wherever the product surface is implemented.
Sources: https://go.dev/doc/effective_go, https://go.dev/doc/modules/layout, https://go.dev/doc/comment, https://go.dev/blog/go1.13-errors, https://go.dev/wiki/CodeReviewComments, https://pkg.go.dev/embed. Repo source: docs/plans/agentkit-implementation-roadmap/_conventions.md.
Testing Standards
- Write tests before or alongside production code. Tests are not deferred.
- Use table-driven tests for multi-case behavior, with named subtests and failure messages that include got/want context.
- Use
t.TempDir()for any test that writes files; never write fixtures into the repo tree during tests. - Do not mock the thing under test. If Git behavior is the risk, use a real temp Git repo. If hook output shape is the risk, assert the real shape.
- Fake runners, stub executables, and in-process fakes may support unit coverage, but they are not sufficient closure for implemented commands or approved adapters; add at least one real subprocess or built-binary integration path for each shipped surface.
- Test helpers must call
t.Helper()and must not hide failures behind booleans or swallowed errors. - Every guard, rejection path, fail-closed path, and idempotent writer needs a mutation proof recorded in the workstream completion report.
Sources: https://go.dev/wiki/TableDrivenTests, https://go.dev/doc/comment. Repo source: docs/plans/agentkit-implementation-roadmap/_conventions.md.
Security And Privacy
- No raw prompts, raw model output, provider payloads, plausible secrets, tokens,
.envcontents, or credential files may be persisted. - Project config in
.ai/wins over global config in~/.agents/; global config is read as defaults only by the future product. - Hooks must fail closed for malformed payloads that request protected actions once the hook engine exists.
- Protected actions are commit, push, PR, deploy, release, and live smoke. Future hooks must require a fresh quality stamp and policy decision before allowing them.
- Do not add CI, hooks, docs, samples, or fixtures that require network access by default.
Sources: https://developers.openai.com/codex/hooks, https://code.claude.com/docs/en/hooks-guide, https://www.dot-agents.com/. Repo sources: docs/prd/0001-mivia-agentkit.md, docs/plans/agentkit-implementation-roadmap/_conventions.md.
Development Commands
Use these once Go code exists:
go test ./...
go vet ./...
go build ./cmd/mivia-agentFor focused workstreams, run the package-specific commands listed in that workstream's Verification block before broader checks.
For changes to the agent configuration surface, run:
python3 scripts/verify_agent_config.pyInstall repo-managed Git hooks once per clone:
make install-hooksThe committed hooks run gofmt, Semgrep rule tests, and Semgrep policy checks before commit, then agent-config validation, full Semgrep, and Go test/vet/build checks before push. The Go checks no-op until go.mod exists. make verify runs the full local gate.
Agent tool hooks in .agents/, .claude/, and .codex/ run a shared guard that rejects verification-bypass attempts and tells the model to fix the failed validation or report the blocker after one focused repair attempt.
When adding or changing a durable repo standard, forbidden pattern, hook policy, security invariant, or repeated agent failure mode, update semgrep/agent-standards.yml if the rule can be checked statically and add coverage in scripts/test_semgrep_rules.py.
Sources: https://agents.md/, https://go.dev/doc/modules/layout, https://git-scm.com/docs/githooks, https://git-scm.com/docs/git-config, https://pkg.go.dev/cmd/gofmt, https://docs.semgrep.dev/extensions/pre-commit, https://docs.semgrep.dev/writing-rules/testing-rules, https://docs.semgrep.dev/cli-reference. Repo sources: docs/plans/agentkit-implementation-roadmap/_conventions.md, docs/development-hooks.md.
Git Workflow
- Use branch names like
codex/<short-scope>for agent-created branches unless the user asks otherwise. - Commit messages must follow
type(scope): imperative subject; allowed types, scopes, and subject length live in.ai/policy/commit-message.json. - Do not force-push
dev. - Do not commit product code without green relevant tests and mutation proofs for guards.
- If existing unrelated changes are present, do not revert them. Work around them or ask only when they block the task.
Sources: https://agents.md/, https://developers.openai.com/codex/guides/agents-md. Repo sources: docs/plans/agentkit-implementation-roadmap/_conventions.md, .ai/policy/commit-message.json.
Tool Adapters
CLAUDE.mdis a thin Claude Code adapter; it must keep Claude-specific notes only..agents/hooks.jsondeclares the generic hook guard surface for cross-agent tooling..claude/settings.jsonconfigures project permissions and delegates Claude Code hooks through the shared guard before falling through to the futuremivia-agenthook implementation..codex/hooks.jsonconfigures Codex hooks forUserPromptSubmit,PreToolUse,PermissionRequest, andStop, all delegated through the shared guard before falling through to the futuremivia-agenthook implementation..github/copilot-instructions.mdand.github/instructions/*.instructions.mdare Copilot adapters that point back to this file.- Skills use
SKILL.mdfrontmatter with at leastname,description, andtriggers. The canonical project skills live under.ai/skills/;.claude/skills/adapts them for Claude Code.
Sources: https://developers.openai.com/codex/hooks, https://developers.openai.com/codex/skills, https://code.claude.com/docs/en/settings, https://code.claude.com/docs/en/hooks-guide, https://code.claude.com/docs/en/skills, https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/add-custom-instructions/add-repository-instructions.
Documentation Workflow
- Before implementing any WS task, read the task file,
docs/plans/agentkit-implementation-roadmap/_conventions.md, the PRD sections named by the task, and any upstream files the task depends on. - When a task completes, append its completion report to that task file and update
docs/plans/agentkit-implementation-roadmap/00-overview.mdonly when the workstream is complete. - Do not free-form
tasks.md; preserve the required task, verification, mutation proof, and completion formats.
Sources: https://agents.md/, https://developers.openai.com/codex/learn/best-practices. Repo sources: docs/plans/agentkit-implementation-roadmap/_conventions.md, docs/plans/agentkit-implementation-roadmap/00-overview.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

