jettypod 4.1.2 → 4.1.4
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.
- package/.nvmrc +1 -0
- package/docs/COMPLETE-TESTING-STRATEGY.md +970 -0
- package/docs/DECISIONS.md +10 -12
- package/docs/NODE_VERSION.md +83 -0
- package/docs/TDD-INFRASTRUCTURE-STRATEGY.md +1374 -0
- package/docs/TESTING-FOR-NON-ENGINEERS.md +1588 -0
- package/docs/TESTING-STRATEGY-AUDIT.md +698 -0
- package/hooks/post-checkout +17 -0
- package/hooks/post-merge +17 -0
- package/hooks/pre-commit +30 -0
- package/jettypod.js +259 -120
- package/lib/coverage-tracker.js +218 -0
- package/lib/database.js +2 -0
- package/lib/db-export.js +192 -0
- package/lib/db-import.js +193 -0
- package/lib/external-transition-handler.js +32 -0
- package/lib/git-hook-helpers.js +174 -0
- package/lib/git-root.js +90 -0
- package/lib/infrastructure-chore-generator.js +45 -0
- package/lib/install-hooks.js +52 -0
- package/lib/jettypod-backup.js +238 -0
- package/lib/merge-lock.js +193 -0
- package/lib/migrations/012-add-worktree-path.js +38 -0
- package/lib/migrations/013-worktrees-table.js +86 -0
- package/lib/migrations/014-migrate-worktree-data.js +161 -0
- package/lib/migrations/015-merge-locks-table.js +67 -0
- package/lib/pattern-finder.js +152 -0
- package/lib/process-manager.js +140 -0
- package/lib/production-standards-reader.js +13 -2
- package/lib/production-standards-writer.js +85 -0
- package/lib/skills/feature-planning/dry-run-validator.js +135 -0
- package/lib/skills/feature-planning/validation-formatter.js +160 -0
- package/lib/smart-conflict-detection.js +168 -0
- package/lib/smart-fetch-rebase.js +614 -0
- package/lib/step-definition-parser.js +76 -0
- package/lib/unit-test-generator.js +232 -0
- package/lib/verification-command-generator.js +66 -0
- package/lib/worktree-diagnostics.js +413 -0
- package/lib/worktree-facade.js +174 -0
- package/lib/worktree-manager.js +636 -0
- package/lib/worktree-reconciler.js +429 -0
- package/package.json +30 -3
- package/skills-templates/external-transition/SKILL.md +34 -3
- package/skills-templates/feature-planning/SKILL.md +190 -24
- package/skills-templates/production-mode/SKILL.md +127 -9
- package/skills-templates/speed-mode/SKILL.md +454 -51
- package/skills-templates/stable-mode/SKILL.md +285 -76
- package/.claude/PROTECT_SKILLS.md +0 -28
- package/.claude/settings.json +0 -24
- package/.claude/settings.local.json +0 -16
- package/.claude/skills/epic-planning/SKILL.md +0 -297
- package/.claude/skills/external-transition/SKILL.md +0 -384
- package/.claude/skills/feature-planning/SKILL.md +0 -464
- package/.claude/skills/production-mode/SKILL.md +0 -369
- package/.claude/skills/speed-mode/SKILL.md +0 -481
- package/.claude/skills/stable-mode/SKILL.md +0 -713
- package/.claude/skills.backup-2025-11-10T23-33-09-368Z/epic-planning/SKILL.md +0 -297
- package/.claude/skills.backup-2025-11-10T23-33-09-368Z/feature-planning/SKILL.md +0 -464
- package/.claude/skills.backup-2025-11-10T23-33-09-368Z/speed-mode/SKILL.md +0 -467
- package/.claude/skills.backup-2025-11-10T23-33-09-368Z/stable-mode/SKILL.md +0 -673
- package/.claude/skills.backup-2025-11-11T16-15-10-070Z/epic-discover/SKILL.md +0 -297
- package/.claude/skills.backup-2025-11-11T16-42-43-212Z/epic-planning/SKILL.md +0 -297
- package/.claude/skills.backup-2025-11-11T16-42-43-212Z/feature-planning/SKILL.md +0 -464
- package/.claude/skills.backup-2025-11-11T16-42-43-212Z/speed-mode/SKILL.md +0 -467
- package/.claude/skills.backup-2025-11-11T16-42-43-212Z/stable-mode/SKILL.md +0 -673
- package/.claude/skills.backup-2025-11-11T17-06-09-783Z/epic-planning/SKILL.md +0 -297
- package/.claude/skills.backup-2025-11-11T17-06-09-783Z/feature-planning/SKILL.md +0 -464
- package/.claude/skills.backup-2025-11-11T17-06-09-783Z/speed-mode/SKILL.md +0 -467
- package/.claude/skills.backup-2025-11-11T17-06-09-783Z/stable-mode/SKILL.md +0 -673
- package/.devpod/current-work.json +0 -10
- package/.devpod/work.db +0 -0
- package/.github/workflows/test-safety.yml +0 -85
- package/.jettypod/config.json +0 -5
- package/.jettypod/current-work.json +0 -10
- package/.jettypod/hooks/README.md +0 -77
- package/.jettypod/hooks/protect-claude-md.js +0 -338
- package/.jettypod/test-work.db +0 -0
- package/.jettypod/work.db +0 -0
- package/CLAUDE.md +0 -49
- package/SPEED-STABLE-AUDIT.md +0 -853
- package/SYSTEM-BEHAVIOR.md +0 -2199
- package/TEST_SAFETY_AUDIT.md +0 -314
- package/TEST_SAFETY_IMPLEMENTATION.md +0 -97
- package/cucumber-report.html +0 -45
- package/dist/devpod-linux +0 -0
- package/dist/devpod-macos +0 -0
- package/dist/devpod-win.exe +0 -0
- package/docs/features/jettypod-standards-explained.md +0 -543
- package/docs/features/standards-inventory.md +0 -257
- package/features/auto-generate-production-chores.feature +0 -13
- package/features/backlog-command.feature +0 -26
- package/features/backlog-filtering-production.feature +0 -10
- package/features/claude-md-protection/steps.js +0 -498
- package/features/decisions/index.js +0 -490
- package/features/decisions/index.test.js +0 -208
- package/features/fix-text-wrapping.feature +0 -42
- package/features/git-hooks/git-hooks.feature +0 -30
- package/features/git-hooks/index.js +0 -93
- package/features/git-hooks/index.test.js +0 -137
- package/features/git-hooks/post-commit +0 -56
- package/features/git-hooks/post-merge +0 -47
- package/features/git-hooks/pre-commit +0 -28
- package/features/git-hooks/simple-steps.js +0 -53
- package/features/git-hooks/simple-test.feature +0 -10
- package/features/git-hooks/steps.js +0 -196
- package/features/jettypod-update-command.feature +0 -46
- package/features/mode-prompts/index.js +0 -95
- package/features/mode-prompts/simple-steps.js +0 -44
- package/features/mode-prompts/simple-test.feature +0 -9
- package/features/mode-prompts/validation.test.js +0 -120
- package/features/multiple-claude-instances.feature +0 -121
- package/features/production-mode-skill.feature +0 -121
- package/features/refactor-mode/steps.js +0 -217
- package/features/refactor-mode.feature +0 -49
- package/features/simplify-external-transition.feature +0 -166
- package/features/skills-update/index.test.js +0 -216
- package/features/step_definitions/backlog-command.steps.js +0 -37
- package/features/step_definitions/fix-text-wrapping.steps.js +0 -271
- package/features/step_definitions/multiple-claude-instances.steps.js +0 -621
- package/features/step_definitions/production-mode-skill.steps.js +0 -862
- package/features/step_definitions/simplify-external-transition.steps.js +0 -370
- package/features/step_definitions/terminal-logo.steps.js +0 -145
- package/features/step_definitions/update-command.steps.js +0 -183
- package/features/support/hooks.js +0 -9
- package/features/terminal-logo/index.js +0 -39
- package/features/terminal-logo/terminal-logo.feature +0 -30
- package/features/update-command/index.js +0 -181
- package/features/update-command/index.test.js +0 -225
- package/features/work-commands/bug-workflow-display.feature +0 -22
- package/features/work-commands/index.js +0 -498
- package/features/work-commands/simple-steps.js +0 -69
- package/features/work-commands/stable-tests.feature +0 -57
- package/features/work-commands/steps.js +0 -1174
- package/features/work-commands/validation.test.js +0 -88
- package/features/work-commands/work-commands.feature +0 -13
- package/features/work-tracking/discovery-validation.test.js +0 -228
- package/features/work-tracking/index.js +0 -1921
- package/features/work-tracking/mode-required.feature +0 -112
- package/features/work-tracking/phase-tracking.test.js +0 -482
- package/features/work-tracking/prototype-tracking.test.js +0 -485
- package/features/work-tracking/tree-view.test.js +0 -310
- package/features/work-tracking/work-set-mode.feature +0 -71
- package/features/work-tracking/work-start-mode.feature +0 -88
- package/full-test.txt +0 -0
- package/lib/bug-workflow.test.js +0 -177
- package/lib/claudemd.test.js +0 -195
- package/lib/config.test.js +0 -511
- package/lib/constants.test.js +0 -164
- package/lib/current-work.test.js +0 -146
- package/lib/database-project-config.test.js +0 -111
- package/lib/database.test.js +0 -106
- package/lib/decisions-generator.test.js +0 -457
- package/lib/decisions-helpers.test.js +0 -310
- package/lib/git-coordinator.js +0 -167
- package/lib/git.test.js +0 -145
- package/lib/migrations/002-default-work-item-modes.test.js +0 -351
- package/lib/production-chore-generator.test.js +0 -432
- package/lib/production-context-detector.test.js +0 -277
- package/lib/production-scenario-appender.test.js +0 -235
- package/lib/production-scenario-validator.test.js +0 -246
- package/lib/production-standards-reader.test.js +0 -270
- package/lib/project-state.test.js +0 -92
- package/lib/push-queue.js +0 -417
- package/lib/queue-processor.js +0 -74
- package/lib/test-helpers.js +0 -202
- package/lib/test-helpers.test.js +0 -255
- package/prototypes/2025-01-11-production-mode-autonomous.js +0 -119
- package/prototypes/2025-01-11-production-mode-collaborative.js +0 -166
- package/prototypes/2025-01-11-production-mode-guided.js +0 -217
- package/prototypes/2025-01-11-production-mode-smart-context.js +0 -347
- package/prototypes/2025-01-11-production-standards-example.md +0 -204
- package/prototypes/2025-11-10-backlog-filtering-tree-aware.js +0 -242
- package/prototypes/test/index.html +0 -1
- package/setup-dist-repo.sh +0 -68
- package/test-production-standards-engine.js +0 -130
- package/test-results.json +0 -2195
- package/test-safety-check.sh +0 -80
- package/work-item-tracking-plan.md +0 -199
- /package/{.jettypod/devpod.db → jettypod.db} +0 -0
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
// Prototype: Production Mode Skill - Option 3 (Guided Production Discovery)
|
|
2
|
-
// Created: 2025-01-11
|
|
3
|
-
// Purpose: Demonstrate educational, context-aware production planning
|
|
4
|
-
// Decision: [to be filled after testing]
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* PROTOTYPE: Guided Production Discovery
|
|
8
|
-
*
|
|
9
|
-
* Deep questionnaire → Context-specific scenarios → Educational implementation
|
|
10
|
-
* Highly tailored, teaches production best practices, requires user expertise
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
const readline = require('readline');
|
|
14
|
-
const rl = readline.createInterface({
|
|
15
|
-
input: process.stdin,
|
|
16
|
-
output: process.stdout
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
function question(prompt) {
|
|
20
|
-
return new Promise(resolve => rl.question(prompt, resolve));
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function sleep(ms) {
|
|
24
|
-
return new Promise(resolve => setTimeout(resolve, ms));
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
async function guidedProductionMode() {
|
|
28
|
-
console.log('\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
29
|
-
console.log('🎓 Production Mode: Guided Discovery');
|
|
30
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
|
|
31
|
-
|
|
32
|
-
console.log('Starting work on: #1715 Implement audit logging for external transitions\n');
|
|
33
|
-
|
|
34
|
-
await sleep(500);
|
|
35
|
-
console.log('Let\'s ensure this feature is production-ready for YOUR deployment context.\n');
|
|
36
|
-
console.log('I\'ll ask some questions to tailor production scenarios to your needs.\n');
|
|
37
|
-
|
|
38
|
-
await sleep(300);
|
|
39
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
40
|
-
console.log('📋 Deployment Context');
|
|
41
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
|
|
42
|
-
|
|
43
|
-
const env = await question('1. Where will this run? (local/cloud/on-prem/hybrid): ');
|
|
44
|
-
console.log(` ✓ ${env}\n`);
|
|
45
|
-
|
|
46
|
-
const users = await question('2. Expected number of users? (1-10/10-100/100-1000/1000+): ');
|
|
47
|
-
console.log(` ✓ ${users}\n`);
|
|
48
|
-
|
|
49
|
-
const data = await question('3. Does this handle sensitive data? (yes/no): ');
|
|
50
|
-
console.log(` ✓ ${data}\n`);
|
|
51
|
-
|
|
52
|
-
const compliance = await question('4. Any compliance requirements? (GDPR/SOC2/HIPAA/none): ');
|
|
53
|
-
console.log(` ✓ ${compliance}\n`);
|
|
54
|
-
|
|
55
|
-
await sleep(300);
|
|
56
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
57
|
-
console.log('🔒 Security Concerns');
|
|
58
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
|
|
59
|
-
|
|
60
|
-
console.log('For audit logging, we should consider:\n');
|
|
61
|
-
console.log('**Authentication & Authorization:**');
|
|
62
|
-
console.log(' • Should we log who triggered the transition?');
|
|
63
|
-
console.log(' • Should we verify permissions before logging?\n');
|
|
64
|
-
|
|
65
|
-
const auth = await question('Include authentication scenarios? (yes/no): ');
|
|
66
|
-
console.log(` ✓ ${auth}\n`);
|
|
67
|
-
|
|
68
|
-
console.log('**Data Protection:**');
|
|
69
|
-
console.log(' • Project names might contain sensitive info');
|
|
70
|
-
console.log(' • User IDs need protection under ' + compliance + '\n');
|
|
71
|
-
|
|
72
|
-
const protection = await question('Add data sanitization scenarios? (yes/no): ');
|
|
73
|
-
console.log(` ✓ ${protection}\n`);
|
|
74
|
-
|
|
75
|
-
console.log('**Audit Trail Security:**');
|
|
76
|
-
console.log(' • Logs should be tamper-proof');
|
|
77
|
-
console.log(' • Need integrity verification\n');
|
|
78
|
-
|
|
79
|
-
const integrity = await question('Add integrity verification scenarios? (yes/no): ');
|
|
80
|
-
console.log(` ✓ ${integrity}\n`);
|
|
81
|
-
|
|
82
|
-
await sleep(300);
|
|
83
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
84
|
-
console.log('⚡ Performance & Scale');
|
|
85
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
|
|
86
|
-
|
|
87
|
-
console.log('Based on ' + users + ' users:\n');
|
|
88
|
-
console.log('**Expected Load:**');
|
|
89
|
-
console.log(' • Estimated: 50 transitions/hour peak');
|
|
90
|
-
console.log(' • Log writes: async, buffered\n');
|
|
91
|
-
|
|
92
|
-
const perf = await question('Add performance benchmarks? (yes/no): ');
|
|
93
|
-
console.log(` ✓ ${perf}\n`);
|
|
94
|
-
|
|
95
|
-
console.log('**Storage:**');
|
|
96
|
-
console.log(' • Estimated log size: 500KB/day');
|
|
97
|
-
console.log(' • Need rotation after 10MB\n');
|
|
98
|
-
|
|
99
|
-
const rotation = await question('Add log rotation scenarios? (yes/no): ');
|
|
100
|
-
console.log(` ✓ ${rotation}\n`);
|
|
101
|
-
|
|
102
|
-
await sleep(300);
|
|
103
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
104
|
-
console.log('📜 Compliance & Governance');
|
|
105
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
|
|
106
|
-
|
|
107
|
-
if (compliance !== 'none') {
|
|
108
|
-
console.log(`**${compliance} Requirements:**\n`);
|
|
109
|
-
|
|
110
|
-
if (compliance === 'GDPR') {
|
|
111
|
-
console.log(' • Right to be forgotten (data deletion)');
|
|
112
|
-
console.log(' • Data retention limits (90 days recommended)');
|
|
113
|
-
console.log(' • Export in machine-readable format\n');
|
|
114
|
-
} else if (compliance === 'SOC2') {
|
|
115
|
-
console.log(' • Audit log immutability');
|
|
116
|
-
console.log(' • Access control logging');
|
|
117
|
-
console.log(' • Retention for compliance period\n');
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
const complianceScenarios = await question('Add ' + compliance + ' compliance scenarios? (yes/no): ');
|
|
121
|
-
console.log(` ✓ ${complianceScenarios}\n`);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
await sleep(500);
|
|
125
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
126
|
-
console.log('📊 Production Scenarios Summary');
|
|
127
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
|
|
128
|
-
|
|
129
|
-
console.log('Based on your context, here are the scenarios:\n');
|
|
130
|
-
console.log('**Security (4 scenarios):**');
|
|
131
|
-
console.log(' ✓ Audit logging with authentication');
|
|
132
|
-
console.log(' ✓ Data sanitization for ' + compliance);
|
|
133
|
-
console.log(' ✓ Tamper-proof log integrity');
|
|
134
|
-
console.log(' ✓ Unauthorized access prevention\n');
|
|
135
|
-
|
|
136
|
-
console.log('**Scale (3 scenarios):**');
|
|
137
|
-
console.log(' ✓ Performance: 50 transitions/hour');
|
|
138
|
-
console.log(' ✓ Log rotation at 10MB');
|
|
139
|
-
console.log(' ✓ Memory usage under load\n');
|
|
140
|
-
|
|
141
|
-
console.log('**Compliance (2 scenarios):**');
|
|
142
|
-
console.log(' ✓ ' + compliance + ' data retention');
|
|
143
|
-
console.log(' ✓ Audit log export\n');
|
|
144
|
-
|
|
145
|
-
const confirm = await question('Proceed with these 9 scenarios? (yes/adjust): ');
|
|
146
|
-
|
|
147
|
-
if (confirm.toLowerCase() === 'yes') {
|
|
148
|
-
console.log('\n✅ Scenarios confirmed\n');
|
|
149
|
-
|
|
150
|
-
await sleep(300);
|
|
151
|
-
console.log('Adding scenarios to features/simplify-external-transition.feature...');
|
|
152
|
-
await sleep(300);
|
|
153
|
-
console.log('✅ 9 production scenarios added\n');
|
|
154
|
-
|
|
155
|
-
await sleep(500);
|
|
156
|
-
console.log('Now implementing each scenario with explanations...\n');
|
|
157
|
-
|
|
158
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
159
|
-
console.log('📚 Implementation (with education)');
|
|
160
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
|
|
161
|
-
|
|
162
|
-
await sleep(300);
|
|
163
|
-
console.log('[1/9] Audit logging with authentication\n');
|
|
164
|
-
console.log('**Why this matters:**');
|
|
165
|
-
console.log(' For ' + compliance + ', you need to know WHO made state changes.\n');
|
|
166
|
-
console.log('**Implementation approach:**');
|
|
167
|
-
console.log(' • Capture process.env.USER or Git config');
|
|
168
|
-
console.log(' • Include timestamp (ISO 8601)');
|
|
169
|
-
console.log(' • Record transition type and details\n');
|
|
170
|
-
await sleep(500);
|
|
171
|
-
console.log(' ✓ Implemented logTransition(user, event, metadata)');
|
|
172
|
-
console.log(' 🧪 Running tests... ✅ Passing\n');
|
|
173
|
-
|
|
174
|
-
await sleep(300);
|
|
175
|
-
console.log('[2/9] Data sanitization for ' + compliance + '\n');
|
|
176
|
-
console.log('**Why this matters:**');
|
|
177
|
-
console.log(' User IDs and project names might contain PII.\n');
|
|
178
|
-
console.log('**Implementation approach:**');
|
|
179
|
-
console.log(' • Hash user identifiers');
|
|
180
|
-
console.log(' • Redact project name substrings matching PII patterns');
|
|
181
|
-
console.log(' • Keep enough data for debugging\n');
|
|
182
|
-
await sleep(500);
|
|
183
|
-
console.log(' ✓ Implemented sanitizeData(data)');
|
|
184
|
-
console.log(' 🧪 Running tests... ✅ Passing\n');
|
|
185
|
-
|
|
186
|
-
// Abbreviated for brevity - would continue for all 9 scenarios
|
|
187
|
-
|
|
188
|
-
console.log('[... 7 more scenarios implemented with explanations ...]\n');
|
|
189
|
-
|
|
190
|
-
await sleep(500);
|
|
191
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
192
|
-
console.log('🎉 Production Implementation Complete!');
|
|
193
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
|
|
194
|
-
|
|
195
|
-
console.log('✅ 9 scenarios passing');
|
|
196
|
-
console.log('✅ Production-ready for ' + env + ' deployment');
|
|
197
|
-
console.log('✅ ' + compliance + ' compliant');
|
|
198
|
-
console.log('✅ Scaled for ' + users + ' users\n');
|
|
199
|
-
|
|
200
|
-
console.log('**What you learned:**');
|
|
201
|
-
console.log(' • How ' + compliance + ' applies to audit logging');
|
|
202
|
-
console.log(' • Why async logging matters at your scale');
|
|
203
|
-
console.log(' • Tamper-proof storage techniques');
|
|
204
|
-
console.log(' • Production-grade error handling\n');
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
console.log('**UX NOTES:**');
|
|
208
|
-
console.log(' • Highly educational - teaches WHY, not just WHAT');
|
|
209
|
-
console.log(' • Tailored to actual deployment context');
|
|
210
|
-
console.log(' • Takes longer but builds expertise');
|
|
211
|
-
console.log(' • Best for teams learning production practices');
|
|
212
|
-
console.log(' • Requires user to know their deployment environment\n');
|
|
213
|
-
|
|
214
|
-
rl.close();
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
guidedProductionMode();
|
|
@@ -1,347 +0,0 @@
|
|
|
1
|
-
// Prototype: Production Mode Skill - Smart Context Awareness
|
|
2
|
-
// Created: 2025-01-11
|
|
3
|
-
// Purpose: Demonstrate how skill handles different starting contexts
|
|
4
|
-
// Decision: [to be filled after testing]
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* PROTOTYPE: Context-Aware Production Mode
|
|
8
|
-
*
|
|
9
|
-
* Intelligently detects which scenario we're in and adapts:
|
|
10
|
-
* - Scenario A: Fresh from stable (hot context, scenarios exist)
|
|
11
|
-
* - Scenario B: Gap in time (cold context, re-validate)
|
|
12
|
-
* - Scenario C: Post external-transition (new infrastructure requirements)
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
const readline = require('readline');
|
|
16
|
-
const rl = readline.createInterface({
|
|
17
|
-
input: process.stdin,
|
|
18
|
-
output: process.stdout
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
function question(prompt) {
|
|
22
|
-
return new Promise(resolve => rl.question(prompt, resolve));
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function sleep(ms) {
|
|
26
|
-
return new Promise(resolve => setTimeout(resolve, ms));
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
async function detectContext() {
|
|
30
|
-
console.log('\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
31
|
-
console.log('🔍 Context Detection Phase');
|
|
32
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
|
|
33
|
-
|
|
34
|
-
await sleep(300);
|
|
35
|
-
console.log('Analyzing current state...\n');
|
|
36
|
-
|
|
37
|
-
// Simulated checks
|
|
38
|
-
const hasScenarios = true; // Check if production scenarios exist in .feature file
|
|
39
|
-
const hasChores = true; // Check if production chores exist in database
|
|
40
|
-
const projectState = 'external'; // Check .jettypod/config.json
|
|
41
|
-
const hasProductionStandards = true; // Check if .jettypod/production-standards.md exists
|
|
42
|
-
const lastStableChoreCompleted = '2025-01-10'; // When was last stable chore done?
|
|
43
|
-
const externalTransitionDate = '2025-01-11'; // When did external transition happen?
|
|
44
|
-
|
|
45
|
-
await sleep(500);
|
|
46
|
-
|
|
47
|
-
console.log('📊 Context Analysis:\n');
|
|
48
|
-
console.log(` Production scenarios exist: ${hasScenarios ? '✓' : '✗'}`);
|
|
49
|
-
console.log(` Production chores exist: ${hasChores ? '✓' : '✗'}`);
|
|
50
|
-
console.log(` Project state: ${projectState}`);
|
|
51
|
-
console.log(` Production standards doc: ${hasProductionStandards ? '✓' : '✗'}`);
|
|
52
|
-
console.log(` Last stable chore: ${lastStableChoreCompleted}`);
|
|
53
|
-
console.log(` External transition: ${externalTransitionDate}\n`);
|
|
54
|
-
|
|
55
|
-
await sleep(500);
|
|
56
|
-
|
|
57
|
-
// Determine scenario
|
|
58
|
-
const timeSinceStable = 1; // days (simplified)
|
|
59
|
-
const transitionedAfterStable = externalTransitionDate > lastStableChoreCompleted;
|
|
60
|
-
|
|
61
|
-
let scenario;
|
|
62
|
-
if (hasScenarios && hasChores && timeSinceStable <= 1 && !transitionedAfterStable) {
|
|
63
|
-
scenario = 'A';
|
|
64
|
-
} else if (hasScenarios && hasChores && (timeSinceStable > 1 || transitionedAfterStable)) {
|
|
65
|
-
scenario = 'B';
|
|
66
|
-
} else {
|
|
67
|
-
scenario = 'C';
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
console.log(`🎯 Detected Scenario: ${scenario}\n`);
|
|
71
|
-
|
|
72
|
-
return { scenario, hasProductionStandards, projectState, hasScenarios, hasChores };
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
async function scenarioA() {
|
|
76
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
77
|
-
console.log('🚀 Scenario A: Fresh from Stable Mode');
|
|
78
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
|
|
79
|
-
|
|
80
|
-
console.log('**Context:**');
|
|
81
|
-
console.log(' • Just completed stable mode');
|
|
82
|
-
console.log(' • Production scenarios were proposed and confirmed');
|
|
83
|
-
console.log(' • Production chores already created');
|
|
84
|
-
console.log(' • Hot context - everything is fresh\n');
|
|
85
|
-
|
|
86
|
-
await sleep(500);
|
|
87
|
-
|
|
88
|
-
console.log('📋 Loading existing production scenarios...\n');
|
|
89
|
-
await sleep(300);
|
|
90
|
-
|
|
91
|
-
console.log('Found 5 production scenarios:');
|
|
92
|
-
console.log(' 1. Audit logging for state transitions (Security)');
|
|
93
|
-
console.log(' 2. Performance with 1000+ work items (Scale)');
|
|
94
|
-
console.log(' 3. Concurrent transition prevention (Security)');
|
|
95
|
-
console.log(' 4. State transition compliance records (Compliance)');
|
|
96
|
-
console.log(' 5. Idempotent infrastructure creation (Scale)\n');
|
|
97
|
-
|
|
98
|
-
await sleep(500);
|
|
99
|
-
|
|
100
|
-
console.log('✅ Quick validation against production standards...\n');
|
|
101
|
-
await sleep(300);
|
|
102
|
-
|
|
103
|
-
console.log(' ✓ Security: Audit logging ✓ covered');
|
|
104
|
-
console.log(' ✓ Security: Data sanitization ⚠️ missing');
|
|
105
|
-
console.log(' ✓ Performance: < 5s benchmark ✓ covered');
|
|
106
|
-
console.log(' ✓ Scale: Concurrency control ✓ covered');
|
|
107
|
-
console.log(' ✓ Compliance: Data retention ✓ covered');
|
|
108
|
-
console.log(' ✓ Compliance: Tamper-proof logs ⚠️ missing\n');
|
|
109
|
-
|
|
110
|
-
await sleep(300);
|
|
111
|
-
|
|
112
|
-
console.log('💡 Recommendation: Add 2 scenarios\n');
|
|
113
|
-
console.log('**Scenario 6: Data sanitization in audit logs**');
|
|
114
|
-
console.log(' - Mask PII, tokens, API keys');
|
|
115
|
-
console.log(' - Required by production standards\n');
|
|
116
|
-
|
|
117
|
-
console.log('**Scenario 7: Tamper-proof log storage**');
|
|
118
|
-
console.log(' - Append-only, read-only after write');
|
|
119
|
-
console.log(' - Required for compliance\n');
|
|
120
|
-
|
|
121
|
-
const response = await question('Add these scenarios? (yes/no): ');
|
|
122
|
-
|
|
123
|
-
if (response.toLowerCase() === 'yes') {
|
|
124
|
-
console.log('\n✅ Added 2 scenarios to feature file');
|
|
125
|
-
console.log('✅ Created 2 new production chores\n');
|
|
126
|
-
|
|
127
|
-
await sleep(300);
|
|
128
|
-
console.log('📊 Updated production chore list:\n');
|
|
129
|
-
console.log(' #1715: Implement audit logging (ready)');
|
|
130
|
-
console.log(' #1716: Optimize performance for large projects (ready)');
|
|
131
|
-
console.log(' #1717: Add concurrency control (ready)');
|
|
132
|
-
console.log(' #1718: Create state transition records (ready)');
|
|
133
|
-
console.log(' #1719: Ensure idempotency (ready)');
|
|
134
|
-
console.log(' #1720: Add data sanitization (new) ⭐');
|
|
135
|
-
console.log(' #1721: Implement tamper-proof storage (new) ⭐\n');
|
|
136
|
-
|
|
137
|
-
console.log('**Workflow:** Start implementing chores');
|
|
138
|
-
console.log(' → jettypod work start 1715\n');
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
async function scenarioB() {
|
|
143
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
144
|
-
console.log('🔄 Scenario B: Gap in Time (Re-validation)');
|
|
145
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
|
|
146
|
-
|
|
147
|
-
console.log('**Context:**');
|
|
148
|
-
console.log(' • Stable mode completed 30 days ago');
|
|
149
|
-
console.log(' • Project transitioned to external 5 days ago');
|
|
150
|
-
console.log(' • Production scenarios exist but might be outdated');
|
|
151
|
-
console.log(' • Need to check what changed\n');
|
|
152
|
-
|
|
153
|
-
await sleep(500);
|
|
154
|
-
|
|
155
|
-
console.log('🔍 Checking for changes since stable mode...\n');
|
|
156
|
-
await sleep(300);
|
|
157
|
-
|
|
158
|
-
console.log('**Changes detected:**\n');
|
|
159
|
-
console.log(' ⚠️ Project state: internal → external');
|
|
160
|
-
console.log(' Impact: New infrastructure requirements');
|
|
161
|
-
console.log(' Source: .jettypod/production-standards.md (updated 5 days ago)\n');
|
|
162
|
-
|
|
163
|
-
console.log(' ⚠️ Infrastructure epic created (#899)');
|
|
164
|
-
console.log(' Impact: Deployment, monitoring, security patterns now defined');
|
|
165
|
-
console.log(' Source: Infrastructure Readiness epic\n');
|
|
166
|
-
|
|
167
|
-
console.log(' ℹ️ Production standards updated');
|
|
168
|
-
console.log(' New requirements: TLS/HTTPS, secrets management, health checks\n');
|
|
169
|
-
|
|
170
|
-
await sleep(500);
|
|
171
|
-
|
|
172
|
-
console.log('📋 Re-validating existing production scenarios...\n');
|
|
173
|
-
await sleep(300);
|
|
174
|
-
|
|
175
|
-
console.log('Existing scenarios:');
|
|
176
|
-
console.log(' 1. Audit logging ✓ still valid');
|
|
177
|
-
console.log(' 2. Performance benchmarks ✓ still valid');
|
|
178
|
-
console.log(' 3. Concurrency control ✓ still valid');
|
|
179
|
-
console.log(' 4. State transition records ✓ still valid');
|
|
180
|
-
console.log(' 5. Idempotent operations ✓ still valid\n');
|
|
181
|
-
|
|
182
|
-
await sleep(300);
|
|
183
|
-
|
|
184
|
-
console.log('💡 New scenarios needed (from production standards):\n');
|
|
185
|
-
console.log('**Scenario 6: Secrets management**');
|
|
186
|
-
console.log(' - No hardcoded secrets in code');
|
|
187
|
-
console.log(' - Use environment variables or vault');
|
|
188
|
-
console.log(' - Required for external deployment\n');
|
|
189
|
-
|
|
190
|
-
console.log('**Scenario 7: Health check endpoint**');
|
|
191
|
-
console.log(' - /health returns service status');
|
|
192
|
-
console.log(' - Required for monitoring (Infrastructure epic)\n');
|
|
193
|
-
|
|
194
|
-
console.log('**Scenario 8: TLS/HTTPS for external access**');
|
|
195
|
-
console.log(' - All endpoints use HTTPS');
|
|
196
|
-
console.log(' - Required for external state\n');
|
|
197
|
-
|
|
198
|
-
const response = await question('Add infrastructure-related scenarios? (yes/adjust): ');
|
|
199
|
-
|
|
200
|
-
if (response.toLowerCase() === 'yes') {
|
|
201
|
-
console.log('\n✅ Added 3 infrastructure scenarios');
|
|
202
|
-
console.log('✅ Created 3 new production chores');
|
|
203
|
-
console.log('✅ Updated existing chores with infrastructure patterns\n');
|
|
204
|
-
|
|
205
|
-
console.log('**Workflow:** Review changes, then start implementing');
|
|
206
|
-
console.log(' → Review updated scenarios in feature file');
|
|
207
|
-
console.log(' → jettypod work start 1715\n');
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
async function scenarioC() {
|
|
212
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
213
|
-
console.log('🆕 Scenario C: Post External-Transition');
|
|
214
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
|
|
215
|
-
|
|
216
|
-
console.log('**Context:**');
|
|
217
|
-
console.log(' • No production scenarios exist');
|
|
218
|
-
console.log(' • Feature was in stable mode (internal project)');
|
|
219
|
-
console.log(' • Project recently transitioned to external');
|
|
220
|
-
console.log(' • Need to generate production scenarios from scratch\n');
|
|
221
|
-
|
|
222
|
-
await sleep(500);
|
|
223
|
-
|
|
224
|
-
console.log('📚 Loading production standards...\n');
|
|
225
|
-
await sleep(300);
|
|
226
|
-
|
|
227
|
-
console.log('Found: .jettypod/production-standards.md\n');
|
|
228
|
-
console.log('Standards defined:');
|
|
229
|
-
console.log(' • Security: Audit logging, data protection, auth validation');
|
|
230
|
-
console.log(' • Performance: < 5s, < 100MB, 1000+ users');
|
|
231
|
-
console.log(' • Scale: Concurrency, idempotency, log rotation');
|
|
232
|
-
console.log(' • Compliance: 90-day retention, export, GDPR');
|
|
233
|
-
console.log(' • Infrastructure: Deployment, monitoring, security, backups\n');
|
|
234
|
-
|
|
235
|
-
await sleep(500);
|
|
236
|
-
|
|
237
|
-
console.log('🔍 Analyzing feature implementation...\n');
|
|
238
|
-
await sleep(300);
|
|
239
|
-
|
|
240
|
-
console.log('Feature: Simplify External Transition Command\n');
|
|
241
|
-
console.log('Implementation files:');
|
|
242
|
-
console.log(' • jettypod.js (external command)');
|
|
243
|
-
console.log(' • lib/config.js (state management)');
|
|
244
|
-
console.log(' • features/work-tracking/index.js (work item creation)\n');
|
|
245
|
-
|
|
246
|
-
await sleep(300);
|
|
247
|
-
|
|
248
|
-
console.log('Relevant production concerns:\n');
|
|
249
|
-
console.log(' ✓ State transitions → Audit logging needed');
|
|
250
|
-
console.log(' ✓ Creates work items → Performance/scale needed');
|
|
251
|
-
console.log(' ✓ Modifies config → Concurrency control needed');
|
|
252
|
-
console.log(' ✓ External deployment → Infrastructure scenarios needed\n');
|
|
253
|
-
|
|
254
|
-
await sleep(500);
|
|
255
|
-
|
|
256
|
-
console.log('💡 Proposing production scenarios based on standards:\n');
|
|
257
|
-
|
|
258
|
-
console.log('**Security (3 scenarios):**');
|
|
259
|
-
console.log(' 1. Audit logging for external transitions');
|
|
260
|
-
console.log(' 2. Validate permissions before state change');
|
|
261
|
-
console.log(' 3. Data sanitization in logs\n');
|
|
262
|
-
|
|
263
|
-
console.log('**Performance & Scale (3 scenarios):**');
|
|
264
|
-
console.log(' 4. Performance with 1000+ work items (< 5s)');
|
|
265
|
-
console.log(' 5. Concurrency control for state changes');
|
|
266
|
-
console.log(' 6. Idempotent external transition\n');
|
|
267
|
-
|
|
268
|
-
console.log('**Compliance (2 scenarios):**');
|
|
269
|
-
console.log(' 7. State transition audit trail (90-day retention)');
|
|
270
|
-
console.log(' 8. Export audit logs (JSON/CSV)\n');
|
|
271
|
-
|
|
272
|
-
console.log('**Infrastructure (3 scenarios):**');
|
|
273
|
-
console.log(' 9. Health check endpoint');
|
|
274
|
-
console.log(' 10. Secrets management (no hardcoded values)');
|
|
275
|
-
console.log(' 11. TLS/HTTPS for all endpoints\n');
|
|
276
|
-
|
|
277
|
-
const response = await question('Create these 11 production scenarios? (yes/adjust): ');
|
|
278
|
-
|
|
279
|
-
if (response.toLowerCase() === 'yes') {
|
|
280
|
-
console.log('\n✅ Created feature file with 11 production scenarios');
|
|
281
|
-
console.log('✅ Created step definitions for all scenarios');
|
|
282
|
-
console.log('✅ Created 11 production chores with implementation guidance\n');
|
|
283
|
-
|
|
284
|
-
console.log('**Workflow:** Start implementing chores');
|
|
285
|
-
console.log(' → jettypod work start [first-chore-id]\n');
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
async function smartContextMode() {
|
|
290
|
-
const context = await detectContext();
|
|
291
|
-
|
|
292
|
-
if (context.scenario === 'A') {
|
|
293
|
-
await scenarioA();
|
|
294
|
-
} else if (context.scenario === 'B') {
|
|
295
|
-
await scenarioB();
|
|
296
|
-
} else {
|
|
297
|
-
await scenarioC();
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
console.log('\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
301
|
-
console.log('💡 Key Design Points');
|
|
302
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
|
|
303
|
-
|
|
304
|
-
console.log('**1. Production Standards as Source of Truth**');
|
|
305
|
-
console.log(' • Created by external-transition skill');
|
|
306
|
-
console.log(' • Defines what "production ready" means');
|
|
307
|
-
console.log(' • Referenced by production-mode skill\n');
|
|
308
|
-
|
|
309
|
-
console.log('**2. Context Detection is Automatic**');
|
|
310
|
-
console.log(' • Checks scenario file, chores, project state');
|
|
311
|
-
console.log(' • Detects time gaps and state changes');
|
|
312
|
-
console.log(' • Adapts workflow accordingly\n');
|
|
313
|
-
|
|
314
|
-
console.log('**3. Intelligent Validation**');
|
|
315
|
-
console.log(' • Scenario A: Quick validation, fill gaps');
|
|
316
|
-
console.log(' • Scenario B: Re-validate, add new requirements');
|
|
317
|
-
console.log(' • Scenario C: Generate from standards\n');
|
|
318
|
-
|
|
319
|
-
console.log('**4. Infrastructure Integration**');
|
|
320
|
-
console.log(' • References Infrastructure Readiness epic');
|
|
321
|
-
console.log(' • Uses deployment patterns from standards');
|
|
322
|
-
console.log(' • Ensures consistency across features\n');
|
|
323
|
-
|
|
324
|
-
rl.close();
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
// Simulate different scenarios
|
|
328
|
-
async function demo() {
|
|
329
|
-
console.log('\n🎮 Production Mode Skill - Smart Context Demo\n');
|
|
330
|
-
console.log('This prototype shows how the skill detects and handles different contexts.\n');
|
|
331
|
-
|
|
332
|
-
const scenario = await question('Which scenario to simulate? (A/B/C or auto): ');
|
|
333
|
-
|
|
334
|
-
if (scenario.toUpperCase() === 'A') {
|
|
335
|
-
await scenarioA();
|
|
336
|
-
} else if (scenario.toUpperCase() === 'B') {
|
|
337
|
-
await scenarioB();
|
|
338
|
-
} else if (scenario.toUpperCase() === 'C') {
|
|
339
|
-
await scenarioC();
|
|
340
|
-
} else {
|
|
341
|
-
await smartContextMode();
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
rl.close();
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
demo();
|