Yonsei MLAI Workshop
Team Attention
Clarify · Codex Goal · LazyCodex

Codex
Workshop

연구 아이디어를 명확한 실험으로 좁히고, 목표를 evidence loop로 끝까지 밀어붙이는 3-part 실습.

Part 1 clarify · Part 2 codex goal · Part 3 lazycodex ulw
Workshop flow
3 parts
오늘의 구조

모호한 연구 질문을 실행 가능한 goal로 바꾼다.

Part 1

Clarify

열린 질문 대신 가설형 선택지로 연구 요청을 좁힌다.

Part 2

Codex Goal

기존 Codex Goals 덱을 그대로 사용해 목표/검증/중단 조건을 익힌다.

Part 3

LazyCodex

npx lazycodex-ai installulw로 실행 루프를 건다.

Audience

Transformer, hallucination detection, Diffusion Language Models 연구자.

Surface

웹 검색, 논문 재현, 수식→모델, 성능 개선 루프.

Output

명확한 prompt, goal contract, 다음 실험, 검증 evidence.

Part 1
Clarify
핵심 원칙

질문하지 말고
가설을 제시한다.

Why
Research setup

“좋은 연구 주제 찾아줘”는 너무 넓다. Clarify는 범위, metric, constraint, first experiment를 먼저 고정한다.

좋은 형태

Transformer long-context stability / 공식 코드 최소 재현 / 수식 invariant test / ablation metric delta

Original → Type → Field → Goal → Evidence → First experiment

Clarify examples
MLAI
학생들이 바로 쓸 예시

연구 요청을 4가지 실행 표면으로 좁힌다.

Research topic

최근 논문 5개 → novelty/risk/reproducibility debate → 2주 실험 2개.

Reproduction

paper URL → official code → smoke test → paper table과 metric gap.

Equation to model

수식 역할 → PyTorch module → invariant test → toy task baseline.

Performance loop

logs/eval command → failure hypotheses → cheapest ablation first.

Fields

Transformer architecture, hallucination detection, Diffusion Language Models.

Output

바로 실행 가능한 Codex/Claude prompt와 검증 기준.

Part 2
Copied source deck
/Users/bong/Downloads/codex_goals_deck

Codex
Goals

다음 8장은 기존 Codex Goals 덱을 복사해 온 섹션이다. 목표는 “더 긴 프롬프트”가 아니라 검증 가능한 completion contract다.

Original copy retained at ./codex_goals_deck/
OpenAI Cookbook / Codex Goals
01 / 08
English briefing deck

Codex
Goals

Persistent objectives that turn uncertain multi-step work into a verified continuation loop.

Source: developers.openai.com/cookbook/examples/codex/using_goals_in_codex
Core idea
02 / 08
Thesis

Not a bigger prompt.
A persistent objective.

What changes
Completion contract

A Goal keeps the target visible across turns: what should be true, how success will be checked, and which constraints must stay intact.

Bounded autonomy

The user defines the outcome. Codex follows evidence inside that scope, then completes, pauses, clears, or stops at a blocker or budget limit.

Prompt: ask → work → result → wait
Goal: work → check → continue or complete

Model shift
03 / 08
Diagram comparing one-off prompts with active Goals
From prompts to outcomes

Prompts stop. Goals check.

Finish line

The objective persists until the evidence says complete or blocked.

Verification

Tests, benchmarks, logs, artifacts, or source material become the audit surface.

Constraints

Correctness, APIs, files, tools, and budget remain explicit.

How to write one
04 / 08
Six-part contract

A strong Goal defines what “done” means.

01 Outcome

What should be true when the work is finished.

02 Verification

The test, benchmark, report, artifact, or command output that proves it.

03 Constraints

What must not regress while Codex works.

04 Boundaries

Allowed files, tools, data, repositories, and resources.

05 Iteration policy

How Codex chooses the next best action after each attempt.

06 Blocked stop

When to stop and report attempted paths, evidence, blocker, and needed input.

Quickstart
05 / 08
Lifecycle in practice

Start, steer, verify, then stop honestly.

Install

npm install -g @openai/codex@latest

Set

/goal Reduce p95 latency below 120 ms…

Work

Codex inspects code, runs commands, and changes the smallest useful thing.

Check

Benchmarks and tests decide whether the target is met.

Continue

If the evidence is not enough, Codex chooses the next action.

Control

/goal pause · resume · clear

Goals are available starting in Codex 0.128.0, per the source article.
Architecture
06 / 08
Thread-scoped, bounded, auditable

Goals persist inside the current thread, not everywhere.

Thread state

The objective belongs to the thread where files, logs, diffs, and reasoning already live.

Goal thread architecture diagram
Continuation gates

Codex continues only when the thread is idle, active, within budget, and no user input is queued.

Goal lifecycle and continuation gates
Evidence audit

Completion requires concrete files, tests, logs, benchmarks, artifacts, or research evidence.

Safety boundary

Budget limits and lifecycle controls prevent infinite loops and preserve user authority.

Weak
07 / 08
Vague objective

/goal Improve performance

No finish line. No verification surface. No constraint. Codex cannot know whether to stop, continue, or report uncertainty.

Strong
Auditable
Measurable contract

/goal Reduce p95 latency below 120 ms…

Verified by the checkout benchmark, while keeping the correctness suite green. If blocked, report attempted paths, evidence, blocker, and next input needed.

Closing
08 / 08

Let the objective persist.
Let evidence decide.

Takeaways
End
01

Use Goals for uncertain paths

Debugging, optimization, migrations, flaky tests, benchmarks, and research audits.

02

Write the evidence first

Name the outcome, audit surface, constraints, boundaries, iteration policy, and blocked stop.

03

Do not hide uncertainty

If proof is partial, call it partial. If blocked, say what would unlock progress.

Part 3
LazyCodex
Install

설치하고
ulw로 건다.

Command
Codex harness
Install

npx lazycodex-ai install

Autonomous setup

npx lazycodex-ai install --no-tui --codex-autonomous

Clarify로 목표를 좁힌 뒤, Codex Goal로 검증 표면을 정하고, LazyCodex ulw로 실행 루프를 시작한다.

ulw usage
Research loop
사용 흐름

한 줄 목표가 아니라 evidence loop를 요청한다.

Context

paper URL, repo path, logs, data, formula.

Success

metric, artifact, command output, table.

Constraints

GPU, time, dataset, framework, search boundary.

Loop

first experiment and next-decision rule.

Stop

blocked condition and what input unlocks it.

ulw <goal> / Context / Success / Constraints / Stop
Closing
Workshop loop

Clarify first.
Goal second.
ulw third.

Takeaways
End
01

모호함을 줄인다

가설형 질문으로 연구 요청을 실행 가능한 spec으로 만든다.

02

완료 기준을 쓴다

Codex Goal은 outcome, evidence, constraint를 붙잡는다.

03

반복은 evidence로 한다

ulw는 검증될 때까지 이어가되, 막히면 무엇이 필요한지 남긴다.