/cto-advisor
Run CTO-level technical review of the current execution plan. Uses the cto-advisor skill to evaluate architecture decisions, tech debt implications, technology choices, and engineering excellence.
When to Use
Run this command to get technical leadership guidance on:
- Architecture decisions — evaluating system design patterns, component boundaries
- Technology selection — choosing libraries, frameworks, services
- Technical debt — assessing debt introduction and mitigation strategies
- Engineering metrics — validating against DORA metrics and quality standards
- Integration planning — reviewing API design, vendor dependencies
- Infrastructure changes — evaluating scalability, performance, monitoring
- Security review — checking authentication, authorization, OWASP compliance
Usage
# Review current track's plan
/cto-advisor
# Or manually specify track
/cto-advisor TRACK-001-core-feature
What It Does
The command invokes the cto-plan-reviewer skill, which:
Loads Context
- Reads track's
plan.md and spec.md
- Loads
conductor/tech-stack.md for current technology decisions
- Loads
conductor/product.md for product constraints
- Scans codebase for existing architecture patterns
Applies CTO Advisor Frameworks
- Architecture Review — ADR templates, system design criteria, technology standards
- Tech Debt Assessment — Debt analyzer, 40/25/15 allocation strategy, red flags
- Technology Evaluation — 4-week evaluation framework, vendor management, cost analysis
- Engineering Excellence — DORA metrics (deployment frequency, lead time, MTTR, CFR), quality metrics (test coverage >80%)
- Team & Process — Execution feasibility, knowledge distribution, documentation needs
Generates Technical Review Report
- Architecture assessment with specific recommendations
- Tech debt analysis with severity and mitigation plan
- Technology evaluation with alternatives and lock-in risk
- Engineering excellence checklist (testing, performance, security, observability)
- Team & process fit analysis
- Red flags from CTO advisor checklist
- DORA metrics impact assessment
- Actionable recommendations (must-fix, should-consider, nice-to-have)
- Final verdict: PASS / PASS WITH CONDITIONS / FAIL
Output Format
## CTO Technical Review Report
**Track**: TRACK-001-core-feature
**Reviewer**: cto-plan-reviewer (using cto-advisor frameworks)
**Date**: YYYY-MM-DD
### Architecture Assessment
#### Design Decisions
- [x] Architecture pattern: Zustand store with React hooks — appropriate for client-side state
- [ ] CONCERN: No error boundary strategy for API failures
- Recommendation: Add React Error Boundaries around critical components
#### System Design
- [x] Component boundaries clear and well-defined
- [x] Separation of concerns maintained (state/UI/API separated)
- [ ] CONCERN: Tight coupling between generation and state management
- Recommendation: Extract state to separate store slice for independent evolution
### Tech Debt Analysis
#### Debt Introduction: LOW
- Debt items introduced:
1. Mock client for development — Severity: Low — Justification: Needed for parallel frontend work
2. Hardcoded templates — Severity: Medium — Justification: Will be moved to database in Phase 2
#### Mitigation Plan
- [x] Debt paydown plan documented in plan.md Phase 2
- [x] Capacity allocated: 15% in maintenance sprints — Aligns with cto-advisor 40/25/15 strategy
### Technology Evaluation
#### New Dependencies
| Library/Service | Necessity | Alternatives Considered | Lock-in Risk | Cost Impact |
|----------------|-----------|------------------------|--------------|-------------|
| API Service | High | Alternative A, Alternative B | Medium | $X/request |
| Utility Lib | High | alt-lib-1, alt-lib-2 | Low | None (open source) |
| State Manager | Medium | Redux, Jotai, Context API | Low | None (easy to migrate) |
#### Integration Assessment
- API design: Well-structured with proper error types
- Error handling: Good — includes retry logic and user-friendly messages
- Retry logic: Present with exponential backoff
- Cost monitoring: Missing — Add API usage tracking before production
### Engineering Excellence
#### Testing Strategy: ADEQUATE
- Coverage targets: 70% overall, 90% business logic — Meets cto-advisor 80% threshold for critical paths
- TDD applicability: High for core logic
- Test types planned: Unit (core logic), Integration (store), E2E (full flow)
- Recommendation: Add E2E test for complete end-to-end flow
#### Performance Criteria: DEFINED
- Load requirements: Defined per use case
- Optimization strategy: Lazy loading, caching where appropriate
#### Security Review: PASS
- OWASP top 10 considered: Yes
- Input validation: In place
- Auth patterns: Appropriate for current phase
#### Observability: BASIC
- Monitoring: Missing — Add analytics
- Logging: Present — Console logs for key steps
- Alerting: Not applicable for Phase 1
- Recommendation: Add structured logging for production debugging
### Team & Process
#### Execution Feasibility: HIGH
- Team capability match: Good
- Knowledge distribution: Acceptable, documentation present
- Onboarding impact: Low — clear component structure and naming
#### Documentation Plan: ADEQUATE
- Technical docs needed: Key integration guides
- ADR required: No (decisions documented in architecture doc)
- Onboarding docs: Present in project docs
### Red Flags
**X red flag(s) found:**
- [List any red flags with actions]
### DORA Metrics Impact Assessment
| Metric | Current Target | Impact of Plan | Assessment |
|--------|---------------|----------------|------------|
| Deployment Frequency | >1/day | Positive | Trunk-based dev enables continuous deployment |
| Lead Time | <1 day | Neutral | Feature complexity appropriate for daily deployment |
| MTTR | <1 hour | Positive | Error boundaries and fallbacks reduce recovery time |
| Change Failure Rate | <15% | Positive | TDD on critical paths reduces defects |
### Recommendations
#### Must Fix (Blocking Issues)
1. [List blocking issues]
#### Should Consider (Improvements)
1. [List improvements]
#### Nice to Have (Enhancements)
1. [List enhancements]
### Verdict
**Technical Review**: PASS | PASS WITH CONDITIONS | FAIL
**Rationale**: [Assessment summary]
---
**Next Steps**:
1. Executor should address "Must Fix" items during implementation
2. Track these conditions in plan.md under "Technical Review Conditions"
3. Verify conditions met during Step 4 (Evaluate Execution)
Integration with Conductor
This command is automatically invoked by the conductor during plan evaluation for technical tracks:
/conductor implement
→ detects technical track (keywords: architecture, API, database, etc.)
→ dispatches loop-plan-evaluator
→ invokes /cto-advisor automatically
→ aggregates standard checks + CTO review
→ PASS/FAIL verdict
You can also run it manually at any time to get CTO-level guidance on the current plan.
When CTO Review is Automatic
The conductor automatically includes CTO review when the track's spec.md or plan.md contains these keywords:
Technical Keywords:
- architecture, system design, integration, API, database, schema, migration
- infrastructure, scalability, performance, security
- authentication, authorization, deployment, monitoring, logging
- vendor, technology selection, framework, library
If unsure whether your track needs CTO review, run it manually. It's better to over-review than under-review critical technical decisions.
Manual vs Automatic
Automatic (Recommended)
/conductor implement
# CTO review runs automatically for technical tracks during plan evaluation
Manual (When Needed)
# Get CTO review anytime
/cto-advisor
# Review specific track
/cto-advisor TRACK-002-integration
# Get architecture guidance before planning
/cto-advisor
CTO Advisor Frameworks Used
The command leverages these frameworks from the cto-advisor skill:
1. Architecture Decision Records (ADRs)
- Template for documenting technical decisions
- Context, options, decision, consequences format
- Ensures decisions are traceable and justified
2. Technology Evaluation Framework
- 4-week evaluation process (requirements → research → evaluation → decision)
- Vendor assessment criteria (SLA, cost, lock-in risk)
- Alternatives comparison matrix
3. Tech Debt Strategy
- 40/25/15 capacity allocation (Critical/High/Medium debt)
- Red flags checklist (increasing debt, vendor lock-in, security vulnerabilities)
- Mitigation planning requirements
4. DORA Metrics
- Deployment Frequency target: >1/day
- Lead Time for Changes: <1 day
- Mean Time to Recovery: <1 hour
- Change Failure Rate: <15%
5. Engineering Metrics
- Test Coverage: >80% (70% overall, 90% business logic)
- Code Review: 100% of changes
- Technical Debt: <10% of capacity
6. System Design Review Criteria
- Component boundaries and separation of concerns
- Scalability and performance characteristics
- Error handling and resilience patterns
- Observability and debugging support
Example: Before/After CTO Review
Before CTO Review
# Plan (incomplete technical thinking)
## Phase 1: Add Stripe Integration
- [ ] Install Stripe SDK
- [ ] Create checkout page
- [ ] Add webhook handler
- [ ] Update database with payment status
After CTO Review
# Plan (enhanced with CTO guidance)
## Phase 1: Add Stripe Integration
### Technical Review Conditions
- [!] Add webhook signature verification (Security — prevents unauthorized payments)
- [!] Add idempotency keys (Reliability — prevents duplicate charges)
- [!] Add webhook retry logic with exponential backoff (Resilience — handles temporary failures)
- [!] Add Stripe event logging for audit trail (Observability — debugging and compliance)
- [!] Document webhook failure recovery process in runbook (Operations — incident response)
## Tasks
- [ ] Install Stripe SDK (v11.x — latest stable)
- [ ] Create checkout page
- Acceptance: Stripe Checkout redirects to success/cancel URLs
- Security: No card details stored client-side
- [ ] Add webhook handler at /api/webhooks/stripe
- Acceptance: Verifies signature, handles checkout.session.completed
- Resilience: Idempotent (can handle duplicate events)
- Observability: Logs all events to structured logger
- [ ] Update database with payment status
- Acceptance: Transaction recorded, user tier updated
- Consistency: Atomic transaction (payment + tier update)
- [ ] Add webhook failure recovery cron job
- Acceptance: Polls Stripe for missed events every 1 hour
- Resilience: Handles extended webhook downtime
Key Improvements from CTO Review:
- Security hardening (webhook verification, no client-side card storage)
- Resilience patterns (idempotency, retry logic, recovery cron)
- Observability (structured logging, audit trail)
- Operational readiness (failure recovery documented)
- Specific version and acceptance criteria
Related
.claude/skills/cto-plan-reviewer/SKILL.md — Full CTO review agent documentation
.claude/skills/cto-advisor/SKILL.md — Core CTO advisor frameworks and tools
/conductor implement — Automated loop that includes CTO review
conductor/workflow.md — Evaluate-Loop process
1---2name: cto-advisor-23description: Run CTO-level technical review of the current execution plan - architecture, tech debt, engineering excellence4---5
6# /cto-advisor
7
8Run CTO-level technical review of the current execution plan. Uses the `cto-advisor` skill to evaluate architecture decisions, tech debt implications, technology choices, and engineering excellence.
9
10## When to Use
11
12Run this command to get technical leadership guidance on:
13- **Architecture decisions** — evaluating system design patterns, component boundaries
14- **Technology selection** — choosing libraries, frameworks, services
15- **Technical debt** — assessing debt introduction and mitigation strategies
16- **Engineering metrics** — validating against DORA metrics and quality standards
17- **Integration planning** — reviewing API design, vendor dependencies
18- **Infrastructure changes** — evaluating scalability, performance, monitoring
19- **Security review** — checking authentication, authorization, OWASP compliance
20
21## Usage
22
23```bash
24# Review current track's plan
25/cto-advisor
26
27# Or manually specify track
28/cto-advisor TRACK-001-core-feature
29```
30
31## What It Does
32
33The command invokes the `cto-plan-reviewer` skill, which:
34
351. **Loads Context**
36 - Reads track's `plan.md` and `spec.md`
37 - Loads `conductor/tech-stack.md` for current technology decisions
38 - Loads `conductor/product.md` for product constraints
39 - Scans codebase for existing architecture patterns
40
412. **Applies CTO Advisor Frameworks**
42 - **Architecture Review** — ADR templates, system design criteria, technology standards
43 - **Tech Debt Assessment** — Debt analyzer, 40/25/15 allocation strategy, red flags
44 - **Technology Evaluation** — 4-week evaluation framework, vendor management, cost analysis
45 - **Engineering Excellence** — DORA metrics (deployment frequency, lead time, MTTR, CFR), quality metrics (test coverage >80%)
46 - **Team & Process** — Execution feasibility, knowledge distribution, documentation needs
47
483. **Generates Technical Review Report**
49 - Architecture assessment with specific recommendations
50 - Tech debt analysis with severity and mitigation plan
51 - Technology evaluation with alternatives and lock-in risk
52 - Engineering excellence checklist (testing, performance, security, observability)
53 - Team & process fit analysis
54 - Red flags from CTO advisor checklist
55 - DORA metrics impact assessment
56 - Actionable recommendations (must-fix, should-consider, nice-to-have)
57 - Final verdict: PASS / PASS WITH CONDITIONS / FAIL
58
59## Output Format
60
61```markdown
62## CTO Technical Review Report
63
64**Track**: TRACK-001-core-feature
65**Reviewer**: cto-plan-reviewer (using cto-advisor frameworks)
66**Date**: YYYY-MM-DD
67
68### Architecture Assessment
69
70#### Design Decisions
71- [x] Architecture pattern: Zustand store with React hooks — appropriate for client-side state
72- [ ] CONCERN: No error boundary strategy for API failures
73- Recommendation: Add React Error Boundaries around critical components
74
75#### System Design
76- [x] Component boundaries clear and well-defined
77- [x] Separation of concerns maintained (state/UI/API separated)
78- [ ] CONCERN: Tight coupling between generation and state management
79- Recommendation: Extract state to separate store slice for independent evolution
80
81### Tech Debt Analysis
82
83#### Debt Introduction: LOW
84- Debt items introduced:
85 1. Mock client for development — Severity: Low — Justification: Needed for parallel frontend work
86 2. Hardcoded templates — Severity: Medium — Justification: Will be moved to database in Phase 2
87
88#### Mitigation Plan
89- [x] Debt paydown plan documented in plan.md Phase 2
90- [x] Capacity allocated: 15% in maintenance sprints — Aligns with cto-advisor 40/25/15 strategy
91
92### Technology Evaluation
93
94#### New Dependencies
95| Library/Service | Necessity | Alternatives Considered | Lock-in Risk | Cost Impact |
96|----------------|-----------|------------------------|--------------|-------------|
97| API Service | High | Alternative A, Alternative B | Medium | $X/request |
98| Utility Lib | High | alt-lib-1, alt-lib-2 | Low | None (open source) |
99| State Manager | Medium | Redux, Jotai, Context API | Low | None (easy to migrate) |
100
101#### Integration Assessment
102- API design: Well-structured with proper error types
103- Error handling: Good — includes retry logic and user-friendly messages
104- Retry logic: Present with exponential backoff
105- Cost monitoring: Missing — Add API usage tracking before production
106
107### Engineering Excellence
108
109#### Testing Strategy: ADEQUATE
110- Coverage targets: 70% overall, 90% business logic — Meets cto-advisor 80% threshold for critical paths
111- TDD applicability: High for core logic
112- Test types planned: Unit (core logic), Integration (store), E2E (full flow)
113- Recommendation: Add E2E test for complete end-to-end flow
114
115#### Performance Criteria: DEFINED
116- Load requirements: Defined per use case
117- Optimization strategy: Lazy loading, caching where appropriate
118
119#### Security Review: PASS
120- OWASP top 10 considered: Yes
121- Input validation: In place
122- Auth patterns: Appropriate for current phase
123
124#### Observability: BASIC
125- Monitoring: Missing — Add analytics
126- Logging: Present — Console logs for key steps
127- Alerting: Not applicable for Phase 1
128- Recommendation: Add structured logging for production debugging
129
130### Team & Process
131
132#### Execution Feasibility: HIGH
133- Team capability match: Good
134- Knowledge distribution: Acceptable, documentation present
135- Onboarding impact: Low — clear component structure and naming
136
137#### Documentation Plan: ADEQUATE
138- Technical docs needed: Key integration guides
139- ADR required: No (decisions documented in architecture doc)
140- Onboarding docs: Present in project docs
141
142### Red Flags
143
144**X red flag(s) found:**
145- [List any red flags with actions]
146
147### DORA Metrics Impact Assessment
148
149| Metric | Current Target | Impact of Plan | Assessment |
150|--------|---------------|----------------|------------|
151| Deployment Frequency | >1/day | Positive | Trunk-based dev enables continuous deployment |
152| Lead Time | <1 day | Neutral | Feature complexity appropriate for daily deployment |
153| MTTR | <1 hour | Positive | Error boundaries and fallbacks reduce recovery time |
154| Change Failure Rate | <15% | Positive | TDD on critical paths reduces defects |
155
156### Recommendations
157
158#### Must Fix (Blocking Issues)
1591. [List blocking issues]
160
161#### Should Consider (Improvements)
1621. [List improvements]
163
164#### Nice to Have (Enhancements)
1651. [List enhancements]
166
167### Verdict
168
169**Technical Review**: PASS | PASS WITH CONDITIONS | FAIL
170
171**Rationale**: [Assessment summary]
172
173---
174
175**Next Steps**:
1761. Executor should address "Must Fix" items during implementation
1772. Track these conditions in plan.md under "Technical Review Conditions"
1783. Verify conditions met during Step 4 (Evaluate Execution)
179```
180
181## Integration with Conductor
182
183This command is automatically invoked by the conductor during plan evaluation for technical tracks:
184
185```
186/conductor implement
187 → detects technical track (keywords: architecture, API, database, etc.)
188 → dispatches loop-plan-evaluator
189 → invokes /cto-advisor automatically
190 → aggregates standard checks + CTO review
191 → PASS/FAIL verdict
192```
193
194You can also run it manually at any time to get CTO-level guidance on the current plan.
195
196## When CTO Review is Automatic
197
198The conductor automatically includes CTO review when the track's `spec.md` or `plan.md` contains these keywords:
199
200**Technical Keywords:**
201- architecture, system design, integration, API, database, schema, migration
202- infrastructure, scalability, performance, security
203- authentication, authorization, deployment, monitoring, logging
204- vendor, technology selection, framework, library
205
206**If unsure whether your track needs CTO review**, run it manually. It's better to over-review than under-review critical technical decisions.
207
208## Manual vs Automatic
209
210### Automatic (Recommended)
211```bash
212/conductor implement
213# CTO review runs automatically for technical tracks during plan evaluation
214```
215
216### Manual (When Needed)
217```bash
218# Get CTO review anytime
219/cto-advisor
220
221# Review specific track
222/cto-advisor TRACK-002-integration
223
224# Get architecture guidance before planning
225/cto-advisor
226```
227
228## CTO Advisor Frameworks Used
229
230The command leverages these frameworks from the `cto-advisor` skill:
231
232### 1. Architecture Decision Records (ADRs)
233- Template for documenting technical decisions
234- Context, options, decision, consequences format
235- Ensures decisions are traceable and justified
236
237### 2. Technology Evaluation Framework
238- 4-week evaluation process (requirements → research → evaluation → decision)
239- Vendor assessment criteria (SLA, cost, lock-in risk)
240- Alternatives comparison matrix
241
242### 3. Tech Debt Strategy
243- 40/25/15 capacity allocation (Critical/High/Medium debt)
244- Red flags checklist (increasing debt, vendor lock-in, security vulnerabilities)
245- Mitigation planning requirements
246
247### 4. DORA Metrics
248- Deployment Frequency target: >1/day
249- Lead Time for Changes: <1 day
250- Mean Time to Recovery: <1 hour
251- Change Failure Rate: <15%
252
253### 5. Engineering Metrics
254- Test Coverage: >80% (70% overall, 90% business logic)
255- Code Review: 100% of changes
256- Technical Debt: <10% of capacity
257
258### 6. System Design Review Criteria
259- Component boundaries and separation of concerns
260- Scalability and performance characteristics
261- Error handling and resilience patterns
262- Observability and debugging support
263
264## Example: Before/After CTO Review
265
266### Before CTO Review
267```markdown
268# Plan (incomplete technical thinking)
269
270## Phase 1: Add Stripe Integration
271- [ ] Install Stripe SDK
272- [ ] Create checkout page
273- [ ] Add webhook handler
274- [ ] Update database with payment status
275```
276
277### After CTO Review
278```markdown
279# Plan (enhanced with CTO guidance)
280
281## Phase 1: Add Stripe Integration
282
283### Technical Review Conditions
284- [!] Add webhook signature verification (Security — prevents unauthorized payments)
285- [!] Add idempotency keys (Reliability — prevents duplicate charges)
286- [!] Add webhook retry logic with exponential backoff (Resilience — handles temporary failures)
287- [!] Add Stripe event logging for audit trail (Observability — debugging and compliance)
288- [!] Document webhook failure recovery process in runbook (Operations — incident response)
289
290## Tasks
291- [ ] Install Stripe SDK (v11.x — latest stable)
292- [ ] Create checkout page
293 - Acceptance: Stripe Checkout redirects to success/cancel URLs
294 - Security: No card details stored client-side
295- [ ] Add webhook handler at /api/webhooks/stripe
296 - Acceptance: Verifies signature, handles checkout.session.completed
297 - Resilience: Idempotent (can handle duplicate events)
298 - Observability: Logs all events to structured logger
299- [ ] Update database with payment status
300 - Acceptance: Transaction recorded, user tier updated
301 - Consistency: Atomic transaction (payment + tier update)
302- [ ] Add webhook failure recovery cron job
303 - Acceptance: Polls Stripe for missed events every 1 hour
304 - Resilience: Handles extended webhook downtime
305```
306
307**Key Improvements from CTO Review:**
3081. Security hardening (webhook verification, no client-side card storage)
3092. Resilience patterns (idempotency, retry logic, recovery cron)
3103. Observability (structured logging, audit trail)
3114. Operational readiness (failure recovery documented)
3125. Specific version and acceptance criteria
313
314## Related
315
316- `.claude/skills/cto-plan-reviewer/SKILL.md` — Full CTO review agent documentation
317- `.claude/skills/cto-advisor/SKILL.md` — Core CTO advisor frameworks and tools
318- `/conductor implement` — Automated loop that includes CTO review
319- `conductor/workflow.md` — Evaluate-Loop process