view --main humanize-rlcr-skill-dlya-uluchsheniya-koda.md
humanize-rlcr: Скилл для улучшения кода
readonly
--- lines
---
name: humanize-rlcr
description: Start RLCR (Ralph-Loop with Codex Review) with hook-equivalent enforcement from skill mode by reusing the existing stop-hook logic.
type: flow
user-invocable: false
disable-model-invocation: true
---
# Humanize RLCR Loop (Hook-Equivalent)
Use this flow to run RLCR in environments without native hooks.
Do not re-implement review logic manually. Always call the RLCR stop gate wrapper:
```bash
"{{HUMANIZE_RUNTIME_ROOT}}/scripts/rlcr-stop-gate.sh"
```
The wrapper executes `hooks/loop-codex-stop-hook.sh`, so skill-mode behavior stays aligned with hook-mode behavior.
## Runtime Root
The installer hydrates this skill with an absolute runtime root path:
```bash
{{HUMANIZE_RUNTIME_ROOT}}
```
All commands below assume `{{HUMANIZE_RUNTIME_ROOT}}`.
## Required Sequence
### 1. Setup
Start the loop with the setup script:
```bash
"{{HUMANIZE_RUNTIME_ROOT}}/scripts/setup-rlcr-loop.sh" $ARGUMENTS
```
If setup exits non-zero, stop and report the error.
### 2. Work Round
For each round:
1. Read current loop prompt from `.humanize/rlcr/<timestamp>/round-<N>-prompt.md` (or `finalize` prompt files when in finalize phase).
2. Implement required changes.
3. Commit changes.
4. Write required summary file:
- Normal phase: `.humanize/rlcr/<timestamp>/round-<N>-summary.md`
- Finalize phase: `.humanize/rlcr/<timestamp>/finalize-summary.md`
5. Run gate command:
```bash
GATE_CMD=("{{HUMANIZE_RUNTIME_ROOT}}/scripts/rlcr-stop-gate.sh")
[[ -n "${CLAUDE_SESSION_ID:-}" ]] && GATE_CMD+=(--session-id "$CLAUDE_SESSION_ID")
[[ -n "${CLAUDE_TRANSCRIPT_PATH:-}" ]] && GATE_CMD+=(--transcript-path "$CLAUDE_TRANSCRIPT_PATH")
"${GATE_CMD[@]}"
GATE_EXIT=$?
```
6. Handle gate result:
- `0`: loop is allowed to exit (done).
- `10`: blocked by RLCR logic. Follow returned instructions exactly, continue next round.
- `20`: infrastructure error (wrapper/hook/runtime). Report error, do not fake completion.
## What This Enforces
By routing through the stop-hook logic, this skill enforces:
- state/schema validation (`current_round`, `max_iterations`, `review_started`, `base_branch`, etc.)
- branch consistency checks
- plan-file integrity checks (when applicable)
- incomplete Task/Todo blocking
- git-clean requirement before exit
- `--push-every-round` unpushed-commit blocking
- summary presence checks
- max-iteration handling
- full-alignment rounds (`--full-review-round`)
- strict `COMPLETE`/`STOP` marker handling
- review-phase transition guard (`.review-phase-started` marker)
- code-review gating on `[P0-9]` markers
- hard blocking on codex review failure or empty output
- open-question handling when `ask_codex_question=true`
## Critical Rules
1. Never manually edit `state.md` or `finalize-state.md`.
2. Never skip a blocked gate result by declaring completion manually.
3. Never run ad-hoc `codex exec` / `codex review` in place of the gate for phase transitions.
4. Always use files generated by the loop (`round-*-prompt.md`, `round-*-review-result.md`) as source of truth.
## Options
Pass these through `setup-rlcr-loop.sh`:
| Option | Description | Default |
|--------|-------------|---------|
| `path/to/plan.md` | Plan file path | Required unless `--skip-impl` |
| `--plan-file <path>` | Explicit plan path | - |
| `--track-plan-file` | Enforce tracked plan immutability | false |
| `--max N` | Maximum iterations | 42 |
| `--codex-model MODEL:EFFORT` | Codex model and effort for `codex exec` | gpt-5.4:high |
| `--codex-timeout SECONDS` | Codex timeout | 5400 |
| `--base-branch BRANCH` | Base for review phase | auto-detect |
| `--full-review-round N` | Full alignment interval | 5 |
| `--skip-impl` | Start directly in review path | false |
| `--push-every-round` | Require push each round | false |
| `--claude-answer-codex` | Let Claude answer open questions directly | false |
| `--agent-teams` | Enable agent teams mode | false |
| `--yolo` | Skip quiz and enable --claude-answer-codex | false |
| `--skip-quiz` | Skip Plan Understanding Quiz (implicit in skill mode) | false |
Review phase `codex review` runs with `gpt-5.4:high`.
## Usage
```bash
# Start with plan file
/flow:humanize-rlcr path/to/plan.md
# Review-only mode
/flow:humanize-rlcr --skip-impl
# Load skill without auto-execution
/skill:humanize-rlcr
```
## Cancel
```bash
"{{HUMANIZE_RUNTIME_ROOT}}/scripts/cancel-rlcr-loop.sh"
```
Инициализация мануала...
//
$ ls -R related_skills/
2026-03-29
⭐ 9077
phoenix-cli — Отладка и анализ LLM приложений
2026-04-11
⭐ 4
Corivo: Скилл управления памятью и данными
2026-03-29
⭐ 3556
llm-evaluator — Автоматизированная оценка качества больших языковых моделей
2026-03-29
⭐ 21794
llm-provider-usage-statistics — Анализ и расчет использования токенов LLM
package.json
$ install --global
skills.sh
npx skills add https://github.com/humania-org/humanize/tree/main/skills/humanize-rlcr
$ download --local
man
[HINT] Скачивает всю директорию скилла с GitHub: SKILL.md и все связанные файлы