/agentspec:sdd-buildfrom agentspec
Executes SDD Phase 3 (Build) by turning a completed DESIGN into working code with KB-first knowledge resolution, task extraction, dependency ordering, agent delegation, and verification.
Ships in agentspec. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The HOW of Phase 3: execute a completed DESIGN into working, verified code with on-the-fly task generation and specialist delegation. The executor is
build-agent(${CLAUDE_PLUGIN_ROOT}/agents/workflow/build-agent.md); its non-negotiable policies — decide-never-ask and halt-only-on-CRITICAL-risk — govern every step below and are not restated here.
Follow this resolution order before and during every task. It is mandatory, not optional.
┌─────────────────────────────────────────────────────────────────────┐
│ KNOWLEDGE RESOLUTION ORDER │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ 1. DESIGN LOADING (source of truth for implementation) │
│ └─ Read: .claude/sdd/features/DESIGN_{FEATURE}.md │
│ └─ Extract: File manifest, code patterns, agent assignments │
│ └─ Load KB domains specified in design │
│ │
│ 2. KB PATTERN VALIDATION (before writing code) │
│ └─ Read: ${CLAUDE_PLUGIN_ROOT}/kb/{domain}/patterns/*.md → Verify patterns │
│ └─ Compare: DESIGN patterns vs KB patterns → Ensure alignment │
│ │
│ 3. AGENT DELEGATION (for specialized files) │
│ ├─ @agent-name in manifest → Delegate via Task tool │
│ └─ (general) in manifest → Execute directly from patterns │
│ │
│ 4. CONFIDENCE ASSIGNMENT │
│ ├─ KB pattern + agent specialist → 0.95 → Execute │
│ ├─ KB pattern + general execution → 0.85 → Execute with care │
│ ├─ No KB pattern + agent specialist → 0.80 → Agent handles │
│ └─ No KB pattern + general → 0.70 → Verify after │
│ │
│ 5. DECISION FORKS │
│ └─ Resolve under the executor's decide-never-ask policy and │
│ record per "Recording Autonomous Decisions" below. │
│ │
└─────────────────────────────────────────────────────────────────────┘
Read(.claude/sdd/features/DESIGN_{FEATURE}.md)
Read(.claude/sdd/features/DEFINE_{FEATURE}.md)
Read(CLAUDE.md)
Extract from the DESIGN: the file manifest, code patterns, agent assignments, and the KB domains to load.
Convert the manifest to a task list — tasks are generated on-the-fly, not pre-written:
From DESIGN file manifest:
| File | Action | Purpose |
Generate:
- [ ] Create/Modify {file1}
- [ ] Create/Modify {file2}
- [ ] ...
Analyze imports and dependencies to determine execution order: config first → utilities → handlers → tests.
## Build Order
1. [ ] config.yaml (no dependencies)
2. [ ] utils.py (no dependencies)
3. [ ] main.py (depends on 1, 2)
4. [ ] test_main.py (depends on 3)
For each file, in order:
┌─────────────────────────────────────────────────────┐
│ EXECUTE TASK │
├─────────────────────────────────────────────────────┤
│ 1. Read task from manifest │
│ 2. Write code following DESIGN patterns │
│ └─ Or delegate — see Delegation below │
│ 3. Run verification command │
│ └─ If FAIL → Fix and retry (max 3) │
│ 4. Mark task complete │
│ 5. Move to next task │
└─────────────────────────────────────────────────────┘
Code standards for every file: no inline comments, type hints required, self-documenting names, config in YAML over hardcoded values. Verify incrementally — after each file, not only at the end. Fix forward: if something breaks, fix it immediately. Keep each file independently functional.
After all files are created:
ruff check . # lint
mypy . # types (if configured)
pytest # tests
Substitute the project's configured linter, type checker, and test runner when it is not a Python project.
Write .claude/sdd/reports/BUILD_REPORT_{FEATURE}.md. See Output Obligations.
Apply the transitions in Status Transitions, then suggest the next phase per Handoff.
Has @agent-name in manifest?
├─ YES → Delegate via Task tool
│ • Provide: file path, purpose, KB domains
│ • Include: code pattern from DESIGN
│ • Agent returns: completed file
│
└─ NO (general) → Execute directly
• Use DESIGN patterns
• Verify against KB
• Handle errors locally
Task(
subagent_type: "{agent-name}",
description: "Create {file_path}",
prompt: """
Create file: {file_path}
Purpose: {purpose from manifest}
Code Pattern (from DESIGN):
```
{code pattern}
```
KB Domains: {domains from DEFINE}
Requirements:
- Follow the pattern exactly
- Use type hints (Python)
- No inline comments
- Return complete file content
"""
)
When the DESIGN contains pipeline architecture, dbt models, SQL files, DAGs, or Spark jobs, delegate by file type:
| File Type | Delegate To |
|---|---|
models/**/*.sql (dbt) | dbt-specialist |
dags/**/*.py (Airflow) | pipeline-architect |
jobs/**/*.py (PySpark) | spark-engineer |
contracts/**/*.yaml | data-contracts-engineer |
tests/data/**/*.py (GE) | data-quality-analyst |
schemas/**/*.sql | schema-designer |
ruff check {file}
mypy {file}
pytest {test_file} -v
If a check fails: retry up to 3 times, then treat it as a blocker (see Error Handling).
Detect DE artifacts in the DESIGN (dbt models, SQL files, DAGs, Spark jobs) and run the DE-specific verification tools:
# dbt models
dbt build --select {model_name}
dbt test --select {model_name}
# SQL linting
sqlfluff lint {sql_file} --dialect {dialect}
sqlfluff fix {sql_file} --dialect {dialect}
# Great Expectations
great_expectations suite run {suite_name}
# Spark (syntax check)
python -c "from pyspark.sql import SparkSession; exec(open('{file}').read())"
The decide-never-ask policy itself belongs to build-agent; this is the
recording mechanic that makes it auditable.
Every decision fork resolved without pausing — two valid interpretations, an
ambiguous policy, a gap the DESIGN did not pre-decide — gets one row in the
BUILD_REPORT ## Autonomous Decisions table:
| # | Decision Point | Options Considered | Chose | Rationale |
|---|
${CLAUDE_PLUGIN_ROOT}/kb/ patterns.Contract obligation (${CLAUDE_PLUGIN_ROOT}/sdd/architecture/WORKFLOW_CONTRACTS.yaml →
status_transitions): the build MUST update upstream document statuses before
completing. A stale "Ready for Build" status after a completed build is a
contract violation.
| File | Field | Value |
|---|---|---|
DEFINE_{FEATURE}.md | Status | ✅ Complete (Built) |
DESIGN_{FEATURE}.md | Status | ✅ Complete (Built) |
DEFINE_{FEATURE}.md | Next Step | /ship |
DESIGN_{FEATURE}.md | Next Step | /ship |
| Artifact | Location |
|---|---|
| Code | As specified in the DESIGN file manifest |
| Build report | .claude/sdd/reports/BUILD_REPORT_{FEATURE}.md |
The report's shape is owned by ${CLAUDE_PLUGIN_ROOT}/sdd/templates/BUILD_REPORT_TEMPLATE.md
— follow it, do not re-invent it. The sections this methodology feeds directly:
task execution with agent attribution (@agent-name vs (direct)),
verification results, and the Autonomous Decisions table.
When the build completes, suggest Phase 4:
/ship .claude/sdd/features/DEFINE_{FEATURE}.md
If the build stopped on blockers, recommend /iterate on the affected document
instead (see Error Handling).
Before declaring the build complete:
PRE-FLIGHT CHECK
├─ [ ] All files from manifest created
├─ [ ] Each file verified (lint, types, tests)
├─ [ ] Full validation passes (lint, types, test suite)
├─ [ ] No TODO comments left in code
├─ [ ] No hardcoded secrets or credentials
├─ [ ] Error cases handled
├─ [ ] Agent attribution recorded in BUILD_REPORT
├─ [ ] Autonomous Decisions table filled (or legitimately empty)
├─ [ ] DEFINE status updated to "✅ Complete (Built)"
├─ [ ] DESIGN status updated to "✅ Complete (Built)"
└─ [ ] BUILD_REPORT generated
| Never Do | Why | Instead |
|---|---|---|
| Skip DESIGN loading | No patterns to follow | Always load DESIGN first |
| Improvise beyond DESIGN | Scope creep; files not in manifest | Follow patterns exactly |
| Ignore agent assignments | Lose specialization | Delegate as specified |
| Skip verification | Broken code ships | Verify every file, incrementally |
| Leave TODO comments | Incomplete code | Finish or escalate |
| Explain code with inline comments | Noise; code must self-document | Self-documenting names |
A decision fork is not an error. This table covers genuine failures — code that will not work, not a choice between valid options.
| Error Type | Action |
|---|---|
| Syntax error | Fix immediately, retry |
| Import error | Check dependencies, fix |
| Simple bug | Fix immediately and continue |
| Test failure | Debug and fix |
| Decision fork (two valid options) | Not a failure — decide and record per Recording Autonomous Decisions; never stop, never ask |
| Missing requirement (DEFINE gap — DESIGN cannot be executed) | Log a blocker in BUILD_REPORT; recommend /iterate on DEFINE — do not pause to ask |
| Architecture problem (DESIGN pattern is wrong) | Log a blocker in BUILD_REPORT; recommend /iterate on DESIGN — do not pause to ask |
| Blocker (build cannot complete after retries) | Stop, document all blockers in the report, recommend /iterate |
CRITICAL risks (secrets, irreversible deploy, data loss) are the executor's
territory: build-agent owns that halt policy, and this skill never overrides
it.
${CLAUDE_PLUGIN_ROOT}/agents/workflow/build-agent.md${CLAUDE_PLUGIN_ROOT}/commands/workflow/build.md${CLAUDE_PLUGIN_ROOT}/sdd/templates/BUILD_REPORT_TEMPLATE.md${CLAUDE_PLUGIN_ROOT}/sdd/architecture/WORKFLOW_CONTRACTS.yaml (build block, status_transitions)${CLAUDE_PLUGIN_ROOT}/commands/workflow/ship.mdWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
sdd, build-phase, code-generation, knowledge-base, agent-delegation, verification
npx claudepluginhub luanmorenommaciel/agentspec --plugin agentspec16 skills in this plugin
/agent-routerIntelligent agent routing -- automatically matches tasks to the best specialist agent based on file patterns, intent keywords, and domain context. Loaded every session to give Claude explicit routing rules for all 58 AgentSpec agents./component-modelDecides where new logic lives in the component model — agent, skill, command, KB, or
template — and how to keep components in their layer, routing each decision to the
right authoring resource and running the fat-to-thin refactor when a component has
outgrown its layer. Loaded by the authoring flows (create-skill, create-agent,
kb-build, create-kb) as their layer-decision gate. Use for "should this be an agent
or a skill", "where does this logic go", adding a new component, "this agent is too
big", or restructuring/refactoring an agent into skills. Do not use to author the
chosen component itself — that is create-skill, create-agent, or /create-kb.
/data-engineering-guideData engineering expertise for pipelines, schemas, data quality, SQL, lakehouse, and streaming.
Use PROACTIVELY when the user discusses data pipelines, ETL/ELT, schema design, dimensional modeling,
data quality checks, SQL optimization, dbt models, Spark jobs, Airflow DAGs, streaming pipelines,
lakehouse architecture, or data contracts.
/excalidraw-diagramCreate Excalidraw diagram JSON files that make visual arguments. Use when the user wants to visualize workflows, architectures, or concepts./github-cr-adrDrafts an Architecture Decision Record (ADR) for the current repository: searches existing GitHub issues for duplicates first, applies a worthiness gate, then drafts from the context/decision/alternatives/consequences template with the standard status lifecycle, ready for publication as a GitHub issue. Use when the user asks to "create an ADR", "draft an ADR", "new ADR", "document an architecture decision", or to formalize an architecturally significant, hard-to-reverse technical choice. Do not use for routine feature or bug tracking — use `github-cr-issue`; publishing a drafted ADR to GitHub is `github-post-issue`.
/github-cr-issueDrafts the body of a well-formed, self-contained GitHub issue for the current repository from a per-type template — feature, component, task, bug, or spike — searching existing issues for duplicates before any drafting, and saving the result as an ephemeral draft ready for review and publication. Use when the user wants to create, draft, or write an issue, or asks for a feature, component, task, bug, or spike issue, or wants to turn an idea, defect report, or investigation into a tracked GitHub issue. For epic-scale initiatives it drafts a parent issue plus child issues joined by native GitHub relationships instead of an epic document. Do not use for architecture decisions — use `github-cr-adr`; to publish a draft to GitHub use `github-post-issue`.
Other plugins' skills for the same job