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,121 +0,0 @@
|
|
|
1
|
-
Feature: Production Mode Skill
|
|
2
|
-
Context-aware skill that guides implementation of production mode chores
|
|
3
|
-
with smart detection of three starting contexts (hot, cold, post-transition)
|
|
4
|
-
|
|
5
|
-
Epic: #609 Production Mode
|
|
6
|
-
Approach: Context-Aware Production Mode with Scenario A/B/C detection
|
|
7
|
-
|
|
8
|
-
Scenario: Fresh from stable mode - Quick validation (Scenario A)
|
|
9
|
-
Given a feature just completed stable mode within 1 day
|
|
10
|
-
And production scenarios already exist in the feature file
|
|
11
|
-
And production chores already exist for the feature
|
|
12
|
-
And production standards file exists
|
|
13
|
-
When I start the production-mode skill for this feature
|
|
14
|
-
Then it detects Scenario A (hot context)
|
|
15
|
-
And it validates existing scenarios against current standards
|
|
16
|
-
And it identifies no gaps
|
|
17
|
-
And it proceeds to implement existing production chores
|
|
18
|
-
|
|
19
|
-
Scenario: Gap in time - Re-validation (Scenario B)
|
|
20
|
-
Given a feature completed stable mode over 7 days ago
|
|
21
|
-
And production scenarios exist in the feature file
|
|
22
|
-
And production chores exist for the feature
|
|
23
|
-
And production standards file exists
|
|
24
|
-
When I start the production-mode skill for this feature
|
|
25
|
-
Then it detects Scenario B (cold context)
|
|
26
|
-
And it re-validates existing scenarios against current standards
|
|
27
|
-
And it checks if project state changed since stable mode
|
|
28
|
-
And it identifies any gaps in standards coverage
|
|
29
|
-
And it updates scenarios if needed
|
|
30
|
-
|
|
31
|
-
Scenario: Post external-transition - Generate from standards (Scenario C)
|
|
32
|
-
Given a feature in stable mode with no production scenarios
|
|
33
|
-
And no production chores exist for the feature
|
|
34
|
-
And production standards file exists from external-transition
|
|
35
|
-
When I start the production-mode skill for this feature
|
|
36
|
-
Then it detects Scenario C (post-transition)
|
|
37
|
-
And it reads production standards from file
|
|
38
|
-
And it generates production scenarios from activated standards
|
|
39
|
-
And it appends scenarios to the feature file
|
|
40
|
-
And it proposes production chores based on standards
|
|
41
|
-
And it creates chores after user confirmation
|
|
42
|
-
|
|
43
|
-
# STABLE MODE SCENARIOS - Error Handling and Edge Cases
|
|
44
|
-
|
|
45
|
-
Scenario: Missing production standards file
|
|
46
|
-
Given a feature in stable mode
|
|
47
|
-
And the production standards file does not exist at .jettypod/production-standards.json
|
|
48
|
-
When I start the production-mode skill for this feature
|
|
49
|
-
Then it fails with error "Production standards file not found"
|
|
50
|
-
And it suggests running external-transition first
|
|
51
|
-
|
|
52
|
-
Scenario: Corrupted production standards file
|
|
53
|
-
Given a feature in stable mode
|
|
54
|
-
And the production standards file exists but contains malformed JSON
|
|
55
|
-
When I start the production-mode skill for this feature
|
|
56
|
-
Then it fails with error "Failed to parse production standards"
|
|
57
|
-
And it shows the JSON parsing error details
|
|
58
|
-
|
|
59
|
-
Scenario: Invalid production standards format
|
|
60
|
-
Given a feature in stable mode
|
|
61
|
-
And the production standards file exists with valid JSON
|
|
62
|
-
But the standards array is missing required fields
|
|
63
|
-
When I start the production-mode skill for this feature
|
|
64
|
-
Then it fails with error "Invalid standards format"
|
|
65
|
-
And it specifies which required fields are missing
|
|
66
|
-
|
|
67
|
-
Scenario: Missing scenario file for feature
|
|
68
|
-
Given a feature in stable mode
|
|
69
|
-
And the feature has no scenario_file set in database
|
|
70
|
-
When I start the production-mode skill for this feature
|
|
71
|
-
Then it fails with error "Feature has no scenario file"
|
|
72
|
-
And it suggests the feature may not be properly initialized
|
|
73
|
-
|
|
74
|
-
Scenario: Scenario file does not exist on disk
|
|
75
|
-
Given a feature in stable mode
|
|
76
|
-
And the feature has scenario_file set in database
|
|
77
|
-
But the file does not exist at that path
|
|
78
|
-
When I start the production-mode skill for this feature
|
|
79
|
-
Then it fails with error "Scenario file not found"
|
|
80
|
-
And it shows the expected file path
|
|
81
|
-
|
|
82
|
-
Scenario: Feature not found in database
|
|
83
|
-
Given an invalid feature ID
|
|
84
|
-
When I start the production-mode skill with that feature ID
|
|
85
|
-
Then it fails with error "Feature not found"
|
|
86
|
-
|
|
87
|
-
Scenario: Feature has no completed_at timestamp
|
|
88
|
-
Given a feature marked as done in stable mode
|
|
89
|
-
But the completed_at field is null
|
|
90
|
-
When the context detector checks time since stable completion
|
|
91
|
-
Then it treats this as Scenario C (no production content yet)
|
|
92
|
-
|
|
93
|
-
Scenario: File permission error reading standards
|
|
94
|
-
Given a feature in stable mode
|
|
95
|
-
And the production standards file exists
|
|
96
|
-
But the file is not readable due to permissions
|
|
97
|
-
When I start the production-mode skill for this feature
|
|
98
|
-
Then it fails with error indicating permission denied
|
|
99
|
-
And it shows the file path with permission issues
|
|
100
|
-
|
|
101
|
-
Scenario: File permission error writing scenarios
|
|
102
|
-
Given a feature in Scenario C (generating scenarios)
|
|
103
|
-
And production standards are loaded successfully
|
|
104
|
-
But the scenario file is not writable due to permissions
|
|
105
|
-
When attempting to append scenarios to the file
|
|
106
|
-
Then it fails with error indicating write permission denied
|
|
107
|
-
|
|
108
|
-
Scenario: Empty standards array
|
|
109
|
-
Given a feature in stable mode
|
|
110
|
-
And the production standards file exists with empty standards array
|
|
111
|
-
When I start the production-mode skill for this feature
|
|
112
|
-
Then it completes successfully
|
|
113
|
-
And reports 0 standards to implement
|
|
114
|
-
|
|
115
|
-
Scenario: Database connection error
|
|
116
|
-
Given the database file is locked or corrupted
|
|
117
|
-
When I start the production-mode skill
|
|
118
|
-
Then it fails with database error
|
|
119
|
-
And it suggests checking database integrity
|
|
120
|
-
|
|
121
|
-
# PRODUCTION MODE: Will add scale/security scenarios
|
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
const { Given, When, Then } = require('@cucumber/cucumber');
|
|
2
|
-
const assert = require('assert');
|
|
3
|
-
|
|
4
|
-
// State for scenarios
|
|
5
|
-
let auditResults = null;
|
|
6
|
-
let selectedCategory = null;
|
|
7
|
-
let detailedBreakdown = null;
|
|
8
|
-
let createdEpic = null;
|
|
9
|
-
let createdChores = [];
|
|
10
|
-
|
|
11
|
-
Given('I have existing work items in the system', function () {
|
|
12
|
-
// For integration test - work items exist in test DB
|
|
13
|
-
this.existingWorkItems = true;
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
Given("I'm in a project with technical debt", function () {
|
|
17
|
-
// Mock project with technical debt
|
|
18
|
-
this.projectHasDebt = true;
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
Given('I see the audit menu', function () {
|
|
22
|
-
// Previous step set auditResults
|
|
23
|
-
assert(auditResults, 'Audit results should be available');
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
Given('I see the detailed breakdown for {string}', function (category) {
|
|
27
|
-
// Previous step set detailedBreakdown
|
|
28
|
-
assert(detailedBreakdown, 'Detailed breakdown should be available');
|
|
29
|
-
assert.strictEqual(detailedBreakdown.category, category);
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
Given('I see recommendations for Storage Pattern', function () {
|
|
33
|
-
// Recommendations were shown in previous step
|
|
34
|
-
this.hasRecommendations = true;
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
When('I enter refactor mode and audit the codebase', function () {
|
|
38
|
-
// Simulate entering refactor mode with audit
|
|
39
|
-
auditResults = {
|
|
40
|
-
codeSmells: { count: 5, summary: 'Long functions, duplicated code' },
|
|
41
|
-
featureSpecific: { count: 3, summary: 'features/auth/ has patterns' },
|
|
42
|
-
architectural: { count: 15, summary: 'Storage patterns duplicated' },
|
|
43
|
-
performance: { count: 4, summary: 'Unnecessary re-renders' }
|
|
44
|
-
};
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
When('I enter refactor mode', function () {
|
|
48
|
-
// Simulate entering refactor mode
|
|
49
|
-
auditResults = {
|
|
50
|
-
codeSmells: { count: 5, summary: 'Long functions' },
|
|
51
|
-
featureSpecific: { count: 3, summary: 'features/auth/' },
|
|
52
|
-
architectural: { count: 15, summary: 'Storage patterns' },
|
|
53
|
-
performance: { count: 4, summary: 'Re-renders' }
|
|
54
|
-
};
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
When('I select {string} category', function (category) {
|
|
58
|
-
selectedCategory = category;
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
When('I pick {string} category', function (category) {
|
|
62
|
-
selectedCategory = category;
|
|
63
|
-
// Generate detailed breakdown
|
|
64
|
-
detailedBreakdown = {
|
|
65
|
-
category,
|
|
66
|
-
items: [
|
|
67
|
-
{
|
|
68
|
-
name: 'Storage Pattern',
|
|
69
|
-
count: 15,
|
|
70
|
-
type: '🟠 Cross-Cutting',
|
|
71
|
-
impact: 'High - affects all features',
|
|
72
|
-
time: '2 hours',
|
|
73
|
-
files: ['auth.js', 'expenses.js', '+13 more'],
|
|
74
|
-
example: 'localStorage.getItem() duplicated'
|
|
75
|
-
}
|
|
76
|
-
]
|
|
77
|
-
};
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
When('I approve creating chores for storage pattern', function () {
|
|
81
|
-
// User approved - create chores
|
|
82
|
-
createdEpic = {
|
|
83
|
-
id: 999,
|
|
84
|
-
title: 'Refactor: Architectural patterns',
|
|
85
|
-
type: 'epic'
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
createdChores = [
|
|
89
|
-
{
|
|
90
|
-
id: 1000,
|
|
91
|
-
title: 'Create shared storage util',
|
|
92
|
-
epicId: 999,
|
|
93
|
-
type: 'chore'
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
id: 1001,
|
|
97
|
-
title: 'Migrate auth to storage util',
|
|
98
|
-
epicId: 999,
|
|
99
|
-
type: 'chore'
|
|
100
|
-
}
|
|
101
|
-
];
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
When('Claude analyzes impact vs time', function () {
|
|
105
|
-
// Claude analyzes and generates recommendations
|
|
106
|
-
this.recommendations = {
|
|
107
|
-
quickWin: 'Storage Pattern (quick win, high impact)',
|
|
108
|
-
warning: 'State Management (needs Discovery Mode first)'
|
|
109
|
-
};
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
When('I say {string}', function (userInput) {
|
|
113
|
-
if (userInput === 'create chores') {
|
|
114
|
-
// User approved - create chores
|
|
115
|
-
createdEpic = {
|
|
116
|
-
id: 999,
|
|
117
|
-
title: 'Refactor: Architectural patterns',
|
|
118
|
-
type: 'epic'
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
createdChores = [
|
|
122
|
-
{
|
|
123
|
-
id: 1000,
|
|
124
|
-
title: 'Create shared storage util',
|
|
125
|
-
epicId: 999,
|
|
126
|
-
type: 'chore'
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
id: 1001,
|
|
130
|
-
title: 'Migrate auth to storage util',
|
|
131
|
-
epicId: 999,
|
|
132
|
-
type: 'chore'
|
|
133
|
-
}
|
|
134
|
-
];
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
|
|
138
|
-
Then('Claude audits the codebase', function () {
|
|
139
|
-
assert(auditResults, 'Audit should have run');
|
|
140
|
-
});
|
|
141
|
-
|
|
142
|
-
Then('I see categorized menu with counts:', function (dataTable) {
|
|
143
|
-
const expectedCategories = dataTable.hashes();
|
|
144
|
-
|
|
145
|
-
// Verify we have results for each category
|
|
146
|
-
assert(auditResults.codeSmells, 'Should have code smells results');
|
|
147
|
-
assert(auditResults.featureSpecific, 'Should have feature-specific results');
|
|
148
|
-
assert(auditResults.architectural, 'Should have architectural results');
|
|
149
|
-
assert(auditResults.performance, 'Should have performance results');
|
|
150
|
-
|
|
151
|
-
// Verify counts are present
|
|
152
|
-
assert(auditResults.codeSmells.count > 0, 'Code smells count should be > 0');
|
|
153
|
-
assert(auditResults.architectural.count > 0, 'Architectural count should be > 0');
|
|
154
|
-
});
|
|
155
|
-
|
|
156
|
-
Then('I see detailed items with:', function (dataTable) {
|
|
157
|
-
const expectedFields = dataTable.hashes();
|
|
158
|
-
|
|
159
|
-
assert(detailedBreakdown, 'Should have detailed breakdown');
|
|
160
|
-
assert(detailedBreakdown.items.length > 0, 'Should have at least one item');
|
|
161
|
-
|
|
162
|
-
const item = detailedBreakdown.items[0];
|
|
163
|
-
assert(item.type, 'Item should have type');
|
|
164
|
-
assert(item.impact, 'Item should have impact');
|
|
165
|
-
assert(item.time, 'Item should have time estimate');
|
|
166
|
-
assert(item.files, 'Item should have files list');
|
|
167
|
-
assert(item.example, 'Item should have example');
|
|
168
|
-
});
|
|
169
|
-
|
|
170
|
-
Then('I see recommendation: {string}', function (recommendation) {
|
|
171
|
-
assert(this.recommendations, 'Should have recommendations');
|
|
172
|
-
assert(this.recommendations.quickWin.includes('Storage Pattern'), 'Should recommend Storage Pattern');
|
|
173
|
-
assert(this.recommendations.quickWin.includes('quick win'), 'Should mention quick win');
|
|
174
|
-
});
|
|
175
|
-
|
|
176
|
-
Then('I see warning: {string}', function (warning) {
|
|
177
|
-
assert(this.recommendations, 'Should have recommendations');
|
|
178
|
-
assert(this.recommendations.warning.includes('State Management'), 'Should warn about State Management');
|
|
179
|
-
assert(this.recommendations.warning.includes('Discovery Mode'), 'Should mention Discovery Mode');
|
|
180
|
-
});
|
|
181
|
-
|
|
182
|
-
Then('epic {string} is created', function (epicTitle) {
|
|
183
|
-
assert(createdEpic, 'Epic should be created');
|
|
184
|
-
assert.strictEqual(createdEpic.title, epicTitle);
|
|
185
|
-
assert.strictEqual(createdEpic.type, 'epic');
|
|
186
|
-
});
|
|
187
|
-
|
|
188
|
-
Then('chore {string} is created', function (choreTitle) {
|
|
189
|
-
const chore = createdChores.find(c => c.title === choreTitle);
|
|
190
|
-
assert(chore, `Chore "${choreTitle}" should be created`);
|
|
191
|
-
assert.strictEqual(chore.type, 'chore');
|
|
192
|
-
});
|
|
193
|
-
|
|
194
|
-
Then('refactor chores are created under an epic', function () {
|
|
195
|
-
assert(createdEpic, 'Epic should be created');
|
|
196
|
-
assert(createdChores.length > 0, 'Chores should be created');
|
|
197
|
-
|
|
198
|
-
// Verify chores are linked to epic
|
|
199
|
-
createdChores.forEach(chore => {
|
|
200
|
-
assert.strictEqual(chore.epicId, createdEpic.id, 'Chore should be linked to epic');
|
|
201
|
-
});
|
|
202
|
-
});
|
|
203
|
-
|
|
204
|
-
Then('the epic is linked to the refactor mode work item', function () {
|
|
205
|
-
// Epic is created as part of refactor mode workflow
|
|
206
|
-
assert(createdEpic, 'Epic should exist');
|
|
207
|
-
assert(this.existingWorkItems, 'Work items should exist');
|
|
208
|
-
});
|
|
209
|
-
|
|
210
|
-
Then('all chores are linked to the epic', function () {
|
|
211
|
-
assert(createdEpic, 'Epic should be created');
|
|
212
|
-
assert(createdChores.length > 0, 'Chores should be created');
|
|
213
|
-
|
|
214
|
-
createdChores.forEach(chore => {
|
|
215
|
-
assert.strictEqual(chore.epicId, createdEpic.id, 'All chores should be linked to epic');
|
|
216
|
-
});
|
|
217
|
-
});
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
Feature: Refactor Mode
|
|
2
|
-
As a developer
|
|
3
|
-
I want an interactive audit menu for refactoring
|
|
4
|
-
So that I can systematically clean up technical debt
|
|
5
|
-
|
|
6
|
-
# INTEGRATION TEST - Must work with existing work tracking
|
|
7
|
-
Scenario: Refactor mode integrates with work tracking
|
|
8
|
-
Given I have existing work items in the system
|
|
9
|
-
When I enter refactor mode and audit the codebase
|
|
10
|
-
And I select "Architectural" category
|
|
11
|
-
And I approve creating chores for storage pattern
|
|
12
|
-
Then refactor chores are created under an epic
|
|
13
|
-
And the epic is linked to the refactor mode work item
|
|
14
|
-
|
|
15
|
-
Scenario: User enters refactor mode and sees audit menu
|
|
16
|
-
Given I'm in a project with technical debt
|
|
17
|
-
When I enter refactor mode
|
|
18
|
-
Then Claude audits the codebase
|
|
19
|
-
And I see categorized menu with counts:
|
|
20
|
-
| Category | Example |
|
|
21
|
-
| Code Smells | Long functions (5 found) |
|
|
22
|
-
| Feature-Specific | features/auth/ (3 files) |
|
|
23
|
-
| Architectural | Storage patterns (15 uses) |
|
|
24
|
-
| Performance | Re-renders (4 components) |
|
|
25
|
-
|
|
26
|
-
Scenario: User picks category and sees detailed breakdown
|
|
27
|
-
Given I see the audit menu
|
|
28
|
-
When I pick "Architectural" category
|
|
29
|
-
Then I see detailed items with:
|
|
30
|
-
| Field | Example |
|
|
31
|
-
| Type | 🟠 Cross-Cutting |
|
|
32
|
-
| Impact | High - affects all features |
|
|
33
|
-
| Time | 2 hours |
|
|
34
|
-
| Files | auth.js, expenses.js, +13 more |
|
|
35
|
-
| Example | localStorage.getItem() duplicated |
|
|
36
|
-
|
|
37
|
-
Scenario: Claude recommends quick wins
|
|
38
|
-
Given I see the detailed breakdown for "Architectural"
|
|
39
|
-
When Claude analyzes impact vs time
|
|
40
|
-
Then I see recommendation: "Start with Storage Pattern (quick win, high impact)"
|
|
41
|
-
And I see warning: "Skip State Management (needs Discovery Mode first)"
|
|
42
|
-
|
|
43
|
-
Scenario: User approves and chores are created
|
|
44
|
-
Given I see recommendations for Storage Pattern
|
|
45
|
-
When I say "create chores"
|
|
46
|
-
Then epic "Refactor: Architectural patterns" is created
|
|
47
|
-
And chore "Create shared storage util" is created
|
|
48
|
-
And chore "Migrate auth to storage util" is created
|
|
49
|
-
And all chores are linked to the epic
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
Feature: Simplify External Transition Command
|
|
2
|
-
Remove batch production chore generation from 'jettypod project external'.
|
|
3
|
-
Just update project_state flag and create infrastructure readiness work items.
|
|
4
|
-
Production items become visible automatically through backlog filtering.
|
|
5
|
-
|
|
6
|
-
Epic: Production Mode
|
|
7
|
-
Approach: Skill-based external transition with infrastructure epic creation
|
|
8
|
-
|
|
9
|
-
Scenario: User transitions project to external state
|
|
10
|
-
Given I have a JettyPod project in internal state
|
|
11
|
-
And I have some features in stable mode with production chores already created
|
|
12
|
-
When I run "jettypod project external"
|
|
13
|
-
Then the project_state should be updated to "external"
|
|
14
|
-
And an "Infrastructure Readiness" epic should be created
|
|
15
|
-
And 4 infrastructure features should be created under the epic
|
|
16
|
-
And 15 infrastructure chores should be created across the features
|
|
17
|
-
And production mode work items should now be visible in the backlog
|
|
18
|
-
And no duplicate production chores should be created for existing features
|
|
19
|
-
|
|
20
|
-
# SPEED MODE: Only happy path above
|
|
21
|
-
# STABLE MODE: Error handling, edge cases, validation scenarios below
|
|
22
|
-
|
|
23
|
-
Scenario: Project already in external state
|
|
24
|
-
Given I have a JettyPod project in external state
|
|
25
|
-
When I run "jettypod project external"
|
|
26
|
-
Then I should see a message "Project already in external state"
|
|
27
|
-
And no duplicate infrastructure items should be created
|
|
28
|
-
And the command should exit successfully
|
|
29
|
-
|
|
30
|
-
Scenario: Infrastructure epic already exists
|
|
31
|
-
Given I have a JettyPod project in internal state
|
|
32
|
-
And an "Infrastructure Readiness" epic already exists
|
|
33
|
-
When I run "jettypod project external"
|
|
34
|
-
Then the project_state should be updated to "external"
|
|
35
|
-
And no duplicate "Infrastructure Readiness" epic should be created
|
|
36
|
-
And existing infrastructure items should be preserved
|
|
37
|
-
And I should see a message about existing infrastructure
|
|
38
|
-
|
|
39
|
-
Scenario: Database connection fails during transition
|
|
40
|
-
Given I have a JettyPod project in internal state
|
|
41
|
-
And the database connection will fail
|
|
42
|
-
When I run "jettypod project external"
|
|
43
|
-
Then I should see a clear error message about database failure
|
|
44
|
-
And the project_state should remain "internal"
|
|
45
|
-
And no partial infrastructure items should be created
|
|
46
|
-
|
|
47
|
-
Scenario: Work item creation fails mid-transition
|
|
48
|
-
Given I have a JettyPod project in internal state
|
|
49
|
-
And work item creation will fail after creating the epic
|
|
50
|
-
When I run "jettypod project external"
|
|
51
|
-
Then I should see an error message about failed creation
|
|
52
|
-
And the project_state should remain "internal"
|
|
53
|
-
And any partial work items should be cleaned up
|
|
54
|
-
|
|
55
|
-
Scenario: Invalid checklist data structure
|
|
56
|
-
Given I have a JettyPod project in internal state
|
|
57
|
-
And the infrastructure checklist has invalid data
|
|
58
|
-
When I run "jettypod project external"
|
|
59
|
-
Then I should see a validation error message
|
|
60
|
-
And the project_state should remain "internal"
|
|
61
|
-
And no infrastructure items should be created
|
|
62
|
-
|
|
63
|
-
Scenario: Infrastructure chores generated from production standards
|
|
64
|
-
Given I have a JettyPod project in internal state
|
|
65
|
-
And I have production standards with infrastructure-scoped standards
|
|
66
|
-
And the standards include "database_backups" in infrastructure scope
|
|
67
|
-
And the standards include "monitoring_setup" in infrastructure scope
|
|
68
|
-
When I run "jettypod project external"
|
|
69
|
-
Then infrastructure chores should be created from standards
|
|
70
|
-
And each infrastructure standard should create one chore
|
|
71
|
-
And chore descriptions should include acceptance criteria from standards
|
|
72
|
-
And chore descriptions should include reasoning from standards
|
|
73
|
-
And no static checklist should be used
|
|
74
|
-
|
|
75
|
-
Scenario: Different presets create different infrastructure chores
|
|
76
|
-
Given I have a JettyPod project in internal state
|
|
77
|
-
And production standards are set to "startup-mvp" preset
|
|
78
|
-
When I run "jettypod project external"
|
|
79
|
-
Then infrastructure chores should match startup-mvp standards
|
|
80
|
-
And I should see fewer infrastructure chores than enterprise preset
|
|
81
|
-
|
|
82
|
-
When I change production standards to "enterprise" preset
|
|
83
|
-
And I run "jettypod project external" on a new project
|
|
84
|
-
Then infrastructure chores should match enterprise standards
|
|
85
|
-
And I should see more infrastructure chores than startup-mvp preset
|
|
86
|
-
And additional chores should include multi-region setup
|
|
87
|
-
And additional chores should include advanced monitoring
|
|
88
|
-
|
|
89
|
-
Scenario: Scope field correctly filters infrastructure vs feature standards
|
|
90
|
-
Given I have a JettyPod project in internal state
|
|
91
|
-
And production standards include 5 infrastructure-scoped standards
|
|
92
|
-
And production standards include 8 feature-scoped standards
|
|
93
|
-
When I run "jettypod project external"
|
|
94
|
-
Then exactly 5 infrastructure chores should be created
|
|
95
|
-
And no feature-scoped standards should create infrastructure chores
|
|
96
|
-
And feature-scoped standards should be reserved for feature production chores
|
|
97
|
-
|
|
98
|
-
Scenario: Infrastructure chore created per standard (not grouped by domain)
|
|
99
|
-
Given I have a JettyPod project in internal state
|
|
100
|
-
And production standards include 3 security infrastructure standards
|
|
101
|
-
And production standards include 2 monitoring infrastructure standards
|
|
102
|
-
When I run "jettypod project external"
|
|
103
|
-
Then 5 separate infrastructure chores should be created
|
|
104
|
-
And each chore should reference exactly one standard
|
|
105
|
-
And chores should not be grouped by domain
|
|
106
|
-
And each chore title should describe the specific standard
|
|
107
|
-
|
|
108
|
-
Scenario: Missing production standards file during transition
|
|
109
|
-
Given I have a JettyPod project in internal state
|
|
110
|
-
And no production standards file exists
|
|
111
|
-
When I run "jettypod project external"
|
|
112
|
-
Then I should see an error "Production standards file not found"
|
|
113
|
-
And I should be prompted to run external transition interactively
|
|
114
|
-
And the project_state should remain "internal"
|
|
115
|
-
And no infrastructure items should be created
|
|
116
|
-
|
|
117
|
-
Scenario: Infrastructure chores include pattern guidance from standards
|
|
118
|
-
Given I have a JettyPod project in internal state
|
|
119
|
-
And production standards include a standard with pattern guidance
|
|
120
|
-
And the standard has pattern "Use pg_dump with --clean flag"
|
|
121
|
-
When I run "jettypod project external"
|
|
122
|
-
Then the created chore should include the pattern in description
|
|
123
|
-
And the pattern should be labeled "Pattern:" in the description
|
|
124
|
-
And developers should have clear implementation guidance
|
|
125
|
-
|
|
126
|
-
# PRODUCTION MODE: Security, scale, and compliance scenarios
|
|
127
|
-
|
|
128
|
-
Scenario: Audit logging for external transition
|
|
129
|
-
Given I have a JettyPod project in internal state
|
|
130
|
-
When I run "jettypod project external"
|
|
131
|
-
Then an audit log entry should be created
|
|
132
|
-
And the log should include timestamp, user, and project details
|
|
133
|
-
And the log should record the state change from "internal" to "external"
|
|
134
|
-
And the log should include the infrastructure epic ID created
|
|
135
|
-
|
|
136
|
-
Scenario: Performance with large projects (1000+ work items)
|
|
137
|
-
Given I have a JettyPod project with 1000 work items
|
|
138
|
-
And the project is in internal state
|
|
139
|
-
When I run "jettypod project external"
|
|
140
|
-
Then the transition should complete in under 5 seconds
|
|
141
|
-
And memory usage should remain under 100MB
|
|
142
|
-
And all infrastructure items should be created successfully
|
|
143
|
-
|
|
144
|
-
Scenario: Concurrent transition attempts are prevented
|
|
145
|
-
Given I have a JettyPod project in internal state
|
|
146
|
-
When I start "jettypod project external" in one process
|
|
147
|
-
And I attempt "jettypod project external" in another process
|
|
148
|
-
Then the second attempt should be blocked
|
|
149
|
-
And I should see "Transition already in progress"
|
|
150
|
-
And only one infrastructure epic should be created
|
|
151
|
-
|
|
152
|
-
Scenario: State transition is recorded for compliance
|
|
153
|
-
Given I have a JettyPod project in internal state
|
|
154
|
-
When I run "jettypod project external"
|
|
155
|
-
Then a state transition record should be created
|
|
156
|
-
And the record should include "from: internal, to: external"
|
|
157
|
-
And the record should include a timestamp
|
|
158
|
-
And the record should be immutable
|
|
159
|
-
|
|
160
|
-
Scenario: Infrastructure creation is idempotent
|
|
161
|
-
Given I have a JettyPod project in external state
|
|
162
|
-
And an "Infrastructure Readiness" epic exists
|
|
163
|
-
When I run "jettypod project external" again
|
|
164
|
-
Then no duplicate infrastructure items should be created
|
|
165
|
-
And the existing epic ID should be preserved
|
|
166
|
-
And I should see "Infrastructure already configured"
|