-
Notifications
You must be signed in to change notification settings - Fork 155
[FEATURE] Create root AGENTS.md documenting all CI-enforced rules for coding agents #695
Copy link
Copy link
Open
Labels
acceptedDeprecated: use status/accepted. Kept for issue history; will be removed in milestone 0.10.0.Deprecated: use status/accepted. Kept for issue history; will be removed in milestone 0.10.0.agentic-workflowsarea/ci-cdGitHub workflows, merge queue, gh-aw integrations, release pipeline.GitHub workflows, merge queue, gh-aw integrations, release pipeline.area/docs-sitedocs/src/content (Starlight), README, doc generation.docs/src/content (Starlight), README, doc generation.documentationDeprecated: use type/docs. Kept for issue history; will be removed in milestone 0.10.0.Deprecated: use type/docs. Kept for issue history; will be removed in milestone 0.10.0.enhancementDeprecated: use type/feature. Kept for issue history; will be removed in milestone 0.10.0.Deprecated: use type/feature. Kept for issue history; will be removed in milestone 0.10.0.good first issueGood for newcomersGood for newcomersstatus/acceptedDirection approved, safe to start work.Direction approved, safe to start work.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).Initial agentic triage complete; pending maintainer ratification (silence = approval).type/docsDocumentation change (prose, examples, generated reference).Documentation change (prose, examples, generated reference).
Metadata
Metadata
Assignees
Labels
acceptedDeprecated: use status/accepted. Kept for issue history; will be removed in milestone 0.10.0.Deprecated: use status/accepted. Kept for issue history; will be removed in milestone 0.10.0.agentic-workflowsarea/ci-cdGitHub workflows, merge queue, gh-aw integrations, release pipeline.GitHub workflows, merge queue, gh-aw integrations, release pipeline.area/docs-sitedocs/src/content (Starlight), README, doc generation.docs/src/content (Starlight), README, doc generation.documentationDeprecated: use type/docs. Kept for issue history; will be removed in milestone 0.10.0.Deprecated: use type/docs. Kept for issue history; will be removed in milestone 0.10.0.enhancementDeprecated: use type/feature. Kept for issue history; will be removed in milestone 0.10.0.Deprecated: use type/feature. Kept for issue history; will be removed in milestone 0.10.0.good first issueGood for newcomersGood for newcomersstatus/acceptedDirection approved, safe to start work.Direction approved, safe to start work.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).Initial agentic triage complete; pending maintainer ratification (silence = approval).type/docsDocumentation change (prose, examples, generated reference).Documentation change (prose, examples, generated reference).
Type
Projects
Status
In Progress
Is your feature request related to a problem? Please describe.
AI coding agents (GitHub Copilot, Copilot coding agent, the daily Test Improver workflow, and the CLI Consistency Checker workflow) work on PRs in this repo but have no single authoritative document describing the rules they must follow. As a result agents sometimes emit code that violates CI checks — using
yaml.dump()to file handles instead ofyaml_io.dump_yaml(), usingstr(path.relative_to(base))instead ofportable_relpath(), or producing CLI help text that fails the consistency checker. Every failure wastes a CI cycle and requires a human to explain the rule to the agent again.Ironically, both
daily-test-improver.mdandcli-consistency-checker.mdalready contain the instruction "read AGENTS.md first" — but the file does not exist.Describe the solution you'd like
Create
AGENTS.mdat the repository root (next toREADME.md) as the authoritative, agent-readable contract for all coding agents working in this repository. The file must be read by every agent before making any code change.Task breakdown
1. Audit workflows for all agent-visible rules
.github/workflows/file and extract linting, testing, and convention rules an agent could violatedocs/cli-reference.mdand extract CLI documentation conventionsdocs/contributing.md(if present) for code style and contribution rules.pre-commit-config.yaml,pyproject.tomllint sections, orruff.tomland extract enforced linting rulespyproject.tomlfor pytest options, coverage thresholds, and markers2. Write
AGENTS.mduv sync --extra dev --extra build,uv run apm --versionCommandLoggerfor output;yaml_io.dump_yaml()for YAML writes;portable_relpath()for path strings; no rawprint()--verbose/-v,--dry-run,--yes/-y); every new command/flag must appear indocs/cli-reference.md; no TODO markers in help stringstests/unit/vstests/integration/; mock all network calls in unit tests; no new external test deps without a tracked issue; no generated files in commitsmarketplace/archive.pysafe extraction helpersscripts/test-*.shin the same PR as feature changes; integration tests always run frommainbranch scripts3. Validate the file
yaml-iogrep,portable_relpathgrep) against the repo to confirm documented patterns are accurateAGENTS.mdand verify it can set up and pass CI from scratchcopilot-setup-steps.ymlstill passes after adding the file4. Keep
AGENTS.mdin syncAGENTS.mdas the agent-facing documentation for that ruleAGENTS.mdin the same PRdaily-test-improverandcli-consistency-checkerworkflows honour the "read AGENTS.md first" instruction once the file existsRules currently enforced in CI (must all appear in
AGENTS.md)ci.ymlci.ymllintyaml.dump()to file handles outsideutils/yaml_io.py(useyaml_io.dump_yaml())ci.ymllintstr(x.relative_to(y))— useportable_relpath()fromapm_cli.utils.pathsci.ymluv run pytest tests/unit tests/test_console.py -n auto --dist workstealmust passci-integration.ymlscripts/test-*.shrun frommainonlycodeql.ymlcli-consistency-checkerdocs/cli-reference.mdparitydaily-test-improverDescribe alternatives you've considered
CONTRIBUTING.md: human-oriented prose; agents need machine-scannable, structured, short directives. A separateAGENTS.mdfollows the convention established by projects likegoogle/adk-python.AGENTS.mdis faster and less error-prone.Additional context
daily-test-improver.mdandcli-consistency-checker.mdalready contain"read AGENTS.md first"— the file is expected but absent. Creating it closes that gap immediately.copilot-setup-steps.ymlshould be updated to referenceAGENTS.mdso Copilot coding agents receive it as part of their initial context.AGENTS.mdconvention is documented by Anthropic and widely adopted in open-source repositories that integrate AI coding agents.