Lifestyle

Write a clear task request

A useful request explains the outcome, available context, boundaries and acceptance checks. 'Improve the page' could mean speed, appearance or accessibility. Convert it into observable behavior before adding more instructions.

About 12 min read · Practice 20 min

Workflow illustration, not a product screenshot.
Image: Mokaair (© Mokaair)
Back to directory:Codex learning hub: tutorial directory

Beginner · Desktop / mobile / CLI / VS Code / JetBrains / cloud

On this page
  1. What you will be able to do
  2. Prepare a repeatable starting point
  3. Step 1: find what the vague request omits
  4. Step 2: write a complete actionable request
  5. Step 3: judge evidence rather than answer length
  6. When results differ, add a reproducible case
  7. Three common problems and corrections
  8. Practice, restoration and sources

What you will be able to do

Prepare a repeatable starting point

Copy expected from the exercise download into a fresh codex-prompt-lab folder, rather than reusing an edited copy. Confirm its five files, then find the New task label, Add task button and Read the project README placeholder in index.html. Those three visible strings are the relevant source; you do not need to paste the whole project into chat.

Use the preview procedure from : py -m http.server 4173 --bind 127.0.0.1 on Windows, or python3 -m http.server 4173 --bind 127.0.0.1 on macOS/Linux, then open http://127.0.0.1:4173. Git is not required for this lesson, but retain the original so that you can compare or restore edited files.

Step 1: find what the vague request omits

“Make the form better” does not identify its audience, problem, allowed scope or completion criteria. Codex could change colors, fields, buttons or data structures, or add a package you did not need. That may reflect an underspecified request rather than a mistake. Start with a user outcome, such as “A new visitor can understand how to add one small task.”

Then supply goal, current-state evidence, constraints and acceptance criteria. These are checks for missing information, not four compulsory headings for every request. A wording change may need only a few lines; a multi-file feature may need background and a staged plan. Do not add irrelevant role instructions, tool inventories or falsely precise time estimates merely to sound professional.

Step 2: write a complete actionable request

Send the complete prompt below to the Codex task for codex-prompt-lab, not the operating-system shell. It names one HTML file and two string changes, preserves accessibility labels, event bindings and data format, and requests actual checks. New task remains the visible field label; not every piece of text should be forced into the same wording.

Natural-language prompt: paste into the practice project's Codex task · text
Goal: make the existing todo form wording clearer for a first-time visitor.
Context: this folder is the unchanged Small Steps expected practice version.
In index.html only:
- Change the submit button text from "Add task" to "Save task".
- Change the input placeholder to "Plan one small step".
Keep the visible "New task" label, input id/name, maxlength, required attribute,
button type, JavaScript behavior, stored data and all other files unchanged.
Do not install packages or deploy anything.
Validate by adding Read, completing it, checking Completed, and refreshing.
Check that whitespace-only input does not create a task.
Run node --test core.test.mjs. If browser checks are unavailable, list them as not run.
Report the exact changed strings, files and evidence.

Let Codex read background already present in files; an exact filename is more useful than pasting the entire history. If the actual page has no Add task, first check whether you used the original version. Do not force mismatched instructions onto a different starting state or replace every similar string across the project. Reproducibility starts with a known baseline.

Step 3: judge evidence rather than answer length

Open index.html after completion. Only button text and placeholder should change. New task remains associated with the input, and type="submit", id, name, maxlength and required remain intact. Compare the other four files with the original to rule out incidental restructuring. A concise reply with the right diff and complete verification is a good delivery; a long explanation does not replace missing changes or results.

In the HTTP preview, add Read, complete it, check the Completed filter and refresh to verify persistence. Whitespace must not add an item, and Tab must still reach the input and submit button. These behaviors should match the baseline. Correct wording with a broken submit button fails acceptance; describe the actual symptom in the next request instead of saying only “it is bad.”

When results differ, add a reproducible case

Suppose Save task is correct but the placeholder is unchanged. Verify saving and browser refresh, then send the follow-up below. It distinguishes the already-correct part from the actual and expected result without requesting a whole-page rewrite. If you changed the requirement midway, explicitly state which condition supersedes the previous one so that contradictory instructions do not remain active.

Follow-up prompt: use only if the button is correct and the placeholder is still wrong · text
The button text is correct; preserve that change.
After saving and refreshing, the placeholder still reads "Read the project README".
Expected placeholder: "Plan one small step".
Inspect index.html and correct only the remaining placeholder mismatch.
Report the relevant diff and any verification you can actually perform.

For a larger task, use to identify steps and uncertainties, but planning is not verification. A promise to run tests is not a test result, and a promise to retain data still needs code and data checks. Resolve architecture-changing gaps, such as whether sign-in or synchronization is required, before dependent implementation to reduce rework.

Three common problems and corrections

Too many edits: remove scope-expanding phrases such as “optimize everything,” name the permitted files and preserved behavior, then restore unrelated changes individually. Endless questions: answer conditions that affect the decision and allow routine font or filename choices to follow the existing style. Completion without evidence: request actual command results and checks not run, not another paraphrase of “done.”

For repeated failures, retain the smallest reproduction, error text and last known working state, then isolate one problem instead of repasting unrelated history. Use for longer tasks. Put recurring project conventions in , leaving the individual prompt focused on this change.

Practice, restoration and sources

Start the extra exercise from another fresh expected copy. Confirm that the button says Add task and the placeholder says Read the project README; do not continue in the copy you just edited. Write a prompt that changes only the button to Create task and preserves this copy's original placeholder. Identify the single changed string in index.html and repeat the add, empty-input and refresh checks. Afterward, restore index.html in each practice copy from the retained expected original; other files need no replacement. Stop Python with Ctrl+C. Closing a Codex conversation does not undo file changes.

Prompting principles were checked against official documentation on 2026-09-14. The form request, examples and acceptance procedure are original to this series. Shared English prompts stay identical across locales; model wording can vary, while acceptance concerns actual results. Continue with or using reproducible inputs and expected behavior.

Request componentConcrete content here
GoalHelp a new visitor understand the form
Sourceindex.html from expected
ConstraintsTwo strings only; preserve data and behavior
AcceptanceAdd, complete, empty input, refresh

07. Write a clear task request — Workflow illustration, not a product screenshot. Goal → Constraints → Acceptance
07. Write a clear task request — Workflow illustration, not a product screenshot. Goal → Constraints → Acceptance · Image: Mokaair (© Mokaair)
Read the full description

Goal to Constraints to Acceptance

Prompt exercise result: the input hint reads Plan one small step. The Save task button has an orange focus outline.
Reference edits applied to the practice files; actual Windows / Edge 153.0.4234.32 screenshot, 2026-09-14. Orange outline: keyboard focus. Fictional data in a 390px responsive viewport, not a physical phone. Not Codex UI or proof of model execution. · Image: Mokaair (© Mokaair)
Prompt exercise result: the input hint reads Plan one small step. The Save task button has an orange focus outline.
Reference edits applied to the practice files; actual Windows / Edge 153.0.4234.32 screenshot, 2026-09-14. Orange outline: keyboard focus. Fictional data in a 1280px responsive viewport, not a physical phone. Not Codex UI or proof of model execution. · Image: Mokaair (© Mokaair)

Back to directory

  • Lifestyle

    Codex learning hub: tutorial directory

    A planned 60-lesson, ten-unit Codex curriculum, from setup and your first task to MD instructions and advanced integrations. Find your next lesson by experience, platform, goal or command; unpublished entries show their status.

  • Lifestyle

    Worktrees and isolated tasks

    A Git worktree gives one repository multiple working directories on different branches. It isolates file edits, but databases, ports and external services may still be shared. File isolation is not full resource isolation.

  • Lifestyle

    Workshop: build a small website

    Plan and build the Small Steps task website from brief.md, with adding, completing, deleting, filtering and local persistence. Separate HTML, CSS, data functions, UI events and tests, verify with Node and browser checks, and document restart and recovery steps.

  • Lifestyle

    Usage and efficiency: reducing rework

    Record task conditions, model options, time and outcomes to reduce unnecessary retries and excess context.

Latest travel guides

Sources

Lifestyle