Lore

AI coding agents

How to Work with AI Coding Agents: Spec-Driven Development, Context and Loop Engineering, Workflows

Reliable AI-agent-driven software development requires replacing one-shot 'vibe coding' with a repeatable, layered process — specification-driven development, context engineering, loop engineering, and graph engineering — that trades a large, named increase in token cost for a large reduction in the wrong-assumption drift that plagues vague, unsupervised agent prompting.

DataTalksClub ⬛ · 2026-07-22 · English

Key ideas

  1. The video's central problem framing: one-shot/vague prompting ('vibe coding') forces coding agents to silently fill in unstated assumptions about scope and stack, which routinely produces the wrong thing — demonstrated live when an unsupervised agent built an entirely different, unrelated tool from a vague prompt.

  2. The proposed fix is a repeatable, layered process — moving from raw idea to solid code through specification, context, loop, and graph 'engineering' stages — rather than a one-off best practice, positioned as this year's replacement for last year's 'vibe coding' framing.

  3. Precision at the level of user-facing scope (not implementation detail) is what actually prevents agent drift: the human's job is to remove ambiguity in specs and acceptance criteria, while technology choices are left to the agent/architect discussion.

  4. Documents produced early (plan, architecture) are treated as disposable 'seed' material for generating an initial task backlog rather than living documentation, because such docs desynchronize from the evolving codebase in practice; the task tracker (GitHub issues) becomes the durable source of truth going forward.

  5. As the workflow scales, the human's role shifts from writing prompts to designing a system of specialized agent roles (PM, engineer, QA) and an orchestrating loop that manages them, mirroring how a real product team distributes responsibility.

  6. The QA/tester role is argued to be genuinely valuable, not process theater — the presenter reports it catching mistakes the implementing agent missed, echoing the rationale for human code review that self-review is less critical than independent review.

  7. This added structure has a real, named cost: following the full grooming-implement-test process burns roughly 4-5x more tokens per issue than just implementing directly, framed explicitly as a quality-for-cost trade-off, not a free win.

  8. The presenter insists the whole approach should be tool-agnostic (Claude Code, Codex, OpenCode, Cursor) because the tool landscape changes fast enough that last year's course content became partly obsolete within a year, and because the presenter personally switches agents to manage usage limits.

  9. AI outputs still need active human oversight even within this improved process — the presenter repeatedly overrides, trims, or fact-checks agent suggestions (stale model recommendations, hallucinated stack claims, unwanted scope additions), positioning the human as editor/architect throughout rather than passive approver.

  10. Specification-driven development — A two-level process (project-level spec via conversational brainstorming, feature-level spec via issue 'grooming') used to scope a problem before any code is written, replacing one-shot vague prompting. Apply: Before implementing, hold a Q&A-style chat session to lock down project-level product decisions, then convert each backlog item into a groomed spec with goal, description, acceptance criteria, and explicit out-of-scope items.

  11. Context engineering — Proactively supplying a coding agent with durable project context (tooling rules, constraints, doc pointers) via files like AGENTS.md so it doesn't need to rediscover basics each session. Apply: Create a lean, markup-light AGENTS.md in the repo root listing commands, constraints, and pointers to topic docs, and keep it trimmed to only the rules every session actually needs.

  12. Loop engineering — A meta-level practice of engineering a loop or goal that keeps prompting the coding agent so it continues working without the human retyping prompts. Apply: Set a 'goal' (e.g., 'groom all the MVP issues') or a recurring 'loop' prompt so the agent self-continues until the objective is met, instead of stopping after one item.

  13. Graph engineering — Assembling several specialized agent roles (PM, software engineer, QA) into a pipeline/workflow graph with an orchestrator that routes work between them. Apply: Run a main 'orchestrator' session that pulls an issue from the backlog, hands it to the PM agent if not yet groomed, then to the engineer to implement, then to QA to pass/fail, looping back on failure.

  14. Prompt engineering — The base-level practice of writing an explicit prompt so the agent doesn't have to infer missing context. Apply: Instead of 'implement task number one,' write 'implement task number one, which is a GitHub issue,' so the agent doesn't need to guess the task's source.

  15. Vibe coding / 'VIP coding' — A 'shoot and forget,' one-shot prompting mentality where the agent's output is accepted as-is without a repeatable review process. Apply: Named as the approach being replaced in the video; recognizable when a bare prompt is submitted with no further scoping.

  16. Tool map / tool classification — A categorization scheme for AI dev tools into chat applications, AI coding assistants, and project bootstrappers. Apply: Use it to decide which tool type fits a task — chat apps for conceptual/spec work, coding assistants for implementation.

  17. One-shot prompting — Submitting a single vague instruction to a coding agent with no further guidance, to observe what the agent decides on its own. Apply: Deliberately one-shot a vague prompt first as a diagnostic to reveal which assumptions the agent will silently make, before doing spec work.

  18. --dangerously-skip-permissions — A Claude Code launch flag that skips per-action permission prompts. Apply: Reserve it for remote/disposable environments and avoid it as a beginner; use normal permission-prompt mode locally until comfortable with what's being approved.

  19. tmux session — A terminal multiplexer session used to keep a long-running remote agent session alive across dropped connections. Apply: Run the coding agent inside tmux on a remote machine so work isn't lost if the connection drops, and optionally send periodic prompts into that session to implement a manual loop.

  20. '/go' command — A slash command cited as a built-in implementation of loop engineering. Apply: Noted to work 'way better' in Codex than in Claude Code for keeping an agent working autonomously through a task list.

  21. AGENTS.md — A cross-tool convention file holding durable project context (commands, constraints, doc pointers) that Codex reads automatically. Apply: Keep it markup-light (no headers/bold) to save tokens, list only commands/rules every session needs, and prune hallucinated or redundant claims the agent adds.

  22. CLAUDE.md — A Claude Code-specific pointer file used to stay tool-agnostic since Claude Code doesn't auto-read AGENTS.md the way Codex does. Apply: Put a single line in CLAUDE.md instructing Claude to go read AGENTS.md, so the same context file serves every agent.

  23. process.md — A living document describing the team/agent working process (task source, roles, commit discipline) that's expected to grow over sessions. Apply: Start it minimal (tasks live in GitHub issues, read acceptance criteria, commit regularly) and expand it as new roles/conventions like PM and QA are introduced.

  24. Team/role persona files (e.g., PM.md) — Separate files in a 'team' folder defining sub-agent personas (Product Manager, Software Engineer, QA Engineer) with their responsibilities. Apply: Write a persona file like PM.md instructing 'you are a product manager, you groom a task before anyone implements it, read the issue, rewrite it using the template.'

  25. Grooming — The PM practice of rewriting a raw issue into an unambiguous spec with goal, description, checkable acceptance criteria, and explicit out-of-scope items. Apply: Before implementation, have a PM-role agent groom each issue and spin off descoped ideas as separate follow-up issues rather than folding them in.

  26. Checkable acceptance criteria — Concrete, verifiable pass/fail conditions for a task, framed so 'someone should be able to point at the screen and say yes or no.'. Apply: Write criteria specific enough to double as a later test checklist once the agent claims a task is done.

  27. User story framework — A requirement-writing pattern ('As a user, when I want to do X, I do Y') for capturing user-facing intent. Apply: Apply it inside grooming/spec templates to phrase acceptance criteria and scope from the user's point of view.

  28. Jobs-to-be-Done (JTBD) — A named framework for expressing what job a user is trying to accomplish. Apply: Mentioned as one of several frameworks agents already know, usable by simply describing product/UX intent to the agent rather than manually applying JTBD terminology.

  29. MVP / post-MVP labeling — A two-tier labeling convention applied to the issue backlog to separate must-build items from deferred ones. Apply: Label the core generated backlog as MVP and any descoped/agent-proposed extras as post-MVP.

  30. 'Goal' feature (Claude Code / Codex) — An agent feature that keeps re-prompting the agent toward a stated objective until it's achieved, without manual restarting. Apply: Set a goal like 'groom all the MVP issues' so the agent continues through the whole batch instead of stopping after one or two.

  31. 'Loop' feature (Claude Code) — A Claude Code-only feature that re-sends a scheduled prompt (e.g., every 30 minutes) and can be told to stop once a job is complete. Apply: Use it for periodic check-ins on long-running work; for tools without native loop support, replicate it via stop hooks or periodic tmux messages.

  32. Orchestrator pattern — Designating the main agent session as an orchestrator that launches PM, engineer, and QA as sub-agents rather than doing grooming/implementation/testing itself. Apply: Instruct the main session explicitly not to groom, implement, or test directly, only to launch and sequence the appropriate sub-agent for each step.

  33. QA engineer / tester role — A dedicated sub-agent role that checks an implemented task against its acceptance criteria and returns a binary pass/fail verdict, sending failures back to the engineer. Apply: Define a QA persona instructing it to check each acceptance criterion against tests and always output pass or fail, mirroring human code review's 'second pair of eyes.'

  34. Sub-agents — A capability supported by Codex, Claude Code, and likely other engines, letting a main session spawn separate agent sessions for specific roles. Apply: Use sub-agent launching to implement the orchestrator/graph-engineering pattern across PM, engineer, and QA roles.

  35. Start / Stop / Continue framework — A retrospective feedback framework where each team member submits what to start, stop, and continue doing. Apply: Used as the weekly feedback submission format inside the demo 'RetroLoop' tool's spec.

Insights

The live demonstration of an unsupervised agent building a wholly unrelated 'Python CLI for tracking weekly project health' instead of the requested feedback tool functions as direct, replicable evidence for the ambiguity-drift problem, not just an assertion.

The presenter speculates that Claude (an Anthropic model) may have downplayed a competing OpenAI model's currency ('GPT-4o was released like 2 years ago, so I think it's kind of lying') — flagged as the presenter's own suspicion about possible model self-interest/bias, not verified fact.

LLM knowledge-cutoff is cited as a concrete, recurring failure mode in tech-stack recommendations (e.g., suggesting GPT-4o when newer models exist), motivating a specific habit of line-by-line verification of AI-suggested dependencies/versions.

Grooming instructions explicitly require listing what NOT to implement, because agents left unconstrained tend to add extra 'good ideas' beyond scope, inflating maintenance burden — an insight about agent behavior under ambiguous tasks, not just human-side ambiguity.

Different agents need different plumbing for the same context: Codex auto-reads AGENTS.md but Claude Code doesn't, so the presenter maintains a one-line CLAUDE.md pointer purely to keep the setup interchangeable between tools.

The presenter names an explicit, numeric quality/cost trade-off for the full agent-team process (~4-5x token cost per issue) rather than treating 'more process = better' as costless, attributing much of the extra cost to frequent QA fail verdicts sending work back to the engineer.

The presenter deliberately keeps AGENTS.md free of markdown formatting (headers, bold) purely because that formatting consumes tokens without adding value for the agent.

Old, pre-process personal projects (e.g., the presenter's own course-platform codebase) are cited as a counter-example: without the grooming/QA process, the presenter reports needing to be manually more careful with tests, implying the process's benefits are felt most when actually followed consistently.

«a course that is called AI dev tools zoom camp»

— 00:41

«So what I want to do is I call it AI native developer workflow right?»

— 04:52

«So what we will have today instead of that is a process that you can follow to make sure that the code we create with a coding agent is actually solid.»

— 05:31

«So we are not focusing on technologies here»

— 09:19

«here we we will be product managers. We will be architects.»

— 09:37

«I would not recommend to run this dangerously skip permissions»

— 13:39

«it cannot read my mind, right?»

— 17:12

«Ask me one question at a time and keep your output short.»

— 19:56

«We're not going to read any code today.»

— 39:23

«I think of myself as a PM, a product manager plus architect.»

— 45:13

«I would really challenge here every single line.»

— 46:04

«context engineering in case of coding agents is about creating this file called agents.md.»

— 63:02

«I want my setup to be tool agnostic.»

— 64:52

«Make acceptance criteria checkable. Someone should be able to point at the screen and say yes or no.»

— 77:39

«No part of the flow touches email. There is no mail back end, no verification, no self-serve password reset.»

— 83:00

«The tester often finds some things that a software engineer missed. So this is quite important.»

— 112:43

«if you follow the process you will consume a lot more tokens»

— 112:55

«so I think I should um stop here.»

— 113:39

Reception

Viewers found the workshop valuable and expressed appreciation, with interest in joining the related free course.

A dense, live-coded demonstration more than a theory talk — its value is in the concrete artifacts (AGENTS.md, grooming templates, the PM/engineer/QA orchestrator pattern) and the explicit token-cost trade-off it names, though several tool-specific claims (Codex vs. Claude Code loop support, model release dating) are tied to a fast-moving landscape the presenter himself says goes stale within a year.

114:32

↳ DataTalksClub ⬛ · YouTube

Watch original