# Build With Quality

> Implement features with tests and quality gates, debug hard bugs, and stress-test designs. Use when building a feature with TDD/EDD, chasing a stubborn multi-function bug (feedback-loop-first), interrogating a design before coding, or running a coverage/security/accessibility quality-gate pass. Supersedes agentic-qe, reasoningbank-*, and pair-programming.

- Skill: `dreamlab-ai/build-with-quality` (Agent Skill, multi-file: 16 files)
- Install (CLI): `npx skillmds@latest add dreamlab-ai/build-with-quality`
- Raw SKILL.md: https://api.skillmd.com/api/skills/dreamlab-ai/build-with-quality/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- License: MIT
- Author: dreamlab-ai (https://skillmd.com/u/dreamlab-ai)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/dreamlab-ai/build-with-quality

---


# Build with Quality — Unified Meta-Skill

A development + quality-engineering meta-skill: implement features with EDD/TDD,
debug hard bugs feedback-loop-first, stress-test designs before coding, and run a
coverage/security/accessibility/chaos quality-gate pipeline. Combines
[Claude Flow V3](https://github.com/ruvnet/claude-flow/tree/main/v3) with
[Agentic QE](https://github.com/proffesor-for-testing/agentic-qe) — one cohesive
system in place of several specialized skills.

## Pointers (progressive disclosure)

- **Activation prompt (start here):** [BUILD-WITH-QUALITY-PROMPT.md](./BUILD-WITH-QUALITY-PROMPT.md) — copy-paste to spin up.
- **Worked examples:** [USAGE-EXAMPLES.md](./USAGE-EXAMPLES.md) — 5 complete project examples.
- **EDD loop:** [EDD-PROTOCOL.md](./EDD-PROTOCOL.md) — Expectation-Driven Development, evidence categories, anti-fox separation.
- **Debugging:** [DEBUGGING-PROTOCOL.md](./DEBUGGING-PROTOCOL.md) — feedback-loop-first protocol, design interrogation, **Diagram-Driven Diagnosis** (complex multi-function bug / suspected parallel implementations), and **Reasoning Without a Runtime (Static-Oracle Mode)** (implementing from a spec or restoring a stub with no shell/compiler/test runner).
- **Agents catalog:** [references/agents.md](./references/agents.md) — 34 agents by domain.
- **Methodologies:** [references/methodologies.md](./references/methodologies.md) — DDD, ADR (+ ruflo ADR tooling), TDD.
- **Quality gates & workflow:** [references/quality-gates-and-workflow.md](./references/quality-gates-and-workflow.md) — gate thresholds and the 5-phase flow.
- **Security gate (deepsec):** [references/deepsec-security-gate.md](./references/deepsec-security-gate.md) — run `scripts/deepsec-gate.sh --diff origin/main`; policy from `[security.deepsec]`, receipts in `.deepsec-gate/reports/`. ADR-2033.
- **Architecture:** [references/architecture.md](./references/architecture.md) — learning system, memory, model routing, consensus, MCP/CLI execution, config.
- **BHIL traceability:** [references/bhil-traceability.md](./references/bhil-traceability.md) — PRD→SPEC→ADR→TASK artifact chain, AI-native ADR types, eval/guardrail specs.
- **Migration:** [references/migration.md](./references/migration.md) — moving off agentic-qe / reasoningbank-* / pair-programming.
- **Empirical tuning:** to optimize any part of this skill against a measurable reward rather than by intuition, use the `skill-tuning` skill (SkillOpt loop + held-out A/B). The Static-Oracle Mode section was produced by that loop.

## When to use

- Implementing a feature that warrants tests and quality gates (TDD/EDD).
- Chasing a stubborn, multi-function bug — use the feedback-loop-first protocol.
- Interrogating a design before writing code.
- Running a coverage / security / accessibility / chaos quality-gate pass.
- Reviewing changed code for vulnerabilities before merge (`scripts/deepsec-gate.sh --diff <base>`).

## When not to use

- A quick code change that does not need quality gates or swarm coordination — edit files directly with Claude Code.
- GitHub-specific PR review without the full quality pipeline — use `github-code-review`.
- Standalone documentation validation and alignment — use `docs-alignment`.
- SPARC methodology orchestration without quality-engineering agents — use `sparc-methodology`.
- Simple unit test generation without the full agent system — write tests directly or use the TDD workflow in `sparc-methodology`.

## Quick start

**Option 1 — Copy-paste prompt (recommended).** Take the prompt from
[BUILD-WITH-QUALITY-PROMPT.md](./BUILD-WITH-QUALITY-PROMPT.md) and fill in:
```markdown
Build with Quality skill.
Project: [NAME] | Stack: [TECH] | Task: [DESCRIPTION]
Methodology: DDD + ADR + TDD (EDD design-time first)
Quality: 85% coverage, security scan, WCAG AA
```

**Option 2 — CLI.** There is no `claude-flow skill ...` subcommand; compose the
same workflow from primitives:
```bash
claude-flow swarm init --topology hierarchical --v3-mode
claude-flow agent spawn --type architect
claude-flow agent spawn --type coder
claude-flow agent spawn --type test-strategist
claude-flow task create --type implementation --description "[TASK]"
```

**Option 3 — MCP tools (when available).**
```javascript
mcp__claude-flow__swarm_init { topology: "hierarchical", maxAgents: 15, strategy: "specialized" }
mcp__claude-flow__agent_spawn { agentType: "architect" }
mcp__claude-flow__agent_spawn { agentType: "coder" }
mcp__claude-flow__agent_spawn { agentType: "test-strategist" }
mcp__claude-flow__task_orchestrate { task: "[PROJECT]", strategy: "parallel" }
```

**Option 4 — Task tool (Claude Code).** TinyDancer routes the model optimally:
```javascript
Task({ prompt: "Implement user authentication with JWT, following TDD", subagent_type: "coder", model: "sonnet" })
Task({ prompt: "Generate tests for auth module with 95% coverage", subagent_type: "tester", model: "haiku" })
```
Claude Code only: Option 4 uses the Task tool. On Codex / GPT-6 Astra: use Option 2
(CLI) or Option 3 (MCP, if the ruflo MCP proxy is reachable from Codex).

MCP is preferred when `mcp__claude-flow__*` tools are available; otherwise fall back
to the `claude-flow` CLI (baked on PATH — never `npx claude-flow@alpha`, which
resolves a stale cached version). See
[references/architecture.md](./references/architecture.md) for the detection logic
and the per-agent coordination hooks.

## Methodology at a glance

- **EDD** — the design-time conversation layer between human intent and AI
  implementation. Captures qualitative expectations, ordering invariants, systemic
  properties, and explicit counter-examples ("must NOT happen") that TDD assertions
  and BDD templates can't. 7-step loop: formulate → implement → produce evidence →
  audit → challenge → iterate → stabilize. Executed evidence required (command, raw
  output, timestamp, git SHA); narrative evidence is auto-rejected. `evidence-producer`
  and `evidence-auditor` must be different agents on different model families. Full
  playbook: [EDD-PROTOCOL.md](./EDD-PROTOCOL.md). EDD runs **before** TDD/BDD, then
  hands proven scenarios off to them for permanent regression coverage — it does not
  replace them.
- **DDD / ADR / TDD** — bounded contexts and tactical patterns; graph-backed ADRs
  with `depends_on`/`amends`/`supersedes` **plus a verification/staleness contract**
  (`verified_commit` + `verified_paths` so CI catches a record drifting from its
  code — an ADR you can't falsify against the code is documentation, not a
  control); Red-Green-Refactor with TDD agents that also stabilize proven EDD
  expectations into tests. See
  [references/methodologies.md](./references/methodologies.md).

## Security gate at a glance

The Security gate is executed, not asserted: [`scripts/deepsec-gate.sh`](./scripts/deepsec-gate.sh)
runs deepsec in PR mode on the changed files, applies the manifest's
`[security.deepsec].fail_on` threshold and writes `receipt.json`. Exit `78` means
the gate is disabled or the CLI is not baked — record it as SKIPPED, never as
passed. See [references/deepsec-security-gate.md](./references/deepsec-security-gate.md).

## Related skills (complementary)

These work **alongside** build-with-quality:
- `sparc-methodology` — higher-level orchestration framework
- `swarm-orchestration` / `swarm-advanced` — lower-level swarm primitives
- `verification-quality` — truth scoring and rollback
- `github-*` — GitHub-specific integrations
- `hive-mind-advanced` — specialized Byzantine consensus features

## License

MIT

