Skip to content

Add ai/recap and ai/security shortcuts#1570

Merged
maebeale merged 1 commit into
mainfrom
maebeale/ai-recap-security
Jun 6, 2026
Merged

Add ai/recap and ai/security shortcuts#1570
maebeale merged 1 commit into
mainfrom
maebeale/ai-recap-security

Conversation

@maebeale

@maebeale maebeale commented Jun 6, 2026

Copy link
Copy Markdown
Collaborator

What is the goal of this PR and why is this important?

  • Common session tasks lacked a single, discoverable trigger, so agents relied on ad-hoc phrasing.
  • Adds two ai/ entry points (mirroring the existing ai/test, ai/lint, … pattern):
    • ai/recap — prints the recap trigger word; the agent then reviews the conversation and reports Recap (what was accomplished) + Unresolved (dropped threads, open questions, unfinished tasks, disagreements). Explicitly not the /audit design skill.
    • ai/security — runs Brakeman + bundler-audit, mirroring the CI security scan; exits non-zero if either fails.

How did you approach the change?

  • Added the two executable scripts under ai/.
  • Documented both in ai/README.md.
  • Added a "Session recap" section to the AI instruction files — CLAUDE.md and the mirrored .github/copilot-instructions.md (kept in sync per project convention).

Anything else to add?

  • Split out from the event-dashboard work so the tooling lands independently.

Give agents two more `ai/` entry points so common session tasks have a
single, discoverable trigger instead of ad-hoc phrasing:

- `ai/recap` — prints the "recap" trigger word; the agent then reviews the
  conversation and reports accomplishments + unresolved threads (per the new
  "Session recap" section). Explicitly NOT the /audit design skill.
- `ai/security` — runs Brakeman + bundler-audit, mirroring the CI security
  scan, exiting non-zero if either fails.

Documents both in ai/README.md and the AI instruction files (CLAUDE.md and the
mirrored copilot-instructions.md).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 6, 2026 18:01
@maebeale maebeale marked this pull request as ready for review June 6, 2026 18:04

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

Adds two new ai/ convenience entry points to make common agent/session actions more discoverable, and documents their intended behavior in both the ai/ README and the project’s AI instruction files.

Changes:

  • Add ai/recap (prints the “recap” trigger word) and ai/security (runs Brakeman + bundler-audit).
  • Document the new scripts in ai/README.md.
  • Add a “Session recap” section and update the Quick Commands tables in CLAUDE.md and .github/copilot-instructions.md.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
CLAUDE.md Adds “Session recap” instructions and documents ai/recap + ai/security.
ai/security New script to run Brakeman and bundler-audit locally.
ai/recap New script that emits the “recap” trigger word for agent behavior.
ai/README.md Documents the new ai/ commands and clarifies their meaning.
.github/copilot-instructions.md Mirrors the “Session recap” + Quick Commands updates from CLAUDE.md.

Comment thread ai/security
Comment on lines +5 to +17
set -uo pipefail
source "$(dirname "$0")/.ruby-env"

status=0

echo "→ Brakeman — Rails security static analysis"
bin/brakeman --no-pager || status=1

echo
echo "→ bundler-audit — known CVEs in gems"
bin/bundler-audit || status=1

exit $status
Comment thread ai/README.md
| `ai/db-migrate` | Run database migrations |
| `ai/security` | Security scan: Brakeman + bundler-audit (mirrors CI) |

All scripts pass through extra arguments, so `ai/test --fail-fast` works as expected.
Comment thread ai/recap
# unanswered questions, unfinished tasks, and disagreements from either side.
# This script just prints the trigger word; the agent does the work per CLAUDE.md.
# Not the /audit design skill, and not ai/security (the security scan).
echo "recap"
Comment thread CLAUDE.md
| `ai/db-migrate` | Run database migrations |
| `ai/security` | Security scan: Brakeman + bundler-audit (mirrors CI) |

> **"ai <name>" means the `ai/` script of that name** (e.g. "ai test" → `ai/test`, "ai security" → `ai/security`) — shell scripts in `ai/`, not slash-command skills. If a referenced `ai/<name>` script doesn't exist, ask what's intended rather than substituting a similarly named skill. (`ai/recap` is special — it triggers the agent **Session recap** behavior above, not a real script's output; never confuse it with the `/audit` design skill or the `ai/security` scan.)
| `ai/db-migrate` | Run database migrations |
| `ai/security` | Security scan: Brakeman + bundler-audit (mirrors CI) |

> **"ai <name>" means the `ai/` script of that name** (e.g. "ai test" → `ai/test`, "ai security" → `ai/security`) — shell scripts in `ai/`, not slash-command skills. If a referenced `ai/<name>` script doesn't exist, ask what's intended rather than substituting a similarly named skill. (`ai/recap` is special — it triggers the agent **Session recap** behavior above, not a real script's output; never confuse it with the `/audit` design skill or the `ai/security` scan.)
Comment thread ai/README.md

All scripts pass through extra arguments, so `ai/test --fail-fast` works as expected.

Only the commands listed above exist. "ai <name>" refers to one of these `ai/` scripts — not a slash-command skill. Two phrases are special:
@maebeale maebeale merged commit 396b3fc into main Jun 6, 2026
4 checks passed
@maebeale maebeale deleted the maebeale/ai-recap-security branch June 6, 2026 18:14
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.

2 participants