| name | kkachi-greedy-loop |
| description | Use when users want to run Kkachi's one-task-per-iteration greedy loop in Codex or Claude Code, including setup, Top-1 selection, verification, and success/fail marking. |
Kkachi Greedy Loop
Use this skill when the user asks to run or maintain a Kkachi workflow.
Trigger Cases
- "Run Kkachi loop"
- "Pick next task"
- "Show mode and status"
- "Mark this task success/fail"
- "Keep one-task-per-iteration contract"
Standard Workflow (Project Root)
- Initialize files if needed:
bash scripts/init.sh
bash scripts/doctor.sh .kkachi/tasks.json .kkachi/config.json
- Initialize active loop:
bash scripts/setup.sh "<goal prompt>" [--mode ...] [--max-iterations ...]
- Per iteration:
bash scripts/status.sh
TASK_ID=$(bash scripts/next.sh)
- Work on only
TASK_ID
- Verify with relevant tests/build/lint
bash scripts/mark.sh "$TASK_ID" success
- if blocked:
bash scripts/mark.sh "$TASK_ID" fail
- Stop loop when needed:
If Running From OpenCode Runtime
When installed to .opencode/kkachi, run the same scripts from:
.opencode/kkachi/scripts/*.sh
Examples:
bash .opencode/kkachi/scripts/status.sh
TASK_ID=$(bash .opencode/kkachi/scripts/next.sh)
bash .opencode/kkachi/scripts/mark.sh "$TASK_ID" success
Hard Rules
- Exactly one selected task per iteration.
- Always verify before marking success.
- Do not manually edit
.gemini/kkachi/state.json.