godpowers 1.6.14 → 1.6.15
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/CHANGELOG.md +37 -0
- package/README.md +23 -12
- package/RELEASE.md +60 -52
- package/SKILL.md +11 -1
- package/lib/planning-systems.js +479 -0
- package/lib/reverse-sync.js +7 -1
- package/lib/source-sync.js +220 -0
- package/package.json +3 -3
- package/routing/god-migrate.yaml +61 -0
- package/schema/state.v1.json +57 -0
- package/skills/god-doctor.md +1 -1
- package/skills/god-init.md +10 -0
- package/skills/god-migrate.md +146 -0
- package/skills/god-sync.md +7 -2
- package/skills/god-version.md +1 -1
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Source System Sync-Back
|
|
3
|
+
*
|
|
4
|
+
* Writes Godpowers progress back to detected GSD, BMAD, and Superpowers
|
|
5
|
+
* projects through managed companion files and optional managed fences.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const fs = require('fs');
|
|
9
|
+
const path = require('path');
|
|
10
|
+
const crypto = require('crypto');
|
|
11
|
+
|
|
12
|
+
const state = require('./state');
|
|
13
|
+
|
|
14
|
+
const FENCE_BEGIN = '<!-- godpowers:source-sync:begin -->';
|
|
15
|
+
const FENCE_END = '<!-- godpowers:source-sync:end -->';
|
|
16
|
+
|
|
17
|
+
const SYSTEM_TARGETS = {
|
|
18
|
+
gsd: {
|
|
19
|
+
companionCandidates: ['.planning/GODPOWERS-SYNC.md', '.gsd/GODPOWERS-SYNC.md'],
|
|
20
|
+
pointerCandidates: ['.planning/STATE.md']
|
|
21
|
+
},
|
|
22
|
+
bmad: {
|
|
23
|
+
companionCandidates: ['_bmad-output/GODPOWERS-SYNC.md', '.bmad/GODPOWERS-SYNC.md'],
|
|
24
|
+
pointerCandidates: ['_bmad-output/project-context.md']
|
|
25
|
+
},
|
|
26
|
+
superpowers: {
|
|
27
|
+
companionCandidates: ['docs/superpowers/GODPOWERS-SYNC.md', '.superpowers/GODPOWERS-SYNC.md'],
|
|
28
|
+
pointerCandidates: []
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
function rel(projectRoot, absPath) {
|
|
33
|
+
return path.relative(projectRoot, absPath).split(path.sep).join('/');
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function sha(input) {
|
|
37
|
+
return `sha256:${crypto.createHash('sha256').update(input).digest('hex')}`;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function readFenced(filePath) {
|
|
41
|
+
if (!fs.existsSync(filePath)) {
|
|
42
|
+
return { exists: false, before: '', fenced: '', after: '' };
|
|
43
|
+
}
|
|
44
|
+
const content = fs.readFileSync(filePath, 'utf8');
|
|
45
|
+
const beginIdx = content.indexOf(FENCE_BEGIN);
|
|
46
|
+
const endIdx = content.indexOf(FENCE_END);
|
|
47
|
+
if (beginIdx === -1 || endIdx === -1 || endIdx < beginIdx) {
|
|
48
|
+
return { exists: true, before: content, fenced: '', after: '' };
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
exists: true,
|
|
52
|
+
before: content.slice(0, beginIdx),
|
|
53
|
+
fenced: content.slice(beginIdx + FENCE_BEGIN.length, endIdx),
|
|
54
|
+
after: content.slice(endIdx + FENCE_END.length)
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function writeFenced(filePath, sectionContent) {
|
|
59
|
+
const parsed = readFenced(filePath);
|
|
60
|
+
const block = `${FENCE_BEGIN}\n${sectionContent}\n${FENCE_END}`;
|
|
61
|
+
let next;
|
|
62
|
+
if (!parsed.exists) {
|
|
63
|
+
next = `${block}\n`;
|
|
64
|
+
} else if (parsed.fenced === '') {
|
|
65
|
+
const sep = parsed.before.endsWith('\n\n') ? '' : (parsed.before.endsWith('\n') ? '\n' : '\n\n');
|
|
66
|
+
next = `${parsed.before}${sep}${block}\n`;
|
|
67
|
+
} else {
|
|
68
|
+
next = `${parsed.before}${block}${parsed.after}`;
|
|
69
|
+
}
|
|
70
|
+
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
71
|
+
fs.writeFileSync(filePath, next);
|
|
72
|
+
return {
|
|
73
|
+
written: true,
|
|
74
|
+
hadFenceBefore: parsed.exists && parsed.fenced !== ''
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function firstExisting(projectRoot, candidates) {
|
|
79
|
+
for (const candidate of candidates) {
|
|
80
|
+
if (fs.existsSync(path.join(projectRoot, candidate))) return candidate;
|
|
81
|
+
}
|
|
82
|
+
return candidates[0];
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function readArtifact(projectRoot, relPath) {
|
|
86
|
+
const full = path.join(projectRoot, relPath);
|
|
87
|
+
if (!fs.existsSync(full)) return null;
|
|
88
|
+
return fs.readFileSync(full, 'utf8');
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function summarizeArtifact(projectRoot, relPath, label) {
|
|
92
|
+
const content = readArtifact(projectRoot, relPath);
|
|
93
|
+
if (!content) return `- [HYPOTHESIS] ${label}: missing.`;
|
|
94
|
+
const headings = content
|
|
95
|
+
.split('\n')
|
|
96
|
+
.map((line) => line.trim())
|
|
97
|
+
.filter((line) => /^#{1,3}\s+/.test(line))
|
|
98
|
+
.map((line) => line.replace(/^#{1,3}\s+/, ''))
|
|
99
|
+
.slice(0, 6);
|
|
100
|
+
if (headings.length === 0) {
|
|
101
|
+
return `- [HYPOTHESIS] ${label}: present at ${relPath}.`;
|
|
102
|
+
}
|
|
103
|
+
return `- [HYPOTHESIS] ${label}: ${headings.join('; ')}. Source: ${relPath}.`;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function progressLines(projectRoot) {
|
|
107
|
+
const current = state.read(projectRoot);
|
|
108
|
+
const lines = [];
|
|
109
|
+
lines.push('# Godpowers Sync-Back');
|
|
110
|
+
lines.push('');
|
|
111
|
+
lines.push('- [DECISION] This file is managed by Godpowers source sync.');
|
|
112
|
+
lines.push('- [DECISION] It lets the prior planning system see current Godpowers progress without Godpowers rewriting source-system documents.');
|
|
113
|
+
lines.push('- [DECISION] Edit Godpowers artifacts, then run `/god-sync` or `/god-migrate --sync-back` to refresh this file.');
|
|
114
|
+
lines.push('');
|
|
115
|
+
|
|
116
|
+
if (current) {
|
|
117
|
+
const summary = state.progressSummary(current);
|
|
118
|
+
lines.push('## Progress');
|
|
119
|
+
lines.push('');
|
|
120
|
+
lines.push(`- [HYPOTHESIS] Godpowers progress is ${summary.percent}% with ${summary.completed} of ${summary.total} steps complete.`);
|
|
121
|
+
if (summary.current) {
|
|
122
|
+
lines.push(`- [HYPOTHESIS] Current Godpowers step is ${summary.current.tierLabel}: ${summary.current.subStepLabel} with status ${summary.current.status}.`);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
lines.push('');
|
|
127
|
+
lines.push('## Current Godpowers Artifacts');
|
|
128
|
+
lines.push('');
|
|
129
|
+
lines.push(summarizeArtifact(projectRoot, '.godpowers/prd/PRD.md', 'PRD'));
|
|
130
|
+
lines.push(summarizeArtifact(projectRoot, '.godpowers/arch/ARCH.md', 'Architecture'));
|
|
131
|
+
lines.push(summarizeArtifact(projectRoot, '.godpowers/roadmap/ROADMAP.md', 'Roadmap'));
|
|
132
|
+
lines.push(summarizeArtifact(projectRoot, '.godpowers/stack/DECISION.md', 'Stack'));
|
|
133
|
+
lines.push(summarizeArtifact(projectRoot, '.godpowers/build/STATE.md', 'Build state'));
|
|
134
|
+
lines.push('');
|
|
135
|
+
lines.push('## Return Path');
|
|
136
|
+
lines.push('');
|
|
137
|
+
lines.push('- [DECISION] If the project returns to GSD, BMAD, or Superpowers, use this file as a migration note rather than treating it as a native source-system artifact.');
|
|
138
|
+
lines.push('- [OPEN QUESTION] Confirm which Godpowers decisions should be copied into native source-system documents before switching systems. Owner: user. Due: before switching systems.');
|
|
139
|
+
lines.push('');
|
|
140
|
+
return lines.join('\n');
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function pointerContent(companionPath) {
|
|
144
|
+
return [
|
|
145
|
+
'## Godpowers Sync-Back Pointer',
|
|
146
|
+
'',
|
|
147
|
+
`- [DECISION] Current Godpowers progress is summarized in \`${companionPath}\`.`,
|
|
148
|
+
'- [DECISION] This fenced pointer is managed by Godpowers and may be refreshed by `/god-sync`.',
|
|
149
|
+
''
|
|
150
|
+
].join('\n');
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function updateStateSync(projectRoot, results, contentHash) {
|
|
154
|
+
const current = state.read(projectRoot);
|
|
155
|
+
if (!current || !Array.isArray(current['source-systems'])) return null;
|
|
156
|
+
const now = new Date().toISOString();
|
|
157
|
+
const byId = new Set(results.map((result) => result.system));
|
|
158
|
+
current['source-systems'] = current['source-systems'].map((system) => {
|
|
159
|
+
if (!byId.has(system.id)) return system;
|
|
160
|
+
return {
|
|
161
|
+
...system,
|
|
162
|
+
'last-sync-back-hash': contentHash,
|
|
163
|
+
'last-sync-back-at': now
|
|
164
|
+
};
|
|
165
|
+
});
|
|
166
|
+
state.write(projectRoot, current);
|
|
167
|
+
return current;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function run(projectRoot, opts = {}) {
|
|
171
|
+
const current = state.read(projectRoot);
|
|
172
|
+
const configured = current && Array.isArray(current['source-systems'])
|
|
173
|
+
? current['source-systems']
|
|
174
|
+
: [];
|
|
175
|
+
const systems = configured.filter((system) => system['sync-back-enabled'] !== false);
|
|
176
|
+
const content = progressLines(projectRoot);
|
|
177
|
+
const contentHash = sha(content);
|
|
178
|
+
const results = [];
|
|
179
|
+
|
|
180
|
+
for (const system of systems) {
|
|
181
|
+
const targets = SYSTEM_TARGETS[system.id];
|
|
182
|
+
if (!targets) continue;
|
|
183
|
+
const companionRel = firstExisting(projectRoot, targets.companionCandidates);
|
|
184
|
+
const companionFull = path.join(projectRoot, companionRel);
|
|
185
|
+
const companionResult = writeFenced(companionFull, content);
|
|
186
|
+
const pointerResults = [];
|
|
187
|
+
|
|
188
|
+
for (const pointerRel of targets.pointerCandidates) {
|
|
189
|
+
const pointerFull = path.join(projectRoot, pointerRel);
|
|
190
|
+
if (!fs.existsSync(pointerFull)) continue;
|
|
191
|
+
const pointerResult = writeFenced(pointerFull, pointerContent(companionRel));
|
|
192
|
+
pointerResults.push({ path: pointerRel, ...pointerResult });
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
results.push({
|
|
196
|
+
system: system.id,
|
|
197
|
+
name: system.name,
|
|
198
|
+
companion: companionRel,
|
|
199
|
+
companionWritten: companionResult.written,
|
|
200
|
+
pointers: pointerResults
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
const nextState = updateStateSync(projectRoot, results, contentHash);
|
|
205
|
+
return {
|
|
206
|
+
hash: contentHash,
|
|
207
|
+
results,
|
|
208
|
+
state: nextState
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
module.exports = {
|
|
213
|
+
run,
|
|
214
|
+
progressLines,
|
|
215
|
+
readFenced,
|
|
216
|
+
writeFenced,
|
|
217
|
+
FENCE_BEGIN,
|
|
218
|
+
FENCE_END,
|
|
219
|
+
SYSTEM_TARGETS
|
|
220
|
+
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "godpowers",
|
|
3
|
-
"version": "1.6.
|
|
4
|
-
"description": "AI-powered development system:
|
|
3
|
+
"version": "1.6.15",
|
|
4
|
+
"description": "AI-powered development system: 109 slash commands and 40 specialist agents that take a project from raw idea to hardened production. Runs inside Claude Code, Codex, Cursor, Windsurf, Gemini, and 10+ other AI coding tools.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"godpowers": "./bin/install.js"
|
|
7
7
|
},
|
|
8
8
|
"scripts": {
|
|
9
|
-
"test": "node scripts/validate-skills.js && node scripts/test-doc-surface-counts.js && bash scripts/smoke.sh && node scripts/test-runtime.js && node scripts/test-router.js && node scripts/test-recipes.js && node scripts/test-context-writer.js && node scripts/test-pillars.js && node scripts/test-artifact-linter.js && node scripts/test-artifact-diff.js && node scripts/test-design-foundation.js && node scripts/test-linkage.js && node scripts/test-impact.js && node scripts/test-reverse-sync.js && node scripts/test-integration.js && node scripts/test-cross-artifact.js && node scripts/test-awesome-design.js && node scripts/test-skillui-bridge.js && node scripts/test-runtime-verification.js && node scripts/test-agent-browser.js && node scripts/test-mode-d.js && node scripts/test-runtime-heuristics.js && node scripts/test-agent-validator.js && node scripts/test-story-validator.js && node scripts/test-state.js && node scripts/test-dashboard.js && node scripts/test-automation-providers.js && node scripts/test-intent.js && node scripts/test-events.js && node scripts/test-golden-artifacts.js && node scripts/test-install-smoke.js && node scripts/test-checkpoint.js && node scripts/test-extensions.js && node scripts/test-event-reader.js && node scripts/test-state-lock.js && node scripts/test-cost-saver.js && node scripts/test-budget-onoff.js && node scripts/test-workflow-runner.js && npm run test:e2e && node scripts/test-otel-exporter.js && node scripts/test-extensions-publish.js",
|
|
9
|
+
"test": "node scripts/validate-skills.js && node scripts/test-doc-surface-counts.js && bash scripts/smoke.sh && node scripts/test-runtime.js && node scripts/test-router.js && node scripts/test-recipes.js && node scripts/test-context-writer.js && node scripts/test-pillars.js && node scripts/test-artifact-linter.js && node scripts/test-artifact-diff.js && node scripts/test-design-foundation.js && node scripts/test-linkage.js && node scripts/test-impact.js && node scripts/test-reverse-sync.js && node scripts/test-planning-systems.js && node scripts/test-integration.js && node scripts/test-cross-artifact.js && node scripts/test-awesome-design.js && node scripts/test-skillui-bridge.js && node scripts/test-runtime-verification.js && node scripts/test-agent-browser.js && node scripts/test-mode-d.js && node scripts/test-runtime-heuristics.js && node scripts/test-agent-validator.js && node scripts/test-story-validator.js && node scripts/test-state.js && node scripts/test-dashboard.js && node scripts/test-automation-providers.js && node scripts/test-intent.js && node scripts/test-events.js && node scripts/test-golden-artifacts.js && node scripts/test-install-smoke.js && node scripts/test-checkpoint.js && node scripts/test-extensions.js && node scripts/test-event-reader.js && node scripts/test-state-lock.js && node scripts/test-cost-saver.js && node scripts/test-budget-onoff.js && node scripts/test-workflow-runner.js && npm run test:e2e && node scripts/test-otel-exporter.js && node scripts/test-extensions-publish.js",
|
|
10
10
|
"prepublishOnly": "npm test",
|
|
11
11
|
"validate-skills": "node scripts/validate-skills.js",
|
|
12
12
|
"test:surface": "node scripts/test-doc-surface-counts.js",
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
apiVersion: godpowers/v1
|
|
2
|
+
kind: CommandRouting
|
|
3
|
+
metadata:
|
|
4
|
+
command: /god-migrate
|
|
5
|
+
description: Detect and migrate GSD, BMAD, and Superpowers planning context
|
|
6
|
+
tier: 0
|
|
7
|
+
|
|
8
|
+
prerequisites:
|
|
9
|
+
required: []
|
|
10
|
+
recommended:
|
|
11
|
+
- command: /god-init
|
|
12
|
+
when: .godpowers-state-missing
|
|
13
|
+
|
|
14
|
+
execution:
|
|
15
|
+
spawns: []
|
|
16
|
+
context: current
|
|
17
|
+
reads:
|
|
18
|
+
- .planning/**
|
|
19
|
+
- .gsd/**
|
|
20
|
+
- _bmad-output/**
|
|
21
|
+
- .bmad/**
|
|
22
|
+
- docs/superpowers/**
|
|
23
|
+
writes:
|
|
24
|
+
- .godpowers/prep/IMPORTED-CONTEXT.md
|
|
25
|
+
- .godpowers/prd/PRD.md
|
|
26
|
+
- .godpowers/arch/ARCH.md
|
|
27
|
+
- .godpowers/roadmap/ROADMAP.md
|
|
28
|
+
- .godpowers/stack/DECISION.md
|
|
29
|
+
- .godpowers/build/STATE.md
|
|
30
|
+
- .godpowers/state.json
|
|
31
|
+
- .planning/GODPOWERS-SYNC.md
|
|
32
|
+
- .gsd/GODPOWERS-SYNC.md
|
|
33
|
+
- _bmad-output/GODPOWERS-SYNC.md
|
|
34
|
+
- .bmad/GODPOWERS-SYNC.md
|
|
35
|
+
- docs/superpowers/GODPOWERS-SYNC.md
|
|
36
|
+
local-runtime:
|
|
37
|
+
- lib/planning-systems.importPlanningContext
|
|
38
|
+
- lib/source-sync.run
|
|
39
|
+
conditional-spawns:
|
|
40
|
+
- agent: god-greenfieldifier
|
|
41
|
+
when: low-confidence-or-conflicting-import
|
|
42
|
+
|
|
43
|
+
standards:
|
|
44
|
+
gate-on-failure: pause-for-user
|
|
45
|
+
|
|
46
|
+
success-path:
|
|
47
|
+
next-recommended: /god-audit
|
|
48
|
+
alternatives:
|
|
49
|
+
- command: /god-prd
|
|
50
|
+
when: imported-prd-seed-needs-hardening
|
|
51
|
+
- command: /god-roadmap
|
|
52
|
+
when: imported-roadmap-seed-needs-hardening
|
|
53
|
+
- command: /god-sync
|
|
54
|
+
when: user-only-wants-sync-back
|
|
55
|
+
|
|
56
|
+
failure-path:
|
|
57
|
+
on-error: /god-doctor
|
|
58
|
+
|
|
59
|
+
endoff:
|
|
60
|
+
state-update: source-systems imported and sync-back timestamps updated
|
|
61
|
+
events: [migration.detected, artifact.imported, source-sync.updated]
|
package/schema/state.v1.json
CHANGED
|
@@ -74,6 +74,63 @@
|
|
|
74
74
|
"description": "Slot for linkage map summary. Authoritative file is .godpowers/linkage.json.",
|
|
75
75
|
"additionalProperties": true
|
|
76
76
|
},
|
|
77
|
+
"source-systems": {
|
|
78
|
+
"type": "array",
|
|
79
|
+
"description": "Detected external planning systems imported into Godpowers and eligible for managed sync-back.",
|
|
80
|
+
"items": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"required": ["id", "name", "confidence", "files", "import-hash"],
|
|
83
|
+
"properties": {
|
|
84
|
+
"id": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"enum": ["gsd", "bmad", "superpowers", "other"]
|
|
87
|
+
},
|
|
88
|
+
"name": { "type": "string" },
|
|
89
|
+
"confidence": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"enum": ["high", "medium", "low"]
|
|
92
|
+
},
|
|
93
|
+
"markers": {
|
|
94
|
+
"type": "array",
|
|
95
|
+
"items": { "type": "string" }
|
|
96
|
+
},
|
|
97
|
+
"files": {
|
|
98
|
+
"type": "array",
|
|
99
|
+
"items": { "type": "string" }
|
|
100
|
+
},
|
|
101
|
+
"import-hash": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"pattern": "^sha256:[a-f0-9]{64}$"
|
|
104
|
+
},
|
|
105
|
+
"imported-at": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"format": "date-time"
|
|
108
|
+
},
|
|
109
|
+
"sync-back-enabled": {
|
|
110
|
+
"type": "boolean",
|
|
111
|
+
"default": true
|
|
112
|
+
},
|
|
113
|
+
"last-sync-back-hash": {
|
|
114
|
+
"anyOf": [
|
|
115
|
+
{
|
|
116
|
+
"type": "string",
|
|
117
|
+
"pattern": "^sha256:[a-f0-9]{64}$"
|
|
118
|
+
},
|
|
119
|
+
{ "type": "null" }
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
"last-sync-back-at": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"format": "date-time"
|
|
125
|
+
},
|
|
126
|
+
"conflict-count": {
|
|
127
|
+
"type": "integer",
|
|
128
|
+
"minimum": 0
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"additionalProperties": false
|
|
132
|
+
}
|
|
133
|
+
},
|
|
77
134
|
"yolo-decisions": {
|
|
78
135
|
"type": "array",
|
|
79
136
|
"description": "Auto-decisions made under --yolo. Mirrored to YOLO-DECISIONS.md.",
|
package/skills/god-doctor.md
CHANGED
|
@@ -46,7 +46,7 @@ Plain-text report grouped by severity:
|
|
|
46
46
|
GODPOWERS DOCTOR
|
|
47
47
|
|
|
48
48
|
Install: claude (~/.claude/)
|
|
49
|
-
[OK]
|
|
49
|
+
[OK] 109 skills installed
|
|
50
50
|
[OK] 40 agents installed
|
|
51
51
|
[OK] VERSION matches (1.6.6)
|
|
52
52
|
[WARN] routing/god-doctor.yaml exists but skill file did not until now
|
package/skills/god-init.md
CHANGED
|
@@ -44,6 +44,13 @@ needs to specify a mode.
|
|
|
44
44
|
- If any are detected, summarize useful signals into
|
|
45
45
|
`.godpowers/prep/IMPORTED-CONTEXT.md` as preparation context.
|
|
46
46
|
Do not treat external planning-system files as source of truth.
|
|
47
|
+
- Auto-invoke `lib/planning-systems.importPlanningContext(projectRoot)`
|
|
48
|
+
when GSD, Superpowers, or BMAD context is detected. Report this as
|
|
49
|
+
`Agent: none, local runtime only`.
|
|
50
|
+
- If import confidence is low, more than one source system appears to
|
|
51
|
+
conflict, or canonical Godpowers seed artifacts cannot be created from
|
|
52
|
+
available evidence, spawn `god-greenfieldifier` to produce a controlled
|
|
53
|
+
migration plan before rewriting any canonical artifact.
|
|
47
54
|
- Detect whether early design preparation is warranted:
|
|
48
55
|
- UI frameworks or app models: React, Next, Vue, Nuxt, Svelte,
|
|
49
56
|
SvelteKit, Astro, Remix, Angular, Solid, Flutter, Electron, Tauri
|
|
@@ -109,6 +116,9 @@ needs to specify a mode.
|
|
|
109
116
|
- Write `.godpowers/prep/INITIAL-FINDINGS.md`
|
|
110
117
|
- Run planning-system context detection for GSD, Superpowers, and BMAD
|
|
111
118
|
- Write `.godpowers/prep/IMPORTED-CONTEXT.md` when useful context exists
|
|
119
|
+
- Run automatic planning-system import through
|
|
120
|
+
`lib/planning-systems.importPlanningContext(projectRoot)` and record
|
|
121
|
+
detected source systems under `state.json` `source-systems`
|
|
112
122
|
- Initialize native Pillars context and record Pillars health in
|
|
113
123
|
`INITIAL-FINDINGS.md`
|
|
114
124
|
- For brownfield: schedule preflight before archaeology + reconstruction
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: god-migrate
|
|
3
|
+
description: |
|
|
4
|
+
Detect GSD, BMAD, and Superpowers planning systems, migrate useful context
|
|
5
|
+
into Godpowers prep and seed artifacts, and sync Godpowers progress back to
|
|
6
|
+
the prior system through managed companion files.
|
|
7
|
+
|
|
8
|
+
Triggers on: "god migrate", "/god-migrate", "migrate from gsd",
|
|
9
|
+
"migrate from bmad", "migrate from superpowers", "sync back to gsd",
|
|
10
|
+
"sync back to bmad", "sync back to superpowers"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# /god-migrate
|
|
14
|
+
|
|
15
|
+
Detect and migrate adjacent planning systems into Godpowers.
|
|
16
|
+
|
|
17
|
+
## When To Use
|
|
18
|
+
|
|
19
|
+
- A project already has GSD `.planning/` or `.gsd/` context.
|
|
20
|
+
- A project already has BMAD `_bmad/`, `_bmad-output/`, `.bmad-core/`, or
|
|
21
|
+
`.bmad/` context.
|
|
22
|
+
- A project already has Superpowers specs, plans, or project-local skills.
|
|
23
|
+
- The user wants a reversible migration path into Godpowers.
|
|
24
|
+
- The user wants current Godpowers progress written back to the prior planning
|
|
25
|
+
system before returning to it.
|
|
26
|
+
|
|
27
|
+
## Auto-Invoke Contract
|
|
28
|
+
|
|
29
|
+
`/god-init` auto-invokes the import path when it detects GSD, BMAD, or
|
|
30
|
+
Superpowers context. It must show this visible status card:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
Auto-invoked:
|
|
34
|
+
Trigger: /god-init planning-system detection
|
|
35
|
+
Agent: none, local runtime only
|
|
36
|
+
Local syncs:
|
|
37
|
+
+ planning-system-import: <detected systems, written seeds, or no-op>
|
|
38
|
+
Artifacts: .godpowers/prep/IMPORTED-CONTEXT.md and optional seed artifacts
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`/god-sync` auto-invokes sync-back when `state.json` contains enabled
|
|
42
|
+
`source-systems` entries. It must show this visible status card:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
Auto-invoked:
|
|
46
|
+
Trigger: /god-sync source-system sync-back
|
|
47
|
+
Agent: none, local runtime only
|
|
48
|
+
Local syncs:
|
|
49
|
+
+ source-sync: <written companion files, pointer fences, or no-op>
|
|
50
|
+
Artifacts: <.planning/GODPOWERS-SYNC.md, _bmad-output/GODPOWERS-SYNC.md, docs/superpowers/GODPOWERS-SYNC.md>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
If the import has low confidence, multiple conflicting systems, or missing
|
|
54
|
+
canonical Godpowers seeds after import, spawn `god-greenfieldifier` with a
|
|
55
|
+
fresh context and this instruction:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
This project has imported external planning-system context. Read
|
|
59
|
+
.godpowers/prep/IMPORTED-CONTEXT.md and .godpowers/state.json. Produce a
|
|
60
|
+
controlled migration plan that converts imported hypotheses into Godpowers
|
|
61
|
+
artifacts without overwriting source-system files outside managed fences.
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Runtime Calls
|
|
65
|
+
|
|
66
|
+
### Import
|
|
67
|
+
|
|
68
|
+
Call:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
lib/planning-systems.importPlanningContext(projectRoot, {
|
|
72
|
+
syncBackEnabled: true
|
|
73
|
+
})
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
This:
|
|
77
|
+
- detects GSD, BMAD, and Superpowers sources
|
|
78
|
+
- writes `.godpowers/prep/IMPORTED-CONTEXT.md`
|
|
79
|
+
- writes missing Godpowers seed artifacts when enough source evidence exists
|
|
80
|
+
- marks those seed artifacts as `imported` in `state.json`
|
|
81
|
+
- records detected systems under `state.json` `source-systems`
|
|
82
|
+
|
|
83
|
+
### Sync-Back
|
|
84
|
+
|
|
85
|
+
Call:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
lib/source-sync.run(projectRoot)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
This:
|
|
92
|
+
- reads current Godpowers state and artifacts
|
|
93
|
+
- writes a managed companion file in the prior planning system
|
|
94
|
+
- writes pointer fences only when a safe native state file already exists
|
|
95
|
+
- updates `last-sync-back-hash` and `last-sync-back-at` in `state.json`
|
|
96
|
+
|
|
97
|
+
## Source Mapping
|
|
98
|
+
|
|
99
|
+
| Source system | Import evidence | Godpowers destination | Sync-back destination |
|
|
100
|
+
|---|---|---|---|
|
|
101
|
+
| GSD | `.planning/PROJECT.md`, `REQUIREMENTS.md`, `ROADMAP.md`, `STATE.md`, phase files | prep context, PRD seed, roadmap seed, build-state seed | `.planning/GODPOWERS-SYNC.md` |
|
|
102
|
+
| GSD 2 | `.gsd/` files | prep context and seeds when source files are readable | `.gsd/GODPOWERS-SYNC.md` |
|
|
103
|
+
| BMAD | `_bmad-output/planning-artifacts/PRD.md`, `architecture.md`, epics, stories, sprint status | prep context, PRD seed, arch seed, roadmap seed | `_bmad-output/GODPOWERS-SYNC.md` |
|
|
104
|
+
| Superpowers | `docs/superpowers/specs/*.md`, `docs/superpowers/plans/*.md`, project-local skills | prep context, PRD seed, roadmap seed, build-state seed | `docs/superpowers/GODPOWERS-SYNC.md` |
|
|
105
|
+
|
|
106
|
+
## Guardrails
|
|
107
|
+
|
|
108
|
+
- Do not delete, move, or rewrite GSD, BMAD, or Superpowers files.
|
|
109
|
+
- Do not treat imported content as authoritative until a Godpowers artifact or
|
|
110
|
+
the user confirms it.
|
|
111
|
+
- Do not write outside Godpowers-owned fences in source-system files.
|
|
112
|
+
- Do not overwrite existing Godpowers artifacts unless the user passes
|
|
113
|
+
`--force` and the command shows a diff or clear file list first.
|
|
114
|
+
- If conflicts appear, pause or spawn `god-greenfieldifier` for a controlled
|
|
115
|
+
migration plan.
|
|
116
|
+
|
|
117
|
+
## Output
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
Migration complete.
|
|
121
|
+
|
|
122
|
+
Detected:
|
|
123
|
+
+ GSD: high confidence, 12 files
|
|
124
|
+
+ BMAD: not detected
|
|
125
|
+
+ Superpowers: medium confidence, 2 files
|
|
126
|
+
|
|
127
|
+
Imported:
|
|
128
|
+
+ .godpowers/prep/IMPORTED-CONTEXT.md
|
|
129
|
+
+ .godpowers/prd/PRD.md (imported seed)
|
|
130
|
+
+ .godpowers/roadmap/ROADMAP.md (imported seed)
|
|
131
|
+
|
|
132
|
+
Sync-back:
|
|
133
|
+
+ .planning/GODPOWERS-SYNC.md
|
|
134
|
+
|
|
135
|
+
Auto-spawn:
|
|
136
|
+
+ god-greenfieldifier: skipped, import confidence high and no conflicts
|
|
137
|
+
|
|
138
|
+
Suggested next:
|
|
139
|
+
/god-audit to score imported seeds before treating them as authoritative.
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Locking
|
|
143
|
+
|
|
144
|
+
Acquire the state lock with scope `migration.source-systems` before writing
|
|
145
|
+
`.godpowers/prep/IMPORTED-CONTEXT.md`, seed artifacts, source-system companion
|
|
146
|
+
files, or `state.json`.
|
package/skills/god-sync.md
CHANGED
|
@@ -32,7 +32,11 @@ User runs `/god-sync` after manual changes. Useful for:
|
|
|
32
32
|
2. Call `lib/pillars.pillarizeExisting(projectRoot)` if Pillars is absent or
|
|
33
33
|
partial, because every Godpowers project must also carry native Pillars
|
|
34
34
|
context.
|
|
35
|
-
3.
|
|
35
|
+
3. If `state.json` contains enabled `source-systems`, auto-invoke
|
|
36
|
+
`lib/source-sync.run(projectRoot)` so current Godpowers progress is written
|
|
37
|
+
back to imported GSD, BMAD, or Superpowers companion files. Report this as
|
|
38
|
+
`Agent: none, local runtime only`.
|
|
39
|
+
4. Spawn god-updater in fresh context with:
|
|
36
40
|
- The reconciliation verdict (if available from a prior /god-reconcile)
|
|
37
41
|
- Or: re-run reconciliation against current state to detect what changed
|
|
38
42
|
- Recent commits for context
|
|
@@ -44,7 +48,7 @@ Auto-invoked:
|
|
|
44
48
|
Trigger: <manual /god-sync, recipe closeout, /god-mode final sync, or other source>
|
|
45
49
|
Agent: god-updater
|
|
46
50
|
Local syncs:
|
|
47
|
-
- pending: reverse-sync, pillars-sync, checkpoint-sync, context-refresh
|
|
51
|
+
- pending: reverse-sync, source-sync, pillars-sync, checkpoint-sync, context-refresh
|
|
48
52
|
Artifacts: pending
|
|
49
53
|
Log: .godpowers/SYNC-LOG.md
|
|
50
54
|
```
|
|
@@ -69,6 +73,7 @@ Sync status:
|
|
|
69
73
|
Agent: god-updater spawned
|
|
70
74
|
Local syncs:
|
|
71
75
|
+ reverse-sync: <scanned N files, updated M footers, populated K review items>
|
|
76
|
+
+ source-sync: <written GSD/BMAD/Superpowers companion files, no-op, or skipped>
|
|
72
77
|
+ pillars-sync: <updated N pillar files, no-op, or proposed>
|
|
73
78
|
+ checkpoint-sync: <CHECKPOINT.md updated or skipped>
|
|
74
79
|
+ context-refresh: <updated AGENTS.md/tool pointers, no-op, or skipped by setting>
|
package/skills/god-version.md
CHANGED
|
@@ -16,7 +16,7 @@ Print version and a short capability summary.
|
|
|
16
16
|
```
|
|
17
17
|
Godpowers v1.6.6
|
|
18
18
|
Install: /Users/.../.claude/ (matches package.json)
|
|
19
|
-
Surface:
|
|
19
|
+
Surface: 109 skills, 40 agents, 13 workflows, 36 recipes
|
|
20
20
|
Schema: intent.v1, state.v1, events.v1, workflow.v1, routing.v1, recipe.v1
|
|
21
21
|
External integrations available: impeccable, agent-browser (others lazy)
|
|
22
22
|
```
|