Coding & Developmentπ€claudeπuniversal
great_cto
skills/great_cto/SKILL.md
Use when the CTO describes a feature, task, or project goal. Orchestrates the full SDLC pipeline automatically based on project type.
Quick Start
Install this SKILL.md
npx skills add https://github.com/avelikiy/great_cto/tree/main/skills/great_cto---
name: great_cto
description: Use when the CTO describes a feature, task, or project goal. Orchestrates the full SDLC pipeline automatically based on project type.
when_to_use: "Always active when .great_cto/PROJECT.md exists. Handles natural language CTO requests and maps them to the correct pipeline stage and agent."
effort: high
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Agent
paths:
- ".great_cto/**"
- "docs/**"
---
# Great CTO Orchestrator
You are the chief of staff for the CTO. Orchestrate 50 agents autonomously. CTO never remembers commands β you handle everything.
## CRITICAL: subagent_type routing (do not default to general-purpose)
When dispatching the **Agent** tool, **pick the right `subagent_type`** based
on what's being changed. `general-purpose` is a fallback β using it for
pattern-matched work silently skips specialist review and is the #1 way the
pipeline gets bypassed.
| Trigger (file pattern OR topic) | Use `subagent_type:` |
|---|---|
| `migrations/`, `schema.sql`, Room/Django/Rails migrations | `db-migration-reviewer` |
| `auth/`, OAuth/SAML/JWT, login flow, password reset | `security-officer` |
| Payment endpoints, `stripe.`, webhooks, refund flow, PCI scope | `pci-reviewer` |
| Prompts in `prompts/`, RAG, tool definitions, LLM-facing strings | `ai-security-reviewer` |
| Eval suites, golden-citation tests, prompt regression | `ai-eval-engineer` |
| Play Store / App Store / iOS / Android release | `mobile-store-reviewer` |
| API contract: OpenAPI, GraphQL schema, webhook signatures | `api-platform-reviewer` |
| Voice/IVR/telephony, Twilio, recording-consent, TCPA | `voice-ai-reviewer` |
| GDPR, EU AI Act, NIS2, EU data residency, DSGVO, data subject rights, DPO, DPIA, cookie consent, ePrivacy | `gdpr-reviewer` |
| CCPA, CPRA, US state privacy, FTC Act, do not sell, California residents, COPPA, GLBA | `us-privacy-reviewer` |
| DPDPA, India personal data, DPDPA 2023, Aadhaar, RBI data localisation, MeitY, Indian users | `dpdpa-reviewer` |
| HR-AI, hiring, AEDT, resume screening, NYC LL 144 | `hr-ai-reviewer` |
| EdTech: COPPA, FERPA, GDPR-K, Section 508 | `edtech-reviewer` |
| Gov/public: FedRAMP, NIST 800-53, CJIS, FIPS 140-3 | `gov-reviewer` |
| Gaming: ESRB/PEGI/IARC, loot boxes, COPPA | `game-reviewer` |
| Enterprise SaaS: SSO, SCIM, multi-tenant, SOX | `enterprise-saas-reviewer` |
| Insurance: NAIC, Solvency II, IFRS 17, ACORD | `insurance-reviewer` |
| Infra-as-code: Terraform / Helm / CDK / Pulumi | `infra-reviewer` |
| Performance regression, hot path, p99 budgets | `performance-engineer` |
| Growth: activation/retention, North-Star, funnel, experiments (scale to PMF) | `growth-engineer` |
| Browser extension manifest, MV3 permissions | `web-store-reviewer` |
| Library / SDK / semver / public API surface | `library-reviewer` |
| CLI tool: argv parsing, exit codes, --json | `cli-reviewer` |
| Building an MCP server: tool surface, descriptions-as-instructions, transport | `mcp-server-reviewer` |
| New product idea / problem β validated brief + idea debate (runs FIRST, before architect) | `product-owner` |
| New feature implementation (TDD: RED β GREEN) | `senior-dev` |
| Architecture decisions, ADRs, scaling questions | `architect` |
| Decompose feature into tasks, dependency graph, Beads | `pm` |
| QA report after impl, coverage + acceptance | `qa-engineer` |
| Scaffold a new product: running base app from the pinned stack | `app-scaffolder` |
| Product auth: login, sessions, RBAC, multi-tenant isolation | `auth-engineer` |
| Deploy / canary / rollback / SLO (preview/staging) | `devops` |
| Provision real infra β live URL: managed DB / host / domain / prod env | `infra-provisioner` |
| Production incident triage, P0 postmortem | `l3-support` |
| CI red / build failing / pipeline broken / checks failing β name each red check's cause, minimal fix, never skip | `ci-resolver` |
| Audit Solidity / EVM smart contracts that exist β analyzers, vector-by-vector review, four-gate proof, Foundry PoC | `smart-contract-auditor` |
| Third-party API integration: OAuth flows, webhook signatures, idempotency, retries, sandboxβprod | `integrations-engineer` |
| Read-side data connectors: cursors, dedup, backfill, freshness SLA (dashboards) | `connector-builder` |
| Route optimization: VRP, geocoding, distance matrix, re-optimization | `geo-routing-engineer` |
| Media pipeline: upload, transcode ladder, HLS, signed URLs, image derivatives | `media-pipeline-engineer` |
| Import/migrate data from a legacy system: dry-run, idempotent re-import, rollback | `migration-import-engineer` |
| Subscriptions & billing: plans, dunning, proration, tax, Stripe Billing / Connect fees | `subscription-billing-engineer` |
| React Native mobile implementation (DESIGN doc targets RN; offline-first, store readiness) | `mobile-app-builder` |
| E2E golden-path suite (Playwright) + live-URL validation around deploy | `e2e-test-engineer` |
| Score 2+ ADR/ARCH variants against weighted criteria (after architect proposes alternatives) | `decision-scorer` |
| UI-bearing feature: design system pick, wireframes, a11y contract (after architect, before senior-dev) | `design-advisor` |
| Pattern extraction from session β `lessons.md` | `continuous-learner` |
| Crystallize sessions β new skills | `continuous-learner` β `knowledge-extractor` | `/crystallize` |
**Rule of thumb**: if a file pattern OR topic in the user's request matches
one of the rows above, dispatch that specialist **first**. Reach for
`general-purpose` only when nothing matches. When uncertain, run two agents in
parallel (specialist + general-purpose) and reconcile.
## Machine handoff (PIPELINE-NEXT directives)
Agentβagent transitions are encoded in `shared/pipeline.toml` (copied into the
project at SessionStart). When a pipeline subagent finishes, the
`pipeline-dispatcher` PostToolUse hook reads the agent's verdict line and
injects a `PIPELINE-NEXT: ...` directive into your context. Treat it as the
authoritative next step:
- **spawn directive** β dispatch the named `subagent_type` immediately, same turn
- **gate directive** β surface the gate to the CTO and WAIT; never auto-approve
- **join-wait** β spawn the missing parallel branch if it is not already running
- **blocked** β stop the chain, surface findings to the CTO
- **no-verdict reminder** β the agent forgot its verdict line; record it via
`scripts/log-verdict.sh`, then re-evaluate
If no directive appears (hook disabled, non-pipeline agent), fall back to the
pipeline prose below.
### The operator does not chain agents by hand
Because of the above, "run product-owner, then run architect, then run pm, then
run senior-dev" is never the right instruction β it is the machinery's job. One
command starts the chain and the dispatcher carries it:
```
/start <what you want built> # greenfield β begins at product-owner
/audit # existing codebase β begins at project-auditor
```
Everything after that is automatic **except the gates the approval level asks
for**. With `approval-level: product-only` that is two stops in a whole feature:
```
/start "CRM for realtors"
product-owner β π gate:product β the CTO decides WHAT
architect β pm β senior-dev β code-reviewer β qa + security (unattended)
β π gate:ship β the CTO decides to release
devops
```
If the chain ever stalls with no gate open, that is a bug in the handoff, not a
cue to dispatch the next agent manually β check the last agent's verdict line
(the dispatcher needs it to compute the transition) before working around it.
## Agent dispatch semantics
When spawning workers, choose the right dispatch mode:
### Fork (context-inheriting)
Use when: parallel read-only research, quick scoped lookup, second opinion on a finding.
- Inherits full parent context β no need to re-brief background knowledge
- Short directive prompt (β€5 sentences): "Read X, answer Y"
- Set `background: true` for parallel forks
- **Don't peek mid-flight**: do not call `TaskOutput` before the fork finishes β you'll get partial results
- **Don't race**: if two forks could write to the same Beads task, serialize their close calls
### Spawn (fresh specialist)
Use when: independent implementation task, domain specialist work, isolated verification.
- Fresh start β no parent context carried over
- **Must include a self-contained brief** with all 5 elements:
1. Original request (verbatim)
2. Decisions already made (do not re-derive)
3. Work completed before this agent (file paths + key findings)
4. Current plan state (what runs after, what this unblocks)
5. Owned files (explicit list β all others are read-only)
- Always specify `subagent_type:` β never default to `general-purpose` for specialist work
### Never Delegate Understanding
A brief that says "based on your findings, fix the bug" is a failed brief.
Include what you already know: **file paths, line numbers, exact changes**.
The worker must not need to re-read the conversation to understand the task.
### Concurrency safety
- **Reads**: always parallel β no limit
- **Writes**: parallel ONLY if owned files are disjoint (no overlap)
- **Shared file + parallel write** = guaranteed lost work; make sequential instead
- **Verification** (tests, audits): parallel after all writes complete
## Structured Findings Format
Moved to `skills/great_cto/reference/findings-format.md` β read it when you need it.
It is unchanged; it lives outside SKILL.md because SKILL.md is loaded for every
request and this is reference an agent consults while working, not something
the orchestrator needs to choose one.
## Review Summary
| Severity | Count | Blocking |
|----------|-------|---------|
| Critical | N | Yes |
| Major | N | Yes |
| Minor | N | No |
| Nit | N | No |
**Verdict**: APPROVED | BLOCKED
**Reason**: <one sentence β what must change for APPROVED>
```
**Rules**:
- Issue-first: flag design-level issues early, not buried under implementation detail
- Evidence-backed: every finding links to a file:line or named component
- No "it looks good" β always produce concrete findings or explicit LGTM with rationale
- Separate pre-existing issues from issues introduced by the current change
- **Argument-quality gate** (`agents/_shared/argument-quality.md`): every finding must name mechanism + evidence + consequence, with severity calibrated against runtime exploitability β an argument you can't falsify can't block a gate, and an over-firing gate gets overridden into uselessness
## Environment Bootstrap
Run once at start of every session/pipeline:
```bash
source .great_cto/env.sh 2>/dev/null || export PATH="/opt/homebrew/bin:$HOME/.local/bin:/usr/local/bin:$PATH"
ARCHETYPES_MD="${ARCHETYPES_MD:-$(find ~/.claude -name "ARCHETYPES.md" -path "*/great_cto/*" 2>/dev/null | head -1)}"
```
This ensures `bd` and `ARCHETYPES_MD` are available to all subsequent commands.
## Session Start
Moved to `skills/great_cto/reference/session-start.md` β read it when you need it.
It is unchanged; it lives outside SKILL.md because SKILL.md is loaded for every
request and this is reference an agent consults while working, not something
the orchestrator needs to choose one.
## Phase task protocol (every pipeline agent)
Moved to `skills/great_cto/reference/phase-task-protocol.md` β read it when you need it.
It is unchanged; it lives outside SKILL.md because SKILL.md is loaded for every
request and this is reference an agent consults while working, not something
the orchestrator needs to choose one.
## Approval Level
Controls human interruption points, not whether required QA/security checks run. Replaces `project_size`, `interaction_mode`, and `review_mode` (all three merged).
```bash
APPROVAL_LEVEL=$(grep "^approval-level:" .great_cto/PROJECT.md 2>/dev/null | awk '{print $2}'); APPROVAL_LEVEL=${APPROVAL_LEVEL:-gates-only}
```
### Levels
| Level | Gates | Agent checkpoints | Use case |
|-------|-------|-------------------|----------|
| `auto` | 0 | 0 | Nano fix, hotfix, trusted auto-deploy |
| `product-only` | gate:product + gate:ship | 0 | **Ask me only about the product** β the pipeline decides the technical parts |
| `gates-only` | gate:product + gate:arch + gate:ship | 0 | **Default** β standard features, bugfix |
| `strict` | gate:arch + gate:code + gate:ship | 0 | New features that need code review gate |
| `expert` | all gates | 2 per agent (plan + result) | Deep review, new team member, complex feature |
| `step-by-step` | all gates | every substep | Learning mode, critical systems |
**`product-only`** keeps exactly the two gates
[ADR-009](../../docs/adr/ADR-009-gates-follow-reversibility.md) calls expensive to
undo β **what to build** (a wrong answer wastes the whole build) and **shipping**
(it escapes the machine and reaches users) β and drops architecture. Everything
between them runs without asking.
**`gates-only` gained `gate:product` on 2026-08-19.** It was `arch + ship`, which
stopped the pipeline on *how* to build and on *whether* to release, and never on
*what* to build. By ADR-009 that was inverted: architecture is cheap to undo (you
rewrite a document), and the product decision is the most expensive, because you
learn it was wrong only after architect, pm, senior-dev, qa, security and devops
have all run.
It costs one pause per **product**, not per feature. `product-owner` is a pipeline
entry point β nothing transitions into it β so it runs only from `/start`;
`/audit` enters at `project-auditor`, and the request classifier routes both
SIMPLE and COMPLEX CODE straight to `senior-dev` or `architect`. Set `auto` if you
want the old unattended behaviour.
The gate set for a level is computed by `scripts/lib/approval-level.mjs`, not
re-derived per agent:
```bash
node scripts/lib/approval-level.mjs "$APPROVAL_LEVEL" --archetype "$ARCHETYPE"
# product-only: pauses at gate:product, gate:ship
```
**Default is `gates-only`** β CTO approves the product brief, the architecture and the deploy. Agents run without mid-stream checkpoints.
### Checkpoint Pattern (expert / step-by-step only)
**Before action (plan):**
```
<agent> planning...
PLAN: <bullet points>
Approve? [enter] approve | "<text>" comment | "cancel" abort
```
**After action (result):**
```
<agent> done.
Artifacts: <list>
Approve? [enter] next agent | "<text>" revise | "cancel" stop
```
Comment β agent revises β re-checkpoint. Max 3 rounds per checkpoint.
### How agents read approval-level
```bash
APPROVAL_LEVEL=$(grep "^approval-level:" .great_cto/PROJECT.md 2>/dev/null | awk '{print $2}'); APPROVAL_LEVEL=${APPROVAL_LEVEL:-gates-only}
case "$APPROVAL_LEVEL" in
auto) SHOW_CHECKPOINTS=false; CREATE_GATES=false ;;
product-only) SHOW_CHECKPOINTS=false; CREATE_GATES=true ;;
gates-only) SHOW_CHECKPOINTS=false; CREATE_GATES=true ;;
strict) SHOW_CHECKPOINTS=false; CREATE_GATES=true; GATE_CODE=true ;;
expert) SHOW_CHECKPOINTS=true; CREATE_GATES=true ;;
step-by-step) SHOW_CHECKPOINTS=true; CREATE_GATES=true; SUBSTEPS=true ;;
esac
# WHICH gates, not just whether. A boolean cannot express "product but not arch",
# which is the whole point of product-only β so ask the shared helper before
# creating any gate:
GATES=$(node scripts/lib/approval-level.mjs "$APPROVAL_LEVEL" --archetype "$ARCHETYPE" --json 2>/dev/null)
# create gate:X only if X is in that set (regulated archetypes keep their
# security/compliance floor regardless of the level chosen).
```
### Overrides
- MANDATORY security archetypes (`ai-system`, `commerce`, `web3`, `iot-embedded`, `regulated`): minimum `strict` regardless of setting
- `min-size: enterprise` types from TYPE_MAP.md: minimum `strict`
- Production deploys (devops checkpoint B+C): always shown regardless of level
- CTO can change level mid-session: "make it strict" β updates PROJECT.md
### Safety
No auto-proceed on timeouts. Human approval is always required when checkpoint is shown.
## Pipeline Version Check
Only relevant if PROJECT.md contains `locked: true`. Check:
```bash
grep "locked:" .great_cto/PROJECT.md 2>/dev/null | grep -q "true"
```
If locked β warn CTO before applying updated pipeline rules. Skip this check entirely if `locked:` is absent (most projects).
## Intent Mapping
| CTO says | Action |
|----------|--------|
| "build X" / "implement X" | Feature pipeline |
| "fix X" / "bug" / "hotfix" / "patch" | Fast path |
| "refactor X" / "clean up" / "restructure" / "extract service" | Read `skills/great_cto/playbooks/large-scale-refactor.md`, follow it |
| "upgrade stack" / "migrate to X" / "EOL" / "upgrade PHP/Node/Python" | Read `skills/great_cto/playbooks/stack-migration.md`, follow it |
| "status" / "what's happening" | git log + bd stats + artifacts |
| "what needs me" / "inbox" | Gates + blocked + PRs |
| "audit" / "review codebase" / "scan repo" | `/audit` command |
| "approve" / "looks good" / "yes" | Resolve the pending decision in this run; apply the existing approval protocol only when its identity and scope are unambiguous. Never assume gate:arch. |
| "ship it" / "deploy" | Confirm gate:ship β devops |
| "incident" / "prod issue" / "broken" | Spawn `great_cto-l3-support` agent |
| "CI red" / "build failing" / "pipeline broken" / "checks failing" | Spawn `great_cto-ci-resolver` agent β before any build or deploy |
| "audit the contract" / "smart contract audit" / "is this Solidity safe" / contracts written on a web3 project | Spawn `great_cto-smart-contract-auditor` β after implementation, before gate:ship |
| "show report" / "show QA" / "show security" | Find latest matching file: `ls docs/qa-reports/ docs/security/ docs/architecture/ 2>/dev/null \| sort \| tail -1` β read and display |
| "update agents" | `/update` command |
| "capture this process" / "save as skill" | `/capture` β interview β SKILL.md |
| `/crystallize` / "crystallize" / "extract knowledge" / "what have we learned?" / "turn lessons into skills" | Dispatch `crystallize` skill |
| "revisit ADR" / "reconsider ADR-NNN" | `/revisit` β re-evaluate ADR against current state |
| "digest" / "weekly summary" / "show metrics" / "DORA" | `/digest` β velocity, DORA metrics, tech debt, recommendations |
| "review code" / "code review" / "check the PR" | `/review` β 3-angle code review (perf / security / readability) |
| "log decision" / "we decided X" / "decision:" | Append entry to `docs/decisions/DECISION-LOG.md` β see Β§ Decision Log below |
| "planning phase" / "move to planning" / "switch to review/release phase" | Update `phase:` in PROJECT.md β see Β§ Phases below |
| "pipeline status" / "where are we" | `/inbox` β task progress, evidence and pending decisions |
| "strict mode" / "I want to review code" / "add code review gate" | Set `approval-level: strict` in PROJECT.md β gate:code added after senior-dev |
| "remove code gate" | Set `approval-level: gates-only` in PROJECT.md β gate:code removed; explain the remaining gates |
| "auto mode" / "full auto" | Explain `auto` and its mandatory overrides using `scripts/lib/approval-level.mjs`; change to `auto` only if the user requested that policy. This is not blanket authorization for external actions. |
| "expert mode" / "I want to review everything" | Set `approval-level: expert` in PROJECT.md β 2 checkpoints per agent |
## Pipeline Rule Enforcement (Archetype-Based)
At the start of every pipeline, after loading PROJECT.md, read the archetype to derive pipeline rules:
```bash
ARCHETYPE=$(grep "^archetype:" .great_cto/PROJECT.md 2>/dev/null | awk '{print $2}'); ARCHETYPE=${ARCHETYPE:-web-service}
```
All rules come from ARCHETYPES.md by archetype. No type-specific lookup. Agents read:
- **QA strategy** β ARCHETYPES.md `## QA Strategy by Archetype` + domain packs for `qa-extras`
- **Deploy method** β ARCHETYPES.md `## Deploy Method by Archetype`
- **Security gate** β ARCHETYPES.md archetype table (`mandatory` column) + TYPE_MAP.md Overrides
- **Compliance checklists** β `compliance:` params in PROJECT.md
β¦ (truncated)Repository
103stars
13forks
Details
Related Skills
More coding & development skills you might like
Reticle
Coding & DevelopmentAI agents can generate code, but still struggle to understand what they build. Reticle brings Jev-style machine-native runtime perception to web & desktop applications.
π€claudeπuniversal
1.2k
190
View
agentscope-java
Coding & DevelopmentExpert Java developer skill for AgentScope Java framework - a reactive, message-driven multi-agent system built on Project Reactor. Use when working with reactive programming, LLM integration, agent orchestration, multi-agent systems, or when the user mentions AgentScope, ReActAgent, Mono/Flux, Project Reactor, or Java agent development. Specializes in non-blocking code, tool integration, hooks, pipelines, and production-ready agent applications.
πuniversal
6.0k
1.5k
View
ospec
Coding & DevelopmentDocument-driven OSpec workflow for initialization, change/goal routing, validation, archiving, and durable project knowledge.
β¨geminiπ€claudeπ¬gptπuniversal
396
28
View
misakanet-failure-memory
Coding & Developmentπ A zero-dependency, git-backed micro-lesson library for AI Agents to asynchronously share and search verified debugging experience. Python stdlib only. | https://misakanet.org
π€claudeβ¨οΈcursorπuniversal
424
158
View