Module 04.1

Codex manual and command reference

Run Module 04 with cleaner Codex habits,
not just stronger prompts.

This companion page sits beside the Kanban wizard. Use it when you need the short manuals, prompt usage patterns, and commands worth remembering while building the Flask + HTMX + SQLite app.

Usage timing

Use this reference differently before, during, and after a step.

Before a step

Pick the current wizard step, restate the done-when, and decide which command or test will prove the step is really finished.

During a step

Stay in one thread, keep the stack constrained, and ask for a short plan if the repo has already drifted from the original wizard prompt.

After a step

Read the diff, run the highest-value checks, and do not move forward just because the code looks plausible.

Short manuals

Five short manuals for running the Module 04 build cleanly

Starter manual

Open the current wizard step, not the whole dream project. Paste the step prompt, then add the current repo facts before you let Codex edit.

Step-transition manual

Do not move from setup to schema, or schema to backend, until the present step actually runs and the verification path is clear.

Prompt manual

Keep the wizard prompt as the base, then add current files, blockers, constraints, and a done-when statement that matches today’s repo state.

Review manual

Read the diff, run or request checks, and ask for remaining risks. “Looks good” is weaker than “passed the intended checks.”

Repo memory manual

When commands and conventions stop changing every hour, move them into README or AGENTS.md so later sessions start from stronger defaults.

Prompt usage

Three prompt shapes that fit Module 04 better than generic asks

Start from a step

Use when you know the current wizard stage

I am on Module 04 Step __.

Current repo state:
- Existing files: ...
- Relevant files: ...
- Current blocker: ...

Use the Step __ wizard goal as the base.

Constraints:
- Keep Flask + HTMX + SQLite.
- No React and no frontend build step.
- Reuse existing templates and routes where possible.

Before editing:
1. Give me a short plan.
2. List key risks.
3. Tell me how you will verify the change.

Then implement.
Resume a partial repo

Use when the codebase already exists

Continue this Module 04 Kanban project from its current state rather than regenerating it.

First inspect the repo and tell me:
1. Which wizard step the project appears to be on.
2. What is missing to reach the next stable step.
3. Which files should change next.
4. How you would verify the next step cleanly.

Then wait for confirmation before editing.
Review and harden

Use before the ship step or a handoff

Act as a senior reviewer on this Module 04 Flask + HTMX + SQLite Kanban app.

Inspect the current project and focus on:
- broken CRUD flows
- drag-drop and ordering safety
- duplicated templates
- missing tests
- README or setup gaps

Run the highest-value checks you can, make the necessary fixes, and summarize any remaining risks or tradeoffs.

Commands

Memorize the small set of controls that actually matter early

CLI lifecycle

Launch and resume

npm i -g @openai/codex
codex
codex resume --last
In-session controls

Use these before you reach for something fancier

/status
/plan
/diff
/review
/model

`codex resume --last`

Use it when you want to continue the same Kanban feature line instead of rebuilding context from zero.

`/status`

Use it when you are unsure what Codex thinks the task is, what it has already done, or what remains.

`/plan`

Use it before multi-file changes, risky refactors, or when the repo no longer matches the original wizard step cleanly.

`/diff`

Use it before you accept a step. The summary is not the proof; the actual diff is the proof.

`/review`

Use it when the task has real risk and you want a deliberate bug, regression, or missing-test pass.

Project runbook

These are the project commands worth standardizing early

Environment

Bootstrap the local app

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
Run and test

Database, app, and verification

flask --app app init-db
flask --app app seed-demo
flask --app app run --debug
pytest

Step exit checklist

Before you leave a step, confirm the route or flow works locally, the UI matches the intended step, and the next prompt is now smaller than the previous one.

When to write AGENTS.md

Write it when stack decisions, project commands, naming patterns, and verification expectations stop changing every session.

Common mistakes

Most Module 04 failures are workflow failures before they are code failures

Common mistake

Re-asking for the whole app after step three

Once the repo exists, ask Codex to continue from the current state. Full regeneration increases thrash and duplication.

Common mistake

Skipping verification because the UI looks plausible

Route behavior, form handling, and ordering logic need actual checks. Visual plausibility is not enough.

Common mistake

Opening overlapping threads on the same files

Parallel threads against the same templates, routes, or data layer multiply merge confusion instead of progress.

Common mistake

Letting the stack sprawl mid-build

If the plan was Flask + HTMX + SQLite, treat new frameworks as a deliberate scope change, not a casual patch.