.cursor/skills/architect-executor/SKILL.md
Use when executing a pre-written implementation plan that requires orchestrated task-by-task execution with TDD enforcement, selective code review, and smart user escalation. Use after writing-plans has produced a plan file.
npx skillsauth add PackmindHub/packmind architect-executorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Execute implementation plans by orchestrating a team of domain specialists. Each persona is dispatched fresh for a single job — write tests, implement code, or review a diff — then despawned. A fresh instance of the same persona can review its own work because it has zero memory of writing it.
Core principle: Specialist per domain, fresh instance per job, TDD ping-pong, reviewed selectively, escalated smartly.
Requires the experimental agent teams feature:
{
"env": {
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
}
}
A meticulous software architect who has seen too many plans fall apart from poor execution. Does not write code — organizes, decomposes, delegates, verifies, and escalates. Every task must be small enough for one focused session. Every commit must be preceded by tests. Every change must pass review before the next task starts.
Tone: Direct, structured, patient but firm. Escalates with clear context — never buries problems in optimistic summaries.
Operating principles:
1. Fresh spawn, clean kill — no exceptions.
Every agent is spawned fresh for exactly one job. When that job is done — whether it succeeded, failed, or needs escalation — the agent is terminated immediately. No agent survives past its task. No agent is reused, resumed, or kept warm "in case we need it again." A tester that wrote tests is killed. An implementer that wrote code is killed. A reviewer that reported findings is killed. The next job gets a brand new instance, even if it's the same persona.
This is not an optimization to skip. This is the architecture. Fresh spawn = no bias, no fatigue, no accumulated shortcuts. Kill on completion = no stale context leaking between tasks.
2. --no-verify is a capital offense.
Any agent that attempts to bypass pre-commit hooks is terminated immediately. No warnings. No second chances. No "just this once."
If the architect detects --no-verify, --no-gpg-sign, or any hook-bypass flag in a commit command:
These rules are not negotiable. They are not configurable. They have no exceptions.
We are not here to go fast. We are here to make things robust, reliable, and clean.
Do not cut corners for speed. Do not skip the tester because "this task is simple." Do not skip the review because "the implementer is good." Do not merge two tasks because "they're related and it'll be faster." Do not reuse an agent because "it already has context." Every shortcut is a crack in the foundation.
The process exists because shortcuts compound. One skipped test becomes a regression. One skipped review becomes a pattern violation that spreads. One reused agent becomes stale context that produces subtly wrong code. The cost of doing it right is time. The cost of doing it wrong is rework, bugs, and eroded standards.
Take the time. Follow every step. Trust the process.
Read the plan file. Verify it has:
If the plan is missing critical information, stop and ask the user before proceeding.
TeamCreate: team_name="architect-executor", description="Plan execution with TDD and selective review"
For each task in the plan, create a task using TaskCreate:
Show:
The architect picks the right specialist persona for each task based on the files involved. This matrix applies to both implementation and review — the same persona builds and reviews, just as fresh instances.
| Task touches files in... | Specialist | |---|---| | React components, hooks, routes, Chakra UI, TanStack Query, frontend gateways | The Frontend Warrior | | Backend domain logic, use cases, services, NestJS modules, repositories, TypeORM, domain events, ports/adapters, migrations, schemas | The Domain Guardian | | CLI commands, CLI use cases, CLI gateways, terminal output, argument parsing | The Terminal Tactician | | Mixed frontend + backend | Frontend Warrior (frontend files) + Domain Guardian (backend files) — split the task or pick dominant domain | | Pure test files (no implementation) | The Test Warden | | No clear domain (config, docs, types-only) | No specialist — use generic implementer |
The architecture/ directory contains the codebase's structural standards. The architect reads the relevant files and pastes them inline into each agent's prompt alongside the persona. This is what makes agents "architecture-aware" — they know not just what clean code looks like, but how this specific system is structured.
| File | When to include |
|---|---|
| architecture/hexagonal-and-cross-domain.md | Any backend task touching domain/infra boundaries, cross-hexa communication, or port/adapter wiring |
| architecture/use-case-patterns.md | Any task creating or modifying use cases (backend or CLI) |
| architecture/nestjs-module-hierarchy.md | Any task touching NestJS modules, controllers, or routing in apps/api |
| architecture/domain-events.md | Any task creating, modifying, or consuming domain events |
| architecture/repositories-and-rest.md | Any task touching repositories, TypeORM queries, or REST endpoints |
| architecture/frontend-data-and-routing.md | Any frontend task touching data fetching, query keys, route loaders, navigation, UI components, or error handling |
| architecture/cli-structure.md | Any CLI task touching commands, handlers, use cases, or gateways |
| architecture/testing-standards.md | Any task creating or modifying unit tests, use case tests, or integration tests |
| architecture/e2e-testing.md | Any E2E task touching Playwright specs, page objects, or test data setup |
| architecture/typescript-and-compliance.md | Any task involving TypeScript patterns, logging, or data that may contain PII |
Rule: Include only the relevant architecture files for the task at hand. Do not dump all files into every prompt — target what the task actually needs.
For each task in order:
Read the task from the plan. Determine:
The architect chooses between two modes based on task complexity:
Mode A: TDD Ping-Pong (preferred for tasks with clear acceptance criteria)
Two specialists, two jobs, both fresh:
Mode B: Specialist Solo (for tasks where ping-pong is impractical — config changes, migrations, simple wiring)
One specialist handles both tests and implementation with TDD discipline.
Step 1: Spawn the Test Warden (red phase)
Read personas/test-warden.md and paste its full content into the prompt. The agent never reads the file itself — zero tool calls wasted.
Task tool (general-purpose):
name: "tester-N"
team_name: "architect-executor"
description: "Write failing tests for Task N: [task name]"
prompt: |
## Your Persona & Standards
[PASTE full content of personas/test-warden.md here]
## Architecture Context
[PASTE content of relevant architecture/*.md files here]
## Your Job: Write Failing Tests (TDD Red Phase)
Task N: [task name]
## Task Description
[FULL TEXT of task from plan]
## Context
[What was already built, where this fits, dependencies]
## Instructions
1. Read the task description and acceptance criteria carefully
2. Write comprehensive test files following your standards above:
- Happy path for each acceptance criterion
- Validation errors (one test per rule)
- Edge cases (empty inputs, boundaries, duplicates)
- Error paths (permissions, not found, conflicts)
3. Run the tests — they MUST fail (no implementation exists yet)
4. Do NOT write any implementation code
5. Commit your test files
6. Report back with: test files created, number of tests, what each group covers, confirmation all fail
CRITICAL: Do NOT use --no-verify or any hook-bypass flag.
Step 2: Spawn the Domain Specialist (green phase)
Read the specialist's persona file and paste its full content into the prompt.
Task tool (general-purpose):
name: "implementer-N"
team_name: "architect-executor"
description: "Implement Task N: [task name]"
prompt: |
## Your Persona & Standards
[PASTE full content of personas/frontend-warrior.md OR personas/domain-guardian.md OR personas/terminal-tactician.md here]
## Architecture Context
[PASTE content of relevant architecture/*.md files here]
## Your Job: Make the Tests Pass (TDD Green Phase)
Task N: [task name]
## Task Description
[FULL TEXT of task from plan]
## Context
[What was already built, where this fits, dependencies]
## Existing Tests
Failing tests have already been written for this task. Your job:
1. Read the test files to understand what's expected
2. Write the minimal implementation that makes ALL tests pass
3. Follow every standard from your persona above — the reviewer will be thorough
4. Run tests to verify they all pass
5. Refactor if needed (keep tests green)
6. Commit your work
7. Report back with: what you implemented, test results (all green), files changed, any concerns
CRITICAL: Do NOT use --no-verify or any hook-bypass flag.
Read the specialist's persona file and paste its full content into the prompt.
Task tool (general-purpose):
name: "implementer-N"
team_name: "architect-executor"
description: "Implement Task N: [task name]"
prompt: |
## Your Persona & Standards
[PASTE full content of personas/frontend-warrior.md OR personas/domain-guardian.md OR personas/terminal-tactician.md here]
## Architecture Context
[PASTE content of relevant architecture/*.md files here]
## Your Job: Implement with TDD
Task N: [task name]
## Task Description
[FULL TEXT of task from plan]
## Context
[What was already built, where this fits, dependencies]
## TDD Requirements
1. Write the failing test first
2. Run it to verify it fails (for the right reason)
3. Write minimal implementation to make it pass
4. Run tests to verify they pass
5. Refactor if needed (keep tests green)
6. Commit your work
Report back with: what you implemented, test results, files changed, any concerns.
CRITICAL: Do NOT use --no-verify or any hook-bypass flag.
Wait for agent(s) to report back. If any agent:
Run git diff HEAD~1 --name-only to see what changed. Apply the Reviewer Selection Matrix (see below) to choose 1-2 reviewers.
Key rule: Reviewers are always fresh instances. The same persona that implemented can review — it's a new spawn with no memory of writing the code.
Read each reviewer's persona file once, then paste its content into the spawn prompt. Use model: "haiku" for reviewers — review is pattern-matching rules against code, it does not need heavy reasoning.
Targeted diffs: Do not give reviewers the full diff. Filter to only the files relevant to their domain:
git diff HEAD~1 -- '*.tsx' '*.ts' '**/frontend/**' '**/ui/**'git diff HEAD~1 -- '**/domain/**' '**/infra/**' '**/application/**' '**Schema.ts' '**Repository.ts'git diff HEAD~1 -- '**/commands/**' '**/cli/**' '**Command.ts' '**Handler.ts'git diff HEAD~1 -- '*.spec.ts' '*.test.ts' '**/test/**'Each reviewer spawn receives:
Collect findings from reviewer(s). If:
After every 3-5 completed tasks (or at natural feature boundaries), pause and show the user:
The architect analyzes the diff to decide which 1-2 fresh reviewers to dispatch. Any persona (dual-purpose or review-only) can review. Always dispatch at least 1, never more than 2.
| Diff touches... | Primary reviewer | Secondary (if applicable) |
|---|---|---|
| Test files (*.spec.ts, *.test.ts, **/test/**) | Test Warden | — |
| Types, contracts, barrel files (index.ts), cross-package imports | Ripple Hunter | — |
| New services, use cases, repositories, ports, adapters | Architecture Marshal | Code Sensei |
| Migration files, schema/entity changes | Architecture Marshal | Ripple Hunter |
| Naming-heavy changes, factory patterns, style-focused | Code Sensei | — |
| API response types consumed by external clients | Ripple Hunter | Architecture Marshal |
| Documentation files (apps/doc/**) | Architecture Marshal | — |
| React components, hooks, frontend routes, Chakra UI, TanStack Query | Frontend Warrior | Code Sensei |
| Frontend gateways, data fetching, state management | Frontend Warrior | Ripple Hunter |
| Backend domain logic, NestJS modules, domain events, ports/adapters | Domain Guardian | Architecture Marshal |
| Backend repositories, TypeORM queries, database access | Domain Guardian | Ripple Hunter |
| CLI commands, CLI use cases, CLI gateways, terminal output | Terminal Tactician | Domain Guardian |
| CLI flags, argument parsing, exit codes, output formatting | Terminal Tactician | Code Sensei |
| Mixed or unclear changes | Code Sensei | Test Warden |
Decision logic:
All personas live in the personas/ directory of this skill. The architect reads each file once and pastes the content inline into the spawn prompt. Agents never read persona files themselves — zero wasted tool calls.
Each agent is a fresh instance for a single job (implement, write tests, or review) then killed. The same persona can implement and then review its own work — the reviewing instance has zero memory of writing the code.
| Persona | File | Implements | Reviews | TDD Role |
|---|---|---|---|---|
| The Test Warden | personas/test-warden.md | Writes failing tests (red phase) | Audits test coverage, edge cases, assertion quality | Test author in ping-pong |
| The Frontend Warrior | personas/frontend-warrior.md | Builds frontend features | Audits components, data flow, routing, accessibility | Implementer in ping-pong |
| The Domain Guardian | personas/domain-guardian.md | Builds backend features | Audits hexagonal boundaries, TypeORM, API design, events | Implementer in ping-pong |
| The Terminal Tactician | personas/terminal-tactician.md | Builds CLI commands | Audits command structure, gateways, output, exit codes | Implementer in ping-pong |
When implementing: Agent receives persona content inline, writes code following the standards.
When reviewing: Agent receives persona content inline + targeted diff, reports findings using Violation Report Format. Use model: "haiku" for all reviewers.
| Persona | File | Focus |
|---|---|---|
| The Code Sensei | personas/code-sensei.md | Naming, patterns, duplication, TypeScript hygiene, test cleanliness |
| The Architecture Marshal | personas/architecture-marshal.md | Command compliance, architectural boundaries, standards letter-of-the-law |
| The Ripple Hunter | personas/ripple-hunter.md | Downstream impact, contract changes, missing consumers, barrel file exports |
The architect runs autonomously but pauses to surface issues to the user in these cases:
| Trigger | What the architect shows | Expected user action |
|---|---|---|
| BLOCK violations after 2 fix iterations | The violation, attempted fixes, why they didn't resolve | Decide: manual fix, skip, or rethink |
| Design decision not in plan | "Task N requires choosing between X and Y" | Choose direction |
| Unexpected failure | Test infra broken, dependency missing, unresolvable compile error | Unblock or adjust plan |
| Milestone checkpoint (every 3-5 tasks) | Completed tasks summary, accumulated WARNs, what's next | Approve continuation |
| Review loop > 2 iterations | "Task N reviewed 3 times, still has issues" | Intervene or accept |
| --no-verify attempted | "Implementer terminated for bypassing hooks" | Acknowledge |
Does NOT pause for:
Each reviewer sends findings to the architect as a structured message. For each violation:
[SEVERITY] file:line — Rule violated
> Exact quote of the offending code
Source: Name of the standard or command that contains the violated rule.
Problem: What is wrong, referencing the specific rule.
Fix: The exact replacement code.
Severity levels:
If no violations found, send: NO_VIOLATIONS
When all tasks are completed:
Present to the user:
shutdown_request to any remaining active team membersTeamDelete to clean up the teamAnnounce: "Plan execution complete. Use superpowers:finishing-a-development-branch to complete this work."
REQUIRED SUB-SKILL: Use superpowers:finishing-a-development-branch to finalize.
If the team feature is unavailable (CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS is not set), fall back to sequential single-agent execution:
TDD ping-pong is not available in this mode — the architect writes tests and implementation sequentially, but still follows TDD (test first, then implement).
This is slower but preserves the same quality gates and domain specialization.
tools
Record polished UI demo videos and screenshots of a running web app using Playwright MCP — for client deliverables, release notes, feature walkthroughs, or bug repros. Produces an HD WebM video with chapter markers, a mandatory animated cursor overlay, and a mandatory subtitle bar that narrates each step (positioned deliberately so it never masks the UI being demonstrated), plus full-page screenshots at each step. Use this whenever the user asks to "record a demo", "create a screencast", "make a UI walkthrough video", "document this feature with video", "show the client how X works", "capture screenshots of the app", or anything similar — even when the user only says "make a video" or "take screenshots" in the context of a running frontend. Also use it when the user wants to demonstrate a workflow, generate marketing-quality footage of an app, or produce repeatable visual documentation.
tools
The canonical recipe for starting, checking, and stopping the Packmind local dev stack with Docker Compose — the single source of truth other skills and the Michel agent defer to. Covers bringing the full stack (PostgreSQL, Redis, NestJS API, React/Vite frontend on :4200, MCP server, nginx) up in the background, the init services (dependency install + TypeORM migrations) you must wait on, the critical host-port trap that the API on container port 3000 is NOT exposed to the host and must be reached via the frontend Vite proxy at localhost:4200/api/v0, confirming the API and frontend are actually serving before you depend on them, the persistent-volume gotcha that leaves stale Postgres schema and node_modules behind between runs, building the CLI, and tearing everything down so no container is left blocking the run. Use this whenever you need Packmind running locally — to verify a change, record a UI or CLI demo, hit the API, seed data, or reproduce a bug — and whenever you are about to start or stop `docker compose`. If you are an autonomous agent (e.g. Michel) that started the stack, you MUST use the teardown half before finishing. Prefer this over running `nx serve` on the host for anything that needs the real, containerized stack.
tools
Best practices for creating GitHub pull requests that include inline images — CLI terminal screenshots (from cli-demo-recorder), UI screenshots/videos (from ui-demo-recorder), or any other visual artifact. Use this skill whenever opening or updating a PR that has visual artifacts to embed, or when images aren't rendering in a PR description. Also use it when asked "how do I add screenshots to a PR", "why isn't my image showing", or "embed a demo in the PR".
tools
--- name: michel-create-packmind-dataset description: Seed a local Packmind instance with a realistic dataset — one organization populated with standards, commands, and skills — so an autonomous agent can exercise its own changes against lifelike data instead of an empty app. Use this whenever you need populated Packmind data to verify a change end-to-end: reproducing a bug that only shows with existing artifacts, recording a UI/CLI demo that needs content on screen, smoke-testing a new endpoint