Skip to content
Back to skills

182 Fn 22 53k6 B797f472

ASecurity

Update hook enforcement for completion review receipts.

  • 9 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 31, 2026
testingpython

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned May 31, 2026

npx -y skills add tools-only/X-Skills --skill 182-fn-22-53k6_b797f472 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 182 Fn 22 53k6 B797f472?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 182 Fn 22 53k6 B797f472
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-182-fn-22-53k6-b797f472/badge)](https://www.skillsdirectory.com/skills/tools-only-182-fn-22-53k6-b797f472)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# fn-22-53k.6 ralph-guard: completion_review receipt handling

## Description

Update hook enforcement for completion review receipts.

**Changes to `ralph-guard.py`:**

1. **Update `parse_receipt_path()` (~line 258)**:
   - Handle `completion-fn-N.json` pattern (like `plan-fn-N.json`)
   - Extract epic ID from filename

2. **Track completion review calls** in PostToolUse (~line 278):
   - Track `flowctl codex completion-review` calls
   - Track verdict from response

3. **Receipt validation:**
   - Accept `type: "completion_review"` receipts
   - Validate verdict field exists

4. **Stop-hook routing** in `handle_stop()` (~line 312):
   - When receipt path matches `completion-*.json`, route to `/flow-next:epic-review`
   - Pattern: `if "completion-" in receipt_path: recommend "/flow-next:epic-review <epic_id>"`
   - Same pattern as plan-review routing to `/flow-next:plan-review`

**NOTE:** Epic close gating is enforced in `ralph.sh`, not ralph-guard. The guard hook handles:
- Interactive/manual `flowctl epic close` calls (when outside Ralph loop)
- Receipt file validation
- Tracking codex completion-review calls

**Gap task creation (removed from this task):**
Primary behavior is fix-inline during skill execution. Gap task creation is handled by skill if needed (calls `flowctl task create` directly). No new flowctl command needed.

**Pattern reference:** ralph-guard.py:258-276 for `parse_receipt_path()`, 307-319 for codex tracking

## Acceptance

- [ ] `parse_receipt_path()` handles `completion-fn-N.json` pattern
- [ ] ralph-guard tracks `flowctl codex completion-review` calls
- [ ] Receipt with `type: "completion_review"` accepted and validated
- [ ] Stop-hook routes `completion-*.json` receipts to `/flow-next:epic-review`

## Done summary
Updated ralph-guard.py to support completion_review receipts: parse_receipt_path() handles completion-fn-N.json pattern, PostToolUse tracks codex completion-review calls, handle_stop() routes to /flow-next:epic-review, and receipt validation enforces verdict field for completion receipts.
## Evidence
- Commits: 4801673a142970c0f902978b05d4db4685507c1d
- Tests: python3 -m py_compile ralph-guard.py, smoke_test.sh (45/45 passed)
- PRs:

Files in this skill

  • README.md841 B
  • skill.md2.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.