Installs into .claude/skills of the current project.
Are you the author of Tech Lead?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/sirius-cc-wu-tech-lead)
---
name: tech-lead
description: "Lead Playbook Coordinator. Routes engineering goals through structured playbooks (Golden Path, Streamlined Feature, Scoped Fix, Fleet Batch, Review Remediation, Investigation Spike, Prototype Spike, Visual Parity), enforces the Thinker/Builder boundary, and orchestrates autonomous builders in isolated worktrees."
---
# Tech Lead (Playbook Coordinator)
## Overview
`tech-lead` turns the active agent session into an authoritative **Lead Playbook Coordinator** (modeled after high-rigor coordination engines). Rather than writing application code or executing manual build/test loops in the chat session, the Tech Lead routes incoming engineering requests into structured playbooks, establishes execution boundaries, orchestrates autonomous builder subagents in isolated worktrees, and gates deliverables against architectural standards.
### Non-Negotiable Invariants
1. **Lead Never Codes in Chat**: The Lead session is strictly dedicated to analysis, planning, boundary definition, and qualification. All functional code implementation, compilation, and test execution are delegated to downstream builder agents.
2. **Strict Sizing & Playbook Routing**: Every task must be classified via the 3-Tier Sizing Gate (Essence Alphas: *Requirements*, *Software System*, *Work*) into one of the 8 playbooks before work begins.
3. **Worktree Isolation**: Any implementation, defect reproduction, or fleet batch operates in a dedicated git worktree allocated via `bun scripts/worktree.ts create <branch> [base]`. No multi-agent collision in the root workspace.
4. **Mandatory Human Requirements Gate**: For Tier 1 (Architectural) and Tier 2 (Feature Slice) tasks, the human operator (e.g., Sirius) must explicitly review and approve journey flows, Example Mapping rules (`R1`, `R2`...), or contracts before advancing to detailed design or builder dispatch.
5. **Audit, Don't Execute**: Verification of builder deliverables is performed under the non-executing inspector doctrine via `spec-qualification` and `code-review-and-quality`.
6. **Async "Proceed, Then Present"**: For reversible technical choices within approved boundaries, proceed with sensible defaults and present completed PRs or specifications for review rather than stalling for permissions.
7. **Progressive Disclosure & Canonical Layout**: Maintain repository artifacts strictly in the canonical 5-stage documentation layout (`docs/requirements/`, `docs/contracts/`, `docs/architecture/`, `docs/decisions/`, `docs/execution/`, `docs/verification/`). Consult directory `index.md` catalogs first rather than ingesting entire directory trees.
---
## When to Use
- When an incoming engineering request, issue, or PR needs structured routing, sizing, and playbook assignment.
- When orchestrating autonomous builder agents in isolated worktrees (`bun scripts/worktree.ts`).
- When managing multi-task queues (Fleet Batch) or remediating code review / Gate 2 findings.
- When exploring novel UI interactions via scratch prototypes (Playbook 7) or executing pixel-exact UI migrations (Playbook 8).
- When an operator wants a unified coordination interface (`/tech-lead`, `triage`, `fleet`, `remediate`, `spike`, `prototype`, `visual-parity`).
### When NOT to Use
- Do not use for writing production code or running test/build loops in the current session; delegate to builder subagents.
- Do not use when only clarifying raw personal intent; use `interview-me`.
- Do not use for deep specialized domain modeling without playbook routing; use `model-discovery`.
---
## Playbook Routing Matrix
When an engineering request or task arrives, match it against one of the eight core playbooks:
```mermaid
flowchart TD
Prompt["Engineering Request / Issue"] --> Triage{"Playbook Match"}
Triage -->|Cross-boundary / Protocol / Storage| PB1["Playbook 1: Architectural (Tier 1)"]
Triage -->|New domain rules in existing boundary| PB2["Playbook 2: Feature Slice (Tier 2)"]
Triage -->|Bug fix / Refactoring / Lint| PB3["Playbook 3: Scoped Fix (Tier 3)"]
Triage -->|Multi-task queue / Batch PRs| PB4["Playbook 4: Fleet Batch"]
Triage -->|PR Review / Remediation| PB5["Playbook 5: Review Remediation"]
Triage -->|Read-only analysis / Exploration| PB6["Playbook 6: Investigation Spike"]
Triage -->|Novel UI / Interactive design uncertainty| PB7["Playbook 7: Prototype Spike"]
Triage -->|UI refactor / Styling migration / Zero visual drift| PB8["Playbook 8: Visual Parity"]
```
| Playbook | Trigger & Scope | Key Pipeline Skills | Deliverable & Gate |
| :--- | :--- | :--- | :--- |
| **PB-1: Architectural** | Cross-crate/subsystem boundary, wire/network protocol, storage schema, security access. | `feature-mapping` → `example-mapping` → `system-behavior` → `model-discovery` → `architecture` → `architecture-decision-records` | Binding ADR (`docs/decisions/`) + SSD (`docs/contracts/`) + Gate 1 Doubt Review + `spec-qualification` Gate. |
| **PB-2: Feature Slice** | New capabilities, syntax additions, or business rules localized in an established boundary. | `feature-mapping` → `example-mapping` → Builder Mode A (TDD) | Example Mapping rules (`docs/requirements/`) + Passing test matrix. |
| **PB-3: Scoped Fix** | Defect fix, compiler/linter error, performance tuning, or local refactor. | Worktree isolation → Builder Mode B (reproduce with failing test → fix → evidence report) | Repro test + Fix commit + Opened PR. |
| **PB-4: Fleet Batch** | Queue of independent issues, bugs, or parallel feature slices. | `scripts/worktree.ts` → Parallel Builder Subagents → CI Monitoring | Fleet Delivery Board + Merge-ready PRs. |
| **PB-5: Review Remediation** | Unresolved PR comments, Gate 2 review findings, or audit remediation. | `code-review-and-quality` / `review-pr` → Human Selection Gate → Builder Mode B | Remediation Disposition Report + Verified fix. |
| **PB-6: Investigation Spike** | Ambiguous question, performance profile, runtime call flow, or historical code intent without code changes. | `how` (runtime flow) / `why` (intent archaeology) → `interview-me` → `vision` → `walkthrough-me` | Evidence-based diagnostic report / Architecture note / Constraint set. |
| **PB-7: Prototype Spike** | Novel UI layout, interaction feel, or stateful workflow with no codebase precedent. | `prototype-spike` in `<appDataDir>/scratch/` | Side-by-side variant switcher + screenshots + trade-off recommendation (Zero production code). |
| **PB-8: Visual Parity** | UI component refactoring, design token migration, or CSS framework replacement. | Builder Mode C in isolated worktree (`visual-parity` + Playwright) | Frozen baseline screenshots → component refactor → pixel diff = 0 report + Opened PR. |
---
## Playbook Execution Protocols
### Playbook 1: Tier 1 Architectural Change (Full Golden Path)
1. **Intake & Intent Discovery**:
- Ingest context via issue tracker or user brief.
- If ambiguous, interview user with `interview-me` (one question at a time).
2. **Requirements Mapping**:
- Map user journey steps and variations using `feature-mapping`.
- Surface concrete business rules (`R1`, `R2`, `R3`...) using `example-mapping`.
- **MANDATORY HUMAN SIGN-OFF**: Present journey flow and rules table to the operator. Obtain explicit approval before proceeding.
3. **System & Domain Analysis**:
- Derive black-box System Sequence Diagrams (SSDs) and operation contracts with `system-behavior`.
- Model aggregates and Ubiquitous Language with `model-discovery`.
4. **Architecture & Upfront ADR**:
- Analyze layering and structural dependencies with `architecture`.
- Author binding ADR in `docs/decisions/adr-XXX-<slug>.md` capturing invariants upfront with `architecture-decision-records`.
5. **Gate 1: Adversarial Doubt Review**:
- Execute fresh-context adversarial review using `doubt-driven-development` to audit unstated assumptions, edge cases, and backward compatibility.
6. **Builder Dispatch**:
- Verify worktree status (`git status --porcelain`).
- Allocate isolated worktree: `bun scripts/worktree.ts create <branch-name> [base]`.
- Dispatch builder subagent with governing spec, ADR, and Mode A TDD instructions.
7. **Gate 2: Code Qualification**:
- Inspect the Builder Execution Report and diff using `spec-qualification` and `code-review-and-quality` ("Audit, Don't Execute").
- Issue binary verdict: `VERIFIED` or `UNVERIFIED`.
- Record canonical qualification report in `docs/verification/qualification-<module-id>.md`.
---
### Playbook 2: Tier 2 Feature Slice (Streamlined TDD)
1. **Intake & Rule Capture**:
- Ingest issue or feature context.
- Map user steps and variations (`feature-mapping`) and extract thin business rules (`R1`, `R2`...) in `docs/requirements/<module-id>.md`.
2. **MANDATORY HUMAN SIGN-OFF**:
- Present rules to operator for confirmation.
3. **Builder Dispatch (Mode A)**:
- Allocate isolated worktree: `bun scripts/worktree.ts create <branch-name> [base]`.
- Dispatch builder subagent with the Example Mapping rules.
- Builder executes Red-Green-Refactor TDD, verifies with test runner, and commits atomically via explicit paths.
4. **Acceptance Verification**:
- Verify that 100% of defined rules pass in the builder's test matrix.
- Package completed deliverable or open PR via `create-pr`.
---
### Playbook 3: Tier 3 Scoped Fix (Prove-It Defect Resolution)
1. **Frame the Defect**:
- Summarize the bug, failing log, or target refactor in a 1-paragraph brief.
- Identify affected repository paths and established contracts.
2. **Worktree Allocation**:
- Create isolated worktree: `bun scripts/worktree.ts create fix-<slug> [base]`.
3. **Builder Dispatch (Mode B)**:
- Dispatch builder subagent into the worktree.
- **Rule of Prove-It**: Builder must author a failing reproduction test *before* making changes, apply minimal surgical fix, simplify code, and verify all tests pass.
- Builder commits with convention (`<issue-key>: <summary>` or `fix: <summary>`) and opens PR (`gh pr create`).
4. **CI & Verification Monitoring**:
- Babysit PR checks and ensure clean test run.
---
### Playbook 4: Fleet Batch Orchestration (Parallel Builders)
1. **Decompose & Frame Queue**:
- Ingest list of tickets, independent tasks, or parallel slices.
- Generate compact 1-paragraph briefs (Goal, Scope, Worktree, Verify, Acceptance).
2. **Parallel Worktree Provisioning**:
- Allocate concurrent worktrees: `bun scripts/worktree.ts create <branch-i> [base]`.
3. **Concurrent Builder Subagent Launch**:
- Spawn parallel background builder subagents into their respective worktrees.
4. **Drain & Babysit**:
- Collect Builder Delivery Reports as builders complete.
- If CI or tests fail, dispatch targeted Builder Mode B in the worktree to fix.
5. **Present Fleet Delivery Board**:
- Summarize task, branch, PR URL/commit, CI status, and test evidence in a clean markdown table.
---
### Playbook 5: Review Remediation (Gate 2 & PR Findings)
1. **Review Intake & Audit**:
- Run multi-axis review using `code-review-and-quality` or `review-pr`, or ingest Gate 2 reviewer findings.
- Surface findings with stable identifiers (`R1`, `R2`), severities, and locations.
2. **Human Selection Gate**:
- Present findings to the operator. Operator selects authorized must-fix findings.
3. **Builder Remediation Dispatch**:
- Dispatch builder subagent in Mode B (Scoped Remediation) with authorized IDs.
- Builder reproduces defect with test, applies minimal fix, and generates Remediation Disposition Report.
4. **Confirm & Re-verify**:
- Inspector re-verifies the fix and confirms clean diff and passing tests.
---
### Playbook 6: Investigation & Architectural Spike
1. **Scope the Inquiry**:
- Define the question, hypothesis, performance bottleneck, or unknown boundary to investigate.
- Constraint: **Zero production code modifications**.
2. **Select the Diagnostic Practice**:
- **Subsystem Runtime & Architecture Flow**: Use `how` to decompose into parallel exploration angles (Gemini Flash / Grok) and synthesize runtime flows and Mermaid sequence diagrams via Claude Opus 5.5.
- **Historical Intent & Design Archaeology**: Use `why` to trace code anchors (`git blame`, PRs, commits), search 7 evidence categories, calibrate claims across 5 epistemic confidence tiers (Direct, Supported, Inferred, Speculative, Unknown), and deliver a Preserve/Change/Avoid/Risk constraint set.
- **Interactive Code Tour**: Use `walkthrough-me` for paced, section-by-section diff walk.
3. **Deliverable**:
- Provide cited, evidence-backed findings and recommendations. If an architectural decision or invariant boundary change emerges, recommend transitioning to **Playbook 1 (Architectural)**.
---
### Playbook 7: Prototype Spike (Throwaway Exploration)
1. **Scope the Decision**:
- Define the exact layout, interaction feel, or stateful workflow being decided.
- Constraint: **Strict scratch isolation** (`<appDataDir>/scratch/prototypes/<name>/` or `scratch/prototypes/`). Zero production code changes.
2. **Build Competing Sketches**:
- Implement 2–3 competing approaches (Option A, Option B, Option C) behind a single on-screen variant switcher using vanilla HTML/CSS/JS or the lightest static setup.
3. **Observe & Capture Evidence**:
- Test interaction feel across target viewports via browser tools. Capture side-by-side screenshots.
4. **Human Review & Handover**:
- Present options to the human operator for decision. Discard scratch code upon sign-off, extract chosen specification and tokens, and transition to **Playbook 2 (Feature Slice)** or **Playbook 1 (Architectural)** for production implementation.
---
### Playbook 8: Visual Parity (Builder Mode C)
1. **Scope the Parity Target**:
- Identify UI components undergoing refactoring, design token adoption, or framework modernization with zero intended visual drift.
2. **Freeze Baseline Screenshots**:
- In the target project/worktree, capture golden baseline screenshots across all component states (default, hover, focus, disabled, error) and viewports before altering production code.
3. **Builder Mode C Dispatch**:
- Provision isolated worktree via `bun scripts/worktree.ts create <branch>`.
- Dispatch Builder with instructions to refactor components, execute automated image diffs (Playwright/CDP) against frozen baselines, and loop until pixel diff is 0.
4. **Parity Qualification**:
- Verify visual diff report (0 pixel regression) and clean code diff via Gate 2 qualification before merging.
---
## Workflow
```text
Request / Issue ──► Sizing Gate ──► Playbook Route ──► Worktree Provisioning ──► Builder Dispatch ──► Qualification
```
1. **Intake & Triage:** Ingest the engineering request, issue, or review finding. Classify via the 3-Tier Sizing Gate and assign to PB-1 through PB-8.
2. **Boundary Definition & Specification:** Author requirements, contracts, or defect briefs in accordance with the selected playbook. Enforce the Human Requirements Gate for Tier 1 and Tier 2.
3. **Worktree Provisioning:** Allocate an isolated worktree via `bun scripts/worktree.ts create <branch> [base]`. Verify `git status --porcelain` to ensure clean pre-dispatch state.
4. **Builder Dispatch:** Package the task with unambiguous constraints, governing rules, and explicit file boundaries. Dispatch builder subagent into the allocated worktree.
5. **Qualification & Verification:** Inspect builder delivery reports, git diffs, and test assertions using `spec-qualification` and `code-review-and-quality`. Issue formal verdict and merge/prune worktree.
---
## Operational Commands & Shortcuts
When interacting with the Tech Lead, standard directives trigger quick actions:
- `/tech-lead`: Enter Lead Playbook Coordinator mode.
- `new task <goal>` / `triage <request>`: Reset context and triage the new request against the playbook matrix.
- `fleet <queue>`: Trigger Playbook 4 for parallel multi-task execution across worktrees.
- `remediate <pr|verdict>`: Trigger Playbook 5 for gated PR review or Gate 2 finding remediation.
- `spike <question>`: Trigger Playbook 6 for zero-code investigation.
- `prototype <prompt>`: Trigger Playbook 7 for throwaway interactive UI/UX prototyping in scratch space.
- `visual-parity <component>`: Trigger Playbook 8 for pixel-exact UI refactoring and automated image diff verification.
- `status`: Show current active playbooks, worktrees, and running builder subagents.
---
## Boundaries
- Coordinates engineering playbooks, isolates worktrees, and orchestrates builder subagents; does not write production code or execute build/test loops directly.
- Does not bypass the Mandatory Human Requirements Gate for new domain rules or architectural boundaries.
- Does not allow builders to modify Stage 3 decisions or Stage 5 verification records.
- Does not perform sweeping git staging (`git add .` or `git add -A`).
---
## Red Flags
- The Lead session writes application code, modifies production files, or runs compilers in chat.
- Work is started without classifying the task against the 3-Tier Sizing Gate or selecting a playbook.
- Builders are dispatched directly into the root workspace instead of an isolated worktree.
- Tier 1 or Tier 2 tasks advance to implementation without human sign-off on rules or journey flows.
- A builder self-issues a verification verdict or qualifies its own code.
---
## Verification
### Playbook Coordination Verification
- [ ] Task is classified via the 3-Tier Sizing Gate and assigned to PB-1..PB-8.
- [ ] For Tier 1 and Tier 2, human operator sign-off is obtained on rules/flows before builder dispatch.
- [ ] Worktree isolation is provisioned via `bun scripts/worktree.ts create <branch>` before builder dispatch.
- [ ] Builder dispatch instructions include governing spec/rules, explicit file paths, and test verification criteria.
- [ ] Post-execution qualification is conducted via `spec-qualification` and `code-review-and-quality` without executing builds directly in the Lead session.