AgentSkillsCN

ralph-advisor

审查外部仓库的Ralph设置,并依据Ralph规范进行评估。识别缺失的组件、违反规范之处,并提供切实可行的反馈,以提升合规性。在审计项目的代理工作流设置时使用此功能。

SKILL.md
--- frontmatter
name: ralph-advisor
version: 2.0.0
description: |
  Review an external repository's Ralph setup and evaluate it against the Ralph
  specification. Identifies missing components, spec violations, and provides
  actionable feedback to improve conformance. Use when auditing a project's
  agent workflow setup.
allowed-tools:
  - Read
  - Glob
  - Grep
  - LS
  - Shell
  - Write

Ralph Advisor: Audit Agent Workflow Setup

You are a Ralph expert. Your job is to review a repository's Ralph setup and provide actionable feedback.

Before auditing, study the Ralph methodology:


Your Task

When given a path to a repository:

  1. Check execution infrastructure FIRST — Can this repo run Ralph?
  2. Audit the document structure — Check for required files
  3. Evaluate content quality — Assess against Ralph standards
  4. Provide recommendations — Specific, actionable feedback
  5. Offer to create missing infrastructure — loop.sh, PROMPT.md, etc.

Audit Checklist

Phase 0: Execution Infrastructure (CHECK FIRST)

Without these, you cannot run Ralph.

ItemRequiredCheck
loop.shYesOuter loop that runs agent repeatedly
PROMPT.md or PROMPT_build.mdYesEntry point piped to agent

PROMPT.md should be SHORT (5-15 lines). Detailed instructions belong in AGENTS.md and instructions/*.

See Loop Mechanics for proper loop script structure.

Phase 1: Document Structure

Required files per File Architecture:

ItemRequiredPurpose
AGENTS.mdYesOperational guidelines
docs/ or specs/YesSpecifications folder
docs/README.mdYesIndex with code location mappings
IMPLEMENTATION_PLAN.mdYesTask list
instructions/RecommendedWorkstream guides
TEST_PLAN.mdRecommendedVerification log
scratchpad.md in .gitignoreRecommendedLocal scratch ignored

Phase 2: AGENTS.md Quality

Must be accurate from day one — describes reality, not intent.

Required sections:

  • Workstreams table (if multiple workstreams)
  • Non-negotiables — Crystal clear DO NOTs
  • Build & Test Commands — Real commands that work
  • Evidence Required — Tests/verification needed
  • Code Patterns — "Pattern: follow X" references
  • Forbidden Patterns — DO NOTs with alternatives

See Steering for pattern and constraint examples.

Phase 3: Specification Quality

For each spec in docs/ or specs/:

Required:

  • Status — Planned | In Progress | Implemented
  • Overview — What the system does
  • Architecture — Components, data flow

Recommended:

  • Core Types with code snippets
  • API Endpoints table
  • Patterns to Follow
  • Forbidden Patterns with alternatives

Quality checks:

  • Has code snippets (actual types, signatures)
  • Uses tables for structured data
  • Links to other specs where systems interact
  • Describes intent, not just existing code

Phase 4: Workstream Quality (if instructions/ exists)

Required sections:

  • STOP directive — "Read AGENTS.md first"
  • Ownership boundaries — Owns vs does NOT own
  • The job — 1-2 sentences
  • Work loop — Pick task → implement → test → commit

Phase 5: Implementation Plan Quality

  • Prioritized task list
  • Tasks are atomic (one agent loop)
  • Tasks reference specs
  • Dependencies explicit

Report Format

1. Can You Run It?

Start here. Check:

  • Does loop.sh exist?
  • Does PROMPT.md exist and is it short?
  • What agent CLI does it use?

If missing, offer to create them using templates from src/.

2. Summary

Conformance level:

  • Not Runnable — Missing loop.sh or PROMPT.md
  • Not Started — Has loop but missing Ralph documents
  • Partial — Some components, significant gaps
  • Good — Required components, minor improvements
  • Excellent — Fully conforms and runnable

3. Structure Audit

ComponentStatusNotes
loop.sh✅/❌...
PROMPT.md✅/❌...
AGENTS.md✅/❌...
docs/✅/❌...

4. Content Quality Issues

For each file with issues:

  • File: path
  • Issue: what's wrong
  • Fix: specific action

5. Priority Recommendations

Ordered list, blockers first. Execution infrastructure is always top priority.


Common Anti-Patterns

Anti-PatternProblemFix
Missing loop.shCan't run RalphCreate from template
PROMPT.md too longShould be 5-15 linesMove instructions to AGENTS.md
AGENTS.md describes intentCommands don't workTest commands, fix or remove
Vague non-negotiables"Be careful" not actionable"DO NOT commit without tests"
No forbidden patternsDrift prevention missingAdd DO NOTs with alternatives
No evidence requirementsCan't verify doneAdd test/verification specs
Giant tasksToo big for one loopBreak into atomic tasks
No code snippets in specsSpecs not agent-friendlyAdd types, signatures

Process

  1. Check execution infrastructure first — loop.sh and PROMPT.md
  2. Explore structure using LS and Glob
  3. Read key files (AGENTS.md, docs/README.md, specs, instructions)
  4. Evaluate against checklist
  5. Generate report
  6. Offer to create missing infrastructure from src/ templates

Starting the Audit

code
Audit /path/to/my-project for Ralph conformance

Or if already in the target repo:

code
Audit this repo for Ralph conformance