AI-Assisted Coding · Module 5Lesson 4

Study explanation · Lesson 04 · 15 min

Governance retrospective

Every prompt was a governance decision. Look back through three lenses, what you shared, what you received and what changes, classify the risk of each item, trace one generated block line by line, and write rules a teammate could check.

Listen to this lesson

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

Narrated by an AI voice.

Not policy theater

Governance in this module is a concrete review of what you shared with AI, what AI gave back, what risk those exchanges carried, and which rules you want to keep for future projects. The notes’ key takeaway is that every prompt was a governance decision; this activity turns your course history into practical rules.

The three lenses · Lecture notes p. 9
LensGuiding questionOutput
What did I share?What code, logs, traces, names, config, or data did I paste or expose to AI?A Shared table with risk classifications and reasons.
What did I receive?Which AI-generated code, plans, tests, Docker/CI files, or explanations did I accept or adapt?A Received table with notes about what you still understand and what needs review.
What pattern changes?What will I keep doing, and what will I stop doing?Concrete rules in docs/ai-usage.md.

Three risk levels

Every row in your Shared table gets one of three levels and a reason.

Risk levels · Lecture notes p. 9
Risk levelMeaningExamples
LowPublic, toy, or course-only material that contains no secrets or real private data.Task Tracker sample code, public README text, toy test data.
MediumPrivate but non-sensitive code or project details.Private repository snippets, internal naming conventions, non-secret stack traces.
HighCredentials, secrets, PII, real customer data, private production logs, or sensitive business logic.API keys, .env values, tokens, real customer names, personal data, proprietary production incidents.

Read with carePrompt 5.3A’s rubric is slightly wider than the notes’ table: its High also includes production config, regulated data and code you are not authorized to share. Its constraint is worth keeping either way: do not minimize risk because the project is small.

What goes in the worksheet

The notes give example rows for both tables. Your own rows come from your course history; the last Shared example is a reminder to be honest about mistakes.

Examples to include in the worksheet · Lecture notes pp. 9-10
What I shared with AIWhat I received from AI
Task Tracker code and project structure.Backend models, validators, routes, and storage suggestions.
Test output and stack traces.Frontend board or interaction logic.
Frontend files, Dockerfile, CI YAML, and README snippets.CI workflow, Dockerfile, security findings, and implementation plans.
Any real external data used by mistake.Refactoring suggestions or explanations you accepted too quickly.

Trace one generated block line by line

Pick one block you accepted earlier, such as a CRUD endpoint, a validation function, a frontend handler, a Dockerfile instruction or a CI step. Ask Codex to explain each line in plain language. Your job is to mark any line you still cannot explain. The library frames it directly: code you cannot explain is code you do not own.

Prompt shape from the notesExplain this generated block line by line. For each line, state what it does, why it is needed, and what would break if it were removed. If a line depends on a framework convention, explain the convention in plain language. Do not rewrite the code yet. I am checking whether I understand it.

Write rules, not vibes

The notes’ test for a rule is simple: could a teammate read it and know whether a behavior violates it? If yes, it is a rule. If they would have to ask what you meant, it is still a vibe.

Weak rules and stronger rules · Lecture notes p. 10
Weak ruleStronger rule
Be careful with AI.Never paste .env files, secrets, credentials, tokens, or real customer data into an AI tool.
Always check the code.Before accepting a diff, I will read every changed file and run the relevant test or manual verification command.
Mention AI somehow.For any AI-generated code I keep, I will record the prompt, the accepted diff, and the verification I ran in the PR or commit notes.

Key ideaA rule is checkable by someone else. “Be careful” is not a rule.

Before you call it done

The notes’ verification checklist. Prompt 5.3C can help sharpen the rules, but only from your own notes: it writes “Missing - add course evidence” where your notes do not support a rule.

  • docs/governance-worksheet.md includes both Shared and Received tables.
  • Every Shared row has a Low, Medium, or High risk classification with a reason.
  • At least one generated code block has been traced line by line.
  • docs/ai-usage.md contains concrete rules for never-paste, always-verify, and recording AI contributions.
  • The rules are written in your own words and grounded in your own course history.

Key takeaways

  • Three lenses: what you shared, what you received, what pattern changes.
  • Classify every Shared row Low, Medium or High, with a reason, and don’t minimize because the project is small.
  • Trace one accepted block line by line; any line you cannot explain is not yet yours.
  • A rule passes when a teammate could tell whether a behavior violates it.

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 5