godpowers 2.3.1 → 2.4.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 (146) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +19 -7
  3. package/RELEASE.md +30 -39
  4. package/SKILL.md +26 -3
  5. package/bin/install.js +6 -0
  6. package/lib/README.md +3 -1
  7. package/lib/command-families.js +375 -0
  8. package/lib/feature-awareness.js +1 -1
  9. package/lib/release-surface-sync.js +4 -1
  10. package/lib/route-quality-sync.js +41 -13
  11. package/lib/router.js +32 -0
  12. package/lib/workflow-helper-groups.js +50 -0
  13. package/lib/workflow-runner.js +6 -1
  14. package/package.json +1 -1
  15. package/routing/god-add-backlog.yaml +1 -0
  16. package/routing/god-add-tests.yaml +1 -0
  17. package/routing/god-add-todo.yaml +1 -0
  18. package/routing/god-agent-audit.yaml +6 -0
  19. package/routing/god-arch.yaml +1 -0
  20. package/routing/god-archaeology.yaml +1 -0
  21. package/routing/god-audit.yaml +1 -0
  22. package/routing/god-automation-setup.yaml +1 -0
  23. package/routing/god-automation-status.yaml +1 -0
  24. package/routing/god-budget.yaml +6 -0
  25. package/routing/god-build-agent.yaml +1 -0
  26. package/routing/god-build.yaml +1 -0
  27. package/routing/god-cache-clear.yaml +6 -0
  28. package/routing/god-check-todos.yaml +6 -0
  29. package/routing/god-context-scan.yaml +6 -0
  30. package/routing/god-context.yaml +1 -0
  31. package/routing/god-cost.yaml +6 -0
  32. package/routing/god-debug.yaml +1 -0
  33. package/routing/god-deploy.yaml +1 -0
  34. package/routing/god-design-impact.yaml +6 -0
  35. package/routing/god-design.yaml +1 -0
  36. package/routing/god-discuss.yaml +12 -0
  37. package/routing/god-docs.yaml +1 -0
  38. package/routing/god-doctor.yaml +6 -0
  39. package/routing/god-dogfood.yaml +1 -0
  40. package/routing/god-explore.yaml +1 -0
  41. package/routing/god-export-otel.yaml +1 -0
  42. package/routing/god-extension-add.yaml +6 -0
  43. package/routing/god-extension-info.yaml +6 -0
  44. package/routing/god-extension-list.yaml +6 -0
  45. package/routing/god-extension-remove.yaml +6 -0
  46. package/routing/god-extension-scaffold.yaml +1 -0
  47. package/routing/god-extract-learnings.yaml +1 -0
  48. package/routing/god-fast.yaml +1 -0
  49. package/routing/god-feature.yaml +1 -0
  50. package/routing/god-graph.yaml +6 -0
  51. package/routing/god-harden.yaml +1 -0
  52. package/routing/god-help.yaml +6 -0
  53. package/routing/god-hotfix.yaml +1 -0
  54. package/routing/god-hygiene.yaml +1 -0
  55. package/routing/god-init.yaml +1 -0
  56. package/routing/god-intel.yaml +1 -0
  57. package/routing/god-launch.yaml +6 -0
  58. package/routing/god-lifecycle.yaml +12 -0
  59. package/routing/god-link.yaml +1 -0
  60. package/routing/god-lint.yaml +1 -0
  61. package/routing/god-list-assumptions.yaml +6 -0
  62. package/routing/god-locate.yaml +6 -0
  63. package/routing/god-logs.yaml +12 -0
  64. package/routing/god-map-codebase.yaml +1 -0
  65. package/routing/god-metrics.yaml +6 -0
  66. package/routing/god-migrate.yaml +1 -0
  67. package/routing/god-mode.yaml +6 -0
  68. package/routing/god-next.yaml +12 -0
  69. package/routing/god-note.yaml +1 -0
  70. package/routing/god-observe.yaml +1 -0
  71. package/routing/god-org-context.yaml +1 -0
  72. package/routing/god-party.yaml +1 -0
  73. package/routing/god-pause-work.yaml +6 -0
  74. package/routing/god-plant-seed.yaml +1 -0
  75. package/routing/god-postmortem.yaml +1 -0
  76. package/routing/god-pr-branch.yaml +1 -0
  77. package/routing/god-prd.yaml +1 -0
  78. package/routing/god-preflight.yaml +1 -0
  79. package/routing/god-progress.yaml +7 -0
  80. package/routing/god-quick.yaml +1 -0
  81. package/routing/god-reconcile.yaml +6 -0
  82. package/routing/god-reconstruct.yaml +1 -0
  83. package/routing/god-redo.yaml +6 -0
  84. package/routing/god-refactor.yaml +1 -0
  85. package/routing/god-repair.yaml +1 -0
  86. package/routing/god-repo.yaml +1 -0
  87. package/routing/god-restore.yaml +1 -0
  88. package/routing/god-resume-work.yaml +6 -0
  89. package/routing/god-review-changes.yaml +1 -0
  90. package/routing/god-review.yaml +1 -0
  91. package/routing/god-roadmap-check.yaml +6 -0
  92. package/routing/god-roadmap-update.yaml +1 -0
  93. package/routing/god-roadmap.yaml +1 -0
  94. package/routing/god-rollback.yaml +1 -0
  95. package/routing/god-scan.yaml +1 -0
  96. package/routing/god-set-profile.yaml +1 -0
  97. package/routing/god-settings.yaml +1 -0
  98. package/routing/god-skip.yaml +1 -0
  99. package/routing/god-smite.yaml +1 -0
  100. package/routing/god-spike.yaml +1 -0
  101. package/routing/god-sprint.yaml +6 -0
  102. package/routing/god-stack.yaml +1 -0
  103. package/routing/god-standards.yaml +1 -0
  104. package/routing/god-status.yaml +1 -0
  105. package/routing/god-stories.yaml +1 -0
  106. package/routing/god-story-build.yaml +1 -0
  107. package/routing/god-story-close.yaml +1 -0
  108. package/routing/god-story-verify.yaml +1 -0
  109. package/routing/god-story.yaml +1 -0
  110. package/routing/god-suite-init.yaml +1 -0
  111. package/routing/god-suite-patch.yaml +1 -0
  112. package/routing/god-suite-release.yaml +1 -0
  113. package/routing/god-suite-status.yaml +6 -0
  114. package/routing/god-suite-sync.yaml +1 -0
  115. package/routing/god-sync.yaml +1 -0
  116. package/routing/god-tech-debt.yaml +1 -0
  117. package/routing/god-test-extension.yaml +6 -0
  118. package/routing/god-test-runtime.yaml +1 -0
  119. package/routing/god-thread.yaml +6 -0
  120. package/routing/god-trace.yaml +6 -0
  121. package/routing/god-undo.yaml +1 -0
  122. package/routing/god-update-deps.yaml +1 -0
  123. package/routing/god-upgrade.yaml +1 -0
  124. package/routing/god-version.yaml +1 -0
  125. package/routing/god-workstream.yaml +6 -0
  126. package/routing/god.yaml +6 -0
  127. package/schema/routing.v1.json +62 -4
  128. package/schema/workflow.v1.json +14 -0
  129. package/skills/god-doctor.md +1 -1
  130. package/skills/god-help.md +38 -3
  131. package/skills/god-next.md +19 -2
  132. package/skills/god-status.md +13 -0
  133. package/skills/god-sync.md +1 -1
  134. package/skills/god.md +53 -1
  135. package/workflows/audit-only.yaml +2 -2
  136. package/workflows/bluefield-arc.yaml +3 -7
  137. package/workflows/brownfield-arc.yaml +4 -8
  138. package/workflows/deps-audit.yaml +2 -5
  139. package/workflows/docs-arc.yaml +2 -2
  140. package/workflows/feature-arc.yaml +3 -6
  141. package/workflows/full-arc.yaml +5 -11
  142. package/workflows/hotfix-arc.yaml +3 -6
  143. package/workflows/hygiene.yaml +2 -2
  144. package/workflows/migration-arc.yaml +3 -5
  145. package/workflows/postmortem.yaml +2 -5
  146. package/workflows/refactor-arc.yaml +3 -6
package/CHANGELOG.md CHANGED
@@ -7,6 +7,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.4.0] - 2026-06-08
11
+
12
+ ### Added
13
+ - Added command-family UX metadata for start, continue, build, verify,
14
+ operate, maintain, capture, recover, extend, collaborate, and configure
15
+ while keeping every shipped leaf command available.
16
+ - Added capture, work-size, verification, status-view, and trigger-precedence
17
+ helpers in `lib/command-families.js`.
18
+ - Added typed route outcome metadata for contextual, verdict-based,
19
+ steady-state, session-end, and selection-based route exits.
20
+ - Added workflow helper groups with serialized plan expansion so closeout
21
+ helpers can be consolidated without hiding local runtime work.
22
+
23
+ ### Changed
24
+ - Updated `/god`, `/god-help`, `/god-next`, `/god-status`, README,
25
+ reference docs, recipes, architecture docs, command-flow docs, and
26
+ auto-invoke visibility docs to present the consolidated UX paths.
27
+ - Updated all shipped command routes with command family metadata.
28
+ - Updated repeated workflow closeout helper lists to named helper groups while
29
+ preserving explicit expanded helpers in generated plans.
30
+ - Updated extension recipe copy to describe current extension-pack-required
31
+ flows instead of old release annotations.
32
+
33
+ ### Fixed
34
+ - Route-quality sync now requires typed outcomes for flexible route exits
35
+ instead of accepting unexplained placeholder next routes.
36
+ - The full-arc e2e smoke test now verifies both helper groups and expanded
37
+ local helper visibility.
38
+
10
39
  ## [2.3.1] - 2026-06-08
11
40
 
12
41
  ### Added
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![CI](https://github.com/aihxp/godpowers/actions/workflows/ci.yml/badge.svg)](https://github.com/aihxp/godpowers/actions/workflows/ci.yml)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
5
- [![Version](https://img.shields.io/badge/version-2.3.1-blue)](CHANGELOG.md)
5
+ [![Version](https://img.shields.io/badge/version-2.4.0-blue)](CHANGELOG.md)
6
6
  [![npm](https://img.shields.io/npm/v/godpowers.svg)](https://www.npmjs.com/package/godpowers)
7
7
 
8
8
  **Ship fast. Ship right. Ship everything. Ship accountably.**
@@ -21,12 +21,10 @@ Godpowers makes AI coding accountable: every serious run should leave disk
21
21
  state, artifacts, validation gates, host guarantees, and a next action. Code is
22
22
  only one output. The project memory and proof trail matter too.
23
23
 
24
- Version 2.3.1 keeps the proof loop executable and adds release-surface
25
- hardening. Extension authors get `/god-extension-scaffold`, public starter
26
- paths are regression-tested against the actual router, host capability reports
27
- include optional code-intelligence tooling, clean user dashboards avoid
28
- maintainer-repo drift, and symlink handling is hardened across extension,
29
- planning-system, and cache paths.
24
+ Version 2.4.0 keeps every leaf command available while making the command
25
+ surface easier to navigate. `/god`, `/god-help`, `/god-next`, and route
26
+ metadata now share command families, decision ladders, typed route outcomes,
27
+ and workflow helper groups so users see clearer paths without losing power.
30
28
 
31
29
  Maintainer hardening continues on the 2.x line with small, audited public
32
30
  surface updates when they close real workflow gaps. The 2.1.0 patch closes a command-injection vector in the
@@ -109,6 +107,16 @@ preserves the complete command surface, while the smaller profiles install the
109
107
  commands most relevant to the role. `--minimal` is an alias for
110
108
  `--profile=core`.
111
109
 
110
+ Use profiles as journeys:
111
+
112
+ | Journey | Profile |
113
+ |---|---|
114
+ | I want the basics | `core` |
115
+ | I build products | `builder` |
116
+ | I maintain Godpowers or mature repos | `maintainer` |
117
+ | I coordinate suites | `suite` |
118
+ | I want everything | `full` |
119
+
112
120
  Agent spawning is host-native. Claude uses its native agent/task interface,
113
121
  Codex uses installed `agents/*.toml` metadata backed by the same Markdown agent
114
122
  contracts, and the other runtimes use their supported agent or subagent
@@ -185,6 +193,10 @@ hook does the same thing when you open a new session in a Godpowers project.
185
193
  If the full command surface feels large, begin with one of these paths and only
186
194
  learn the next command when Godpowers recommends it.
187
195
 
196
+ `/god-help` presents command families first: start, continue, build, verify,
197
+ operate, maintain, capture, recover, extend, collaborate, and configure. Leaf
198
+ commands remain direct shortcuts.
199
+
188
200
  | Goal | Starter path |
189
201
  |---|---|
190
202
  | Start a product | `/god-init`, `/god-prd`, `/god-design`, `/god-arch`, `/god-roadmap`, `/god-stack`, `/god-repo`, `/god-build` |
package/RELEASE.md CHANGED
@@ -1,12 +1,12 @@
1
- # Godpowers 2.3.1 Release
1
+ # Godpowers 2.4.0 Release
2
2
 
3
3
  > Status: Ready for package verification
4
4
  > Date: 2026-06-08
5
5
 
6
- Godpowers 2.3.1 is an accountability and release-surface hardening release for
7
- the 2.x line. It strengthens planning grounding, package legitimacy, install
8
- profiles, atomic persistence, executor recovery, extension authoring,
9
- front-door route coverage, host capability reporting, and dashboard behavior.
6
+ Godpowers 2.4.0 is a UX flow consolidation release for the 2.x line. It keeps
7
+ the complete 112-command surface intact while making the primary paths easier
8
+ to understand through command families, decision ladders, typed route outcomes,
9
+ and auditable workflow helper groups.
10
10
 
11
11
  ## What's in this release
12
12
 
@@ -17,52 +17,43 @@ front-door route coverage, host capability reporting, and dashboard behavior.
17
17
 
18
18
  ## Highlights
19
19
 
20
- - `/god-extension-scaffold` gives extension authors a first-class
21
- slash-command path before `/god-test-extension` and `/god-extension-add`.
22
- - Public `/god` intent matching now covers the starter phrases users are most
23
- likely to type: start a product, add a feature, fix production, audit an
24
- existing repo, ship a release, maintain health, and extend Godpowers.
25
- - Quick Proof and README starter paths are now regression-tested against the
26
- actual router and recipe engine.
27
- - User project dashboards no longer show maintainer-repository documentation
28
- drift when a clean non-Godpowers project is inspected.
29
- - Host capability reporting now includes optional code-intelligence tooling
30
- without treating missing optional tools as a host degradation.
31
- - Extension install, planning-system detection, and agent-cache cleanup are
32
- hardened around symlinked paths that point outside trusted source trees.
33
- - Source-grounded planning records existing files, existing symbols, planned new
34
- artifacts, and unchecked references before build execution.
35
- - Package legitimacy checks give stack and dependency decisions a concrete npm
36
- evidence gate before recommending package-backed choices.
37
- - Installer profiles let users install a smaller role-based command surface
38
- with `--profile=<name>` or `--minimal`.
39
- - Atomic write helpers now protect core state and ledger writes from partial
40
- file updates.
41
- - Executor repair classification names whether a failed attempt should retry,
42
- decompose, prune, or escalate.
43
- - Public migration language now uses neutral legacy-planning terminology so
44
- Godpowers is not confused with external workflow products.
45
- - Architecture docs now include an executable audit map for disconnected
46
- commands, actions, workflows, recipes, and package surfaces.
20
+ - `/god-help` now presents command families first, then ladders and the full
21
+ catalog.
22
+ - `/god` and `/god-next` now share command-family helpers for capture, work
23
+ sizing, verification, and overlapping trigger phrases.
24
+ - `/god-status` is documented as the continue-family hub, with `/god-progress`,
25
+ `/god-lifecycle`, `/god-locate`, and `/god-next` as direct views.
26
+ - Every shipped route now carries command family metadata.
27
+ - Flexible route exits now carry typed `success-path.outcome` metadata so
28
+ contextual, verdict-based, steady-state, session-end, and selection outcomes
29
+ can be explained to users.
30
+ - Workflow YAML can now use named helper groups, while generated plans still
31
+ expand the exact local helper list for visibility.
32
+ - Recipes now split simple existing-repo onboarding from deeper inheritance
33
+ flows, and clarify workstream versus suite collaboration paths.
34
+ - Extension journey docs now describe current extension-pack-required flows
35
+ instead of old release annotations.
36
+ - Release guardrails now require the command-family runtime files, helper group
37
+ runtime files, and command-family regression test.
47
38
 
48
39
  ## Validation
49
40
 
50
41
  - `npm test` green across the full suite
51
- - `npm run lint` clean
52
- - `npm run release:check` green (tests, audit, package contents)
53
- - `npm pack` creates a local `godpowers-2.3.1.tgz` tarball for package
42
+ - `npm run test:audit` green
43
+ - `npm run pack:check` green
44
+ - `npm pack` creates a local `godpowers-2.4.0.tgz` tarball for package
54
45
  inspection
55
46
 
56
47
  ## Upgrade
57
48
 
58
- - `npm install -g godpowers@2.3.1` or `npx godpowers@2.3.1`
49
+ - `npm install -g godpowers@2.4.0` or `npx godpowers@2.4.0`
59
50
  - Re-run `/god-context` in each project to refresh installed runtime metadata
60
51
  - No breaking changes; existing `.godpowers/` state is compatible. Users who
61
52
  want a compact install can run `npx godpowers --profile=core`.
62
53
 
63
54
  ## Notes
64
55
 
65
- - GitHub release creation for `v2.3.1`
56
+ - GitHub release creation for `v2.4.0`
66
57
  - The tag should match the npm package version
67
- - The `v2.3.1` tag should point to the release commit that matches the npm
68
- `godpowers@2.3.1` package.
58
+ - The `v2.4.0` tag should point to the release commit that matches the npm
59
+ `godpowers@2.4.0` package.
package/SKILL.md CHANGED
@@ -198,7 +198,30 @@ When the command only recommends work, keep the same dashboard but set
198
198
  command pauses, set `State: blocked` or `State: paused` and make `Next` the
199
199
  one exact user decision needed to continue.
200
200
 
201
- ### 11. User-Facing Vocabulary
201
+ ### 11. Command Family UX
202
+ Godpowers has many leaf commands, but user-facing routing should start from
203
+ families. Keep the full command surface available while presenting these
204
+ families first:
205
+
206
+ - Start: start or import a project.
207
+ - Continue: understand state and choose the next move.
208
+ - Build: plan, implement, test, and ship product work.
209
+ - Verify: check artifacts, code, runtime behavior, and release readiness.
210
+ - Operate: deploy, observe, harden, launch, and respond in production.
211
+ - Maintain: keep artifacts, docs, dependencies, context, and repo surfaces current.
212
+ - Capture: save thoughts, tasks, backlog items, seeds, and learnings.
213
+ - Recover: undo, repair, restore, skip, or diagnose broken state.
214
+ - Extend: install, inspect, test, remove, or author extension packs.
215
+ - Collaborate: coordinate people, workstreams, suites, sprints, and pull requests.
216
+ - Configure: tune settings, budgets, cache, profiles, help, and version info.
217
+
218
+ When choosing between similar commands, use the ladders from
219
+ `lib/command-families.js`: capture ladder, work size ladder, verification
220
+ ladder, status views, and trigger precedence. `/god-help` should render
221
+ families before leaf commands, and `/god` should use the family helpers before
222
+ asking the user to choose from a long list.
223
+
224
+ ### 12. User-Facing Vocabulary
202
225
  Godpowers may use internal words such as "arc" in routing, recipes, and agent
203
226
  implementation notes. Do not require the user to decode that word in visible
204
227
  output.
@@ -218,7 +241,7 @@ and roadmap visibility when those files exist or are expected. Show whether
218
241
  the PRD is done, whether the roadmap exists, which milestone or tier is active,
219
242
  how close the tracked workflow is to completion, and the next concrete move.
220
243
 
221
- ### 12. Auto-Invoke Visibility
244
+ ### 13. Auto-Invoke Visibility
222
245
  When Godpowers automatically runs another command, agent, or local runtime
223
246
  helper, show the user what happened. Do not describe these as "background"
224
247
  unless they are truly detached from the current run. Most Godpowers sync work
@@ -271,7 +294,7 @@ Automatic steps that especially need visible reporting:
271
294
  - dogfood runner execution during `/god-dogfood`, release checks, or explicit
272
295
  dogfood requests
273
296
 
274
- ### 13. Proactive Auto-Invoke Policy
297
+ ### 14. Proactive Auto-Invoke Policy
275
298
  Godpowers should be proactive from disk evidence, not from guesswork. Before
276
299
  auto-invoking anything, classify the action by risk and apply the safest
277
300
  allowed behavior.
package/bin/install.js CHANGED
@@ -18,6 +18,7 @@ const {
18
18
  countInstalledSurface
19
19
  } = require('../lib/installer-core');
20
20
  const { describeProfiles } = require('../lib/install-profiles');
21
+ const commandFamilies = require('../lib/command-families');
21
22
  const identity = require('../lib/package-identity');
22
23
 
23
24
  const VERSION = identity.PACKAGE_VERSION;
@@ -55,6 +56,11 @@ function showHelp() {
55
56
  log(' dogfood Run built-in messy-repo dogfood scenarios');
56
57
  log(' extension-scaffold Create a publishable extension pack skeleton');
57
58
  log('');
59
+ log('Command families:');
60
+ for (const family of commandFamilies.COMMAND_FAMILIES) {
61
+ log(` ${family.id.padEnd(12)} ${family.purpose}`);
62
+ }
63
+ log('');
58
64
  log('Options:');
59
65
  log(' --project=<path> Project root for status, next, proof, or automation commands');
60
66
  log(' --json Emit JSON for status, next, proof, or automation commands');
package/lib/README.md CHANGED
@@ -17,7 +17,7 @@ package-level integrations.
17
17
  | `host-capabilities.js` | Detect host guarantees for shell, git, npm, agent spawning, optional code intelligence, extension authoring, and suite dry-runs. |
18
18
  | `repo-doc-sync.js` | Detect and refresh mechanical repository documentation surfaces. |
19
19
  | `repo-surface-sync.js` | Detect structural drift across commands, routes, packages, agents, workflows, recipes, extensions, and release policy. |
20
- | `route-quality-sync.js` | Detect symbolic route spawns, unresolved agent targets, and unapproved contextual route exits. |
20
+ | `route-quality-sync.js` | Detect symbolic route spawns, unresolved agent targets, and untyped contextual route exits. |
21
21
  | `recipe-coverage-sync.js` | Detect missing high-frequency intent recipe coverage. |
22
22
  | `release-surface-sync.js` | Detect release-facing drift across badges, release notes, changelog, package checks, and release checklist policy. |
23
23
  | `dogfood-runner.js` | Run deterministic messy-repo scenarios against migration, host, extension, and suite release behavior. |
@@ -41,9 +41,11 @@ package-level integrations.
41
41
  | Module | Purpose |
42
42
  |--------|---------|
43
43
  | `router.js` | Resolve user intent to skills, agents, recipes, and workflows. |
44
+ | `command-families.js` | Define UX command families, status views, decision ladders, and trigger precedence helpers. |
44
45
  | `recipes.js` | Load and validate routing recipes. |
45
46
  | `workflow-parser.js` | Parse workflow YAML into executable steps. |
46
47
  | `workflow-runner.js` | Execute workflow steps with validation hooks. |
48
+ | `workflow-helper-groups.js` | Expand named workflow helper groups into explicit local helper names for plan visibility. |
47
49
  | `agent-cache.js` | Cache agent metadata for faster routing. |
48
50
  | `agent-validator.js` | Validate agent frontmatter and contracts. |
49
51
  | `agent-refs.js` | Validate workflow agent references and scan skill/agent prose for phantom references. |
@@ -0,0 +1,375 @@
1
+ /**
2
+ * Command family metadata.
3
+ *
4
+ * Keeps the user-facing command catalog small without removing leaf commands.
5
+ * These groupings are used by help, routing, docs, and UX audits.
6
+ */
7
+
8
+ const fs = require('fs');
9
+ const path = require('path');
10
+
11
+ const COMMAND_FAMILIES = [
12
+ {
13
+ id: 'start',
14
+ label: 'Start',
15
+ purpose: 'Start or import a project.',
16
+ commands: [
17
+ '/god',
18
+ '/god-init',
19
+ '/god-mode',
20
+ '/god-explore',
21
+ '/god-discuss',
22
+ '/god-list-assumptions',
23
+ '/god-prd',
24
+ '/god-design',
25
+ '/god-design-impact',
26
+ '/god-arch',
27
+ '/god-roadmap',
28
+ '/god-stack',
29
+ '/god-repo',
30
+ '/god-preflight',
31
+ '/god-map-codebase',
32
+ '/god-archaeology',
33
+ '/god-org-context',
34
+ '/god-migrate'
35
+ ]
36
+ },
37
+ {
38
+ id: 'continue',
39
+ label: 'Continue',
40
+ purpose: 'Understand state and choose the next move.',
41
+ commands: [
42
+ '/god-status',
43
+ '/god-next',
44
+ '/god-progress',
45
+ '/god-lifecycle',
46
+ '/god-locate',
47
+ '/god-resume-work',
48
+ '/god-pause-work'
49
+ ]
50
+ },
51
+ {
52
+ id: 'build',
53
+ label: 'Build',
54
+ purpose: 'Plan, implement, test, and ship product work.',
55
+ commands: [
56
+ '/god-build',
57
+ '/god-feature',
58
+ '/god-story',
59
+ '/god-stories',
60
+ '/god-story-build',
61
+ '/god-story-verify',
62
+ '/god-story-close',
63
+ '/god-fast',
64
+ '/god-quick',
65
+ '/god-debug',
66
+ '/god-add-tests',
67
+ '/god-refactor',
68
+ '/god-spike'
69
+ ]
70
+ },
71
+ {
72
+ id: 'verify',
73
+ label: 'Verify',
74
+ purpose: 'Check artifacts, code, runtime behavior, and release readiness.',
75
+ commands: [
76
+ '/god-lint',
77
+ '/god-standards',
78
+ '/god-review',
79
+ '/god-review-changes',
80
+ '/god-test-runtime',
81
+ '/god-audit',
82
+ '/god-agent-audit',
83
+ '/god-hygiene',
84
+ '/god-dogfood',
85
+ '/god-preflight'
86
+ ]
87
+ },
88
+ {
89
+ id: 'operate',
90
+ label: 'Operate',
91
+ purpose: 'Deploy, observe, harden, launch, and respond in production.',
92
+ commands: [
93
+ '/god-deploy',
94
+ '/god-observe',
95
+ '/god-harden',
96
+ '/god-launch',
97
+ '/god-hotfix',
98
+ '/god-postmortem',
99
+ '/god-logs',
100
+ '/god-metrics',
101
+ '/god-trace',
102
+ '/god-export-otel'
103
+ ]
104
+ },
105
+ {
106
+ id: 'maintain',
107
+ label: 'Maintain',
108
+ purpose: 'Keep artifacts, docs, dependencies, context, and repo surfaces current.',
109
+ commands: [
110
+ '/god-docs',
111
+ '/god-sync',
112
+ '/god-scan',
113
+ '/god-link',
114
+ '/god-reconcile',
115
+ '/god-reconstruct',
116
+ '/god-intel',
117
+ '/god-tech-debt',
118
+ '/god-update-deps',
119
+ '/god-upgrade',
120
+ '/god-context',
121
+ '/god-context-scan',
122
+ '/god-roadmap-check',
123
+ '/god-roadmap-update'
124
+ ]
125
+ },
126
+ {
127
+ id: 'capture',
128
+ label: 'Capture',
129
+ purpose: 'Save thoughts, tasks, backlog items, seeds, and learnings.',
130
+ commands: [
131
+ '/god-note',
132
+ '/god-add-todo',
133
+ '/god-check-todos',
134
+ '/god-add-backlog',
135
+ '/god-plant-seed',
136
+ '/god-extract-learnings',
137
+ '/god-thread',
138
+ '/god-graph'
139
+ ]
140
+ },
141
+ {
142
+ id: 'recover',
143
+ label: 'Recover',
144
+ purpose: 'Undo, repair, restore, skip, or diagnose broken state.',
145
+ commands: [
146
+ '/god-undo',
147
+ '/god-redo',
148
+ '/god-rollback',
149
+ '/god-restore',
150
+ '/god-repair',
151
+ '/god-skip',
152
+ '/god-smite',
153
+ '/god-doctor'
154
+ ]
155
+ },
156
+ {
157
+ id: 'extend',
158
+ label: 'Extend',
159
+ purpose: 'Install, inspect, test, remove, or author extension packs.',
160
+ commands: [
161
+ '/god-extension-scaffold',
162
+ '/god-extension-add',
163
+ '/god-extension-list',
164
+ '/god-extension-info',
165
+ '/god-extension-remove',
166
+ '/god-test-extension',
167
+ '/god-build-agent'
168
+ ]
169
+ },
170
+ {
171
+ id: 'collaborate',
172
+ label: 'Collaborate',
173
+ purpose: 'Coordinate people, workstreams, suites, sprints, and pull requests.',
174
+ commands: [
175
+ '/god-workstream',
176
+ '/god-suite-init',
177
+ '/god-suite-status',
178
+ '/god-suite-sync',
179
+ '/god-suite-patch',
180
+ '/god-suite-release',
181
+ '/god-party',
182
+ '/god-sprint',
183
+ '/god-pr-branch'
184
+ ]
185
+ },
186
+ {
187
+ id: 'configure',
188
+ label: 'Configure',
189
+ purpose: 'Tune settings, budgets, cache, profiles, help, and version info.',
190
+ commands: [
191
+ '/god-settings',
192
+ '/god-set-profile',
193
+ '/god-budget',
194
+ '/god-cost',
195
+ '/god-cache-clear',
196
+ '/god-automation-status',
197
+ '/god-automation-setup',
198
+ '/god-help',
199
+ '/god-version'
200
+ ]
201
+ }
202
+ ];
203
+
204
+ const STATUS_VIEWS = [
205
+ { id: 'overview', command: '/god-status', label: 'Overview', purpose: 'Operational state, proactive checks, and blockers.' },
206
+ { id: 'progress', command: '/god-progress', label: 'Progress', purpose: 'Requirement and roadmap increment completion.' },
207
+ { id: 'lifecycle', command: '/god-lifecycle', label: 'Lifecycle', purpose: 'Project phase and fitting workflows.' },
208
+ { id: 'locate', command: '/god-locate', label: 'Locate', purpose: 'Resume orientation from checkpoint and disk state.' },
209
+ { id: 'next', command: '/god-next', label: 'Next', purpose: 'Single recommended command with reason.' }
210
+ ];
211
+
212
+ const CAPTURE_LADDER = [
213
+ { id: 'note', command: '/god-note', signal: 'save only', purpose: 'Save a thought without priority or workflow impact.' },
214
+ { id: 'todo', command: '/god-add-todo', signal: 'actionable soon', purpose: 'Create a prioritized action item.' },
215
+ { id: 'backlog', command: '/god-add-backlog', signal: 'optional later', purpose: 'Park an idea for future roadmap review.' },
216
+ { id: 'seed', command: '/god-plant-seed', signal: 'conditional future trigger', purpose: 'Store an idea until a metric, date, or event happens.' }
217
+ ];
218
+
219
+ const WORK_SIZE_LADDER = [
220
+ { id: 'fast', command: '/god-fast', signal: 'trivial direct edit', purpose: 'One tiny edit with existing verification.' },
221
+ { id: 'quick', command: '/god-quick', signal: 'small TDD task', purpose: 'Small task with TDD and review but no full planning tier.' },
222
+ { id: 'story', command: '/god-story', signal: 'fine-grained planned slice', purpose: 'Create a STORY.md before implementation.' },
223
+ { id: 'feature', command: '/god-feature', signal: 'existing-product feature', purpose: 'Feature workflow with mini-PRD, build, harden, and sync.' },
224
+ { id: 'build', command: '/god-build', signal: 'current milestone work', purpose: 'Build the planned roadmap increment.' },
225
+ { id: 'debug', command: '/god-debug', signal: 'non-urgent bug', purpose: 'Run the systematic debug loop.' },
226
+ { id: 'hotfix', command: '/god-hotfix', signal: 'production outage', purpose: 'Expedited production fix and postmortem trigger.' }
227
+ ];
228
+
229
+ const VERIFY_LADDER = [
230
+ { id: 'lint', command: '/god-lint', signal: 'mechanical artifact check', purpose: 'Fast file-level artifact validation.' },
231
+ { id: 'standards', command: '/god-standards', signal: 'artifact quality gate', purpose: 'Substitution, labels, and have-nots for one artifact.' },
232
+ { id: 'review', command: '/god-review', signal: 'code diff review', purpose: 'Two-stage spec and quality review.' },
233
+ { id: 'runtime', command: '/god-test-runtime', signal: 'live behavior check', purpose: 'Browser-backed design and acceptance verification.' },
234
+ { id: 'audit', command: '/god-audit', signal: 'artifact set score', purpose: 'Score existing Godpowers artifacts.' },
235
+ { id: 'hygiene', command: '/god-hygiene', signal: 'ongoing project health', purpose: 'Composite audit, dependency, and docs check.' },
236
+ { id: 'preflight', command: '/god-preflight', signal: 'existing repo intake', purpose: 'Read-only readiness check before stronger workflows.' },
237
+ { id: 'dogfood', command: '/god-dogfood', signal: 'release fixture readiness', purpose: 'Messy-repo scenarios for release confidence.' }
238
+ ];
239
+
240
+ const TRIGGER_PRECEDENCE = {
241
+ continue: {
242
+ default: '/god-next',
243
+ conditional: [
244
+ { command: '/god-resume-work', when: 'handoff-exists', reason: 'A handoff exists on disk.' }
245
+ ],
246
+ reason: 'Continue means resume a handoff when present, otherwise compute the next route.'
247
+ },
248
+ 'think through': {
249
+ default: '/god-discuss',
250
+ conditional: [
251
+ { command: '/god-explore', when: 'broad-idea', reason: 'The request is broad ideation rather than a concrete decision.' }
252
+ ],
253
+ reason: 'Discussion handles concrete decisions while exploration handles broad ideation.'
254
+ },
255
+ 'what happened': {
256
+ default: '/god-logs',
257
+ conditional: [
258
+ { command: '/god-postmortem', when: 'post-incident-pending', reason: 'The project is waiting on incident follow-up.' }
259
+ ],
260
+ reason: 'Logs answer run history unless an incident loop is open.'
261
+ },
262
+ "what's done": {
263
+ default: '/god-progress',
264
+ conditional: [
265
+ { command: '/god-status', when: 'operational-status-request', reason: 'The wording asks for operational state, not deliverables.' }
266
+ ],
267
+ reason: 'Progress answers deliverables while status answers operational state.'
268
+ },
269
+ 'where am i': {
270
+ default: '/god-lifecycle',
271
+ conditional: [
272
+ { command: '/god-locate', when: 'checkpoint-or-handoff-exists', reason: 'Resume artifacts exist on disk.' }
273
+ ],
274
+ reason: 'Lifecycle explains the phase while locate orients a resumed session.'
275
+ }
276
+ };
277
+
278
+ function familyForCommand(command) {
279
+ return COMMAND_FAMILIES.find((family) => family.commands.includes(command)) || null;
280
+ }
281
+
282
+ function renderFamilyCards(families = COMMAND_FAMILIES) {
283
+ return families.map((family) => (
284
+ `${family.label}: ${family.purpose} (${family.commands.join(', ')})`
285
+ ));
286
+ }
287
+
288
+ function renderLadder(ladder) {
289
+ return ladder.map((step) => `${step.command}: ${step.signal} - ${step.purpose}`);
290
+ }
291
+
292
+ function detectCondition(condition, projectRoot, text = '') {
293
+ if (!condition) return false;
294
+ const root = projectRoot || process.cwd();
295
+ if (condition === 'handoff-exists') {
296
+ return fs.existsSync(path.join(root, '.godpowers', 'HANDOFF.md'));
297
+ }
298
+ if (condition === 'checkpoint-or-handoff-exists') {
299
+ return fs.existsSync(path.join(root, '.godpowers', 'CHECKPOINT.md'))
300
+ || fs.existsSync(path.join(root, '.godpowers', 'HANDOFF.md'));
301
+ }
302
+ if (condition === 'post-incident-pending') {
303
+ try {
304
+ const statePath = path.join(root, '.godpowers', 'state.json');
305
+ if (!fs.existsSync(statePath)) return false;
306
+ const parsed = JSON.parse(fs.readFileSync(statePath, 'utf8'));
307
+ return parsed['lifecycle-phase'] === 'post-incident-pending';
308
+ } catch (e) {
309
+ return false;
310
+ }
311
+ }
312
+ if (condition === 'broad-idea') {
313
+ return /\b(idea|brainstorm|explore|what if|possibilities|options)\b/i.test(text || '');
314
+ }
315
+ if (condition === 'operational-status-request') {
316
+ return /\b(status|state|blocked|sync|health|where)\b/i.test(text || '');
317
+ }
318
+ return false;
319
+ }
320
+
321
+ function resolveTrigger(trigger, opts = {}) {
322
+ const key = String(trigger || '').trim().toLowerCase();
323
+ const rule = TRIGGER_PRECEDENCE[key];
324
+ if (!rule) return null;
325
+ for (const branch of rule.conditional || []) {
326
+ if (detectCondition(branch.when, opts.projectRoot, opts.text)) {
327
+ return { trigger: key, command: branch.command, reason: branch.reason, rule };
328
+ }
329
+ }
330
+ return { trigger: key, command: rule.default, reason: rule.reason, rule };
331
+ }
332
+
333
+ function classifyCapture(text = '') {
334
+ if (/\b(when|if|after|in \d+|once)\b/i.test(text)) return CAPTURE_LADDER.find((item) => item.id === 'seed');
335
+ if (/\b(todo|task|remind|priority|p[0-3])\b/i.test(text)) return CAPTURE_LADDER.find((item) => item.id === 'todo');
336
+ if (/\b(backlog|later|someday|future)\b/i.test(text)) return CAPTURE_LADDER.find((item) => item.id === 'backlog');
337
+ return CAPTURE_LADDER.find((item) => item.id === 'note');
338
+ }
339
+
340
+ function classifyWorkSize(text = '') {
341
+ if (/\b(production|outage|down|urgent|hotfix)\b/i.test(text)) return WORK_SIZE_LADDER.find((item) => item.id === 'hotfix');
342
+ if (/\b(bug|debug|failing|error|regression)\b/i.test(text)) return WORK_SIZE_LADDER.find((item) => item.id === 'debug');
343
+ if (/\b(story|acceptance criteria)\b/i.test(text)) return WORK_SIZE_LADDER.find((item) => item.id === 'story');
344
+ if (/\b(feature|new capability|enhancement)\b/i.test(text)) return WORK_SIZE_LADDER.find((item) => item.id === 'feature');
345
+ if (/\b(milestone|roadmap|increment)\b/i.test(text)) return WORK_SIZE_LADDER.find((item) => item.id === 'build');
346
+ if (/\b(tiny|typo|one-line|config tweak|trivial)\b/i.test(text)) return WORK_SIZE_LADDER.find((item) => item.id === 'fast');
347
+ return WORK_SIZE_LADDER.find((item) => item.id === 'quick');
348
+ }
349
+
350
+ function classifyVerification(text = '') {
351
+ if (/\b(dogfood|release readiness|fixture)\b/i.test(text)) return VERIFY_LADDER.find((item) => item.id === 'dogfood');
352
+ if (/\b(preflight|intake|existing repo)\b/i.test(text)) return VERIFY_LADDER.find((item) => item.id === 'preflight');
353
+ if (/\b(hygiene|health|weekly|monthly)\b/i.test(text)) return VERIFY_LADDER.find((item) => item.id === 'hygiene');
354
+ if (/\b(audit|score artifacts)\b/i.test(text)) return VERIFY_LADDER.find((item) => item.id === 'audit');
355
+ if (/\b(runtime|browser|e2e|flow|render|design audit)\b/i.test(text)) return VERIFY_LADDER.find((item) => item.id === 'runtime');
356
+ if (/\b(review|diff|code review)\b/i.test(text)) return VERIFY_LADDER.find((item) => item.id === 'review');
357
+ if (/\b(standard|substitution|have-nots)\b/i.test(text)) return VERIFY_LADDER.find((item) => item.id === 'standards');
358
+ return VERIFY_LADDER.find((item) => item.id === 'lint');
359
+ }
360
+
361
+ module.exports = {
362
+ COMMAND_FAMILIES,
363
+ STATUS_VIEWS,
364
+ CAPTURE_LADDER,
365
+ WORK_SIZE_LADDER,
366
+ VERIFY_LADDER,
367
+ TRIGGER_PRECEDENCE,
368
+ familyForCommand,
369
+ renderFamilyCards,
370
+ renderLadder,
371
+ resolveTrigger,
372
+ classifyCapture,
373
+ classifyWorkSize,
374
+ classifyVerification
375
+ };