godpowers 2.4.1 → 2.4.3

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 (60) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/README.md +9 -6
  3. package/RELEASE.md +35 -30
  4. package/agents/god-orchestrator.md +31 -1255
  5. package/bin/install.js +22 -19
  6. package/lib/README.md +1 -0
  7. package/lib/agent-validator.js +2 -27
  8. package/lib/checkpoint.js +4 -19
  9. package/lib/command-families.js +10 -2
  10. package/lib/context-budget.js +5 -34
  11. package/lib/design-spec.js +11 -13
  12. package/lib/extensions.js +12 -2
  13. package/lib/frontmatter.js +74 -0
  14. package/lib/installer-core.js +7 -52
  15. package/lib/intent.js +88 -6
  16. package/lib/pillars.js +2 -41
  17. package/lib/recipes.js +10 -2
  18. package/lib/router.js +10 -2
  19. package/lib/skill-surface.js +2 -11
  20. package/lib/workflow-parser.js +12 -4
  21. package/package.json +8 -3
  22. package/references/orchestration/GOD-NEXT-RUNBOOK.md +32 -0
  23. package/references/orchestration/GOD-ORCHESTRATOR-RUNBOOK.md +1259 -0
  24. package/references/orchestration/README.md +6 -0
  25. package/references/shared/DASHBOARD-CONTRACT.md +93 -0
  26. package/references/shared/LOCKING.md +15 -0
  27. package/references/shared/README.md +2 -0
  28. package/routing/god-roadmap-check.yaml +1 -1
  29. package/skills/god-arch.md +1 -12
  30. package/skills/god-build.md +1 -12
  31. package/skills/god-deploy.md +1 -12
  32. package/skills/god-design.md +1 -12
  33. package/skills/god-feature.md +1 -12
  34. package/skills/god-harden.md +1 -12
  35. package/skills/god-hotfix.md +1 -12
  36. package/skills/god-launch.md +1 -12
  37. package/skills/god-link.md +1 -12
  38. package/skills/god-migrate.md +1 -3
  39. package/skills/god-next.md +34 -410
  40. package/skills/god-observe.md +1 -12
  41. package/skills/god-prd.md +1 -12
  42. package/skills/god-redo.md +1 -12
  43. package/skills/god-refactor.md +1 -12
  44. package/skills/god-repair.md +1 -12
  45. package/skills/god-repo.md +1 -12
  46. package/skills/god-restore.md +1 -12
  47. package/skills/god-roadmap-check.md +5 -0
  48. package/skills/god-roadmap.md +1 -12
  49. package/skills/god-rollback.md +1 -12
  50. package/skills/god-scan.md +1 -12
  51. package/skills/god-skip.md +1 -12
  52. package/skills/god-stack.md +1 -12
  53. package/skills/god-status.md +27 -204
  54. package/skills/god-story-build.md +1 -12
  55. package/skills/god-story-close.md +1 -12
  56. package/skills/god-story.md +1 -12
  57. package/skills/god-sync.md +1 -12
  58. package/skills/god-undo.md +1 -12
  59. package/skills/god-update-deps.md +1 -12
  60. package/skills/god-upgrade.md +1 -12
package/lib/recipes.js CHANGED
@@ -8,13 +8,17 @@
8
8
 
9
9
  const fs = require('fs');
10
10
  const path = require('path');
11
- const { parseSimpleYaml } = require('./intent');
11
+ const { parseSimpleYaml, formatDiagnostic } = require('./intent');
12
12
  const state = require('./state');
13
13
 
14
14
  const RECIPES_DIR = path.join(__dirname, '..', 'routing', 'recipes');
15
15
 
16
16
  let _cache = null;
17
17
 
18
+ function warnYamlDiagnostic(diagnostic) {
19
+ console.warn(`[godpowers] YAML warning ${formatDiagnostic(diagnostic)}`);
20
+ }
21
+
18
22
  /**
19
23
  * Load all recipe definitions.
20
24
  */
@@ -26,7 +30,11 @@ function loadAll() {
26
30
  for (const file of fs.readdirSync(RECIPES_DIR)) {
27
31
  if (!file.endsWith('.yaml') && !file.endsWith('.yml')) continue;
28
32
  const content = fs.readFileSync(path.join(RECIPES_DIR, file), 'utf8');
29
- const parsed = parseSimpleYaml(content);
33
+ const parsed = parseSimpleYaml(content, {
34
+ strict: true,
35
+ source: path.join('routing', 'recipes', file),
36
+ onDiagnostic: warnYamlDiagnostic
37
+ });
30
38
  if (parsed.metadata && parsed.metadata.name) {
31
39
  result.push(parsed);
32
40
  }
package/lib/router.js CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  const fs = require('fs');
12
12
  const path = require('path');
13
- const { parseSimpleYaml } = require('./intent');
13
+ const { parseSimpleYaml, formatDiagnostic } = require('./intent');
14
14
  const state = require('./state');
15
15
  const commandFamilies = require('./command-families');
16
16
 
@@ -24,6 +24,10 @@ const HARDEN_FINDINGS = '.godpowers/harden/FINDINGS.md';
24
24
 
25
25
  let _cache = null;
26
26
 
27
+ function warnYamlDiagnostic(diagnostic) {
28
+ console.warn(`[godpowers] YAML warning ${formatDiagnostic(diagnostic)}`);
29
+ }
30
+
27
31
  /**
28
32
  * Load all routing files into a map keyed by command.
29
33
  */
@@ -35,7 +39,11 @@ function loadAll() {
35
39
  for (const file of fs.readdirSync(ROUTING_DIR)) {
36
40
  if (!file.endsWith('.yaml')) continue;
37
41
  const content = fs.readFileSync(path.join(ROUTING_DIR, file), 'utf8');
38
- const parsed = parseSimpleYaml(content);
42
+ const parsed = parseSimpleYaml(content, {
43
+ strict: true,
44
+ source: path.join('routing', file),
45
+ onDiagnostic: warnYamlDiagnostic
46
+ });
39
47
  if (parsed.metadata && parsed.metadata.command) {
40
48
  result[parsed.metadata.command] = parsed;
41
49
  }
@@ -1,17 +1,8 @@
1
1
  const fs = require('fs');
2
2
  const path = require('path');
3
+ const frontmatter = require('./frontmatter');
3
4
 
4
- function parseFrontmatter(text) {
5
- if (!text.startsWith('---\n')) return {};
6
- const end = text.indexOf('\n---', 4);
7
- if (end === -1) return {};
8
- const out = {};
9
- for (const line of text.slice(4, end).split('\n')) {
10
- const match = line.match(/^([a-zA-Z0-9_-]+):\s*(.*)$/);
11
- if (match) out[match[1]] = match[2].replace(/^["']|["']$/g, '');
12
- }
13
- return out;
14
- }
5
+ const parseFrontmatter = (text) => frontmatter.parse(text, { strict: true });
15
6
 
16
7
  function listSkills(rootDir = path.join(__dirname, '..', 'skills')) {
17
8
  return fs.readdirSync(rootDir)
@@ -7,7 +7,11 @@
7
7
 
8
8
  const fs = require('fs');
9
9
  const path = require('path');
10
- const { parseSimpleYaml } = require('./intent');
10
+ const { parseSimpleYaml, formatDiagnostic } = require('./intent');
11
+
12
+ function warnYamlDiagnostic(diagnostic) {
13
+ console.warn(`[godpowers] YAML warning ${formatDiagnostic(diagnostic)}`);
14
+ }
11
15
 
12
16
  /**
13
17
  * Parse a workflow YAML file into a structured object.
@@ -17,14 +21,18 @@ function parseFile(filePath) {
17
21
  throw new Error(`Workflow not found: ${filePath}`);
18
22
  }
19
23
  const content = fs.readFileSync(filePath, 'utf8');
20
- return parse(content);
24
+ return parse(content, filePath);
21
25
  }
22
26
 
23
27
  /**
24
28
  * Parse YAML content into a workflow object.
25
29
  */
26
- function parse(yamlContent) {
27
- const parsed = parseSimpleYaml(yamlContent);
30
+ function parse(yamlContent, source = 'workflow.yaml') {
31
+ const parsed = parseSimpleYaml(yamlContent, {
32
+ strict: true,
33
+ source,
34
+ onDiagnostic: warnYamlDiagnostic
35
+ });
28
36
  validate(parsed);
29
37
  return parsed;
30
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "godpowers",
3
- "version": "2.4.1",
3
+ "version": "2.4.3",
4
4
  "description": "AI-powered development system: 112 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"
@@ -22,9 +22,11 @@
22
22
  "test:linter": "node scripts/test-artifact-linter.js",
23
23
  "test:diff": "node scripts/test-artifact-diff.js",
24
24
  "test:e2e": "node tests/integration/full-arc.test.js",
25
+ "coverage": "c8 --reporter=text --reporter=lcov node scripts/run-tests.js",
26
+ "coverage:lib": "c8 --include=lib/**/*.js --check-coverage --lines 90 --reporter=text node scripts/run-tests.js",
25
27
  "test:audit": "npm audit --omit=dev && git diff --check && npm run test:surface",
26
28
  "pack:check": "node scripts/check-package-contents.js",
27
- "release:check": "npm test && npm run test:audit && npm run pack:check",
29
+ "release:check": "npm run coverage:lib && npm run test:audit && npm run pack:check",
28
30
  "lint": "node scripts/static-check.js"
29
31
  },
30
32
  "keywords": [
@@ -86,5 +88,8 @@
86
88
  "AGENTS.md",
87
89
  "CHANGELOG.md",
88
90
  "LICENSE"
89
- ]
91
+ ],
92
+ "devDependencies": {
93
+ "c8": "^11.0.0"
94
+ }
90
95
  }
@@ -0,0 +1,32 @@
1
+ # God Next Runbook
2
+
3
+ This reference owns the detailed process notes for `/god-next`. The skill file stays a concise dispatch contract.
4
+
5
+ ## Invocation modes
6
+
7
+ 1. Post-completion routing reads `routing/<just-completed>.yaml`, applies success-path and conditional-next rules, runs any configured standards gate, and announces the next command.
8
+ 2. Pre-flight routing reads `routing/<target>.yaml`, evaluates prerequisites, and offers auto-completable prerequisites before the target command runs.
9
+ 3. Standalone routing reads disk state, uses `lib/router.js` for structural next steps, then uses recipes when the project is already in steady state.
10
+ 4. Intent-based routing uses `lib/recipes.js` for fuzzy text, ranked recipes, and state-aware command sequences.
11
+
12
+ ## Data sources
13
+
14
+ Use runtime routing YAML, recipes, `lib/command-families.js`, `lib/router.js`, `lib/dashboard.js`, state.json, PROGRESS.md, CHECKPOINT.md, and completed artifacts.
15
+
16
+ Read `.godpowers/prep/INITIAL-FINDINGS.md` and `.godpowers/prep/IMPORTED-CONTEXT.md` when present. Treat them as preparation context only.
17
+
18
+ ## Route detail
19
+
20
+ When the suggestion is based on state.json, show a three-line path ahead: current state, next command, and the following gate if known.
21
+
22
+ When prerequisites are missing, name the missing prerequisite, the auto-completable command when available, and the exact decision needed from the user.
23
+
24
+ When a standards gate fails, show the failures, suggest `/god-redo` with feedback or `/god-skip` with a reason, and do not auto-progress.
25
+
26
+ ## Edge cases
27
+
28
+ State drift routes to `/god-repair`. Safe sync blockers route to `/god-reconcile Release Truth And Safe Sync` before deploy, observe, harden, launch, broad migration, or resume work.
29
+
30
+ Unresolved Critical harden findings block launch in default mode and under `--yolo`.
31
+
32
+ In steady state, use the work-family ladders before raw route order so feature, hotfix, refactor, docs, dependency, audit, hygiene, and preflight intents resolve to the narrowest useful command.