| name | goal-research-loop |
| description | Use this skill when the user explicitly wants a goal-directed research loop that keeps proposing, testing, logging, and refining ideas toward a stated objective across repeated iterations or autonomous runs. Do not use it for one-shot summaries or when no evaluation signal can be defined. |
Goal Research Loop
ํน์ ๋ชฉ์ ์ด ์ฃผ์ด์ก์ ๋ ๋ฐ๋ณต ์คํยท๊ฒ์ฆยท๊ธฐ๋ก์ ํตํด ๊ณ์ ๊ฐ์ ํ๋ ์ฐ๊ตฌ ๋ฃจํ๋ฅผ ์ค๊ณํ๊ณ ์ด์ํฉ๋๋ค.
When it fits
- ์ฌ์ฉ์๊ฐ ๋ช
์์ ์ผ๋ก ์ง์ ์ฐ๊ตฌ, ๋ฐ๋ณต ๊ฐ์ , autonomous/overnight experimentation์ ์ํ ๋
- objective๋ฅผ ํ ๋ฌธ์ฅ์ผ๋ก ์์ถํ ์ ์๊ณ , baseline ๋๋น ๊ฐ์ ์ ๋น๊ตํ ์ ์์ ๋
- ํ ๋ผ์ด๋๋ง๋ค ๊ฐ์ค 1๊ฐ + ๋ณ๊ฒฝ 1๋ฉ์ด๋ฆฌ + ํ๊ฐ 1ํ๋ก ๋ซ์ ์ ์์ ๋
Do not use when
- ํ ๋ฒ์ ์์ฝ/์ ๋ฆฌ๋ฉด ์ถฉ๋ถํ ์์
- ์ง์ ๋ชฉ์ ์ โํ
์คํธ/๋น๋๊ฐ ํต๊ณผํ ๋๊น์ง ๋ฐ๋ณต ์คํโ์ธ ์์
โ
ralph-loop
- ์ง์ ๋ชฉ์ ์ ์ธ๋ถ GPT/deep research์ ๋๊ธธ ๋ฆฌ์์น ํ๋กฌํํธ ์์ฑ์ธ ์์
โ
gpt-research
- hard gate๋ proxy metric์ ๋๋ด ์ ์ํ ์ ์๋ ์์
Important
- ์ด ์คํฌ์ explicit-only์
๋๋ค.
- ์์ ์ ์ ๋ฐ๋์ objective, mutable surface, evaluation contract, budget, stop condition์ ๋จผ์ ์ ํฉ๋๋ค.
- ์ธก์ ๊ฐ๋ฅํ ์ ํธ๊ฐ ์์ผ๋ฉด ๋ฐ๋ก ๋ฃจํ๋ฅผ ๋๋ฆฌ์ง ๋ง๊ณ , hard gate + proxy metric์ ๋จผ์ ์ ์ํ๊ฑฐ๋ ๋ฒ์๋ฅผ ๋ค์ ์ก์ต๋๋ค.
mode์ execution substrate๋ฅผ ๊ฐ์ ์ถ์ผ๋ก ์ทจ๊ธํ์ง ์์ต๋๋ค. mode๋ design / guided-loop / autonomous-loop, execution substrate๋ agent-first / script-first์
๋๋ค.
- ์ฌ์ฉ์๊ฐ ์ค์ ๋ก ๋ฐ๋ณต ์คํ ๊ฐ๋ฅํ Codex ์ฐ๊ตฌ ๋ฃจํ๋ฅผ ์ํ๋ฉด ad-hoc ์๋ ์ด์๋ณด๋ค
scripts/goal-research-loop.sh ๋๋ scripts/codex_goal_research_loop.py๋ฅผ ์ฐ์ ์ฌ์ฉํฉ๋๋ค.
- ์คํฌ๋ฆฝํธ ๊ฒฝ๋ก๋ฅผ ์ ์ํ ๋๋ ์ ์ญ ์ค์น ๊ธฐ์ค์ผ๋ก
~/.codex/skills/goal-research-loop/scripts/... ๊ฒฝ๋ก๋ฅผ ์ฐ์ ์๋ดํฉ๋๋ค.
- ๋ช
์ ์์ฒญ์ด ์์ผ๋ฉด ๊ธฐ๋ณธ์ bounded loop (์: 3~5ํ) ์
๋๋ค. ๋ฌด๊ธฐํ ๋ฃจํ๋ explicit-only์
๋๋ค.
autonomous-loop๋ ์ฌ์ฉ์ opt-in, bounded surface, ๋ช
ํํ stop rule์ด ๋ชจ๋ ์์ ๋๋ง ์ฌ์ฉํฉ๋๋ค.
- ๊ธฐ๋ณธ ๋งคํ์
design โ agent-first, autonomous-loop โ script-first, guided-loop โ contract ์์ฑ๋์ ๋ฐ๋ณต ์คํ ํ์์ฑ์ ๋ฐ๋ผ ์ ํ์
๋๋ค.
- ๊ฐ์ ์คํจ ํจํด์ด 2ํ ์ด์ ๋ฐ๋ณต๋๋ฉด
refine ๋์ pivot, rescope, escalate๋ฅผ ์ฐ์ ๊ฒํ ํฉ๋๋ค.
- ๋ฐ๋ณต ์ธ์
์ด๋
autonomous-loop์์๋ baseline / best-known state / active hypothesis / next candidates๋ฅผ ๋ด์ state snapshot์ ์ ์งํฉ๋๋ค.
- hard gate ๊ฒฐ๊ณผ, ์คํ ๊ฒฐ๊ณผ ์ํ, ๋ฃจํ ์ ์ด ์ํ๋ฅผ ํ ์นธ์ ์์ด ์ฐ์ง ์์ต๋๋ค.
Modes
design โ ๋ฃจํ ๊ณ์ฝ๊ณผ ํ๊ฐ์์ ์ค๊ณ๋ง ํ๋ค
guided-loop โ ๊ฐ ๋ผ์ด๋ ๊ฒฐ๊ณผ๋ฅผ ๊ณต์ ํ๋ฉฐ ์ฐ๊ตฌ๋ฅผ ์งํํ๋ค
autonomous-loop โ ์ค๊ฐ ํ์ธ ์์ด ์ ํด์ง stop condition๊น์ง ๊ณ์ ์งํํ๋ค
- ์ ํ ๊ธฐ์ค์
references/fit-and-mode-routing.md๋ฅผ ๋จผ์ ๋ด
๋๋ค.
Use references
references/fit-and-mode-routing.md
references/agent-vs-script-routing.md
references/loop-contract.md
references/decision-layers-and-status-mapping.md
references/iteration-heuristics.md
references/proxy-metric-patterns.md
references/result-ledger-template.md
references/state-snapshot-and-handoff.md
references/worked-example-skill-improvement.md
references/codex-cli-runner.md
scripts/codex_goal_research_loop.py
scripts/goal-research-loop.sh
templates/program.md
templates/contract.md
templates/state_snapshot.md
templates/ledger.tsv
schemas/round-result.schema.json
Quick start
fit-and-mode-routing.md์ agent-vs-script-routing.md๋ก ์ด ์คํฌ์ด ๋ง๋์ง, mode, execution substrate๋ฅผ ๋จผ์ ๊ณ ๋ฆ
๋๋ค.
loop-contract.md ํ
ํ๋ฆฟ์ผ๋ก ๊ณ์ฝ์ ์ฐ๊ณ baseline์ ํ๋ณดํฉ๋๋ค.
decision-layers-and-status-mapping.md๋ก gate / experiment status / control action ์ธต์๋ฅผ ๋จผ์ ๋ง์ถฅ๋๋ค.
- metric์ด ์ ๋์ด ์๋๋ฉด
proxy-metric-patterns.md๋ก rubric์ ๋จผ์ ๊ณ ๋ฆ
๋๋ค.
- ๋ฐ๋ณต ์ธ์
์ด๋ฉด
state-snapshot-and-handoff.md ํ
ํ๋ฆฟ์ผ๋ก best-known state์ ๋ค์ ํ๋ณด๋ฅผ ๋จผ์ ์ก์ต๋๋ค.
- ์ฒ์ ์ด์ํ๋ฉด
worked-example-skill-improvement.md๋ก contract โ ledger โ snapshot ์ฐ๊ฒฐ ์์๋ฅผ ํ๋ฒ ๋ด
๋๋ค.
- ํ ๋ผ์ด๋์ ๊ฐ์ค ํ๋๋ง ์คํํ๊ณ
result-ledger-template.md ํ์์ผ๋ก ๊ธฐ๋กํฉ๋๋ค.
- ๊ฐ ๋ผ์ด๋๋ hard gate ๊ฒฐ๊ณผ + experiment status + control action์ผ๋ก ๋ซ์ต๋๋ค.
Codex CLI runner quick start
karpathy/autoresearch์ program.md + results.tsv + keep/discard loop ํจํด์
goal-research-loop ๊ท์น์ ๋ง๊ฒ ์ฎ๊ธด host-managed runner๊ฐ ํฌํจ๋์ด ์์ต๋๋ค.
~/.codex/skills/goal-research-loop/scripts/goal-research-loop.sh init /path/to/workspace "ํ ๋ฌธ์ฅ objective"
~/.codex/skills/goal-research-loop/scripts/goal-research-loop.sh run /path/to/workspace --max-rounds 3 --search --full-auto
python3 ~/.codex/skills/goal-research-loop/scripts/codex_goal_research_loop.py \
init \
--workspace /path/to/workspace \
--objective "ํ ๋ฌธ์ฅ objective"
python3 ~/.codex/skills/goal-research-loop/scripts/codex_goal_research_loop.py \
reconcile \
--workspace /path/to/workspace
~/.codex/skills/goal-research-loop/scripts/goal-research-loop.sh \
resume \
/path/to/workspace \
--max-rounds 3 \
--search \
--full-auto
python3 ~/.codex/skills/goal-research-loop/scripts/codex_goal_research_loop.py \
run \
--workspace /path/to/workspace \
--max-rounds 3 \
--search \
--full-auto
์ธ๋ถ ๋์์ references/codex-cli-runner.md๋ฅผ ์ฐธ๊ณ ํ์ธ์.
Agent-first vs script-first routing
์ด ์คํฌ์ mode์ ๋ณ๋๋ก execution substrate๋ฅผ ๊ณ ๋ฆ
๋๋ค.
๊ธฐ๋ณธ๊ฐ:
design โ agent-first
guided-loop โ ๋ ๋ค ๊ฐ๋ฅ. contract ์์ฑ๋์ ๋ฐ๋ณต ์คํ ํ์์ฑ์ผ๋ก ๊ณ ๋ฆ
๋๋ค.
autonomous-loop โ script-first
์๋๋ฉด agent-first๋ก ์์ํฉ๋๋ค.
- contract๊ฐ ๋น์ด ์๊ฑฐ๋ hard gate / metric / budget / stop rule์ด ๋ชจํธํ ๋
- objective๋ฅผ ๋ ์์ถํ๊ฑฐ๋ mutable surface๋ฅผ ๋ค์ ์๋ผ์ผ ํ ๋
- ์ ์ฑ
ํ๋จ, ์ฌ์ฉ์ ์๋ ํด์, ์ค๋ช
๊ฐ๋ฅํ ์ค๊ณ๊ฐ ์คํ๋ณด๋ค ๋ ์ค์ํ ๋
- ์ด๋ฒ ์์
์ ํต์ฌ์ด โ์คํ ์คํโ๋ณด๋ค โ๋ฃจํ ๊ณ์ฝ๊ณผ ๋ผ์ฐํ
๊ธฐ์ค ์ค๊ณโ์ผ ๋
์๋๋ฉด script-first๋ก ์ด์ํฉ๋๋ค.
- ์ฌ์ฉ์๊ฐ โ๊ณ์ ๋๋ คโ, โ๋ฐ๋ณต ์ฐ๊ตฌโ, โovernightโ, โ์๋์ผ๋ก ์ด์ด์โ์ฒ๋ผ ๋ฐ๋ณต ์คํ ์์ฒด๋ฅผ ์ํ ๋
- ๊ฐ์ objective๋ก ์ฌ๋ฌ ์ธ์
์ ๊ฑธ์ณ
program / contract / snapshot / ledger๋ฅผ ์ ์งํด์ผ ํ ๋
- contract๊ฐ ์ด๋ฏธ ์ฑ์ ๊ฐ๋ฅํ๊ณ , mutable surface / budget / stop rule์ด ์ถฉ๋ถํ ์ข๊ณ ๋ช
ํํ ๋
- ์ฌ๋์ด ์ง์ ๋งค ๋ผ์ด๋ ํ๋กฌํํธ๋ฅผ ๋ค์ ์กฐ๋ฆฝํ๋ ๊ฒ๋ณด๋ค, ์ฌํ ๊ฐ๋ฅํ host-managed loop๊ฐ ๋ ์ ํฉํ ๋
๊ถ์ฅ ์ฐ์ ์์:
- contract๊ฐ ๋น์ด ์๊ฑฐ๋ scope๊ฐ ํ๋ค๋ฆฌ๋ฉด โ agent-first๋ก
design ๋๋ bounded guided-loop
- ๋ฐ๋ณต ๊ฐ๋ฅํ ์คํ ๊ณ์ฝ์ด ์ค๋น๋๋ฉด โ
goal-research-loop.sh init
- ํ์ฌ ์ํ ํ์ธ โ
goal-research-loop.sh status
- bounded ์ฐ๊ตฌ ์คํ โ
goal-research-loop.sh run --max-rounds N
- ์ฌ์ฉ์๊ฐ ๋ช
์์ ์ผ๋ก ์ํ ๋๋ง โ
codex_goal_research_loop.py run --loop-forever
๋ฐ๋๋ก ์๋๋ ์๋ ์ค๊ณ๋ง ๋จผ์ ํด๋ ๋ฉ๋๋ค.
- ์์ง contract๊ฐ ๋น์ด ์์ด
design๋ถํฐ ํด์ผ ํ ๋
- hard gate / metric / budget์ด ์ ์๋์ง ์์ ์คํฌ๋ฆฝํธ ์คํ์ด ์ด๋ฅธ ๋
- ๋จ์ one-shot ์ ์์ด๋ contract ์ด์๋ง ํ์ํ ๋
Workflow
- Frame the objective
- ์ฌ์ฉ์์ ๋ชฉ์ ์ ํ ๋ฌธ์ฅ ๋ชฉํ์ 1~3๊ฐ์ ์ฑ๊ณต ๊ธฐ์ค์ผ๋ก ์์ถํฉ๋๋ค.
- ์ฐ๊ตฌ ๋์, ๋ณ๊ฒฝ ๊ฐ๋ฅ ๋ฒ์, ๋ณ๊ฒฝ ๊ธ์ง ๋ฒ์๋ฅผ ๋ถ๋ฆฌํฉ๋๋ค.
- Choose the operating mode and execution substrate
mode: design / guided-loop / autonomous-loop
execution substrate: agent-first / script-first
- ์ฌ์ฉ์ ์์ฒญ์ด ์์ผ๋ฉด ๋ณด์์ ์ผ๋ก
design + agent-first ๋๋ guided-loop + agent-first์์ ์์ํ๊ณ , contract๊ฐ ์คํ ๊ฐ๋ฅํด์ง ๋ค script-first๋ก ๋๊ธธ์ง ํ๋จํฉ๋๋ค.
- Write the contract
loop-contract.md ํ
ํ๋ฆฟ์ผ๋ก hard gates, primary metric, tie-breaker, budget, stop condition, execution substrate๋ฅผ ๋ช
์ํฉ๋๋ค.
- ๊ฐ๋ฅํ๋ฉด baseline์ ๋จผ์ ํ๋ณดํฉ๋๋ค.
- ๋ฐ๋ณต ์ธ์
์ด๋ฉด state snapshot๊ณผ ledger ์์น๋ ๊ฐ์ด ์ ํฉ๋๋ค.
- ์คํ ๊ฐ๋ฅํ ๋ฐ๋ณต ๋ฃจํ๊ฐ ๋ชฉ์ ์ด๊ณ contract๊ฐ ์ด๋ฏธ ์ถฉ๋ถํ ์ข์ผ๋ฉด, ์ด ๋จ๊ณ์์
goal-research-loop.sh init์ผ๋ก ํ
ํ๋ฆฟ ํ์ผ์ ๋จผ์ ์์ฑํ๋ ํธ์ ์ฐ์ ๊ฒํ ํฉ๋๋ค.
- Run one hypothesis at a time
- ํ ๋ผ์ด๋์๋ ๊ฐ์ค ํ๋๋ง ๊ฒ์ฆํฉ๋๋ค.
- ๋ณ๊ฒฝ โ ์คํ/์กฐ์ฌ โ ํ๊ฐ โ ๊ธฐ๋ก โ keep/revert๋ฅผ ํ ๋ฉ์ด๋ฆฌ๋ก ๋๋
๋๋ค.
- agent-first ์ํฉ์ด๋ฉด ํ์ฌ ์ธ์
์์ ๋ช
์์ ์ผ๋ก ๊ฐ์คยท๊ทผ๊ฑฐยทํ์ ์ ๊ณต์ ํ๋ฉฐ ์งํํฉ๋๋ค.
- script-first ์ํฉ์ด๋ฉด ์๋ ์ด์๋ณด๋ค
goal-research-loop.sh run์ผ๋ก round artifacts๋ฅผ ๋จ๊ธฐ๋ฉฐ ์งํํ๋ ํธ์ ์ฐ์ ํฉ๋๋ค.
- Decide with evidence
- hard gate ์คํจ๋ฉด metric ๊ฐ์ ์ด ์์ด๋ ๊ธฐ๋ณธ์ ์ผ๋ก rejectํฉ๋๋ค.
- ๊ฐ์ ํญ์ด ์๋ค๋ฉด ๋ณต์ก๋ ์ฆ๊ฐ ๋น์ฉ๊ณผ ํจ๊ป ํ๋จํฉ๋๋ค.
- 2ํ ์ด์ ๊ฐ์ ์คํจ๊ฐ ๋ฐ๋ณต๋๋ฉด
refine ๋์ pivot, rescope, escalate๋ฅผ ์ฐ์ ๊ฒํ ํฉ๋๋ค.
- Maintain a ledger
- ๊ฐ ์คํ์
result-ledger-template.md ํ์์ผ๋ก ๋จ๊น๋๋ค.
- hard gate๋
pass/fail, experiment status๋ keep/discard/crash, control action์ pass/refine/pivot/rescope/escalate/stop์ผ๋ก ๋ถ๋ฆฌํฉ๋๋ค.
- Stop cleanly
- ๋ชฉํ ๋ฌ์ฑ, ์์ฐ ์์ง, ๋ฐ๋ณต ์ ์ฒด, ์ฌ์ฉ์ ์ค๋จ, ๋ฆฌ์คํฌ ์ฆ๊ฐ ์ค ํ๋๊ฐ ๋ฐ์ํ๋ฉด ์ข
๋ฃํฉ๋๋ค.
- ๋ง์ง๋ง์๋ ํ์ฌ best state, ๋จ์ ๋ฆฌ์คํฌ, ๋ค์ ์คํ ํ๋ณด๋ฅผ ์์ฝํฉ๋๋ค.
Decision rules
- hard gates > primary metric > secondary metrics > simplicity
- ๊ฐ๋ฅํ ํ ์์ ๋ณ๊ฒฝ + ์งง์ ํผ๋๋ฐฑ ๋ฃจํ๋ฅผ ์ฐ์ ํฉ๋๋ค.
- write task์์๋ ๋๋๋ฆด ์ ์๋ ๋จ์๋ก commit ๋๋ diff๋ฅผ ๋๋๋๋ค.
- research-only task์์๋ ๊ฒฐ๊ณผ๋ฌผ์ ํ, ๋ก๊ทธ, ๋น๊ตํ์ฒ๋ผ ๋์ ๊ฐ๋ฅํ๊ฒ ๋จ๊น๋๋ค.
Operating artifacts
- Research contract โ objective, metric, mutable surface, budget, stop rule
- Result ledger โ ๊ฐ ๋ผ์ด๋์ hypothesis / evidence / hard gate / experiment status / control action
- State snapshot โ baseline, current best state, active hypothesis, open risks, next candidates, most recent control action
- Evidence bundle โ ์คํ ๋ก๊ทธ, ์กฐ์ฌ ๋งํฌ, ๋น๊ตํ, diff ๋ฑ evaluator๊ฐ ๋ค์ ์ฝ์ ์ ์๋ ๊ทผ๊ฑฐ
์ฅ๊ธฐ ๋ฃจํ์ผ์๋ก โ๋ฌด์์ ํ๋๊ฐโ๋ณด๋ค ๋ค์ ์ธ์
์ด ๋ฐ๋ก ์ด์ด๋ฐ์ ์ ์๋ ์ํ ํํ์ด ๋ ์ค์ํฉ๋๋ค.
Review Harness
- mode: required
- ๊ณตํต ๊ธฐ์ค:
../../../docs/review-harness.md
- planner: objective, metric, mutable surface, budget, stop rule๊ณผ decision layer ๊ตฌ๋ถ์ ๊ณ์ฝ์ผ๋ก ๋จผ์ ์ ํ๋ค
- generator: ๊ฐ์ค์ ํ๋์ฉ ์คํํ๊ณ ๊ฒฐ๊ณผ๋ฅผ ledger์ ๊ธฐ๋กํ๋ฉฐ experiment status์ control action์ ๋ถ๋ฆฌํ๋ค
- evaluator: contract ๋๋น hard gate, metric, evidence ํ์ง, ๋ฐ๋ณต discipline, decision layer ์ผ๊ด์ฑ, ์ํ ์ฐ์์ฑ์ ๋
๋ฆฝ์ ์ผ๋ก ์ ๊ฒํ๋ค
- ํ๊ฐ์ถ: ๋ชฉํ ๋ช
ํ์ฑ, ํ๊ฐ ๊ฐ๋ฅ์ฑ, evidence ํ์ง, keep/revert ์ ๋น์ฑ, ๋ฐ๋ณต ์ ๋ต์ ๊ฑด์ ์ฑ, decision layer ์ผ๊ด์ฑ, ์ธ์
๊ฐ ์ํ ์ฐ์์ฑ
- artifacts/evidence: loop contract, baseline, experiment ledger, state snapshot, ์คํ ๋ก๊ทธ ๋๋ ์กฐ์ฌ ๊ทผ๊ฑฐ, ์ต์ข
delta summary
- pass condition: ๋ชฉํ๋ฅผ ์ค์ ๋ก ์ ์ง์์ผฐ๊ฑฐ๋, ์ ์ค๋จํ๋์ง evidence ๊ธฐ๋ฐ์ผ๋ก ์ค๋ช
๊ฐ๋ฅํ ์ํ์ฌ์ผ ํ๋ค
- ์๋ ๋ค์ ํ๋:
pass๋ฉด best state ์์ฝ ํ ์ข
๋ฃ, refine์ด๋ฉด ๊ฐ์ ๊ณ์ฝ์ผ๋ก ๋ค์ ๊ฐ์ค ์คํ, pivot์ด๋ฉด ์ ๊ทผ ์ ๋ต ๋ณ๊ฒฝ, rescope๋ฉด ๊ณ์ฝ ์ฌ์์ฑ, escalate๋ฉด ์ฌ๋ ๋๋ ๋ณ๋ evaluator๋ก ๋๊ธฐ๊ณ block ์ด์ ๋ฅผ ๋จ๊ธด๋ค, stop์ด๋ฉด ๋จ์ ๋ฆฌ์คํฌ์ ๋ค์ ํ๋ณด๋ง ๋จ๊ธฐ๊ณ ์ข
๋ฃํ๋ค
Output expectation
- ์ ํํ mode
- ์ ํํ execution substrate (
agent-first | script-first) ์ ๊ทธ ์ด์
- script-first๋ผ๋ฉด ์ฌ์ฉํ ๋ช
๋ น
- objective์ evaluation contract
- ํ์ฌ baseline / best-known state
- ์ต๊ทผ ๋ผ์ด๋์ hard gate ๊ฒฐ๊ณผ / experiment status / control action
- state snapshot ๋๋ handoff ๋ฉ๋ชจ
- ๋ค์ ์คํ ๋๋ ์ข
๋ฃ ์ฌ์
- ํ์ ์ ledger ๋ฐ์ท์ ํต์ฌ evidence