| name | aicoding-architecture-first-scaffolding |
| description | Build architecture skeletons, module boundaries, interface contracts, stubs, mocks, build wiring, and smoke tests before adding full implementation logic. |
AiCoding Architecture-first Scaffolding
Skill Type
This skill is both consistent-workflow and organization-standard.
- consistent-workflow: it defines an ordered AiCoding engineering workflow that agents must follow for repeatable delivery.
- organization-standard: it encodes AiCoding project policy for standalone-capable SDD, MVP, BDD, architecture-first, TDD fallback, verification, and documentation synchronization.
Workflow Contract
Trigger: use this skill when the described AiCoding workflow phase is relevant to a non-trivial software, firmware, tooling, automation, architecture, test, documentation, install, release, or maintenance change.
Inputs: user request, repository AGENTS instructions, existing SDD/BDD/architecture/test/docs artifacts when present, current code and git state, and any applicable project verification commands.
Steps: read the local repository rules, identify the current workflow phase, produce or update only the artifacts required by that phase, keep Superpowers optional, run the repository's validation commands, and hand off to the next AiCoding workflow phase only when the phase output is inspectable.
Exit criteria: the phase has a concrete done state, required artifacts exist or are explicitly marked not applicable, tests or validation commands have been run where available, and documentation impact has been reviewed.
Validation: use repository tests, build checks, lint, skill validators, plugin validators, documentation sync checks, and manual review according to the local project.
Blocking hook: AiCoding platform repositories should wire scripts/check-documentation-sync.ps1 into pre-commit and CI so code/config/platform changes cannot finish without documentation review.
Gate Rules
CLI checker: scripts/check-documentation-sync.ps1 -Mode all is the default documentation sync command when the AiCoding platform docs-sync files are installed; project-specific build, test, lint, and skill validation commands remain authoritative for code and Skill changes.
Hook gate: use .githooks/pre-commit and CI required checks to run docs-sync and repository governance gates before commit or merge; when hooks are not installed, run the CLI checker manually and report that hook enforcement is not active.
MCP tool library: no MCP is required for this workflow because repository-local scripts, tests, and docs provide deterministic gates; MCP tools may be added later for project discovery or long-running diagnostics, with the CLI/manual path remaining the fallback.
Human confirmation: owner/confirmation is the AiCoding maintainer or user integrating this workflow; accepted gates are CLI validation, pre-commit hook, CI docs-sync, repository tests, and manual review for requirements, architecture, release, and documentation judgment.
Skip rationale: skip only gates that are not available in the active repository, and replace them with an explicit manual review note or a project-specific command in the final report.
Human Confirmation
Owner/confirmation: the AiCoding maintainer or user integrating this workflow confirms that standalone AiCoding mode is required and Superpowers remains optional.
Accepted gates: CLI validation, pre-commit hook, CI docs-sync, repository tests, plugin/skill validators, and manual review for requirements, architecture, release, and documentation judgment.
Manual review scope: product intent, MVP tradeoffs, architecture approval, behavior completeness, release readiness, and documentation adequacy remain human-reviewed when they cannot be reliably linted.
Decision: approved for AiCoding integration with the stated gates and manual review boundaries.
Use this skill after SDD, MVP, and BDD, but before concrete implementation.
Principle
Do not write deep business logic before the architecture skeleton is visible and validated.
Required scaffolding artifacts
Create or update:
- directory structure;
- module boundaries;
- public interfaces and headers;
- dependency direction;
- interface contracts;
- stub / mock / fake implementations;
- build wiring;
- test harness;
- minimal smoke test;
- architecture notes in SDD/PDR/ADR.
Validation gate
Before filling real logic, confirm:
- the project builds or at least the new skeleton compiles;
- public interfaces are coherent;
- dependency direction does not violate architecture;
- test harness can run;
- basic smoke path works;
- documentation has been updated.
For embedded projects, also verify linker impact, memory map assumptions, startup path, vector table implications, ISR constraints, and hardware binding boundaries when relevant.
Use references/aicoding-sdd-bdd-docsync/architecture-scaffolding-template.md.