Skip to content

Follow the client repository's own agent guidance; never close keep-open issues - #48

Merged
glennfaison merged 3 commits into
mainfrom
feat/follow-client-repo-guidance
Oct 31, 2026
Merged

glennfaison merged 3 commits into
mainfrom
feat/follow-client-repo-guidance

Conversation

@glennfaison

Copy link
Copy Markdown
Owner

Problem

A client repo labelled an issue evergreen ("Recurring enhancement that stays open indefinitely...") and its AGENTS.md told agents not to close issues with that label. The agents closed it anyway.

Root cause

  • Only implement-github-issue and shepherd-github-pr read $repo_guidance, and only for build/verify rules. Triaging, Reviewing and the filing step never looked at the client's rules.
  • Four places close an issue: the PR body (Closes #N, which GitHub acts on at merge), Reviewing after a merge, Triaging housekeeping, and the duplicate rule. None checked client guidance.
  • Label meanings are client-defined, so a hard-coded evergreen check would be wrong for the next client.

Change

  • New references/client-guidance.md and protocol rule 11. Every item skill reads the client's agent files and the item's label descriptions right after claiming, before it acts.
  • Guidance is read from the default branch only (a PR can edit AGENTS.md). Sources: AGENTS.md/CLAUDE.md/GEMINI.md at any depth, CONTRIBUTING, copilot instructions, cursor/claude/agents rules, PR and issue templates, plus repo_guidance.
  • Three-level precedence: Trust rules and Never lists are fixed; client guidance beats package defaults and can only narrow; package defaults fill the rest. On a conflict: change less, ready-for-human, log guidance-conflict.
  • Keep-open issues: PR uses Refs #N instead of Closes; Reviewing and Triaging housekeeping do not close after a merge; dedupe does not close; a MERGED PR does not count as shipped in Implementing; an issue GitHub closed anyway is reopened. After a merge it becomes ready-for-human so agents do not loop on recurring work.
  • New helpers client_guidance_files and item_labels (shell + no-shell reference), with tests. repo_guidance is now read by six skills; runner prompts regenerated.
  • ADR 0009 and a changeset.

Verification

npm run validate, npm test (148 shell, 39 node), npm run sync:check, all passing.

Decision for review

After a merge on a keep-open issue I set ready-for-human (a person opts in to the next contribution). If you would rather agents keep contributing to evergreen issues unprompted, that is a one-line change in client-guidance.md and labels.md.

@glennfaison
glennfaison merged commit 479906e into main Oct 31, 2026
2 checks passed
@glennfaison
glennfaison deleted the feat/follow-client-repo-guidance branch October 31, 2026 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant