Mingqi Hou

How I Structure AI-Assisted Development: SDD, Rules, Skills, and MCP

A stack I use on real repos—spec-driven changes, persistent rules, procedural skills, and MCP for design, browser, and API truth.

On client and internal repos I do not treat the model as a one-off chat. I stack four layers so each change has truth, constraints, playbooks, and live data:

LayerAnswersExamples
SDD (spec-driven development)What should change, how do we know we are done?OpenSpec: proposaltasksspec delta → archive
RulesWhat is allowed / forbidden in this codebase?.agents/rules/ — structure, naming, API error handling
SkillsHow do we execute a class of work step by step?create-route, design-analysis, ui-verification
MCPWhat can the agent see or do in the real world?Design files, browser, OpenAPI, library docs

Rules = correctness boundaries. Skills = procedures. MCP = senses and hands. SDD = why we are changing anything and what “done” means.

SDD: spec before diff

Any non-trivial change starts as a tracked change, not a vague prompt:

openspec/
├── project.md      # Conventions the agent must respect
├── specs/          # Current truth (what the system does today)
└── changes/
    └── <change-id>/
        ├── proposal.md
        ├── tasks.md
        ├── design.md      # optional
        └── spec-delta.md

Typical flow:

  1. openspec proposal — turn a PRD, ticket, or message into proposal + tasks + spec delta.
  2. Human review — scope and acceptance criteria locked.
  3. openspec apply — agent executes tasks against Rules + Skills + MCP.
  4. openspec archive — merge spec delta into specs/ so the next change starts from updated truth.

This stops “the model guessed the product intent” from becoming production code.

Rules vs Skills (do not mix them)

Rules — short, stable, always-on:

If it fits in one sentence without steps, it is a Rule.

Skills — procedural, loaded when relevant:

If it needs steps, checkpoints, or templates, it is a Skill.

Cursor Rules map to the first bucket; Skills (and Agent Skills open standard) map to the second—with progressive disclosure so you do not pay 20k tokens up front for every chat.

MCP in the loop

MCP roleWhy
Design (Pencil / Figma)Ground UI work in real nodes, not hallucinated components
Browser (IDE / Playwright)See console, layout, and regressions
ApiFox / OpenAPIRequests match the contract
Context7 (or llms.txt)Library APIs match current docs

MCP is not “more tools for fun”—it reduces rework when the model would otherwise invent props or endpoints.

How a feature actually runs

  1. Product input → OpenSpec change (scope + tasks + spec delta).
  2. Agent reads Rules + relevant Skills.
  3. MCP pulls design screenshot, running page, or OAS.
  4. Code changes land in small, reviewable diffs.
  5. UI verification skill checks against spec delta.
  6. Archive updates specs/ for the next iteration.

Relation to agents and RAG

If you hire me to introduce AI coding on an existing React/Next team, this is the shape I implement—not “everyone gets a chat box.”