WEEK 8Monday

Estimate, Then Build With the Agent

Week 8 · From an approved design to an estimate you can defend and code you can explain

WEEK 8Monday

Where we are

The documents so far, and this week's code

Today's build: not.md, the approved design

WEEK 8Monday

When can I use it?

Ask the room

The reminder's design is approved. The instructor asks: when can I use it? What do you answer?

WEEK 8Monday

Count the code?

  • A controller, a SubmissionStatusService, a scheduler change, a dialog, their tests.
  • Lines of code, times hours per line.
The agent

The agent writes all of it in one session. By that arithmetic, the answer is "this afternoon."

WEEK 8Monday

It is not this afternoon

20 rows in the test list. Each one is a behavior a person has to see pass.

6 open risks. One (80 emails during one request) can only be settled by measuring on staging.

Key point

The agent made the typing free and left everything else.

WEEK 8Monday

Your feeling of speed is not data

  • Before: developers expected AI to make them 24% faster.
  • Measured: they took 19% longer.
  • After: they still believed they had been 20% faster.
WEEK 8Monday

The hours moved

Pull requests 154% larger, 98% more of them.

Review time up 91%.

WEEK 8Monday

People's hours, not the agent's

Key point

/implement writes the reminder in a few minutes. None of the estimate is those minutes.

WEEK 8Monday

A skill the agent cannot take

Key point

When anyone can generate the code, the engineer a client trusts is the one whose dates hold.

WEEK 8Monday

A range, made twice

  • Always a range: "3 to 5 hours, most likely about 3.5."
  • When the use case is written: a coarse estimate, by the team, for ordering and the release plan.
  • When its design is approved: the refined estimate, the one you give a date from.
Pitfall

Client needs it sooner? Cut scope, not the estimate.

WEEK 8Monday

Where the hours go now

  • Clarify: settling the use case with the client.
  • Design: the challenge loop and the design-of-record, until it merges.
  • Build and review: driving the agent, reading every line of the diff.
  • Verify: seeing each test row pass, end to end.

The first 90 percent of the code takes the first 90 percent of the time. The remaining 10 percent takes the other 90 percent. (Tom Cargill, Bell Labs)

WEEK 8Monday

Planning poker, in hours

  • Each teammate writes a range per part, privately.
  • Reveal at once.
  • Highest and lowest explain.
  • Agree on a range.
Key point

The gap is the finding. Clarify at 0.5 hours and at 4 means two people read two different use cases.

Ask the room

UC-AI-critique, not yet designed. Your range for clarify?

WEEK 8Monday

Size it by the test list

  • Each row is one behavior a person has to see working.
  • It counts what the software must do. It is not yet hours.
  • First estimate: by analogy to a finished change of the same size.
  • After two or three use cases: your own hours per row.
  • The open risks set the width of the range.
WEEK 8Monday

The reminder, estimated

Part Basis Hours
Clarify and design, left Questions test already run 0.5 to 1
Build and review Every diff read against the diagrams 1.5 to 2
Verify 20 rows, latency on staging 1 to 2
Total By analogy: #76, 3.5 h 3 to 5
WEEK 8Monday

Write it down before you build

On the issue:

Estimate: clarify and design 0.5–1 h, build and review 1.5–2 h, verify 1–2 h

In every weekly activity report line about it:

UC-NOT-remind-non-submitters: reviewed the agent's diff against the sequence diagram
WEEK 8Monday

Calibrate

Key point

Calibration ratio = hours logged since the estimate ÷ its midpoint.

  • Estimated 8 to 16, logged 18: ratio 1.5.
  • Next use case you would call 4 to 8: say 6 to 12.
  • A slip you see coming goes to the client at the next meeting, not on the date.

Hofstadter's Law: it always takes longer than you expect, even when you take into account Hofstadter's Law.

WEEK 8Monday

Then look back

  • Which part missed most?
  • What did you not know when you estimated?
  • What will you do differently next time?
Key point

The ratio corrects your bias. The retrospective improves your judgment.

WEEK 8Monday

Graded on honesty, not accuracy

Key point

A ratio of 2.3 with a reason earns the same as a ratio of 1.0.

Pitfall

Logging fewer hours to look accurate is inflating a weekly activity report, and it is academic dishonesty.

WEEK 8Monday

In your team meeting, by Sunday

  • Your build-context issue gets a refined estimate before the agent builds.
  • Before Checkpoint 2: planning poker for every use case not yet designed, its coarse estimate on its issue.
  • Your weekly activity report lines carry the use case ID.
  • Checkpoints 2 and 3: estimate, actual, ratio, and one sentence on the biggest miss.
WEEK 8Monday

The agent copies what it sees

Key point

4 of Project Pulse's 266 backend classes declare a logger.

The agent

Ask the agent for a feature there, and it writes code that does not log. Whatever your codebase does by habit, the agent does at speed.

WEEK 8Monday

Cognitive debt

Key point

Code your team accepted without understanding it.

WEEK 8Monday

Size the step to the review

Commit What goes in it
Trunk What many paths depend on, or existing users rely on, or is hard to undo
Security rule or migration Alone
Each leaf New code reached only through the new feature
Key point

The agent pauses once, after the trunk. You read it before the leaves are built.

WEEK 8Monday

The pause check

Ask the room

Can you say what changed and why, without asking the agent?

WEEK 8Monday

The reminder, in four commits

  • Trunk: SubmittableItem, WeekKeys, SubmissionStatusService, ReminderService, two new queries. Pause.
  • The two route rules in SecurityConfiguration, alone.
  • ReminderController and the dialog.
  • The moved WeeklyReminderScheduler.

The trunk commit message the agent wanted: "Add some stuff." The one you merge: "Add SubmissionStatusService: who owes what this week."

WEEK 8Monday

The team's settings file

{
  "permissions": {
    "deny": [
      "Bash(git push --force *)",
      "Bash(gh pr merge *)",
      "Bash(gh repo delete *)",
      "Read(**/.env)",
      "Read(**/.env.*)",
      "Read(**/secrets/**)",
      "Read(**/*.pem)",
      "Read(**/*.key)"
    ]
  }
}
WEEK 8Monday

Before Friday

  • Read deny rules for your secrets in the team's .claude/settings.json, by pull request.
  • Ask the agent to read .env. Watch it refused.
  • Charter line: no dependency without a person's check.
  • Checked at Checkpoint 2.
WEEK 8Monday

Code you did not write

  • Asked to document existing code, the agent writes down what it does, bugs included.
  • A missing check, read back, becomes a requirement nobody chose.
  • The client calls each one intended, corrected, or a defect. Not you.
Key point

The code is evidence, never authority.

WEEK 8Monday

The catch-all logs nothing

@ExceptionHandler(Exception.class)
Result handleOtherException(Exception ex) {
    return new Result(false, INTERNAL_SERVER_ERROR,
        "A server internal error occurs.", ex.getMessage());
}
Pitfall

A NullPointerException in production: the user sees one sentence, the operator sees nothing, and the browser gets the raw exception message.

WEEK 8Monday

The logging rule, for your charter

  • One logger per class, one name.
  • error: someone must act. warn: degraded. info: a business event. debug: development.
  • Parameterized: "Sent {} of {} reminders", never concatenation.
  • Every catch that does not rethrow logs the exception object.
  • Identifiers, never content: no secrets or passwords; a person's ID, not their email or scores.
WEEK 8Monday

Review what was logged, not only whether

LOGGER.error("Could not send the weekly reminder to {} in section {}",
        student.getEmail(), section.getSectionName(), e);
Ask the room

Right level, parameters, the exception object. And every failed student's email address in the log. Acceptable?

WEEK 8Monday

Several agents at once

Key point

Safe exactly where the decisions they would make are already written down.

  • Side task: it searches and reports; it edits nothing.
  • Writer and reviewer: a fresh session reviews the diff.
  • Fan-out by leaf: after the trunk merges.
Pitfall

No more agents than pull requests you will review well today.

WEEK 8Monday

`/implement` is a file

Part In /implement
Front matter argument-hint: <UC-ID>
The argument $ARGUMENTS, the use case ID
Preconditions No design? Stop. Old conversation? /clear
Standing rule "When in doubt, or when you see a better way, shout."
Phases Read first; then plan, build, test, trace, open the pull request
Stop Once, after the trunk
WEEK 8Monday

Write your own

  • Package what your team has done by hand twice.
  • A skill: .claude/skills/<name>/SKILL.md, about 20 lines.
  • Copy the skeleton, not Project Pulse's paths.
  • /design and /implement for your repository.
  • /close-use-case: the closing checklist and the three retrospective questions.
  • /estimate: count the rows and risks; leave the hours blank for a person.

A good programmer is someone who looks both ways before crossing a one-way street. A good skill checks its preconditions anyway.

WEEK 8Monday

Before your agent builds the slice

  • Charter: your logging rule.
  • Build trunk first; read it before the leaves.
WEEK 8Monday

Checkpoint 2: Oct 23

  • The slice runs from a tagged release, v0.1.0, with release notes.
  • .claude/settings.json denies reads of your secrets.
  • The charter: the dependency rule, and never remove the Co-Authored-By trailer.
  • The calibration table.
  • The release plan: a Release value on every traceability row.

Estimate, Then Build With the Agent

→ space PgDn
Next step or slide
← PgUp
Back
↓ S
Skip to the next slide
O
Overview of all slides
N
Speaker notes
B
Black the screen
Ctrl+P
Print / PDF handout, one slide per page