jettypod 3.0.1

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 (122) hide show
  1. package/.claude/PROTECT_SKILLS.md +28 -0
  2. package/.claude/settings.json +24 -0
  3. package/.claude/settings.local.json +16 -0
  4. package/.claude/skills/epic-discover/SKILL.md +262 -0
  5. package/.claude/skills/feature-discover/SKILL.md +393 -0
  6. package/.claude/skills/speed-mode/SKILL.md +364 -0
  7. package/.claude/skills/stable-mode/SKILL.md +591 -0
  8. package/.github/workflows/test-safety.yml +85 -0
  9. package/README.md +25 -0
  10. package/SPEED-STABLE-AUDIT.md +853 -0
  11. package/SYSTEM-BEHAVIOR.md +1241 -0
  12. package/TEST_SAFETY_AUDIT.md +314 -0
  13. package/TEST_SAFETY_IMPLEMENTATION.md +97 -0
  14. package/cucumber.js +8 -0
  15. package/docs/COMMAND_REFERENCE.md +903 -0
  16. package/docs/DECISIONS.md +68 -0
  17. package/docs/README.md +48 -0
  18. package/docs/STANDARDS-SYSTEM-DOCUMENTATION.md +374 -0
  19. package/docs/TEST-REWRITE-PLAN.md +261 -0
  20. package/docs/ai-test-writing-requirements.md +219 -0
  21. package/docs/claude-code-skills.md +607 -0
  22. package/docs/core-jettypod-methodology/comprehensive-jettypod-methodology.md +582 -0
  23. package/docs/core-jettypod-methodology/deprecated/jettypod-comprehensive-standards.md +1222 -0
  24. package/docs/core-jettypod-methodology/deprecated/jettypod-operating-guide.md +3399 -0
  25. package/docs/core-jettypod-methodology/deprecated/jettypod-technical-checklist.md +1325 -0
  26. package/docs/core-jettypod-methodology/deprecated/jettypod-vibe-coding-framework.md +1544 -0
  27. package/docs/core-jettypod-methodology/deprecated/prompt-engineering-guide.md +320 -0
  28. package/docs/core-jettypod-methodology/deprecated/vibe-coding-cheatsheet (1).md +516 -0
  29. package/docs/core-jettypod-methodology/deprecated/vibe-coding-framework.md +1544 -0
  30. package/docs/features/jettypod-standards-explained.md +543 -0
  31. package/docs/features/standards-inventory.md +257 -0
  32. package/docs/gap-analysis-current-vs-comprehensive-methodology.md +939 -0
  33. package/docs/jettypod-system-overview.md +409 -0
  34. package/features/auto-generate-production-chores.feature +14 -0
  35. package/features/claude-md-protection/steps.js +487 -0
  36. package/features/decisions/index.js +490 -0
  37. package/features/decisions/index.test.js +208 -0
  38. package/features/git-hooks/git-hooks.feature +30 -0
  39. package/features/git-hooks/index.js +93 -0
  40. package/features/git-hooks/index.test.js +137 -0
  41. package/features/git-hooks/post-commit +56 -0
  42. package/features/git-hooks/post-merge +47 -0
  43. package/features/git-hooks/pre-commit +28 -0
  44. package/features/git-hooks/simple-steps.js +53 -0
  45. package/features/git-hooks/simple-test.feature +10 -0
  46. package/features/git-hooks/steps.js +196 -0
  47. package/features/jettypod-update-command.feature +46 -0
  48. package/features/mode-prompts/index.js +95 -0
  49. package/features/mode-prompts/simple-steps.js +44 -0
  50. package/features/mode-prompts/simple-test.feature +9 -0
  51. package/features/mode-prompts/validation.test.js +120 -0
  52. package/features/refactor-mode/steps.js +217 -0
  53. package/features/refactor-mode.feature +49 -0
  54. package/features/skills-update/index.test.js +216 -0
  55. package/features/step_definitions/auto-generate-production-chores.steps.js +162 -0
  56. package/features/step_definitions/terminal-logo.steps.js +145 -0
  57. package/features/step_definitions/update-command.steps.js +183 -0
  58. package/features/terminal-logo/index.js +39 -0
  59. package/features/terminal-logo/terminal-logo.feature +30 -0
  60. package/features/update-command/index.js +181 -0
  61. package/features/update-command/index.test.js +225 -0
  62. package/features/work-commands/bug-workflow-display.feature +22 -0
  63. package/features/work-commands/index.js +311 -0
  64. package/features/work-commands/simple-steps.js +69 -0
  65. package/features/work-commands/stable-tests.feature +57 -0
  66. package/features/work-commands/steps.js +1120 -0
  67. package/features/work-commands/validation.test.js +88 -0
  68. package/features/work-commands/work-commands.feature +13 -0
  69. package/features/work-tracking/discovery-validation.test.js +228 -0
  70. package/features/work-tracking/index.js +1511 -0
  71. package/features/work-tracking/mode-required.feature +112 -0
  72. package/features/work-tracking/phase-tracking.test.js +482 -0
  73. package/features/work-tracking/prototype-tracking.test.js +485 -0
  74. package/features/work-tracking/tree-view.test.js +310 -0
  75. package/features/work-tracking/work-set-mode.feature +71 -0
  76. package/features/work-tracking/work-start-mode.feature +88 -0
  77. package/full-test.txt +0 -0
  78. package/install.sh +89 -0
  79. package/jettypod.js +1640 -0
  80. package/lib/bug-workflow.js +94 -0
  81. package/lib/bug-workflow.test.js +177 -0
  82. package/lib/claudemd.js +130 -0
  83. package/lib/claudemd.test.js +195 -0
  84. package/lib/comprehensive-standards-full.json +1778 -0
  85. package/lib/config.js +181 -0
  86. package/lib/config.test.js +511 -0
  87. package/lib/constants.js +107 -0
  88. package/lib/constants.test.js +164 -0
  89. package/lib/current-work.js +130 -0
  90. package/lib/current-work.test.js +146 -0
  91. package/lib/database-project-config.test.js +107 -0
  92. package/lib/database.js +256 -0
  93. package/lib/database.test.js +106 -0
  94. package/lib/decisions-generator.js +102 -0
  95. package/lib/decisions-generator.test.js +457 -0
  96. package/lib/decisions-helpers.js +119 -0
  97. package/lib/decisions-helpers.test.js +310 -0
  98. package/lib/discovery-checkpoint.js +83 -0
  99. package/lib/docs-generator.js +280 -0
  100. package/lib/external-checklist.js +177 -0
  101. package/lib/git.js +142 -0
  102. package/lib/git.test.js +145 -0
  103. package/lib/logo.js +3 -0
  104. package/lib/migrations/001-epic-to-parent.js +24 -0
  105. package/lib/migrations/002-default-work-item-modes.js +37 -0
  106. package/lib/migrations/002-default-work-item-modes.test.js +351 -0
  107. package/lib/migrations/003-epic-discovery-fields.js +52 -0
  108. package/lib/migrations/004-discovery-decisions-table.js +32 -0
  109. package/lib/migrations/005-migrate-decision-data.js +62 -0
  110. package/lib/migrations/006-feature-phase-field.js +61 -0
  111. package/lib/migrations/007-prototype-tracking.js +38 -0
  112. package/lib/migrations/008-scenario-file-field.js +24 -0
  113. package/lib/migrations/index.js +74 -0
  114. package/lib/production-helpers.js +69 -0
  115. package/lib/project-state.test.js +92 -0
  116. package/lib/test-helpers.js +184 -0
  117. package/lib/test-helpers.test.js +255 -0
  118. package/package.json +36 -0
  119. package/prototypes/test/index.html +1 -0
  120. package/setup-dist-repo.sh +68 -0
  121. package/test-safety-check.sh +80 -0
  122. package/work-item-tracking-plan.md +199 -0
@@ -0,0 +1,582 @@
1
+ # Natural Language Coding Feature Development Guide
2
+
3
+ ## The Two-Phase Model
4
+
5
+ **Everything you build has two phases:**
6
+
7
+ ### 1. Discovery Phase
8
+ Figure out what to build through prototyping
9
+ - Build 2-3 working prototypes
10
+ - Test different approaches
11
+ - Pick the winner
12
+ - Write BDD scenarios
13
+ - Archive prototypes in `/prototypes`
14
+
15
+ ### 2. Implementation Phase
16
+ Build it through progressive modes
17
+ - **Speed Mode:** Prove it works (happy path only)
18
+ - **Stable Mode:** Make it dependable (error handling, edge cases, internal use)
19
+ - **Production Mode:** Safe, compliant, scalable (security + scale + compliance for external users)
20
+
21
+ **Applies to all levels:**
22
+ - **Project Discovery/Implementation:** Does the overall concept work? Build the product.
23
+ - **Epic Discovery/Implementation:** What technical approach for related features? Build the features.
24
+ - **Feature Discovery/Implementation:** How should this feature work? Build the feature.
25
+
26
+ ---
27
+
28
+ ## Project States
29
+
30
+ Projects exist in two states based on who accesses them:
31
+
32
+ **Internal Project:**
33
+ - Team only, staging/preview environments
34
+ - Dependable infrastructure (auth, database, hosting)
35
+ - No external users or customers
36
+ - No security hardening required
37
+ - Examples: Localhost, Vercel preview, Railway staging, internal tools
38
+
39
+ **External Project:**
40
+ - Customers and public can access
41
+ - Security hardened (penetration tested, audited)
42
+ - Scales to external user load
43
+ - Compliance certified (GDPR, HIPAA, SOC2)
44
+ - 24/7 monitoring
45
+ - Examples: Public production URLs, customer-facing apps, public APIs
46
+
47
+ **Transition:** Going from Internal to External is itself a set of features (security hardening, monitoring setup, compliance) that go through Discovery → Implementation.
48
+
49
+ **Critical:** Once ANY external users (customers, public) can access your project, it must be External. Staging can stay Internal.
50
+
51
+ ---
52
+
53
+ ## Feature Modes (Implementation Phase)
54
+
55
+ Features progress through three modes during implementation, always in order:
56
+
57
+ ### 1. Speed Mode (Checkpoint)
58
+ - **Purpose:** Prove the approach works
59
+ - **Duration:** Quick pass-through, don't stay here
60
+ - **Standards:** Cover happy path only, single file, localStorage, basic try/catch
61
+ - **Next:** Immediately elevate to Stable
62
+
63
+ ### 2. Stable Mode (Where Features Live)
64
+ - **Purpose:** Make it dependable for internal use
65
+ - **Who uses it:** Your team, staging environments, internal tools
66
+ - **Standards:** All Speed scenarios plus comprehensive error handling, edge cases, input validation, light refactor
67
+ - **Security:** None required (walled garden)
68
+ - **Next:** Elevate to Production only if project is External and feature is customer-facing
69
+
70
+ ### 3. Production Mode (Customer-Facing)
71
+ - **Purpose:** Safe, compliant, and scalable for external users
72
+ - **Who uses it:** Customers, public, external users
73
+ - **Standards:** All Stable scenarios plus comprehensive security, scale, and compliance coverage
74
+ - **Three Pillars:** Security + Scale + Compliance
75
+ - **Required:** ANY customer-facing features in External Projects
76
+
77
+ ---
78
+
79
+ ## How Project States and Feature Modes Interact
80
+
81
+ **Internal Project:**
82
+ - Features: Speed → Stable
83
+ - All features stay in Stable Mode
84
+ - No Production Mode features (project isn't External)
85
+
86
+ **External Project:**
87
+ - Customer-facing features: Speed → Stable → Production
88
+ - Internal-only features: Speed → Stable (admin tools, dashboards team uses)
89
+ - Project infrastructure provides security/scale/compliance baseline
90
+
91
+ ---
92
+
93
+ ## Discovery Phase (All Levels)
94
+
95
+ **When to use:** Multiple viable approaches exist, or you don't understand the problem yet.
96
+
97
+ **Purpose:** Figure out what to build before Implementation Phase.
98
+
99
+ ### Project-Level Discovery
100
+ - Does the overall concept work?
101
+ - Is the core user flow viable?
102
+ - Should this be web/mobile/desktop?
103
+
104
+ ### Epic-Level Discovery
105
+ - What's the right technical approach for this set of related features?
106
+ - Which architecture handles our requirements?
107
+ - Examples: Real-time collaboration (WebSockets vs SSE?), Offline-first (which sync strategy?)
108
+
109
+ **Note:** Not all epics need discovery. Some are just groupings of independent features.
110
+
111
+ ### Feature-Level Discovery
112
+ - How should this specific feature work?
113
+ - Which UI pattern works best?
114
+ - What's the right level of complexity?
115
+
116
+ **Process (same at all levels):**
117
+ 1. Build 2-3 working prototypes
118
+ 2. Test each approach
119
+ 3. Pick the winner
120
+ 4. Write BDD scenarios
121
+ 5. Move prototypes to `/prototypes` directory
122
+
123
+ **Output:** Clear direction + BDD scenarios (prototypes archived for reference)
124
+
125
+ **Next:** Enter Implementation Phase, starting with Speed Mode.
126
+
127
+ ---
128
+
129
+ ## Implementation Phase: Speed Mode
130
+
131
+ **Purpose:** Validate the approach works. This is a checkpoint you pass through quickly.
132
+
133
+ **Process:**
134
+ 1. Build code that passes core BDD scenarios (happy path)
135
+ 2. Focus on happy path only
136
+ 3. Use simple tech (single file, localStorage)
137
+ 4. Verify it works
138
+ 5. **Immediately elevate to Stable Mode**
139
+
140
+ **Standards:**
141
+ - BDD scenarios covering happy path only
142
+ - Single file when possible
143
+ - localStorage for data
144
+ - Basic try/catch on critical paths
145
+ - No edge case handling
146
+ - No comprehensive error handling
147
+
148
+ **Anti-pattern:** Staying in Speed Mode. Always elevate to Stable immediately.
149
+
150
+ ---
151
+
152
+ ## Implementation Phase: Stable Mode
153
+
154
+ **Purpose:** Make features reliable and dependable for internal use.
155
+
156
+ **Who uses it:** Your team, staging environments, preview deploys, internal tools. Never external users.
157
+
158
+ **No security required:** Stable Mode assumes walled garden. Only your team can access it.
159
+
160
+ **Elevation from Speed:**
161
+ 1. Keep all Speed Mode tests (must still pass)
162
+ 2. Add scenarios for:
163
+ - Error handling (invalid inputs, network failures)
164
+ - Edge cases (empty states, boundary conditions)
165
+ - Data integrity (corrupt data handling)
166
+ - User-facing error messages
167
+ 3. Enhance code to pass all scenarios
168
+
169
+ **Standards:**
170
+ - All Speed scenarios plus error/edge case coverage
171
+ - Proper error handling with clear messages
172
+ - Input validation
173
+ - Edge case handling
174
+ - Graceful degradation
175
+ - Data integrity checks
176
+ - Code organized into modules
177
+ - Integration tests with other features
178
+
179
+ **Light refactor (end of Stable Mode):**
180
+ 1. Extract obvious duplication
181
+ 2. Fix poor naming
182
+ 3. Ensure basic error handling is present
183
+ 4. Make code scannable (clear names, short functions)
184
+ 5. Organize into logical files/folders
185
+ 6. Remove dead code (commented code, unused functions)
186
+ 7. Add minimal "why" comments for complex logic
187
+
188
+ **Who can use Stable Mode features:**
189
+ - Your internal team
190
+ - Staging environments (Vercel staging, Railway preview)
191
+ - Development/test environments
192
+ - Internal tools behind VPN/SSO
193
+ - Admin dashboards for team use only
194
+ - **Never:** External users, customers, public
195
+
196
+ ---
197
+
198
+ ## Implementation Phase: Production Mode
199
+
200
+ **Purpose:** Make features safe, compliant, and scalable for external users.
201
+
202
+ **The Three Pillars:**
203
+
204
+ ### 1. Security
205
+ - Authentication and authorization
206
+ - Input sanitization and validation
207
+ - Encryption (data at rest and in transit)
208
+ - Protection against attacks (XSS, CSRF, injection)
209
+ - Security audit logging
210
+ - Rate limiting
211
+ - Security testing and audits
212
+
213
+ ### 2. Scale
214
+ - Performance at 100+ concurrent users
215
+ - Response time <200ms
216
+ - Database optimization
217
+ - Caching strategy
218
+ - Load testing validated
219
+ - Graceful degradation under load
220
+ - Monitoring and alerting
221
+
222
+ ### 3. Compliance
223
+ - GDPR/HIPAA/SOC2 requirements
224
+ - Audit trails for all data access
225
+ - Data retention and deletion policies
226
+ - Breach notification procedures
227
+ - Regular compliance audits
228
+ - Legal review
229
+
230
+ **Elevation from Stable:**
231
+ 1. Keep all Stable Mode tests (must still pass)
232
+ 2. Add scenarios covering security, scale, and compliance:
233
+ - **Security:** Attack vectors, authorization bypass attempts, injection attacks, data leaks
234
+ - **Scale:** Concurrent user load, performance degradation, rate limiting, caching failures
235
+ - **Compliance:** Audit requirements, data retention, breach scenarios, regulatory edge cases
236
+ 3. Enhance code to pass all scenarios
237
+
238
+ **When required:**
239
+ - ANY external users (customers, public)
240
+ - Public production URLs
241
+ - Real customers using your product
242
+ - Public APIs
243
+ - Handling money, PII, or health data
244
+ - Revenue-critical features
245
+
246
+ **NOT required for:**
247
+ - Staging/preview environments (still Internal)
248
+ - Internal admin tools your team uses
249
+ - Development/test environments
250
+
251
+ ---
252
+
253
+ ## When and How to Run Tests
254
+
255
+ **The challenge:** Running all tests before every commit kills momentum. Different tests have different speeds and purposes.
256
+
257
+ ### Test Types and Speed
258
+
259
+ **BDD/Gherkin Scenarios (End-to-End Tests)**
260
+ - Test complete user flows
261
+ - Slowest (seconds to minutes per scenario)
262
+ - Your primary test type in this framework
263
+
264
+ **Integration Tests** (if you write them)
265
+ - Test how pieces work together
266
+ - Medium speed (seconds)
267
+ - Example: API endpoint + database
268
+
269
+ **Unit Tests** (if you write them)
270
+ - Test individual functions
271
+ - Fastest (milliseconds)
272
+ - Example: Date parsing function
273
+
274
+ ### When to Run Tests
275
+
276
+ **During Active Development:**
277
+ - Run only scenarios for the feature you're working on
278
+ - Manual execution: `npm run test:feature` or similar
279
+ - Don't run everything constantly
280
+
281
+ **Before Committing (Pre-commit Hook):**
282
+ - **DON'T run BDD scenarios** (too slow)
283
+ - Run fast checks only: linting, formatting, unit tests if you have them
284
+ - Keep pre-commit under 5 seconds
285
+
286
+ **Before Pushing:**
287
+ - Run all scenarios for features you changed (manual)
288
+ - Speed Mode: Run happy path scenarios (30 seconds - 2 minutes)
289
+ - Stable Mode: Run full scenario suite (2-10 minutes)
290
+ - Make sure they pass before pushing
291
+
292
+ **In CI/CD Pipeline (Automatic after push):**
293
+ - Run ALL scenarios for the entire project
294
+ - This can take 10-30 minutes or more
295
+ - Blocks deployment if tests fail
296
+ - This is where slow tests belong
297
+
298
+ **Before Deployment:**
299
+ - CI/CD must be green (all tests passing)
300
+ - Sometimes additional smoke tests on staging
301
+
302
+ ### Practical Workflow
303
+
304
+ ```bash
305
+ # During development (manual, as needed)
306
+ npm run test:watch # Auto-run tests for files you're editing
307
+ npm run test:feature-name # Run scenarios for current feature
308
+
309
+ # Pre-commit hook (automatic, fast only)
310
+ npm run lint # Code style
311
+ npm run test:unit # Unit tests (if you have them)
312
+ # NO BDD scenarios here
313
+
314
+ # Before pushing (manual)
315
+ npm run test:scenarios # All BDD scenarios you changed
316
+
317
+ # CI/CD (automatic, everything)
318
+ npm run test:all # Every scenario in the project
319
+ ```
320
+
321
+ ### Mode-Specific Test Running
322
+
323
+ **Speed Mode:**
324
+ - Run happy path scenarios manually after each change
325
+ - Quick feedback loop (30 seconds)
326
+ - No pre-commit hooks
327
+
328
+ **Stable Mode:**
329
+ - Run full scenario suite manually before committing feature
330
+ - Takes longer (2-10 minutes)
331
+ - Still no pre-commit hooks (too slow)
332
+ - CI/CD runs everything automatically
333
+
334
+ **Production Mode:**
335
+ - Run full scenario suite including security/scale/compliance
336
+ - Takes much longer (10-30+ minutes)
337
+ - Definitely in CI/CD only
338
+ - May need parallel test execution
339
+
340
+ ### Key Principles
341
+
342
+ 1. **Fast tests in pre-commit** - Keep it under 5 seconds
343
+ 2. **Slow tests in CI/CD** - Let the pipeline handle full suites
344
+ 3. **Run subset during development** - Only what you're working on
345
+ 4. **CI blocks deployment** - All tests must pass before production
346
+ 5. **Don't let slow tests kill momentum** - Manual execution during dev is fine
347
+
348
+ **The golden rule:** If a test suite takes more than 10 seconds, don't put it in a pre-commit hook.
349
+
350
+ ---
351
+
352
+ ## Complete Workflows
353
+
354
+ ### Starting a New Project
355
+
356
+ **1. Project Discovery (optional)**
357
+ - Build 2-3 project prototypes to validate concept
358
+ - Test core user flows
359
+ - Pick winning approach
360
+ - Write initial scenarios
361
+ - Move prototypes to `/prototypes`
362
+
363
+ **2. Setup Internal Project**
364
+ - Initialize repo
365
+ - Set up database (if needed)
366
+ - Basic infrastructure (auth, hosting)
367
+ - Set up testing framework (Gherkin/BDD scenarios)
368
+ - Configure CI/CD pipeline for automated test runs
369
+ - Pre-commit hooks for fast checks only (linting, no BDD tests)
370
+ - Status: Internal Project
371
+
372
+ **3. Build Features**
373
+ - Break work into Epics → Features
374
+ - For each feature: Discovery → Implementation (Speed → Stable)
375
+ - All features live in Stable Mode (internal use)
376
+
377
+ **4. Go External (when ready)**
378
+ - Treat "External Project Infrastructure" as an epic with features:
379
+ - Feature: Security hardening (Discovery → Speed → Stable → Production)
380
+ - Feature: Monitoring setup (Discovery → Speed → Stable → Production)
381
+ - Feature: Compliance certification (Discovery → Speed → Stable → Production)
382
+ - Status: External Project
383
+
384
+ **5. Elevate Customer-Facing Features**
385
+ - Customer-facing features → Production Mode
386
+ - Internal-only features → Stay in Stable Mode
387
+
388
+ **6. Launch**
389
+ - External users can access
390
+ - Customer-facing features are Production Mode
391
+
392
+ ### Building a New Epic
393
+
394
+ **1. Epic Discovery (if needed)**
395
+ - Does this epic need a shared technical approach?
396
+ - Prototype architecture options if technical approach affects multiple features
397
+ - Examples: Real-time collaboration, offline-first, AI-powered search
398
+ - Pick winner, define approach
399
+
400
+ **2. Break into Features**
401
+ - Define individual features within epic
402
+ - Add to backlog
403
+ - Prioritize
404
+
405
+ **3. Implement Features**
406
+ - Each feature: Discovery → Implementation (Speed → Stable → Production if needed)
407
+
408
+ ### Building a New Feature
409
+
410
+ **1. Feature Discovery (if needed)**
411
+ - Prototype 2-3 approaches
412
+ - Pick winner, write scenarios
413
+ - Define chores (technical tasks)
414
+ - Move prototypes to `/prototypes`
415
+
416
+ **2. Speed Mode**
417
+ - Build all chores that pass happy path scenarios
418
+ - Verify it works
419
+ - **Don't stop here**
420
+
421
+ **3. Stable Mode**
422
+ - Add scenarios for errors and edge cases
423
+ - Elevate all chores to Stable together
424
+ - Light refactor
425
+ - Feature ready for internal use
426
+
427
+ **4. Production Mode (if needed)**
428
+ - Project is External AND feature is customer-facing
429
+ - Add scenarios for security/scale/compliance
430
+ - Feature safe, compliant, and scalable
431
+
432
+ ---
433
+
434
+ ## Work Item Hierarchy
435
+
436
+ ```
437
+ Epic (business initiative)
438
+ └── Feature ← MODES SET HERE
439
+ └── Chore (technical task, inherits feature mode)
440
+ ```
441
+
442
+ **Modes are set at the Feature level.** All chores within a feature inherit that mode.
443
+
444
+ **Feature progression:**
445
+ ```
446
+ All chores built in Speed Mode
447
+
448
+ All chores elevated to Stable Mode together
449
+
450
+ All chores elevated to Production Mode together (if needed)
451
+ ```
452
+
453
+ Features elevate as complete units, never piecemeal.
454
+
455
+ ---
456
+
457
+ ## Decision Framework
458
+
459
+ ### For Projects
460
+
461
+ **Question 1:** Are you still prototyping the project concept?
462
+ - **YES** → Project Discovery
463
+ - **NO** → Question 2
464
+
465
+ **Question 2:** Will external users (customers, public) access this?
466
+ - **NO** (team only, staging) → Internal Project
467
+ - **YES** (public, customers) → Build "External Project Infrastructure" features to transition
468
+
469
+ ### For Epics
470
+
471
+ **Question 1:** Does this epic need a shared technical approach across features?
472
+ - **YES** → Epic Discovery (prototype architecture options)
473
+ - **NO** → Just break into features
474
+
475
+ ### For Features
476
+
477
+ **Question 1:** Do you know what to build?
478
+ - **NO** → Feature Discovery
479
+ - **YES** → Speed Mode, then Question 2
480
+
481
+ **Question 2:** You just finished Speed Mode. Elevate to:
482
+ - **Always** → Stable Mode first
483
+ - **Then** → Production Mode (only if project is External and feature is customer-facing)
484
+
485
+ ---
486
+
487
+ ## Mode Comparison Table
488
+
489
+ | Aspect | Speed | Stable | Production |
490
+ |--------|-------|--------|------------|
491
+ | **Purpose** | Prove it works | Make it dependable | Safe, compliant, scalable |
492
+ | **Users** | None (checkpoint) | Internal only | External users |
493
+ | **Test Coverage** | Happy path only | + Errors & edge cases | + Security, scale, compliance |
494
+ | **Focus** | Does it work? | Can it handle problems? | Is it production-ready? |
495
+ | **Stay here?** | NO (pass through) | YES (if Internal) | YES (if External) |
496
+ | **Security** | None | None (walled garden) | Full hardening |
497
+ | **Refactor** | None | Light refactor | As needed |
498
+
499
+ ---
500
+
501
+ ## Common Mistakes
502
+
503
+ **1. Staying in Speed Mode**
504
+ - ❌ "Feature works, ship it!"
505
+ - ✓ "Feature works, now add error handling (Stable Mode)"
506
+
507
+ **2. Launching Internal Project to public without hardening**
508
+ - ❌ "Let's launch publicly with our Internal Project"
509
+ - ✓ "Build External Project Infrastructure features first (security, monitoring, compliance)"
510
+
511
+ **3. Skipping Speed Mode**
512
+ - ❌ "I'll build it in Stable Mode from the start"
513
+ - ✓ "Always pass through Speed, then elevate to Stable"
514
+
515
+ **4. Starting as External Project**
516
+ - ❌ "We'll have users eventually, so start External"
517
+ - ✓ "Start Internal, build External Infrastructure features when ready"
518
+
519
+ **5. Inconsistent feature modes in External Projects**
520
+ - ❌ "Customer-facing feature is Stable Mode in External Project"
521
+ - ✓ "Customer-facing features must be Production Mode in External Projects"
522
+
523
+ ---
524
+
525
+ ## Key Principles
526
+
527
+ 1. **Two phases for everything** - Discovery (figure it out) → Implementation (build it)
528
+ 2. **Discovery at all levels** - Project, Epic (if needed), Feature
529
+ 3. **Speed is a checkpoint** - Pass through quickly, don't stay
530
+ 4. **Stable is for internal use** - Team, staging, never customers
531
+ 5. **Production is for customers** - External-facing features only
532
+ 6. **Infrastructure is just features** - Going External = building infrastructure features
533
+ 7. **Tests accumulate** - Speed → Stable → Production (never delete)
534
+ 8. **Features elevate as units** - All chores together
535
+ 9. **Project state sets ceiling** - Can't have Production features in Internal Project
536
+
537
+ ---
538
+
539
+ ## Example: Expense Tracker
540
+
541
+ **Project Discovery**
542
+ - Built 3 approaches: mobile-first, web-first, desktop app
543
+ - Tested with team
544
+ - Chose web-first React app
545
+
546
+ **Setup Internal Project**
547
+ - Initialized repo, Postgres database, Vercel hosting
548
+ - Basic auth with Next.js
549
+
550
+ **Epic: Expense Management**
551
+ - Epic Discovery: Should we use OCR for receipts or manual entry?
552
+ - Prototyped both
553
+ - Manual entry won (OCR too complex for v1)
554
+ - Features defined: Expense Entry, Reports, Categories
555
+
556
+ **Build Expense Entry Feature**
557
+ - Feature Discovery: Form layout options
558
+ - Speed Mode: Form passing happy path scenarios
559
+ - Stable Mode: Added validation, error handling, edge cases
560
+ - Living in Stable (internal team using it)
561
+
562
+ **Build Reports Feature**
563
+ - Speed Mode: Basic chart generation
564
+ - Stable Mode: Error handling, empty states
565
+ - Living in Stable
566
+
567
+ **Decision: Go External**
568
+ - Epic: External Project Infrastructure
569
+ - Feature: Security hardening (Discovery → Implementation)
570
+ - Feature: Monitoring (Datadog setup)
571
+ - Feature: GDPR compliance
572
+ - Status: External Project
573
+
574
+ **Elevate for Launch**
575
+ - Expense Entry → Production Mode (customers use it)
576
+ - Reports → Stay Stable (internal admin only)
577
+
578
+ **Result:** External Project, one Production feature (expense entry), one Stable feature (reports).
579
+
580
+ ---
581
+
582
+ *Discovery figures it out. Implementation builds it. Speed proves it works. Stable makes it dependable. Production makes it safe, compliant, and scalable.*