Skip to content

docs: find, link and track the work on an issue - #545

Closed
olebhansen-agent wants to merge 4 commits into
mainfrom
docs/agents-md-linked-prs
Closed

olebhansen-agent wants to merge 4 commits into
mainfrom
docs/agents-md-linked-prs

Conversation

@olebhansen-agent

@olebhansen-agent olebhansen-agent commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

AGENTS.md gets rules for agents that work on issues:

  • Before starting on an issue, and again right before opening a pull request, look for pull requests already made for it. First check the ones linked to the issue, drafts included, with gh issue view N --json closedByPullRequestsReferences. Then search the free text for ones that only mention it.
  • Write Closes #N, or Part of #N, in the pull request's description, and check the link after creating or editing it.
  • Assign the issue and its pull requests, drafts included, to yourself.
  • Keep the digdir-agents project current: Status In Progress from the start, and Agent State (Analyzing, Coding, QA, Blocked: Human needed) as the work moves. Blocked: Human needed is also how a person pauses an agent.

Agents read the issue with gh issue view --comments, which doesn't show linked pull requests, so they missed drafts that already existed and opened parallel ones. A pull request with its closing keyword only in the commit message is missing from the issue's Development section, so the next agent can't find it there either.

Assignees and the project show who is on an issue and where it stands, before any pull request exists. Agent State takes over from the process/human-needed label, since the board can group by it and show what waits on a person in one lane. GitHub's project workflows already add items and set Done, so agents only set what those don't.

Setting the fields needs the project and read:org scopes, and access to the project, which GitHub hides from accounts without it. When an agent can't set them, it tells the person and goes on with the work.

Evidence

#539 repeated the change in the draft #533 for #532, and was closed as a duplicate. The fix for #531 was made a second time, though the draft #534 already had it. #538 was missing from #537's Development section until Closes #537 was added to its description. With the first command, #532 lists #533, and #537 lists #538.

The commands in the rules ran as written against project 74 with a token scoped project, read:org, repo, workflow: gh project item-add returned the existing item for this pull request, and gh project item-edit set its Agent State.

Risk

  • None for the code. It changes what agents do while they work on an issue.
  • Self-assignment does not start the integrations bot, which skips assignments its own account made.
  • An agent that still follows the old process/human-needed label misses a pause set only in the project. No open issue or pull request carries the label now.

🤖 Generated with Claude Code

@olebhansen-agent olebhansen-agent added the skip-changelog No agentctl changelog entry needed label Nov 17, 2026
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e15ad0af-7e63-438b-adba-7f605bbdb06a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@olebhansen-agent olebhansen-agent self-assigned this Nov 18, 2026
@olebhansen-agent
olebhansen-agent force-pushed the docs/agents-md-linked-prs branch from d9b0cc3 to a0bc744 Compare November 18, 2026 08:18
@olebhansen-agent olebhansen-agent changed the title docs: find existing pull requests through the issue, and link new ones to it docs: find, link and claim the pull requests for an issue Nov 18, 2026
@olebhansen-agent olebhansen-agent changed the title docs: find, link and claim the pull requests for an issue docs: find, link and track the work on an issue Nov 18, 2026
olebhansen-agent and others added 4 commits November 18, 2026 11:48
…s to it

Agents searched issue comments for earlier work, which do not show linked
pull requests, and opened parallel ones. A pull request without a closing
keyword in its description is also missing from the issue's Development
section, so the next agent cannot find it there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…issue in progress

Others look at assignees and the project's Status to see whether someone is
already on an issue, also before a pull request exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`gh project` needs the read:org scope as well, and GitHub hides a private
project from an account without access to it, so the project scope alone is
not enough to name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The project shows where each issue and pull request stands, and grouping by
Agent State shows what waits on a person better than a label does. With the
read:org scope, gh pr edit and gh project work, so the API workarounds go.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@olebhansen-agent

Copy link
Copy Markdown
Collaborator Author

Replaced by #553, which holds these rules together with the workflow for the project's new Status and WIP State fields.

@olebhansen-agent
olebhansen-agent deleted the docs/agents-md-linked-prs branch November 19, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog No agentctl changelog entry needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant