Skip to content

Commit bac3bc5

Browse files
committed
feat: operationalize Superpowers phase map
- install all upstream Superpowers companion skill files - add a real brainstorming/spec gate before implementation planning - preserve executable modes for companion support scripts - expand workflow docs, examples, validation, and smoke coverage
1 parent dd05230 commit bac3bc5

31 files changed

Lines changed: 1446 additions & 215 deletions

README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,24 @@ Telegram / mobile request
1616
-> Hermes gateway or OpenClaw workspace skill
1717
-> classify task
1818
-> choose worker-routing: Codex / Claude / split
19+
-> Brainstorming Gate when scope is broad or risky
1920
-> spec gate
2021
-> implementation-plan gate
2122
-> implementation
22-
-> subagent review
23+
-> independent review and review intake
2324
-> verification
25+
-> branch closeout option
2426
-> report
2527
```
2628

2729
![basd-coding-dispatch workflow](assets/flow-diagram.svg)
2830

31+
## Superpowers Phase Map
32+
33+
`basd-coding-dispatch` integrates Superpowers phase-by-phase. `brainstorming` is a real gate before implementation planning for broad, ambiguous, user-facing, workflow, architecture, UI/design, public-doc, or public-claim work; exact low-risk tiny fixes stay lightweight and use only a micro-brainstorm when ambiguity exists.
34+
35+
Hermes and OpenClaw installs include the complete pinned upstream directories for all 14 Superpowers skills by default as companion skills: session activation, brainstorming, worktrees, planning, execution, parallel dispatch, TDD, systematic debugging, review request, review intake, verification, branch closeout, and skill-writing. Use `--skip-companion-skills` or `--no-companion-skills` for core-only or offline installs.
36+
2937
## Prerequisites
3038

3139
- Hermes or OpenClaw is already installed and authenticated for the runtime you plan to use.
@@ -75,7 +83,7 @@ npx basd-coding-dispatch validate
7583

7684
## What gets installed
7785

78-
Hermes and OpenClaw targets install `skills/basd-coding-dispatch/` as a self-contained skill, including `SKILL.md` and skill-local `references/`. By default, they also install pinned companion skills from `integrations/companion-skills.json` when those skills are missing: Hermes Codex/Claude Code worker guides plus the Superpowers process skills used for planning, review, TDD, debugging, and verification. Default companion installs fetch from `raw.githubusercontent.com`, so they require network access to GitHub raw content.
86+
Hermes and OpenClaw targets install `skills/basd-coding-dispatch/` as a self-contained skill, including `SKILL.md` and skill-local `references/`. By default, they also install pinned companion skills from `integrations/companion-skills.json` when those skills are missing: Hermes Codex/Claude Code worker guides plus complete upstream Superpowers skill directories used for activation, brainstorming, worktrees, planning, execution, parallel dispatch, review request, review intake, TDD, systematic debugging, verification, branch closeout, and skill-writing. Default companion installs fetch from `raw.githubusercontent.com`, so they require network access to GitHub raw content.
7987

8088
Existing companion skills are skipped unless `--force` is provided. Existing core `basd-coding-dispatch` files still block the install unless `--force` is provided. Use `--skip-companion-skills` or `--no-companion-skills` for the offline/core-only path.
8189

@@ -91,7 +99,7 @@ For OpenClaw, `--dir <path>` writes to that workspace root under `<path>/skills/
9199

92100
## Adaptation Status
93101

94-
Hermes is the flagship install path for v0.1. OpenClaw support is based on the verified local workspace-skill layout: `openclaw skills info aeo-geo` reports source `openclaw-workspace` and a path under `~/openclaw-workspace/skills/...`. Other harnesses remain manual or experimental adapters until their native install paths are validated.
102+
Hermes is the flagship install path for v0.1. OpenClaw support is based on the verified local workspace-skill layout: `openclaw skills info <skill-name>` reports source `openclaw-workspace` and a path under `~/openclaw-workspace/skills/...` for workspace-installed skills. Other harnesses remain manual or experimental adapters until their native install paths are validated.
95103

96104
| Target | Status | Install notes |
97105
| --- | --- | --- |
@@ -106,16 +114,21 @@ Hermes is the flagship install path for v0.1. OpenClaw support is based on the v
106114
## Quality Gates
107115

108116
- Classify the request before choosing a worker-routing shape.
117+
- Declare the Superpowers Activation Map for the work shape.
109118
- Select one of the quality profiles (`tiny-fix`, `standard-feature`, `risky-release`, `mobile-ui`, `backend-api`, `cli-package`, or `public-docs`) and auto-escalate gates when the work reveals more risk.
110119
- Produce a spec gate for ambiguous work.
120+
- Run the Brainstorming Gate before implementation planning for broad, ambiguous, user-facing, workflow, architecture, UI/design, public-doc, or public-claim work.
111121
- Produce an implementation-plan gate before feature code.
112122
- Run the human plan-lint checklist for feature, risky, public, cross-module, or ambiguous work.
123+
- Use `executing-plans`, `subagent-driven-development`, or `dispatching-parallel-agents` according to task shape.
113124
- Keep worker-routing mechanics in `references/` and `integrations/`, not in the portable skill body.
114125
- Use lightweight independent review for tiny fixes and fuller independent review for meaningful implementation work.
126+
- Run review intake before fix loops.
115127
- Include untracked files and verification output in reviewer packets.
116128
- Preserve valid bonus findings as backlog/input instead of discarding them.
117129
- Record Superpowers evidence when those skills are used, or state the compensation gates when a required skill/reference is unavailable.
118130
- Verify with concrete commands, transcripts, examples, or screenshots before reporting done.
131+
- Present explicit branch closeout options and respect no-push/no-publish/no-PR branch policy unless approval is granted.
119132
- Keep public repo files free of private paths, credentials, private client data, and unvalidated provider metadata.
120133
- A2 run manifest / gate ledger is intentionally not introduced as a v0.1 requirement.
121134

@@ -129,7 +142,7 @@ The deterministic workflow evals assert process guarantees without calling an LL
129142
npm run workflow-evals
130143
```
131144

132-
They check that quality profiles require review, ambiguous features use a spec gate before planning, reviewer packets include untracked files, reviewer output is markdown/YAML rather than strict JSON-only, bonus findings go to backlog/input, Superpowers evidence or compensation is required, and A2 is not introduced as a required artifact.
145+
They check that quality profiles require review, broad/ambiguous work uses a Brainstorming Gate before implementation planning, reviewer packets include untracked files, reviewer output is markdown/YAML rather than strict JSON-only, review intake precedes fix loops, bonus findings go to backlog/input, Superpowers evidence or compensation is required, and A2 is not introduced as a required artifact.
133146

134147
## Examples
135148

bin/basd-coding-dispatch.mjs

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { existsSync } from "node:fs";
44
import { spawnSync } from "node:child_process";
5-
import { mkdir, readFile, readdir, writeFile } from "node:fs/promises";
5+
import { chmod, mkdir, readFile, readdir, writeFile } from "node:fs/promises";
66
import os from "node:os";
77
import path from "node:path";
88
import { fileURLToPath } from "node:url";
@@ -335,6 +335,20 @@ function companionFixturePath(skill, file) {
335335
return path.join(fixtureRoot, skill.sourceRepo, file.sourcePath);
336336
}
337337

338+
function companionFileMode(skill, file) {
339+
if (file.mode === undefined) {
340+
return undefined;
341+
}
342+
343+
if (file.mode !== "755") {
344+
throw new Error(
345+
`unsupported companion file mode for ${skill.name} ${file.sourcePath}: ${file.mode}`
346+
);
347+
}
348+
349+
return 0o755;
350+
}
351+
338352
async function fetchCompanionFile(skill, file) {
339353
if (process.env.BASD_COMPANION_SKILLS_FIXTURE_DIR) {
340354
return readFile(companionFixturePath(skill, file), "utf8");
@@ -371,7 +385,8 @@ async function prepareCompanionSkillInstall(root, options) {
371385
sourcePath: file.sourcePath,
372386
outputFile,
373387
destinationPath: path.join(root, outputFile),
374-
rawUrl: file.rawUrl
388+
rawUrl: file.rawUrl,
389+
mode: companionFileMode(skill, file)
375390
};
376391
});
377392
const existingFiles = plannedFiles.filter((file) => existsSync(file.destinationPath));
@@ -417,6 +432,9 @@ async function writeCompanionSkillInstall(plan) {
417432
for (const file of skillPlan.files) {
418433
await mkdir(path.dirname(file.destinationPath), { recursive: true });
419434
await writeFile(file.destinationPath, file.content, "utf8");
435+
if (file.mode !== undefined) {
436+
await chmod(file.destinationPath, file.mode);
437+
}
420438
}
421439
}
422440
}

examples/dual-provider-review.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Release and packaging task. Higher risk because incorrect claims or unsafe publi
1414

1515
Worker A implements the workflow. Worker B reviews the diff and checks whether the workflow is safe, conventional, and honest.
1616

17+
Use `subagent-driven-development` if implementation has 3+ owned task slices. Use `dispatching-parallel-agents` only for independent domains, such as read-only docs claim review while workflow edits continue elsewhere.
18+
1719
## Implementer Brief
1820

1921
```text
@@ -42,6 +44,17 @@ findings:
4244
disposition: must-fix-now | ask-human | bonus-backlog | reject-if-wrong
4345
```
4446

47+
## Review Intake
48+
49+
Before any fix loop, use `receiving-code-review`:
50+
51+
1. Read the complete feedback.
52+
2. Restate unclear findings.
53+
3. Verify each finding against the workflow, package scripts, and approved scope.
54+
4. Evaluate whether the finding is technically sound.
55+
5. Disposition it as `must-fix-now`, `ask-human`, `bonus-backlog`, or `reject-if-wrong`.
56+
6. Fix only accepted in-scope findings.
57+
4558
## Dispatcher Reconciliation
4659

4760
The dispatcher accepts concrete findings, rejects incorrect findings with evidence, preserves valid out-of-scope bonus findings as backlog/input, applies narrow in-scope fixes, and reruns:

examples/feature-build.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,33 @@ Add a new worker adapter target for a coding harness.
1010

1111
Feature build using the `cli-package` quality profile and CLI/tooling/package edge-case pack. It changes installer behavior, docs, validation, examples, and public claims.
1212

13+
## Brainstorming Gate
14+
15+
```text
16+
Goal: provide a scaffold target for the harness without implying native marketplace support.
17+
Non-goals: no hidden metadata, no credential handling, no publish/release action.
18+
Approaches:
19+
- Manual scaffold only: lower risk, honest status, covered by smoke tests.
20+
- Native adapter claim: rejected until install path is validated.
21+
Acceptance: init supports --target <new-target>, copies only validated public files, refuses overwrite without --force, docs include tested/experimental status.
22+
Decision: proceed with manual or experimental adapter only, then write an implementation plan.
23+
```
24+
25+
No implementation plan is written before this brainstorming/spec direction is accepted.
26+
1327
## Spec Gate
1428

1529
```text
1630
Problem: users need a scaffold target for the harness.
1731
Non-goals: no native marketplace package, no hidden metadata, no credential handling.
1832
Behavior: init supports --target <new-target>, copies only validated public files, refuses overwrite without --force.
1933
Docs: integration page includes status label and tested scope.
20-
Acceptance: validate, smoke-test, and pack dry-run pass.
34+
Acceptance: validate, smoke-test, workflow-evals, and pack dry-run pass.
2135
```
2236

2337
No code is written before the spec gate is accepted.
2438

25-
## Implementation-Plan Gate
39+
## Implementation Plan Only
2640

2741
```text
2842
Files:
@@ -39,7 +53,8 @@ Steps:
3953
4. Add validation coverage for the integration doc.
4054
5. Add install docs with an honest status label.
4155
6. Escalate tests if package files, force/overwrite behavior, JSON/text output, or public support claims change.
42-
7. Run npm run validate, npm run smoke-test, npm run workflow-evals, npm pack --dry-run.
56+
7. Execute with subagent-driven-development if the work splits into 3+ owned task slices; use executing-plans if it stays at 1-2 tasks.
57+
8. Run review intake for accepted findings, then final verification.
4358
```
4459

4560
No feature code is written before the implementation plan is accepted.

examples/small-fix.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ The CLI exits zero for an unknown command. Make unknown commands print help and
1010

1111
Small fix using the `tiny-fix` quality profile. User-visible CLI behavior. No spec gate needed beyond the stated behavior.
1212

13+
## Micro-Brainstorm
14+
15+
The request is exact, so no full Brainstorming Gate is needed. If ambiguity appeared, use a micro-brainstorm such as:
16+
17+
```text
18+
Question: should unknown command output go to stdout or stderr?
19+
Tradeoff: stdout preserves current help behavior; stderr may be more conventional for errors.
20+
Decision needed before implementation if existing tests do not settle it.
21+
```
22+
1323
## Worker Routing
1424

1525
Codex implements. Independent review is lightweight because tiny fixes still get a separate reviewer check.
@@ -25,7 +35,7 @@ Codex implements. Independent review is lightweight because tiny fixes still get
2535

2636
Reviewer checks that known commands still work, unknown commands fail, and help text remains accurate.
2737

28-
Review packet includes `git status --short --branch`, the focused diff, untracked files if any, and the smoke-test output.
38+
Review packet includes `git status --short --branch`, the focused diff, untracked files if any, and the smoke-test output. Review intake dispositions any finding before a fix loop.
2939

3040
## Verification
3141

examples/telegram-agent-workflow.md

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,28 @@ Patch the install flow so Hermes is the default skill path and OpenClaw users ge
1717

1818
```text
1919
Classification: install and public docs feature; public repo risk.
20+
Superpowers Activation Map: using-superpowers, brainstorming, writing-plans, subagent-driven-development, requesting-code-review, receiving-code-review, verification-before-completion, finishing-a-development-branch.
2021
Worker routing: Codex implements CLI/docs changes; independent reviewer checks claims and tests.
21-
Spec gate: native Hermes install must copy the full skill directory under the Hermes home. OpenClaw install may be documented only as workspace-skill compatible. Other harness adapters stay experimental/manual unless validated.
22+
Brainstorming/spec gate: native Hermes install must copy the full skill directory under the Hermes home. OpenClaw install may be documented only as workspace-skill compatible. Other harness adapters stay experimental/manual unless validated.
2223
Implementation-plan gate: add failing smoke coverage, update CLI install target resolution, copy skill-local references, rewrite README/integration docs, then run package validation.
2324
```
2425

25-
## Phone Approval
26+
## Phone Approval 1: Brainstorming / Spec
2627

2728
```text
28-
Approved. Do not push, publish, or claim native marketplace support.
29+
Approved direction. Do not claim native marketplace support.
30+
```
31+
32+
## Phone Approval 2: Implementation Plan
33+
34+
```text
35+
Approved implementation plan. Local edits and local verification only.
36+
Do not push, publish, release, deploy, create a PR, or delete branches.
2937
```
3038

3139
## Agent Work
3240

33-
Hermes routes the approved work to a coding backend. The worker edits inside the repository, avoids real `~/.hermes` mutation by using temp dirs in tests, and reports evidence back through Hermes:
41+
Hermes routes the approved work to a coding backend. The worker edits inside the repository, avoids real home-directory mutation by using temp dirs in tests, and reports evidence back through Hermes:
3442

3543
```text
3644
Changed:
@@ -43,35 +51,56 @@ Changed:
4351
Verification:
4452
- npm run validate: passed
4553
- npm run smoke-test: passed
54+
- npm run workflow-evals: passed
4655
- npm pack --dry-run: passed
4756
4857
Remaining risk:
4958
- Cursor, OpenCode, and native Codex/Claude harness adapters remain experimental/manual until their install paths are validated.
5059
```
5160

61+
## Phone Approval 3: Implementation Findings
62+
63+
```text
64+
Proceed with narrow in-scope review fixes.
65+
Do not broaden provider claims or add release behavior.
66+
```
67+
5268
## Superpowers Evidence Or Compensation
5369

5470
```text
5571
Superpowers evidence:
5672
- using-superpowers loaded before work.
73+
- Brainstorming Gate completed before implementation planning.
5774
- implementation-plan gate followed.
5875
- independent review requested with a packet that included untracked files.
76+
- receiving-code-review intake dispositioned findings before fix loops.
5977
- verification-before-completion satisfied with fresh command output.
78+
- finishing-a-development-branch used for closeout options.
6079
6180
Compensation if a required skill/reference is missing:
6281
- state the missing skill/reference.
6382
- use the public quality profile and edge-case pack.
83+
- use brainstorming/spec gates where required.
6484
- use independent review and final verification before reporting completion.
6585
```
6686

87+
## Phone Approval 4: Closeout Option
88+
89+
```text
90+
Keep the branch/worktree local for controller verification.
91+
No push, PR, merge, publish, release, deploy, or branch deletion.
92+
```
93+
6794
## Final Verification Report
6895

6996
```text
7097
Profile:
7198
Provider/split:
99+
Superpowers evidence or compensation:
72100
Files changed:
73101
Commands and exit statuses:
74102
Independent review verdict:
103+
Review-intake dispositions:
75104
Fixed findings:
76105
Skipped checks:
77106
Remaining risks:

0 commit comments

Comments
 (0)