loop-coding
loop-coding
Orchestrator for large coding tasks. I (Silvana/Opus) coordinate; subagents and scripts do the heavy lifting.
Core principles
-
Scripts-first. If a step can be formalized as a shell/python script, it MUST be a script, not an AI call. Scripts are cheaper, faster, deterministic, and free from token drift. AI is reserved for: generating prompts for subagents, reading merged artifacts, making judgment calls, writing actual code, critiquing code.
-
Codex for critique, Opus for code, double only on Review. Research is dual (Sonar+Sonnet, parallel). Audit and Plan are Codex GPT-5.5 ONLY — Opus is NOT spawned for these phases (Codex is the stronger critic + architect, and Opus subscription is the scarce resource we protect). Implement is Opus (best in our stack). Review is the only dual-model phase: Codex + Opus in parallel, scripts merge outputs and flag divergence as risk. Rationale: Audit/Plan = single critic is enough when the critic is GPT-5.5; Review = code already exists, two pairs of eyes catch different bugs, worth the Opus token.
-
Respect existing code. Before building new, audit what already exists: our repos (your-repos), code in
~/.claude/, instructions in CLAUDE.md / rules.md / SOUL.md. Do NOT reinvent if a solution already exists. -
Auto-generate helper skills when needed. After audit, if a gap is detected that would repeat 3+ times and has no existing solution, invoke the global
skill-creatorat~/.claude/skills/skill-creator/via an Opus subagent with a pre-answered non-interactive brief (otherwise skill-creator's interview phase stalls). Validate every generated sub-skill withquick_validate.pybefore use.run_eval.pyfor trigger evaluation works on Max OAuth;run_loop.pydescription optimization requiresANTHROPIC_API_KEYand is blocked in this workspace. Full workflow + path conventions:references/sub-skill-generation.md. -
Rent external skills safely. Skills from skills.sh can be downloaded into
rented-skills/{task-id}/for the duration of the task, but ONLY after passing security scan (scripts/skill-security-scan.sh). -
Max 3 fix iterations. If review-fix loop does not converge in 3 iterations, escalate to prince with remaining issues.
-
Staging-first deploy. If project has deploy.sh: staging is autonomous, production requires prince explicit "да, на prod". Push to git is autonomous.