スキル一覧に戻る
tianjianjiang

smith-ralph

by tianjianjiang

AGENTS.md as dotfiles: Personal coding standards that follow you everywhere, Mr. Anderson.

0🍴 0📅 2026年1月10日
GitHubで見るManusで実行

SKILL.md


name: smith-ralph description: Ralph Loop integration patterns for iterative AI development. Use when starting Ralph loops, managing iterations, or recovering from context compaction. Covers TDD, debugging, context management, and memory persistence.

Ralph Loop Integration

  • Load if: Starting /ralph-loop, managing iterations, recovering from compaction
  • Prerequisites: @smith-ctx/SKILL.md, @smith-git/SKILL.md, @smith-serena/SKILL.md

CRITICAL: Ralph Fundamentals (Primacy Zone)

Ralph = iterative prompt loop: Same prompt fed repeatedly, Claude sees previous work in files.

Essential patterns:

  1. Clear completion criteria with <promise> tag
  2. --max-iterations as safety limit (always set)
  3. Atomic commits mark iteration boundaries
  4. Serena memory persists state across compaction

Skills Integration

TDD Workflow (smith-tests)

Pattern: test → implement → run pytest → iterate until <promise>TESTS PASS</promise>.

Each test file = iteration boundary. Commit after green.

Debugging Workflow (smith-validation)

Pattern: hypothesis → test → eliminate → iterate until <promise>ROOT CAUSE FOUND</promise>.

  • Strong Inference: Each hypothesis test = one iteration
  • 5 Whys: Each "Why?" deepening = one iteration
  • Delta Debugging: Split → test → recurse

Task Decomposition (smith-dev)

Pattern: Phase milestones = iteration boundaries. Quality gates between.

Phase 1: [milestone] + tests
Phase 2: [milestone] + tests
Output <promise>COMPLETE</promise> after all phases.

Exploration Workflow (smith-guidance)

Ralph = structured exploration: Read files → Form hypothesis → Design test → Execute → Loop.

Context Management

Ralph burns context rapidly. ~1-3.5k tokens per iteration.

Compaction strategy:

  • At 60%: Prepare retention criteria, continue
  • At 70%: /compact, persist Ralph state to Serena memory
  • After compaction: read_memory() to resume

Essential retention:

  • Iteration number
  • Hypotheses tested/remaining
  • Test results summary
  • File:line references

Commit Strategy

Atomic commits mark iteration boundaries.

  1. Complete iteration (test passes or hypothesis proven)
  2. Commit with iteration number: fix(feature): iteration 3 - resolved null check
  3. If regression, use git bisect to find breaking iteration

Memory Persistence

Serena memories persist Ralph state across compaction.

Memory fields: ralph_[task]_state

  • iteration, hypotheses (tested/remaining), test_results, next_action

Sync timing:

  • After each iteration: write_memory()
  • Before/after compaction: write_memory() / read_memory()
  • @smith-tests/SKILL.md - TDD workflow
  • @smith-validation/SKILL.md - Debugging techniques
  • @smith-dev/SKILL.md - Task decomposition
  • @smith-guidance/SKILL.md - Exploration workflow
  • @smith-ctx/SKILL.md - Context management
  • @smith-git/SKILL.md - Commit patterns
  • @smith-serena/SKILL.md - Memory persistence

ACTION (Recency Zone)

Starting Ralph:

/ralph-loop "[task]" --completion-promise "[DONE]" --max-iterations 20

During iterations:

  1. Read files before changes
  2. Form ONE testable hypothesis
  3. Execute and record result
  4. Commit if progress made
  5. write_memory() after each iteration

On compaction:

  1. write_memory() with full state
  2. After /compact: read_memory() to resume

スコア

総合スコア

45/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

0/5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です