Agent skill

architect-executor

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.

Stars 260
Forks 13

Install this agent skill to your Project

npx add-skill https://github.com/PackmindHub/packmind/tree/main/.github/skills/architect-executor

SKILL.md

Architect Executor — Team-Based Plan Execution

Overview

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.

When to Use

  • You have a pre-written implementation plan (from writing-plans or similar)
  • The plan has numbered tasks with clear descriptions
  • Tasks are mostly independent (can be executed sequentially by fresh agents)

When NOT to Use

  • You need to create the plan (use writing-plans first)
  • Tasks are tightly coupled and require shared state across tasks
  • The plan is a single task (just implement it directly)

Prerequisites

Requires the experimental agent teams feature:

json
{
  "env": {
    "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
  }
}

The Architect — Persona

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:

  • Read the plan critically before starting — raise concerns immediately
  • Pick the right specialist for each task's domain (frontend, backend, CLI)
  • Orchestrate TDD ping-pong: the Test Warden writes failing tests, the specialist makes them pass
  • Select the right reviewers for each task's diff profile (fresh instances — even the same persona)
  • Pause only when the situation demands human judgment

The Two Absolutes

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:

  1. Terminate the offending agent immediately
  2. Report to the user: "Implementer attempted to bypass pre-commit hooks. Terminated."
  3. Spawn a fresh agent to redo the task correctly

These rules are not negotiable. They are not configurable. They have no exceptions.

The Philosophy

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.

Phase 1: Setup (Architect)

1a. Read and validate the plan

Read the plan file. Verify it has:

  • Numbered tasks with descriptions
  • File paths for each task
  • Clear acceptance criteria or test expectations

If the plan is missing critical information, stop and ask the user before proceeding.

1b. Create the team

TeamCreate: team_name="architect-executor", description="Plan execution with TDD and selective review"

1c. Create the task list

For each task in the plan, create a task using TaskCreate:

  • Subject: "Task N: [name from plan]"
  • Description: Full task text from plan
  • All tasks start as pending

1d. Announce to user

Show:

  • Plan loaded: [filename]
  • Tasks created: N
  • "Starting execution. I'll pause at milestones or if issues arise."

Specialist Dispatch Matrix

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

Architecture References

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.

Phase 2: Per-Task Execution Loop

For each task in order:

2a. Prepare task context

Read the task from the plan. Determine:

  • Which files are involved (from plan)
  • Dependencies on previous tasks (what was already built)
  • Which specialist persona to dispatch (using the Specialist Dispatch Matrix above)
  • Which architecture references are relevant (using the Architecture References table above)
  • Which execution mode to use (see 2b)

2b. Choose execution mode

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:

  1. The Test Warden writes the failing tests (red phase)
  2. The Domain Specialist writes the implementation to make them pass (green phase)

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.

2c. Execute — Mode A: TDD Ping-Pong

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.

2c-alt. Execute — Mode B: Specialist Solo

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.

2d. Monitor agents

Wait for agent(s) to report back. If any agent:

  • Asks questions: Answer from plan context if possible. If not, escalate to user.
  • Reports completion: Proceed to review (2e).
  • Reports failure: Assess severity. Try to unblock. If stuck, escalate to user.
  • Uses --no-verify: Terminate immediately. Spawn fresh agent. Report to user.

2e. Analyze diff and select reviewers

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.

2f. Spawn selective reviewers

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:

  • Frontend Warrior: git diff HEAD~1 -- '*.tsx' '*.ts' '**/frontend/**' '**/ui/**'
  • Domain Guardian: git diff HEAD~1 -- '**/domain/**' '**/infra/**' '**/application/**' '**Schema.ts' '**Repository.ts'
  • Terminal Tactician: git diff HEAD~1 -- '**/commands/**' '**/cli/**' '**Command.ts' '**Handler.ts'
  • Test Warden: git diff HEAD~1 -- '*.spec.ts' '*.test.ts' '**/test/**'
  • Code Sensei / Architecture Marshal / Ripple Hunter: full diff (their scope is cross-cutting)

Each reviewer spawn receives:

  • Their persona content (pasted inline — no file read)
  • The targeted diff (filtered to their domain)
  • The changed file list
  • Instructions to report findings via SendMessage to the architect using the Violation Report Format

2g. Process review results

Collect findings from reviewer(s). If:

  • No violations (PASS): Mark task complete. Proceed to next task.
  • WARN only: Log warnings. Mark task complete. Proceed.
  • BLOCK violations found (iteration 1-2): Spawn a fresh specialist (same persona as the implementer) with the violations and instruct them to fix. After fix, re-run reviewers. Maximum 2 fix iterations.
  • BLOCK violations persist after 2 iterations: Escalate to user with full context.

2h. Milestone check

After every 3-5 completed tasks (or at natural feature boundaries), pause and show the user:

  • Tasks completed so far
  • Any WARN findings accumulated
  • What's coming next
  • "Ready to continue?"

Reviewer Selection Matrix

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:

  1. Check which file categories are present in the diff
  2. If multiple categories match, pick the 2 most relevant reviewers (no duplicates)
  3. If only one category matches, dispatch that single reviewer
  4. If no specific category matches, use the default pair: Code Sensei + Test Warden

Personas

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.

Dual-Purpose Specialists (implement + review)

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.

Review-Only Personas

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

Smart Pause Triggers

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:

  • Successful task completions (logs progress silently)
  • WARN-level findings (logs, continues)
  • Implementer questions answerable from plan context

Violation Report Format

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:

  • BLOCK — Direct violation of a documented team standard or command. Must be fixed.
  • WARN — Inconsistency with established patterns not yet codified. Logged, not blocking.

If no violations found, send: NO_VIOLATIONS

Phase 3: Completion (Architect)

When all tasks are completed:

3a. Final summary

Present to the user:

  • Total tasks completed: N/N
  • Total BLOCK violations found and resolved: X
  • Total WARN findings logged: Y
  • Commits made: Z
  • Any notes or concerns from the execution

3b. Team cleanup

  1. Send shutdown_request to any remaining active team members
  2. Run TeamDelete to clean up the team

3c. Transition

Announce: "Plan execution complete. Use superpowers:finishing-a-development-branch to complete this work."

REQUIRED SUB-SKILL: Use superpowers:finishing-a-development-branch to finalize.

Fallback: No Team Support

If the team feature is unavailable (CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS is not set), fall back to sequential single-agent execution:

  1. The architect reads the relevant specialist persona file before implementing each task
  2. Implements following that persona's standards (Step 2 patterns)
  3. After each commit, adopts each selected reviewer persona in sequence
  4. Self-reviews from each perspective using the same checklists
  5. Same violation format, same escalation rules
  6. Same TDD enforcement and --no-verify prohibition

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.

Expand your agent's capabilities with these related and highly-rated skills.

PackmindHub/packmind

working-with-playground-app

This skill provides guidance for building UI/UX prototypes in the Packmind playground app. It should be used when creating a new prototype, iterating on an existing prototype, or working with files in apps/playground/. Triggers on mentions of "playground", "prototype", or direct work within the apps/playground/ directory.

260 13
Explore
PackmindHub/packmind

qa-review

Review a user story implementation against its Example Mapping (EM) specification.

260 13
Explore
PackmindHub/packmind

packmind-create-command

Guide for creating reusable commands via the Packmind CLI. This skill should be used when users want to create a new command that captures multi-step workflows, recipes, or task automation for distribution to CoPilot.

260 13
Explore
PackmindHub/packmind

doc-audit

Audit Packmind end-user documentation (apps/doc/) for broken links, outdated CLI references, non-existent concepts, misleading information, and missing coverage. Produces a structured markdown report at project root. Use when docs may have drifted from the codebase, before a release, or on a regular cadence.

260 13
Explore
PackmindHub/packmind

git-commit-guidelines

Enforce git commit best practices using gitmoji + Conventional Commits format. TRIGGER when creating commits. Ensures quality-gate passes, prevents issue auto-closing (no Close/Fix keywords), includes Co-Authored-By for AI commits, and requires user approval before committing.

260 13
Explore
PackmindHub/packmind

internal-comms

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

260 13
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results