gsd-pi 2.29.0-dev.77f06e2 → 2.29.0-dev.953d788
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/README.md +17 -24
- package/dist/resources/extensions/bg-shell/process-manager.ts +0 -13
- package/dist/resources/extensions/gsd/auto-dashboard.ts +65 -186
- package/dist/resources/extensions/gsd/auto-post-unit.ts +3 -6
- package/dist/resources/extensions/gsd/auto-recovery.ts +22 -16
- package/dist/resources/extensions/gsd/auto-worktree-sync.ts +6 -7
- package/dist/resources/extensions/gsd/auto.ts +15 -0
- package/dist/resources/extensions/gsd/commands-handlers.ts +1 -20
- package/dist/resources/extensions/gsd/commands-logs.ts +14 -13
- package/dist/resources/extensions/gsd/commands-prefs-wizard.ts +14 -44
- package/dist/resources/extensions/gsd/commands.ts +22 -55
- package/dist/resources/extensions/gsd/dashboard-overlay.ts +1 -2
- package/dist/resources/extensions/gsd/json-persistence.ts +1 -16
- package/dist/resources/extensions/gsd/queue-order.ts +11 -10
- package/dist/resources/extensions/gsd/session-status-io.ts +41 -23
- package/dist/resources/extensions/gsd/tests/auto-budget-alerts.test.ts +1 -1
- package/dist/resources/extensions/gsd/tests/auto-skip-loop.test.ts +1 -1
- package/dist/resources/extensions/gsd/tests/extension-selector-separator.test.ts +38 -60
- package/dist/resources/extensions/gsd/tests/parallel-workers-multi-milestone-e2e.test.ts +1 -1
- package/dist/resources/extensions/mcporter/index.ts +525 -0
- package/dist/resources/extensions/remote-questions/discord-adapter.ts +19 -8
- package/dist/resources/extensions/remote-questions/slack-adapter.ts +17 -11
- package/dist/resources/extensions/remote-questions/telegram-adapter.ts +19 -8
- package/package.json +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.js +0 -13
- package/packages/pi-coding-agent/dist/core/extensions/loader.js.map +1 -1
- package/packages/pi-coding-agent/src/core/extensions/loader.ts +0 -13
- package/src/resources/extensions/bg-shell/process-manager.ts +0 -13
- package/src/resources/extensions/gsd/auto-dashboard.ts +65 -186
- package/src/resources/extensions/gsd/auto-post-unit.ts +3 -6
- package/src/resources/extensions/gsd/auto-recovery.ts +22 -16
- package/src/resources/extensions/gsd/auto-worktree-sync.ts +6 -7
- package/src/resources/extensions/gsd/auto.ts +15 -0
- package/src/resources/extensions/gsd/commands-handlers.ts +1 -20
- package/src/resources/extensions/gsd/commands-logs.ts +14 -13
- package/src/resources/extensions/gsd/commands-prefs-wizard.ts +14 -44
- package/src/resources/extensions/gsd/commands.ts +22 -55
- package/src/resources/extensions/gsd/dashboard-overlay.ts +1 -2
- package/src/resources/extensions/gsd/json-persistence.ts +1 -16
- package/src/resources/extensions/gsd/queue-order.ts +11 -10
- package/src/resources/extensions/gsd/session-status-io.ts +41 -23
- package/src/resources/extensions/gsd/tests/auto-budget-alerts.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/auto-skip-loop.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/extension-selector-separator.test.ts +38 -60
- package/src/resources/extensions/gsd/tests/parallel-workers-multi-milestone-e2e.test.ts +1 -1
- package/src/resources/extensions/mcporter/index.ts +525 -0
- package/src/resources/extensions/remote-questions/discord-adapter.ts +19 -8
- package/src/resources/extensions/remote-questions/slack-adapter.ts +17 -11
- package/src/resources/extensions/remote-questions/telegram-adapter.ts +19 -8
- package/dist/resources/extensions/gsd/commands-workflow-templates.ts +0 -544
- package/dist/resources/extensions/gsd/prompts/workflow-start.md +0 -28
- package/dist/resources/extensions/gsd/tests/workflow-templates.test.ts +0 -173
- package/dist/resources/extensions/gsd/workflow-templates/bugfix.md +0 -87
- package/dist/resources/extensions/gsd/workflow-templates/dep-upgrade.md +0 -74
- package/dist/resources/extensions/gsd/workflow-templates/full-project.md +0 -41
- package/dist/resources/extensions/gsd/workflow-templates/hotfix.md +0 -45
- package/dist/resources/extensions/gsd/workflow-templates/refactor.md +0 -83
- package/dist/resources/extensions/gsd/workflow-templates/registry.json +0 -85
- package/dist/resources/extensions/gsd/workflow-templates/security-audit.md +0 -73
- package/dist/resources/extensions/gsd/workflow-templates/small-feature.md +0 -81
- package/dist/resources/extensions/gsd/workflow-templates/spike.md +0 -69
- package/dist/resources/extensions/gsd/workflow-templates.ts +0 -241
- package/dist/resources/extensions/mcp-client/index.ts +0 -459
- package/dist/resources/extensions/remote-questions/http-client.ts +0 -76
- package/src/resources/extensions/gsd/commands-workflow-templates.ts +0 -544
- package/src/resources/extensions/gsd/prompts/workflow-start.md +0 -28
- package/src/resources/extensions/gsd/tests/workflow-templates.test.ts +0 -173
- package/src/resources/extensions/gsd/workflow-templates/bugfix.md +0 -87
- package/src/resources/extensions/gsd/workflow-templates/dep-upgrade.md +0 -74
- package/src/resources/extensions/gsd/workflow-templates/full-project.md +0 -41
- package/src/resources/extensions/gsd/workflow-templates/hotfix.md +0 -45
- package/src/resources/extensions/gsd/workflow-templates/refactor.md +0 -83
- package/src/resources/extensions/gsd/workflow-templates/registry.json +0 -85
- package/src/resources/extensions/gsd/workflow-templates/security-audit.md +0 -73
- package/src/resources/extensions/gsd/workflow-templates/small-feature.md +0 -81
- package/src/resources/extensions/gsd/workflow-templates/spike.md +0 -69
- package/src/resources/extensions/gsd/workflow-templates.ts +0 -241
- package/src/resources/extensions/mcp-client/index.ts +0 -459
- package/src/resources/extensions/remote-questions/http-client.ts +0 -76
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
// GSD Workflow Templates — Unit Tests
|
|
2
|
-
//
|
|
3
|
-
// Tests registry loading, template resolution, auto-detection, and listing.
|
|
4
|
-
|
|
5
|
-
import { createTestContext } from './test-helpers.ts';
|
|
6
|
-
import {
|
|
7
|
-
loadRegistry,
|
|
8
|
-
resolveByName,
|
|
9
|
-
autoDetect,
|
|
10
|
-
listTemplates,
|
|
11
|
-
getTemplateInfo,
|
|
12
|
-
loadWorkflowTemplate,
|
|
13
|
-
} from '../workflow-templates.ts';
|
|
14
|
-
|
|
15
|
-
const { assertEq, assertTrue, assertMatch, report } = createTestContext();
|
|
16
|
-
|
|
17
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
18
|
-
// Registry Loading
|
|
19
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
20
|
-
|
|
21
|
-
console.log('\n── Registry Loading ──');
|
|
22
|
-
|
|
23
|
-
{
|
|
24
|
-
const registry = loadRegistry();
|
|
25
|
-
assertTrue(registry !== null, 'Registry should load');
|
|
26
|
-
assertEq(registry.version, 1, 'Registry version should be 1');
|
|
27
|
-
assertTrue(Object.keys(registry.templates).length >= 8, 'Should have at least 8 templates');
|
|
28
|
-
|
|
29
|
-
// Verify required template keys exist
|
|
30
|
-
const expectedIds = ['full-project', 'bugfix', 'small-feature', 'refactor', 'spike', 'hotfix', 'security-audit', 'dep-upgrade'];
|
|
31
|
-
for (const id of expectedIds) {
|
|
32
|
-
assertTrue(id in registry.templates, `Template "${id}" should exist in registry`);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// Verify each template has required fields
|
|
36
|
-
for (const [id, entry] of Object.entries(registry.templates)) {
|
|
37
|
-
assertTrue(typeof entry.name === 'string' && entry.name.length > 0, `${id}: name should be non-empty string`);
|
|
38
|
-
assertTrue(typeof entry.description === 'string' && entry.description.length > 0, `${id}: description should be non-empty`);
|
|
39
|
-
assertTrue(typeof entry.file === 'string' && entry.file.endsWith('.md'), `${id}: file should be a .md path`);
|
|
40
|
-
assertTrue(Array.isArray(entry.phases) && entry.phases.length > 0, `${id}: phases should be non-empty array`);
|
|
41
|
-
assertTrue(Array.isArray(entry.triggers) && entry.triggers.length > 0, `${id}: triggers should be non-empty array`);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
46
|
-
// Resolve by Name
|
|
47
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
48
|
-
|
|
49
|
-
console.log('\n── Resolve by Name ──');
|
|
50
|
-
|
|
51
|
-
{
|
|
52
|
-
// Exact match
|
|
53
|
-
const bugfix = resolveByName('bugfix');
|
|
54
|
-
assertTrue(bugfix !== null, 'Should resolve "bugfix"');
|
|
55
|
-
assertEq(bugfix!.id, 'bugfix', 'ID should be "bugfix"');
|
|
56
|
-
assertEq(bugfix!.confidence, 'exact', 'Exact name should have exact confidence');
|
|
57
|
-
|
|
58
|
-
// Case-insensitive name match
|
|
59
|
-
const spike = resolveByName('Research Spike');
|
|
60
|
-
assertTrue(spike !== null, 'Should resolve "Research Spike" by name');
|
|
61
|
-
assertEq(spike!.id, 'spike', 'Should resolve to spike');
|
|
62
|
-
|
|
63
|
-
// Alias match
|
|
64
|
-
const bug = resolveByName('bug');
|
|
65
|
-
assertTrue(bug !== null, 'Should resolve "bug" alias');
|
|
66
|
-
assertEq(bug!.id, 'bugfix', 'Alias "bug" should map to bugfix');
|
|
67
|
-
|
|
68
|
-
const feat = resolveByName('feat');
|
|
69
|
-
assertTrue(feat !== null, 'Should resolve "feat" alias');
|
|
70
|
-
assertEq(feat!.id, 'small-feature', 'Alias "feat" should map to small-feature');
|
|
71
|
-
|
|
72
|
-
const deps = resolveByName('deps');
|
|
73
|
-
assertTrue(deps !== null, 'Should resolve "deps" alias');
|
|
74
|
-
assertEq(deps!.id, 'dep-upgrade', 'Alias "deps" should map to dep-upgrade');
|
|
75
|
-
|
|
76
|
-
// No match
|
|
77
|
-
const missing = resolveByName('nonexistent-template');
|
|
78
|
-
assertTrue(missing === null, 'Should return null for unknown template');
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
82
|
-
// Auto-Detection
|
|
83
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
84
|
-
|
|
85
|
-
console.log('\n── Auto-Detection ──');
|
|
86
|
-
|
|
87
|
-
{
|
|
88
|
-
// Should detect bugfix from "fix" keyword
|
|
89
|
-
const fixMatches = autoDetect('fix the login button');
|
|
90
|
-
assertTrue(fixMatches.length > 0, 'Should detect matches for "fix the login button"');
|
|
91
|
-
assertTrue(fixMatches.some(m => m.id === 'bugfix'), 'Should include bugfix in matches');
|
|
92
|
-
|
|
93
|
-
// Should detect spike from "research" keyword
|
|
94
|
-
const researchMatches = autoDetect('research authentication libraries');
|
|
95
|
-
assertTrue(researchMatches.length > 0, 'Should detect matches for "research"');
|
|
96
|
-
assertTrue(researchMatches.some(m => m.id === 'spike'), 'Should include spike in matches');
|
|
97
|
-
|
|
98
|
-
// Should detect hotfix from "urgent" keyword
|
|
99
|
-
const urgentMatches = autoDetect('urgent production is down');
|
|
100
|
-
assertTrue(urgentMatches.length > 0, 'Should detect matches for "urgent"');
|
|
101
|
-
assertTrue(urgentMatches.some(m => m.id === 'hotfix'), 'Should include hotfix in matches');
|
|
102
|
-
|
|
103
|
-
// Should detect dep-upgrade from "upgrade" keyword
|
|
104
|
-
const upgradeMatches = autoDetect('upgrade react to v19');
|
|
105
|
-
assertTrue(upgradeMatches.length > 0, 'Should detect matches for "upgrade"');
|
|
106
|
-
assertTrue(upgradeMatches.some(m => m.id === 'dep-upgrade'), 'Should include dep-upgrade in matches');
|
|
107
|
-
|
|
108
|
-
// Multi-word triggers should score higher
|
|
109
|
-
const projectMatches = autoDetect('create a new project from scratch');
|
|
110
|
-
const projectMatch = projectMatches.find(m => m.id === 'full-project');
|
|
111
|
-
assertTrue(projectMatch !== undefined, 'Should detect full-project for "from scratch"');
|
|
112
|
-
|
|
113
|
-
// Empty input should return no matches
|
|
114
|
-
const emptyMatches = autoDetect('');
|
|
115
|
-
assertEq(emptyMatches.length, 0, 'Empty input should return no matches');
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
119
|
-
// List Templates
|
|
120
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
121
|
-
|
|
122
|
-
console.log('\n── List Templates ──');
|
|
123
|
-
|
|
124
|
-
{
|
|
125
|
-
const output = listTemplates();
|
|
126
|
-
assertTrue(output.includes('Workflow Templates'), 'Should have header');
|
|
127
|
-
assertTrue(output.includes('bugfix'), 'Should list bugfix');
|
|
128
|
-
assertTrue(output.includes('spike'), 'Should list spike');
|
|
129
|
-
assertTrue(output.includes('hotfix'), 'Should list hotfix');
|
|
130
|
-
assertTrue(output.includes('/gsd start'), 'Should include usage hint');
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
134
|
-
// Template Info
|
|
135
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
136
|
-
|
|
137
|
-
console.log('\n── Template Info ──');
|
|
138
|
-
|
|
139
|
-
{
|
|
140
|
-
const info = getTemplateInfo('bugfix');
|
|
141
|
-
assertTrue(info !== null, 'Should return info for bugfix');
|
|
142
|
-
assertTrue(info!.includes('Bug Fix'), 'Should include template name');
|
|
143
|
-
assertTrue(info!.includes('triage'), 'Should include phase names');
|
|
144
|
-
assertTrue(info!.includes('Triggers'), 'Should include triggers section');
|
|
145
|
-
|
|
146
|
-
const missing = getTemplateInfo('nonexistent');
|
|
147
|
-
assertTrue(missing === null, 'Should return null for unknown template');
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
151
|
-
// Load Workflow Template Content
|
|
152
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
153
|
-
|
|
154
|
-
console.log('\n── Load Workflow Template ──');
|
|
155
|
-
|
|
156
|
-
{
|
|
157
|
-
const content = loadWorkflowTemplate('bugfix');
|
|
158
|
-
assertTrue(content !== null, 'Should load bugfix template');
|
|
159
|
-
assertTrue(content!.includes('Bugfix Workflow'), 'Should contain workflow title');
|
|
160
|
-
assertTrue(content!.includes('Phase 1: Triage'), 'Should contain triage phase');
|
|
161
|
-
assertTrue(content!.includes('Phase 4: Ship'), 'Should contain ship phase');
|
|
162
|
-
|
|
163
|
-
const hotfixContent = loadWorkflowTemplate('hotfix');
|
|
164
|
-
assertTrue(hotfixContent !== null, 'Should load hotfix template');
|
|
165
|
-
assertTrue(hotfixContent!.includes('Hotfix Workflow'), 'Should contain hotfix title');
|
|
166
|
-
|
|
167
|
-
const missingContent = loadWorkflowTemplate('nonexistent');
|
|
168
|
-
assertTrue(missingContent === null, 'Should return null for unknown template');
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
172
|
-
|
|
173
|
-
report();
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
# Bugfix Workflow
|
|
2
|
-
|
|
3
|
-
<template_meta>
|
|
4
|
-
name: bugfix
|
|
5
|
-
version: 1
|
|
6
|
-
requires_project: false
|
|
7
|
-
artifact_dir: .gsd/workflows/bugfixes/
|
|
8
|
-
</template_meta>
|
|
9
|
-
|
|
10
|
-
<purpose>
|
|
11
|
-
Fix a bug from identification through to PR submission. Designed for issues reported
|
|
12
|
-
via GitHub, user reports, or developer discovery. Emphasizes root cause analysis
|
|
13
|
-
before jumping to fixes.
|
|
14
|
-
</purpose>
|
|
15
|
-
|
|
16
|
-
<phases>
|
|
17
|
-
1. triage — Identify root cause, reproduce the bug
|
|
18
|
-
2. fix — Implement the fix with tests
|
|
19
|
-
3. verify — Run full test suite, check for regressions
|
|
20
|
-
4. ship — Create PR with detailed explanation
|
|
21
|
-
</phases>
|
|
22
|
-
|
|
23
|
-
<process>
|
|
24
|
-
|
|
25
|
-
## Phase 1: Triage
|
|
26
|
-
|
|
27
|
-
**Goal:** Understand the bug before touching any code.
|
|
28
|
-
|
|
29
|
-
1. **Gather context:**
|
|
30
|
-
- If a GitHub issue was referenced, read the issue description, labels, and comments
|
|
31
|
-
- Identify the expected behavior vs actual behavior
|
|
32
|
-
- Note any error messages, stack traces, or reproduction steps provided
|
|
33
|
-
|
|
34
|
-
2. **Reproduce:**
|
|
35
|
-
- Find the minimal reproduction path
|
|
36
|
-
- Identify the affected code paths (files, functions, lines)
|
|
37
|
-
- If the bug is intermittent, note the conditions that trigger it
|
|
38
|
-
|
|
39
|
-
3. **Root cause analysis:**
|
|
40
|
-
- Trace the bug to its root cause (not just the symptom)
|
|
41
|
-
- Identify when the bug was introduced if possible (git blame/log)
|
|
42
|
-
- Assess blast radius: what else could be affected?
|
|
43
|
-
|
|
44
|
-
4. **Produce:** Write a brief `TRIAGE.md` in the artifact directory with:
|
|
45
|
-
- Root cause explanation
|
|
46
|
-
- Reproduction steps
|
|
47
|
-
- Affected files/functions
|
|
48
|
-
- Proposed fix approach
|
|
49
|
-
|
|
50
|
-
5. **Gate:** Present the triage findings and proposed fix to the user for confirmation.
|
|
51
|
-
|
|
52
|
-
## Phase 2: Fix
|
|
53
|
-
|
|
54
|
-
**Goal:** Implement a clean, tested fix.
|
|
55
|
-
|
|
56
|
-
1. **Plan the fix:** Write a brief plan (1-3 tasks max)
|
|
57
|
-
2. **Write the fix:** Implement the code change
|
|
58
|
-
3. **Write tests:** Add or update tests that:
|
|
59
|
-
- Reproduce the original bug (test fails without fix)
|
|
60
|
-
- Verify the fix works
|
|
61
|
-
- Cover edge cases
|
|
62
|
-
4. **Commit:** Atomic commit with message: `fix(<scope>): <description>`
|
|
63
|
-
|
|
64
|
-
## Phase 3: Verify
|
|
65
|
-
|
|
66
|
-
**Goal:** Ensure the fix doesn't break anything else.
|
|
67
|
-
|
|
68
|
-
1. Run the project's full test suite
|
|
69
|
-
2. Run the build (if applicable)
|
|
70
|
-
3. Run the linter (if applicable)
|
|
71
|
-
4. Check for regressions in related functionality
|
|
72
|
-
5. If any failures, fix them before proceeding
|
|
73
|
-
|
|
74
|
-
## Phase 4: Ship
|
|
75
|
-
|
|
76
|
-
**Goal:** Create a well-documented PR.
|
|
77
|
-
|
|
78
|
-
1. Ensure all changes are committed on the workflow branch
|
|
79
|
-
2. Build the PR body:
|
|
80
|
-
- Link to the original issue (if applicable)
|
|
81
|
-
- Explain the root cause
|
|
82
|
-
- Describe the fix approach
|
|
83
|
-
- List the test coverage added
|
|
84
|
-
3. Present the PR details to the user for review
|
|
85
|
-
4. Create the PR via `gh pr create` (with user approval)
|
|
86
|
-
|
|
87
|
-
</process>
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
# Dependency Upgrade Workflow
|
|
2
|
-
|
|
3
|
-
<template_meta>
|
|
4
|
-
name: dep-upgrade
|
|
5
|
-
version: 1
|
|
6
|
-
requires_project: false
|
|
7
|
-
artifact_dir: .gsd/workflows/upgrades/
|
|
8
|
-
</template_meta>
|
|
9
|
-
|
|
10
|
-
<purpose>
|
|
11
|
-
Upgrade project dependencies safely. Assess breaking changes before upgrading,
|
|
12
|
-
fix issues incrementally, and verify everything works. Handles both single-package
|
|
13
|
-
upgrades and bulk dependency refresh.
|
|
14
|
-
</purpose>
|
|
15
|
-
|
|
16
|
-
<phases>
|
|
17
|
-
1. assess — Analyze what's outdated and what will break
|
|
18
|
-
2. upgrade — Apply upgrades incrementally
|
|
19
|
-
3. fix — Resolve breaking changes
|
|
20
|
-
4. verify — Full test suite and build validation
|
|
21
|
-
</phases>
|
|
22
|
-
|
|
23
|
-
<process>
|
|
24
|
-
|
|
25
|
-
## Phase 1: Assess
|
|
26
|
-
|
|
27
|
-
**Goal:** Know what you're getting into before changing versions.
|
|
28
|
-
|
|
29
|
-
1. **List outdated dependencies:** Run `npm outdated` / equivalent
|
|
30
|
-
2. **For each target upgrade:**
|
|
31
|
-
- Read the changelog / release notes
|
|
32
|
-
- Identify breaking changes
|
|
33
|
-
- Check for known migration guides
|
|
34
|
-
- Assess impact on the codebase (grep for affected APIs)
|
|
35
|
-
3. **Prioritize:** Which upgrades to do now, which to defer
|
|
36
|
-
4. **Produce:** Write `ASSESSMENT.md` with:
|
|
37
|
-
- Dependency list with current → target versions
|
|
38
|
-
- Breaking changes per dependency
|
|
39
|
-
- Upgrade order (dependencies before dependents)
|
|
40
|
-
- Risk assessment
|
|
41
|
-
|
|
42
|
-
5. **Gate:** Review assessment with user. Confirm upgrade scope.
|
|
43
|
-
|
|
44
|
-
## Phase 2: Upgrade
|
|
45
|
-
|
|
46
|
-
**Goal:** Apply version bumps incrementally.
|
|
47
|
-
|
|
48
|
-
1. Upgrade one dependency (or one group of related dependencies) at a time
|
|
49
|
-
2. Run tests after each upgrade
|
|
50
|
-
3. Commit each upgrade: `chore(deps): upgrade <package> to <version>`
|
|
51
|
-
4. If tests fail, move to Phase 3 for that dependency before continuing
|
|
52
|
-
|
|
53
|
-
## Phase 3: Fix
|
|
54
|
-
|
|
55
|
-
**Goal:** Resolve any breaking changes from upgrades.
|
|
56
|
-
|
|
57
|
-
1. Fix API changes, type errors, deprecations
|
|
58
|
-
2. Update configuration if needed
|
|
59
|
-
3. Commit fixes separately from the upgrade: `fix(deps): adapt to <package> v<version> changes`
|
|
60
|
-
|
|
61
|
-
## Phase 4: Verify
|
|
62
|
-
|
|
63
|
-
**Goal:** Ensure everything works together.
|
|
64
|
-
|
|
65
|
-
1. Run the full test suite
|
|
66
|
-
2. Run the build
|
|
67
|
-
3. Run the linter
|
|
68
|
-
4. Check for deprecation warnings in output
|
|
69
|
-
5. **Produce:** Write `SUMMARY.md` with:
|
|
70
|
-
- Dependencies upgraded (from → to)
|
|
71
|
-
- Breaking changes encountered and how they were resolved
|
|
72
|
-
- Any deferred upgrades and why
|
|
73
|
-
|
|
74
|
-
</process>
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# Full Project Workflow
|
|
2
|
-
|
|
3
|
-
<template_meta>
|
|
4
|
-
name: full-project
|
|
5
|
-
version: 1
|
|
6
|
-
requires_project: true
|
|
7
|
-
artifact_dir: .gsd/
|
|
8
|
-
</template_meta>
|
|
9
|
-
|
|
10
|
-
<purpose>
|
|
11
|
-
The complete GSD workflow with full ceremony: roadmap, milestones, slices, tasks,
|
|
12
|
-
research, planning, execution, and verification. Use for greenfield projects or
|
|
13
|
-
major features that need the full planning apparatus.
|
|
14
|
-
|
|
15
|
-
This template wraps the existing GSD workflow for registry completeness.
|
|
16
|
-
When selected, it routes to the standard /gsd init → /gsd auto pipeline.
|
|
17
|
-
</purpose>
|
|
18
|
-
|
|
19
|
-
<phases>
|
|
20
|
-
1. init — Initialize project, detect stack, create .gsd/
|
|
21
|
-
2. discuss — Define requirements, decisions, and architecture
|
|
22
|
-
3. plan — Create roadmap with milestones and slices
|
|
23
|
-
4. execute — Execute slices: research → plan → implement → verify per slice
|
|
24
|
-
5. verify — Milestone-level verification and completion
|
|
25
|
-
</phases>
|
|
26
|
-
|
|
27
|
-
<process>
|
|
28
|
-
|
|
29
|
-
## Routing to Standard GSD
|
|
30
|
-
|
|
31
|
-
This template is a convenience entry point. When selected via `/gsd start full-project`,
|
|
32
|
-
it should route to the standard GSD workflow:
|
|
33
|
-
|
|
34
|
-
1. If `.gsd/` doesn't exist: Run `/gsd init` to bootstrap the project
|
|
35
|
-
2. If `.gsd/` exists but no milestones: Start the discuss phase via `/gsd discuss`
|
|
36
|
-
3. If milestones exist: Resume via `/gsd auto` or `/gsd next`
|
|
37
|
-
|
|
38
|
-
The full GSD workflow protocol is defined in `GSD-WORKFLOW.md` and handles all
|
|
39
|
-
phases, state tracking, and agent orchestration.
|
|
40
|
-
|
|
41
|
-
</process>
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# Hotfix Workflow
|
|
2
|
-
|
|
3
|
-
<template_meta>
|
|
4
|
-
name: hotfix
|
|
5
|
-
version: 1
|
|
6
|
-
requires_project: false
|
|
7
|
-
artifact_dir: null
|
|
8
|
-
</template_meta>
|
|
9
|
-
|
|
10
|
-
<purpose>
|
|
11
|
-
Minimal ceremony for urgent fixes. Fix it, test it, ship it. No planning artifacts,
|
|
12
|
-
no research phase, no lengthy documentation. For when production is broken and
|
|
13
|
-
speed matters.
|
|
14
|
-
</purpose>
|
|
15
|
-
|
|
16
|
-
<phases>
|
|
17
|
-
1. fix — Identify and fix the issue
|
|
18
|
-
2. ship — Test, commit, and create PR
|
|
19
|
-
</phases>
|
|
20
|
-
|
|
21
|
-
<process>
|
|
22
|
-
|
|
23
|
-
## Phase 1: Fix
|
|
24
|
-
|
|
25
|
-
**Goal:** Find and fix the issue as fast as possible.
|
|
26
|
-
|
|
27
|
-
1. Identify the broken behavior
|
|
28
|
-
2. Locate the root cause
|
|
29
|
-
3. Implement the minimal fix
|
|
30
|
-
4. Add a regression test if possible (don't block on this if the fix is urgent)
|
|
31
|
-
5. Commit: `fix(<scope>): <description>`
|
|
32
|
-
|
|
33
|
-
## Phase 2: Ship
|
|
34
|
-
|
|
35
|
-
**Goal:** Get the fix deployed.
|
|
36
|
-
|
|
37
|
-
1. Run tests — fix any failures
|
|
38
|
-
2. Run the build
|
|
39
|
-
3. Push and create PR with:
|
|
40
|
-
- What broke
|
|
41
|
-
- What the fix does
|
|
42
|
-
- How to verify
|
|
43
|
-
4. Present PR to user for approval
|
|
44
|
-
|
|
45
|
-
</process>
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
# Refactor / Migration Workflow
|
|
2
|
-
|
|
3
|
-
<template_meta>
|
|
4
|
-
name: refactor
|
|
5
|
-
version: 1
|
|
6
|
-
requires_project: false
|
|
7
|
-
artifact_dir: .gsd/workflows/refactors/
|
|
8
|
-
</template_meta>
|
|
9
|
-
|
|
10
|
-
<purpose>
|
|
11
|
-
Systematic code transformation with inventory-driven planning. Designed for
|
|
12
|
-
renames, restructures, pattern migrations, and API modernization. Executes in
|
|
13
|
-
waves to minimize risk and enable incremental verification.
|
|
14
|
-
</purpose>
|
|
15
|
-
|
|
16
|
-
<phases>
|
|
17
|
-
1. inventory — Catalog everything that needs to change
|
|
18
|
-
2. plan — Group changes into safe waves
|
|
19
|
-
3. migrate — Execute waves with verification between each
|
|
20
|
-
4. verify — Full regression testing and cleanup
|
|
21
|
-
</phases>
|
|
22
|
-
|
|
23
|
-
<process>
|
|
24
|
-
|
|
25
|
-
## Phase 1: Inventory
|
|
26
|
-
|
|
27
|
-
**Goal:** Know the full scope before changing anything.
|
|
28
|
-
|
|
29
|
-
1. **Scan the codebase:** Find all instances of what needs to change
|
|
30
|
-
- Files, functions, types, imports, tests, docs, config
|
|
31
|
-
- Use grep/glob to be exhaustive — don't rely on memory
|
|
32
|
-
2. **Categorize:** Group by type (source, test, config, docs)
|
|
33
|
-
3. **Identify dependencies:** What order must changes happen in?
|
|
34
|
-
4. **Produce:** Write `INVENTORY.md` with:
|
|
35
|
-
- Complete list of files/locations that need changes
|
|
36
|
-
- Dependency relationships
|
|
37
|
-
- Estimated scope (number of files, lines affected)
|
|
38
|
-
|
|
39
|
-
5. **Gate:** Review inventory with user. Confirm nothing is missing.
|
|
40
|
-
|
|
41
|
-
## Phase 2: Plan
|
|
42
|
-
|
|
43
|
-
**Goal:** Break the migration into safe, independently-verifiable waves.
|
|
44
|
-
|
|
45
|
-
1. **Define waves:** Group related changes so each wave:
|
|
46
|
-
- Leaves the codebase in a working state
|
|
47
|
-
- Can be committed and tested independently
|
|
48
|
-
- Handles dependencies (change the definition before the consumers)
|
|
49
|
-
2. **Typical wave structure:**
|
|
50
|
-
- Wave 1: Types/interfaces
|
|
51
|
-
- Wave 2: Core implementation
|
|
52
|
-
- Wave 3: Consumers/callers
|
|
53
|
-
- Wave 4: Tests
|
|
54
|
-
- Wave 5: Documentation and config
|
|
55
|
-
3. **Produce:** Write `PLAN.md` with waves and per-wave file lists
|
|
56
|
-
|
|
57
|
-
4. **Gate:** Confirm plan with user.
|
|
58
|
-
|
|
59
|
-
## Phase 3: Migrate
|
|
60
|
-
|
|
61
|
-
**Goal:** Execute waves one at a time with verification between each.
|
|
62
|
-
|
|
63
|
-
1. For each wave:
|
|
64
|
-
- Make the changes
|
|
65
|
-
- Run tests (at minimum, the build must pass)
|
|
66
|
-
- Commit: `refactor(<scope>): wave N — <description>`
|
|
67
|
-
2. If a wave introduces failures, fix them before moving to the next wave
|
|
68
|
-
3. If unexpected scope is discovered, update the inventory and plan
|
|
69
|
-
|
|
70
|
-
## Phase 4: Verify
|
|
71
|
-
|
|
72
|
-
**Goal:** Ensure the full refactor is complete and clean.
|
|
73
|
-
|
|
74
|
-
1. Run the complete test suite
|
|
75
|
-
2. Run the build
|
|
76
|
-
3. Run the linter — fix any new warnings
|
|
77
|
-
4. Search for any remnants of the old pattern (grep for old names/patterns)
|
|
78
|
-
5. **Produce:** Write `SUMMARY.md` with:
|
|
79
|
-
- What was changed and why
|
|
80
|
-
- Files modified (count and list)
|
|
81
|
-
- Any remaining follow-up items
|
|
82
|
-
|
|
83
|
-
</process>
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 1,
|
|
3
|
-
"templates": {
|
|
4
|
-
"full-project": {
|
|
5
|
-
"name": "Full Project",
|
|
6
|
-
"description": "Complete GSD workflow with roadmap, milestones, slices, and full ceremony",
|
|
7
|
-
"file": "full-project.md",
|
|
8
|
-
"phases": ["init", "discuss", "plan", "execute", "verify"],
|
|
9
|
-
"triggers": ["new project", "greenfield", "from scratch", "build an app", "create a new"],
|
|
10
|
-
"artifact_dir": ".gsd/",
|
|
11
|
-
"estimated_complexity": "high",
|
|
12
|
-
"requires_project": true
|
|
13
|
-
},
|
|
14
|
-
"bugfix": {
|
|
15
|
-
"name": "Bug Fix",
|
|
16
|
-
"description": "Triage, reproduce, fix, test, and ship a bug fix",
|
|
17
|
-
"file": "bugfix.md",
|
|
18
|
-
"phases": ["triage", "fix", "verify", "ship"],
|
|
19
|
-
"triggers": ["bug", "issue", "fix", "broken", "regression", "error", "crash", "failing", "github.com/*/issues/*"],
|
|
20
|
-
"artifact_dir": ".gsd/workflows/bugfixes/",
|
|
21
|
-
"estimated_complexity": "low",
|
|
22
|
-
"requires_project": false
|
|
23
|
-
},
|
|
24
|
-
"small-feature": {
|
|
25
|
-
"name": "Small Feature",
|
|
26
|
-
"description": "Lightweight feature development with optional discussion and research",
|
|
27
|
-
"file": "small-feature.md",
|
|
28
|
-
"phases": ["scope", "plan", "implement", "verify"],
|
|
29
|
-
"triggers": ["add", "feature", "implement", "build", "create", "new command", "new endpoint"],
|
|
30
|
-
"artifact_dir": ".gsd/workflows/features/",
|
|
31
|
-
"estimated_complexity": "medium",
|
|
32
|
-
"requires_project": false
|
|
33
|
-
},
|
|
34
|
-
"refactor": {
|
|
35
|
-
"name": "Refactor / Migration",
|
|
36
|
-
"description": "Systematic code transformation with inventory and wave-based execution",
|
|
37
|
-
"file": "refactor.md",
|
|
38
|
-
"phases": ["inventory", "plan", "migrate", "verify"],
|
|
39
|
-
"triggers": ["refactor", "migrate", "rename", "restructure", "move", "reorganize", "clean up"],
|
|
40
|
-
"artifact_dir": ".gsd/workflows/refactors/",
|
|
41
|
-
"estimated_complexity": "medium",
|
|
42
|
-
"requires_project": false
|
|
43
|
-
},
|
|
44
|
-
"spike": {
|
|
45
|
-
"name": "Research Spike",
|
|
46
|
-
"description": "Investigate a question, prototype, and document findings",
|
|
47
|
-
"file": "spike.md",
|
|
48
|
-
"phases": ["scope", "research", "synthesize"],
|
|
49
|
-
"triggers": ["research", "investigate", "explore", "spike", "compare", "evaluate", "should we", "what if", "how does"],
|
|
50
|
-
"artifact_dir": ".gsd/workflows/spikes/",
|
|
51
|
-
"estimated_complexity": "low",
|
|
52
|
-
"requires_project": false
|
|
53
|
-
},
|
|
54
|
-
"hotfix": {
|
|
55
|
-
"name": "Hotfix",
|
|
56
|
-
"description": "Minimal ceremony: fix the thing, test it, ship it",
|
|
57
|
-
"file": "hotfix.md",
|
|
58
|
-
"phases": ["fix", "ship"],
|
|
59
|
-
"triggers": ["hotfix", "urgent", "critical", "asap", "production down", "p0"],
|
|
60
|
-
"artifact_dir": null,
|
|
61
|
-
"estimated_complexity": "minimal",
|
|
62
|
-
"requires_project": false
|
|
63
|
-
},
|
|
64
|
-
"security-audit": {
|
|
65
|
-
"name": "Security Audit",
|
|
66
|
-
"description": "Scan for vulnerabilities, triage findings, remediate, and verify",
|
|
67
|
-
"file": "security-audit.md",
|
|
68
|
-
"phases": ["scan", "triage", "remediate", "re-scan"],
|
|
69
|
-
"triggers": ["security", "audit", "vulnerability", "owasp", "cve", "penetration", "hardening"],
|
|
70
|
-
"artifact_dir": ".gsd/workflows/audits/",
|
|
71
|
-
"estimated_complexity": "medium",
|
|
72
|
-
"requires_project": false
|
|
73
|
-
},
|
|
74
|
-
"dep-upgrade": {
|
|
75
|
-
"name": "Dependency Upgrade",
|
|
76
|
-
"description": "Assess impact, upgrade dependencies, fix breaking changes",
|
|
77
|
-
"file": "dep-upgrade.md",
|
|
78
|
-
"phases": ["assess", "upgrade", "fix", "verify"],
|
|
79
|
-
"triggers": ["upgrade", "update", "dependency", "deps", "bump", "outdated", "npm update", "renovate"],
|
|
80
|
-
"artifact_dir": ".gsd/workflows/upgrades/",
|
|
81
|
-
"estimated_complexity": "medium",
|
|
82
|
-
"requires_project": false
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
# Security Audit Workflow
|
|
2
|
-
|
|
3
|
-
<template_meta>
|
|
4
|
-
name: security-audit
|
|
5
|
-
version: 1
|
|
6
|
-
requires_project: false
|
|
7
|
-
artifact_dir: .gsd/workflows/audits/
|
|
8
|
-
</template_meta>
|
|
9
|
-
|
|
10
|
-
<purpose>
|
|
11
|
-
Systematic security review of the codebase. Scan for vulnerabilities, triage
|
|
12
|
-
findings by severity, remediate issues, and verify fixes. Covers OWASP Top 10,
|
|
13
|
-
dependency vulnerabilities, and project-specific security concerns.
|
|
14
|
-
</purpose>
|
|
15
|
-
|
|
16
|
-
<phases>
|
|
17
|
-
1. scan — Identify potential vulnerabilities
|
|
18
|
-
2. triage — Prioritize findings by severity and exploitability
|
|
19
|
-
3. remediate — Fix critical and high-severity issues
|
|
20
|
-
4. re-scan — Verify fixes and document remaining items
|
|
21
|
-
</phases>
|
|
22
|
-
|
|
23
|
-
<process>
|
|
24
|
-
|
|
25
|
-
## Phase 1: Scan
|
|
26
|
-
|
|
27
|
-
**Goal:** Identify potential security issues across the codebase.
|
|
28
|
-
|
|
29
|
-
1. **Dependency audit:** Run `npm audit` / `pip audit` / equivalent
|
|
30
|
-
2. **Code review for common vulnerabilities:**
|
|
31
|
-
- Injection (SQL, command, XSS)
|
|
32
|
-
- Authentication/authorization flaws
|
|
33
|
-
- Sensitive data exposure (hardcoded secrets, logs)
|
|
34
|
-
- Insecure configuration
|
|
35
|
-
- Missing input validation at boundaries
|
|
36
|
-
3. **Check security headers and CORS** (if web application)
|
|
37
|
-
4. **Review secrets management:** .env files, config, environment variables
|
|
38
|
-
5. **Produce:** Write `SCAN-RESULTS.md` with all findings
|
|
39
|
-
|
|
40
|
-
## Phase 2: Triage
|
|
41
|
-
|
|
42
|
-
**Goal:** Prioritize what to fix now vs later.
|
|
43
|
-
|
|
44
|
-
1. **Rate each finding:**
|
|
45
|
-
- Critical: exploitable, high impact, fix immediately
|
|
46
|
-
- High: likely exploitable, fix in this workflow
|
|
47
|
-
- Medium: lower risk, fix if time allows
|
|
48
|
-
- Low: informational, document for later
|
|
49
|
-
2. **Assess exploitability:** Is this theoretical or practically exploitable?
|
|
50
|
-
3. **Produce:** Update `SCAN-RESULTS.md` with severity ratings and triage decisions
|
|
51
|
-
|
|
52
|
-
4. **Gate:** Review triage with user. Agree on what to remediate now.
|
|
53
|
-
|
|
54
|
-
## Phase 3: Remediate
|
|
55
|
-
|
|
56
|
-
**Goal:** Fix critical and high-severity issues.
|
|
57
|
-
|
|
58
|
-
1. Fix each issue with proper testing
|
|
59
|
-
2. Commit each fix individually: `fix(security): <description>`
|
|
60
|
-
3. Don't introduce new functionality — security fixes only
|
|
61
|
-
|
|
62
|
-
## Phase 4: Re-scan
|
|
63
|
-
|
|
64
|
-
**Goal:** Verify fixes and document the final state.
|
|
65
|
-
|
|
66
|
-
1. Re-run the scans from Phase 1
|
|
67
|
-
2. Verify all targeted issues are resolved
|
|
68
|
-
3. **Produce:** Write `AUDIT-REPORT.md` with:
|
|
69
|
-
- Summary of findings and fixes
|
|
70
|
-
- Remaining medium/low items for future attention
|
|
71
|
-
- Recommendations for ongoing security practices
|
|
72
|
-
|
|
73
|
-
</process>
|