Skip to content

feat(automation): continual learning, agents-md-audit, shell entry points#474

Draft
Bryan-Roe wants to merge 1 commit into
mainfrom
cursor/ai-automation-stack-42a0
Draft

feat(automation): continual learning, agents-md-audit, shell entry points#474
Bryan-Roe wants to merge 1 commit into
mainfrom
cursor/ai-automation-stack-42a0

Conversation

@Bryan-Roe

@Bryan-Roe Bryan-Roe commented Jun 21, 2026

Copy link
Copy Markdown
Owner

Summary

Adds the continual-learning Cursor workflow (skill + memory-updater subagent), a new read-only agents-md-audit inspection agent for AGENTS.md Learned sections, shell/Makefile shortcuts to run repo agents, and documentation fixes for the automation stack.

Changes

  • Added .cursor/agents/agents-memory-updater.md and .cursor/skills/continual-learning/SKILL.md for transcript mining and AGENTS.md memory updates
  • Added scripts/agents/agents_md_audit_agent.py (agents-md-audit) — validates Learned section structure, bullet limits, secret patterns, and stale dates
  • Registered the new agent in scripts/run_repo_agents.py
  • Added scripts/run_ai_automation.sh and Makefile targets (make agents, make agents-dry, make ai-automation)
  • Updated AGENTS.md, scripts/README.md, and REPO_AUTOMATION_GUIDE.md (including fixing --run-agents step order to match code)
  • Created automation status canvas at ~/.cursor/projects/workspace/canvases/automation-status.canvas.tsx (IDE-local artifact)

Verification

  • pytest tests/test_agents_md_audit_agent.py -v — 9 passed
  • ./scripts/run_ai_automation.sh --agent agents-md-audit --dry-run — ok
  • make agents-dry — 4 agents run (2 ok, 2 warning from pre-existing marker/docstring findings)
  • Continual learning is Cursor-native: invoke /continual-learning in chat to delegate to agents-memory-updater
Open in Web Open in Cursor 

Summary by Sourcery

Add a new AGENTS.md audit automation agent, wire it into the repo automation workflow, and introduce continual-learning support with corresponding documentation and entrypoints.

New Features:

  • Introduce the agents-md-audit automation agent to validate AGENTS.md learned-memory sections for structure, bullet limits, and secret patterns.
  • Add a continual-learning Cursor skill and agents-memory-updater subagent to keep AGENTS.md Learned sections in sync with transcript-derived knowledge.
  • Provide a run_ai_automation.sh shell wrapper and Makefile targets for running repository inspection agents via a single command.

Enhancements:

  • Register the new agents-md-audit agent in the shared run_repo_agents orchestration so it participates in standard automation runs.
  • Document the new agent, automation entrypoints, and continual-learning flow across REPO_AUTOMATION_GUIDE.md, scripts/README.md, and AGENTS.md, including correcting the repo_health_automation --run-agents ordering.
  • Describe local automation canvases and continual-learning usage in AGENTS.md to surface automation capabilities to developers.

Tests:

  • Add a dedicated test suite for agents-md-audit to cover valid configurations, failure modes, CLI flags, and JSON output.

…entry points

Wire continual-learning skill and agents-memory-updater subagent, add a
read-only AGENTS.md audit agent, shell/Makefile shortcuts, and docs for
the expanded repository inspection automation stack.

Co-authored-by: Bryan
Copilot AI review requested due to automatic review settings June 21, 2026 01:52

Copilot AI commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

@Bryan-Roe Thanks for sending me some feedback. Unfortunately, I hit an error while trying to use the custom Copilot setup steps configured for this repository. The error I am seeing is:

no `copilot-setup-steps` job found in your `copilot-setup-steps.yml` workflow file. Please ensure you have a single job named `copilot-setup-steps`. For more details, see https://gh.io/copilot/actions-setup-steps

Once you or someone with the necessary access fixes the problem, please let me know in a comment and I'll try again. Thanks!

@sourcery-ai

sourcery-ai Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Implements a new AGENTS.md audit automation agent, wires it into the repo automation stack (CLI, Makefile, shell wrapper, docs), and adds Cursor continual-learning artifacts for maintaining Learned sections.

Flow diagram for running repo agents including agents-md-audit

flowchart TD
    U[Developer]
    U --> MA[make agents]
    U --> MD[make agents-dry]
    U --> SH[./scripts/run_ai_automation.sh]

    MA --> RA[run_repo_agents.py]
    MD --> RA
    SH --> RA

    RA --> REG[Registered agents]
    REG --> A1[status-freshness]
    REG --> A2[marker-audit]
    REG --> A3[docstring-audit]
    REG --> A4[agents-md-audit]

    A4 --> AUD[AgentsMdAuditAgent.run audits AGENTS.md]
    AUD --> OUT[AgentResult with status, findings, metrics]
Loading

File-Level Changes

Change Details Files
Add AGENTS.md audit automation agent with CLI and tests, and register it with the repo agents runner.
  • Introduce AgentsMdAuditAgent to validate Learned sections structure, bullet counts, secret-like patterns, merge conflicts, and stale dates in AGENTS.md.
  • Provide a CLI entrypoint (main, argparse config, JSON output, dry-run support) that writes status.json via the existing AgentResult/AutomationAgent base.
  • Register the new agent module in run_repo_agents.py so it participates in the standard agents run.
  • Add a focused test suite that exercises success, missing file/sections, bullet limits, merge conflicts, secret detection, stale dates, dry-run behavior, and JSON output.
scripts/agents/agents_md_audit_agent.py
scripts/run_repo_agents.py
tests/test_agents_md_audit_agent.py
Expose new repo automation entrypoints via Makefile, shell script, and documentation updates.
  • Add Makefile targets agents, agents-dry, and ai-automation that wrap scripts/run_repo_agents.py with and without --dry-run.
  • Introduce scripts/run_ai_automation.sh as a .venv-based shell wrapper around run_repo_agents.py.
  • Document the new agents-md-audit agent, shell wrapper, and Makefile shortcuts in REPO_AUTOMATION_GUIDE.md, scripts/README.md, and AGENTS.md, including correcting the described integration order of --run-agents.
  • Update AGENTS.md to describe how to run repo agents, the shell wrapper, and the automation canvas for status visualization.
Makefile
scripts/run_ai_automation.sh
docs/guides/REPO_AUTOMATION_GUIDE.md
scripts/README.md
AGENTS.md
Add Cursor continual-learning skill and AGENTS.md memory updater subagent configuration for Learned section maintenance.
  • Define an agents-memory-updater Cursor agent that owns mining transcript deltas, updating AGENTS.md Learned sections (with bullet limits and hygiene), and maintaining an incremental transcript index.
  • Add a continual-learning Cursor skill that simply delegates to the agents-memory-updater subagent, enforcing an orchestration-only pattern.
  • Document continual-learning usage in AGENTS.md, including how to invoke the skill and what files it touches.
.cursor/agents/agents-memory-updater.md
.cursor/skills/continual-learning/SKILL.md
AGENTS.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions github-actions Bot added documentation Improvements or additions to documentation tests scripts labels Jun 21, 2026
@github-actions

Copy link
Copy Markdown

🟡 Coverage — 1b7df20

Metric Value
Total coverage 65.2%
▲ vs main +0.1%
Minimum threshold 60%

Updated on every push · 2026-06-21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the repository's deterministic automation-agent framework (scripts/agents/) with a new read-only agents-md-audit agent that validates the structure and hygiene of AGENTS.md Learned sections (required sections, bullet limits, merge-conflict markers, secret patterns, and stale dates). It also adds developer entry points (make agents/agents-dry/ai-automation, plus a scripts/run_ai_automation.sh wrapper), wires the agent into the shared run_repo_agents.py orchestration, introduces a Cursor-native continual-learning skill + subagent for keeping AGENTS.md in sync, and corrects documentation (notably the --run-agents ordering, which the code runs after the integration contract gate).

Changes:

  • New agents-md-audit automation agent + dedicated test suite, registered in run_repo_agents.py.
  • New shell/Makefile entry points to run inspection agents from a single command.
  • Continual-learning Cursor skill + agents-memory-updater subagent, with synced docs (AGENTS.md, scripts/README.md, REPO_AUTOMATION_GUIDE.md).

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/agents/agents_md_audit_agent.py New audit agent; follows the existing AutomationAgent/CLI conventions for parsing, findings, status, and write_status.
tests/test_agents_md_audit_agent.py New tests covering valid/missing/over-limit/secret/stale/CLI paths; fixture embeds a wall-clock-relative date that will eventually flip the "valid" case to a warning.
scripts/run_repo_agents.py Registers the new agent module so it participates in standard runs.
scripts/run_ai_automation.sh New wrapper that hardcodes .venv/bin/python without the venv-fallback used by sibling scripts.
Makefile Adds agents, agents-dry, ai-automation targets and .PHONY entries (help preserved).
scripts/README.md Documents the new agent, entry points, and corrected --run-agents ordering.
docs/guides/REPO_AUTOMATION_GUIDE.md Documents the new agent and corrected (after-gate) --run-agents ordering, verified against code.
AGENTS.md Adds repo-agent and continual-learning usage notes to test/entry-point sections.
.cursor/skills/continual-learning/SKILL.md Orchestration-only skill delegating to the updater subagent.
.cursor/agents/agents-memory-updater.md Subagent definition for transcript-mining and AGENTS.md memory updates.


## Learned Workspace Facts

- Unit test suite passes 2700 tests (as of 2026-06-20).
Comment on lines +3 to +4
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
exec "${REPO_ROOT}/.venv/bin/python" "${REPO_ROOT}/scripts/run_repo_agents.py" "$@"
@cursor

cursor Bot commented Jun 21, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_6abfa7a0-2ede-4e0a-bdbe-6879a754ee3b)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation scripts tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants