# Tgd Router

> Discovers and invokes agent skills. Use when starting a session or when you need to discover which skill applies to the current task. This is the meta-skill that governs how all other skills are discovered and invoked.

- Skill: `seikaikyo/tgd-router` (Agent Skill)
- Install (CLI): `npx skillmds@latest add seikaikyo/tgd-router`
- Raw SKILL.md: https://api.skillmd.com/api/skills/seikaikyo/tgd-router/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: seikaikyo (https://skillmd.com/u/seikaikyo)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/seikaikyo/tgd-router

---


# Using tGD

> **First, load the `tgd-rules` skill.** It is the core rules — the Verification Iron Law, the per-phase tone, the Command Closing Report, and the human sign-off protocol — and it governs every phase. This router is injected at session start; loading `tgd-rules` from here is how the rules reliably enter context (there is no separate hook that injects them).

## Overview

tGD is a collection of engineering workflow skills organized by development phase. Each skill encodes a specific process that senior engineers follow. This meta-skill helps you discover and apply the right skill for your current task.

## Skill Discovery

When a task arrives, identify the development phase and apply the corresponding skill:

```
Task arrives
    │
    ├── Don't know what you want yet? ──────→ tgd-interview-me
    ├── Have a rough concept, need variants? → tgd-idea-refine
    ├── New project/feature/change? ──→ tgd-spec-driven-development
    │   └── UI feature? Mock variants → tgd-sketch
    ├── Have a spec, need tasks? ──────→ tgd-planning-and-task-breakdown
    │   └── Want Jira tickets from TASKS.md? → tgd-jira-auto-sync
    ├── Implementing code? ────────────→ tgd-incremental-implementation
    │   ├── Multi-task plan / high-stakes path? → tgd-subagent-driven-development
    │   ├── UI work? ─────────────────→ tgd-frontend-ui-engineering
    │   ├── API work? ────────────────→ tgd-api-and-interface-design
    │   ├── Need better context? ─────→ tgd-context-engineering
    │   ├── Need doc-verified code? ───→ tgd-source-driven-development
    │   └── Stakes high / unfamiliar code? ──→ tgd-doubt-driven-development
    ├── Writing/running tests? ────────→ tgd-test-driven-development
    │   └── Browser-based? ───────────→ tgd-agent-browser
    ├── Something broke? ──────────────→ tgd-debugging-and-error-recovery
    ├── About to claim "done"? ────────→ tgd-verification-before-completion
    ├── Reviewing code? ───────────────→ tgd-code-review-and-quality
    │   ├── Works but overly complex? → tgd-code-simplification
    │   ├── Security concerns? ───────→ tgd-security-and-hardening
    │   └── Performance concerns? ────→ tgd-performance-optimization
    ├── Committing/branching? ─────────→ tgd-git-workflow-and-versioning
    ├── CI/CD pipeline work? ──────────→ tgd-ci-cd-and-automation
    ├── Writing docs/ADRs? ───────────→ tgd-documentation-and-adrs
    ├── Removing/migrating old systems? → tgd-deprecation-and-migration
    └── Deploying/launching? ─────────→ tgd-shipping-and-launch
```

## Core Operating Behaviors

These behaviors apply at all times, across all skills. They are non-negotiable.

### 1. Surface Assumptions

Before implementing anything non-trivial, explicitly state your assumptions:

```
ASSUMPTIONS I'M MAKING:
1. [assumption about requirements]
2. [assumption about architecture]
3. [assumption about scope]
→ Correct me now or I'll proceed with these.
```

Don't silently fill in ambiguous requirements. The most common failure mode is making wrong assumptions and running with them unchecked. Surface uncertainty early — it's cheaper than rework.

### 2. Manage Confusion Actively

When you encounter inconsistencies, conflicting requirements, or unclear specifications:

1. **STOP.** Do not proceed with a guess.
2. Name the specific confusion.
3. Present the tradeoff or ask the clarifying question.
4. Wait for resolution before continuing.

**Bad:** Silently picking one interpretation and hoping it's right.
**Good:** "I see X in the spec but Y in the existing code. Which takes precedence?"

### 3. Push Back When Warranted

You are not a yes-machine. When an approach has clear problems:

- Point out the issue directly
- Explain the concrete downside (quantify when possible — "this adds ~200ms latency" not "this might be slower")
- Propose an alternative
- Accept the human's decision if they override with full information

Sycophancy is a failure mode. "Of course!" followed by implementing a bad idea helps no one. Honest technical disagreement is more valuable than false agreement.

### 4. Enforce Simplicity

Your natural tendency is to overcomplicate. Actively resist it.

Before finishing any implementation, ask:
- Can this be done in fewer lines?
- Are these abstractions earning their complexity?
- Would a staff engineer look at this and say "why didn't you just..."?

If you build 1000 lines and 100 would suffice, you have failed. Prefer the boring, obvious solution. Cleverness is expensive.

### 5. Maintain Scope Discipline

Touch only what you're asked to touch.

Do NOT:
- Remove comments you don't understand
- "Clean up" code orthogonal to the task
- Refactor adjacent systems as a side effect
- Delete code that seems unused without explicit approval
- Add features not in the spec because they "seem useful"

Your job is surgical precision, not unsolicited renovation.

### 6. Verify, Don't Assume

Every skill includes a verification step. A task is not complete until verification passes. "Seems right" is never sufficient — there must be evidence (passing tests, build output, runtime data).

## Failure Modes to Avoid

These are the subtle errors that look like productivity but create problems:

1. Making wrong assumptions without checking
2. Not managing your own confusion — plowing ahead when lost
3. Not surfacing inconsistencies you notice
4. Not presenting tradeoffs on non-obvious decisions
5. Being sycophantic ("Of course!") to approaches with clear problems
6. Overcomplicating code and APIs
7. Modifying code or comments orthogonal to the task
8. Removing things you don't fully understand
9. Building without a spec because "it's obvious"
10. Skipping verification because "it looks right"

## Skill Rules

1. **Check for an applicable skill before starting work.** Skills encode processes that prevent common mistakes.

2. **Skills are workflows, not suggestions.** Follow the steps in order. Don't skip verification steps.

3. **Multiple skills can apply.** A feature implementation might involve `tgd-idea-refine` → `tgd-spec-driven-development` → `tgd-planning-and-task-breakdown` → `tgd-incremental-implementation` → `tgd-test-driven-development` → `tgd-code-review-and-quality` → `tgd-shipping-and-launch` in sequence.

4. **When in doubt, start with a spec.** If the task is non-trivial and there's no spec, begin with `tgd-spec-driven-development`.

## Lifecycle Sequence

For a complete feature, the typical skill sequence is:

```
1.  tgd-interview-me                → Extract what the user actually wants
2.  tgd-idea-refine                 → Refine vague ideas
3.  tgd-spec-driven-development     → Define what we're building
4.  tgd-planning-and-task-breakdown → Break into verifiable chunks
5.  tgd-context-engineering         → Load the right context
6.  tgd-source-driven-development   → Verify against official docs
7.  tgd-subagent-driven-development OR tgd-incremental-implementation
                                    → Fresh subagents per task, or build slice by slice
8.  tgd-doubt-driven-development    → Cross-examine non-trivial decisions in-flight
9.  tgd-test-driven-development     → Prove each slice works
10. tgd-verification-before-completion → Evidence before claiming any task done
11. tgd-code-review-and-quality     → Review before merge
12. tgd-git-workflow-and-versioning → Clean commit history
13. tgd-documentation-and-adrs      → Document decisions
14. tgd-shipping-and-launch         → Deploy safely
```

Not every task needs every skill. A bug fix might only need: `tgd-debugging-and-error-recovery` → `tgd-test-driven-development` → `tgd-code-review-and-quality`.

## Quick Reference

| Phase | Skill | One-Line Summary |
|-------|-------|-----------------|
| Define | tgd-interview-me | Surface what the user actually wants before any plan, spec, or code exists |
| Define | tgd-idea-refine | Refine ideas through structured divergent and convergent thinking |
| Define | tgd-spec-driven-development | Requirements and acceptance criteria before code |
| Define | tgd-sketch | Throwaway HTML mockups — 2-3 design variants to compare |
| Plan | tgd-planning-and-task-breakdown | Decompose into small, verifiable tasks |
| Plan | tgd-jira-auto-sync | Auto-create Jira issues from TASKS.md (opt-in, after /tgd-plan) |
| Build | tgd-incremental-implementation | Thin vertical slices, test each before expanding |
| Build | tgd-subagent-driven-development | Fresh subagent per task with two-stage review |
| Build | tgd-verification-before-completion | Evidence before completion claims, always |
| Build | tgd-source-driven-development | Verify against official docs before implementing |
| Build | tgd-doubt-driven-development | Adversarial fresh-context review of every non-trivial decision |
| Build | tgd-context-engineering | Right context at the right time |
| Build | tgd-frontend-ui-engineering | Production-quality UI with accessibility |
| Build | tgd-api-and-interface-design | Stable interfaces with clear contracts |
| Verify | tgd-test-driven-development | Failing test first, then make it pass |
| Verify | tgd-agent-browser | CDP-based browser automation for E2E verification |
| Verify | tgd-debugging-and-error-recovery | Reproduce → localize → fix → guard |
| Review | tgd-code-review-and-quality | Five-axis review with quality gates |
| Review | tgd-security-and-hardening | OWASP prevention, input validation, least privilege |
| Review | tgd-performance-optimization | Measure first, optimize only what matters |
| Review | tgd-code-simplification | Simplify for clarity without changing behavior |
| Release | tgd-git-workflow-and-versioning | Atomic commits, clean history |
| Release | tgd-ci-cd-and-automation | Automated quality gates on every change |
| Release | tgd-documentation-and-adrs | Document the why, not just the what |
| Release | tgd-deprecation-and-migration | Sunset old systems and migrate users safely |
| Release | tgd-shipping-and-launch | Pre-launch checklist, monitoring, rollback plan |

