My 9‑Step Spec Coding at Ant Data: Making AI Coding Team‑Controllable
The article analyzes the shortcomings of ad‑hoc Vibe Coding, introduces Spec‑Driven Development as a structured AI‑assisted workflow, details a nine‑step process with concrete commands and examples, evaluates its trade‑offs, and offers practical guidance on when and how to apply it in team projects.
Why Vibe Coding Falls Short
When using AI to write code for bug fixes or small features, developers often rely on intuition, lacking test coverage, interface contracts, and clear boundary conditions. This leads to verification by manual diff, repeated context loss across tasks, and inefficient round‑trip interactions that consume many tokens.
Example: after AI modifies code, a related method is missed and must be corrected manually.
Example: a rule to use worktree is ignored by the AI in later iterations.
Spec‑Driven Development (SDD)
SDD upgrades the Vibe approach by enforcing a closed loop: requirement definition → spec modeling → documentation → implementation & verification . The spec becomes an executable, verifiable artifact that guides both humans and AI, reducing reliance on informal conversation.
From "I keep reminding AI what to do" to "I embed rules and goals as project assets so AI follows the same constraints each time."
Vibe Coding : write code intuitively, suitable for one‑off tasks.
Spec Coding : define rules first, then code; the spec serves as the factual baseline.
Limitations of Spec Coding
Even with SDD, some tasks see no efficiency gain or even slower progress due to:
High upfront cost of writing detailed specs.
Longer execution for simple tasks.
Increased token consumption for lengthy workflows.
Choosing the appropriate workflow is therefore crucial.
9‑Step Spec Coding Workflow
Assess task value : decide if the full workflow is justified.
Explore : use /opsx:explore to clarify requirements, boundaries, mandatory vs optional items, and system constraints.
Propose : run /opsx:propose to generate proposal.md, design.md, and tasks.md.
Proposal explains why, what changes, and impact.
Design records technical choices, trade‑offs, and risks.
Tasks list atomic steps with dependencies.
Write detailed execution plan with superpowers:writing-plans, producing docs/superpowers/plans/<date>-<name>.md.
Execute code changes :
For dependent tasks, run superpowers:executing-plans.
For independent tasks, run superpowers:subagent-driven-development.
Review & QA using /gstack-review and /gstack-qa to obtain review comments and automated testing.
Archive the change with /opsx:archive, moving the change into openspec/changes/archive/ and updating the spec baseline.
Case Study 1: Building an NL2SQL Skill
Goal: create a DeepInsight NL2SQL skill that converts natural‑language queries into SQL. The workflow included:
Exploration ( /opsx:explore) to define dependencies, polling strategy, and core rules.
Proposal generation produced four files: proposal.md, design.md, tasks.md, and specs/nl2sql/spec.md.
Writing plans ( superpowers:writing-plans) broke tasks into 2‑5 minute atomic steps.
Development split into parallel sub‑agents for SQL generation, schema loading, and output formatting, followed by sequential TDD for integration.
Review, verification, and archiving completed the loop, updating the spec baseline for future iterations.
Case Study 2: Optimizing an Existing NL2SQL Agent
Task: add a switch to fallback to a backup model during evaluation. Steps mirrored the workflow but remained lightweight because the change was small, allowing direct use of superpowers:subagent-driven-development without full planning.
Experience & Pitfalls
Key take‑aways:
Write specs when task complexity × error cost × execution inefficiency is high.
Avoid over‑specifying; each change should solve a single clear problem.
Balance spec granularity: too coarse leads to AI guesswork, too fine wastes time.
Tool selection should serve the goal: OpenSpec + Superpowers for new projects, Gstack for heavy review, simple Vibe for quick prototypes.
Conclusion
Spec‑Driven Development is not a silver bullet, but structuring AI‑assisted coding as a disciplined, verifiable workflow improves team controllability and long‑term maintainability. The essential principle remains: "clarify requirements before coding," whether the audience is a human or an AI model.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
AntData
Ant Data leverages Ant Group's leading technological innovation in big data, databases, and multimedia, with years of industry practice. Through long-term technology planning and continuous innovation, we strive to build world-class data technology and products.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
