Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Um comando direto ignora o prompt de revisão. Verifique a origem antes de executá-lo.
claude -p フラグはプロンプト付きでノンインタラクティブに Claude Code を実行し、完了時に終了します。コールをチェインしてパイプラインを構築します:
#!/bin/bash# daily-dev.sh — フィーチャーブランチ用の Sequential Pipelineset -e
# Step 1: 機能の実装
claude -p "Read the spec in docs/auth-spec.md. Implement OAuth2 login in src/auth/. Write tests first (TDD). Do NOT create any new documentation files."# Step 2: De-sloppify(クリーンアップパス)
claude -p "Review all files changed by the previous commit. Remove any unnecessary type tests, overly defensive checks, or testing of language features (e.g., testing that TypeScript generics work). Keep real business logic tests. Run the test suite after cleanup."# Step 3: 検証
claude -p "Run the full build, lint, type check, and test suite. Fix any failures. Do not add new features."# Step 4: コミット
claude -p "Create a conventional commit for all staged changes. Use 'feat: add OAuth2 login flow' as the message."
主要な設計原則
各ステップは独立 — claude -p コールごとに新しいコンテキストウィンドウが開始されるため、ステップ間でコンテキストの漏洩がありません。
# Opus で調査(深い推論)
claude -p --model opus "Analyze the codebase architecture and write a plan for adding caching..."# Sonnet で実装(高速、高性能)
claude -p "Implement the caching layer according to the plan in docs/caching-plan.md..."# Opus でレビュー(徹底的)
claude -p --model opus "Review all changes for security issues, race conditions, and edge cases..."
環境コンテキスト付き:
# プロンプトの長さではなく、ファイル経由でコンテキストを渡すecho"Focus areas: auth module, API rate limiting" > .claude-context.md
claude -p "Read .claude-context.md for priorities. Work through them in order."rm .claude-context.md
--allowedTools 制限付き:
# 読み取り専用の分析パス
claude -p --allowedTools "Read,Grep,Glob""Audit this codebase for security vulnerabilities..."# 書き込み専用の実装パス
claude -p --allowedTools "Read,Write,Edit,Bash""Implement the fixes from security-audit.md..."
2. NanoClaw REPL
ECC 組み込みの永続ループです。 完全な会話履歴付きで claude -p を同期的に呼び出すセッション対応 REPL です。
Parse the following arguments from $ARGUMENTS:
1. spec_file — path to the specification markdown
2. output_dir — where iterations are saved
3. count — integer 1-N or "infinite"
PHASE 1: Read and deeply understand the specification.
PHASE 2: List output_dir, find highest iteration number. Start at N+1.
PHASE 3: Plan creative directions — each agent gets a DIFFERENT theme/approach.
PHASE 4: Deploy sub-agents in parallel (Task tool). Each receives:
- Full spec text
- Current directory snapshot
- Their assigned iteration number
- Their unique creative direction
PHASE 5 (infinite mode): Loop in waves of 3-5 until context is low.
## Progress- [x] Added tests for auth module (iteration 1)
- [x] Fixed edge case in token refresh (iteration 2)
- [ ] Still need: rate limiting tests, error boundary tests
## Next Steps- Focus on rate limiting module next
- The mock setup in tests/helpers.ts can be reused
Claude はイテレーション開始時にこのファイルを読み取り、イテレーション終了時に更新します。これにより、独立した claude -p 呼び出し間のコンテキストギャップが橋渡しされます。
CI 失敗からの回復
PR チェックが失敗した場合、Continuous Claude は自動的に以下を行います:
gh run list 経由で失敗したラン ID を取得
CI 修正コンテキスト付きで新しい claude -p を起動
Claude が gh run view 経由でログを確認し、コードを修正、コミット、プッシュ
チェックを再待機(最大 --ci-retry-max 回の試行)
Completion Signal
Claude は「完了」をマジックフレーズの出力でシグナルできます:
continuous-claude \
--prompt "Fix all bugs in the issue tracker" \
--completion-signal "CONTINUOUS_CLAUDE_PROJECT_COMPLETE" \
--completion-threshold 3 # 3回連続のシグナル後に停止
# Step 1: 実装(徹底的に)
claude -p "Implement the feature with full TDD. Be thorough with tests."# Step 2: De-sloppify(別のコンテキスト、集中したクリーンアップ)
claude -p "Review all changes in the working tree. Remove:
- Tests that verify language/framework behavior rather than business logic
- Redundant type checks that the type system already enforces
- Over-defensive error handling for impossible states
- Console.log statements
- Commented-out code
Keep all business logic tests. Run the test suite after cleanup to ensure nothing breaks."
ループコンテキストでの使用
for feature in"${features[@]}"; do# 実装
claude -p "Implement $feature with TDD."# De-sloppify
claude -p "Cleanup pass: review changes, remove test/code slop, run tests."# 検証
claude -p "Run build + lint + tests. Fix any failures."# コミット
claude -p "Commit with message: feat: add $feature"done
Unit branch
│
├─ main にリベース
│ └─ コンフリクト?→ 追放(コンフリクトコンテキストをキャプチャ)
│
├─ ビルド+テスト実行
│ └─ 失敗?→ 追放(テスト出力をキャプチャ)
│
└─ パス → main を fast-forward、プッシュ、ブランチ削除
ファイル重複のインテリジェンス:
重複のないユニットは投機的に並列でランディング
重複のあるユニットは1つずつ、毎回リベースしながらランディング
追放からの回復:
追放時、完全なコンテキスト(コンフリクトファイル、diff、テスト出力)がキャプチャされ、次の Ralph パスで実装者にフィードバックされます:
## MERGE CONFLICT — RESOLVE BEFORE NEXT LANDING
あなたの前の実装は、先にランディングした別のユニットとコンフリクトしました。
以下のコンフリクトしているファイル/行を回避するよう、変更を再構築してください。
{full eviction context with diffs}
Ralphinho のティアアプローチをシンプルなループで — sequential pipeline でも、シンプルなタスクを Haiku に、複雑なタスクを Opus にルーティングできます:
# シンプルなフォーマット修正
claude -p --model haiku "Fix the import ordering in src/utils.ts"# 複雑なアーキテクチャ変更
claude -p --model opus "Refactor the auth module to use the strategy pattern"
アンチパターン
よくある間違い
終了条件のない無限ループ — 常に max-runs、max-cost、max-duration、または completion signal を設定してください。
イテレーション間のコンテキスト橋渡しなし — 各 claude -p コールは新規で始まります。SHARED_TASK_NOTES.md やファイルシステムの状態を使ってコンテキストを橋渡ししてください。