codecruise 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +111 -0
  3. package/bin/codecruise.js +68 -0
  4. package/config/CLAUDE.md +107 -0
  5. package/config/agents/analyst.md +48 -0
  6. package/config/agents/architect-reviewer.md +161 -0
  7. package/config/agents/architect.md +119 -0
  8. package/config/agents/critic.md +63 -0
  9. package/config/agents/developer.md +96 -0
  10. package/config/agents/devops.md +81 -0
  11. package/config/agents/orchestrator.md +91 -0
  12. package/config/agents/planner.md +139 -0
  13. package/config/agents/retro.md +52 -0
  14. package/config/agents/reviewer.md +101 -0
  15. package/config/agents/security-reviewer.md +57 -0
  16. package/config/agents/stack/expo/AGENT.md +473 -0
  17. package/config/agents/stack/expo/rules/critical.md +427 -0
  18. package/config/agents/stack/expo/rules/native.md +455 -0
  19. package/config/agents/stack/expo/rules/navigation.md +445 -0
  20. package/config/agents/stack/expo/rules/performance.md +415 -0
  21. package/config/agents/stack/fastify/AGENT.md +397 -0
  22. package/config/agents/stack/fastify/rules/api-design.md +283 -0
  23. package/config/agents/stack/fastify/rules/critical.md +232 -0
  24. package/config/agents/stack/fastify/rules/queues.md +303 -0
  25. package/config/agents/stack/fastify/rules/security.md +384 -0
  26. package/config/agents/stack/index.yaml +48 -0
  27. package/config/agents/stack/nextjs/AGENT.md +421 -0
  28. package/config/agents/stack/nextjs/rules/components.md +413 -0
  29. package/config/agents/stack/nextjs/rules/critical.md +391 -0
  30. package/config/agents/stack/nextjs/rules/performance.md +403 -0
  31. package/config/agents/stack/nextjs/rules/styling.md +334 -0
  32. package/config/agents/stack/shared-ts/AGENT.md +384 -0
  33. package/config/agents/stack/shared-ts/rules/critical.md +315 -0
  34. package/config/agents/stack/shared-ts/rules/patterns.md +384 -0
  35. package/config/agents/stack/shared-ts/rules/zod.md +427 -0
  36. package/config/agents/tester.md +79 -0
  37. package/config/commands/architect-discuss.md +366 -0
  38. package/config/commands/architect-list.md +160 -0
  39. package/config/commands/architect-review.md +111 -0
  40. package/config/commands/architect.md +118 -0
  41. package/config/commands/compact.md +118 -0
  42. package/config/commands/companion.md +279 -0
  43. package/config/commands/dashboard.md +152 -0
  44. package/config/commands/doctor.md +227 -0
  45. package/config/commands/dogfood-report.md +101 -0
  46. package/config/commands/flags/run-autonomous.md +110 -0
  47. package/config/commands/flags/run-pause.md +80 -0
  48. package/config/commands/ingest.md +173 -0
  49. package/config/commands/init.md +128 -0
  50. package/config/commands/metrics.md +87 -0
  51. package/config/commands/parallel.md +320 -0
  52. package/config/commands/pause.md +55 -0
  53. package/config/commands/plan-review.md +130 -0
  54. package/config/commands/plan.md +216 -0
  55. package/config/commands/production-check.md +308 -0
  56. package/config/commands/refine.md +323 -0
  57. package/config/commands/resume.md +72 -0
  58. package/config/commands/retro.md +121 -0
  59. package/config/commands/retry.md +75 -0
  60. package/config/commands/role.md +310 -0
  61. package/config/commands/run.md +417 -0
  62. package/config/commands/scope.md +85 -0
  63. package/config/commands/setup-permissions.md +104 -0
  64. package/config/commands/skip.md +75 -0
  65. package/config/commands/spec-forge.md +213 -0
  66. package/config/commands/spec-help.md +194 -0
  67. package/config/commands/spec-patch.md +342 -0
  68. package/config/commands/spec-resolve.md +110 -0
  69. package/config/commands/spec-review.md +153 -0
  70. package/config/commands/status.md +114 -0
  71. package/config/commands/sync.md +131 -0
  72. package/config/commands/task.md +138 -0
  73. package/config/commands/verify.md +124 -0
  74. package/config/hooks/README.md +632 -0
  75. package/config/hooks/activity-log.sh +187 -0
  76. package/config/hooks/anti-rationalize.sh +52 -0
  77. package/config/hooks/capture-verification.sh +112 -0
  78. package/config/hooks/collect-metrics.sh +135 -0
  79. package/config/hooks/enforce-file-scope.sh +75 -0
  80. package/config/hooks/enforce-state-machine.sh +161 -0
  81. package/config/hooks/enforce-tdd.sh +180 -0
  82. package/config/hooks/format.sh +40 -0
  83. package/config/hooks/lib/activity-helpers.sh +162 -0
  84. package/config/hooks/lib/read-settings.sh +71 -0
  85. package/config/hooks/load-context-skills.sh +95 -0
  86. package/config/hooks/notify.sh +81 -0
  87. package/config/hooks/pre-commit.sample +35 -0
  88. package/config/hooks/protect-files.sh +63 -0
  89. package/config/hooks/track-agents.sh +41 -0
  90. package/config/hooks/track-commands.sh +37 -0
  91. package/config/hooks/track-enforcement.sh +44 -0
  92. package/config/hooks/track-ooda.sh +77 -0
  93. package/config/hooks/validate-commit-msg.sh +35 -0
  94. package/config/hooks/validate-plan.sh +213 -0
  95. package/config/hooks/verify-criteria.sh +46 -0
  96. package/config/hooks/verify-todo-completion.sh +140 -0
  97. package/config/rules/comments.md +25 -0
  98. package/config/rules/decision-rules.md +308 -0
  99. package/config/rules/hygiene.md +247 -0
  100. package/config/rules/pattern-detection.md +372 -0
  101. package/config/rules/profiles.md +193 -0
  102. package/config/rules/recovery.md +83 -0
  103. package/config/rules/scope-detection.md +213 -0
  104. package/config/rules/standards.md +127 -0
  105. package/config/rules/workflow.md +121 -0
  106. package/config/schemas.md +767 -0
  107. package/config/settings.json +195 -0
  108. package/config/skills/backend/SKILL.md +734 -0
  109. package/config/skills/database/SKILL.md +426 -0
  110. package/config/skills/frontend/SKILL.md +434 -0
  111. package/config/skills/git/SKILL.md +396 -0
  112. package/config/skills/index.yaml +36 -0
  113. package/config/skills/observability/SKILL.md +430 -0
  114. package/config/skills/package-dev/SKILL.md +498 -0
  115. package/config/skills/performance/SKILL.md +378 -0
  116. package/config/skills/resilience/SKILL.md +573 -0
  117. package/config/skills/testing/SKILL.md +398 -0
  118. package/config/skills/testing-patterns/SKILL.md +276 -0
  119. package/config/skills/typescript/SKILL.md +152 -0
  120. package/config/templates/CLAUDE.md +70 -0
  121. package/config/templates/README.md +117 -0
  122. package/config/templates/steering/adr-template.md +102 -0
  123. package/config/templates/steering/product.md +60 -0
  124. package/config/templates/steering/rfc-template.md +159 -0
  125. package/config/templates/steering/structure.md +146 -0
  126. package/config/templates/steering/tech.md +85 -0
  127. package/package.json +40 -0
  128. package/src/install.js +163 -0
  129. package/src/report.js +310 -0
@@ -0,0 +1,152 @@
1
+ ---
2
+ name: typescript
3
+ description: TypeScript strict patterns and type safety
4
+ version: 1.0.0
5
+ triggers:
6
+ - "*.ts"
7
+ - "*.tsx"
8
+ - types
9
+ - strict
10
+ - zod
11
+ ---
12
+
13
+ # TypeScript Skill
14
+
15
+ Strict TypeScript patterns for type-safe, maintainable code.
16
+
17
+ ## Quick Reference
18
+
19
+ | ID | Rule | Priority |
20
+ |----|------|----------|
21
+ | ts-1 | Enable strict mode in tsconfig.json | CRITICAL |
22
+ | ts-2 | Never use `any`, use `unknown` for unknown types | CRITICAL |
23
+ | ts-3 | Use Zod for runtime validation at boundaries | CRITICAL |
24
+ | ts-4 | Prefer `interface` for objects, `type` for unions | HIGH |
25
+ | ts-5 | Use `as const` for literal types | HIGH |
26
+ | ts-6 | Avoid type assertions, use type guards | HIGH |
27
+ | ts-7 | Use discriminated unions for state machines | HIGH |
28
+ | ts-8 | Return `Result<T, E>` for operations that can fail | HIGH |
29
+ | ts-9 | Use branded types for IDs and special strings | MEDIUM |
30
+ | ts-10 | Prefer `readonly` for immutable data | MEDIUM |
31
+ | ts-11 | Use `satisfies` for type checking without widening | MEDIUM |
32
+ | ts-12 | Colocate types with implementation | MEDIUM |
33
+ | ts-13 | Export types separately from runtime code | LOW |
34
+ | ts-14 | Use `NonNullable<T>` after null checks | LOW |
35
+ | ts-15 | Avoid enums, use const objects with `as const` | LOW |
36
+
37
+ ## Critical Rules (Always Apply)
38
+
39
+ ### ts-1: Strict Mode
40
+
41
+ ```json
42
+ {
43
+ "compilerOptions": {
44
+ "strict": true,
45
+ "noUncheckedIndexedAccess": true,
46
+ "noImplicitReturns": true,
47
+ "noFallthroughCasesInSwitch": true,
48
+ "exactOptionalPropertyTypes": true
49
+ }
50
+ }
51
+ ```
52
+
53
+ ### ts-2: No Any
54
+
55
+ ```typescript
56
+ // BAD
57
+ function process(data: any) { return data.value }
58
+
59
+ // GOOD
60
+ function process(data: unknown) {
61
+ if (isValid(data)) return data.value
62
+ }
63
+ ```
64
+
65
+ ### ts-3: Zod at Boundaries
66
+
67
+ ```typescript
68
+ const UserSchema = z.object({
69
+ id: z.string().uuid(),
70
+ email: z.string().email(),
71
+ });
72
+ type User = z.infer<typeof UserSchema>;
73
+
74
+ // Validate external input
75
+ const user = UserSchema.parse(request.body);
76
+ ```
77
+
78
+ ### ts-7: Discriminated Unions
79
+
80
+ ```typescript
81
+ type AsyncState<T> =
82
+ | { status: 'idle' }
83
+ | { status: 'loading' }
84
+ | { status: 'success'; data: T }
85
+ | { status: 'error'; error: Error };
86
+ ```
87
+
88
+ ### ts-8: Result Type
89
+
90
+ ```typescript
91
+ type Result<T, E = Error> =
92
+ | { ok: true; value: T }
93
+ | { ok: false; error: E };
94
+
95
+ function parse(json: string): Result<object> {
96
+ try {
97
+ return { ok: true, value: JSON.parse(json) };
98
+ } catch (e) {
99
+ return { ok: false, error: e as Error };
100
+ }
101
+ }
102
+ ```
103
+
104
+ ### ts-9: Branded Types
105
+
106
+ ```typescript
107
+ type UserId = string & { readonly __brand: 'UserId' };
108
+ type PostId = string & { readonly __brand: 'PostId' };
109
+
110
+ // Prevents mixing up IDs
111
+ function getUser(id: UserId) { }
112
+ function getPost(id: PostId) { }
113
+ ```
114
+
115
+ ### ts-6: Type Guards
116
+
117
+ ```typescript
118
+ function isUser(value: unknown): value is User {
119
+ return (
120
+ typeof value === 'object' &&
121
+ value !== null &&
122
+ 'id' in value &&
123
+ 'email' in value
124
+ );
125
+ }
126
+ ```
127
+
128
+ ### ts-5: Const Assertions
129
+
130
+ ```typescript
131
+ const ROLES = ['admin', 'user', 'guest'] as const;
132
+ type Role = typeof ROLES[number]; // 'admin' | 'user' | 'guest'
133
+
134
+ const CONFIG = {
135
+ apiUrl: 'https://api.example.com',
136
+ timeout: 5000,
137
+ } as const;
138
+ ```
139
+
140
+ ### ts-15: Avoid Enums
141
+
142
+ ```typescript
143
+ // BAD
144
+ enum Status { Active, Inactive }
145
+
146
+ // GOOD
147
+ const Status = {
148
+ Active: 'active',
149
+ Inactive: 'inactive',
150
+ } as const;
151
+ type Status = typeof Status[keyof typeof Status];
152
+ ```
@@ -0,0 +1,70 @@
1
+ # {Project Name}
2
+
3
+ <!-- Keep this file <100 lines. Use steering docs for details. -->
4
+
5
+ ## What
6
+
7
+ {One-liner: "{Project} is a {type} that {value} for {audience}."}
8
+
9
+ ## Stack
10
+
11
+ - **Language**: {e.g., TypeScript 5.x}
12
+ - **Runtime**: {e.g., Node 20, Bun 1.x}
13
+ - **Framework**: {e.g., Next.js 14, Express}
14
+ - **Package Manager**: {npm|pnpm|yarn|bun}
15
+
16
+ ## Quality Command
17
+
18
+ ```bash
19
+ {single command that runs lint + typecheck + tests, must be <10s}
20
+ ```
21
+
22
+ ## Key Commands
23
+
24
+ ```bash
25
+ {install_command} # Install dependencies
26
+ {dev_command} # Start dev server
27
+ {build_command} # Production build
28
+ {test_command} # Run tests
29
+ ```
30
+
31
+ ## Project Structure
32
+
33
+ ```
34
+ src/
35
+ ├── {main_dir}/ # {purpose}
36
+ ├── {main_dir}/ # {purpose}
37
+ └── {main_dir}/ # {purpose}
38
+ ```
39
+
40
+ ## Steering Docs
41
+
42
+ <!-- Progressive disclosure: details live in these files -->
43
+
44
+ | Doc | Purpose |
45
+ |-----|---------|
46
+ | `.codecruise/steering/product.md` | What we're building, users, scope |
47
+ | `.codecruise/steering/tech.md` | Full stack details, constraints |
48
+ | `.codecruise/steering/structure.md` | Architecture, patterns, conventions |
49
+ | `.codecruise/canon/spec.md` | Detailed requirements (FR/NFR) |
50
+ | `.codecruise/canon/decisions.md` | Architecture decisions (ADRs) |
51
+
52
+ ## Rules
53
+
54
+ <!-- Only universally applicable rules. Max 10. -->
55
+
56
+ 1. TDD: Write tests before implementation
57
+ 2. No secrets in code/logs/commits
58
+ 3. No new dependencies without approval
59
+ 4. Atomic commits: one logical change per commit
60
+ 5. Update `progress.yaml` after every task
61
+
62
+ ## Domain Context
63
+
64
+ <!-- 1-2 sentences of domain expertise that helps understanding -->
65
+
66
+ {e.g., "Fintech app handling multi-currency. Decimal precision critical. PCI compliance required."}
67
+
68
+ ---
69
+
70
+ *Generated by codecruise. Edit steering docs for details.*
@@ -0,0 +1,117 @@
1
+ # CodeCruise Templates
2
+
3
+ World-class documentation templates based on industry best practices.
4
+
5
+ ## Sources & Inspiration
6
+
7
+ | Template | Based On |
8
+ |----------|----------|
9
+ | CLAUDE.md | [HumanLayer best practices](https://www.humanlayer.dev/blog/writing-a-good-claude-md), [AGENTS.md spec](https://agents.md/) |
10
+ | product.md | PRD templates from Google, Amazon, HashiCorp |
11
+ | tech.md | Tech stack documentation patterns |
12
+ | structure.md | [C4 Model](https://c4model.com/), folder conventions |
13
+ | adr-template.md | [ADR GitHub](https://github.com/joelparkerhenderson/architecture-decision-record), MADR format |
14
+ | rfc-template.md | [Pragmatic Engineer](https://newsletter.pragmaticengineer.com/p/rfcs-and-design-docs), Rust RFC process |
15
+
16
+ ## Design Principles
17
+
18
+ ### 1. Progressive Disclosure
19
+
20
+ CLAUDE.md is minimal (<100 lines). Details live in steering docs.
21
+
22
+ ```
23
+ CLAUDE.md (always loaded, ~100 lines) # Claude Code requirement
24
+
25
+ ├── .codecruise/steering/product.md # CodeCruise steering
26
+ ├── .codecruise/steering/tech.md # CodeCruise steering
27
+ ├── .codecruise/steering/structure.md # CodeCruise steering
28
+ └── .codecruise/canon/spec.md # Canonical spec
29
+ ```
30
+
31
+ ### 2. Separation of Concerns
32
+
33
+ | Doc | Answers |
34
+ |-----|---------|
35
+ | product.md | **What** are we building and **why**? |
36
+ | tech.md | **How** are we building it (tools)? |
37
+ | structure.md | **Where** does code go (architecture)? |
38
+ | spec.md | **What exactly** (detailed requirements)? |
39
+ | decisions.md | **Why** did we choose X over Y? |
40
+
41
+ ### 3. AI-First Design
42
+
43
+ - Clear, structured sections (easy to parse)
44
+ - Explicit over implicit
45
+ - Tables over prose (faster scanning)
46
+ - Commands over descriptions (actionable)
47
+
48
+ ### 4. Living Documentation
49
+
50
+ - Templates include `Last updated: {date}`
51
+ - `/doctor --validate-steering` checks for staleness
52
+ - ADRs are append-only (immutable decisions)
53
+
54
+ ## Template Structure
55
+
56
+ ```
57
+ config/templates/
58
+ ├── CLAUDE.md # Minimal project context
59
+ ├── README.md # This file
60
+ └── steering/
61
+ ├── product.md # Product context
62
+ ├── tech.md # Tech stack
63
+ ├── structure.md # Architecture & conventions
64
+ ├── adr-template.md # Architecture Decision Record
65
+ └── rfc-template.md # Request for Comments
66
+ ```
67
+
68
+ ## Usage
69
+
70
+ ### Via /init
71
+
72
+ ```bash
73
+ /init # Creates CLAUDE.md + steering docs
74
+ /init --minimal # CLAUDE.md only
75
+ /init --full # All templates including RFC/ADR
76
+ ```
77
+
78
+ ### Manual
79
+
80
+ Copy templates to your project:
81
+
82
+ ```bash
83
+ # CLAUDE.md goes in project root (Claude Code requirement)
84
+ cp ~/.claude/templates/CLAUDE.md ./CLAUDE.md
85
+
86
+ # Steering docs go in .codecruise/
87
+ mkdir -p .codecruise/steering
88
+ cp ~/.claude/templates/steering/*.md .codecruise/steering/
89
+ ```
90
+
91
+ ## Validation
92
+
93
+ ```bash
94
+ /doctor --validate-steering # Check steering docs exist and are current
95
+ ```
96
+
97
+ | Check | Pass | Warn | Fail |
98
+ |-------|------|------|------|
99
+ | CLAUDE.md exists | Present | — | Missing |
100
+ | CLAUDE.md < 150 lines | Yes | 150-300 lines | > 300 lines |
101
+ | product.md exists | Present | — | Missing |
102
+ | tech.md exists | Present | — | Missing |
103
+ | structure.md exists | Present | — | Missing |
104
+ | Docs updated < 30 days | Yes | 30-90 days | > 90 days |
105
+ | Quality command works | Passes | — | Fails |
106
+
107
+ ## Comparison with Alternatives
108
+
109
+ | Feature | CodeCruise | Kiro | AGENTS.md |
110
+ |---------|------------|------|-----------|
111
+ | Minimal CLAUDE.md | ✅ <100 lines | ⚠️ No guidance | ✅ |
112
+ | Progressive disclosure | ✅ Steering docs | ✅ Steering dir | ❌ |
113
+ | Structured templates | ✅ | ⚠️ Basic | ❌ |
114
+ | Validation | ✅ /doctor | ❌ | ❌ |
115
+ | ADR support | ✅ Template | ❌ | ❌ |
116
+ | RFC support | ✅ Template | ❌ | ❌ |
117
+ | Schema enforcement | ✅ schemas.md | ❌ | ❌ |
@@ -0,0 +1,102 @@
1
+ # ADR-{NNN}: {Title}
2
+
3
+ > Architecture Decision Record
4
+
5
+ ## Status
6
+
7
+ <!-- Proposed | Accepted | Deprecated | Superseded by ADR-XXX -->
8
+ **Proposed** — {date}
9
+
10
+ ## Context
11
+
12
+ <!--
13
+ What is the issue? What forces are at play?
14
+ Include: technical constraints, business requirements, team factors
15
+ -->
16
+
17
+ ## Decision Drivers
18
+
19
+ <!-- Key factors influencing this decision -->
20
+
21
+ - {driver 1}
22
+ - {driver 2}
23
+ - {driver 3}
24
+
25
+ ## Considered Options
26
+
27
+ ### Option 1: {Name}
28
+
29
+ **Description**: {brief description}
30
+
31
+ | Pros | Cons |
32
+ |------|------|
33
+ | | |
34
+
35
+ ### Option 2: {Name}
36
+
37
+ **Description**: {brief description}
38
+
39
+ | Pros | Cons |
40
+ |------|------|
41
+ | | |
42
+
43
+ ### Option 3: {Name}
44
+
45
+ **Description**: {brief description}
46
+
47
+ | Pros | Cons |
48
+ |------|------|
49
+ | | |
50
+
51
+ ## Decision
52
+
53
+ <!-- What is the change that we're proposing and/or doing? -->
54
+
55
+ We will use **{Option X}** because {primary rationale}.
56
+
57
+ ## Consequences
58
+
59
+ ### Positive
60
+
61
+ - {consequence}
62
+ - {consequence}
63
+
64
+ ### Negative
65
+
66
+ - {consequence}
67
+ - {consequence}
68
+
69
+ ### Neutral
70
+
71
+ - {consequence}
72
+
73
+ ## Implementation
74
+
75
+ <!-- How will this be implemented? Key steps. -->
76
+
77
+ 1. {step}
78
+ 2. {step}
79
+ 3. {step}
80
+
81
+ ## Validation
82
+
83
+ <!-- How do we know this decision is working? -->
84
+
85
+ - [ ] {validation criterion}
86
+ - [ ] {validation criterion}
87
+
88
+ ## Related
89
+
90
+ <!-- Links to related ADRs, specs, or documents -->
91
+
92
+ - Related ADRs: {ADR-XXX}
93
+ - Related Requirements: {FR-XXX, NFR-XXX}
94
+ - Related Issues: {conflict-XXX, oq-XXX}
95
+
96
+ ---
97
+
98
+ ## Changelog
99
+
100
+ | Date | Author | Change |
101
+ |------|--------|--------|
102
+ | {date} | {name} | Initial proposal |
@@ -0,0 +1,60 @@
1
+ # Product Context
2
+
3
+ > What we're building and why it matters.
4
+
5
+ ## One-Liner
6
+
7
+ <!-- Complete this sentence: "{Project} is a {type} that {value prop} for {audience}." -->
8
+ {Project} is a _____ that _____ for _____.
9
+
10
+ ## Problem Statement
11
+
12
+ <!-- What pain point does this solve? Be specific. -->
13
+
14
+ ## Target Users
15
+
16
+ <!-- Who uses this? List 2-3 personas with their goals. -->
17
+
18
+ | Persona | Role | Primary Goal | Pain Point |
19
+ |---------|------|--------------|------------|
20
+ | | | | |
21
+
22
+ ## Value Proposition
23
+
24
+ <!-- Why would someone choose this over alternatives? -->
25
+
26
+ ## Key Features (v1 Scope)
27
+
28
+ <!-- Prioritized list. Be ruthless about scope. -->
29
+
30
+ 1. **{Feature}** — {one-line description}
31
+ 2. **{Feature}** — {one-line description}
32
+ 3. **{Feature}** — {one-line description}
33
+
34
+ ## Out of Scope (v1)
35
+
36
+ <!-- Explicitly list what you're NOT building. Prevents scope creep. -->
37
+
38
+ -
39
+ -
40
+
41
+ ## Success Metrics
42
+
43
+ <!-- How do you know if this is working? -->
44
+
45
+ | Metric | Target | Measurement |
46
+ |--------|--------|-------------|
47
+ | | | |
48
+
49
+ ## Competitive Context
50
+
51
+ <!-- What alternatives exist? How is this different? -->
52
+
53
+ | Alternative | Strength | Our Differentiation |
54
+ |-------------|----------|---------------------|
55
+ | | | |
56
+
57
+ ---
58
+
59
+ *Last updated: {date}*
60
+ *Owner: {name}*
@@ -0,0 +1,159 @@
1
+ # RFC-{NNN}: {Title}
2
+
3
+ > Request for Comments — {feature/change description}
4
+
5
+ ## Metadata
6
+
7
+ | Field | Value |
8
+ |-------|-------|
9
+ | Author | {name} |
10
+ | Status | Draft / In Review / Accepted / Rejected / Implemented |
11
+ | Created | {date} |
12
+ | Updated | {date} |
13
+ | Reviewers | {names} |
14
+ | Target Release | {version/date} |
15
+
16
+ ## Summary
17
+
18
+ <!-- One paragraph. What are you proposing? -->
19
+
20
+ ## Motivation
21
+
22
+ <!-- Why are we doing this? What problem does it solve? -->
23
+
24
+ ### Problem Statement
25
+
26
+ ### User Impact
27
+
28
+ ### Business Value
29
+
30
+ ## Detailed Design
31
+
32
+ ### Overview
33
+
34
+ <!-- High-level approach -->
35
+
36
+ ### Architecture
37
+
38
+ <!-- Include diagrams where helpful -->
39
+
40
+ ```mermaid
41
+ flowchart TD
42
+ A[Component] --> B[Component]
43
+ B --> C[Component]
44
+ ```
45
+
46
+ ### API Changes
47
+
48
+ <!-- If applicable -->
49
+
50
+ ```typescript
51
+ // Before
52
+ interface OldAPI {}
53
+
54
+ // After
55
+ interface NewAPI {}
56
+ ```
57
+
58
+ ### Data Model Changes
59
+
60
+ <!-- If applicable -->
61
+
62
+ ### Migration Path
63
+
64
+ <!-- How do we get from current state to proposed state? -->
65
+
66
+ 1. {step}
67
+ 2. {step}
68
+ 3. {step}
69
+
70
+ ## Alternatives Considered
71
+
72
+ ### Alternative 1: {Name}
73
+
74
+ **Why not**: {reason}
75
+
76
+ ### Alternative 2: {Name}
77
+
78
+ **Why not**: {reason}
79
+
80
+ ## Risks and Mitigations
81
+
82
+ | Risk | Probability | Impact | Mitigation |
83
+ |------|-------------|--------|------------|
84
+ | | | | |
85
+
86
+ ## Security Considerations
87
+
88
+ <!-- Any security implications? -->
89
+
90
+ ## Performance Considerations
91
+
92
+ <!-- Any performance implications? -->
93
+
94
+ ## Testing Strategy
95
+
96
+ <!-- How will this be tested? -->
97
+
98
+ - Unit tests:
99
+ - Integration tests:
100
+ - E2E tests:
101
+ - Performance tests:
102
+
103
+ ## Rollout Plan
104
+
105
+ <!-- How will this be deployed? -->
106
+
107
+ | Phase | Scope | Success Criteria | Rollback Plan |
108
+ |-------|-------|------------------|---------------|
109
+ | | | | |
110
+
111
+ ## Success Metrics
112
+
113
+ <!-- How do we measure success? -->
114
+
115
+ | Metric | Current | Target | Measurement |
116
+ |--------|---------|--------|-------------|
117
+ | | | | |
118
+
119
+ ## Open Questions
120
+
121
+ <!-- Questions that need resolution -->
122
+
123
+ - [ ] {question}
124
+ - [ ] {question}
125
+
126
+ ## Dependencies
127
+
128
+ <!-- External dependencies or blockers -->
129
+
130
+ - {dependency}
131
+
132
+ ## Timeline
133
+
134
+ | Milestone | Target Date | Status |
135
+ |-----------|-------------|--------|
136
+ | RFC Approved | | |
137
+ | Implementation Start | | |
138
+ | Alpha/Beta | | |
139
+ | GA Release | | |
140
+
141
+ ---
142
+
143
+ ## Discussion
144
+
145
+ <!-- Feedback and discussion notes go here -->
146
+
147
+ ### {date} — {reviewer}
148
+
149
+ {feedback}
150
+
151
+ ---
152
+
153
+ ## Resolution
154
+
155
+ <!-- Final decision after RFC process -->
156
+
157
+ **Decision**: {Accepted/Rejected/Modified}
158
+ **Rationale**: {why}
159
+ **Next Steps**: {what happens now}