godpowers 1.6.10 → 1.6.12
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 +70 -0
- package/README.md +30 -5
- package/RELEASE.md +63 -69
- package/SKILL.md +144 -3
- package/agents/god-coordinator.md +1 -1
- package/agents/god-orchestrator.md +125 -14
- package/agents/god-updater.md +51 -2
- package/bin/install.js +53 -3
- package/lib/dashboard.js +296 -0
- package/package.json +2 -2
- package/skills/god-arch.md +1 -1
- package/skills/god-audit.md +1 -1
- package/skills/god-debug.md +1 -1
- package/skills/god-deploy.md +1 -1
- package/skills/god-docs.md +22 -0
- package/skills/god-harden.md +1 -1
- package/skills/god-launch.md +1 -1
- package/skills/god-mode.md +40 -11
- package/skills/god-next.md +79 -3
- package/skills/god-observe.md +1 -1
- package/skills/god-party.md +1 -1
- package/skills/god-prd.md +1 -1
- package/skills/god-repo.md +1 -1
- package/skills/god-review-changes.md +17 -0
- package/skills/god-review.md +1 -1
- package/skills/god-roadmap.md +1 -1
- package/skills/god-scan.md +24 -0
- package/skills/god-stack.md +1 -1
- package/skills/god-status.md +72 -11
- package/skills/god-sync.md +34 -1
- package/skills/god-test-runtime.md +26 -0
|
@@ -190,6 +190,11 @@ pillar sync work with `lib/pillars.planArtifactSync(projectRoot, artifacts,
|
|
|
190
190
|
apply the pillar updates immediately and log the action to
|
|
191
191
|
`.godpowers/YOLO-DECISIONS.md`.
|
|
192
192
|
|
|
193
|
+
Whenever Pillars sync is auto-invoked, show an auto-invoked status card. Say
|
|
194
|
+
whether this was an agent spawn or a local runtime call. For Pillars sync the
|
|
195
|
+
agent is usually `none, local runtime only` unless the current workflow
|
|
196
|
+
explicitly spawned `god-context-writer`.
|
|
197
|
+
|
|
193
198
|
Before or alongside that import, write `.godpowers/prep/INITIAL-FINDINGS.md`
|
|
194
199
|
using `templates/INITIAL-FINDINGS.md`. This artifact records what Godpowers
|
|
195
200
|
observed directly during init:
|
|
@@ -277,6 +282,44 @@ This is the third layer of decision support:
|
|
|
277
282
|
2. **Recipes** (`<runtimeRoot>/routing/recipes/<recipe>.yaml`): scenario-based sequences
|
|
278
283
|
3. **Standards** (god-standards-check): quality gates between stages
|
|
279
284
|
|
|
285
|
+
## Proactive Auto-Invoke Matrix
|
|
286
|
+
|
|
287
|
+
Before every user-visible closeout, and after every successful state mutation,
|
|
288
|
+
evaluate the master auto-invoke policy against disk state. The goal is to keep
|
|
289
|
+
Godpowers moving intelligently without hiding work from the user.
|
|
290
|
+
|
|
291
|
+
| Level | Default behavior | Orchestrator action |
|
|
292
|
+
|---|---|---|
|
|
293
|
+
| 1 | Auto-suggest | Compute `/god-next`, review queues, hygiene age, and status summary |
|
|
294
|
+
| 2 | Auto-run local helper | Run checkpoint, linkage, Pillars planning, context dry-run, or progress refresh |
|
|
295
|
+
| 3 | Auto-spawn bounded agent | Spawn only when trigger is direct and the workflow scope owns that surface |
|
|
296
|
+
| 4 | Require approval | Pause or list the exact user decision needed |
|
|
297
|
+
|
|
298
|
+
Use this trigger map:
|
|
299
|
+
|
|
300
|
+
| Trigger | Auto action | Visibility |
|
|
301
|
+
|---|---|---|
|
|
302
|
+
| `state.json` or `PROGRESS.md` changed | refresh `.godpowers/CHECKPOINT.md` | `Auto-invoked:` local runtime only |
|
|
303
|
+
| code or artifact files changed | run lightweight reverse-sync or spawn `god-updater` for workflow closeout | `Sync status:` |
|
|
304
|
+
| durable artifact truth changed | run Pillars sync plan | `Auto-invoked:` local runtime only |
|
|
305
|
+
| AI tool instruction files changed | spawn or dry-run `god-context-writer` | `Auto-invoked:` |
|
|
306
|
+
| `REVIEW-REQUIRED.md` gains entries | suggest `/god-review-changes` | closeout proposition |
|
|
307
|
+
| `DESIGN.md` or `PRODUCT.md` changed | spawn `god-design-reviewer` | gate card before propagation |
|
|
308
|
+
| docs and code both changed | spawn `god-docs-writer` in drift-check mode when current workflow owns docs, otherwise suggest `/god-docs` | `Auto-invoked:` or proposition |
|
|
309
|
+
| frontend-visible files changed and a known URL exists | spawn `god-browser-tester` inside build, design, launch, harden, or explicit runtime workflows | runtime status card |
|
|
310
|
+
| frontend-visible files changed and no known URL exists | suggest `/god-test-runtime` with local URL setup, defer deployed URL | proposition |
|
|
311
|
+
| security-sensitive files changed | auto-spawn only inside harden, hotfix, launch, or project run; otherwise suggest `/god-harden` | proposition |
|
|
312
|
+
| dependency files changed | auto-spawn only inside update-deps, hygiene, or approved project run; otherwise suggest `/god-update-deps` | proposition |
|
|
313
|
+
| full project run complete or hygiene stale | suggest `/god-hygiene` | proposition |
|
|
314
|
+
|
|
315
|
+
Never use this matrix to auto-run Level 4 actions: deployed staging against a
|
|
316
|
+
guessed URL, production launch, provider dashboard access, broad dependency
|
|
317
|
+
upgrades, destructive repair, review clearing, Critical security acceptance, or
|
|
318
|
+
git stage, commit, push, package, release, or publish.
|
|
319
|
+
|
|
320
|
+
Every auto action must emit either `Auto-invoked:`, `Sync status:`, or a
|
|
321
|
+
proposition explaining why it did not run.
|
|
322
|
+
|
|
280
323
|
## Detection-Driven Tier 1 Routing
|
|
281
324
|
|
|
282
325
|
After PRD and before ARCH, branch on UI or product-experience presence:
|
|
@@ -496,8 +539,8 @@ requested or final sign-off begins.
|
|
|
496
539
|
5. Spawn the appropriate specialist agent in a fresh context
|
|
497
540
|
6. Verify their output exists on disk
|
|
498
541
|
7. Run have-nots check on the artifact
|
|
499
|
-
8. If pass: update PROGRESS.md, sync CHECKPOINT.md,
|
|
500
|
-
card, then move to next sub-step
|
|
542
|
+
8. If pass: update PROGRESS.md, sync CHECKPOINT.md, run the proactive
|
|
543
|
+
auto-invoke sweep, print the "Step result" card, then move to next sub-step
|
|
501
544
|
9. If fail and repairable: print the failed result card, then enter the
|
|
502
545
|
autonomous repair loop
|
|
503
546
|
10. If fail and human-only: pause with the smallest needed question
|
|
@@ -522,7 +565,8 @@ For single-agent sub-steps:
|
|
|
522
565
|
| Harden | god-harden-auditor | code | .godpowers/harden/FINDINGS.md |
|
|
523
566
|
|
|
524
567
|
For all single-agent sub-steps:
|
|
525
|
-
1. Spawn the agent in a fresh context
|
|
568
|
+
1. Spawn the agent in a fresh context using the host platform's native agent
|
|
569
|
+
spawning mechanism
|
|
526
570
|
2. Pass `--yolo` flag if active so the agent auto-picks defaults
|
|
527
571
|
3. Wait for the agent to return
|
|
528
572
|
4. Verify artifact exists on disk
|
|
@@ -602,6 +646,21 @@ Before declaring the project run complete, ALWAYS run /god-sync:
|
|
|
602
646
|
3. Update SYNC-LOG.md with the project-run completion entry
|
|
603
647
|
4. Update state.json with all final tier statuses
|
|
604
648
|
|
|
649
|
+
Display the sync status before the final completion block:
|
|
650
|
+
|
|
651
|
+
```
|
|
652
|
+
Sync status:
|
|
653
|
+
Trigger: /god-mode final sync
|
|
654
|
+
Agent: god-updater spawned
|
|
655
|
+
Local syncs:
|
|
656
|
+
+ reverse-sync: <counts and result>
|
|
657
|
+
+ pillars-sync: <counts and result>
|
|
658
|
+
+ checkpoint-sync: <created, updated, no-op, or skipped>
|
|
659
|
+
+ context-refresh: <spawned, no-op, or skipped>
|
|
660
|
+
Artifacts: <changed files or no-op>
|
|
661
|
+
Log: .godpowers/SYNC-LOG.md
|
|
662
|
+
```
|
|
663
|
+
|
|
605
664
|
This step runs regardless of flags:
|
|
606
665
|
- /god-mode -> sync runs
|
|
607
666
|
- /god-mode --yolo -> sync runs (no pause; auto-applies)
|
|
@@ -617,12 +676,16 @@ across all 14 categories.
|
|
|
617
676
|
|
|
618
677
|
After Launch completes, write a transition message:
|
|
619
678
|
|
|
620
|
-
```
|
|
679
|
+
```text
|
|
621
680
|
Godpowers project run complete.
|
|
622
681
|
|
|
682
|
+
Godpowers Dashboard
|
|
683
|
+
|
|
623
684
|
Current status:
|
|
624
685
|
State: complete
|
|
625
|
-
|
|
686
|
+
Phase: <plain-language phase> (tier <human ordinal> of <human total>)
|
|
687
|
+
Step: <sub-step label> (step <n> of <total steps>)
|
|
688
|
+
Progress: <pct>% (<done> of <total> steps complete)
|
|
626
689
|
Worktree: <clean | modified files unstaged | staged changes | mixed>
|
|
627
690
|
Index: <untouched | staged files listed>
|
|
628
691
|
|
|
@@ -639,6 +702,16 @@ What changed:
|
|
|
639
702
|
Validation:
|
|
640
703
|
+ <command>: <result>
|
|
641
704
|
|
|
705
|
+
Proactive checks:
|
|
706
|
+
Checkpoint: <fresh | refreshed | stale>
|
|
707
|
+
Reviews: <none | N pending, suggest /god-review-changes>
|
|
708
|
+
Sync: <fresh | suggested | local helper ran>
|
|
709
|
+
Docs: <fresh | suggested | drift-check spawned>
|
|
710
|
+
Runtime: <not-applicable | suggested | browser test spawned>
|
|
711
|
+
Security: <clear | suggested | harden spawned>
|
|
712
|
+
Dependencies: <clear | suggested | deps audit spawned>
|
|
713
|
+
Hygiene: <fresh | suggest /god-hygiene>
|
|
714
|
+
|
|
642
715
|
Open items:
|
|
643
716
|
1. <none, or deployed staging deferred, pending review, unstaged files, etc.>
|
|
644
717
|
|
|
@@ -668,6 +741,11 @@ Proposition:
|
|
|
668
741
|
4. Run deployed staging: provide STAGING_APP_URL=<deployed staging origin> when needed
|
|
669
742
|
```
|
|
670
743
|
|
|
744
|
+
Generate the dashboard with `lib/dashboard.compute(projectRoot)` and
|
|
745
|
+
`lib/dashboard.render(result)` when the runtime bundle is available. If the
|
|
746
|
+
runtime module cannot be loaded, fall back to a manual disk scan and say
|
|
747
|
+
`Dashboard engine: unavailable, manual scan used`.
|
|
748
|
+
|
|
671
749
|
Update PROGRESS.md status to `steady-state-active`.
|
|
672
750
|
|
|
673
751
|
For focused brownfield, hotfix, refactor, or build workflows that finish without a
|
|
@@ -785,11 +863,14 @@ Show:
|
|
|
785
863
|
- concise phase status
|
|
786
864
|
- before each visible tier/sub-step, a short "what will happen" card
|
|
787
865
|
- after each visible tier/sub-step, a short "what happened" card
|
|
866
|
+
- every auto-invoked command, agent, and local runtime helper using an
|
|
867
|
+
`Auto-invoked:` or `Sync status:` card
|
|
788
868
|
- durable state detected from disk
|
|
789
869
|
- commands being run and whether they passed or failed
|
|
790
870
|
- scoped file changes
|
|
791
871
|
- final validation summary
|
|
792
|
-
- final
|
|
872
|
+
- final Godpowers Dashboard from disk, including phase, tier, step, progress,
|
|
873
|
+
lifecycle, planning visibility, proactive checks, open items,
|
|
793
874
|
worktree/index state, and recommended next action
|
|
794
875
|
- plain-language workflow names. Say "project run" or "workflow" instead of
|
|
795
876
|
unexplained "arc" in visible output
|
|
@@ -797,7 +878,7 @@ Show:
|
|
|
797
878
|
- `Project run complete` or `PAUSE: external access required`
|
|
798
879
|
|
|
799
880
|
Hide:
|
|
800
|
-
- raw
|
|
881
|
+
- raw spawn input
|
|
801
882
|
- "Hard instructions" sections
|
|
802
883
|
- spawned-agent prompt text
|
|
803
884
|
- system, developer, AGENTS.md, or internal policy recitations
|
|
@@ -809,6 +890,36 @@ user-facing question. Do not expose the rule itself. Example: ask for
|
|
|
809
890
|
`STAGING_APP_URL=<deployed staging origin>` at final sign-off rather than
|
|
810
891
|
showing the Shipping Closure Protocol.
|
|
811
892
|
|
|
893
|
+
### Auto-Invoked Work Cards
|
|
894
|
+
|
|
895
|
+
Every automatic step that mutates state, writes artifacts, validates gates, or
|
|
896
|
+
spawns an agent must leave a visible trace in the transcript.
|
|
897
|
+
|
|
898
|
+
Use this shape:
|
|
899
|
+
|
|
900
|
+
```
|
|
901
|
+
Auto-invoked:
|
|
902
|
+
Trigger: <event that caused the automatic step>
|
|
903
|
+
Agent: <agent name, or none, local runtime only>
|
|
904
|
+
Local syncs:
|
|
905
|
+
+ <helper>: <result>
|
|
906
|
+
Artifacts: <changed files, no-op, or deferred>
|
|
907
|
+
Log: <path, or none>
|
|
908
|
+
```
|
|
909
|
+
|
|
910
|
+
Required auto-invoked cards:
|
|
911
|
+
- `/god-preflight` started automatically for brownfield or bluefield work
|
|
912
|
+
- standards checks between routed stages
|
|
913
|
+
- design-reviewer checks after DESIGN.md or PRODUCT.md changes
|
|
914
|
+
- `god-updater` spawned for reverse-sync or final sync
|
|
915
|
+
- local `lib/reverse-sync.run` calls, including `/god-scan`
|
|
916
|
+
- Pillars sync through `lib/pillars.pillarizeExisting` or
|
|
917
|
+
`lib/pillars.applyArtifactSync`
|
|
918
|
+
- checkpoint refresh through `lib/checkpoint.syncFromState`
|
|
919
|
+
- AI-tool context refresh through `god-context-writer`
|
|
920
|
+
|
|
921
|
+
If an automatic step is skipped, still report it with the skipped reason.
|
|
922
|
+
|
|
812
923
|
## Step Narration Protocol
|
|
813
924
|
|
|
814
925
|
Godpowers must make its work trackable without exposing hidden prompts or
|
|
@@ -817,11 +928,11 @@ one compact card.
|
|
|
817
928
|
|
|
818
929
|
Before starting a tier/sub-step:
|
|
819
930
|
|
|
820
|
-
```
|
|
931
|
+
```text
|
|
821
932
|
Next step
|
|
822
|
-
|
|
823
|
-
Tier: <tier-number> <tier-label>
|
|
933
|
+
Phase: <plain-language phase> (tier <human ordinal> of <human total>)
|
|
824
934
|
Step: <sub-step-label>
|
|
935
|
+
Progress: <pct>% (<done> of <total> steps complete; step <n> of <total>)
|
|
825
936
|
Why this now: <one sentence tied to disk state or the prior gate>
|
|
826
937
|
What will happen:
|
|
827
938
|
1. <first observable action>
|
|
@@ -832,11 +943,11 @@ Expected output: <artifact path or verification result>
|
|
|
832
943
|
|
|
833
944
|
After a tier/sub-step completes or pauses:
|
|
834
945
|
|
|
835
|
-
```
|
|
946
|
+
```text
|
|
836
947
|
Step result
|
|
837
|
-
|
|
838
|
-
Tier: <tier-number> <tier-label>
|
|
948
|
+
Phase: <plain-language phase> (tier <human ordinal> of <human total>)
|
|
839
949
|
Step: <sub-step-label>
|
|
950
|
+
Progress: <pct>% (<done> of <total> steps complete; step <n> of <total>)
|
|
840
951
|
Result: <done | blocked | failed | skipped | imported>
|
|
841
952
|
What happened:
|
|
842
953
|
1. <observable action completed>
|
|
@@ -850,7 +961,7 @@ Rules:
|
|
|
850
961
|
- Use `lib/state.progressSummary(stateJson)` for the percentage and step count
|
|
851
962
|
whenever state.json is available.
|
|
852
963
|
- Use artifact paths and verification evidence from disk, not memory.
|
|
853
|
-
- Do not print raw
|
|
964
|
+
- Do not print raw spawn input, hidden instructions, or full file loadout lists.
|
|
854
965
|
- If a step is blocked, do not show a generic "Suggested next"; show the
|
|
855
966
|
smallest concrete unblock action.
|
|
856
967
|
|
package/agents/god-updater.md
CHANGED
|
@@ -111,6 +111,12 @@ After feature work, every artifact that was impacted needs to reflect reality.
|
|
|
111
111
|
`drift-count`, `review-required-items`
|
|
112
112
|
- Emit events: `linkage.snapshot`, `drift.detected` (per finding),
|
|
113
113
|
`review-required.populated`
|
|
114
|
+
- Report counts in the final sync status:
|
|
115
|
+
- scanned files
|
|
116
|
+
- links added, removed, or unchanged
|
|
117
|
+
- fenced footers updated
|
|
118
|
+
- drift findings
|
|
119
|
+
- REVIEW-REQUIRED.md items created
|
|
114
120
|
|
|
115
121
|
### Pillars sync (native context)
|
|
116
122
|
- Call `lib/pillars.pillarizeExisting(projectRoot)` if Pillars is absent or
|
|
@@ -122,6 +128,8 @@ After feature work, every artifact that was impacted needs to reflect reality.
|
|
|
122
128
|
immediately and log the decision to `.godpowers/YOLO-DECISIONS.md`.
|
|
123
129
|
- Never read every file in `agents/` as project context. Only files with
|
|
124
130
|
`pillar:` frontmatter are Pillars files.
|
|
131
|
+
- Report whether Pillars work was initialized, applied, proposed, skipped, or
|
|
132
|
+
no-op.
|
|
125
133
|
|
|
126
134
|
### AI-tool context refresh (always, unless never-ask)
|
|
127
135
|
- Read `state.json` for `project.context-prompt-answered`
|
|
@@ -134,16 +142,36 @@ After feature work, every artifact that was impacted needs to reflect reality.
|
|
|
134
142
|
- Idempotent: if content matches, no write occurs
|
|
135
143
|
- Never touches content outside the `<!-- godpowers:begin -->` /
|
|
136
144
|
`<!-- godpowers:end -->` fence
|
|
145
|
+
- Report whether context refresh spawned `god-context-writer`, changed files,
|
|
146
|
+
no-oped, or skipped because the project opted out.
|
|
147
|
+
|
|
148
|
+
### Checkpoint sync
|
|
149
|
+
- After state changes, refresh `.godpowers/CHECKPOINT.md` from disk state using
|
|
150
|
+
`lib/checkpoint.syncFromState(projectRoot, { nextCommand, nextReason })`
|
|
151
|
+
when the runtime is available.
|
|
152
|
+
- If checkpoint sync is unavailable in the host tool, say it was skipped and
|
|
153
|
+
include the reason.
|
|
154
|
+
- Report the checkpoint path and whether it was created, updated, unchanged,
|
|
155
|
+
or skipped.
|
|
137
156
|
|
|
138
157
|
## Output
|
|
139
158
|
|
|
140
|
-
Write summary to `.godpowers/SYNC-LOG.md` (append-only)
|
|
159
|
+
Write summary to `.godpowers/SYNC-LOG.md` (append-only). The summary must
|
|
160
|
+
include both user-visible status and machine-checkable counts:
|
|
141
161
|
|
|
142
162
|
```markdown
|
|
143
163
|
## Sync: [intent] [timestamp]
|
|
144
164
|
|
|
145
165
|
Triggered by: [recipe name]
|
|
146
166
|
|
|
167
|
+
Sync status:
|
|
168
|
+
- Trigger: [manual /god-sync | /god-mode final sync | recipe closeout]
|
|
169
|
+
- Agent: god-updater
|
|
170
|
+
- Reverse-sync: scanned [N] files, updated [N] footers, created [N] review items
|
|
171
|
+
- Pillars sync: [applied/proposed/no-op/skipped], [N] pillar files
|
|
172
|
+
- Checkpoint sync: [created/updated/no-op/skipped] .godpowers/CHECKPOINT.md
|
|
173
|
+
- Context refresh: [spawned god-context-writer/no-op/skipped], [N] files
|
|
174
|
+
|
|
147
175
|
Updated:
|
|
148
176
|
- prd/PRD.md: added requirement P-MUST-12
|
|
149
177
|
- arch/ARCH.md: added ADR-007 (auth refactor)
|
|
@@ -157,11 +185,32 @@ Updated:
|
|
|
157
185
|
|
|
158
186
|
Have-nots re-validated: all passing.
|
|
159
187
|
|
|
160
|
-
|
|
188
|
+
Next: /god-status
|
|
161
189
|
```
|
|
162
190
|
|
|
163
191
|
Update PROGRESS.md with the latest tier statuses.
|
|
164
192
|
|
|
193
|
+
Return a compact user-facing closeout in the same shape:
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
Sync complete.
|
|
197
|
+
|
|
198
|
+
Sync status:
|
|
199
|
+
Trigger: <trigger>
|
|
200
|
+
Agent: god-updater
|
|
201
|
+
Local syncs:
|
|
202
|
+
+ reverse-sync: <counts and result>
|
|
203
|
+
+ pillars-sync: <counts and result>
|
|
204
|
+
+ checkpoint-sync: <created, updated, no-op, or skipped>
|
|
205
|
+
+ context-refresh: <spawned, no-op, or skipped>
|
|
206
|
+
Artifacts: <changed files or no-op>
|
|
207
|
+
Log: .godpowers/SYNC-LOG.md
|
|
208
|
+
|
|
209
|
+
Next:
|
|
210
|
+
Recommended: /god-status
|
|
211
|
+
Why: confirm the disk-derived project state after sync.
|
|
212
|
+
```
|
|
213
|
+
|
|
165
214
|
## Have-Nots
|
|
166
215
|
|
|
167
216
|
Sync FAILS if:
|
package/bin/install.js
CHANGED
|
@@ -186,6 +186,9 @@ function installSkillFile(srcFile, skillsDest, runtimeKey, targetName = null) {
|
|
|
186
186
|
const baseName = targetName || path.basename(srcFile, '.md');
|
|
187
187
|
if (runtimeKey === 'codex') {
|
|
188
188
|
const skillDir = path.join(skillsDest, baseName);
|
|
189
|
+
if (fs.existsSync(skillDir)) {
|
|
190
|
+
fs.rmSync(skillDir, { recursive: true, force: true });
|
|
191
|
+
}
|
|
189
192
|
ensureDir(skillDir);
|
|
190
193
|
fs.copyFileSync(srcFile, path.join(skillDir, 'SKILL.md'));
|
|
191
194
|
return;
|
|
@@ -297,6 +300,9 @@ function removeSkillEntry(skillsDir, entry) {
|
|
|
297
300
|
function parseArgs(argv) {
|
|
298
301
|
const args = argv.slice(2);
|
|
299
302
|
const opts = {
|
|
303
|
+
command: null,
|
|
304
|
+
project: process.cwd(),
|
|
305
|
+
json: false,
|
|
300
306
|
runtimes: [],
|
|
301
307
|
global: false,
|
|
302
308
|
local: false,
|
|
@@ -305,8 +311,22 @@ function parseArgs(argv) {
|
|
|
305
311
|
uninstall: false,
|
|
306
312
|
};
|
|
307
313
|
|
|
308
|
-
for (
|
|
314
|
+
for (let i = 0; i < args.length; i++) {
|
|
315
|
+
const arg = args[i];
|
|
309
316
|
switch (arg) {
|
|
317
|
+
case 'status':
|
|
318
|
+
case 'next':
|
|
319
|
+
opts.command = arg;
|
|
320
|
+
break;
|
|
321
|
+
case '--json':
|
|
322
|
+
opts.json = true;
|
|
323
|
+
break;
|
|
324
|
+
case '--project':
|
|
325
|
+
if (args[i + 1]) {
|
|
326
|
+
opts.project = path.resolve(args[i + 1]);
|
|
327
|
+
i++;
|
|
328
|
+
}
|
|
329
|
+
break;
|
|
310
330
|
case '-g':
|
|
311
331
|
case '--global':
|
|
312
332
|
opts.global = true;
|
|
@@ -327,7 +347,9 @@ function parseArgs(argv) {
|
|
|
327
347
|
opts.uninstall = true;
|
|
328
348
|
break;
|
|
329
349
|
default:
|
|
330
|
-
if (arg.startsWith('--')
|
|
350
|
+
if (arg.startsWith('--project=')) {
|
|
351
|
+
opts.project = path.resolve(arg.slice('--project='.length));
|
|
352
|
+
} else if (arg.startsWith('--') && RUNTIMES[arg.slice(2)]) {
|
|
331
353
|
opts.runtimes.push(arg.slice(2));
|
|
332
354
|
}
|
|
333
355
|
break;
|
|
@@ -545,8 +567,14 @@ function uninstallForRuntime(runtimeKey, opts = {}) {
|
|
|
545
567
|
|
|
546
568
|
function showHelp() {
|
|
547
569
|
console.log(BANNER);
|
|
548
|
-
log('Usage: npx godpowers [options]\n');
|
|
570
|
+
log('Usage: npx godpowers [command] [options]\n');
|
|
571
|
+
log('Commands:');
|
|
572
|
+
log(' status Show the Godpowers Dashboard for a project');
|
|
573
|
+
log(' next Show the dashboard and recommended next command');
|
|
574
|
+
log('');
|
|
549
575
|
log('Options:');
|
|
576
|
+
log(' --project=<path> Project root for status or next (default: cwd)');
|
|
577
|
+
log(' --json Emit JSON for status or next');
|
|
550
578
|
log(' -g, --global Install globally (to config directory)');
|
|
551
579
|
log(' -l, --local Install locally (to current directory)');
|
|
552
580
|
log(' --claude Install for Claude Code');
|
|
@@ -569,11 +597,28 @@ function showHelp() {
|
|
|
569
597
|
log(' -h, --help Show this help message');
|
|
570
598
|
log('');
|
|
571
599
|
log('Examples:');
|
|
600
|
+
log(' npx godpowers status --project=.');
|
|
601
|
+
log(' npx godpowers next --project=.');
|
|
572
602
|
log(' npx godpowers --claude --global');
|
|
573
603
|
log(' npx godpowers --all');
|
|
574
604
|
log(' npx godpowers --codex --cursor');
|
|
575
605
|
}
|
|
576
606
|
|
|
607
|
+
function runDashboardCommand(opts) {
|
|
608
|
+
const dashboard = require('../lib/dashboard');
|
|
609
|
+
const result = dashboard.compute(opts.project);
|
|
610
|
+
if (opts.json) {
|
|
611
|
+
console.log(JSON.stringify(result, null, 2));
|
|
612
|
+
} else {
|
|
613
|
+
console.log(dashboard.render(result));
|
|
614
|
+
if (opts.command === 'next') {
|
|
615
|
+
console.log('');
|
|
616
|
+
console.log('Suggested next command:');
|
|
617
|
+
console.log(` ${result.next && result.next.command ? result.next.command : 'describe the next intent'}`);
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
|
|
577
622
|
// ---------------------------------------------------------------------------
|
|
578
623
|
// Main
|
|
579
624
|
// ---------------------------------------------------------------------------
|
|
@@ -586,6 +631,11 @@ function main() {
|
|
|
586
631
|
process.exit(0);
|
|
587
632
|
}
|
|
588
633
|
|
|
634
|
+
if (opts.command === 'status' || opts.command === 'next') {
|
|
635
|
+
runDashboardCommand(opts);
|
|
636
|
+
return;
|
|
637
|
+
}
|
|
638
|
+
|
|
589
639
|
console.log(BANNER);
|
|
590
640
|
|
|
591
641
|
const srcDir = path.resolve(__dirname, '..');
|