Skip to content

feat(roadmap): the implement step gives the agent AGENTS.md and the documents it routes to #3097

Description

@dan-petty

What happened

The runner agent works from the prompt src/devops_cli/ai/tasks/roadmap_implement_step.md, which holds a short list of the project rules. A person or an agent in the devcontainer works from AGENTS.md, which holds the rules of every task and routes each task to the document that owns it (testing, security, architecture, the workflow). The runner agent does not read it. So rules change in AGENTS.md and the runner does not follow them until someone copies them into the prompt. Live results on 2026-11-01: scratch files in the checkout root (rule 12), a removed pinned test, prose and tests that CI rejects later (AGENTS.md rules 4, 5, 9).

What should happen

  • The user message of each step holds the text of AGENTS.md of the checkout (it is capped at 6,500 characters, about 1,700 tokens), under its own heading, as data of the repository. The step prompt stops copying rules that AGENTS.md already holds and keeps only what is specific to the runner (the shell table, the tool names, the tick rule of tasks.md, the output cap).
  • For each group, the step also adds the documents that AGENTS.md routes the group to, when the group changes that kind of file: docs/TESTING.md when it changes a test, ARCHITECTURE.md and CONTRIBUTING.md sections when it changes src/, k8s/README.md when it changes a manifest. The routes come from a table in code, tested against the "Where to look" table of AGENTS.md.
  • The token cost per step is measured and stated, and the step stays inside the 128k window of the group budget (roadmap.stage.step_tokens).

Acceptance criteria

  • A step message holds AGENTS.md verbatim, and a test fails if the prompt and AGENTS.md give two different statements of one rule that a test can compare (for example the scratch directory).
  • A group that changes a test file brings docs/TESTING.md into the message, and a group that changes only a manifest does not.
  • The measured extra tokens per step are in the PR.
  • A change of AGENTS.md needs no change of the step prompt for rules that the file owns.

Related: #3027, #3072 (runner image tools), #3043 (scoped CI before the push), #3090 (type check of the gate), #3007.

Activity

  1. added
    type/feature
    source/agent
    scope/roadmap
    status/new
    value/medium
    effort/medium
    on Nov 1, 2026
  2. dan-petty commented on Nov 1, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/feature. The feat prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. Improves agent rule compliance but does not block delivery or expose a security gap.
    • Value: Medium. Prevents repeated rule violations and CI failures caused by the runner missing AGENTS.md rules.
    • Effort: Medium. Requires prompt restructuring, a routing table in code, tests, and token measurement across multiple files.
    • Related: feat(roadmap): devops roadmap implement runs one task group of a staged change in one 128k context with the pydantic-ai-harness Coder #2664, which asks for a different change. #2664 creates the bounded implement step; this candidate adds AGENTS.md text and routed documents to that step's message.
  3. added
    priority/p2-medium
    owner/agent
    on Nov 1, 2026
  4. added
    status/in-review
    and removed
    status/new
    on Nov 1, 2026
  5. removed
    status/in-review
    owner/agent
    on Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/roadmapsource/agenttype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions