godpowers 2.4.2 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +22 -6
  3. package/RELEASE.md +29 -35
  4. package/SKILL.md +5 -0
  5. package/agents/god-orchestrator.md +31 -1255
  6. package/bin/install.js +16 -107
  7. package/fixtures/gate/build-pass/.godpowers/build/STATE.md +10 -0
  8. package/fixtures/gate/harden-pass/.godpowers/harden/FINDINGS.md +14 -0
  9. package/fixtures/gate/repo-pass/.godpowers/repo/AUDIT.md +9 -0
  10. package/lib/artifact-map.js +60 -0
  11. package/lib/cli-dispatch.js +162 -0
  12. package/lib/command-families.js +10 -2
  13. package/lib/dashboard.js +3 -2
  14. package/lib/gate.js +271 -0
  15. package/lib/installer-args.js +11 -1
  16. package/lib/route-quality-sync.js +38 -0
  17. package/package.json +3 -2
  18. package/references/orchestration/GOD-MODE-RUNBOOK.md +19 -0
  19. package/references/orchestration/GOD-NEXT-RUNBOOK.md +32 -0
  20. package/references/orchestration/GOD-ORCHESTRATOR-RUNBOOK.md +1259 -0
  21. package/references/orchestration/README.md +6 -0
  22. package/references/shared/DASHBOARD-CONTRACT.md +93 -0
  23. package/references/shared/LOCKING.md +15 -0
  24. package/references/shared/README.md +2 -0
  25. package/routing/god-arch.yaml +1 -0
  26. package/routing/god-build.yaml +1 -0
  27. package/routing/god-design.yaml +1 -0
  28. package/routing/god-harden.yaml +1 -0
  29. package/routing/god-prd.yaml +1 -0
  30. package/routing/god-repo.yaml +1 -0
  31. package/routing/god-roadmap-check.yaml +1 -1
  32. package/routing/god-roadmap.yaml +1 -0
  33. package/routing/god-stack.yaml +1 -0
  34. package/skills/god-arch.md +3 -13
  35. package/skills/god-build.md +5 -14
  36. package/skills/god-deploy.md +1 -12
  37. package/skills/god-design.md +9 -12
  38. package/skills/god-feature.md +1 -12
  39. package/skills/god-harden.md +3 -13
  40. package/skills/god-hotfix.md +1 -12
  41. package/skills/god-launch.md +1 -12
  42. package/skills/god-link.md +1 -12
  43. package/skills/god-migrate.md +1 -3
  44. package/skills/god-mode.md +4 -0
  45. package/skills/god-next.md +34 -410
  46. package/skills/god-observe.md +1 -12
  47. package/skills/god-prd.md +3 -13
  48. package/skills/god-redo.md +1 -12
  49. package/skills/god-refactor.md +1 -12
  50. package/skills/god-repair.md +1 -12
  51. package/skills/god-repo.md +3 -13
  52. package/skills/god-restore.md +1 -12
  53. package/skills/god-roadmap-check.md +5 -0
  54. package/skills/god-roadmap.md +3 -13
  55. package/skills/god-rollback.md +1 -12
  56. package/skills/god-scan.md +1 -12
  57. package/skills/god-skip.md +1 -12
  58. package/skills/god-stack.md +3 -13
  59. package/skills/god-status.md +27 -204
  60. package/skills/god-story-build.md +1 -12
  61. package/skills/god-story-close.md +1 -12
  62. package/skills/god-story.md +1 -12
  63. package/skills/god-sync.md +1 -12
  64. package/skills/god-undo.md +1 -12
  65. package/skills/god-update-deps.md +1 -12
  66. package/skills/god-upgrade.md +1 -12
package/bin/install.js CHANGED
@@ -20,6 +20,7 @@ const {
20
20
  const { describeProfiles } = require('../lib/install-profiles');
21
21
  const commandFamilies = require('../lib/command-families');
22
22
  const identity = require('../lib/package-identity');
23
+ const cliDispatch = require('../lib/cli-dispatch');
23
24
 
24
25
  const VERSION = identity.PACKAGE_VERSION;
25
26
 
@@ -50,6 +51,7 @@ function showHelp() {
50
51
  log('Commands:');
51
52
  log(' status Show the Godpowers Dashboard for a project');
52
53
  log(' next Show the dashboard and recommended next command');
54
+ log(' gate Check a tier artifact gate');
53
55
  log(' quick-proof Show a runnable proof from the shipped fixture');
54
56
  log(' automation-status Show host automation provider support');
55
57
  log(' automation-setup Show an opt-in automation setup plan');
@@ -63,6 +65,7 @@ function showHelp() {
63
65
  log('');
64
66
  log('Options:');
65
67
  log(' --project=<path> Project root for status, next, proof, or automation commands');
68
+ log(' --tier=<name> Tier for gate: prd, design, arch, roadmap, stack, repo, build, or harden');
66
69
  log(' --json Emit JSON for status, next, proof, or automation commands');
67
70
  log(' --brief Render compact output for status, next, or proof');
68
71
  log(' --name=<scope/name> Extension package name for extension-scaffold');
@@ -96,6 +99,7 @@ function showHelp() {
96
99
  log('Examples:');
97
100
  log(' npx godpowers status --project=.');
98
101
  log(' npx godpowers next --project=.');
102
+ log(' npx godpowers gate --tier=prd --project=.');
99
103
  log(' npx godpowers quick-proof --project=.');
100
104
  log(' npx godpowers automation-status --project=.');
101
105
  log(' npx godpowers automation-setup --project=.');
@@ -107,110 +111,6 @@ function showHelp() {
107
111
  log(' npx godpowers --codex --cursor');
108
112
  }
109
113
 
110
- function runAutomationCommand(opts) {
111
- const automation = require('../lib/automation-providers');
112
- const result = opts.command === 'automation-setup'
113
- ? automation.setupPlan(opts.project)
114
- : automation.detect(opts.project);
115
- if (opts.json) {
116
- console.log(JSON.stringify(result, null, 2));
117
- } else if (opts.command === 'automation-setup') {
118
- console.log(automation.renderSetupPlan(result));
119
- } else {
120
- console.log(automation.render(result));
121
- }
122
- }
123
-
124
- function runDashboardCommand(opts) {
125
- const dashboard = require('../lib/dashboard');
126
- const result = dashboard.compute(opts.project);
127
- if (opts.json) {
128
- console.log(JSON.stringify(result, null, 2));
129
- return;
130
- }
131
-
132
- console.log(dashboard.render(result, { brief: opts.brief }));
133
- if (opts.command === 'next') {
134
- console.log('');
135
- console.log('Suggested next command:');
136
- console.log(` ${result.next && result.next.command ? result.next.command : 'describe the next intent'}`);
137
- }
138
- }
139
-
140
- function runDogfoodCommand(opts) {
141
- const dogfood = require('../lib/dogfood-runner');
142
- const result = dogfood.runAll();
143
- if (opts.json) {
144
- console.log(JSON.stringify(result, null, 2));
145
- } else {
146
- console.log(dogfood.render(result));
147
- }
148
- if (result.status !== 'pass') process.exit(1);
149
- }
150
-
151
- function runQuickProofCommand(opts) {
152
- const quickProof = require('../lib/quick-proof');
153
- const result = quickProof.compute(opts.project);
154
- if (opts.json) {
155
- console.log(JSON.stringify(result, null, 2));
156
- } else {
157
- console.log(quickProof.render(result, { brief: opts.brief }));
158
- }
159
- }
160
-
161
- function runExtensionScaffoldCommand(opts) {
162
- const authoring = require('../lib/extension-authoring');
163
- if (!opts.extensionName) {
164
- error('extension-scaffold requires --name=@scope/package');
165
- process.exit(1);
166
- }
167
- const result = authoring.scaffold(opts.extensionOutput, {
168
- name: opts.extensionName,
169
- skill: opts.extensionSkill || undefined,
170
- agent: opts.extensionAgent || undefined,
171
- workflow: opts.extensionWorkflow || undefined,
172
- runtimeVersion: VERSION
173
- });
174
- if (opts.json) {
175
- console.log(JSON.stringify(result, null, 2));
176
- return;
177
- }
178
-
179
- success(`Scaffolded ${result.name} at ${result.path}`);
180
- if (result.written.length > 0) {
181
- log(`Wrote ${result.written.length} file(s): ${result.written.join(', ')}`);
182
- }
183
- if (result.validation.length > 0) {
184
- warn(`Validation warnings: ${result.validation.join('; ')}`);
185
- } else {
186
- success('Extension manifest validates');
187
- }
188
- }
189
-
190
- function runCommand(opts) {
191
- if (opts.command === 'status' || opts.command === 'next') {
192
- runDashboardCommand(opts);
193
- return true;
194
- }
195
- if (opts.command === 'quick-proof') {
196
- runQuickProofCommand(opts);
197
- return true;
198
- }
199
- if (opts.command === 'automation-status' || opts.command === 'automation-setup') {
200
- runAutomationCommand(opts);
201
- return true;
202
- }
203
- if (opts.command === 'dogfood') {
204
- runDogfoodCommand(opts);
205
- return true;
206
- }
207
- if (opts.command === 'extension-scaffold') {
208
- runExtensionScaffoldCommand(opts);
209
- return true;
210
- }
211
- return false;
212
- }
213
-
214
114
  function applyDefaultRuntimeSelection(opts) {
215
115
  if (opts.runtimes.length > 0 || opts.all) return;
216
116
  if (!process.stdin.isTTY) {
@@ -282,7 +182,7 @@ function main() {
282
182
  process.exit(0);
283
183
  }
284
184
 
285
- if (runCommand(opts)) return;
185
+ if (cliDispatch.runCommand(opts)) return;
286
186
 
287
187
  console.log(BANNER);
288
188
  const srcDir = path.resolve(__dirname, '..');
@@ -299,11 +199,20 @@ function main() {
299
199
  }
300
200
  }
301
201
 
302
- main();
202
+ if (require.main === module) {
203
+ main();
204
+ }
303
205
 
304
206
  module.exports = {
305
207
  showHelp,
306
- runCommand,
208
+ COMMAND_RUNNERS: cliDispatch.COMMAND_RUNNERS,
209
+ runCommand: cliDispatch.runCommand,
210
+ runAutomationCommand: cliDispatch.runAutomationCommand,
211
+ runDashboardCommand: cliDispatch.runDashboardCommand,
212
+ runDogfoodCommand: cliDispatch.runDogfoodCommand,
213
+ runQuickProofCommand: cliDispatch.runQuickProofCommand,
214
+ runExtensionScaffoldCommand: cliDispatch.runExtensionScaffoldCommand,
215
+ runGateCommand: cliDispatch.runGateCommand,
307
216
  applyDefaultRuntimeSelection,
308
217
  runInstall,
309
218
  runUninstall,
@@ -0,0 +1,10 @@
1
+ # Build State
2
+
3
+ ## Delivered
4
+
5
+ [DECISION] The build gate fixture records a completed implementation slice for executable gate tests.
6
+
7
+ ## Verification Commands
8
+
9
+ - [DECISION] `npm test`: passed for the fixture project.
10
+ - [DECISION] `npm run lint`: passed for the fixture project.
@@ -0,0 +1,14 @@
1
+ # Security Findings
2
+
3
+ ## Summary
4
+
5
+ [DECISION] The harden fixture contains no unresolved Critical findings.
6
+
7
+ | Severity | Count |
8
+ |---|---:|
9
+ | Critical | 0 |
10
+ | High | 0 |
11
+ | Medium | 0 |
12
+ | Low | 0 |
13
+
14
+ [DECISION] Launch gate: PASSED.
@@ -0,0 +1,9 @@
1
+ # Repo Audit
2
+
3
+ ## Scaffold Evidence
4
+
5
+ [DECISION] The repo gate fixture records that the scaffold artifact exists and can be linted by the Phase 1 gate.
6
+
7
+ ## Verification
8
+
9
+ [DECISION] The fixture is intentionally minimal because Phase 1 does not run scaffold CI commands.
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Shared tier artifact map for dashboard, gates, and documentation checks.
3
+ */
4
+
5
+ const TIER_ARTIFACTS = {
6
+ prd: [
7
+ { path: '.godpowers/prd/PRD.md', required: true, lint: true }
8
+ ],
9
+ design: [
10
+ { path: 'DESIGN.md', required: true, lint: true },
11
+ { path: 'PRODUCT.md', required: false, lint: true },
12
+ { path: '.godpowers/design/STATE.md', required: true, lint: true }
13
+ ],
14
+ arch: [
15
+ { path: '.godpowers/arch/ARCH.md', required: true, lint: true }
16
+ ],
17
+ roadmap: [
18
+ { path: '.godpowers/roadmap/ROADMAP.md', required: true, lint: true }
19
+ ],
20
+ stack: [
21
+ { path: '.godpowers/stack/DECISION.md', required: true, lint: true }
22
+ ],
23
+ repo: [
24
+ { path: '.godpowers/repo/AUDIT.md', required: true, lint: true }
25
+ ],
26
+ build: [
27
+ { path: '.godpowers/build/STATE.md', required: true, lint: true }
28
+ ],
29
+ harden: [
30
+ { path: '.godpowers/harden/FINDINGS.md', required: true, lint: true }
31
+ ]
32
+ };
33
+
34
+ function normalizeTier(tier) {
35
+ if (!tier) return null;
36
+ return String(tier).replace(/^\/?god-/, '').toLowerCase();
37
+ }
38
+
39
+ function tiers() {
40
+ return Object.keys(TIER_ARTIFACTS);
41
+ }
42
+
43
+ function artifactsForTier(tier) {
44
+ const key = normalizeTier(tier);
45
+ if (!key || !TIER_ARTIFACTS[key]) return null;
46
+ return TIER_ARTIFACTS[key].map((artifact) => ({ ...artifact }));
47
+ }
48
+
49
+ function requiredArtifactsForTier(tier) {
50
+ const artifacts = artifactsForTier(tier);
51
+ return artifacts ? artifacts.filter((artifact) => artifact.required) : null;
52
+ }
53
+
54
+ module.exports = {
55
+ TIER_ARTIFACTS,
56
+ normalizeTier,
57
+ tiers,
58
+ artifactsForTier,
59
+ requiredArtifactsForTier
60
+ };
@@ -0,0 +1,162 @@
1
+ /**
2
+ * Installer CLI command dispatch.
3
+ */
4
+
5
+ const gate = require('./gate');
6
+ const identity = require('./package-identity');
7
+
8
+ const VERSION = identity.PACKAGE_VERSION;
9
+
10
+ function log(msg) {
11
+ console.log(` ${msg}`);
12
+ }
13
+
14
+ function success(msg) {
15
+ console.log(` \x1b[32m+\x1b[0m ${msg}`);
16
+ }
17
+
18
+ function warn(msg) {
19
+ console.log(` \x1b[33m!\x1b[0m ${msg}`);
20
+ }
21
+
22
+ function error(msg) {
23
+ console.error(` \x1b[31mx\x1b[0m ${msg}`);
24
+ }
25
+
26
+ function runAutomationCommand(opts) {
27
+ const automation = require('./automation-providers');
28
+ const result = opts.command === 'automation-setup'
29
+ ? automation.setupPlan(opts.project)
30
+ : automation.detect(opts.project);
31
+ if (opts.json) {
32
+ console.log(JSON.stringify(result, null, 2));
33
+ } else if (opts.command === 'automation-setup') {
34
+ console.log(automation.renderSetupPlan(result));
35
+ } else {
36
+ console.log(automation.render(result));
37
+ }
38
+ }
39
+
40
+ function runDashboardCommand(opts) {
41
+ const dashboard = require('./dashboard');
42
+ const result = dashboard.compute(opts.project);
43
+ if (opts.json) {
44
+ console.log(JSON.stringify(result, null, 2));
45
+ return;
46
+ }
47
+
48
+ console.log(dashboard.render(result, { brief: opts.brief }));
49
+ if (opts.command === 'next') {
50
+ console.log('');
51
+ console.log('Suggested next command:');
52
+ console.log(` ${result.next && result.next.command ? result.next.command : 'describe the next intent'}`);
53
+ }
54
+ }
55
+
56
+ function runDogfoodCommand(opts) {
57
+ const dogfood = require('./dogfood-runner');
58
+ const result = dogfood.runAll();
59
+ if (opts.json) {
60
+ console.log(JSON.stringify(result, null, 2));
61
+ } else {
62
+ console.log(dogfood.render(result));
63
+ }
64
+ if (result.status !== 'pass') process.exit(1);
65
+ }
66
+
67
+ function runQuickProofCommand(opts) {
68
+ const quickProof = require('./quick-proof');
69
+ const result = quickProof.compute(opts.project);
70
+ if (opts.json) {
71
+ console.log(JSON.stringify(result, null, 2));
72
+ } else {
73
+ console.log(quickProof.render(result, { brief: opts.brief }));
74
+ }
75
+ }
76
+
77
+ function runExtensionScaffoldCommand(opts) {
78
+ const authoring = require('./extension-authoring');
79
+ if (!opts.extensionName) {
80
+ error('extension-scaffold requires --name=@scope/package');
81
+ process.exit(1);
82
+ }
83
+ const result = authoring.scaffold(opts.extensionOutput, {
84
+ name: opts.extensionName,
85
+ skill: opts.extensionSkill || undefined,
86
+ agent: opts.extensionAgent || undefined,
87
+ workflow: opts.extensionWorkflow || undefined,
88
+ runtimeVersion: VERSION
89
+ });
90
+ if (opts.json) {
91
+ console.log(JSON.stringify(result, null, 2));
92
+ return;
93
+ }
94
+
95
+ success(`Scaffolded ${result.name} at ${result.path}`);
96
+ if (result.written.length > 0) {
97
+ log(`Wrote ${result.written.length} file(s): ${result.written.join(', ')}`);
98
+ }
99
+ if (result.validation.length > 0) {
100
+ warn(`Validation warnings: ${result.validation.join('; ')}`);
101
+ } else {
102
+ success('Extension manifest validates');
103
+ }
104
+ }
105
+
106
+ function runGateCommand(opts) {
107
+ if (!opts.tier) {
108
+ const result = {
109
+ tier: null,
110
+ verdict: 'fail',
111
+ artifacts: [],
112
+ checks: [{ id: 'tier-required', status: 'fail', artifact: null, reason: 'gate requires --tier=<name>' }],
113
+ findings: [{ id: 'tier-required', severity: 'error', artifact: null, reason: 'gate requires --tier=<name>' }],
114
+ summary: { errors: 1, warnings: 0, infos: 0, missing: 0, checkedArtifacts: 0 }
115
+ };
116
+ if (opts.json) console.log(JSON.stringify(result, null, 2));
117
+ else console.log(gate.render(result));
118
+ process.exitCode = 1;
119
+ return;
120
+ }
121
+
122
+ const result = gate.check({ tier: opts.tier, projectRoot: opts.project });
123
+ if (opts.json) {
124
+ console.log(JSON.stringify(result, null, 2));
125
+ } else {
126
+ console.log(gate.render(result));
127
+ }
128
+ if (gate.exitCode(result) !== 0) {
129
+ process.exitCode = 1;
130
+ }
131
+ }
132
+
133
+ const COMMAND_RUNNERS = {
134
+ status: runDashboardCommand,
135
+ next: runDashboardCommand,
136
+ 'quick-proof': runQuickProofCommand,
137
+ 'automation-status': runAutomationCommand,
138
+ 'automation-setup': runAutomationCommand,
139
+ dogfood: runDogfoodCommand,
140
+ 'extension-scaffold': runExtensionScaffoldCommand,
141
+ gate: runGateCommand
142
+ };
143
+
144
+ function runCommand(opts) {
145
+ const runner = COMMAND_RUNNERS[opts.command];
146
+ if (runner) {
147
+ runner(opts);
148
+ return true;
149
+ }
150
+ return false;
151
+ }
152
+
153
+ module.exports = {
154
+ COMMAND_RUNNERS,
155
+ runCommand,
156
+ runAutomationCommand,
157
+ runDashboardCommand,
158
+ runDogfoodCommand,
159
+ runQuickProofCommand,
160
+ runExtensionScaffoldCommand,
161
+ runGateCommand
162
+ };
@@ -119,7 +119,6 @@ const COMMAND_FAMILIES = [
119
119
  '/god-upgrade',
120
120
  '/god-context',
121
121
  '/god-context-scan',
122
- '/god-roadmap-check',
123
122
  '/god-roadmap-update'
124
123
  ]
125
124
  },
@@ -198,6 +197,15 @@ const COMMAND_FAMILIES = [
198
197
  '/god-help',
199
198
  '/god-version'
200
199
  ]
200
+ },
201
+ {
202
+ id: 'compatibility',
203
+ label: 'Compatibility',
204
+ purpose: 'Deprecated full-profile commands kept for backward compatibility.',
205
+ visibility: 'hidden',
206
+ commands: [
207
+ '/god-roadmap-check'
208
+ ]
201
209
  }
202
210
  ];
203
211
 
@@ -279,7 +287,7 @@ function familyForCommand(command) {
279
287
  return COMMAND_FAMILIES.find((family) => family.commands.includes(command)) || null;
280
288
  }
281
289
 
282
- function renderFamilyCards(families = COMMAND_FAMILIES) {
290
+ function renderFamilyCards(families = COMMAND_FAMILIES.filter((family) => family.visibility !== 'hidden')) {
283
291
  return families.map((family) => (
284
292
  `${family.label}: ${family.purpose} (${family.commands.join(', ')})`
285
293
  ));
package/lib/dashboard.js CHANGED
@@ -16,10 +16,11 @@ const automationProviders = require('./automation-providers');
16
16
  const repoDocSync = require('./repo-doc-sync');
17
17
  const repoSurfaceSync = require('./repo-surface-sync');
18
18
  const hostCapabilities = require('./host-capabilities');
19
+ const artifactMap = require('./artifact-map');
19
20
 
20
21
  const GOD_DIR = '.godpowers';
21
- const PRD_PATH = '.godpowers/prd/PRD.md';
22
- const ROADMAP_PATH = '.godpowers/roadmap/ROADMAP.md';
22
+ const PRD_PATH = artifactMap.requiredArtifactsForTier('prd')[0].path;
23
+ const ROADMAP_PATH = artifactMap.requiredArtifactsForTier('roadmap')[0].path;
23
24
  const CHECKPOINT_PATH = '.godpowers/CHECKPOINT.md';
24
25
  const SYNC_LOG_PATH = '.godpowers/SYNC-LOG.md';
25
26
  const REVIEW_PATH = '.godpowers/REVIEW-REQUIRED.md';