Start here
You told me you learn best by doing, from small steps to mastery. So this course uses a strict pattern:
- One goal per module
- Exact commands to run ("Run: ...")
- Exact prompts to type in Codex ("Type in Codex: ...")
- A "done" check so you know you succeeded
Pro tip
Becoming elite is mostly about a repeatable workflow. This course will build your workflow the same way you build code: small steps, checks after each step, and saved checkpoints in git.
Before you begin: one quick safety habit
Each time you start a big task, make a checkpoint branch.
Run:
cd /code/viziora
git status
git checkout -b course/codex-10x-setupCourse map & what we will build in Viziora
Codex becomes "real" when you are shipping real features. Here are the Viziora upgrades we will implement.
Feature Pack A -- Parallel QA for Viziora
- Add a "full check" command that runs API + web checks
- Add Playwright end-to-end tests (delegate to cloud)
- Add a small evaluation runner for Viziora chat
Feature Pack B -- Trust & debugging
- Add a run-log viewer in the UI
- Add a log summarizer script (big logs to small summary)
- Add weekly health report generation
Feature Pack C -- Tool integrations
- Build a Viziora MCP server (safe tools)
- Connect Codex to it
- Learn app-server v2 flows
Feature Pack D -- Shipping discipline
- Multi-agent reviewer + tester on every feature
- Thread forks for experiments
- Cloud delegation for long jobs
- Artifacts for release notes and demos
Important
We move fast with control: approvals, sandbox boundaries, safe commands, and tests.
M0 -- Your 10X setup (profiles, safety, minimal instructions)
New words (simple)
- Profile: a named settings bundle you can switch to quickly
- Sandbox: a safety fence around where commands can run and what files can be changed
- Approvals: when Codex pauses to ask "is it okay if I run this command?"
Run: create two profiles (fast build vs deep review)
Run:
mkdir -p ~/.codex
cat > ~/.codex/config.toml <<'EOF'
profile = "fast"
[profiles.fast]
sandbox_mode = "workspace-write"
approval_policy = "on-request"
model_reasoning_effort = "medium"
[profiles.deep_review]
sandbox_mode = "workspace-write"
approval_policy = "on-request"
model_reasoning_effort = "high"
EOFPro tip
Profiles are your "gearbox". Stop using one gear for everything.
Run: create minimal instruction files
Run:
cat > ~/.codex/AGENTS.md <<'EOF'
- Explain new words the first time you use them.
- Give exact steps using: Run: ...
- After edits: run checks and report results.
- Keep changes small.
EOFRun:
cd /code/viziora
cat > AGENTS.md <<'EOF'
- Keep changes small and testable.
- Backend: run pytest.
- Web: run pnpm build (or lint).
- For agent/chat: never guess; show SQL; enforce safe query checks.
Reference docs:
- docs/system-overview.md
EOF
git add AGENTS.md || true
git commit -m "chore: add Viziora Codex working agreements" || truePro tip
Short rules + a link beats long walls of instructions.
M1 -- Modes: Fast vs Standard (and when to use each)
Run: start Codex
Run:
cd /code/viziora
codex --profile fastType in Codex: toggle fast mode
Type in Codex:
/fast
Then ask:
"Summarize what fast mode changes, and when I should NOT use it."Pro tip
If you see confident mistakes, switch out of Fast mode and increase reasoning effort.
M2 -- Threads: /new, /fork, resume, and safe experiments
Practice inside Codex
Type in Codex:
/status
/new
/forkPractice in your terminal
Run:
cd /code/viziora
codex resume
codex forkPro tip
For risky changes: fork the thread AND create a git branch.
M3 -- Local parallel work: worktrees + multiple terminals
Run: create two worktrees
Run:
cd /code/viziora
git checkout main
git checkout -b feat/e2e-tests
git -C /code/viziora worktree add /code/viziora-wt-e2e feat/e2e-tests
git checkout main
git checkout -b feat/runlog-ui
git -C /code/viziora worktree add /code/viziora-wt-runlog feat/runlog-uiRun: start two Codex sessions
Terminal 1:
cd /code/viziora-wt-e2e
codex --profile fast
Terminal 2:
cd /code/viziora-wt-runlog
codex --profile fastPro tip
Parallel work only works if tasks do not edit the same files.
M4 -- Multi-agent teams: enable, define roles, coordinate
Enable it
Type in Codex:
/experimental
# enable multi-agents
# restart CodexRun: define agent roles in .codex/config.toml
Run:
mkdir -p /code/viziora/.codex/agents
cat > /code/viziora/.codex/config.toml <<'EOF'
[features]
multi_agent = true
[agents]
max_threads = 6
max_depth = 1
[agents.reviewer]
description = "Checks correctness, safety, missing tests."
config_file = "agents/reviewer.toml"
[agents.tester]
description = "Writes and improves tests."
config_file = "agents/tester.toml"
[agents.explorer]
description = "Reads code to find execution path. No edits."
config_file = "agents/explorer.toml"
EOF
cat > /code/viziora/.codex/agents/reviewer.toml <<'EOF'
sandbox_mode = "read-only"
model_reasoning_effort = "high"
developer_instructions = "Reviewer: find correctness, safety, missing tests. Return top 3 risks first."
EOF
cat > /code/viziora/.codex/agents/tester.toml <<'EOF'
sandbox_mode = "workspace-write"
model_reasoning_effort = "high"
developer_instructions = "Tester: write tests only. Prefer small reliable tests."
EOF
cat > /code/viziora/.codex/agents/explorer.toml <<'EOF'
sandbox_mode = "read-only"
model_reasoning_effort = "medium"
developer_instructions = "Explorer: cite exact files and symbols. No edits."
EOFPro tip
Use multi-agent for evidence gathering. Keep coding in small steps.
M5 -- Batch fan-out: one sub-agent per item (CSV jobs)
Type in Codex:
Create /tmp/viziora_modules.csv with columns path,owner and one row per important backend module.
Then call spawn_agents_on_csv with:
- csv_path: /tmp/viziora_modules.csv
- id_column: path
- instruction: "Review {path}. Return JSON with keys path, risk, missing_tests, quick_fix via report_agent_job_result."
- output_csv_path: /tmp/viziora_modules_review.csv
- output_schema: required string fields: path, risk, missing_tests, quick_fix
- max_concurrency: 4Pro tip
Batch fan-out is great for audits and repeated tasks.
M6 -- Cloud delegation: codex cloud exec + codex apply
Run: submit a cloud job (replace ENV_ID)
Run:
cd /code/viziora
codex cloud exec --env ENV_ID --attempts 2 "Add Playwright e2e tests for Viziora web:
- install Playwright
- add 2 tests: upload dataset; ask chat question and render chart
- add a command to run tests
- update README with how to run e2e tests"Run: list tasks and apply the diff (replace TASK_ID)
Run:
codex cloud list --env ENV_ID --limit 10
codex apply TASK_IDPro tip
Delegate "big boring work" to the cloud. Keep your brain for decisions.
M7 -- Background command monitoring (/ps)
Type in Codex:
/psPro tip
Keep the agent busy while you plan next steps.
M8 -- "Compute in scripts": keep chats small
Type in Codex:
Write tools/summarize_run_logs.py to summarize a JSONL log file.
Add make summarize-logs LOG=...
Write docs/reports/run-log-summary.md
Add a tiny test for parsing.Pro tip
Big inputs belong in scripts, not in chat.
M9 -- REPL tricks: reuse local JS code via imports
Run: create a tiny validator
Run:
cd /code/viziora
mkdir -p tools
cat > tools/validateVegaSpec.mjs <<'EOF'
export function validateSpec(spec) {
if (!spec || typeof spec !== "object") return { ok: false, error: "spec is not an object" };
if (!spec.mark) return { ok: false, error: "missing mark" };
if (!spec.encoding || typeof spec.encoding !== "object") return { ok: false, error: "missing encoding" };
return { ok: true };
}
EOFType in Codex (preferred)
Use js_repl to import ./tools/validateVegaSpec.mjs and validate:
const spec = { mark: "bar", encoding: { x: {field:"region"}, y: {field:"revenue"} } }Fallback: run Node
Run:
node -e "import('./tools/validateVegaSpec.mjs').then(m => console.log(m.validateSpec({mark:'bar',encoding:{x:{field:'region'},y:{field:'revenue'}}})))"Pro tip
Validate with code. Do not guess.
M10 -- Skills + dependencies (and why openai.yaml appears)
Skills live in
.agents/skills. If a skill depends on MCP tool connections, Codex can record that dependency in agents/openai.yaml.Run: create two Viziora skills
Run:
cd /code/viziora
mkdir -p .agents/skills/viziora-e2e-tests
cat > .agents/skills/viziora-e2e-tests/SKILL.md <<'EOF'
---
name: viziora-e2e-tests
description: Use this when adding or updating Playwright end-to-end tests for Viziora web.
---
Workflow:
- Smallest test first
- Avoid fixed sleeps
- Run tests and fix flakiness
EOF
mkdir -p .agents/skills/viziora-chat-evals
cat > .agents/skills/viziora-chat-evals/SKILL.md <<'EOF'
---
name: viziora-chat-evals
description: Use this when adding or improving the evaluation set for Viziora chat behavior.
---
Rules:
- Deterministic checks
- SQL must exist for computed claims
- SQL must be safe
EOF
git add .agents/skills
git commit -m "chore(skills): add Viziora skills" || truePro tip
One clear job per skill. Narrow beats broad.
M11 -- Artifact workflows: generate reports, spreadsheets, slides
Type in Codex:
Build tools/report_code_health.py to output a markdown and CSV report in docs/reports/.
Add make report-health.
Add a skill to run it.
Keep changes small and testable.Pro tip
Artifacts communicate progress. Auto-generated artifacts communicate mastery.
M12 -- App-Server v2 + MCP
Run: start app-server (learning mode)
Run:
cd /code/viziora
codex app-server --listen ws://127.0.0.1:8787Run: test v2 flow
Run:
codex debug app-server send-message-v2 "Summarize the Viziora repo and point to key files."Type in Codex: plan a Viziora MCP server
Plan only:
Build mcp/viziora_mcp_server.py with tools:
- list_datasets
- dataset_schema(dataset_id)
- run_safe_query(dataset_id, sql) with safety checks
Add mcp/README.md and show "codex mcp add" steps.
Do not implement yet.Pro tip
Tools make AI reliable. MCP makes tools reusable.
M13 -- Capstone: ship an Eval Dashboard with an agent team
Run: create a feature branch
Run:
cd /code/viziora
git checkout -b feat/evals-dashboardType in Codex: spawn the team
Ship "Viziora chat eval dashboard".
Spawn:
- explorer: locate eval code + where to add endpoint + page.
- reviewer: list risks (leaks, unsafe SQL, flakiness).
- tester: design tests.
Wait for all results.
Then give a step-by-step plan with checks after each step.Pro tip
Elite = speed + safety.
Daily drills: how you become top-tier
- Fork + branch: /fork then git checkout -b ...
- One change + one check: tiny change -> run checks -> commit
- Multi-agent review: explorer + reviewer on every diff
- Weekly artifact: automate one report and make it a skill
Pro tip
If you did it 3 times, make it a skill. If you approved it 3 times, make it a rule.