Skip to content

Fix stale generate_agents_md reference in prompt fragments#544

Merged
strawgate merged 3 commits intomainfrom
copilot/fix-stale-generate-agents-md
Mar 2, 2026
Merged

Fix stale generate_agents_md reference in prompt fragments#544
strawgate merged 3 commits intomainfrom
copilot/fix-stale-generate-agents-md

Conversation

Copy link
Contributor

Copilot AI commented Mar 2, 2026

Two prompt fragments (pick-three-keep-all.md, pick-three-keep-one.md) tell agents to pass context "from generate_agents_md" to sub-agents, while the runtime (runtime-setup.md) actually writes conventions to /tmp/agents.md. The sibling fragment pick-three-keep-many.md already used the correct path. This ambiguity causes sub-agents to receive inconsistent instructions about where repository conventions live.

  • Source fix: replaced `generate_agents_md``/tmp/agents.md` in both pick-three-keep-all.md and pick-three-keep-one.md
  • Recompiled: 13 affected .lock.yml files regenerated via gh-aw compile

The generate_agents_md reference in runtime-setup.md (the actual MCP API call) and claude-workflows/DEVELOPING.md (documentation) are correct and unchanged.

Original prompt

This section details on the original issue you should resolve

<issue_title>[prompt-audit] Stale generate_agents_md reference in compiled prompts</issue_title>
<issue_description>## Prompt Audit Findings

High

1. Stale sub-agent context source name (generate_agents_md) drifts from the actual /tmp/agents.md contract

Workflow(s): issue-triage.prompt.md, bug-hunter.prompt.md, autonomy-atomicity-analyzer.prompt.md, agent-suggestions.prompt.md, code-simplifier.prompt.md, information-architecture.prompt.md, performance-profiler.prompt.md, product-manager-impersonator.prompt.md, refactor-opportunist.prompt.md, test-coverage-detector.prompt.md, ux-design-patrol.prompt.md

Evidence:

  • issue-triage.prompt.md line 47: "Repository conventions are pre-fetched to /tmp/agents.md..."
  • issue-triage.prompt.md line 123: "All repository context, conventions, and constraints you've gathered (e.g., from generate_agents_md)"
  • bug-hunter.prompt.md line 45: "Repository conventions are pre-fetched to /tmp/agents.md..."
  • bug-hunter.prompt.md line 124: "All repository context, conventions, and constraints you've gathered (e.g., from generate_agents_md)"

Impact: The same prompt tells the agent two different sources for repository conventions, which creates ambiguity in sub-agent instructions and increases the chance of missing context transfer or incorrect tool assumptions.

Suggested fix: Replace generate_agents_md with /tmp/agents.md (or a single canonical name used by runtime) in all affected prompts to keep guidance consistent.

Summary

Audited 59 prompt files across 5 workflow families.

  • Critical: 0 findings
  • High: 1 finding
  • Medium: 0 findings

What is this? | From workflow: Scheduled Audit

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

  • expires on Mar 9, 2026, 11:23 AM UTC

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…pt fragments

Replace the stale `generate_agents_md` reference with `/tmp/agents.md` in
pick-three-keep-all.md and pick-three-keep-one.md fragments, matching the
runtime contract in runtime-setup.md and the already-correct reference in
pick-three-keep-many.md. Recompile all affected lock files.

Co-authored-by: strawgate <6384545+strawgate@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix stale reference to generate_agents_md in compiled prompts Fix stale generate_agents_md reference in prompt fragments Mar 2, 2026
@strawgate strawgate marked this pull request as ready for review March 2, 2026 17:58
@coderabbitai
Copy link

coderabbitai bot commented Mar 2, 2026

Warning

Rate limit exceeded

@strawgate has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 4 minutes and 50 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 4b5316a and 8327973.

📒 Files selected for processing (15)
  • .github/workflows/gh-aw-agent-suggestions.lock.yml
  • .github/workflows/gh-aw-autonomy-atomicity-analyzer.lock.yml
  • .github/workflows/gh-aw-bug-hunter.lock.yml
  • .github/workflows/gh-aw-code-simplifier.lock.yml
  • .github/workflows/gh-aw-fragments/pick-three-keep-all.md
  • .github/workflows/gh-aw-fragments/pick-three-keep-one.md
  • .github/workflows/gh-aw-information-architecture.lock.yml
  • .github/workflows/gh-aw-issue-triage.lock.yml
  • .github/workflows/gh-aw-performance-profiler.lock.yml
  • .github/workflows/gh-aw-product-manager-impersonator.lock.yml
  • .github/workflows/gh-aw-refactor-opportunist.lock.yml
  • .github/workflows/gh-aw-test-coverage-detector.lock.yml
  • .github/workflows/gh-aw-ux-design-patrol.lock.yml
  • .github/workflows/upgrade-check.lock.yml
  • .github/workflows/workflow-patrol.lock.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch copilot/fix-stale-generate-agents-md

Comment @coderabbitai help to get the list of available commands and usage tips.

@strawgate strawgate merged commit c6503d3 into main Mar 2, 2026
14 checks passed
@strawgate strawgate deleted the copilot/fix-stale-generate-agents-md branch March 2, 2026 18:01
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.

[prompt-audit] Stale generate_agents_md reference in compiled prompts

2 participants