{"id":"smart-ralph","name":"smart-ralph","summary":"共通の引数、実行モード、すべてのRalphプラグイン間での共有動作を定義するコアスマートRalphスキル。","body":"# Smart Ralph\n\nCore skill for all Ralph plugins. Defines common arguments, execution modes, and shared behaviors.\n\n## Common Arguments\n\nAll Ralph commands support these standard arguments:\n\n| Argument | Short | Description | Default |\n|----------|-------|-------------|---------|\n| `--quick` | `-q` | Skip interactive phases, auto-generate artifacts, start execution immediately | false |\n| `--commit` | `-c` | Commit and push spec/feature files after generation | true (normal), false (quick) |\n| `--no-commit` | | Explicitly disable committing files | - |\n| `--max-task-iterations` | `-m` | Max retries per failed task before stopping | 5 |\n| `--fresh` | `-f` | Force new spec/feature, overwrite if exists | false |\n\n## Argument Parsing Rules\n\n```text\nPriority Order (highest to lowest):\n1. --no-commit (explicit disable)\n2. --commit (explicit enable)\n3. --quick mode default (false)\n4. Normal mode default (true)\n```\n\n### Parsing Logic\n\n```text\ncommitSpec = true  // default\n\nif \"--no-commit\" in args:\n  commitSpec = false\nelse if \"--commit\" in args:\n  commitSpec = true\nelse if \"--quick\" in args:\n  commitSpec = false  // quick mode defaults to no commit\n// else keep default (true)\n```\n\n## Execution Modes\n\n### Normal Mode (Interactive)\n\n- User reviews artifacts between phases\n- Phase transitions require explicit commands\n- Each phase sets `awaitingApproval: true`\n- Commits spec files by default\n\n### Quick Mode (`--quick`)\n\n- Skips all interactive prompts and interviews\n- Auto-generates all artifacts in sequence\n- Immediately starts execution after generation\n- Does NOT commit by default (use `--commit` to override)\n- Still delegates to subagents (delegation is mandatory)\n\n## State File Structure\n\nAll Ralph plugins use a state file with common fields:\n\n```json\n{\n  \"phase\": \"research|requirements|design|tasks|execution\",\n  \"taskIndex\": 0,\n  \"totalTasks\": 0,\n  \"taskIteration\": 1,\n  \"maxTaskIterations\": 5,\n  \"awaitingApproval\": false\n}\n```\n\nPlugins may extend with additional fields.\n\n## Commit Behavior\n\nWhen `commitSpec` is true:\n\n1. Stage spec/feature files after generation\n2. Commit with message: `chore(<plugin>): commit spec files before implementation`\n3. Push to current branch\n\nWhen `commitSpec` is false:\n\n- Files remain uncommitted\n- User can manually commit later\n\n## Execution Loop (Self-Contained)\n\nThe execution loop is self-contained via the built-in stop-hook. No external plugins are required.\n\n```text\n1. Coordinator outputs task delegation prompt\n2. Stop-hook detects task completion signals\n3. Stop-hook outputs continuation prompt for next task\n4. Loop ends when coordinator outputs ALL_TASKS_COMPLETE\n```\n\n### Coordinator Prompt\n\nThe implement command includes the coordinator prompt inline. The stop-hook (`hooks/scripts/stop-watcher.sh`) reads `.speckit-state.json` to determine continuation behavior.\n\n## Task Completion Protocol\n\n### Executor Signals\n\n| Signal | Meaning |\n|--------|---------|\n| `TASK_COMPLETE` | Task finished successfully |\n| `VERIFICATION_PASS` | Verification task passed |\n| `VERIFICATION_FAIL` | Verification failed, needs retry |\n\n### Coordinator Signals\n\n| Signal | Meaning |\n|--------|---------|\n| `ALL_TASKS_COMPLETE` | All tasks done, end loop |\n\n## Error Handling\n\n### Max Retries\n\nWhen `taskIteration` exceeds `maxTaskIterations`:\n\n1. Output error with task index and attempt count\n2. Include last failure reason\n3. Suggest manual intervention\n4. Do NOT output ALL_TASKS_COMPLETE\n5. Do NOT continue execution\n\n### State Corruption\n\nIf state file missing or invalid:\n\n1. Output error with state file path\n2. Suggest re-running the implement command\n3. Do NOT continue execution\n\n## Branch Management\n\nAll Ralph plugins follow consistent branch strategy:\n\n1. Check current branch before starting\n2. If on default branch (main/master): prompt for branch strategy\n3. If on feature branch: offer to continue or create new\n4. Quick mode: auto-create branch, no prompts","author":"@tzachbon","ownerProfile":null,"authorContacts":null,"sourceUrl":"https://github.com/tzachbon/smart-ralph/tree/main/plugins/ralph-speckit/skills/smart-ralph","license":"MIT","category":"productivity","lang":"en","tokens":909,"stars":0,"calls30d":2,"claimed":false,"visibility":"public","origin":"crawler","version":"0.1.0","createdAt":"2026-08-22","updatedAt":"2026-08-22","files":[],"requires":{"mcp":[],"tools":[]},"safety":{"flags":[],"scannedAt":"2026-08-22","hasScripts":false,"networkEndpoints":[]}}