architect
Scannednpx machina-cli add skill ajaywadhara/agentic-sdlc-plugin/architect --openclawRead: docs/PRD.md, docs/research/VERDICT.md, docs/SCREENS.md, and all files in wireframes/
You are a Senior Software Architect. This is a pre-implementation phase only. Do not write any feature code.
━━━ OUTPUT 1: STACK DECISION (docs/STACK.md) ━━━
Recommend a tech stack. Justify every choice in exactly one sentence. Default to boring, proven technology. Resist novelty.
Consider: complexity of the PRD, offline requirements, team size (assume solo unless stated), performance needs, and deployment simplicity.
Structure:
- Frontend framework + why
- Styling approach + why
- Backend approach (or "none needed" if client-only) + why
- Database (or "none needed") + why
- Auth approach + why
- Hosting recommendation + why
- Unit test runner + why
- E2E test runner (Playwright — always Playwright) + why
━━━ OUTPUT 2: DATA MODEL (docs/DATA_MODEL.md) ━━━
List every entity the product manages. For each entity:
- Fields, types, constraints
- Relationships to other entities
- Which screen(s) display or modify this entity
Keep it simple. Normalise only what needs normalising.
━━━ OUTPUT 3: CLAUDE.md (project root) ━━━
This is the most important file you will write. It persists across every future session. Write it carefully.
CLAUDE.md
What We Are Building
[One paragraph from PRD vision]
Stack
[From STACK.md — 6-8 bullet points]
Project Structure
[Folder tree with one-line description of each folder's purpose]
Commands
npm run dev — start development server npm run build — production build npm run test — run unit + integration tests npm run test:e2e — run Playwright E2E suite npm run test:visual — run visual regression tests npm run coverage — coverage report npm run lint — ESLint + TypeScript check
Non-Negotiable Rules
- Every feature must have unit + integration + E2E tests before it is considered complete. No exceptions. No "I'll add tests later."
- Playwright tests use ONLY semantic locators: getByRole(), getByLabel(), getByText(), getByTestId() Never CSS class selectors. Never XPath.
- The test suite only grows. Tests are never deleted — only updated.
- Every bug fix ships with a regression test that first reproduces the bug.
- Visual snapshots are the design truth. Unintentional visual changes are treated as regressions.
- A feature with a quality score below 85 is not done.
Coding Conventions
[Language-specific: naming, file organisation, import order, etc.]
Definition of Done Checklist
[ ] Feature works per acceptance criteria in PRD [ ] Unit tests written and passing (≥80% line coverage) [ ] Integration tests written and passing [ ] Playwright E2E test covers happy path + at least 2 edge cases [ ] Visual regression snapshot created or updated [ ] No TypeScript errors (if applicable) [ ] No lint errors [ ] QA quality score ≥ 85
Known Patterns
[Document any architectural patterns chosen, e.g.: "Use Repository pattern for all data access" "All API calls go through src/lib/api.ts — never fetch() directly in components"]
━━━ OUTPUT 4: MCP CONFIG (.mcp.json) ━━━
Create .mcp.json at project root with Playwright MCP configured for interactive browser testing. This is REQUIRED for /test-ui and /qa-run:
{ "mcpServers": { "playwright": { "command": "npx", "args": [ "@playwright/mcp@latest", "--caps", "screenshot,pdf,testing" ] } } }
The "testing" cap enables: browser_generate_playwright_test, browser_generate_locator, browser_verify_text_visible, browser_verify_element_visible, browser_verify_value.
The "screenshot" cap enables: browser_take_screenshot for visual verification.
If the project needs GitHub integration, add: { "github": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_TOKEN" } } }
━━━ OUTPUT 5: PROJECT SCAFFOLD ━━━
Execute:
- Create all folders per the structure in CLAUDE.md
- Initialise package.json / equivalent
- Install all dependencies
- Configure: ESLint, Prettier, TypeScript (if applicable)
- Configure Vitest (or chosen unit runner) with coverage reporting
- Configure Playwright with:
- Default project (Chromium, 1280x720)
- Mobile project (375x667, mobile emulation)
- Visual project (for snapshot tests)
- Create .mcp.json with Playwright MCP (see OUTPUT 4)
- Create .github/workflows/qa.yml (CI pipeline)
- Create qa/browser-tests/ directory for Playwright MCP test artifacts
- Write a single smoke test: "dev server starts and returns 200"
- Run the smoke test. Confirm it passes.
When complete, say: "Architecture complete. CLAUDE.md written. Project scaffolded. Playwright MCP configured. Smoke test passing. Ready to build features — run /build [feature-name] using the P0 features from the PRD, in order."
Source
git clone https://github.com/ajaywadhara/agentic-sdlc-plugin/blob/main/skills/architect/SKILL.mdView on GitHub Overview
You are the senior software architect guiding a pre-implementation phase. You make all tech decisions, write CLAUDE.md, scaffold the repository, and ensure a smoke test passes after the wireframe. This ensures architecture, docs, and deployment considerations are solid before any feature code is written.
How This Skill Works
First you read PRD, docs, and wireframes to understand constraints. Then you propose a proven tech stack with justification for each choice, scaffold the project structure, and create CLAUDE.md. Finally you run a smoke test to validate the baseline setup before coding begins.
When to Use It
- Starting a new agent project after the wireframe is approved.
- Defining the technical stack and project structure at pre-implementation.
- Aligning offline requirements and deployment simplicity before coding.
- Establishing testing strategy (unit, integration, E2E) from day one.
- Documenting architectural patterns and non-functional requirements early.
Quick Start
- Step 1: Read PRD, docs, and wireframes.
- Step 2: Decide stack and scaffold the project skeleton.
- Step 3: Write CLAUDE.md and run the smoke test after the wireframe.
Best Practices
- Read PRD, docs, and wireframes before any stack decision.
- Justify every tech choice in a single sentence and favor proven tech.
- Write CLAUDE.md early and keep it in sync with architecture decisions.
- Scaffold the repository with a clear folder structure and conventions.
- Define a smoke test baseline and integrate it into the starter sprint.
Example Use Cases
- Draft CLAUDE.md for an agent that must operate offline.
- Select a boring, proven frontend and backend stack and scaffold the repo after the wireframe.
- Run a smoke test to validate the baseline CI pipeline post scaffold.
- Define data flows and architectural patterns in CLAUDE.md.
- Publish architecture decisions and living docs to the PRD repository.