AI-Assisted Coding · Module 5Lesson 5

Study explanation · Lesson 05 · 14 min

Agent-driven feature planning

Generic advice can sound right and still be wrong for your project. Plan a comments feature twice, once generically and once grounded in the repo, then critique the grounded plan section by section as a tech lead. Plan it; do not build it.

Listen to this lesson

Hear the lesson read aloud, with each sentence highlighted as you go.

Narrated by an AI voice.

Plan it. Do not build it.

The planning example is a comments feature for the Task Tracker, and the notes are explicit: do not implement comments in Module 5. The value is learning how repo access changes plan quality, and how to review an agent’s plan before any implementation begins.

Comments feature scope used in the lecture · Lecture notes p. 12
Field or behaviorExpected planning detail
idString UUID or project-consistent identifier.
task_idConnects each comment to an existing task. The plan should handle nonexistent task IDs.
authorRequired string with a reasonable length limit, such as 1-100 characters.
bodyRequired string with a reasonable length limit, such as 1-2000 characters.
created_atServer-generated UTC datetime.
API, tests, frontend, docsPlan the model/storage/API behavior, concrete tests, frontend behavior, and documentation updates without implementing them.

Two planning modes

A generic plan reads like a reasonable blog post. A grounded plan is built from the files you actually have. Both still need your review.

Generic and repo-grounded plans · Lecture notes p. 12

Generic / ungrounded plan

  • May assume the wrong storage, API style, frontend structure, auth model, or migration system.
  • Useful for brainstorming.
  • Not enough to hand to a teammate.

Repo-grounded Codex plan

  • Based on real files: models, routes, storage, tests, frontend, README, AGENTS.md.
  • Useful as a design proposal.
  • Still requires critique and sequencing review.

What Codex should read first

Before the grounded plan, the notes list the files Codex should inspect. In the activity you also watch which files it actually opened, and note whether the plan had enough evidence.

  • Model or schema files, such as app/models.py or the project equivalent.
  • Main app or route files, such as app/main.py or router modules.
  • Storage or persistence layer files.
  • Existing tests, especially tests that show naming conventions and expected errors.
  • Frontend files if the comments feature affects the UI.
  • README and AGENTS.md, so the plan respects project boundaries and commands.

Critique as a tech lead

Label every section of the grounded plan with one of three labels.

Plan critique labels · Lecture notes p. 13
LabelUse when...Example
RightThe section accurately reflects the current code and is sequenced well.The plan extends the existing in-memory storage pattern instead of inventing a database.
MissingThe section omits a specific requirement, edge case, test, or project convention.No body length limit or no test for comments on nonexistent tasks.
Needs-ResequencingThe work is plausible but ordered badly.Frontend work appears before model, storage, route, and test decisions are settled.

Five steps to the decision document

The generic and grounded plans run in separate threads so neither colors the other. Everything ends in one file.

Feature planning activity flow · Lecture notes p. 13
StepWhat to doWhat to save
1. Run the generic versionAsk for a comments feature plan without requiring repo reading. Note assumptions and generic advice.A short comparison note.
2. Run the grounded versionIn a fresh Codex thread, require Codex to read relevant project files before answering. Plan only; do not implement.The repo-grounded plan.
3. Watch the readingCheck which files Codex inspected before the plan.A note on whether the plan had enough evidence.
4. Critique as tech leadLabel every section Right, Missing, or Needs-Resequencing.docs/decisions/comments-feature-plan.md.
5. Compare the two plansWrite what the generic plan missed and when a generic plan might still be enough.A 3-line comparison at the bottom of the document.

Four planning pitfalls

Good feature plans usually move from model, storage, API and tests to frontend and docs, not the other way around.

  • Accepting generic coherence A plan can sound professional while assuming files, patterns, or persistence your repo does not use.
  • Vague tests “Test comments work” is not a plan. Look for concrete names and cases.
  • No sequencing Model, storage, API and tests should be settled before frontend and docs.
  • Accidental implementation Reject edits to app/ during this part. The deliverable is the decision document.

Key ideaA plan that mentions no real file path has not been grounded, however professional it sounds.

Key takeaways

  • Plan the comments feature; do not implement it.
  • A generic plan is for brainstorming; a grounded plan is a design proposal that still needs critique.
  • Label each section Right, Missing or Needs-Resequencing.
  • Sequence model, storage, API and tests before frontend and docs.

Built from the Module 5 lecture notes, prompt library and additional readings; the videos they accompany were not supplied.

Your study checkpoint

Ready to continue?

Mark the lesson complete once you have read it and tried its idea on something real.

Next · Lesson 6