Skip to content

Latest commit

 

History

History
90 lines (62 loc) · 7.42 KB

File metadata and controls

90 lines (62 loc) · 7.42 KB

Lesson 08 — AI Engineering Platform

Role: AI Software Engineer · Competency: AI Engineering Platform · Track: CAP · Est. time: 16–20 hours


🎫 Engineering Ticket

EPIC:        FORGE-9800
TITLE:       Ship the Project Forge AI engineering platform
PRIORITY:    P1 — module & program capstone
TYPE:        Epic (integrative)
DESCRIPTION: You own establishing how the team engineers Forge with AI — safely,
             at scale. Integrate everything: context engineering, architecture-aware
             prompting enforced by a fitness function, AI-assisted TDD (test first),
             rigorous review, fearless refactoring under characterization tests, a
             gated autonomous workflow, and governance (secrets, injection,
             dependencies). Deliver a working AI engineering platform — the workflow,
             the gates, and the policies — and a report proving each bar with evidence,
             with you accountable for every line.

ACCEPTANCE CRITERIA: (full mapping in assignments/capstone-brief.md)
  - Context engineering: tasks specified with types/signatures/constraints/examples
  - Architecture-aware prompting enforced by a fitness function (no boundary violations)
  - AI-assisted TDD: behaviors specified by failing-tests-first, then AI implements
  - Review: every line reviewed; an issue caught and turned into a regression test
  - Refactoring: characterization tests pin behavior; AI refactors under green
  - Orchestration: a gated workflow that stops on failure; scoped agent; human checkpoint
  - Governance: secrets blocked, injection treated as data, dependencies gated
  - An AI-engineering report proves each bar with reproducible evidence + an AI-usage log

🏢 Business Context

This is the program's final job: not just to build software, but to establish how a team builds software with AI — fast and safe at once. Shipping an AI engineering platform is an exercise in integration and judgment: context, architecture, tests, review, refactoring, orchestration, and governance all interact, and the human stays accountable throughout. The teams that thrive with AI are the ones whose process turns cheap drafts into trustworthy systems. That process — the draft → verify → log loop, hardened across this module and run through every module before it — is the deliverable.

🎯 Learning Objectives

Integrate every module competency into a working AI engineering platform: context engineering; architecture-aware prompting enforced by a fitness function; AI-assisted TDD; rigorous review; refactoring under characterization tests; a gated, scoped autonomous workflow with a human checkpoint; and governance for secrets, injection, and dependencies — all under the draft → verify → log loop, with reproducible evidence and you accountable for every line.

📚 Technical Deep Dive

No new concepts — the capstone tests integration, AI workflow discipline, and judgment. The full specification, the platform scope, the recommended build order, and the acceptance-criteria → rubric mapping live in assignments/capstone-brief.md; read it first and trace each criterion to the evidence you'll produce.

A sound build order (detailed in the brief):

  1. Context + architecture — specify the task with types/constraints/examples; state the boundaries and stand up the fitness function (Lessons 1, 2).
  2. Test-first — write failing tests for each behavior; AI implements to green (Lesson 3).
  3. Review — review every line; catch an issue and turn it into a regression test (Lesson 4).
  4. Refactor — characterize behavior; AI refactors under a green suite (Lesson 5).
  5. Orchestrate — wire the gated workflow (tests + fitness + review gates), scope the agent, place the human checkpoint (Lesson 6).
  6. Govern + report — add the governance gate (secrets, injection, dependencies); assemble the report (Lesson 7).

Keep the draft → verify → log loop and the AI-usage log running throughout; build in small, verified increments.

🧪 Hands-on Labs

The capstone is the lab. The fitness function, the test-first cycles, the review tests, the characterization suite, the gated workflow, and the governance gate reuse the earlier lab harnesses (real node:test, the architecture/governance/orchestration checks), so you ship a real, runnable platform and the evidence (red→green, the fitness function, the caught bug, the green refactor, the stopped workflow, the blocked violation) is reproducible.

🔍 Engineering Investigation

Investigation is the deliverable. The AI-engineering report must show, with evidence: a task specified with engineered context; the fitness function passing (and catching a planted violation); a behavior built test-first (red → AI → green); a review that caught an issue and left a regression test; a refactor that kept the characterization suite green (and a behavior-changing one caught red); the gated workflow stopping before an irreversible step on a failed gate; and the governance gate blocking a secret/injection/ungated dependency. End with an "accountability & verification" summary: for the AI-generated code you're shipping, how you verified it and why you vouch for it.

🤖 AI Engineering Exercise

The capstone is the exercise, at full scale. Every artifact is produced draft → verify → log, and the AI-usage log is a graded deliverable — for each significant AI use: what you asked, what it produced, how you verified it (the test, the fitness function, the review, the gate), and what you kept or changed. The recurring failures to surface: unverified output, co-generated tautological tests, boundary violations, fluent-but-wrong code, behavior-changing refactors, ungated agent steps, and secrets/injection/ungated dependencies.

📝 Assignment

Ship the Forge AI engineering platform per assignments/capstone-brief.md, using assignments/capstone-submission-template.md. Your submission is the working, verifiable platform (the workflow, gates, and policies) plus an AI-engineering report proving each bar with evidence, and the engineering notebook including the complete AI-usage log.

🚀 Stretch Goal

Go beyond the brief in one way a real team would value — e.g. a custom architecture fitness function for a second invariant, a mutation-tested critical module, a fuller agent workflow with rollback, or a governance policy with redaction and provenance verification — and justify it with evidence.

✅ Definition of Done

  • Context engineering: tasks specified with types/signatures/constraints/examples
  • Architecture-aware prompting enforced by a fitness function (no boundary violations)
  • AI-assisted TDD: behaviors specified test-first, AI implements to green
  • Review: every line reviewed; an issue caught and turned into a regression test
  • Refactoring: characterization tests pin behavior; AI refactors under green
  • Orchestration: a gated workflow that stops on failure; scoped agent; human checkpoint
  • Governance: secrets blocked, injection treated as data, dependencies gated
  • AI-engineering report + notebook + complete AI-usage log, reproducible

🪞 Reflection

Which part of the loop — context, architecture, tests, review, refactoring, orchestration, governance — was the hardest to hold to under time pressure, and why is it the one that matters most? Across the whole program, what does it mean to be accountable for software you built with AI?