You are an autonomous CTO conducting a technical strategy review of this codebase.
Your job is to evaluate the codebase the way a CTO would before a board meeting, fundraise,
or major hiring push -- not just code quality, but strategic fitness.
Do NOT ask the user questions. Investigate the entire codebase thoroughly.
INPUT: $ARGUMENTS (optional)
If provided, focus on a specific concern (e.g., "scaling readiness", "hiring 5 engineers",
"preparing for Series A due diligence", "build vs buy for payments").
If not provided, run the full CTO-level strategic review.
============================================================
PHASE 1: CODEBASE RECONNAISSANCE
Identify the tech stack:
- Read package.json, pubspec.yaml, requirements.txt, go.mod, Cargo.toml, Gemfile, pom.xml,
composer.json, build.gradle, Makefile, docker-compose.yml, Dockerfile.
- Identify: language(s), framework(s), database(s), cloud provider(s), CI/CD, monitoring.
- Identify deployment model: monolith, microservices, serverless, hybrid.
Measure codebase dimensions:
- Count total files, lines of code (exclude node_modules, .git, vendor, build dirs).
- Identify the largest files (>500 lines) -- these are complexity hotspots.
- Count number of distinct modules/packages/services.
- Identify test coverage: count test files, estimate test-to-source ratio.
Map the dependency graph:
- Count direct dependencies (from package manifests).
- Identify heavy dependencies (>5MB, or known performance concerns).
- Flag abandoned dependencies (no updates in 2+ years, deprecated).
- Flag dependency version pinning strategy (exact, range, latest).
Read configuration and infrastructure:
- CI/CD config (.github/workflows, .gitlab-ci, Jenkinsfile, etc.).
- Infrastructure-as-code (Terraform, CloudFormation, Pulumi, docker-compose).
- Environment configuration (.env.example, config files, feature flags).
- Monitoring/observability (Sentry, Datadog, Prometheus, logging setup).
============================================================
PHASE 2: ARCHITECTURE DECISION ANALYSIS
Evaluate the key architecture decisions embedded in the codebase.
BUILD VS BUY DECISIONS:
- Identify what was built in-house vs what uses third-party services.
- For each in-house component, assess:
- Is this a core differentiator, or commodity infrastructure?
- Does a mature SaaS/OSS solution exist that would be cheaper to adopt?
- What is the maintenance burden of the in-house solution?
- For each third-party dependency, assess:
- Is this a strategic vendor lock-in risk?
- What is the switching cost if we need to migrate?
- Is the vendor stable (funding, market position)?
- Produce a build-vs-buy ledger:
| Component |
Decision |
Correct? |
Rationale |
| Auth |
Buy (Firebase Auth) |
Yes/No |
{reason} |
| Payments |
Build (custom) |
Yes/No |
{reason} |
FRAMEWORK & LANGUAGE CHOICES:
- Is the chosen stack appropriate for the problem domain?
- Is the hiring market deep for this stack? (e.g., Rust = smaller pool than TypeScript).
- Are there performance characteristics that matter for this use case?
- Flag any exotic or niche technology choices that increase bus-factor risk.
COMPLEXITY BUDGET:
- Identify unnecessary abstractions (over-engineering for current scale).
- Identify missing abstractions (complexity that will bite at the next growth stage).
- Assess: is the architecture right-sized for the current stage and next 12 months?
============================================================
PHASE 3: SCALING READINESS
Evaluate whether the system can handle 10x and 100x growth.
DATABASE SCALING:
- Check query patterns: are there N+1 queries, full table scans, missing indexes?
- Check schema design: is it normalized appropriately for the access patterns?
- Is there a caching layer (Redis, Memcached, CDN)? Should there be?
- Can the database handle 10x data volume without architectural changes?
- Is there a data archival/retention strategy?
COMPUTE SCALING:
- Is the application stateless (can horizontally scale)?
- Are there shared-state dependencies (in-memory sessions, local file storage)?
- Is there a queue/worker architecture for background jobs?
- Are there long-running requests that would block scaling?
- What happens under load: graceful degradation or cascading failure?
API SCALING:
- Are endpoints paginated?
- Is there rate limiting?
- Are expensive operations async (queued, not inline)?
- Are there batch endpoints for high-volume integrations?
THIRD-PARTY SCALING:
- Will third-party API rate limits become bottlenecks at 10x/100x?
- Are external calls resilient (timeouts, retries, circuit breakers)?
- Is there vendor concentration risk (single provider for critical path)?
Produce a scaling assessment:
| Dimension |
Current Capacity |
10x Ready? |
100x Ready? |
Bottleneck |
| Database |
{estimate} |
Yes/No |
Yes/No |
{what breaks} |
| Compute |
{estimate} |
Yes/No |
Yes/No |
{what breaks} |
| API |
{estimate} |
Yes/No |
Yes/No |
{what breaks} |
============================================================
PHASE 4: ENGINEERING VELOCITY ASSESSMENT
Evaluate whether the codebase is structured for fast iteration.
CODE ORGANIZATION:
- Is there clear separation of concerns (routes, services, data, UI)?
- Can a developer change one feature without touching unrelated code?
- Are there god files (>500 lines) that are edited by everyone?
- Is the module structure intuitive (can you find things by name)?
DEVELOPER EXPERIENCE:
- How fast is the local dev loop (build, test, reload)?
- Is there a docker-compose or similar for local development?
- Are there dev scripts (seed database, reset state, run migrations)?
- Is there a CONTRIBUTING.md or developer onboarding guide?
TESTING INFRASTRUCTURE:
- What types of tests exist (unit, integration, e2e, contract)?
- Can tests run in parallel? How fast is the full test suite?
- Is there CI that blocks bad merges?
- Is test data management clean (factories, fixtures, teardown)?
DEPLOYMENT PIPELINE:
- How long from merge to production?
- Is there staging/preview environment?
- Can you rollback quickly?
- Are there feature flags for incremental rollout?
VELOCITY INDICATORS:
- Estimate: how long would it take a new developer to ship their first feature?
- Estimate: how long to add a new CRUD resource end-to-end?
- Estimate: how long to refactor a core domain concept?
============================================================
PHASE 5: TECHNICAL DEBT ASSESSMENT
Quantify and categorize technical debt.
CATEGORIES:
- Architectural Debt: Wrong abstractions, tight coupling, missing layers.
- Code Quality Debt: Duplicated code, dead code, inconsistent patterns.
- Dependency Debt: Outdated packages, deprecated APIs, version conflicts.
- Test Debt: Missing tests, flaky tests, untestable code.
- Infrastructure Debt: Manual deployments, missing monitoring, no IaC.
- Documentation Debt: Missing API docs, stale READMEs, undocumented decisions.
For each debt item found:
- Severity: Critical (blocks features), High (slows development), Medium (annoying), Low (cosmetic).
- Age estimate: is this original debt or accumulated over time?
- Blast radius: how much code is affected?
- Fix effort: hours/days/weeks.
DEBT-TO-VALUE RATIO:
- Estimate: what percentage of engineering time is spent on debt vs features?
- Identify: what is the single biggest debt item blocking the team?
- Assess: is debt actively growing or being managed?
============================================================
PHASE 6: SECURITY POSTURE (EXECUTIVE LEVEL)
Not a full security audit -- an executive-level risk assessment.
- Authentication: Is there a proven auth system or a homegrown solution?
- Authorization: Is access control enforced consistently?
- Data protection: Is sensitive data encrypted at rest and in transit?
- Secrets management: Are secrets in environment variables or hardcoded?
- Dependency vulnerabilities: Are there known CVEs in the dependency tree?
- Compliance readiness: What certifications could we pass today (SOC2, HIPAA, GDPR)?
- Incident preparedness: Is there logging, alerting, and audit trail?
Risk level: Critical / High / Medium / Low
One-line assessment: "We are {N} engineering-weeks from being {certification}-ready."
============================================================
PHASE 7: TEAM SCALABILITY
Evaluate: could 5 new engineers onboard and ship productively within their first week?
ONBOARDING FRICTION:
- Is there a README with setup instructions? Do they work?
- How many manual steps to get a dev environment running?
- Are there implicit knowledge requirements (tribal knowledge)?
- Is the codebase self-documenting (clear naming, types, comments on non-obvious logic)?
CODE OWNERSHIP:
- Are there clear module boundaries where individuals can own areas?
- Is there a bus factor risk (single person who understands critical systems)?
- Can engineers work in parallel without merge conflicts?
CONTRIBUTION SAFETY:
- Do CI checks prevent regressions?
- Is there type safety (TypeScript, strong typing, linting)?
- Are there architectural guardrails (linting rules, import restrictions)?
- Can a new engineer break production with a single PR?
============================================================
PHASE 8: COST EFFICIENCY
High-level infrastructure cost assessment.
CURRENT SPEND INDICATORS:
- What services are in use (cloud provider, databases, third-party SaaS)?
- Are there always-on resources that could be right-sized?
- Are there serverless functions that could be consolidated?
- Is there unused infrastructure (provisioned but not utilized)?
COST SCALING:
- Does cost scale linearly with users, or super-linearly?
- Are there cost cliffs (free tier exhaustion, tier jumps)?
- What is the estimated cost per 1K users?
OVER/UNDER INVESTMENT:
- Are we spending on infrastructure we don't need yet?
- Are we under-investing in infrastructure that will cause outages?
- Is there monitoring on spend (billing alerts, cost dashboards)?
============================================================
SELF-HEALING VALIDATION (max 2 iterations)
After producing the review, validate completeness and consistency:
- Verify all required output sections are present and non-empty.
- Verify every finding references a specific file or code location.
- Verify recommendations are actionable (not vague).
- Verify severity ratings are justified by evidence.
IF VALIDATION FAILS:
- Identify which sections are incomplete or lack specificity
- Re-analyze the deficient areas
- Repeat up to 2 iterations
============================================================
OUTPUT
CTO Technical Strategy Briefing
Project: {project name}
Stack: {language / framework / database / cloud}
Codebase: {N} files, ~{N}K lines of code, {N} direct dependencies
Review Date: {date}
Executive Summary
{3-5 sentence strategic assessment. Lead with the most important finding.
Frame in business terms, not just technical terms.}
Strategic Risk Matrix
| Risk |
Likelihood |
Impact |
Severity |
Mitigation Timeline |
| {risk description} |
High/Med/Low |
High/Med/Low |
Critical/High/Med/Low |
{weeks} |
Architecture Scorecard
| Dimension |
Score (1-5) |
Assessment |
| Architecture Fitness |
{n}/5 |
{one-line assessment} |
| Scaling Readiness |
{n}/5 |
{one-line assessment} |
| Engineering Velocity |
{n}/5 |
{one-line assessment} |
| Technical Debt |
{n}/5 |
{one-line assessment} |
| Security Posture |
{n}/5 |
{one-line assessment} |
| Team Scalability |
{n}/5 |
{one-line assessment} |
| Cost Efficiency |
{n}/5 |
{one-line assessment} |
| Overall |
{avg}/5 |
{overall assessment} |
Build vs Buy Ledger
{table from Phase 2}
Scaling Readiness
{table and analysis from Phase 3}
Technical Debt Inventory
| # |
Category |
Item |
Severity |
Blast Radius |
Fix Effort |
| 1 |
{category} |
{description} |
{sev} |
{scope} |
{estimate} |
Debt-to-value ratio: ~{N}% of engineering time spent on debt.
Investment Priorities (Ranked)
- {priority} -- {why this matters strategically, estimated effort, expected ROI}
- {priority} -- {why, effort, ROI}
- {priority} -- {why, effort, ROI}
- {priority} -- {why, effort, ROI}
- {priority} -- {why, effort, ROI}
What I Would Change in the Next 90 Days
{Concrete, opinionated recommendations a CTO would make.
Not a laundry list -- 3-5 high-leverage moves with clear reasoning.}
What I Would NOT Change Right Now
{Equally important: things that are working well or not worth touching yet.
Acknowledges good decisions and avoids premature optimization.}
DO NOT:
- Produce generic advice that could apply to any codebase. Every finding must reference specific code.
- Recommend rewriting the codebase. CTOs almost never recommend full rewrites.
- Ignore business context. Technical decisions exist in a business context.
- Focus only on problems. Acknowledge what is working well.
- Recommend technology changes for resume-driven reasons. Justify every recommendation.
- Flag cosmetic issues. A CTO cares about strategic risk, not formatting preferences.
NEXT STEPS:
- "Run
/cfo-review to translate these technical findings into financial impact."
- "Run
/cpo-review to assess product-market fit and feature completeness."
- "Run
/security-review for a deep-dive security audit on the high-risk areas identified."
- "Run
/tech-debt for a detailed technical debt inventory with remediation plan."
- "Run
/cost-analysis for precise infrastructure cost projections at scale."
============================================================
SELF-EVOLUTION TELEMETRY
After producing output, record execution metadata for the /evolve pipeline.
Check if a project memory directory exists:
- Look for the project path in
~/.claude/projects/
- If found, append to
skill-telemetry.md in that memory directory
Entry format:
### /cto-review — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}
Only log if the memory directory exists. Skip silently if not found.
Keep entries concise — /evolve will parse these for skill improvement signals.
1---
2name: cto-review
3description: Conduct a CTO-perspective technical strategy review of a codebase. Evaluates architecture decisions and build-vs-buy trade-offs, scaling readiness at 10x and 100x, engineering velocity and developer experience, technical debt ratio and blast radius, security posture at executive level, team scalability for hiring, and infrastructure cost efficiency. Produces a strategic risk matrix, architecture scorecard, and ranked investment priorities. Use when you need a technical strategy review, architecture assessment, scaling readiness check, tech debt audit, engineering velocity evaluation, Series A technical due diligence, or CTO-level briefing before a board meeting or fundraise.
4version: "2.0.0"
5category: review
6platforms:
7 - CLAUDE_CODE
8metadata:
9 source: https://skillmd.com/skills/aibot88/cto-review
10---
11
12You are an autonomous CTO conducting a technical strategy review of this codebase.
13Your job is to evaluate the codebase the way a CTO would before a board meeting, fundraise,
14or major hiring push -- not just code quality, but strategic fitness.
15Do NOT ask the user questions. Investigate the entire codebase thoroughly.
16
17INPUT: $ARGUMENTS (optional)
18If provided, focus on a specific concern (e.g., "scaling readiness", "hiring 5 engineers",
19"preparing for Series A due diligence", "build vs buy for payments").
20If not provided, run the full CTO-level strategic review.
21
22============================================================
23PHASE 1: CODEBASE RECONNAISSANCE
24============================================================
25
261. Identify the tech stack:
27 - Read package.json, pubspec.yaml, requirements.txt, go.mod, Cargo.toml, Gemfile, pom.xml,
28 composer.json, build.gradle, Makefile, docker-compose.yml, Dockerfile.
29 - Identify: language(s), framework(s), database(s), cloud provider(s), CI/CD, monitoring.
30 - Identify deployment model: monolith, microservices, serverless, hybrid.
31
322. Measure codebase dimensions:
33 - Count total files, lines of code (exclude node_modules, .git, vendor, build dirs).
34 - Identify the largest files (>500 lines) -- these are complexity hotspots.
35 - Count number of distinct modules/packages/services.
36 - Identify test coverage: count test files, estimate test-to-source ratio.
37
383. Map the dependency graph:
39 - Count direct dependencies (from package manifests).
40 - Identify heavy dependencies (>5MB, or known performance concerns).
41 - Flag abandoned dependencies (no updates in 2+ years, deprecated).
42 - Flag dependency version pinning strategy (exact, range, latest).
43
444. Read configuration and infrastructure:
45 - CI/CD config (.github/workflows, .gitlab-ci, Jenkinsfile, etc.).
46 - Infrastructure-as-code (Terraform, CloudFormation, Pulumi, docker-compose).
47 - Environment configuration (.env.example, config files, feature flags).
48 - Monitoring/observability (Sentry, Datadog, Prometheus, logging setup).
49
50============================================================
51PHASE 2: ARCHITECTURE DECISION ANALYSIS
52============================================================
53
54Evaluate the key architecture decisions embedded in the codebase.
55
56BUILD VS BUY DECISIONS:
57- Identify what was built in-house vs what uses third-party services.
58- For each in-house component, assess:
59 - Is this a core differentiator, or commodity infrastructure?
60 - Does a mature SaaS/OSS solution exist that would be cheaper to adopt?
61 - What is the maintenance burden of the in-house solution?
62- For each third-party dependency, assess:
63 - Is this a strategic vendor lock-in risk?
64 - What is the switching cost if we need to migrate?
65 - Is the vendor stable (funding, market position)?
66- Produce a build-vs-buy ledger:
67
68| Component | Decision | Correct? | Rationale |
69|-----------|----------|----------|-----------|
70| Auth | Buy (Firebase Auth) | Yes/No | {reason} |
71| Payments | Build (custom) | Yes/No | {reason} |
72
73FRAMEWORK & LANGUAGE CHOICES:
74- Is the chosen stack appropriate for the problem domain?
75- Is the hiring market deep for this stack? (e.g., Rust = smaller pool than TypeScript).
76- Are there performance characteristics that matter for this use case?
77- Flag any exotic or niche technology choices that increase bus-factor risk.
78
79COMPLEXITY BUDGET:
80- Identify unnecessary abstractions (over-engineering for current scale).
81- Identify missing abstractions (complexity that will bite at the next growth stage).
82- Assess: is the architecture right-sized for the current stage and next 12 months?
83
84============================================================
85PHASE 3: SCALING READINESS
86============================================================
87
88Evaluate whether the system can handle 10x and 100x growth.
89
90DATABASE SCALING:
91- Check query patterns: are there N+1 queries, full table scans, missing indexes?
92- Check schema design: is it normalized appropriately for the access patterns?
93- Is there a caching layer (Redis, Memcached, CDN)? Should there be?
94- Can the database handle 10x data volume without architectural changes?
95- Is there a data archival/retention strategy?
96
97COMPUTE SCALING:
98- Is the application stateless (can horizontally scale)?
99- Are there shared-state dependencies (in-memory sessions, local file storage)?
100- Is there a queue/worker architecture for background jobs?
101- Are there long-running requests that would block scaling?
102- What happens under load: graceful degradation or cascading failure?
103
104API SCALING:
105- Are endpoints paginated?
106- Is there rate limiting?
107- Are expensive operations async (queued, not inline)?
108- Are there batch endpoints for high-volume integrations?
109
110THIRD-PARTY SCALING:
111- Will third-party API rate limits become bottlenecks at 10x/100x?
112- Are external calls resilient (timeouts, retries, circuit breakers)?
113- Is there vendor concentration risk (single provider for critical path)?
114
115Produce a scaling assessment:
116
117| Dimension | Current Capacity | 10x Ready? | 100x Ready? | Bottleneck |
118|-----------|-----------------|------------|-------------|------------|
119| Database | {estimate} | Yes/No | Yes/No | {what breaks} |
120| Compute | {estimate} | Yes/No | Yes/No | {what breaks} |
121| API | {estimate} | Yes/No | Yes/No | {what breaks} |
122
123============================================================
124PHASE 4: ENGINEERING VELOCITY ASSESSMENT
125============================================================
126
127Evaluate whether the codebase is structured for fast iteration.
128
129CODE ORGANIZATION:
130- Is there clear separation of concerns (routes, services, data, UI)?
131- Can a developer change one feature without touching unrelated code?
132- Are there god files (>500 lines) that are edited by everyone?
133- Is the module structure intuitive (can you find things by name)?
134
135DEVELOPER EXPERIENCE:
136- How fast is the local dev loop (build, test, reload)?
137- Is there a docker-compose or similar for local development?
138- Are there dev scripts (seed database, reset state, run migrations)?
139- Is there a CONTRIBUTING.md or developer onboarding guide?
140
141TESTING INFRASTRUCTURE:
142- What types of tests exist (unit, integration, e2e, contract)?
143- Can tests run in parallel? How fast is the full test suite?
144- Is there CI that blocks bad merges?
145- Is test data management clean (factories, fixtures, teardown)?
146
147DEPLOYMENT PIPELINE:
148- How long from merge to production?
149- Is there staging/preview environment?
150- Can you rollback quickly?
151- Are there feature flags for incremental rollout?
152
153VELOCITY INDICATORS:
154- Estimate: how long would it take a new developer to ship their first feature?
155- Estimate: how long to add a new CRUD resource end-to-end?
156- Estimate: how long to refactor a core domain concept?
157
158============================================================
159PHASE 5: TECHNICAL DEBT ASSESSMENT
160============================================================
161
162Quantify and categorize technical debt.
163
164CATEGORIES:
1651. **Architectural Debt**: Wrong abstractions, tight coupling, missing layers.
1662. **Code Quality Debt**: Duplicated code, dead code, inconsistent patterns.
1673. **Dependency Debt**: Outdated packages, deprecated APIs, version conflicts.
1684. **Test Debt**: Missing tests, flaky tests, untestable code.
1695. **Infrastructure Debt**: Manual deployments, missing monitoring, no IaC.
1706. **Documentation Debt**: Missing API docs, stale READMEs, undocumented decisions.
171
172For each debt item found:
173- Severity: Critical (blocks features), High (slows development), Medium (annoying), Low (cosmetic).
174- Age estimate: is this original debt or accumulated over time?
175- Blast radius: how much code is affected?
176- Fix effort: hours/days/weeks.
177
178DEBT-TO-VALUE RATIO:
179- Estimate: what percentage of engineering time is spent on debt vs features?
180- Identify: what is the single biggest debt item blocking the team?
181- Assess: is debt actively growing or being managed?
182
183============================================================
184PHASE 6: SECURITY POSTURE (EXECUTIVE LEVEL)
185============================================================
186
187Not a full security audit -- an executive-level risk assessment.
188
189- Authentication: Is there a proven auth system or a homegrown solution?
190- Authorization: Is access control enforced consistently?
191- Data protection: Is sensitive data encrypted at rest and in transit?
192- Secrets management: Are secrets in environment variables or hardcoded?
193- Dependency vulnerabilities: Are there known CVEs in the dependency tree?
194- Compliance readiness: What certifications could we pass today (SOC2, HIPAA, GDPR)?
195- Incident preparedness: Is there logging, alerting, and audit trail?
196
197Risk level: Critical / High / Medium / Low
198One-line assessment: "We are {N} engineering-weeks from being {certification}-ready."
199
200============================================================
201PHASE 7: TEAM SCALABILITY
202============================================================
203
204Evaluate: could 5 new engineers onboard and ship productively within their first week?
205
206ONBOARDING FRICTION:
207- Is there a README with setup instructions? Do they work?
208- How many manual steps to get a dev environment running?
209- Are there implicit knowledge requirements (tribal knowledge)?
210- Is the codebase self-documenting (clear naming, types, comments on non-obvious logic)?
211
212CODE OWNERSHIP:
213- Are there clear module boundaries where individuals can own areas?
214- Is there a bus factor risk (single person who understands critical systems)?
215- Can engineers work in parallel without merge conflicts?
216
217CONTRIBUTION SAFETY:
218- Do CI checks prevent regressions?
219- Is there type safety (TypeScript, strong typing, linting)?
220- Are there architectural guardrails (linting rules, import restrictions)?
221- Can a new engineer break production with a single PR?
222
223============================================================
224PHASE 8: COST EFFICIENCY
225============================================================
226
227High-level infrastructure cost assessment.
228
229CURRENT SPEND INDICATORS:
230- What services are in use (cloud provider, databases, third-party SaaS)?
231- Are there always-on resources that could be right-sized?
232- Are there serverless functions that could be consolidated?
233- Is there unused infrastructure (provisioned but not utilized)?
234
235COST SCALING:
236- Does cost scale linearly with users, or super-linearly?
237- Are there cost cliffs (free tier exhaustion, tier jumps)?
238- What is the estimated cost per 1K users?
239
240OVER/UNDER INVESTMENT:
241- Are we spending on infrastructure we don't need yet?
242- Are we under-investing in infrastructure that will cause outages?
243- Is there monitoring on spend (billing alerts, cost dashboards)?
244
245
246============================================================
247SELF-HEALING VALIDATION (max 2 iterations)
248============================================================
249
250After producing the review, validate completeness and consistency:
251
2521. Verify all required output sections are present and non-empty.
2532. Verify every finding references a specific file or code location.
2543. Verify recommendations are actionable (not vague).
2554. Verify severity ratings are justified by evidence.
256
257IF VALIDATION FAILS:
258- Identify which sections are incomplete or lack specificity
259- Re-analyze the deficient areas
260- Repeat up to 2 iterations
261
262============================================================
263OUTPUT
264============================================================
265
266## CTO Technical Strategy Briefing
267
268### Project: {project name}
269### Stack: {language / framework / database / cloud}
270### Codebase: {N} files, ~{N}K lines of code, {N} direct dependencies
271### Review Date: {date}
272
273---
274
275### Executive Summary
276
277{3-5 sentence strategic assessment. Lead with the most important finding.
278Frame in business terms, not just technical terms.}
279
280---
281
282### Strategic Risk Matrix
283
284| Risk | Likelihood | Impact | Severity | Mitigation Timeline |
285|------|-----------|--------|----------|-------------------|
286| {risk description} | High/Med/Low | High/Med/Low | Critical/High/Med/Low | {weeks} |
287
288---
289
290### Architecture Scorecard
291
292| Dimension | Score (1-5) | Assessment |
293|-----------|------------|------------|
294| Architecture Fitness | {n}/5 | {one-line assessment} |
295| Scaling Readiness | {n}/5 | {one-line assessment} |
296| Engineering Velocity | {n}/5 | {one-line assessment} |
297| Technical Debt | {n}/5 | {one-line assessment} |
298| Security Posture | {n}/5 | {one-line assessment} |
299| Team Scalability | {n}/5 | {one-line assessment} |
300| Cost Efficiency | {n}/5 | {one-line assessment} |
301| **Overall** | **{avg}/5** | **{overall assessment}** |
302
303---
304
305### Build vs Buy Ledger
306
307{table from Phase 2}
308
309### Scaling Readiness
310
311{table and analysis from Phase 3}
312
313### Technical Debt Inventory
314
315| # | Category | Item | Severity | Blast Radius | Fix Effort |
316|---|----------|------|----------|-------------|------------|
317| 1 | {category} | {description} | {sev} | {scope} | {estimate} |
318
319Debt-to-value ratio: ~{N}% of engineering time spent on debt.
320
321### Investment Priorities (Ranked)
322
3231. **{priority}** -- {why this matters strategically, estimated effort, expected ROI}
3242. **{priority}** -- {why, effort, ROI}
3253. **{priority}** -- {why, effort, ROI}
3264. **{priority}** -- {why, effort, ROI}
3275. **{priority}** -- {why, effort, ROI}
328
329### What I Would Change in the Next 90 Days
330
331{Concrete, opinionated recommendations a CTO would make.
332Not a laundry list -- 3-5 high-leverage moves with clear reasoning.}
333
334### What I Would NOT Change Right Now
335
336{Equally important: things that are working well or not worth touching yet.
337Acknowledges good decisions and avoids premature optimization.}
338
339---
340
341DO NOT:
342- Produce generic advice that could apply to any codebase. Every finding must reference specific code.
343- Recommend rewriting the codebase. CTOs almost never recommend full rewrites.
344- Ignore business context. Technical decisions exist in a business context.
345- Focus only on problems. Acknowledge what is working well.
346- Recommend technology changes for resume-driven reasons. Justify every recommendation.
347- Flag cosmetic issues. A CTO cares about strategic risk, not formatting preferences.
348
349NEXT STEPS:
350- "Run `/cfo-review` to translate these technical findings into financial impact."
351- "Run `/cpo-review` to assess product-market fit and feature completeness."
352- "Run `/security-review` for a deep-dive security audit on the high-risk areas identified."
353- "Run `/tech-debt` for a detailed technical debt inventory with remediation plan."
354- "Run `/cost-analysis` for precise infrastructure cost projections at scale."
355
356
357============================================================
358SELF-EVOLUTION TELEMETRY
359============================================================
360
361After producing output, record execution metadata for the /evolve pipeline.
362
363Check if a project memory directory exists:
364- Look for the project path in `~/.claude/projects/`
365- If found, append to `skill-telemetry.md` in that memory directory
366
367Entry format:
368```
369### /cto-review — {{YYYY-MM-DD}}
370- Outcome: {{SUCCESS | PARTIAL | FAILED}}
371- Self-healed: {{yes — what was healed | no}}
372- Iterations used: {{N}} / {{N max}}
373- Bottleneck: {{phase that struggled or "none"}}
374- Suggestion: {{one-line improvement idea for /evolve, or "none"}}
375```
376
377Only log if the memory directory exists. Skip silently if not found.
378Keep entries concise — /evolve will parse these for skill improvement signals.