From a7905e52ccf82de8db78ea16f2fc6853795ef284 Mon Sep 17 00:00:00 2001 From: Adrian Theopold <83468052+AdrianTheopold@users.noreply.github.com> Date: Thu, 2 Jul 2026 09:36:28 +0000 Subject: [PATCH 01/12] docs: add superpowers-bridge correctness-pass implementation plan --- docs/plans/2026-07-02-correctness-pass.md | 521 ++++++++++++++++++++++ 1 file changed, 521 insertions(+) create mode 100644 docs/plans/2026-07-02-correctness-pass.md diff --git a/docs/plans/2026-07-02-correctness-pass.md b/docs/plans/2026-07-02-correctness-pass.md new file mode 100644 index 0000000..5dcca18 --- /dev/null +++ b/docs/plans/2026-07-02-correctness-pass.md @@ -0,0 +1,521 @@ +# superpowers-bridge Fork + Correctness Pass — Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Fork the (stalled) `JiangWay/openspec-schemas` superpowers-bridge into Adrian's own maintained copy, fold in the audited correctness fixes (2 HIGH + correctness MEDs + Superpowers-6 re-attestation + OpenSpec 1.5.0 pin bump + cosmetics), re-point the vendored copy in `anomaly-detection` to the fork, and retire the now-pointless drift-vs-JiangWay apparatus. + +**Architecture:** The bridge is a prompt-layer OpenSpec schema (one `schema.yaml` + `README.md`/`README.zh-TW.md` + `templates/` + `VERSION`). All fixes are edits to YAML instruction prose and Markdown docs — **there is no code and no unit-test harness** (that absence is why these bugs shipped; adding a harness is explicitly OUT of scope for this pass — see Global Constraints). The source of truth becomes the GitHub fork; the vendored copy at `anomaly-detection/openspec/schemas/superpowers-bridge/` is re-synced from it at the end. + +**Tech Stack:** GitHub (`gh` CLI), git, OpenSpec CLI (`@fission-ai/openspec`, installed 1.4.1 → target baseline 1.5.0), Superpowers plugin (installed 6.1.0 → target baseline 6.1.0). YAML + Markdown only. + +## Verification model (read before starting) + +This plan has no `pytest`. Each editing task verifies with: +1. **Structural:** `cd /develop/anomaly-detection && openspec schema validate superpowers-bridge` → must print `✓ valid` (run against the *vendored* copy after re-sync in Task 8; during fork editing run it against a temporary symlink/copy — see Task 1 Step 6). +2. **Content grep:** an explicit `grep` proving the old string is gone / the new string is present (given per task). +3. **Behavioral fixes (H1/H2):** a careful re-read confirming the instruction composes with the installed Superpowers 6.1.0 skill flow. A full end-to-end `/opsx:apply` dry cycle on a throwaway change is the gold standard but is heavy (creates a worktree + dispatches subagents); it is OPTIONAL and called out in Task 8. + +## Global Constraints + +- **Fork namespace:** `github.com/AdrianTheopold/openspec-schemas` (matches the author of the existing upstream PR #12). **Creating the fork is outward-facing — confirm the namespace with Adrian before Task 1 Step 1 runs.** +- **Public-push identity:** BEFORE any push to the public fork, set the commit author email to Adrian's GitHub noreply `83468052+AdrianTheopold@users.noreply.github.com` (the `/develop` container's git default is his work email and leaks by SHA into the public fork network). Set it locally in the fork clone (Task 1 Step 4). +- **Keep EN + zh-TW in sync:** every README fix applies to BOTH `README.md` and `README.zh-TW.md` (the zh-TW is a faithful mirror that reproduces every bug). +- **No schema-graph structural change:** these are prose/instruction fixes only. `openspec schema validate superpowers-bridge` must stay `✓ valid` after every task. Do not add/remove artifacts or `requires:` edges. +- **Vendored copy stays byte-identical to the fork's `superpowers-bridge/`** after Task 8 (the re-vendor contract is a whole-dir copy). +- **OUT of scope this pass:** an end-to-end test harness; the upstream `post_apply` phase (still absent upstream — the evidence-PRECHECK workaround stays); any Stores-model migration (1.5.0 Stores is opt-in beta the bridge doesn't use). +- **Baselines to land:** OpenSpec `1.4.1 → 1.5.0`; Superpowers `v5.1.0 → 6.1.0`. + +--- + +### Task 1: Create the fork, working clone, and land this plan + +**Files:** +- Create (remote): `github.com/AdrianTheopold/openspec-schemas` (fork of `JiangWay/openspec-schemas`) +- Create (local): a working clone + branch `fix/correctness-pass-v1.1` +- Create: `/docs/plans/2026-07-02-correctness-pass.md` (this plan, committed at the fork REPO ROOT — NOT under `superpowers-bridge/`, so it never rides into adopters' vendored bundles) + +**Interfaces:** +- Produces: `$FORK` = local clone path (all later tasks edit files under `$FORK/superpowers-bridge/`); the fork's default branch (`main`) and the working branch `fix/correctness-pass-v1.1`. + +- [ ] **Step 1: Confirm namespace, then fork** (outward-facing — do not run before Adrian confirms) + +```bash +gh repo fork JiangWay/openspec-schemas --clone=false --org= 2>/dev/null || \ + gh repo fork JiangWay/openspec-schemas --clone=false +# creates github.com/AdrianTheopold/openspec-schemas +gh repo view AdrianTheopold/openspec-schemas --json name,parent,isFork +``` +Expected: `isFork: true`, `parent.name: openspec-schemas`. + +- [ ] **Step 2: Clone the fork to a working dir** + +```bash +git clone https://github.com/AdrianTheopold/openspec-schemas.git \ + /develop/openspec-schemas-fork +export FORK=/develop/openspec-schemas-fork +``` +Expected: clone succeeds; `ls $FORK/superpowers-bridge/schema.yaml` exists. + +- [ ] **Step 3: Create the working branch** + +```bash +git -C "$FORK" switch -c fix/correctness-pass-v1.1 +``` +Expected: `Switched to a new branch 'fix/correctness-pass-v1.1'`. + +- [ ] **Step 4: Set the public-push identity in this clone** (Global Constraint) + +```bash +git -C "$FORK" config user.email "83468052+AdrianTheopold@users.noreply.github.com" +git -C "$FORK" config user.name "Adrian Theopold" +git -C "$FORK" config --get user.email +``` +Expected: prints the noreply email. + +- [ ] **Step 5: Commit this plan into the fork** + +```bash +mkdir -p "$FORK/docs/plans" +cp /tmp/claude-1000/-develop/c5e04289-cc7f-47dc-bfd7-bb9e4bc1cdde/scratchpad/2026-07-02-superpowers-bridge-fork-correctness-pass.md \ + "$FORK/docs/plans/2026-07-02-correctness-pass.md" +git -C "$FORK" add docs/plans/2026-07-02-correctness-pass.md +git -C "$FORK" commit -m "docs: add superpowers-bridge correctness-pass implementation plan" +``` +Expected: one commit created (at the fork repo root `docs/plans/`, NOT inside `superpowers-bridge/`). + +- [ ] **Step 6: Establish the validation seam for the fork copy** + +The `openspec schema validate` CLI resolves schemas under a project's `openspec/schemas/`. To validate the fork copy during editing, point a scratch project at it: + +```bash +# Reuse anomaly-detection's project but validate by temporarily copying the fork's +# schema over the vendored path is risky; instead validate structurally with a dry parse: +cd /develop/anomaly-detection && openspec schema validate superpowers-bridge +``` +Expected: `✓ valid` (baseline — confirms the tool works before edits). During Tasks 2-7 you edit the FORK copy; the authoritative `openspec schema validate` re-runs after re-sync in Task 8. For per-task structural safety, parse the YAML: `python3 -c "import yaml,sys; yaml.safe_load(open('$FORK/superpowers-bridge/schema.yaml'))" && echo OK`. + +--- + +### Task 2: Fix H2 — stop SDD from finishing the branch before the bridge's verify/retro/archive (HIGH) + +**Files:** +- Modify: `$FORK/superpowers-bridge/schema.yaml` (apply step 2 "Tell the executor" block, currently lines ~502-505 + the surrounding step-2 prose ~496-518) + +**Interfaces:** +- Consumes: nothing. +- Produces: an apply instruction where the SDD executor implements-and-reviews only, then returns control; the bridge alone runs finishing-a-development-branch at apply step 6. + +**Context:** The bug: apply step 2 tells the executor to invoke `superpowers:subagent-driven-development` to "execute the plan.md micro-tasks," but that skill's OWN flow terminates by invoking `superpowers:finishing-a-development-branch` + worktree cleanup (SDD `SKILL.md:66,81,412`). Run literally, the executor opens the PR and destroys the worktree before the bridge's steps 3-6 (verify/retro/archive, `schema.yaml:527-567`). Fix: explicitly scope the executor to implementation+review and forbid the finish/cleanup, because the bridge owns finish at step 6. **Confirmed by the v5→v6 diff (research-D):** this conflict is PRE-EXISTING — SDD terminated with `finishing-a-development-branch` identically at the bridge's own v5.1.0 baseline (`SKILL.md:66` node, `:85` edge) — and v6 exposes NO native flag/mode to suppress that finish node, so the fix MUST be prose (this task), not a toggle. + +- [ ] **Step 1: Read the current step-2 block** at `$FORK/superpowers-bridge/schema.yaml` (the `2. **Executor — subagent-driven-development**:` block and its `Tell the executor:` list). + +- [ ] **Step 2: Add an explicit stop-boundary to the `Tell the executor:` list.** After the existing bullets (`Read plan.md…`, `Update tasks.md checkboxes…`, `Work within the created worktree`), append: + +```yaml + - STOP after the final whole-branch review passes. Do NOT invoke + superpowers:finishing-a-development-branch and do NOT clean up + or remove the worktree — this bridge runs the finish sequence + itself at apply step 6 (retrospective + archive must land in the + SAME PR, and the worktree + SDD ledger must survive for steps + 3-5). Return control to the apply controller after the final + review; report the commit range and the ledger path. +``` + +- [ ] **Step 3: Add a guard note to the transitive-skill block.** In the `IMPORTANT — transitive skill activation:` paragraph (which lists TDD + requesting-code-review), add a final line: + +```yaml + NOTE: subagent-driven-development's own flow ends by invoking + finishing-a-development-branch; under this bridge that terminal + step is SUPPRESSED (see the executor instruction above) because + the bridge sequences finish/verify/retrospective/archive itself. +``` + +- [ ] **Step 4: Validate structurally** + +```bash +python3 -c "import yaml; yaml.safe_load(open('$FORK/superpowers-bridge/schema.yaml')); print('OK')" +``` +Expected: `OK`. + +- [ ] **Step 5: Grep-verify the guard is present** + +```bash +grep -n "STOP after the final whole-branch review" "$FORK/superpowers-bridge/schema.yaml" +grep -n "terminal\s*step is SUPPRESSED\|is SUPPRESSED" "$FORK/superpowers-bridge/schema.yaml" +``` +Expected: both match. + +- [ ] **Step 6: Commit** + +```bash +git -C "$FORK" add superpowers-bridge/schema.yaml +git -C "$FORK" commit -m "fix(bridge): suppress SDD self-finish so bridge owns verify/retro/archive (H2)" +``` + +--- + +### Task 3: Fix H1 — tie the tasks.md tick to the SDD ledger step (HIGH) + +**Files:** +- Modify: `$FORK/superpowers-bridge/schema.yaml` (the `Update tasks.md checkboxes as coarse tasks complete` bullet in apply step 2, and the verify PRECHECK note at the `grep -c '^- \[x\]'` line) + +**Interfaces:** +- Consumes: the `Tell the executor:` list edited in Task 2. +- Produces: an instruction where the executor ticks `tasks.md` in the same bookkeeping message it appends the SDD ledger line, so the verify PRECHECK (`grep -c '^- [x]' > 0`) reflects real progress. + +**Context:** The known gap: SDD tracks progress in its ledger + todos and never touches `tasks.md` (it's OpenSpec-agnostic — zero `tasks.md` awareness). The bridge's one soft bullet asking for the tick gets dropped, so `tasks.md` stays all-unchecked and verify's PRECHECK `grep -c '^- [x]' openspec/changes//tasks.md` (which must return `> 0`) FALSELY STOPS a completed apply. `tasks.md` is the right source of truth because it is committed and travels in the PR diff; the SDD ledger is git-ignored per-worktree scratch. + +This is a symptom of the **"task fragmentation" the README itself names** (`README.md:126, ~520`): one plan is represented THREE ways — coarse `tasks.md` checkboxes (what verify/archive count), fine `plan.md` TDD micro-steps (what the SDD executor works from), and the `.superpowers/sdd/progress.md` ledger (what SDD actually updates). Progress lands in the ledger + `plan.md` micro-steps but is never surfaced back to the coarse `tasks.md` the gates read. **Scope note:** this task fixes the SYMPTOM (surface the tick back to `tasks.md`); it deliberately does NOT collapse the three representations into one — resolving the fragmentation root (auto-derive / single source of truth) was weighed and rejected as over-engineering during brainstorm (option c). After this pass, the plan is still represented three ways; the coarse tracker just stops drifting. + +- [ ] **Step 1: Replace the soft tick bullet.** Find in `$FORK/superpowers-bridge/schema.yaml` (apply step 2): + +```yaml + - Update tasks.md checkboxes as coarse tasks complete +``` +Replace with: + +```yaml + - Tick tasks.md checkboxes IN THE SAME bookkeeping message where + you append the SDD progress-ledger line for a cleared task: + when a task's review comes back clean, flip its `- [ ]` to + `- [x]` in openspec/changes//tasks.md AND append the + ledger line together. tasks.md is the committed source of + truth (it travels in the PR diff and gates verify); the ledger + is throwaway per-worktree scratch. Never leave tasks.md + all-unchecked — the verify PRECHECK below will falsely STOP. +``` + +- [ ] **Step 2: Add a cross-reference at the verify PRECHECK.** Find the verify PRECHECK block containing `grep -c '^- \[x\]' openspec/changes//tasks.md`. Immediately after that command's line, add a comment line inside the instruction prose: + +```yaml + (This returns 0 only if the apply executor failed to tick + tasks.md as tasks cleared — see apply step 2's ticking rule; + a 0 here on a genuinely-complete apply is a bookkeeping miss, + not incomplete work. Tick the boxes, then re-run.) +``` + +- [ ] **Step 3: Validate structurally** + +```bash +python3 -c "import yaml; yaml.safe_load(open('$FORK/superpowers-bridge/schema.yaml')); print('OK')" +``` +Expected: `OK`. + +- [ ] **Step 4: Grep-verify** + +```bash +grep -n "IN THE SAME bookkeeping message" "$FORK/superpowers-bridge/schema.yaml" +grep -c "Update tasks.md checkboxes as coarse tasks complete" "$FORK/superpowers-bridge/schema.yaml" +``` +Expected: first matches; second prints `0` (old bullet gone). + +- [ ] **Step 5: Commit** + +```bash +git -C "$FORK" add superpowers-bridge/schema.yaml +git -C "$FORK" commit -m "fix(bridge): bind tasks.md tick to SDD ledger step; note verify false-STOP (H1)" +``` + +--- + +### Task 4: Correctness MEDs batch — nonexistent command, wrong config path, fragile base-detection, live placeholders + +**Files:** +- Modify: `$FORK/superpowers-bridge/schema.yaml` (M5 base-detection ~line 207; M6 placeholders ~210, ~314, ~320, ~335) +- Modify: `$FORK/superpowers-bridge/README.md` and `README.zh-TW.md` (M2 `/opsx:new` ~lines 156,172,223,336,352,419,425; M3 `openspec/config.yaml` ~line 354) +- Modify: `$FORK/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.*.md` (M2 `/opsx:new` in the routing table) + +**Interfaces:** none consumed/produced (independent doc + shell fixes). + +- [ ] **Step 1: M2 — confirm the real command surface, then replace `/opsx:new`.** + +```bash +ls /develop/anomaly-detection/.claude/commands/opsx/ # authoritative slash-command list +``` +Expected: files for propose/ff/continue/apply/verify/archive/explore/onboard/sync — **no `new.md`**. `/opsx:new` is not a slash command (though `openspec new` is a CLI subcommand). Replace each `/opsx:new --schema ` usage: +- Interactive/step-by-step creation (was `/opsx:new … then /opsx:continue`): use the CLI `openspec new --schema ` then `/opsx:continue`, OR `/opsx:propose` for the one-shot. Pick per each occurrence's intent (the "New feature" table rows and the quickstart blocks → `/opsx:propose`; the "interactive" walkthrough at README:336-346 → `openspec new --schema superpowers-bridge` then `/opsx:continue`). +- The `spec-driven` skip-brainstorm rows (README:352,425) → `openspec new --schema spec-driven`. + +Apply in BOTH READMEs + both CLAUDE fragments. + +- [ ] **Step 2: M2 grep-verify no slash `/opsx:new` remains** + +```bash +grep -rn "opsx:new" "$FORK/superpowers-bridge/" +``` +Expected: no matches (CLI `openspec new` may remain — that's correct). + +- [ ] **Step 3: M3 — fix the nonexistent config path.** At `README.md:354` (and the zh-TW mirror): + +``` +# Or change project default in openspec/config.yaml: schema: spec-driven +``` +Replace with: + +``` +# Or pin the schema per change in the change's .openspec.yaml (schema: spec-driven), +# or pass --schema on the command. (OpenSpec 1.4.x/1.5.0 has no openspec/config.yaml.) +``` + +- [ ] **Step 4: M5 — make verify's base-detection robust for unpushed worktrees.** At `schema.yaml:207`, replace: + +```bash + git log --oneline $(git merge-base HEAD origin/main 2>/dev/null || git merge-base HEAD origin/master 2>/dev/null)..HEAD | wc -l +``` +with a resolver that tries remote THEN local base refs and counts with `rev-list` (this repo's norm is unpushed local branches off local `master`): + +```bash + base=""; for ref in origin/main origin/master main master; do \ + git rev-parse -q --verify "$ref" >/dev/null 2>&1 && { base="$ref"; break; }; done; \ + [ -n "$base" ] && git rev-list --count "$(git merge-base HEAD "$base")..HEAD" || echo 0 +``` + +- [ ] **Step 5: M6 — neutralize literal placeholders inside runnable shell.** The PRECHECK shells embed `` / `` (schema.yaml ~210, ~314, ~320, ~335) which error if pasted verbatim. Add ONE substitution note at the first PRECHECK that owns them and change the literals to shell vars, e.g. prefix the verify PRECHECK block with: + +```yaml + (Substitute the change name first: `chg=` — replace + with this change's directory name, then the commands + below use "$chg".) +``` +and change `openspec/changes//tasks.md` → `openspec/changes/$chg/tasks.md`, `` → `$base` (defined in Step 4), in the affected commands. + +- [ ] **Step 6: Validate + grep** + +```bash +python3 -c "import yaml; yaml.safe_load(open('$FORK/superpowers-bridge/schema.yaml')); print('OK')" +grep -rn "openspec/config.yaml" "$FORK/superpowers-bridge/" ; echo "--- expect no matches above ---" +``` +Expected: `OK`; no `openspec/config.yaml` matches. + +- [ ] **Step 7: Commit** + +```bash +git -C "$FORK" add superpowers-bridge/schema.yaml superpowers-bridge/README.md superpowers-bridge/README.zh-TW.md superpowers-bridge/templates/adopters/ +git -C "$FORK" commit -m "fix(bridge): real command surface, .openspec.yaml path, robust base-detect, placeholder subst (M2/M3/M5/M6)" +``` + +--- + +### Task 5: Adapt the bridge to Superpowers 6.1.0 (v5→v6 diff fold-in) + re-attest baselines + +**Files:** +- Modify: `$FORK/superpowers-bridge/schema.yaml` (finish sequence apply step 6 ~557-567; transitive-review note ~513-518; executing-plans citation; a `# v6 notes` comment near apply) +- Modify: `$FORK/superpowers-bridge/README.md` + `README.zh-TW.md` (finish "opens the PR" ~408-410; per-task-vs-final review ~304-306,384; plan.md description; baseline badges 8-9; Compatibility ~487; executing-plans URL) +- Modify: `$FORK/superpowers-bridge/VERSION` (1.0.0 → 1.1.0) + +**Interfaces:** none. + +**Context:** research-D (`scratchpad/research-D-superpowers-v5-v6-diff.md`) diffed every invoked skill v5.1.0→6.1.0. Only H2 was BREAKING (fixed in Task 2, and pre-existing — not a v6 regression). This task folds the RELEVANT non-breaking alignments, records two OPT-IN v6 capabilities, and re-attests the baseline honestly. Deltas to fold: +- **(a)** v6 `finishing-a-development-branch` REMOVED `gh pr create` — Option 2 "Create PR" is now push-only (v6 `finishing-a-development-branch/SKILL.md:121-126`). The bridge's "finish opens the PR" is stale; fixing it also aligns with this workspace's no-auto-PR + GitLab/`glab` (not `gh`) rules. +- **(b)** v6 merged the two SDD reviewer prompts into one `task-reviewer-prompt.md` — per-task review is SDD's own; `requesting-code-review` is the FINAL whole-branch pass only. +- **(c)** writing-plans v6 adds `## Global Constraints` + per-task `Interfaces` blocks (richer plan.md) — this very plan uses them. +- **(d)** SDD v6 gained explicit per-dispatch model selection + a durable `.superpowers/sdd/` ledger — opt-in, already benefits apply, no bridge change needed. +- executing-plans still activates neither TDD nor code-review → the bridge's rejection rationale HOLDS (only a moving-URL nit). + +- [ ] **Step 1: Confirm invoked-skill surface at 6.1.0** + +```bash +ls /home/appuser/.claude/plugins/cache/claude-plugins-official/superpowers/6.1.0/skills/ +grep -oE "superpowers:[a-z-]+" "$FORK/superpowers-bridge/schema.yaml" | sort -u +``` +Expected: brainstorming, writing-plans, using-git-worktrees, subagent-driven-development, finishing-a-development-branch (+ transitively test-driven-development, requesting-code-review) all present; no renames. + +- [ ] **Step 2: (delta a) finish is push-only — de-couple from `gh pr create`.** At `schema.yaml` apply step 6 (~557-567) and `README.md:408-410` (+ zh-TW), reword so the bridge does NOT claim finish "opens the PR". Replace the step-6 body with: + +```yaml + 6. **Completion (finish + push is the LAST automated step)**: + + After retrospective + archive are both done, use the Skill + tool to invoke **superpowers:finishing-a-development-branch**. + In v6 this pushes the branch; it does NOT open a PR/MR for you + (upstream removed the `gh pr create` step). Opening the MR/PR is + a separate human step — on GitLab use `glab`; do NOT auto-open + or auto-merge. + + The pushed branch MUST contain the complete archived cycle + (all 8 artifacts, specs synced, change under archive/). If it + does not, STOP and complete retrospective/archive first. +``` +Mirror the "opens the PR" → "pushes the branch" wording in both READMEs. + +- [ ] **Step 3: (delta b) clarify per-task vs final review.** At `schema.yaml:513-518` and `README.md:304-306,384` (+ zh-TW), reword the `requesting-code-review` note: + +```yaml + - **superpowers:requesting-code-review** — invoked only for the + FINAL whole-branch review before apply concludes. Per-task + review is handled INSIDE subagent-driven-development by its own + merged task-reviewer prompt (spec-compliance + quality), not by + a separate skill invocation. +``` + +- [ ] **Step 4: (delta c) note the richer plan.md format.** Where the bridge's `plan` artifact instruction describes plan.md (~schema.yaml:184-192), add one sentence: `writing-plans v6 emits a "## Global Constraints" block and per-task "Interfaces" blocks; implementers MUST honor both.` No structural change. + +- [ ] **Step 5: (delta d) record opt-in v6 capabilities as a comment.** Add a short `# v6 notes:` comment just above the `apply:` key in `schema.yaml`: + +```yaml +# v6 notes: subagent-driven-development (6.x) applies explicit per-dispatch +# model selection (Sonnet for mechanical steps, Opus for reasoning) and keeps +# a durable .superpowers/sdd/ progress ledger for long runs. Both are handled +# by the executor automatically — no instruction here duplicates them. +``` + +- [ ] **Step 6: pin the moving executing-plans citation.** Find the bridge's `executing-plans` reference (rejection rationale, ~schema.yaml:520-525 / README). If it links a moving `.../main/...` URL, replace with a versioned permalink or cite the skill by name only. Rationale unchanged (research-D: v6 executing-plans still activates neither TDD nor code-review). + +- [ ] **Step 7: baseline badges + Compatibility.** Update badges (`README.md:8-9` + zh-TW): + +``` +[![OpenSpec baseline](https://img.shields.io/badge/OpenSpec_baseline-1.5.0-0277bd)](#compatibility) +[![Superpowers baseline](https://img.shields.io/badge/Superpowers_baseline-6.1.0-0277bd)](#compatibility) +``` +In the Compatibility section set pinned baselines to OpenSpec 1.5.0 / Superpowers 6.1.0 and add: `Re-attested against Superpowers 6.1.0 (2026-07-02) via a full v5.1.0→6.1.0 skill diff: only finishing-a-development-branch (now push-only) and the merged SDD task-reviewer needed prose alignment; the SDD self-finish conflict (H2) predates v6 and is suppressed by the apply instruction.` Add: `OpenSpec 1.5.0 "Stores" is opt-in beta and does not affect this bridge; re-check the changes/+specs/ paths only if a future release makes Stores the default layout.` + +- [ ] **Step 8: Bump VERSION** — `$FORK/superpowers-bridge/VERSION`: `1.0.0` → `1.1.0`. + +- [ ] **Step 9: Validate + grep** + +```bash +python3 -c "import yaml; yaml.safe_load(open('$FORK/superpowers-bridge/schema.yaml')); print('OK')" +grep -rn "gh pr create" "$FORK/superpowers-bridge/" ; echo "--- expect NONE in the bridge (the fork PR in this plan's Task 8 is separate) ---" +grep -n "5.1.0" "$FORK/superpowers-bridge/README.md" ; echo "--- expect only historical/changelog mentions, not the baseline ---" +cat "$FORK/superpowers-bridge/VERSION" +``` +Expected: `OK`; no `gh pr create` in the bridge; baseline shows 6.1.0/1.5.0; VERSION `1.1.0`. + +- [ ] **Step 10: Commit** + +```bash +git -C "$FORK" add superpowers-bridge/ +git -C "$FORK" commit -m "feat(bridge): adapt to Superpowers 6.1.0 (push-only finish, merged reviewer, plan.md format) + re-attest baselines 6.1.0/1.5.0 (M4 + v6 diff)" +``` + +--- + +### Task 6: Cosmetics batch — step-number/label drift, grep-anchor mismatch, artifact-count typos + +**Files:** +- Modify: `$FORK/superpowers-bridge/schema.yaml` (L1 grep anchor ~line 210; L5 `design` missing from the chain at line 15) +- Modify: `$FORK/superpowers-bridge/README.md` + `README.zh-TW.md` (M7 finishing "step 4"→step 6 ~line 306; stale "2a"/"2b" labels ~line 445 / zh-TW ~310,449; L4 "7 artifacts" shows 6 ~line 225) +- Modify: `$FORK/superpowers-bridge/templates/retrospective.md` (L1 anchor `^\s*- \[x\]` vs gates' `^- \[x\]`) + +**Interfaces:** none. + +- [ ] **Step 1: L5** — the description chain at `schema.yaml:15` reads `brainstorm → proposal → specs → tasks → plan → verify → retrospective` but omits `design`. Insert `design` after `proposal`: `brainstorm → proposal → design → specs → tasks → plan → verify → retrospective`. + +- [ ] **Step 2: L1** — align grep anchors. Decide on ONE anchor form and use it everywhere the completeness of `tasks.md` is counted. Use `^\s*- \[x\]` (tolerant of indentation) in the verify PRECHECK (`schema.yaml:210`) and confirm the retrospective template (`templates/retrospective.md:19`) matches. Update whichever differs so both read `^\s*- \[x\]`. + +- [ ] **Step 3: M7** — fix step-number drift: README's touchpoints table says finishing-a-development-branch is "step 4" (~README:306) but the apply instruction sequences it at step 6. Change to "step 6". Fix stale "2a"/"2b" apply-step labels (~README:445; zh-TW ~310,449) to match the current numbered apply steps (1-6). + +- [ ] **Step 4: L4** — the "PLANNING — 7 artifacts" heading (~README:225) lists 6. Recount and correct to match the actual planning artifacts. + +- [ ] **Step 5: Validate + grep** + +```bash +python3 -c "import yaml; yaml.safe_load(open('$FORK/superpowers-bridge/schema.yaml')); print('OK')" +grep -n "brainstorm → proposal → design → specs" "$FORK/superpowers-bridge/schema.yaml" +``` +Expected: `OK`; chain now includes `design`. + +- [ ] **Step 6: Commit** + +```bash +git -C "$FORK" add superpowers-bridge/ +git -C "$FORK" commit -m "docs(bridge): fix step-number/label drift, grep-anchor mismatch, artifact-count + chain typos (M7/L1/L4/L5)" +``` + +--- + +### Task 7: Re-point to the fork + retire the drift-vs-JiangWay apparatus (topology) + +**Files:** +- Modify: `$FORK/superpowers-bridge/README.md` + `README.zh-TW.md` (4 clone-URLs in install/upgrade prose ~lines 26,40,67,86; CI badge line 5; Upstream Drift badge line 6 + its Compatibility-section duplicate ~496-497) +- Delete/neutralize (repo root, if present): `$FORK/.github/workflows/version-check.yml` + +**Interfaces:** none. + +**Context:** Adrian's chosen shape: GitHub fork = SSOT, re-point vendored copy to it, RETIRE the weekly drift-vs-JiangWay bot (upstream is dead), keep the fork publishable for PR-back. C found the touch-points: 4 clone-URL occurrences, the CI badge, the Upstream Drift badge (×2), and the workflow files. + +- [ ] **Step 1: Re-point the 4 clone-URLs** from `https://github.com/JiangWay/openspec-schemas` to `https://github.com/AdrianTheopold/openspec-schemas` in both READMEs' Method 1/2 install + upgrade blocks. + +- [ ] **Step 2: Add a "forked from" attribution** near the top of `README.md` (and zh-TW): `> Fork of [JiangWay/openspec-schemas](https://github.com/JiangWay/openspec-schemas) (upstream commit f5d4040), maintained independently since 2026-07-02. Upstream-PR-back welcome.` + +- [ ] **Step 3: Retire the Upstream Drift badge + bot.** Remove the `Upstream Drift` badge (README line 6) and its duplicate link in the Compatibility section (~496-497). Delete `$FORK/.github/workflows/version-check.yml` if it exists (`git rm`); replace the drift row in the Compatibility "how updates flow" table with a manual note: `Baselines are updated by hand when this fork is maintained; there is no automated drift bot (upstream JiangWay is inactive).` + +- [ ] **Step 4: Handle the CI badge** — either re-point the `validate-schemas.yml` badge to `AdrianTheopold/openspec-schemas` (keep only if that workflow exists in the fork) or remove the badge. Verify whether `$FORK/.github/workflows/validate-schemas.yml` exists; keep+repoint if yes, remove the badge if no. + +- [ ] **Step 5: Grep-verify no stray JiangWay URLs remain except the attribution** + +```bash +grep -rn "JiangWay" "$FORK/superpowers-bridge/" +``` +Expected: only the single "Fork of … (upstream commit f5d4040)" attribution line (Step 2). + +- [ ] **Step 6: Commit** + +```bash +git -C "$FORK" add -A +git -C "$FORK" commit -m "chore(bridge): re-point to fork, retire drift-vs-JiangWay bot, add upstream attribution" +``` + +--- + +### Task 8: Re-sync the vendored copy, validate end-to-end, push, open PR + +**Files:** +- Modify: `/develop/anomaly-detection/openspec/schemas/superpowers-bridge/**` (overwrite from the fork — the re-vendor) +- Modify: `/develop/CLAUDE.md` and `/develop/anomaly-detection/CLAUDE.md` (CLI pin note `@fission-ai/openspec@1.4.1` → `1.5.0`, and the "upstream commit f5d4040 / JiangWay" pointer → the fork) — **Adrian owns these files; propose the diff and get his ok before writing.** + +**Interfaces:** +- Consumes: the finished fork branch from Tasks 2-7. +- Produces: a vendored copy byte-identical to `$FORK/superpowers-bridge/`, validating `✓ valid`, and an open PR on the fork. + +- [ ] **Step 1: Re-vendor (whole-dir overwrite, per the bridge's own contract)** + +```bash +rm -rf /develop/anomaly-detection/openspec/schemas/superpowers-bridge +cp -R "$FORK/superpowers-bridge" /develop/anomaly-detection/openspec/schemas/superpowers-bridge +``` + +- [ ] **Step 2: Authoritative structural validation** + +```bash +cd /develop/anomaly-detection && openspec schema validate superpowers-bridge +``` +Expected: `✓ valid`. + +- [ ] **Step 3: Confirm vendored == fork** + +```bash +diff -ruN "$FORK/superpowers-bridge" /develop/anomaly-detection/openspec/schemas/superpowers-bridge +``` +Expected: no output (identical). The plan lives at the fork repo root (`docs/plans/`), NOT under `superpowers-bridge/`, so it does not appear in this diff. + +- [ ] **Step 4: (OPTIONAL, gold-standard) dry apply behavioral check.** On a throwaway change, run one `/opsx:apply` cycle and confirm: (a) SDD does NOT open a PR / delete the worktree at the end (H2), (b) `tasks.md` boxes get ticked as tasks clear (H1), (c) verify's PRECHECK passes. Heavy (real worktree + subagents) — run only if Adrian wants full behavioral proof before merge. + +- [ ] **Step 5: Bump the CLI pin references** (Adrian-owned files — propose diff first): `@fission-ai/openspec@1.4.1` → `@fission-ai/openspec@1.5.0` in `/develop/CLAUDE.md` (and any anomaly-detection mention); update the "vendored … upstream commit f5d4040 (JiangWay)" note to point at the fork. + +- [ ] **Step 6: Push the fork branch + open the PR** + +```bash +git -C "$FORK" push -u origin fix/correctness-pass-v1.1 +gh pr create --repo AdrianTheopold/openspec-schemas --base main --head fix/correctness-pass-v1.1 \ + --title "Correctness pass v1.1: fix H1/H2 apply bugs, re-attest 6.1.0/1.5.0, re-point fork" \ + --body "See superpowers-bridge/docs/plans/2026-07-02-correctness-pass.md. Fixes 2 HIGH (tasks.md verify false-STOP; SDD self-finish before verify/retro/archive) + correctness MEDs + baseline re-attestation + fork re-pointing." +``` +Expected: PR URL printed. + +- [ ] **Step 7: Commit the vendored re-sync in anomaly-detection** (separate repo; on a branch, per commit-on-owned-branch discipline — do NOT push without Adrian's ok) + +```bash +cd /develop/anomaly-detection && git switch -c chore/revendor-bridge-fork-v1.1 +git add openspec/schemas/superpowers-bridge CLAUDE.md +git commit -m "chore: re-vendor superpowers-bridge from fork v1.1 (H1/H2 + baselines + re-point)" +``` + +--- + +## Self-Review notes (author) + +- **Spec coverage:** every audit finding maps to a task — H2→T2, H1→T3, M2/M3/M5/M6→T4, M4+1.5.0→T5, M7/L1/L4/L5→T6, topology→T7, re-sync+pin+PR→T8. L3 (post_apply) is Global-Constraints OUT-of-scope (upstream-gated). Comprehensive-scope items (docs rewrite, test harness) intentionally deferred per the chosen "correctness pass." +- **No pytest by design:** verification is `openspec schema validate` + grep + (optional) one real apply cycle; stated in the Verification model up top so it isn't read as a placeholder. +- **Outward-facing gates flagged:** fork creation (T1.1), any public push (Global Constraint + T8.6), and Adrian-owned CLAUDE.md edits (T8.5) all require his ok — consistent with "confirm outward-facing actions." +- **Open item for Adrian:** whether the eventual PR is fork-internal (merge to his fork's main) or also raised BACK to JiangWay. Default here: fork-internal; PR-back is a later, separate action. From 0123f7ee527682dce8d62fc0ddcd1c9c73c9e545 Mon Sep 17 00:00:00 2001 From: Adrian Theopold <83468052+AdrianTheopold@users.noreply.github.com> Date: Thu, 2 Jul 2026 09:38:05 +0000 Subject: [PATCH 02/12] fix(bridge): suppress SDD self-finish so bridge owns verify/retro/archive (H2) --- superpowers-bridge/schema.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/superpowers-bridge/schema.yaml b/superpowers-bridge/schema.yaml index 65e2ca1..7e79169 100644 --- a/superpowers-bridge/schema.yaml +++ b/superpowers-bridge/schema.yaml @@ -503,6 +503,13 @@ apply: - Read plan.md in this change directory for micro-tasks - Update tasks.md checkboxes as coarse tasks complete - Work within the created worktree + - STOP after the final whole-branch review passes. Do NOT invoke + superpowers:finishing-a-development-branch and do NOT remove or + clean up the worktree — this bridge runs the finish sequence + itself at apply step 6, and the worktree + SDD ledger must + survive for steps 3-5 (verify / retrospective / archive). + Return control to the apply controller after the final review; + report the commit range and the ledger path. IMPORTANT — transitive skill activation: subagent-driven-development internally enforces the @@ -517,6 +524,13 @@ apply: runs for the entire implementation before apply concludes. + NOTE: subagent-driven-development's own flow ends by invoking + finishing-a-development-branch + worktree cleanup; under THIS + bridge that terminal step is SUPPRESSED (see the executor + instruction above) because the bridge sequences finish itself + at apply step 6. There is no native flag to disable it, so the + suppression is by instruction. + This schema does NOT support `superpowers:executing-plans` as a fallback for non-subagent platforms. Per its SKILL.md, executing-plans does not transitively activate TDD or From d32386146ccc6efc366a293a43a02fc4da3051ab Mon Sep 17 00:00:00 2001 From: Adrian Theopold <83468052+AdrianTheopold@users.noreply.github.com> Date: Thu, 2 Jul 2026 09:39:15 +0000 Subject: [PATCH 03/12] fix(bridge): bind tasks.md tick to SDD ledger step; note verify false-STOP (H1) --- superpowers-bridge/schema.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/superpowers-bridge/schema.yaml b/superpowers-bridge/schema.yaml index 7e79169..b71e4a3 100644 --- a/superpowers-bridge/schema.yaml +++ b/superpowers-bridge/schema.yaml @@ -208,6 +208,10 @@ artifacts: 2. Task progress (must return > 0): grep -c '^- \[x\]' openspec/changes//tasks.md + (This returns 0 only if the apply executor failed to tick + tasks.md as tasks cleared — see apply step 2's ticking rule; + a 0 here on a genuinely-complete apply is a bookkeeping miss, + not incomplete work. Tick the boxes, then re-run.) Only after BOTH return positive numbers, proceed to invoke the verification skill below. @@ -501,7 +505,14 @@ apply: Tell the executor: - Read plan.md in this change directory for micro-tasks - - Update tasks.md checkboxes as coarse tasks complete + - Tick tasks.md checkboxes IN THE SAME bookkeeping message where + you append the SDD progress-ledger line for a cleared task: + when a task's review comes back clean, flip its `- [ ]` to + `- [x]` in openspec/changes//tasks.md AND append the + ledger line together. tasks.md is the committed source of + truth (it travels in the PR diff and gates verify); the ledger + is throwaway per-worktree scratch. Never leave tasks.md + all-unchecked — the verify PRECHECK below will falsely STOP. - Work within the created worktree - STOP after the final whole-branch review passes. Do NOT invoke superpowers:finishing-a-development-branch and do NOT remove or From e5ac033a446ff70fb5bb5b7fd43a9aba59bfec28 Mon Sep 17 00:00:00 2001 From: Adrian Theopold <83468052+AdrianTheopold@users.noreply.github.com> Date: Thu, 2 Jul 2026 09:43:31 +0000 Subject: [PATCH 04/12] =?UTF-8?q?fix(bridge):=20correct=20nonexistent=20/o?= =?UTF-8?q?psx:new=20->=20openspec=20new=20change;=20robust=20base-detect;?= =?UTF-8?q?=20placeholder=20note=20(M2/M5/M6;=20M3=20dropped=20as=20false?= =?UTF-8?q?=20=E2=80=94=20config.yaml=20is=20real=20in=201.4.x)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- superpowers-bridge/README.md | 14 +++++++------- superpowers-bridge/README.zh-TW.md | 14 +++++++------- superpowers-bridge/schema.yaml | 4 +++- .../templates/adopters/CLAUDE.md.fragment.md | 2 +- .../templates/adopters/CLAUDE.md.fragment.zh-TW.md | 2 +- 5 files changed, 19 insertions(+), 17 deletions(-) diff --git a/superpowers-bridge/README.md b/superpowers-bridge/README.md index 00e4688..23c9186 100644 --- a/superpowers-bridge/README.md +++ b/superpowers-bridge/README.md @@ -153,7 +153,7 @@ Not every change needs a `change` directory. The following scenarios should skip | Scenario | Need a change? | What to do | |---|---|---| -| New feature / new capability | ✅ Yes | `/opsx:new --schema superpowers-bridge` | +| New feature / new capability | ✅ Yes | `openspec new change --schema superpowers-bridge` | | Breaking change | ✅ Yes | Same | | Architecture change | ✅ Yes | Same | | Bug fix (restoring intended behavior, no contract change) | ❌ No | Direct PR | @@ -169,7 +169,7 @@ Not every change needs a `change` directory. The following scenarios should skip If `superpowers:brainstorming` was triggered via narrative ("let's brainstorm the architecture") in a project that uses this schema, the brainstorming output **MUST NOT** land in `docs/superpowers/specs/` — that bypasses the schema's output redirection and creates orphan artifacts. -The correct flow: keep brainstorming verbally until all 5 conditions below hold, then promote to `/opsx:propose` or `/opsx:new` so the agreed design lands in `openspec/changes//brainstorm.md`. +The correct flow: keep brainstorming verbally until all 5 conditions below hold, then promote to `/opsx:propose` so the agreed design lands in `openspec/changes//brainstorm.md`. 1. **Scope locked** — one sentence describes what's in / out, and the scope doesn't keep growing each turn 2. **Major design forks resolved** — alternatives have been weighed and one chosen; remaining unknowns are **explicit TBDs** (with owner and impact-scope statement), not "haven't thought about it yet" @@ -220,7 +220,7 @@ The Artifact DAG above shows **file-existence** dependencies. The runtime lifecy ```mermaid flowchart TD - Start([/opsx:propose · /opsx:new]) + Start([/opsx:propose · /opsx:ff]) subgraph Plan ["📝 PLANNING — 7 artifacts"] direction TB @@ -333,7 +333,7 @@ Implemented purely via context injection at invocation time, not by modifying sk ### Step-by-step flow ```bash -/opsx:new my-feature --schema superpowers-bridge +openspec new change my-feature --schema superpowers-bridge /opsx:continue # → brainstorm (interactive dialogue) /opsx:continue # → proposal /opsx:continue # → design (reorganize brainstorm into structured decisions) @@ -349,7 +349,7 @@ Implemented purely via context injection at invocation time, not by modifying sk ### Switching back to spec-driven ```bash # Use a different schema for one change -/opsx:new my-simple-fix --schema spec-driven +openspec new change my-simple-fix --schema spec-driven # Or change project default in openspec/config.yaml: schema: spec-driven ``` @@ -416,13 +416,13 @@ Confirms tests are green, presents merge / PR / keep-branch / discard options, c | Scenario | Command | |---|---| | First clone of a project | `bash scripts/install-git-hooks.sh` | -| New change (interactive) | `/opsx:new --schema superpowers-bridge` then `/opsx:continue` | +| New change (interactive) | `openspec new change --schema superpowers-bridge` then `/opsx:continue` | | New change (one-shot) | `/opsx:ff ` | | Resume an interrupted change | `/opsx:continue ` | | Enter implementation | `/opsx:apply ` | | Manual verify | `/opsx:verify ` | | Archive | `/opsx:archive ` | -| Use built-in (skip brainstorm) | `/opsx:new --schema spec-driven` | +| Use built-in (skip brainstorm) | `openspec new change --schema spec-driven` | | List all schemas in the project | `openspec schemas` | | Inspect a change's progress | `openspec status --change --json` | | List active changes | `openspec list` | diff --git a/superpowers-bridge/README.zh-TW.md b/superpowers-bridge/README.zh-TW.md index 6f6d569..c852b5f 100644 --- a/superpowers-bridge/README.zh-TW.md +++ b/superpowers-bridge/README.zh-TW.md @@ -153,7 +153,7 @@ OpenSpec 管 **「做什麼」**(artifact 生命週期:proposal / specs / tasks | 情境 | 是否要建 change | 怎麼做 | |---|---|---| -| 新功能 / 新 capability | ✅ 要 | `/opsx:new --schema superpowers-bridge` | +| 新功能 / 新 capability | ✅ 要 | `openspec new change --schema superpowers-bridge` | | Breaking change | ✅ 要 | 同上 | | 架構變更 | ✅ 要 | 同上 | | Bug fix(恢復原本行為,不變更合約) | ❌ 不要 | 直接 PR | @@ -169,7 +169,7 @@ OpenSpec 管 **「做什麼」**(artifact 生命週期:proposal / specs / tasks 如果使用者以 narrative(「我們來討論架構」「腦力激盪一下」)觸發了 `superpowers:brainstorming`,brainstorming 的產出**不可以**寫到 `docs/superpowers/specs/` —— 那會繞過本 schema 的 output redirection,在 repo 裡留下 orphan artifact。 -正確流程:在以下 5 條判準**全部滿足**之前,維持 verbal brainstorm;全滿足時升級到 `/opsx:propose` 或 `/opsx:new`,讓 brainstorming 的對話結論落到 `openspec/changes//brainstorm.md`。 +正確流程:在以下 5 條判準**全部滿足**之前,維持 verbal brainstorm;全滿足時升級到 `/opsx:propose`,讓 brainstorming 的對話結論落到 `openspec/changes//brainstorm.md`。 1. **Scope 鎖定** —— 一句話講清「包含什麼、不包含什麼」,且不會在每一輪對話又長出新項目 2. **主要設計分歧已收斂** —— 替代方案討論過、選了一個;剩下的 unknown 是**明確列出的 TBD**(有 owner、有影響面),不是「還沒想到」 @@ -220,7 +220,7 @@ brainstorm ──┬──→ proposal ──→ specs ──┐ ```mermaid flowchart TD - Start([/opsx:propose · /opsx:new]) + Start([/opsx:propose · /opsx:ff]) subgraph Plan ["📝 PLANNING — 7 個 artifact"] direction TB @@ -333,7 +333,7 @@ Superpowers skill 有預設輸出路徑(例如 brainstorming 寫到 `docs/superp ### 逐步流程 ```bash -/opsx:new my-feature --schema superpowers-bridge +openspec new change my-feature --schema superpowers-bridge /opsx:continue # → brainstorm(互動式對話) /opsx:continue # → proposal /opsx:continue # → design(將 brainstorm 重組為結構化決策) @@ -349,7 +349,7 @@ Superpowers skill 有預設輸出路徑(例如 brainstorming 寫到 `docs/superp ### 切回 spec-driven ```bash # 單一 change 用不同 schema -/opsx:new my-simple-fix --schema spec-driven +openspec new change my-simple-fix --schema spec-driven # 或修改專案預設(openspec/config.yaml: schema: spec-driven) ``` @@ -416,13 +416,13 @@ Evidence-first 反思:§0 Evidence(量化前置數據 —— commit 數、diff | 情境 | 指令 | |---|---| | 首次 clone 專案後 | `bash scripts/install-git-hooks.sh` | -| 新 change(互動式) | `/opsx:new --schema superpowers-bridge` 接著多次 `/opsx:continue` | +| 新 change(互動式) | `openspec new change --schema superpowers-bridge` 接著多次 `/opsx:continue` | | 新 change(一鍵) | `/opsx:ff ` | | 恢復中斷的 change | `/opsx:continue ` | | 進入實作 | `/opsx:apply ` | | 手動 verify | `/opsx:verify ` | | 歸檔 | `/opsx:archive ` | -| 用內建(跳過 brainstorm) | `/opsx:new --schema spec-driven` | +| 用內建(跳過 brainstorm) | `openspec new change --schema spec-driven` | | 列出所有 schema | `openspec schemas` | | 查看某 change 進度 | `openspec status --change --json` | | 列出 active changes | `openspec list` | diff --git a/superpowers-bridge/schema.yaml b/superpowers-bridge/schema.yaml index b71e4a3..35be513 100644 --- a/superpowers-bridge/schema.yaml +++ b/superpowers-bridge/schema.yaml @@ -199,12 +199,14 @@ artifacts: template: verify.md instruction: | PRECHECK — implementation evidence: + (Substitute in the commands below with this + change's directory name before running them.) Before producing verify.md, run BOTH commands. If either returns 0, STOP and tell the user that apply phase has not yet produced reviewable changes. 1. Commit evidence (must return > 0): - git log --oneline $(git merge-base HEAD origin/main 2>/dev/null || git merge-base HEAD origin/master 2>/dev/null)..HEAD | wc -l + git log --oneline $(git merge-base HEAD origin/main 2>/dev/null || git merge-base HEAD origin/master 2>/dev/null || git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null)..HEAD | wc -l 2. Task progress (must return > 0): grep -c '^- \[x\]' openspec/changes//tasks.md diff --git a/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.md b/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.md index 960f1c7..e28bcbe 100644 --- a/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.md +++ b/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.md @@ -11,7 +11,7 @@ This repo uses [`superpowers-bridge`](https://github.com/JiangWay/openspec-schem | Trigger you observe | What to do | |---|---| | User starts a narrative "design discussion / let's brainstorm" | Run verbal `superpowers:brainstorming`, but **do NOT** write to `docs/superpowers/specs/`. Once the conversation converges per the 5 criteria below, promote to `/opsx:propose` | -| User invokes `/opsx:new` / `/opsx:ff` / `/opsx:propose` directly | Follow the schema's flow; artifact instructions inject at each step | +| User invokes `/opsx:propose` / `/opsx:ff` (or `openspec new change`) directly | Follow the schema's flow; artifact instructions inject at each step | | User explicitly says bug fix / typo / config tweak / doc update | Direct PR — **do NOT** open a change (see skip rules below) | | User is mid-change | Advance with `/opsx:continue`, `/opsx:apply`, `/opsx:verify`, or `/opsx:archive` | diff --git a/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.zh-TW.md b/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.zh-TW.md index 81880e3..d039119 100644 --- a/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.zh-TW.md +++ b/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.zh-TW.md @@ -11,7 +11,7 @@ | 你看到的觸發 | 應該怎麼做 | |---|---| | 使用者以 narrative 開「設計討論 / 腦力激盪」 | 先 verbal `superpowers:brainstorming`,**不**寫到 `docs/superpowers/specs/`;對話收斂後依下方 5 條判準升級到 `/opsx:propose` | -| 使用者直接呼叫 `/opsx:new` / `/opsx:ff` / `/opsx:propose` | 走 schema 既定流程;artifact instruction 會在每步注入 | +| 使用者直接呼叫 `/opsx:propose` / `/opsx:ff`(或 `openspec new change`) | 走 schema 既定流程;artifact instruction 會在每步注入 | | 使用者明確說 bug fix / typo / config 微調 / 文件更新 | 直接 PR,**不**建 change(見下方 skip 規則) | | 已經在某個 change 中 | `/opsx:continue` 或 `/opsx:apply` / `/opsx:verify` / `/opsx:archive` 推進 | From b9c9496bbe4701dde235c3f28645e8a72e7c4543 Mon Sep 17 00:00:00 2001 From: Adrian Theopold <83468052+AdrianTheopold@users.noreply.github.com> Date: Thu, 2 Jul 2026 09:47:42 +0000 Subject: [PATCH 05/12] feat(bridge): adapt to Superpowers 6.1.0 (push-only finish, merged reviewer, plan.md format, pin exec-plans URL) + re-attest baselines 6.1.0/1.5.0 (M4 + v6 diff) --- superpowers-bridge/README.md | 14 ++++++------ superpowers-bridge/README.zh-TW.md | 14 ++++++------ superpowers-bridge/VERSION | 2 +- superpowers-bridge/schema.yaml | 34 ++++++++++++++++++++---------- 4 files changed, 40 insertions(+), 24 deletions(-) diff --git a/superpowers-bridge/README.md b/superpowers-bridge/README.md index 23c9186..ccd729b 100644 --- a/superpowers-bridge/README.md +++ b/superpowers-bridge/README.md @@ -4,8 +4,8 @@ [![Schema Structure](https://github.com/JiangWay/openspec-schemas/actions/workflows/validate-schemas.yml/badge.svg?branch=main)](https://github.com/JiangWay/openspec-schemas/actions/workflows/validate-schemas.yml) [![Upstream Drift](https://img.shields.io/github/issues-search/JiangWay/openspec-schemas?query=is%3Aopen%20label%3Aupstream-version-check&label=Upstream%20Drift&color=yellow)](https://github.com/JiangWay/openspec-schemas/issues?q=is%3Aopen+label%3Aupstream-version-check) -[![OpenSpec baseline](https://img.shields.io/badge/OpenSpec_baseline-1.4.1-0277bd)](#compatibility) -[![Superpowers baseline](https://img.shields.io/badge/Superpowers_baseline-v5.1.0-0277bd)](#compatibility) +[![OpenSpec baseline](https://img.shields.io/badge/OpenSpec_baseline-1.5.0-0277bd)](#compatibility) +[![Superpowers baseline](https://img.shields.io/badge/Superpowers_baseline-6.1.0-0277bd)](#compatibility) > Bridges [OpenSpec](https://github.com/Fission-AI/OpenSpec)'s artifact governance (the **what**) with [obra/superpowers](https://github.com/obra/superpowers) execution skills (the **how**) into a single workflow. Adds an evidence-first `retrospective` artifact filling a gap Superpowers does not natively cover. > @@ -307,7 +307,7 @@ APPLY ━━━━━━━━━━━━━━━━━━━━━━━━ Plus one OpenSpec built-in: `openspec-verify-change` (apply step 3, produces `verify.md`). -> **No `executing-plans` fallback.** This schema is opinionated: it requires a subagent-capable platform (Claude Code, Codex, etc.). The alternative executor `superpowers:executing-plans` does not transitively activate TDD or code-review (verified against its [SKILL.md](https://github.com/obra/superpowers/blob/main/skills/executing-plans/SKILL.md)) — falling back would silently degrade Superpowers' core value. If your platform lacks subagent support, use the built-in `spec-driven` schema instead. +> **No `executing-plans` fallback.** This schema is opinionated: it requires a subagent-capable platform (Claude Code, Codex, etc.). The alternative executor `superpowers:executing-plans` does not transitively activate TDD or code-review (verified against its [SKILL.md](https://github.com/obra/superpowers/blob/v6.1.0/skills/executing-plans/SKILL.md)) — falling back would silently degrade Superpowers' core value. If your platform lacks subagent support, use the built-in `spec-driven` schema instead. ### Output redirection @@ -446,7 +446,7 @@ TDD and code-review are normally hidden inside `subagent-driven-development`'s S ### 4. Opinionated: subagent platforms only, no manual fallback -This schema requires a subagent-capable platform (Claude Code, Codex, etc.). The alternative executor `superpowers:executing-plans` does NOT transitively activate TDD or code-review (verified against its [SKILL.md](https://github.com/obra/superpowers/blob/main/skills/executing-plans/SKILL.md) — its body has no mention of either, and its Integration section omits both `test-driven-development` and `requesting-code-review`). Falling back to it would silently lose what Superpowers brings to this integration. We prefer to fail loud at Step 0 and direct users to the built-in `spec-driven` schema instead. +This schema requires a subagent-capable platform (Claude Code, Codex, etc.). The alternative executor `superpowers:executing-plans` does NOT transitively activate TDD or code-review (verified against its [SKILL.md](https://github.com/obra/superpowers/blob/v6.1.0/skills/executing-plans/SKILL.md) — its body has no mention of either, and its Integration section omits both `test-driven-development` and `requesting-code-review`). Falling back to it would silently lose what Superpowers brings to this integration. We prefer to fail loud at Step 0 and direct users to the built-in `spec-driven` schema instead. ### 5. Evidence-based PRECHECK for verify and retrospective (Layer 2 capability detection) @@ -480,11 +480,13 @@ A bundle release `1.x.y` is a published cut of schema major `v1`. A future schem Baseline versions this schema was authored against. This is a **historical snapshot, not an end-to-end compatibility guarantee** — CI cannot run the full prompt-layer workflow in headless mode, so behavioral compatibility relies on human review when drift fires. -Current bundle release: **`1.0.0`** (git tag `v1.0.0`; see [VERSION](./VERSION)). +Current bundle release: **`1.1.0`** (see [VERSION](./VERSION)). | superpowers-bridge | OpenSpec CLI | Superpowers plugin | Baseline as of | |---|---|---|---| -| v1 | `1.4.1` | `v5.1.0` | 2026-06-10 | +| v1 | `1.5.0` | `6.1.0` | 2026-07-02 | + +> Re-attested against **Superpowers 6.1.0** (2026-07-02) via a full v5.1.0→6.1.0 skill diff: only `finishing-a-development-branch` (now push-only) and the merged SDD task-reviewer needed prose alignment; the SDD self-finish conflict (H2) predates v6 and is suppressed by the apply instruction. **OpenSpec 1.5.0** "Stores" is opt-in beta and does not affect this bridge — re-check the `changes/`+`specs/` paths only if a future release makes Stores the default layout. ### How this is checked diff --git a/superpowers-bridge/README.zh-TW.md b/superpowers-bridge/README.zh-TW.md index c852b5f..4827281 100644 --- a/superpowers-bridge/README.zh-TW.md +++ b/superpowers-bridge/README.zh-TW.md @@ -4,8 +4,8 @@ [![Schema Structure](https://github.com/JiangWay/openspec-schemas/actions/workflows/validate-schemas.yml/badge.svg?branch=main)](https://github.com/JiangWay/openspec-schemas/actions/workflows/validate-schemas.yml) [![Upstream Drift](https://img.shields.io/github/issues-search/JiangWay/openspec-schemas?query=is%3Aopen%20label%3Aupstream-version-check&label=Upstream%20Drift&color=yellow)](https://github.com/JiangWay/openspec-schemas/issues?q=is%3Aopen+label%3Aupstream-version-check) -[![OpenSpec baseline](https://img.shields.io/badge/OpenSpec_baseline-1.4.1-0277bd)](#相容性) -[![Superpowers baseline](https://img.shields.io/badge/Superpowers_baseline-v5.1.0-0277bd)](#相容性) +[![OpenSpec baseline](https://img.shields.io/badge/OpenSpec_baseline-1.5.0-0277bd)](#相容性) +[![Superpowers baseline](https://img.shields.io/badge/Superpowers_baseline-6.1.0-0277bd)](#相容性) > 把 [OpenSpec](https://github.com/Fission-AI/OpenSpec) 的 artifact 治理流程(**做什麼**)與 [obra/superpowers](https://github.com/obra/superpowers) 的執行技能(**怎麼做**)整合為單一工作流。額外提供 evidence-first 的 `retrospective` artifact,補上 Superpowers 沒有的 retro 能力。 > @@ -307,7 +307,7 @@ APPLY ━━━━━━━━━━━━━━━━━━━━━━━━ 加上一個 OpenSpec built-in:`openspec-verify-change`(apply step 3,產出 `verify.md`)。 -> **不支援 `executing-plans` fallback**。本 schema 是 opinionated 的:要求 subagent-capable 平台(Claude Code、Codex 等)。替代 executor `superpowers:executing-plans` 並**不會** transitively 觸發 TDD 或 code-review(已對 [SKILL.md](https://github.com/obra/superpowers/blob/main/skills/executing-plans/SKILL.md) 做事實查核 —— body 完全沒提到 TDD 或 code-review,Integration 段也未列出 `test-driven-development` 與 `requesting-code-review`)。退到 2b 等於靜默降級 Superpowers 的核心價值。若你的平台沒有 subagent 支援,改用 OpenSpec 內建的 `spec-driven` schema。 +> **不支援 `executing-plans` fallback**。本 schema 是 opinionated 的:要求 subagent-capable 平台(Claude Code、Codex 等)。替代 executor `superpowers:executing-plans` 並**不會** transitively 觸發 TDD 或 code-review(已對 [SKILL.md](https://github.com/obra/superpowers/blob/v6.1.0/skills/executing-plans/SKILL.md) 做事實查核 —— body 完全沒提到 TDD 或 code-review,Integration 段也未列出 `test-driven-development` 與 `requesting-code-review`)。退到 2b 等於靜默降級 Superpowers 的核心價值。若你的平台沒有 subagent 支援,改用 OpenSpec 內建的 `spec-driven` schema。 ### Output redirection(產出重導) @@ -446,7 +446,7 @@ TDD 與 code-review 平常藏在 `subagent-driven-development` 的 SKILL.md 裡 ### 4. Opinionated:只支援 subagent 平台,沒有手動 fallback -本 schema 要求 subagent-capable 平台(Claude Code、Codex 等)。替代 executor `superpowers:executing-plans` **不會** transitively 觸發 TDD 或 code-review(已對其 [SKILL.md](https://github.com/obra/superpowers/blob/main/skills/executing-plans/SKILL.md) 做事實查核 —— body 完全沒提及這兩者,Integration 段也未列出 `test-driven-development` 與 `requesting-code-review`)。退到 2b 等於靜默丟掉 Superpowers 帶給整合的核心價值。我們選擇在 Step 0 fail loud,並指引使用者改用內建的 `spec-driven` schema。 +本 schema 要求 subagent-capable 平台(Claude Code、Codex 等)。替代 executor `superpowers:executing-plans` **不會** transitively 觸發 TDD 或 code-review(已對其 [SKILL.md](https://github.com/obra/superpowers/blob/v6.1.0/skills/executing-plans/SKILL.md) 做事實查核 —— body 完全沒提及這兩者,Integration 段也未列出 `test-driven-development` 與 `requesting-code-review`)。退到 2b 等於靜默丟掉 Superpowers 帶給整合的核心價值。我們選擇在 Step 0 fail loud,並指引使用者改用內建的 `spec-driven` schema。 ### 5. Evidence-based PRECHECK for verify and retrospective(Layer 2 capability detection) @@ -480,11 +480,13 @@ LLM 不必解讀 timing 文字 —— 跑指令、看結果即可。這是顧慮 本 schema 撰寫時所對齊的 upstream 基準版本。這是**歷史快照,不是端對端相容性承諾** — CI 無法在 headless 環境跑完整的 prompt-layer workflow,行為相容性依賴 drift 觸發人類檢核。 -目前 bundle release: **`1.0.0`**(git tag `v1.0.0`;見 [VERSION](./VERSION))。 +目前 bundle release: **`1.1.0`**(見 [VERSION](./VERSION))。 | superpowers-bridge | OpenSpec CLI | Superpowers plugin | 基準日期 | |---|---|---|---| -| v1 | `1.4.1` | `v5.1.0` | 2026-06-10 | +| v1 | `1.5.0` | `6.1.0` | 2026-07-02 | + +> 已對 **Superpowers 6.1.0**(2026-07-02)做完整 v5.1.0→6.1.0 skill diff 重新對齊:只有 `finishing-a-development-branch`(現在只 push)與合併後的 SDD task-reviewer 需要 prose 對齊;SDD self-finish 衝突(H2)早於 v6 就存在,由 apply instruction 抑制。**OpenSpec 1.5.0** 的 "Stores" 是 opt-in beta,不影響本 bridge —— 只有未來某版把 Stores 設為預設 layout 時,才需重新檢查 `changes/`+`specs/` 路徑。 ### 驗證機制 diff --git a/superpowers-bridge/VERSION b/superpowers-bridge/VERSION index 3eefcb9..9084fa2 100644 --- a/superpowers-bridge/VERSION +++ b/superpowers-bridge/VERSION @@ -1 +1 @@ -1.0.0 +1.1.0 diff --git a/superpowers-bridge/schema.yaml b/superpowers-bridge/schema.yaml index 35be513..6ff7bc7 100644 --- a/superpowers-bridge/schema.yaml +++ b/superpowers-bridge/schema.yaml @@ -190,6 +190,10 @@ artifacts: Pass the tasks.md content to the skill as the input for decomposition. The plan should reference the specs and design artifacts in this change directory. + + Note (Superpowers 6.x): writing-plans emits a "## Global + Constraints" block and per-task "Interfaces" blocks; the + implementer MUST honor both. requires: - tasks @@ -463,6 +467,10 @@ artifacts: requires: - verify +# v6 notes: subagent-driven-development (6.x) applies explicit per-dispatch +# model selection (Sonnet for mechanical steps, Opus for reasoning) and keeps +# a durable .superpowers/sdd/ progress ledger for long runs. Both are handled +# by the executor automatically — no instruction here duplicates them. apply: requires: [plan] tracks: tasks.md @@ -531,11 +539,11 @@ apply: - **superpowers:test-driven-development** — every task follows RED-GREEN-REFACTOR. Implementation code written before a failing test is deleted. - - **superpowers:requesting-code-review** — after each - task, a code-reviewer subagent is dispatched to catch - spec compliance and code quality issues. A final review - runs for the entire implementation before apply - concludes. + - **superpowers:requesting-code-review** — invoked only for + the FINAL whole-branch review before apply concludes. + Per-task review is handled INSIDE subagent-driven-development + by its own merged task-reviewer prompt (spec compliance + + code quality), not by a separate skill invocation. NOTE: subagent-driven-development's own flow ends by invoking finishing-a-development-branch + worktree cleanup; under THIS @@ -581,14 +589,18 @@ apply: all 8 artifacts done, spec synced into main specs, change under archive/. - 6. **Completion (PR is the LAST step)**: + 6. **Completion (finish + push is the LAST automated step)**: After retrospective + archive are both done, use the Skill tool to invoke **superpowers:finishing-a-development-branch**. + In Superpowers v6 this PUSHES the branch; it does NOT open a + PR/MR for you (the `gh pr create` step was removed upstream). + Opening the MR/PR is a separate human step — on GitLab use + `glab`; do NOT auto-open or auto-merge. - The branch's PR diff MUST contain the complete archived - cycle. If it doesn't (e.g., because retrospective or archive - was skipped), STOP and complete those first. + The pushed branch MUST contain the complete archived cycle + (all 8 artifacts, specs synced, change under archive/). If it + doesn't (e.g., retrospective or archive was skipped), STOP and + complete those first. - This is the canonical opening sequence for the PR — do NOT - reorder. + This is the canonical finish sequence — do NOT reorder. From 67759849ea82ebc82e71124bcac15b54433f64ab Mon Sep 17 00:00:00 2001 From: Adrian Theopold <83468052+AdrianTheopold@users.noreply.github.com> Date: Thu, 2 Jul 2026 09:51:04 +0000 Subject: [PATCH 06/12] docs(bridge): fix chain (add design), grep-anchor, artifact count, step-number/2a-2b label drift + push-only label consistency (M7/L1/L4/L5) --- superpowers-bridge/README.md | 14 +++++++------- superpowers-bridge/README.zh-TW.md | 22 +++++++++++----------- superpowers-bridge/schema.yaml | 4 ++-- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/superpowers-bridge/README.md b/superpowers-bridge/README.md index ccd729b..eb35118 100644 --- a/superpowers-bridge/README.md +++ b/superpowers-bridge/README.md @@ -222,7 +222,7 @@ The Artifact DAG above shows **file-existence** dependencies. The runtime lifecy flowchart TD Start([/opsx:propose · /opsx:ff]) - subgraph Plan ["📝 PLANNING — 7 artifacts"] + subgraph Plan ["📝 PLANNING — 6 artifacts"] direction TB BS["brainstorm.md
superpowers:brainstorming"] PROP["proposal.md"] @@ -246,9 +246,9 @@ flowchart TD A1["1. Workspace
using-git-worktrees"] A2["2. Executor
subagent-driven-development
↳ TDD + code-review (transitive)"] A3["3. Verification
openspec-verify-change → verify.md"] - A4["4. Retrospective → retrospective.md
(BEFORE PR; hot context)"] + A4["4. Retrospective → retrospective.md
(BEFORE finish; hot context)"] A5["5. Archive
openspec archive -y
(sync delta + move folder)"] - A6["6. Completion
finishing-a-development-branch
🏁 PR is LAST"] + A6["6. Completion
finishing-a-development-branch
🏁 push is LAST"] A0 --> A1 --> A2 --> A3 A3 -. blocking → fix .-> A2 @@ -285,12 +285,12 @@ APPLY ━━━━━━━━━━━━━━━━━━━━━━━━ ▼ │ 4. retrospective.md (BEFORE PR; hot context) 5. openspec archive -y (sync delta + move folder) - 6. superpowers:finishing-a-development-branch (🏁 PR is LAST) + 6. superpowers:finishing-a-development-branch (🏁 push is LAST) ``` > **Timing notes** (full rationale in "Six design touches" #6): > - `verify.md` declares `requires: plan` in the graph but is actually produced inside apply step 3. -> - `retrospective.md` declares `requires: verify` and per Step 4 is produced **before** the PR opens — so the PR diff includes the complete archived cycle (all artifacts done, spec synced, change folder under `archive/`). +> - `retrospective.md` declares `requires: verify` and per Step 4 is produced **before** finish/push (step 6) — so the pushed branch includes the complete archived cycle (all artifacts done, spec synced, change folder under `archive/`). > - The `requires:` edges are file-existence dependencies for OpenSpec's graph engine; runtime ordering lives in instruction prose. ### Seven Superpowers touchpoints @@ -303,7 +303,7 @@ APPLY ━━━━━━━━━━━━━━━━━━━━━━━━ | 4 | `superpowers:subagent-driven-development` | apply step 2 | Direct | | 5 | `superpowers:test-driven-development` | (activated inside #4) | **Transitive** | | 6 | `superpowers:requesting-code-review` | (activated inside #4) | **Transitive** | -| 7 | `superpowers:finishing-a-development-branch` | apply step 4 | Direct | +| 7 | `superpowers:finishing-a-development-branch` | apply step 6 | Direct | Plus one OpenSpec built-in: `openspec-verify-change` (apply step 3, produces `verify.md`). @@ -442,7 +442,7 @@ Integration lives entirely in `instruction:` fields (pure prompts). If Superpowe ### 3. Transitive dependencies made explicit -TDD and code-review are normally hidden inside `subagent-driven-development`'s SKILL.md. Our schema's apply step 2a instruction lists these two transitive activations explicitly, so a reader can see "what actually happens during apply" at a glance. +TDD and code-review are normally hidden inside `subagent-driven-development`'s SKILL.md. Our schema's apply step 2 instruction lists these two transitive activations explicitly, so a reader can see "what actually happens during apply" at a glance. ### 4. Opinionated: subagent platforms only, no manual fallback diff --git a/superpowers-bridge/README.zh-TW.md b/superpowers-bridge/README.zh-TW.md index 4827281..a284d6d 100644 --- a/superpowers-bridge/README.zh-TW.md +++ b/superpowers-bridge/README.zh-TW.md @@ -222,7 +222,7 @@ brainstorm ──┬──→ proposal ──→ specs ──┐ flowchart TD Start([/opsx:propose · /opsx:ff]) - subgraph Plan ["📝 PLANNING — 7 個 artifact"] + subgraph Plan ["📝 PLANNING — 6 個 artifact"] direction TB BS["brainstorm.md
superpowers:brainstorming"] PROP["proposal.md"] @@ -246,9 +246,9 @@ flowchart TD A1["1. Workspace
using-git-worktrees"] A2["2. Executor
subagent-driven-development
↳ TDD + code-review(傳遞)"] A3["3. Verification
openspec-verify-change → verify.md"] - A4["4. Retrospective → retrospective.md
(PR 之前;hot context)"] + A4["4. Retrospective → retrospective.md
(finish 之前;hot context)"] A5["5. Archive
openspec archive -y
(sync delta + 搬 folder)"] - A6["6. Completion
finishing-a-development-branch
🏁 PR 是最後一步"] + A6["6. Completion
finishing-a-development-branch
🏁 push 是最後一步"] A0 --> A1 --> A2 --> A3 A3 -. blocking → 回去修 .-> A2 @@ -283,9 +283,9 @@ APPLY ━━━━━━━━━━━━━━━━━━━━━━━━ 3. openspec-verify-change → verify.md ◄┐ │ │ blocking → 回去修 ▼ │ - 4. retrospective.md(PR 之前;hot context) + 4. retrospective.md(finish 之前;hot context) 5. openspec archive -y(sync delta + 搬 folder) - 6. superpowers:finishing-a-development-branch(🏁 PR 是最後一步) + 6. superpowers:finishing-a-development-branch(🏁 push 是最後一步) ``` > **時序註記**(完整理由見下方「設計觸點 #6」): @@ -303,11 +303,11 @@ APPLY ━━━━━━━━━━━━━━━━━━━━━━━━ | 4 | `superpowers:subagent-driven-development` | apply step 2 | 直接 | | 5 | `superpowers:test-driven-development` | (#4 內部觸發) | **傳遞** | | 6 | `superpowers:requesting-code-review` | (#4 內部觸發) | **傳遞** | -| 7 | `superpowers:finishing-a-development-branch` | apply step 4 | 直接 | +| 7 | `superpowers:finishing-a-development-branch` | apply step 6 | 直接 | 加上一個 OpenSpec built-in:`openspec-verify-change`(apply step 3,產出 `verify.md`)。 -> **不支援 `executing-plans` fallback**。本 schema 是 opinionated 的:要求 subagent-capable 平台(Claude Code、Codex 等)。替代 executor `superpowers:executing-plans` 並**不會** transitively 觸發 TDD 或 code-review(已對 [SKILL.md](https://github.com/obra/superpowers/blob/v6.1.0/skills/executing-plans/SKILL.md) 做事實查核 —— body 完全沒提到 TDD 或 code-review,Integration 段也未列出 `test-driven-development` 與 `requesting-code-review`)。退到 2b 等於靜默降級 Superpowers 的核心價值。若你的平台沒有 subagent 支援,改用 OpenSpec 內建的 `spec-driven` schema。 +> **不支援 `executing-plans` fallback**。本 schema 是 opinionated 的:要求 subagent-capable 平台(Claude Code、Codex 等)。替代 executor `superpowers:executing-plans` 並**不會** transitively 觸發 TDD 或 code-review(已對 [SKILL.md](https://github.com/obra/superpowers/blob/v6.1.0/skills/executing-plans/SKILL.md) 做事實查核 —— body 完全沒提到 TDD 或 code-review,Integration 段也未列出 `test-driven-development` 與 `requesting-code-review`)。退到 executing-plans 等於靜默降級 Superpowers 的核心價值。若你的平台沒有 subagent 支援,改用 OpenSpec 內建的 `spec-driven` schema。 ### Output redirection(產出重導) @@ -399,11 +399,11 @@ Main agent 讀 `plan.md`,為每個 micro-task 派發 fresh subagent。每個 sub Evidence-first 反思:§0 Evidence(量化前置數據 —— commit 數、diff 大小、tasks done 比例、新依賴、validate 狀態等)加上 6 段分析(Wins / Misses / Plan deviations / Skill compliance / Surprises / Promote candidates)。每個 claim 引用 commit / file / 可量化事實,通常指向 §0 而非每行 inline 證據。procedure 直接內嵌在 artifact instruction —— 不依賴外部 skill(Decision 3 in 設計 spec:Claude Code plugin 化延後到 v1.x)。 -在開 PR **之前**寫好,讓 retro 跟其他 artifact 一起落在同一個 PR diff。 +在 finish/push **之前**寫好,讓 retro 跟其他 artifact 一起落在同一個 PR diff。 #### 5. Archive — `openspec archive -y`(或 `/opsx:archive`) -把 delta spec sync 到 `openspec/specs//spec.md`、把 change 目錄搬到 `openspec/changes/archive/YYYY-MM-DD-/`。在開 PR **之前**跑完,這樣 PR diff 反映完整的 archived cycle 狀態(所有 artifact 完成、spec 已 sync、folder 在 `archive/`)。 +把 delta spec sync 到 `openspec/specs//spec.md`、把 change 目錄搬到 `openspec/changes/archive/YYYY-MM-DD-/`。在 finish/push **之前**跑完,這樣 PR diff 反映完整的 archived cycle 狀態(所有 artifact 完成、spec 已 sync、folder 在 `archive/`)。 #### 6. Completion — `superpowers:finishing-a-development-branch` @@ -442,11 +442,11 @@ Evidence-first 反思:§0 Evidence(量化前置數據 —— commit 數、diff ### 3. 傳遞依賴顯式化 -TDD 與 code-review 平常藏在 `subagent-driven-development` 的 SKILL.md 裡。本 schema apply step 2a 的 instruction **直接列出**這兩個 transitive activation,讓讀者一眼看懂「apply 階段到底會發生什麼」。 +TDD 與 code-review 平常藏在 `subagent-driven-development` 的 SKILL.md 裡。本 schema apply step 2 的 instruction **直接列出**這兩個 transitive activation,讓讀者一眼看懂「apply 階段到底會發生什麼」。 ### 4. Opinionated:只支援 subagent 平台,沒有手動 fallback -本 schema 要求 subagent-capable 平台(Claude Code、Codex 等)。替代 executor `superpowers:executing-plans` **不會** transitively 觸發 TDD 或 code-review(已對其 [SKILL.md](https://github.com/obra/superpowers/blob/v6.1.0/skills/executing-plans/SKILL.md) 做事實查核 —— body 完全沒提及這兩者,Integration 段也未列出 `test-driven-development` 與 `requesting-code-review`)。退到 2b 等於靜默丟掉 Superpowers 帶給整合的核心價值。我們選擇在 Step 0 fail loud,並指引使用者改用內建的 `spec-driven` schema。 +本 schema 要求 subagent-capable 平台(Claude Code、Codex 等)。替代 executor `superpowers:executing-plans` **不會** transitively 觸發 TDD 或 code-review(已對其 [SKILL.md](https://github.com/obra/superpowers/blob/v6.1.0/skills/executing-plans/SKILL.md) 做事實查核 —— body 完全沒提及這兩者,Integration 段也未列出 `test-driven-development` 與 `requesting-code-review`)。退到 executing-plans 等於靜默丟掉 Superpowers 帶給整合的核心價值。我們選擇在 Step 0 fail loud,並指引使用者改用內建的 `spec-driven` schema。 ### 5. Evidence-based PRECHECK for verify and retrospective(Layer 2 capability detection) diff --git a/superpowers-bridge/schema.yaml b/superpowers-bridge/schema.yaml index 6ff7bc7..533d246 100644 --- a/superpowers-bridge/schema.yaml +++ b/superpowers-bridge/schema.yaml @@ -12,7 +12,7 @@ description: > If your platform lacks subagent support, use spec-driven instead. Each artifact / apply step verifies its required skills before invoking and surfaces a clear error if any are missing. - brainstorm → proposal → specs → tasks → plan → verify → retrospective. + brainstorm → proposal → design → specs → tasks → plan → verify → retrospective. design is required (reorganizes raw brainstorm output into structured Context / Goals / Decisions / Risks / Migration; referenced by tasks and plan for implementation guidance). @@ -213,7 +213,7 @@ artifacts: git log --oneline $(git merge-base HEAD origin/main 2>/dev/null || git merge-base HEAD origin/master 2>/dev/null || git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null)..HEAD | wc -l 2. Task progress (must return > 0): - grep -c '^- \[x\]' openspec/changes//tasks.md + grep -cE '^\s*- \[x\]' openspec/changes//tasks.md (This returns 0 only if the apply executor failed to tick tasks.md as tasks cleared — see apply step 2's ticking rule; a 0 here on a genuinely-complete apply is a bookkeeping miss, From 92180c63a868cad6fa86b231151587c61703743f Mon Sep 17 00:00:00 2001 From: Adrian Theopold <83468052+AdrianTheopold@users.noreply.github.com> Date: Thu, 2 Jul 2026 09:54:49 +0000 Subject: [PATCH 07/12] chore(bridge): re-point to fork, retire drift-vs-JiangWay bot + badge, add upstream attribution --- .github/workflows/version-check.yml | 171 ------------------ superpowers-bridge/README.md | 19 +- superpowers-bridge/README.zh-TW.md | 19 +- .../templates/adopters/CLAUDE.md.fragment.md | 4 +- .../adopters/CLAUDE.md.fragment.zh-TW.md | 4 +- 5 files changed, 24 insertions(+), 193 deletions(-) delete mode 100644 .github/workflows/version-check.yml diff --git a/.github/workflows/version-check.yml b/.github/workflows/version-check.yml deleted file mode 100644 index a9e5599..0000000 --- a/.github/workflows/version-check.yml +++ /dev/null @@ -1,171 +0,0 @@ -name: Weekly upstream version check - -on: - schedule: - # Mondays at 14:00 UTC (Tuesday 22:00 Asia/Taipei) - - cron: '0 14 * * 1' - workflow_dispatch: - -permissions: - contents: read - issues: write - -jobs: - check: - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - name: Checkout - uses: actions/checkout@v6 - - - name: Set up Node.js - uses: actions/setup-node@v6 - with: - node-version: "24" - - - name: Get latest OpenSpec CLI version - id: openspec - run: | - version=$(npm view @fission-ai/openspec version) - echo "version=$version" >> "$GITHUB_OUTPUT" - echo "Latest OpenSpec CLI: $version" - - - name: Get latest Superpowers release - id: superpowers - run: | - response=$(curl -fsSL https://api.github.com/repos/obra/superpowers/releases/latest) - tag=$(echo "$response" | jq -r '.tag_name') - echo "tag=$tag" >> "$GITHUB_OUTPUT" - echo "Latest Superpowers: $tag" - - - name: Read pinned versions from README - id: pinned - run: | - line=$(grep -E '^\| v1 \| `' superpowers-bridge/README.md | head -1) - if [ -z "$line" ]; then - echo "::error::Could not find Compatibility table row in superpowers-bridge/README.md" - exit 1 - fi - pinned_openspec=$(echo "$line" | awk -F'`' '{print $2}') - pinned_superpowers=$(echo "$line" | awk -F'`' '{print $4}') - echo "openspec=$pinned_openspec" >> "$GITHUB_OUTPUT" - echo "superpowers=$pinned_superpowers" >> "$GITHUB_OUTPUT" - echo "Pinned in README: OpenSpec=$pinned_openspec, Superpowers=$pinned_superpowers" - - - name: Install OpenSpec CLI (latest) - run: npm install -g @fission-ai/openspec@${{ steps.openspec.outputs.version }} - - - name: Validate schema against latest OpenSpec - id: validate - continue-on-error: true - run: | - mkdir -p /tmp/test-project/openspec/schemas - cp -R superpowers-bridge /tmp/test-project/openspec/schemas/ - cd /tmp/test-project - openspec schema validate superpowers-bridge - - - name: Ensure drift label exists - # Always run so the label exists from day 1, even before the first drift fires. - # The Upstream Drift badge in README queries for issues with this label and would - # otherwise show an error / undefined state when the label doesn't yet exist. - uses: actions/github-script@v9 - with: - script: | - try { - await github.rest.issues.createLabel({ - owner: context.repo.owner, - repo: context.repo.repo, - name: 'upstream-version-check', - color: 'fbca04', - description: 'Drift detected by weekly version-check workflow', - }); - core.info('Label upstream-version-check created'); - } catch (e) { - if (e.status === 422) { - core.info('Label upstream-version-check already exists'); - } else { - throw e; - } - } - - - name: Open or update drift issue - if: steps.openspec.outputs.version != steps.pinned.outputs.openspec || steps.superpowers.outputs.tag != steps.pinned.outputs.superpowers || steps.validate.outcome == 'failure' - uses: actions/github-script@v9 - env: - OPENSPEC_LATEST: ${{ steps.openspec.outputs.version }} - OPENSPEC_PINNED: ${{ steps.pinned.outputs.openspec }} - SUPERPOWERS_LATEST: ${{ steps.superpowers.outputs.tag }} - SUPERPOWERS_PINNED: ${{ steps.pinned.outputs.superpowers }} - VALIDATE_OUTCOME: ${{ steps.validate.outcome }} - RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - with: - script: | - const openspecLatest = process.env.OPENSPEC_LATEST; - const openspecPinned = process.env.OPENSPEC_PINNED; - const superpowersLatest = process.env.SUPERPOWERS_LATEST; - const superpowersPinned = process.env.SUPERPOWERS_PINNED; - const validateBroken = process.env.VALIDATE_OUTCOME === 'failure'; - const runUrl = process.env.RUN_URL; - - const openspecDrift = openspecPinned !== openspecLatest; - const superpowersDrift = superpowersPinned !== superpowersLatest; - - const title = '[upstream-version-check] Drift detected'; - const body = [ - '> Auto-generated by `.github/workflows/version-check.yml` (weekly cron).', - '', - '## Detected versions', - '', - '| Component | Pinned in README | Latest upstream | Drift? |', - '|---|---|---|---|', - `| OpenSpec CLI | \`${openspecPinned}\` | \`${openspecLatest}\` | ${openspecDrift ? '**Yes**' : 'No'} |`, - `| Superpowers | \`${superpowersPinned}\` | \`${superpowersLatest}\` | ${superpowersDrift ? '**Yes**' : 'No'} |`, - '', - `## Schema validation against \`${openspecLatest}\``, - '', - validateBroken - ? '❌ **`openspec schema validate superpowers-bridge` FAILED.** Structural breakage — investigate immediately.' - : '✅ `openspec schema validate superpowers-bridge` passed.', - '', - '## Action required', - '', - '- [ ] Review Superpowers release notes for behavioral changes (skill renames, PRECHECK semantics, transitive deps): https://github.com/obra/superpowers/releases', - '- [ ] Review OpenSpec changelog: https://github.com/Fission-AI/OpenSpec/releases', - '- [ ] If safe, bump the Compatibility table in `superpowers-bridge/README.md` and `superpowers-bridge/README.zh-TW.md` (set `Last verified` to today).', - '- [ ] If breaking, add an entry under "Known breaking changes" in both READMEs.', - '', - `_Workflow run: ${runUrl}_`, - ].join('\n'); - - const { data: issues } = await github.rest.issues.listForRepo({ - owner: context.repo.owner, - repo: context.repo.repo, - state: 'open', - labels: 'upstream-version-check', - per_page: 10, - }); - const existing = issues.find(i => i.title === title); - if (existing) { - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: existing.number, - body, - }); - core.info(`Updated existing issue #${existing.number}`); - } else { - const { data: created } = await github.rest.issues.create({ - owner: context.repo.owner, - repo: context.repo.repo, - title, - body, - labels: ['upstream-version-check'], - }); - core.info(`Created issue #${created.number}`); - } - - - name: Fail run on schema breakage - if: steps.validate.outcome == 'failure' - run: | - echo "::error::Schema validation failed against latest OpenSpec ${{ steps.openspec.outputs.version }}" - exit 1 diff --git a/superpowers-bridge/README.md b/superpowers-bridge/README.md index eb35118..325b142 100644 --- a/superpowers-bridge/README.md +++ b/superpowers-bridge/README.md @@ -2,14 +2,15 @@ [English](./README.md) · [繁體中文](./README.zh-TW.md) -[![Schema Structure](https://github.com/JiangWay/openspec-schemas/actions/workflows/validate-schemas.yml/badge.svg?branch=main)](https://github.com/JiangWay/openspec-schemas/actions/workflows/validate-schemas.yml) -[![Upstream Drift](https://img.shields.io/github/issues-search/JiangWay/openspec-schemas?query=is%3Aopen%20label%3Aupstream-version-check&label=Upstream%20Drift&color=yellow)](https://github.com/JiangWay/openspec-schemas/issues?q=is%3Aopen+label%3Aupstream-version-check) +[![Schema Structure](https://github.com/AdrianTheopold/openspec-schemas/actions/workflows/validate-schemas.yml/badge.svg?branch=main)](https://github.com/AdrianTheopold/openspec-schemas/actions/workflows/validate-schemas.yml) [![OpenSpec baseline](https://img.shields.io/badge/OpenSpec_baseline-1.5.0-0277bd)](#compatibility) [![Superpowers baseline](https://img.shields.io/badge/Superpowers_baseline-6.1.0-0277bd)](#compatibility) > Bridges [OpenSpec](https://github.com/Fission-AI/OpenSpec)'s artifact governance (the **what**) with [obra/superpowers](https://github.com/obra/superpowers) execution skills (the **how**) into a single workflow. Adds an evidence-first `retrospective` artifact filling a gap Superpowers does not natively cover. > > The integration lives entirely at the prompt layer — no Superpowers source modified, no OpenSpec CLI changes. Schema version: v1. +> +> **Fork** of [JiangWay/openspec-schemas](https://github.com/JiangWay/openspec-schemas) (upstream commit `f5d4040`), maintained independently since 2026-07-02. Upstream-PR-back welcome. --- @@ -23,7 +24,7 @@ Copy and paste this into Claude Code in your project root: Install the superpowers-bridge schema for OpenSpec into this project: 1. Verify the project has an `openspec/` directory (run `openspec init` if missing). -2. Clone https://github.com/JiangWay/openspec-schemas to a temp dir. +2. Clone https://github.com/AdrianTheopold/openspec-schemas to a temp dir. 3. Copy the `superpowers-bridge/` subdirectory to `openspec/schemas/superpowers-bridge/`. 4. Run `openspec schema validate superpowers-bridge` to verify. 5. Run `openspec schemas` and confirm `superpowers-bridge` is listed. @@ -37,7 +38,7 @@ Install the superpowers-bridge schema for OpenSpec into this project: ### Method 2: Manual bash (CI / non-Claude environments) ```bash -git clone https://github.com/JiangWay/openspec-schemas /tmp/oss +git clone https://github.com/AdrianTheopold/openspec-schemas /tmp/oss cp -R /tmp/oss/superpowers-bridge ~/your-project/openspec/schemas/superpowers-bridge # Optional: insert workflow-routing fragment into CLAUDE.md @@ -64,7 +65,7 @@ In your project root, paste this into Claude Code: Upgrade the superpowers-bridge schema in this project: 1. Verify `openspec/schemas/superpowers-bridge/` already exists (upgrade, not fresh install). If missing, abort and tell me to use the install instructions instead. -2. Clone https://github.com/JiangWay/openspec-schemas to a temp dir. +2. Clone https://github.com/AdrianTheopold/openspec-schemas to a temp dir. 3. Show me the diff between the local `openspec/schemas/superpowers-bridge/` and the cloned `superpowers-bridge/` (use `diff -ruN`). Wait for my ack before overwriting. 4. After my ack, overwrite the local schema dir with the cloned one. 5. Run `openspec schema validate superpowers-bridge` to verify. @@ -83,7 +84,7 @@ Upgrade the superpowers-bridge schema in this project: ```bash # 1. Get the latest bundle -git clone https://github.com/JiangWay/openspec-schemas /tmp/oss-upgrade +git clone https://github.com/AdrianTheopold/openspec-schemas /tmp/oss-upgrade # 2. Review the diff first (don't overwrite blindly) diff -ruN ~/your-project/openspec/schemas/superpowers-bridge /tmp/oss-upgrade/superpowers-bridge @@ -490,12 +491,12 @@ Current bundle release: **`1.1.0`** (see [VERSION](./VERSION)). ### How this is checked -The contract is three layers — **baseline declaration + automated drift detection + human review** — not automated compatibility enforcement. +The contract is two layers — **baseline declaration + human review** — not automated compatibility enforcement. (The automated weekly drift bot was retired when this fork was established — upstream JiangWay is inactive.) | Layer | Mechanism | Catches | When it fires | |---|---|---|---| -| Structural | [`validate-schemas.yml`](../.github/workflows/validate-schemas.yml) on every push/PR; [`version-check.yml`](../.github/workflows/version-check.yml) weekly against latest OpenSpec | Schema-graph breaks (field renames, removed `requires:` edges, PRECHECK syntax changes) | CI run fails red | -| Drift notification | [`version-check.yml`](../.github/workflows/version-check.yml) weekly, compares baseline above against latest npm / GitHub release | Pinned ≠ latest upstream | Opens / updates a [labelled drift issue](https://github.com/JiangWay/openspec-schemas/issues?q=is%3Aopen+label%3Aupstream-version-check) for human review (workflow stays green — drift is normal, not a failure) | +| Structural | [`validate-schemas.yml`](../.github/workflows/validate-schemas.yml) on every push/PR | Schema-graph breaks (field renames, removed `requires:` edges, PRECHECK syntax changes) | CI run fails red | +| Baseline drift | Manual — a maintainer periodically compares the pinned baselines above against latest OpenSpec / Superpowers releases | Pinned ≠ latest upstream | Maintainer bumps the baselines + re-attests (no automated drift bot — it was retired with the fork) | | End-to-end workflow | **Not automated** | Behavioral changes inside Superpowers skills (renames, prose rewrites altering PRECHECK semantics, transitive-dependency changes); subtle OpenSpec engine semantic shifts | A human reads upstream release notes when the drift issue fires | The "Baseline as of" date is bumped when a maintainer manually re-runs a full cycle against the listed versions and confirms nothing degraded. Until then, the date marks human attestation, not an automated test pass. diff --git a/superpowers-bridge/README.zh-TW.md b/superpowers-bridge/README.zh-TW.md index a284d6d..3006958 100644 --- a/superpowers-bridge/README.zh-TW.md +++ b/superpowers-bridge/README.zh-TW.md @@ -2,14 +2,15 @@ [English](./README.md) · [繁體中文](./README.zh-TW.md) -[![Schema Structure](https://github.com/JiangWay/openspec-schemas/actions/workflows/validate-schemas.yml/badge.svg?branch=main)](https://github.com/JiangWay/openspec-schemas/actions/workflows/validate-schemas.yml) -[![Upstream Drift](https://img.shields.io/github/issues-search/JiangWay/openspec-schemas?query=is%3Aopen%20label%3Aupstream-version-check&label=Upstream%20Drift&color=yellow)](https://github.com/JiangWay/openspec-schemas/issues?q=is%3Aopen+label%3Aupstream-version-check) +[![Schema Structure](https://github.com/AdrianTheopold/openspec-schemas/actions/workflows/validate-schemas.yml/badge.svg?branch=main)](https://github.com/AdrianTheopold/openspec-schemas/actions/workflows/validate-schemas.yml) [![OpenSpec baseline](https://img.shields.io/badge/OpenSpec_baseline-1.5.0-0277bd)](#相容性) [![Superpowers baseline](https://img.shields.io/badge/Superpowers_baseline-6.1.0-0277bd)](#相容性) > 把 [OpenSpec](https://github.com/Fission-AI/OpenSpec) 的 artifact 治理流程(**做什麼**)與 [obra/superpowers](https://github.com/obra/superpowers) 的執行技能(**怎麼做**)整合為單一工作流。額外提供 evidence-first 的 `retrospective` artifact,補上 Superpowers 沒有的 retro 能力。 > > 整合**完全發生在 prompt 層**——不修改 Superpowers 任何程式碼,不修改 OpenSpec CLI。Schema 版本:v1。 +> +> 本 repo 是 [JiangWay/openspec-schemas](https://github.com/JiangWay/openspec-schemas) 的 **fork**(upstream commit `f5d4040`),自 2026-07-02 起獨立維護。歡迎回饋 upstream PR。 --- @@ -23,7 +24,7 @@ Install the superpowers-bridge schema for OpenSpec into this project: 1. Verify the project has an `openspec/` directory (run `openspec init` if missing). -2. Clone https://github.com/JiangWay/openspec-schemas to a temp dir. +2. Clone https://github.com/AdrianTheopold/openspec-schemas to a temp dir. 3. Copy the `superpowers-bridge/` subdirectory to `openspec/schemas/superpowers-bridge/`. 4. Run `openspec schema validate superpowers-bridge` to verify. 5. Run `openspec schemas` and confirm `superpowers-bridge` is listed. @@ -37,7 +38,7 @@ Install the superpowers-bridge schema for OpenSpec into this project: ### 方法 2:手動 bash(CI / 非 Claude 環境) ```bash -git clone https://github.com/JiangWay/openspec-schemas /tmp/oss +git clone https://github.com/AdrianTheopold/openspec-schemas /tmp/oss cp -R /tmp/oss/superpowers-bridge ~/your-project/openspec/schemas/superpowers-bridge # 可選:把 workflow-routing fragment 插進 CLAUDE.md @@ -64,7 +65,7 @@ claude plugin install superpowers@claude-plugins-official # 若尚未安裝 Upgrade the superpowers-bridge schema in this project: 1. Verify `openspec/schemas/superpowers-bridge/` already exists (upgrade, not fresh install). If missing, abort and tell me to use the install instructions instead. -2. Clone https://github.com/JiangWay/openspec-schemas to a temp dir. +2. Clone https://github.com/AdrianTheopold/openspec-schemas to a temp dir. 3. Show me the diff between the local `openspec/schemas/superpowers-bridge/` and the cloned `superpowers-bridge/` (use `diff -ruN`). Wait for my ack before overwriting. 4. After my ack, overwrite the local schema dir with the cloned one. 5. Run `openspec schema validate superpowers-bridge` to verify. @@ -83,7 +84,7 @@ Upgrade the superpowers-bridge schema in this project: ```bash # 1. 取最新的 bundle -git clone https://github.com/JiangWay/openspec-schemas /tmp/oss-upgrade +git clone https://github.com/AdrianTheopold/openspec-schemas /tmp/oss-upgrade # 2. 先看差異(不直接覆蓋) diff -ruN ~/your-project/openspec/schemas/superpowers-bridge /tmp/oss-upgrade/superpowers-bridge @@ -490,12 +491,12 @@ LLM 不必解讀 timing 文字 —— 跑指令、看結果即可。這是顧慮 ### 驗證機制 -契約分三層 — **基準聲明 + 自動 drift 偵測 + 人類檢核** — 不是自動相容性 enforcement。 +契約分兩層 — **基準聲明 + 人類檢核** — 不是自動相容性 enforcement。(每週自動 drift bot 已隨 fork 建立而退役 —— upstream JiangWay 已停止維護。) | 層級 | 機制 | 抓什麼 | 觸發時機 | |---|---|---|---| -| 結構性 | [`validate-schemas.yml`](../.github/workflows/validate-schemas.yml) 每次 push/PR;[`version-check.yml`](../.github/workflows/version-check.yml) 每週對 latest OpenSpec 跑 | schema graph 結構性破壞(欄位改名、`requires:` 邊移除、PRECHECK 語法變動) | CI run 變紅 | -| Drift 通知 | [`version-check.yml`](../.github/workflows/version-check.yml) 每週,把基準 vs 最新 npm / GitHub release 字串比對 | Pinned ≠ latest upstream | 開 / 更新 [labelled drift issue](https://github.com/JiangWay/openspec-schemas/issues?q=is%3Aopen+label%3Aupstream-version-check),由人類檢核(workflow 維持綠 — drift 是正常狀態,不是錯誤) | +| 結構性 | [`validate-schemas.yml`](../.github/workflows/validate-schemas.yml) 每次 push/PR | schema graph 結構性破壞(欄位改名、`requires:` 邊移除、PRECHECK 語法變動) | CI run 變紅 | +| 基準 drift | 手動 —— maintainer 定期把上面 pinned 基準對照 latest OpenSpec / Superpowers release | Pinned ≠ latest upstream | maintainer 更新基準 + 重新 attest(沒有自動 drift bot —— 已隨 fork 退役) | | 端對端 workflow | **未自動化** | Superpowers skill 內部行為改變(改名、改寫 prose 影響 PRECHECK 語意、傳遞依賴變動);OpenSpec 引擎語意微調 | drift issue 觸發時,人類讀 upstream release notes | 「基準日期」由 maintainer 手動重跑完整 cycle 確認沒退步後才推進。在那之前,日期代表的是人類聲明,不是自動測試通過。 diff --git a/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.md b/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.md index e28bcbe..1794b86 100644 --- a/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.md +++ b/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.md @@ -4,7 +4,7 @@ ## Workflow routing (read on session start) -This repo uses [`superpowers-bridge`](https://github.com/JiangWay/openspec-schemas/tree/main/superpowers-bridge) to bridge OpenSpec and Superpowers. Integration rules (language, artifact paths, PRECHECK) follow that bridge's README; this section is the routing guidance for Claude. +This repo uses [`superpowers-bridge`](https://github.com/AdrianTheopold/openspec-schemas/tree/main/superpowers-bridge) to bridge OpenSpec and Superpowers. Integration rules (language, artifact paths, PRECHECK) follow that bridge's README; this section is the routing guidance for Claude. ### Entry routing @@ -43,4 +43,4 @@ When all 5 hold → proactively suggest "ready to `/opsx:propose`?" — wait for - Promoting to opsx with unresolved blocking TBDs - Opening a change for bug fix / typo -Full detail: [superpowers-bridge README §Entry & exit gates](https://github.com/JiangWay/openspec-schemas/blob/main/superpowers-bridge/README.md#entry--exit-gates). +Full detail: [superpowers-bridge README §Entry & exit gates](https://github.com/AdrianTheopold/openspec-schemas/blob/main/superpowers-bridge/README.md#entry--exit-gates). diff --git a/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.zh-TW.md b/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.zh-TW.md index d039119..a41a52e 100644 --- a/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.zh-TW.md +++ b/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.zh-TW.md @@ -4,7 +4,7 @@ ## 變更工作流(Claude Code 啟動先讀) -本 repo 採用 [`superpowers-bridge`](https://github.com/JiangWay/openspec-schemas/tree/main/superpowers-bridge) 銜接 OpenSpec 與 Superpowers。整合規則(語言、artifact 路徑、PRECHECK)以該 bridge README 為準;以下是給 Claude 的 routing 指引。 +本 repo 採用 [`superpowers-bridge`](https://github.com/AdrianTheopold/openspec-schemas/tree/main/superpowers-bridge) 銜接 OpenSpec 與 Superpowers。整合規則(語言、artifact 路徑、PRECHECK)以該 bridge README 為準;以下是給 Claude 的 routing 指引。 ### 入口分流 @@ -43,4 +43,4 @@ - TBD 沒收斂就升級到 opsx - 對 bug fix / typo 也建 change -詳細見 [superpowers-bridge README §進入與離開的判斷](https://github.com/JiangWay/openspec-schemas/blob/main/superpowers-bridge/README.zh-TW.md#進入與離開的判斷entry--exit-gates)。 +詳細見 [superpowers-bridge README §進入與離開的判斷](https://github.com/AdrianTheopold/openspec-schemas/blob/main/superpowers-bridge/README.zh-TW.md#進入與離開的判斷entry--exit-gates)。 From 809fb64fb20649b7e94855d9108a2b85155e854d Mon Sep 17 00:00:00 2001 From: Adrian Theopold <83468052+AdrianTheopold@users.noreply.github.com> Date: Thu, 2 Jul 2026 11:52:24 +0000 Subject: [PATCH 08/12] fix(bridge): restore /opsx:new (real expanded-profile command that takes --schema) + add profile caveat; revert erroneous CLI swap from M2 --- superpowers-bridge/README.md | 16 +++++++++------- superpowers-bridge/README.zh-TW.md | 16 +++++++++------- .../templates/adopters/CLAUDE.md.fragment.md | 2 +- .../adopters/CLAUDE.md.fragment.zh-TW.md | 2 +- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/superpowers-bridge/README.md b/superpowers-bridge/README.md index 325b142..0a8d789 100644 --- a/superpowers-bridge/README.md +++ b/superpowers-bridge/README.md @@ -154,7 +154,7 @@ Not every change needs a `change` directory. The following scenarios should skip | Scenario | Need a change? | What to do | |---|---|---| -| New feature / new capability | ✅ Yes | `openspec new change --schema superpowers-bridge` | +| New feature / new capability | ✅ Yes | `/opsx:new --schema superpowers-bridge` | | Breaking change | ✅ Yes | Same | | Architecture change | ✅ Yes | Same | | Bug fix (restoring intended behavior, no contract change) | ❌ No | Direct PR | @@ -170,7 +170,7 @@ Not every change needs a `change` directory. The following scenarios should skip If `superpowers:brainstorming` was triggered via narrative ("let's brainstorm the architecture") in a project that uses this schema, the brainstorming output **MUST NOT** land in `docs/superpowers/specs/` — that bypasses the schema's output redirection and creates orphan artifacts. -The correct flow: keep brainstorming verbally until all 5 conditions below hold, then promote to `/opsx:propose` so the agreed design lands in `openspec/changes//brainstorm.md`. +The correct flow: keep brainstorming verbally until all 5 conditions below hold, then promote to `/opsx:propose` or `/opsx:new` so the agreed design lands in `openspec/changes//brainstorm.md`. 1. **Scope locked** — one sentence describes what's in / out, and the scope doesn't keep growing each turn 2. **Major design forks resolved** — alternatives have been weighed and one chosen; remaining unknowns are **explicit TBDs** (with owner and impact-scope statement), not "haven't thought about it yet" @@ -221,7 +221,7 @@ The Artifact DAG above shows **file-existence** dependencies. The runtime lifecy ```mermaid flowchart TD - Start([/opsx:propose · /opsx:ff]) + Start([/opsx:propose · /opsx:new]) subgraph Plan ["📝 PLANNING — 6 artifacts"] direction TB @@ -334,7 +334,7 @@ Implemented purely via context injection at invocation time, not by modifying sk ### Step-by-step flow ```bash -openspec new change my-feature --schema superpowers-bridge +/opsx:new my-feature --schema superpowers-bridge /opsx:continue # → brainstorm (interactive dialogue) /opsx:continue # → proposal /opsx:continue # → design (reorganize brainstorm into structured decisions) @@ -347,10 +347,12 @@ openspec new change my-feature --schema superpowers-bridge /opsx:archive ``` +> **Profile note:** `/opsx:new` belongs to OpenSpec's **expanded** workflow profile. Repos initialized with the **core** profile won't have it (nor `/opsx:bulk-archive`) — enable the expanded profile with `openspec update`, or use the CLI equivalent: `openspec new change --schema superpowers-bridge` then `/opsx:continue`. (`/opsx:new` is the only create-command that accepts `--schema`; `/opsx:propose` and `/opsx:ff` use your project's default schema.) + ### Switching back to spec-driven ```bash # Use a different schema for one change -openspec new change my-simple-fix --schema spec-driven +/opsx:new my-simple-fix --schema spec-driven # Or change project default in openspec/config.yaml: schema: spec-driven ``` @@ -417,13 +419,13 @@ Confirms tests are green, presents merge / PR / keep-branch / discard options, c | Scenario | Command | |---|---| | First clone of a project | `bash scripts/install-git-hooks.sh` | -| New change (interactive) | `openspec new change --schema superpowers-bridge` then `/opsx:continue` | +| New change (interactive) | `/opsx:new --schema superpowers-bridge` then `/opsx:continue` | | New change (one-shot) | `/opsx:ff ` | | Resume an interrupted change | `/opsx:continue ` | | Enter implementation | `/opsx:apply ` | | Manual verify | `/opsx:verify ` | | Archive | `/opsx:archive ` | -| Use built-in (skip brainstorm) | `openspec new change --schema spec-driven` | +| Use built-in (skip brainstorm) | `/opsx:new --schema spec-driven` | | List all schemas in the project | `openspec schemas` | | Inspect a change's progress | `openspec status --change --json` | | List active changes | `openspec list` | diff --git a/superpowers-bridge/README.zh-TW.md b/superpowers-bridge/README.zh-TW.md index 3006958..006d899 100644 --- a/superpowers-bridge/README.zh-TW.md +++ b/superpowers-bridge/README.zh-TW.md @@ -154,7 +154,7 @@ OpenSpec 管 **「做什麼」**(artifact 生命週期:proposal / specs / tasks | 情境 | 是否要建 change | 怎麼做 | |---|---|---| -| 新功能 / 新 capability | ✅ 要 | `openspec new change --schema superpowers-bridge` | +| 新功能 / 新 capability | ✅ 要 | `/opsx:new --schema superpowers-bridge` | | Breaking change | ✅ 要 | 同上 | | 架構變更 | ✅ 要 | 同上 | | Bug fix(恢復原本行為,不變更合約) | ❌ 不要 | 直接 PR | @@ -170,7 +170,7 @@ OpenSpec 管 **「做什麼」**(artifact 生命週期:proposal / specs / tasks 如果使用者以 narrative(「我們來討論架構」「腦力激盪一下」)觸發了 `superpowers:brainstorming`,brainstorming 的產出**不可以**寫到 `docs/superpowers/specs/` —— 那會繞過本 schema 的 output redirection,在 repo 裡留下 orphan artifact。 -正確流程:在以下 5 條判準**全部滿足**之前,維持 verbal brainstorm;全滿足時升級到 `/opsx:propose`,讓 brainstorming 的對話結論落到 `openspec/changes//brainstorm.md`。 +正確流程:在以下 5 條判準**全部滿足**之前,維持 verbal brainstorm;全滿足時升級到 `/opsx:propose` 或 `/opsx:new`,讓 brainstorming 的對話結論落到 `openspec/changes//brainstorm.md`。 1. **Scope 鎖定** —— 一句話講清「包含什麼、不包含什麼」,且不會在每一輪對話又長出新項目 2. **主要設計分歧已收斂** —— 替代方案討論過、選了一個;剩下的 unknown 是**明確列出的 TBD**(有 owner、有影響面),不是「還沒想到」 @@ -221,7 +221,7 @@ brainstorm ──┬──→ proposal ──→ specs ──┐ ```mermaid flowchart TD - Start([/opsx:propose · /opsx:ff]) + Start([/opsx:propose · /opsx:new]) subgraph Plan ["📝 PLANNING — 6 個 artifact"] direction TB @@ -334,7 +334,7 @@ Superpowers skill 有預設輸出路徑(例如 brainstorming 寫到 `docs/superp ### 逐步流程 ```bash -openspec new change my-feature --schema superpowers-bridge +/opsx:new my-feature --schema superpowers-bridge /opsx:continue # → brainstorm(互動式對話) /opsx:continue # → proposal /opsx:continue # → design(將 brainstorm 重組為結構化決策) @@ -347,10 +347,12 @@ openspec new change my-feature --schema superpowers-bridge /opsx:archive ``` +> **Profile 註記:** `/opsx:new` 屬於 OpenSpec 的**擴充(expanded)** workflow profile。用**核心(core)** profile 初始化的 repo 不會有它(也沒有 `/opsx:bulk-archive`)—— 用 `openspec update` 啟用 expanded profile,或直接用等效的 CLI:`openspec new change --schema superpowers-bridge` 再接 `/opsx:continue`。(`/opsx:new` 是唯一接受 `--schema` 的建立指令;`/opsx:propose` 與 `/opsx:ff` 使用專案的預設 schema。) + ### 切回 spec-driven ```bash # 單一 change 用不同 schema -openspec new change my-simple-fix --schema spec-driven +/opsx:new my-simple-fix --schema spec-driven # 或修改專案預設(openspec/config.yaml: schema: spec-driven) ``` @@ -417,13 +419,13 @@ Evidence-first 反思:§0 Evidence(量化前置數據 —— commit 數、diff | 情境 | 指令 | |---|---| | 首次 clone 專案後 | `bash scripts/install-git-hooks.sh` | -| 新 change(互動式) | `openspec new change --schema superpowers-bridge` 接著多次 `/opsx:continue` | +| 新 change(互動式) | `/opsx:new --schema superpowers-bridge` 接著多次 `/opsx:continue` | | 新 change(一鍵) | `/opsx:ff ` | | 恢復中斷的 change | `/opsx:continue ` | | 進入實作 | `/opsx:apply ` | | 手動 verify | `/opsx:verify ` | | 歸檔 | `/opsx:archive ` | -| 用內建(跳過 brainstorm) | `openspec new change --schema spec-driven` | +| 用內建(跳過 brainstorm) | `/opsx:new --schema spec-driven` | | 列出所有 schema | `openspec schemas` | | 查看某 change 進度 | `openspec status --change --json` | | 列出 active changes | `openspec list` | diff --git a/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.md b/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.md index 1794b86..38f57b7 100644 --- a/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.md +++ b/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.md @@ -11,7 +11,7 @@ This repo uses [`superpowers-bridge`](https://github.com/AdrianTheopold/openspec | Trigger you observe | What to do | |---|---| | User starts a narrative "design discussion / let's brainstorm" | Run verbal `superpowers:brainstorming`, but **do NOT** write to `docs/superpowers/specs/`. Once the conversation converges per the 5 criteria below, promote to `/opsx:propose` | -| User invokes `/opsx:propose` / `/opsx:ff` (or `openspec new change`) directly | Follow the schema's flow; artifact instructions inject at each step | +| User invokes `/opsx:new` / `/opsx:ff` / `/opsx:propose` directly | Follow the schema's flow; artifact instructions inject at each step | | User explicitly says bug fix / typo / config tweak / doc update | Direct PR — **do NOT** open a change (see skip rules below) | | User is mid-change | Advance with `/opsx:continue`, `/opsx:apply`, `/opsx:verify`, or `/opsx:archive` | diff --git a/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.zh-TW.md b/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.zh-TW.md index a41a52e..70a008d 100644 --- a/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.zh-TW.md +++ b/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.zh-TW.md @@ -11,7 +11,7 @@ | 你看到的觸發 | 應該怎麼做 | |---|---| | 使用者以 narrative 開「設計討論 / 腦力激盪」 | 先 verbal `superpowers:brainstorming`,**不**寫到 `docs/superpowers/specs/`;對話收斂後依下方 5 條判準升級到 `/opsx:propose` | -| 使用者直接呼叫 `/opsx:propose` / `/opsx:ff`(或 `openspec new change`) | 走 schema 既定流程;artifact instruction 會在每步注入 | +| 使用者直接呼叫 `/opsx:new` / `/opsx:ff` / `/opsx:propose` | 走 schema 既定流程;artifact instruction 會在每步注入 | | 使用者明確說 bug fix / typo / config 微調 / 文件更新 | 直接 PR,**不**建 change(見下方 skip 規則) | | 已經在某個 change 中 | `/opsx:continue` 或 `/opsx:apply` / `/opsx:verify` / `/opsx:archive` 推進 | From 9242dcc1160b9f70b8582ea70ea4466d2959bf31 Mon Sep 17 00:00:00 2001 From: Adrian Theopold <83468052+AdrianTheopold@users.noreply.github.com> Date: Thu, 2 Jul 2026 13:28:52 +0000 Subject: [PATCH 09/12] fix(bridge): apply v1.1 correctness-review fixes across schema + READMEs Ranked findings from the bridge-vs-official-OpenSpec review (verified against docs / installed dist 1.4.1 / live --help / Superpowers 6.1.0): - HIGH: profile note under-scoped the expanded-only set (listed only new/bulk-archive) and gave a broken workaround ending in the expanded-only /opsx:continue. Now states the whole opsx flow requires the expanded profile, lists all six expanded-only commands, and fixes the enable command (openspec config profile + update, not update alone). - MED: adopter CLAUDE.md fragments now carry the expanded-profile prerequisite (both locales). - MED: artifact-chain description (schema.yaml:15) no longer swaps design/specs vs OpenSpec nor contradicts its own requires edges; design block moved after specs so `openspec schemas` renders specs-before-design too. Edges unchanged; schema still validates. - MED: fixed writing-plans grep-anchor 169-171 -> 180-182. - MED: worktree-cleanup claim qualified (push/PR path preserves it). - LOW: per-task review re-attributed to SDD's own task-reviewer (final review = requesting-code-review); finishing "push-only" shorthand corrected to its 4-option menu; removed stray install-git-hooks.sh cheat-sheet row; verify PRECHECK gains origin/HEAD fallback for non-main/master default branches; SDD model-selection gloss made model-agnostic. zh-TW mirrors synced. `openspec schema validate superpowers-bridge` passes. Co-Authored-By: Claude Opus 4.8 (1M context) --- superpowers-bridge/README.md | 17 +++-- superpowers-bridge/README.zh-TW.md | 17 +++-- superpowers-bridge/schema.yaml | 69 ++++++++++--------- .../templates/adopters/CLAUDE.md.fragment.md | 2 + .../adopters/CLAUDE.md.fragment.zh-TW.md | 2 + 5 files changed, 56 insertions(+), 51 deletions(-) diff --git a/superpowers-bridge/README.md b/superpowers-bridge/README.md index 0a8d789..2f246b7 100644 --- a/superpowers-bridge/README.md +++ b/superpowers-bridge/README.md @@ -188,7 +188,7 @@ If any condition is missing, keep brainstorming. When all five hold: | Anti-pattern | Why it's wrong | |---|---| | Letting brainstorming write to `docs/superpowers/specs/` after the schema is installed | Bypasses redirection at [schema.yaml](./schema.yaml) lines 35-39; produces orphan artifacts | -| Letting writing-plans write to `docs/superpowers/plans/` | Same reason (schema.yaml lines 169-171) | +| Letting writing-plans write to `docs/superpowers/plans/` | Same reason (schema.yaml lines 180-182) | | Promoting to opsx with unresolved blocking TBDs | Those TBDs will block apply phase too — promotion just defers the same problem | | Opening a change for bug fix / typo / config tweak | Process ceremony exceeds actual risk; slows delivery without value | @@ -347,7 +347,7 @@ Implemented purely via context injection at invocation time, not by modifying sk /opsx:archive ``` -> **Profile note:** `/opsx:new` belongs to OpenSpec's **expanded** workflow profile. Repos initialized with the **core** profile won't have it (nor `/opsx:bulk-archive`) — enable the expanded profile with `openspec update`, or use the CLI equivalent: `openspec new change --schema superpowers-bridge` then `/opsx:continue`. (`/opsx:new` is the only create-command that accepts `--schema`; `/opsx:propose` and `/opsx:ff` use your project's default schema.) +> **Profile note — this bridge's opsx flow requires OpenSpec's expanded workflow profile.** The **core** profile (the `openspec init` default) provides only `propose, explore, apply, sync, archive`; the expanded-only commands are `new, continue, ff, verify, bulk-archive, onboard` — and this bridge's flows lean on `/opsx:continue`, `/opsx:ff`, and `/opsx:verify` throughout, not just `/opsx:new`. Enable the expanded set by running `openspec config profile` (select the full workflow set in the picker) and then `openspec update`; running `openspec update` alone does **not** switch profiles. If you must stay on core, only the first step has a CLI equivalent (`openspec new change --schema superpowers-bridge`) — `/opsx:continue`/`/opsx:verify` have none, so the expanded profile is effectively required. (`/opsx:new` is the only create-command that accepts `--schema`; `/opsx:propose` and `/opsx:ff` use your project's default schema.) ### Switching back to spec-driven ```bash @@ -381,12 +381,12 @@ Creates `.worktrees//`, switches to a new branch, runs setup, confi #### 2. Executor — `superpowers:subagent-driven-development` -Main agent reads `plan.md`, dispatches a fresh subagent per micro-task. Each subagent transitively activates: +Main agent reads `plan.md`, dispatches a fresh subagent per micro-task: -- **TDD** (`superpowers:test-driven-development`): write failing test → watch it fail → minimal code → pass; production code without prior test gets deleted -- **Per-task code review** (`superpowers:requesting-code-review`): spec-compliance review + code-quality review; critical issues block forward motion +- **TDD** (`superpowers:test-driven-development`): each subagent transitively activates it — write failing test → watch it fail → minimal code → pass; production code without prior test gets deleted +- **Per-task review**: after each task the controller dispatches subagent-driven-development's own merged task-reviewer (spec-compliance + code-quality) — not a separate skill invocation; critical issues block forward motion -Coarse `tasks.md` checkboxes tick as tasks complete. After all tasks, a final code review covers the whole implementation. +Coarse `tasks.md` checkboxes tick as tasks complete. After all tasks, a final whole-branch code review (`superpowers:requesting-code-review`) covers the implementation. This schema does NOT support `superpowers:executing-plans` as a fallback. See the "Six design touches" section below for rationale. @@ -410,7 +410,7 @@ Syncs delta specs into `openspec/specs//spec.md` and moves the chang #### 6. Completion — `superpowers:finishing-a-development-branch` -Confirms tests are green, presents merge / PR / keep-branch / discard options, cleans up the worktree. **PR is the last step** — if retro or archive haven't been done, finish them first. +Confirms tests are green, presents merge / PR / keep-branch / discard options. The worktree is cleaned up only on the merge or discard options; the push/PR path preserves it so you can iterate on PR feedback. **PR is the last step** — if retro or archive haven't been done, finish them first. --- @@ -418,7 +418,6 @@ Confirms tests are green, presents merge / PR / keep-branch / discard options, c | Scenario | Command | |---|---| -| First clone of a project | `bash scripts/install-git-hooks.sh` | | New change (interactive) | `/opsx:new --schema superpowers-bridge` then `/opsx:continue` | | New change (one-shot) | `/opsx:ff ` | | Resume an interrupted change | `/opsx:continue ` | @@ -489,7 +488,7 @@ Current bundle release: **`1.1.0`** (see [VERSION](./VERSION)). |---|---|---|---| | v1 | `1.5.0` | `6.1.0` | 2026-07-02 | -> Re-attested against **Superpowers 6.1.0** (2026-07-02) via a full v5.1.0→6.1.0 skill diff: only `finishing-a-development-branch` (now push-only) and the merged SDD task-reviewer needed prose alignment; the SDD self-finish conflict (H2) predates v6 and is suppressed by the apply instruction. **OpenSpec 1.5.0** "Stores" is opt-in beta and does not affect this bridge — re-check the `changes/`+`specs/` paths only if a future release makes Stores the default layout. +> Re-attested against **Superpowers 6.1.0** (2026-07-02) via a full v5.1.0→6.1.0 skill diff: only `finishing-a-development-branch` (its push option no longer auto-creates the PR) and the merged SDD task-reviewer needed prose alignment; the SDD self-finish conflict (H2) predates v6 and is suppressed by the apply instruction. **OpenSpec 1.5.0** "Stores" is opt-in beta and does not affect this bridge — re-check the `changes/`+`specs/` paths only if a future release makes Stores the default layout. ### How this is checked diff --git a/superpowers-bridge/README.zh-TW.md b/superpowers-bridge/README.zh-TW.md index 006d899..3ad84e4 100644 --- a/superpowers-bridge/README.zh-TW.md +++ b/superpowers-bridge/README.zh-TW.md @@ -188,7 +188,7 @@ OpenSpec 管 **「做什麼」**(artifact 生命週期:proposal / specs / tasks | 反模式 | 為什麼錯 | |---|---| | schema 已安裝後仍讓 brainstorming 寫到 `docs/superpowers/specs/` | 繞過 [schema.yaml](./schema.yaml) line 35-39 的 redirection,留下 orphan artifact | -| 讓 writing-plans 寫到 `docs/superpowers/plans/` | 同理(schema.yaml line 169-171) | +| 讓 writing-plans 寫到 `docs/superpowers/plans/` | 同理(schema.yaml line 180-182) | | TBD 還沒收斂就升級到 opsx | 那些 TBD 在 apply phase 一樣會擋住進度,只是把問題往後挪 | | 對 bug fix / typo 也建 change | 流程儀式 > 實質風險,反而拖慢交付 | @@ -347,7 +347,7 @@ Superpowers skill 有預設輸出路徑(例如 brainstorming 寫到 `docs/superp /opsx:archive ``` -> **Profile 註記:** `/opsx:new` 屬於 OpenSpec 的**擴充(expanded)** workflow profile。用**核心(core)** profile 初始化的 repo 不會有它(也沒有 `/opsx:bulk-archive`)—— 用 `openspec update` 啟用 expanded profile,或直接用等效的 CLI:`openspec new change --schema superpowers-bridge` 再接 `/opsx:continue`。(`/opsx:new` 是唯一接受 `--schema` 的建立指令;`/opsx:propose` 與 `/opsx:ff` 使用專案的預設 schema。) +> **Profile 註記 —— 本 bridge 的 opsx 流程需要 OpenSpec 的擴充(expanded)workflow profile。** 核心(core)profile(`openspec init` 的預設)只提供 `propose, explore, apply, sync, archive`;擴充專屬的指令是 `new, continue, ff, verify, bulk-archive, onboard` —— 本 bridge 的流程從頭到尾都用到 `/opsx:continue`、`/opsx:ff`、`/opsx:verify`,不只 `/opsx:new`。啟用擴充指令請執行 `openspec config profile`(在互動選單選取完整 workflow 集)再跑 `openspec update`;單獨跑 `openspec update` **不會**切換 profile。若必須留在 core,只有第一步有 CLI 等效指令(`openspec new change --schema superpowers-bridge`)—— `/opsx:continue`/`/opsx:verify` 沒有等效,因此實務上必須啟用擴充 profile。(`/opsx:new` 是唯一接受 `--schema` 的建立指令;`/opsx:propose` 與 `/opsx:ff` 使用專案的預設 schema。) ### 切回 spec-driven ```bash @@ -381,12 +381,12 @@ skill 缺失 → STOP 並通知使用者,不靜默 fallback,本 schema 內也沒 #### 2. Executor — `superpowers:subagent-driven-development` -Main agent 讀 `plan.md`,為每個 micro-task 派發 fresh subagent。每個 subagent 自動傳遞: +Main agent 讀 `plan.md`,為每個 micro-task 派發 fresh subagent: -- **TDD**(`superpowers:test-driven-development`):先寫失敗測試 → 看著它 fail → 寫最小程式碼 → pass;production code 寫在沒測試之前會被刪掉重來 -- **per-task code review**(`superpowers:requesting-code-review`):spec compliance review + code quality review;Critical 級問題擋下進度 +- **TDD**(`superpowers:test-driven-development`):每個 subagent 自動傳遞 —— 先寫失敗測試 → 看著它 fail → 寫最小程式碼 → pass;production code 寫在沒測試之前會被刪掉重來 +- **per-task review**:每個 task 完成後由 controller 派發 subagent-driven-development 自己的 merged task-reviewer(spec compliance + code quality)—— 不是另外呼叫一個 skill;Critical 級問題擋下進度 -完成 coarse task 就更新 `tasks.md` checkbox。所有 task 跑完後,對整個 implementation 再做一次 final code review。 +完成 coarse task 就更新 `tasks.md` checkbox。所有 task 跑完後,對整個 branch 再做一次 final code review(`superpowers:requesting-code-review`)。 本 schema **不支援** `superpowers:executing-plans` 作為 fallback。理由見下方「六個值得記住的設計觸點」段。 @@ -410,7 +410,7 @@ Evidence-first 反思:§0 Evidence(量化前置數據 —— commit 數、diff #### 6. Completion — `superpowers:finishing-a-development-branch` -確認 tests 全綠、呈現 merge / PR / keep-branch / discard 選項、清理 worktree。**PR 是最後一步** —— 若 retro 或 archive 還沒跑,先補完。 +確認 tests 全綠、呈現 merge / PR / keep-branch / discard 選項。worktree 只在 merge 或 discard 選項時清理;push/PR 路徑會保留它,方便你依 PR feedback 迭代。**PR 是最後一步** —— 若 retro 或 archive 還沒跑,先補完。 --- @@ -418,7 +418,6 @@ Evidence-first 反思:§0 Evidence(量化前置數據 —— commit 數、diff | 情境 | 指令 | |---|---| -| 首次 clone 專案後 | `bash scripts/install-git-hooks.sh` | | 新 change(互動式) | `/opsx:new --schema superpowers-bridge` 接著多次 `/opsx:continue` | | 新 change(一鍵) | `/opsx:ff ` | | 恢復中斷的 change | `/opsx:continue ` | @@ -489,7 +488,7 @@ LLM 不必解讀 timing 文字 —— 跑指令、看結果即可。這是顧慮 |---|---|---|---| | v1 | `1.5.0` | `6.1.0` | 2026-07-02 | -> 已對 **Superpowers 6.1.0**(2026-07-02)做完整 v5.1.0→6.1.0 skill diff 重新對齊:只有 `finishing-a-development-branch`(現在只 push)與合併後的 SDD task-reviewer 需要 prose 對齊;SDD self-finish 衝突(H2)早於 v6 就存在,由 apply instruction 抑制。**OpenSpec 1.5.0** 的 "Stores" 是 opt-in beta,不影響本 bridge —— 只有未來某版把 Stores 設為預設 layout 時,才需重新檢查 `changes/`+`specs/` 路徑。 +> 已對 **Superpowers 6.1.0**(2026-07-02)做完整 v5.1.0→6.1.0 skill diff 重新對齊:只有 `finishing-a-development-branch`(push 選項不再自動開 PR)與合併後的 SDD task-reviewer 需要 prose 對齊;SDD self-finish 衝突(H2)早於 v6 就存在,由 apply instruction 抑制。**OpenSpec 1.5.0** 的 "Stores" 是 opt-in beta,不影響本 bridge —— 只有未來某版把 Stores 設為預設 layout 時,才需重新檢查 `changes/`+`specs/` 路徑。 ### 驗證機制 diff --git a/superpowers-bridge/schema.yaml b/superpowers-bridge/schema.yaml index 533d246..1b0ff8d 100644 --- a/superpowers-bridge/schema.yaml +++ b/superpowers-bridge/schema.yaml @@ -12,7 +12,8 @@ description: > If your platform lacks subagent support, use spec-driven instead. Each artifact / apply step verifies its required skills before invoking and surfaces a clear error if any are missing. - brainstorm → proposal → design → specs → tasks → plan → verify → retrospective. + brainstorm → proposal → specs, with design branching from brainstorm + in parallel; specs + design → tasks → plan → verify → retrospective. design is required (reorganizes raw brainstorm output into structured Context / Goals / Decisions / Risks / Migration; referenced by tasks and plan for implementation guidance). @@ -81,6 +82,34 @@ artifacts: requires: - brainstorm + - id: specs + generates: "specs/**/*.md" + description: Detailed specifications for the change + template: spec.md + instruction: | + Create specification files that define WHAT the system should do. + + Create one spec file per capability listed in the proposal's Capabilities section. + - New capabilities: use the exact kebab-case name from the proposal (specs//spec.md). + - Modified capabilities: use the existing spec folder name from openspec/specs// when creating the delta spec at specs//spec.md. + + Delta operations (use ## headers): + - **ADDED Requirements**: New capabilities + - **MODIFIED Requirements**: Changed behavior - MUST include full updated content + - **REMOVED Requirements**: Deprecated features - MUST include **Reason** and **Migration** + - **RENAMED Requirements**: Name changes only - use FROM:/TO: format + + Format requirements: + - Each requirement: `### Requirement: ` followed by description + - Use SHALL/MUST for normative requirements (avoid should/may) + - Each scenario: `#### Scenario: ` with WHEN/THEN format + - **CRITICAL**: Scenarios MUST use exactly 4 hashtags (`####`). Using 3 hashtags or bullets will fail silently. + - Every requirement MUST have at least one scenario. + + Specs should be testable - each scenario is a potential test case. + requires: + - proposal + - id: design generates: design.md description: Technical design document with implementation details @@ -113,34 +142,6 @@ artifacts: requires: - brainstorm - - id: specs - generates: "specs/**/*.md" - description: Detailed specifications for the change - template: spec.md - instruction: | - Create specification files that define WHAT the system should do. - - Create one spec file per capability listed in the proposal's Capabilities section. - - New capabilities: use the exact kebab-case name from the proposal (specs//spec.md). - - Modified capabilities: use the existing spec folder name from openspec/specs// when creating the delta spec at specs//spec.md. - - Delta operations (use ## headers): - - **ADDED Requirements**: New capabilities - - **MODIFIED Requirements**: Changed behavior - MUST include full updated content - - **REMOVED Requirements**: Deprecated features - MUST include **Reason** and **Migration** - - **RENAMED Requirements**: Name changes only - use FROM:/TO: format - - Format requirements: - - Each requirement: `### Requirement: ` followed by description - - Use SHALL/MUST for normative requirements (avoid should/may) - - Each scenario: `#### Scenario: ` with WHEN/THEN format - - **CRITICAL**: Scenarios MUST use exactly 4 hashtags (`####`). Using 3 hashtags or bullets will fail silently. - - Every requirement MUST have at least one scenario. - - Specs should be testable - each scenario is a potential test case. - requires: - - proposal - - id: tasks generates: tasks.md description: Implementation checklist with trackable tasks @@ -210,7 +211,7 @@ artifacts: yet produced reviewable changes. 1. Commit evidence (must return > 0): - git log --oneline $(git merge-base HEAD origin/main 2>/dev/null || git merge-base HEAD origin/master 2>/dev/null || git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null)..HEAD | wc -l + git log --oneline $(git merge-base HEAD origin/main 2>/dev/null || git merge-base HEAD origin/master 2>/dev/null || git merge-base HEAD origin/HEAD 2>/dev/null || git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null)..HEAD | wc -l 2. Task progress (must return > 0): grep -cE '^\s*- \[x\]' openspec/changes//tasks.md @@ -468,7 +469,8 @@ artifacts: - verify # v6 notes: subagent-driven-development (6.x) applies explicit per-dispatch -# model selection (Sonnet for mechanical steps, Opus for reasoning) and keeps +# model selection (the skill is model-agnostic — e.g. a fast, cheap model for +# mechanical steps, the most capable for reasoning) and keeps # a durable .superpowers/sdd/ progress ledger for long runs. Both are handled # by the executor automatically — no instruction here duplicates them. apply: @@ -593,8 +595,9 @@ apply: After retrospective + archive are both done, use the Skill tool to invoke **superpowers:finishing-a-development-branch**. - In Superpowers v6 this PUSHES the branch; it does NOT open a - PR/MR for you (the `gh pr create` step was removed upstream). + In Superpowers v6 finishing presents merge / push / keep / discard + options; on the push option it only pushes the branch and does NOT + open a PR/MR for you (the `gh pr create` step was removed upstream). Opening the MR/PR is a separate human step — on GitLab use `glab`; do NOT auto-open or auto-merge. diff --git a/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.md b/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.md index 38f57b7..bc0c8ad 100644 --- a/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.md +++ b/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.md @@ -6,6 +6,8 @@ This repo uses [`superpowers-bridge`](https://github.com/AdrianTheopold/openspec-schemas/tree/main/superpowers-bridge) to bridge OpenSpec and Superpowers. Integration rules (language, artifact paths, PRECHECK) follow that bridge's README; this section is the routing guidance for Claude. +> **Prerequisite:** this schema's opsx flow requires OpenSpec's **expanded** workflow profile (run `openspec config profile`, select the full workflow set, then `openspec update`). The default **core** profile lacks `new/continue/ff/verify/bulk-archive/onboard` — the commands referenced below. + ### Entry routing | Trigger you observe | What to do | diff --git a/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.zh-TW.md b/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.zh-TW.md index 70a008d..94e5307 100644 --- a/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.zh-TW.md +++ b/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.zh-TW.md @@ -6,6 +6,8 @@ 本 repo 採用 [`superpowers-bridge`](https://github.com/AdrianTheopold/openspec-schemas/tree/main/superpowers-bridge) 銜接 OpenSpec 與 Superpowers。整合規則(語言、artifact 路徑、PRECHECK)以該 bridge README 為準;以下是給 Claude 的 routing 指引。 +> **前置條件:** 本 schema 的 opsx 流程需要 OpenSpec 的**擴充(expanded)** workflow profile(執行 `openspec config profile`,選取完整 workflow 集,再跑 `openspec update`)。預設的**核心(core)** profile 缺少 `new/continue/ff/verify/bulk-archive/onboard` —— 也就是下面引用到的指令。 + ### 入口分流 | 你看到的觸發 | 應該怎麼做 | From e3507b6cfc56efb4a6a7724d97b6320a2333ff6c Mon Sep 17 00:00:00 2001 From: Adrian Theopold <83468052+AdrianTheopold@users.noreply.github.com> Date: Mon, 6 Jul 2026 12:02:25 +0000 Subject: [PATCH 10/12] chore: remove internal correctness-pass plan doc from the fork branch This plan was dev-process scaffolding for the correctness pass, not something consumers of the bridge need. Dropping it from the branch so it stays out of the review diff and the merged tree. (Regenerable from notes if ever needed.) Co-Authored-By: Claude Opus 4.8 (1M context) --- docs/plans/2026-07-02-correctness-pass.md | 521 ---------------------- 1 file changed, 521 deletions(-) delete mode 100644 docs/plans/2026-07-02-correctness-pass.md diff --git a/docs/plans/2026-07-02-correctness-pass.md b/docs/plans/2026-07-02-correctness-pass.md deleted file mode 100644 index 5dcca18..0000000 --- a/docs/plans/2026-07-02-correctness-pass.md +++ /dev/null @@ -1,521 +0,0 @@ -# superpowers-bridge Fork + Correctness Pass — Implementation Plan - -> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. - -**Goal:** Fork the (stalled) `JiangWay/openspec-schemas` superpowers-bridge into Adrian's own maintained copy, fold in the audited correctness fixes (2 HIGH + correctness MEDs + Superpowers-6 re-attestation + OpenSpec 1.5.0 pin bump + cosmetics), re-point the vendored copy in `anomaly-detection` to the fork, and retire the now-pointless drift-vs-JiangWay apparatus. - -**Architecture:** The bridge is a prompt-layer OpenSpec schema (one `schema.yaml` + `README.md`/`README.zh-TW.md` + `templates/` + `VERSION`). All fixes are edits to YAML instruction prose and Markdown docs — **there is no code and no unit-test harness** (that absence is why these bugs shipped; adding a harness is explicitly OUT of scope for this pass — see Global Constraints). The source of truth becomes the GitHub fork; the vendored copy at `anomaly-detection/openspec/schemas/superpowers-bridge/` is re-synced from it at the end. - -**Tech Stack:** GitHub (`gh` CLI), git, OpenSpec CLI (`@fission-ai/openspec`, installed 1.4.1 → target baseline 1.5.0), Superpowers plugin (installed 6.1.0 → target baseline 6.1.0). YAML + Markdown only. - -## Verification model (read before starting) - -This plan has no `pytest`. Each editing task verifies with: -1. **Structural:** `cd /develop/anomaly-detection && openspec schema validate superpowers-bridge` → must print `✓ valid` (run against the *vendored* copy after re-sync in Task 8; during fork editing run it against a temporary symlink/copy — see Task 1 Step 6). -2. **Content grep:** an explicit `grep` proving the old string is gone / the new string is present (given per task). -3. **Behavioral fixes (H1/H2):** a careful re-read confirming the instruction composes with the installed Superpowers 6.1.0 skill flow. A full end-to-end `/opsx:apply` dry cycle on a throwaway change is the gold standard but is heavy (creates a worktree + dispatches subagents); it is OPTIONAL and called out in Task 8. - -## Global Constraints - -- **Fork namespace:** `github.com/AdrianTheopold/openspec-schemas` (matches the author of the existing upstream PR #12). **Creating the fork is outward-facing — confirm the namespace with Adrian before Task 1 Step 1 runs.** -- **Public-push identity:** BEFORE any push to the public fork, set the commit author email to Adrian's GitHub noreply `83468052+AdrianTheopold@users.noreply.github.com` (the `/develop` container's git default is his work email and leaks by SHA into the public fork network). Set it locally in the fork clone (Task 1 Step 4). -- **Keep EN + zh-TW in sync:** every README fix applies to BOTH `README.md` and `README.zh-TW.md` (the zh-TW is a faithful mirror that reproduces every bug). -- **No schema-graph structural change:** these are prose/instruction fixes only. `openspec schema validate superpowers-bridge` must stay `✓ valid` after every task. Do not add/remove artifacts or `requires:` edges. -- **Vendored copy stays byte-identical to the fork's `superpowers-bridge/`** after Task 8 (the re-vendor contract is a whole-dir copy). -- **OUT of scope this pass:** an end-to-end test harness; the upstream `post_apply` phase (still absent upstream — the evidence-PRECHECK workaround stays); any Stores-model migration (1.5.0 Stores is opt-in beta the bridge doesn't use). -- **Baselines to land:** OpenSpec `1.4.1 → 1.5.0`; Superpowers `v5.1.0 → 6.1.0`. - ---- - -### Task 1: Create the fork, working clone, and land this plan - -**Files:** -- Create (remote): `github.com/AdrianTheopold/openspec-schemas` (fork of `JiangWay/openspec-schemas`) -- Create (local): a working clone + branch `fix/correctness-pass-v1.1` -- Create: `/docs/plans/2026-07-02-correctness-pass.md` (this plan, committed at the fork REPO ROOT — NOT under `superpowers-bridge/`, so it never rides into adopters' vendored bundles) - -**Interfaces:** -- Produces: `$FORK` = local clone path (all later tasks edit files under `$FORK/superpowers-bridge/`); the fork's default branch (`main`) and the working branch `fix/correctness-pass-v1.1`. - -- [ ] **Step 1: Confirm namespace, then fork** (outward-facing — do not run before Adrian confirms) - -```bash -gh repo fork JiangWay/openspec-schemas --clone=false --org= 2>/dev/null || \ - gh repo fork JiangWay/openspec-schemas --clone=false -# creates github.com/AdrianTheopold/openspec-schemas -gh repo view AdrianTheopold/openspec-schemas --json name,parent,isFork -``` -Expected: `isFork: true`, `parent.name: openspec-schemas`. - -- [ ] **Step 2: Clone the fork to a working dir** - -```bash -git clone https://github.com/AdrianTheopold/openspec-schemas.git \ - /develop/openspec-schemas-fork -export FORK=/develop/openspec-schemas-fork -``` -Expected: clone succeeds; `ls $FORK/superpowers-bridge/schema.yaml` exists. - -- [ ] **Step 3: Create the working branch** - -```bash -git -C "$FORK" switch -c fix/correctness-pass-v1.1 -``` -Expected: `Switched to a new branch 'fix/correctness-pass-v1.1'`. - -- [ ] **Step 4: Set the public-push identity in this clone** (Global Constraint) - -```bash -git -C "$FORK" config user.email "83468052+AdrianTheopold@users.noreply.github.com" -git -C "$FORK" config user.name "Adrian Theopold" -git -C "$FORK" config --get user.email -``` -Expected: prints the noreply email. - -- [ ] **Step 5: Commit this plan into the fork** - -```bash -mkdir -p "$FORK/docs/plans" -cp /tmp/claude-1000/-develop/c5e04289-cc7f-47dc-bfd7-bb9e4bc1cdde/scratchpad/2026-07-02-superpowers-bridge-fork-correctness-pass.md \ - "$FORK/docs/plans/2026-07-02-correctness-pass.md" -git -C "$FORK" add docs/plans/2026-07-02-correctness-pass.md -git -C "$FORK" commit -m "docs: add superpowers-bridge correctness-pass implementation plan" -``` -Expected: one commit created (at the fork repo root `docs/plans/`, NOT inside `superpowers-bridge/`). - -- [ ] **Step 6: Establish the validation seam for the fork copy** - -The `openspec schema validate` CLI resolves schemas under a project's `openspec/schemas/`. To validate the fork copy during editing, point a scratch project at it: - -```bash -# Reuse anomaly-detection's project but validate by temporarily copying the fork's -# schema over the vendored path is risky; instead validate structurally with a dry parse: -cd /develop/anomaly-detection && openspec schema validate superpowers-bridge -``` -Expected: `✓ valid` (baseline — confirms the tool works before edits). During Tasks 2-7 you edit the FORK copy; the authoritative `openspec schema validate` re-runs after re-sync in Task 8. For per-task structural safety, parse the YAML: `python3 -c "import yaml,sys; yaml.safe_load(open('$FORK/superpowers-bridge/schema.yaml'))" && echo OK`. - ---- - -### Task 2: Fix H2 — stop SDD from finishing the branch before the bridge's verify/retro/archive (HIGH) - -**Files:** -- Modify: `$FORK/superpowers-bridge/schema.yaml` (apply step 2 "Tell the executor" block, currently lines ~502-505 + the surrounding step-2 prose ~496-518) - -**Interfaces:** -- Consumes: nothing. -- Produces: an apply instruction where the SDD executor implements-and-reviews only, then returns control; the bridge alone runs finishing-a-development-branch at apply step 6. - -**Context:** The bug: apply step 2 tells the executor to invoke `superpowers:subagent-driven-development` to "execute the plan.md micro-tasks," but that skill's OWN flow terminates by invoking `superpowers:finishing-a-development-branch` + worktree cleanup (SDD `SKILL.md:66,81,412`). Run literally, the executor opens the PR and destroys the worktree before the bridge's steps 3-6 (verify/retro/archive, `schema.yaml:527-567`). Fix: explicitly scope the executor to implementation+review and forbid the finish/cleanup, because the bridge owns finish at step 6. **Confirmed by the v5→v6 diff (research-D):** this conflict is PRE-EXISTING — SDD terminated with `finishing-a-development-branch` identically at the bridge's own v5.1.0 baseline (`SKILL.md:66` node, `:85` edge) — and v6 exposes NO native flag/mode to suppress that finish node, so the fix MUST be prose (this task), not a toggle. - -- [ ] **Step 1: Read the current step-2 block** at `$FORK/superpowers-bridge/schema.yaml` (the `2. **Executor — subagent-driven-development**:` block and its `Tell the executor:` list). - -- [ ] **Step 2: Add an explicit stop-boundary to the `Tell the executor:` list.** After the existing bullets (`Read plan.md…`, `Update tasks.md checkboxes…`, `Work within the created worktree`), append: - -```yaml - - STOP after the final whole-branch review passes. Do NOT invoke - superpowers:finishing-a-development-branch and do NOT clean up - or remove the worktree — this bridge runs the finish sequence - itself at apply step 6 (retrospective + archive must land in the - SAME PR, and the worktree + SDD ledger must survive for steps - 3-5). Return control to the apply controller after the final - review; report the commit range and the ledger path. -``` - -- [ ] **Step 3: Add a guard note to the transitive-skill block.** In the `IMPORTANT — transitive skill activation:` paragraph (which lists TDD + requesting-code-review), add a final line: - -```yaml - NOTE: subagent-driven-development's own flow ends by invoking - finishing-a-development-branch; under this bridge that terminal - step is SUPPRESSED (see the executor instruction above) because - the bridge sequences finish/verify/retrospective/archive itself. -``` - -- [ ] **Step 4: Validate structurally** - -```bash -python3 -c "import yaml; yaml.safe_load(open('$FORK/superpowers-bridge/schema.yaml')); print('OK')" -``` -Expected: `OK`. - -- [ ] **Step 5: Grep-verify the guard is present** - -```bash -grep -n "STOP after the final whole-branch review" "$FORK/superpowers-bridge/schema.yaml" -grep -n "terminal\s*step is SUPPRESSED\|is SUPPRESSED" "$FORK/superpowers-bridge/schema.yaml" -``` -Expected: both match. - -- [ ] **Step 6: Commit** - -```bash -git -C "$FORK" add superpowers-bridge/schema.yaml -git -C "$FORK" commit -m "fix(bridge): suppress SDD self-finish so bridge owns verify/retro/archive (H2)" -``` - ---- - -### Task 3: Fix H1 — tie the tasks.md tick to the SDD ledger step (HIGH) - -**Files:** -- Modify: `$FORK/superpowers-bridge/schema.yaml` (the `Update tasks.md checkboxes as coarse tasks complete` bullet in apply step 2, and the verify PRECHECK note at the `grep -c '^- \[x\]'` line) - -**Interfaces:** -- Consumes: the `Tell the executor:` list edited in Task 2. -- Produces: an instruction where the executor ticks `tasks.md` in the same bookkeeping message it appends the SDD ledger line, so the verify PRECHECK (`grep -c '^- [x]' > 0`) reflects real progress. - -**Context:** The known gap: SDD tracks progress in its ledger + todos and never touches `tasks.md` (it's OpenSpec-agnostic — zero `tasks.md` awareness). The bridge's one soft bullet asking for the tick gets dropped, so `tasks.md` stays all-unchecked and verify's PRECHECK `grep -c '^- [x]' openspec/changes//tasks.md` (which must return `> 0`) FALSELY STOPS a completed apply. `tasks.md` is the right source of truth because it is committed and travels in the PR diff; the SDD ledger is git-ignored per-worktree scratch. - -This is a symptom of the **"task fragmentation" the README itself names** (`README.md:126, ~520`): one plan is represented THREE ways — coarse `tasks.md` checkboxes (what verify/archive count), fine `plan.md` TDD micro-steps (what the SDD executor works from), and the `.superpowers/sdd/progress.md` ledger (what SDD actually updates). Progress lands in the ledger + `plan.md` micro-steps but is never surfaced back to the coarse `tasks.md` the gates read. **Scope note:** this task fixes the SYMPTOM (surface the tick back to `tasks.md`); it deliberately does NOT collapse the three representations into one — resolving the fragmentation root (auto-derive / single source of truth) was weighed and rejected as over-engineering during brainstorm (option c). After this pass, the plan is still represented three ways; the coarse tracker just stops drifting. - -- [ ] **Step 1: Replace the soft tick bullet.** Find in `$FORK/superpowers-bridge/schema.yaml` (apply step 2): - -```yaml - - Update tasks.md checkboxes as coarse tasks complete -``` -Replace with: - -```yaml - - Tick tasks.md checkboxes IN THE SAME bookkeeping message where - you append the SDD progress-ledger line for a cleared task: - when a task's review comes back clean, flip its `- [ ]` to - `- [x]` in openspec/changes//tasks.md AND append the - ledger line together. tasks.md is the committed source of - truth (it travels in the PR diff and gates verify); the ledger - is throwaway per-worktree scratch. Never leave tasks.md - all-unchecked — the verify PRECHECK below will falsely STOP. -``` - -- [ ] **Step 2: Add a cross-reference at the verify PRECHECK.** Find the verify PRECHECK block containing `grep -c '^- \[x\]' openspec/changes//tasks.md`. Immediately after that command's line, add a comment line inside the instruction prose: - -```yaml - (This returns 0 only if the apply executor failed to tick - tasks.md as tasks cleared — see apply step 2's ticking rule; - a 0 here on a genuinely-complete apply is a bookkeeping miss, - not incomplete work. Tick the boxes, then re-run.) -``` - -- [ ] **Step 3: Validate structurally** - -```bash -python3 -c "import yaml; yaml.safe_load(open('$FORK/superpowers-bridge/schema.yaml')); print('OK')" -``` -Expected: `OK`. - -- [ ] **Step 4: Grep-verify** - -```bash -grep -n "IN THE SAME bookkeeping message" "$FORK/superpowers-bridge/schema.yaml" -grep -c "Update tasks.md checkboxes as coarse tasks complete" "$FORK/superpowers-bridge/schema.yaml" -``` -Expected: first matches; second prints `0` (old bullet gone). - -- [ ] **Step 5: Commit** - -```bash -git -C "$FORK" add superpowers-bridge/schema.yaml -git -C "$FORK" commit -m "fix(bridge): bind tasks.md tick to SDD ledger step; note verify false-STOP (H1)" -``` - ---- - -### Task 4: Correctness MEDs batch — nonexistent command, wrong config path, fragile base-detection, live placeholders - -**Files:** -- Modify: `$FORK/superpowers-bridge/schema.yaml` (M5 base-detection ~line 207; M6 placeholders ~210, ~314, ~320, ~335) -- Modify: `$FORK/superpowers-bridge/README.md` and `README.zh-TW.md` (M2 `/opsx:new` ~lines 156,172,223,336,352,419,425; M3 `openspec/config.yaml` ~line 354) -- Modify: `$FORK/superpowers-bridge/templates/adopters/CLAUDE.md.fragment.*.md` (M2 `/opsx:new` in the routing table) - -**Interfaces:** none consumed/produced (independent doc + shell fixes). - -- [ ] **Step 1: M2 — confirm the real command surface, then replace `/opsx:new`.** - -```bash -ls /develop/anomaly-detection/.claude/commands/opsx/ # authoritative slash-command list -``` -Expected: files for propose/ff/continue/apply/verify/archive/explore/onboard/sync — **no `new.md`**. `/opsx:new` is not a slash command (though `openspec new` is a CLI subcommand). Replace each `/opsx:new --schema ` usage: -- Interactive/step-by-step creation (was `/opsx:new … then /opsx:continue`): use the CLI `openspec new --schema ` then `/opsx:continue`, OR `/opsx:propose` for the one-shot. Pick per each occurrence's intent (the "New feature" table rows and the quickstart blocks → `/opsx:propose`; the "interactive" walkthrough at README:336-346 → `openspec new --schema superpowers-bridge` then `/opsx:continue`). -- The `spec-driven` skip-brainstorm rows (README:352,425) → `openspec new --schema spec-driven`. - -Apply in BOTH READMEs + both CLAUDE fragments. - -- [ ] **Step 2: M2 grep-verify no slash `/opsx:new` remains** - -```bash -grep -rn "opsx:new" "$FORK/superpowers-bridge/" -``` -Expected: no matches (CLI `openspec new` may remain — that's correct). - -- [ ] **Step 3: M3 — fix the nonexistent config path.** At `README.md:354` (and the zh-TW mirror): - -``` -# Or change project default in openspec/config.yaml: schema: spec-driven -``` -Replace with: - -``` -# Or pin the schema per change in the change's .openspec.yaml (schema: spec-driven), -# or pass --schema on the command. (OpenSpec 1.4.x/1.5.0 has no openspec/config.yaml.) -``` - -- [ ] **Step 4: M5 — make verify's base-detection robust for unpushed worktrees.** At `schema.yaml:207`, replace: - -```bash - git log --oneline $(git merge-base HEAD origin/main 2>/dev/null || git merge-base HEAD origin/master 2>/dev/null)..HEAD | wc -l -``` -with a resolver that tries remote THEN local base refs and counts with `rev-list` (this repo's norm is unpushed local branches off local `master`): - -```bash - base=""; for ref in origin/main origin/master main master; do \ - git rev-parse -q --verify "$ref" >/dev/null 2>&1 && { base="$ref"; break; }; done; \ - [ -n "$base" ] && git rev-list --count "$(git merge-base HEAD "$base")..HEAD" || echo 0 -``` - -- [ ] **Step 5: M6 — neutralize literal placeholders inside runnable shell.** The PRECHECK shells embed `` / `` (schema.yaml ~210, ~314, ~320, ~335) which error if pasted verbatim. Add ONE substitution note at the first PRECHECK that owns them and change the literals to shell vars, e.g. prefix the verify PRECHECK block with: - -```yaml - (Substitute the change name first: `chg=` — replace - with this change's directory name, then the commands - below use "$chg".) -``` -and change `openspec/changes//tasks.md` → `openspec/changes/$chg/tasks.md`, `` → `$base` (defined in Step 4), in the affected commands. - -- [ ] **Step 6: Validate + grep** - -```bash -python3 -c "import yaml; yaml.safe_load(open('$FORK/superpowers-bridge/schema.yaml')); print('OK')" -grep -rn "openspec/config.yaml" "$FORK/superpowers-bridge/" ; echo "--- expect no matches above ---" -``` -Expected: `OK`; no `openspec/config.yaml` matches. - -- [ ] **Step 7: Commit** - -```bash -git -C "$FORK" add superpowers-bridge/schema.yaml superpowers-bridge/README.md superpowers-bridge/README.zh-TW.md superpowers-bridge/templates/adopters/ -git -C "$FORK" commit -m "fix(bridge): real command surface, .openspec.yaml path, robust base-detect, placeholder subst (M2/M3/M5/M6)" -``` - ---- - -### Task 5: Adapt the bridge to Superpowers 6.1.0 (v5→v6 diff fold-in) + re-attest baselines - -**Files:** -- Modify: `$FORK/superpowers-bridge/schema.yaml` (finish sequence apply step 6 ~557-567; transitive-review note ~513-518; executing-plans citation; a `# v6 notes` comment near apply) -- Modify: `$FORK/superpowers-bridge/README.md` + `README.zh-TW.md` (finish "opens the PR" ~408-410; per-task-vs-final review ~304-306,384; plan.md description; baseline badges 8-9; Compatibility ~487; executing-plans URL) -- Modify: `$FORK/superpowers-bridge/VERSION` (1.0.0 → 1.1.0) - -**Interfaces:** none. - -**Context:** research-D (`scratchpad/research-D-superpowers-v5-v6-diff.md`) diffed every invoked skill v5.1.0→6.1.0. Only H2 was BREAKING (fixed in Task 2, and pre-existing — not a v6 regression). This task folds the RELEVANT non-breaking alignments, records two OPT-IN v6 capabilities, and re-attests the baseline honestly. Deltas to fold: -- **(a)** v6 `finishing-a-development-branch` REMOVED `gh pr create` — Option 2 "Create PR" is now push-only (v6 `finishing-a-development-branch/SKILL.md:121-126`). The bridge's "finish opens the PR" is stale; fixing it also aligns with this workspace's no-auto-PR + GitLab/`glab` (not `gh`) rules. -- **(b)** v6 merged the two SDD reviewer prompts into one `task-reviewer-prompt.md` — per-task review is SDD's own; `requesting-code-review` is the FINAL whole-branch pass only. -- **(c)** writing-plans v6 adds `## Global Constraints` + per-task `Interfaces` blocks (richer plan.md) — this very plan uses them. -- **(d)** SDD v6 gained explicit per-dispatch model selection + a durable `.superpowers/sdd/` ledger — opt-in, already benefits apply, no bridge change needed. -- executing-plans still activates neither TDD nor code-review → the bridge's rejection rationale HOLDS (only a moving-URL nit). - -- [ ] **Step 1: Confirm invoked-skill surface at 6.1.0** - -```bash -ls /home/appuser/.claude/plugins/cache/claude-plugins-official/superpowers/6.1.0/skills/ -grep -oE "superpowers:[a-z-]+" "$FORK/superpowers-bridge/schema.yaml" | sort -u -``` -Expected: brainstorming, writing-plans, using-git-worktrees, subagent-driven-development, finishing-a-development-branch (+ transitively test-driven-development, requesting-code-review) all present; no renames. - -- [ ] **Step 2: (delta a) finish is push-only — de-couple from `gh pr create`.** At `schema.yaml` apply step 6 (~557-567) and `README.md:408-410` (+ zh-TW), reword so the bridge does NOT claim finish "opens the PR". Replace the step-6 body with: - -```yaml - 6. **Completion (finish + push is the LAST automated step)**: - - After retrospective + archive are both done, use the Skill - tool to invoke **superpowers:finishing-a-development-branch**. - In v6 this pushes the branch; it does NOT open a PR/MR for you - (upstream removed the `gh pr create` step). Opening the MR/PR is - a separate human step — on GitLab use `glab`; do NOT auto-open - or auto-merge. - - The pushed branch MUST contain the complete archived cycle - (all 8 artifacts, specs synced, change under archive/). If it - does not, STOP and complete retrospective/archive first. -``` -Mirror the "opens the PR" → "pushes the branch" wording in both READMEs. - -- [ ] **Step 3: (delta b) clarify per-task vs final review.** At `schema.yaml:513-518` and `README.md:304-306,384` (+ zh-TW), reword the `requesting-code-review` note: - -```yaml - - **superpowers:requesting-code-review** — invoked only for the - FINAL whole-branch review before apply concludes. Per-task - review is handled INSIDE subagent-driven-development by its own - merged task-reviewer prompt (spec-compliance + quality), not by - a separate skill invocation. -``` - -- [ ] **Step 4: (delta c) note the richer plan.md format.** Where the bridge's `plan` artifact instruction describes plan.md (~schema.yaml:184-192), add one sentence: `writing-plans v6 emits a "## Global Constraints" block and per-task "Interfaces" blocks; implementers MUST honor both.` No structural change. - -- [ ] **Step 5: (delta d) record opt-in v6 capabilities as a comment.** Add a short `# v6 notes:` comment just above the `apply:` key in `schema.yaml`: - -```yaml -# v6 notes: subagent-driven-development (6.x) applies explicit per-dispatch -# model selection (Sonnet for mechanical steps, Opus for reasoning) and keeps -# a durable .superpowers/sdd/ progress ledger for long runs. Both are handled -# by the executor automatically — no instruction here duplicates them. -``` - -- [ ] **Step 6: pin the moving executing-plans citation.** Find the bridge's `executing-plans` reference (rejection rationale, ~schema.yaml:520-525 / README). If it links a moving `.../main/...` URL, replace with a versioned permalink or cite the skill by name only. Rationale unchanged (research-D: v6 executing-plans still activates neither TDD nor code-review). - -- [ ] **Step 7: baseline badges + Compatibility.** Update badges (`README.md:8-9` + zh-TW): - -``` -[![OpenSpec baseline](https://img.shields.io/badge/OpenSpec_baseline-1.5.0-0277bd)](#compatibility) -[![Superpowers baseline](https://img.shields.io/badge/Superpowers_baseline-6.1.0-0277bd)](#compatibility) -``` -In the Compatibility section set pinned baselines to OpenSpec 1.5.0 / Superpowers 6.1.0 and add: `Re-attested against Superpowers 6.1.0 (2026-07-02) via a full v5.1.0→6.1.0 skill diff: only finishing-a-development-branch (now push-only) and the merged SDD task-reviewer needed prose alignment; the SDD self-finish conflict (H2) predates v6 and is suppressed by the apply instruction.` Add: `OpenSpec 1.5.0 "Stores" is opt-in beta and does not affect this bridge; re-check the changes/+specs/ paths only if a future release makes Stores the default layout.` - -- [ ] **Step 8: Bump VERSION** — `$FORK/superpowers-bridge/VERSION`: `1.0.0` → `1.1.0`. - -- [ ] **Step 9: Validate + grep** - -```bash -python3 -c "import yaml; yaml.safe_load(open('$FORK/superpowers-bridge/schema.yaml')); print('OK')" -grep -rn "gh pr create" "$FORK/superpowers-bridge/" ; echo "--- expect NONE in the bridge (the fork PR in this plan's Task 8 is separate) ---" -grep -n "5.1.0" "$FORK/superpowers-bridge/README.md" ; echo "--- expect only historical/changelog mentions, not the baseline ---" -cat "$FORK/superpowers-bridge/VERSION" -``` -Expected: `OK`; no `gh pr create` in the bridge; baseline shows 6.1.0/1.5.0; VERSION `1.1.0`. - -- [ ] **Step 10: Commit** - -```bash -git -C "$FORK" add superpowers-bridge/ -git -C "$FORK" commit -m "feat(bridge): adapt to Superpowers 6.1.0 (push-only finish, merged reviewer, plan.md format) + re-attest baselines 6.1.0/1.5.0 (M4 + v6 diff)" -``` - ---- - -### Task 6: Cosmetics batch — step-number/label drift, grep-anchor mismatch, artifact-count typos - -**Files:** -- Modify: `$FORK/superpowers-bridge/schema.yaml` (L1 grep anchor ~line 210; L5 `design` missing from the chain at line 15) -- Modify: `$FORK/superpowers-bridge/README.md` + `README.zh-TW.md` (M7 finishing "step 4"→step 6 ~line 306; stale "2a"/"2b" labels ~line 445 / zh-TW ~310,449; L4 "7 artifacts" shows 6 ~line 225) -- Modify: `$FORK/superpowers-bridge/templates/retrospective.md` (L1 anchor `^\s*- \[x\]` vs gates' `^- \[x\]`) - -**Interfaces:** none. - -- [ ] **Step 1: L5** — the description chain at `schema.yaml:15` reads `brainstorm → proposal → specs → tasks → plan → verify → retrospective` but omits `design`. Insert `design` after `proposal`: `brainstorm → proposal → design → specs → tasks → plan → verify → retrospective`. - -- [ ] **Step 2: L1** — align grep anchors. Decide on ONE anchor form and use it everywhere the completeness of `tasks.md` is counted. Use `^\s*- \[x\]` (tolerant of indentation) in the verify PRECHECK (`schema.yaml:210`) and confirm the retrospective template (`templates/retrospective.md:19`) matches. Update whichever differs so both read `^\s*- \[x\]`. - -- [ ] **Step 3: M7** — fix step-number drift: README's touchpoints table says finishing-a-development-branch is "step 4" (~README:306) but the apply instruction sequences it at step 6. Change to "step 6". Fix stale "2a"/"2b" apply-step labels (~README:445; zh-TW ~310,449) to match the current numbered apply steps (1-6). - -- [ ] **Step 4: L4** — the "PLANNING — 7 artifacts" heading (~README:225) lists 6. Recount and correct to match the actual planning artifacts. - -- [ ] **Step 5: Validate + grep** - -```bash -python3 -c "import yaml; yaml.safe_load(open('$FORK/superpowers-bridge/schema.yaml')); print('OK')" -grep -n "brainstorm → proposal → design → specs" "$FORK/superpowers-bridge/schema.yaml" -``` -Expected: `OK`; chain now includes `design`. - -- [ ] **Step 6: Commit** - -```bash -git -C "$FORK" add superpowers-bridge/ -git -C "$FORK" commit -m "docs(bridge): fix step-number/label drift, grep-anchor mismatch, artifact-count + chain typos (M7/L1/L4/L5)" -``` - ---- - -### Task 7: Re-point to the fork + retire the drift-vs-JiangWay apparatus (topology) - -**Files:** -- Modify: `$FORK/superpowers-bridge/README.md` + `README.zh-TW.md` (4 clone-URLs in install/upgrade prose ~lines 26,40,67,86; CI badge line 5; Upstream Drift badge line 6 + its Compatibility-section duplicate ~496-497) -- Delete/neutralize (repo root, if present): `$FORK/.github/workflows/version-check.yml` - -**Interfaces:** none. - -**Context:** Adrian's chosen shape: GitHub fork = SSOT, re-point vendored copy to it, RETIRE the weekly drift-vs-JiangWay bot (upstream is dead), keep the fork publishable for PR-back. C found the touch-points: 4 clone-URL occurrences, the CI badge, the Upstream Drift badge (×2), and the workflow files. - -- [ ] **Step 1: Re-point the 4 clone-URLs** from `https://github.com/JiangWay/openspec-schemas` to `https://github.com/AdrianTheopold/openspec-schemas` in both READMEs' Method 1/2 install + upgrade blocks. - -- [ ] **Step 2: Add a "forked from" attribution** near the top of `README.md` (and zh-TW): `> Fork of [JiangWay/openspec-schemas](https://github.com/JiangWay/openspec-schemas) (upstream commit f5d4040), maintained independently since 2026-07-02. Upstream-PR-back welcome.` - -- [ ] **Step 3: Retire the Upstream Drift badge + bot.** Remove the `Upstream Drift` badge (README line 6) and its duplicate link in the Compatibility section (~496-497). Delete `$FORK/.github/workflows/version-check.yml` if it exists (`git rm`); replace the drift row in the Compatibility "how updates flow" table with a manual note: `Baselines are updated by hand when this fork is maintained; there is no automated drift bot (upstream JiangWay is inactive).` - -- [ ] **Step 4: Handle the CI badge** — either re-point the `validate-schemas.yml` badge to `AdrianTheopold/openspec-schemas` (keep only if that workflow exists in the fork) or remove the badge. Verify whether `$FORK/.github/workflows/validate-schemas.yml` exists; keep+repoint if yes, remove the badge if no. - -- [ ] **Step 5: Grep-verify no stray JiangWay URLs remain except the attribution** - -```bash -grep -rn "JiangWay" "$FORK/superpowers-bridge/" -``` -Expected: only the single "Fork of … (upstream commit f5d4040)" attribution line (Step 2). - -- [ ] **Step 6: Commit** - -```bash -git -C "$FORK" add -A -git -C "$FORK" commit -m "chore(bridge): re-point to fork, retire drift-vs-JiangWay bot, add upstream attribution" -``` - ---- - -### Task 8: Re-sync the vendored copy, validate end-to-end, push, open PR - -**Files:** -- Modify: `/develop/anomaly-detection/openspec/schemas/superpowers-bridge/**` (overwrite from the fork — the re-vendor) -- Modify: `/develop/CLAUDE.md` and `/develop/anomaly-detection/CLAUDE.md` (CLI pin note `@fission-ai/openspec@1.4.1` → `1.5.0`, and the "upstream commit f5d4040 / JiangWay" pointer → the fork) — **Adrian owns these files; propose the diff and get his ok before writing.** - -**Interfaces:** -- Consumes: the finished fork branch from Tasks 2-7. -- Produces: a vendored copy byte-identical to `$FORK/superpowers-bridge/`, validating `✓ valid`, and an open PR on the fork. - -- [ ] **Step 1: Re-vendor (whole-dir overwrite, per the bridge's own contract)** - -```bash -rm -rf /develop/anomaly-detection/openspec/schemas/superpowers-bridge -cp -R "$FORK/superpowers-bridge" /develop/anomaly-detection/openspec/schemas/superpowers-bridge -``` - -- [ ] **Step 2: Authoritative structural validation** - -```bash -cd /develop/anomaly-detection && openspec schema validate superpowers-bridge -``` -Expected: `✓ valid`. - -- [ ] **Step 3: Confirm vendored == fork** - -```bash -diff -ruN "$FORK/superpowers-bridge" /develop/anomaly-detection/openspec/schemas/superpowers-bridge -``` -Expected: no output (identical). The plan lives at the fork repo root (`docs/plans/`), NOT under `superpowers-bridge/`, so it does not appear in this diff. - -- [ ] **Step 4: (OPTIONAL, gold-standard) dry apply behavioral check.** On a throwaway change, run one `/opsx:apply` cycle and confirm: (a) SDD does NOT open a PR / delete the worktree at the end (H2), (b) `tasks.md` boxes get ticked as tasks clear (H1), (c) verify's PRECHECK passes. Heavy (real worktree + subagents) — run only if Adrian wants full behavioral proof before merge. - -- [ ] **Step 5: Bump the CLI pin references** (Adrian-owned files — propose diff first): `@fission-ai/openspec@1.4.1` → `@fission-ai/openspec@1.5.0` in `/develop/CLAUDE.md` (and any anomaly-detection mention); update the "vendored … upstream commit f5d4040 (JiangWay)" note to point at the fork. - -- [ ] **Step 6: Push the fork branch + open the PR** - -```bash -git -C "$FORK" push -u origin fix/correctness-pass-v1.1 -gh pr create --repo AdrianTheopold/openspec-schemas --base main --head fix/correctness-pass-v1.1 \ - --title "Correctness pass v1.1: fix H1/H2 apply bugs, re-attest 6.1.0/1.5.0, re-point fork" \ - --body "See superpowers-bridge/docs/plans/2026-07-02-correctness-pass.md. Fixes 2 HIGH (tasks.md verify false-STOP; SDD self-finish before verify/retro/archive) + correctness MEDs + baseline re-attestation + fork re-pointing." -``` -Expected: PR URL printed. - -- [ ] **Step 7: Commit the vendored re-sync in anomaly-detection** (separate repo; on a branch, per commit-on-owned-branch discipline — do NOT push without Adrian's ok) - -```bash -cd /develop/anomaly-detection && git switch -c chore/revendor-bridge-fork-v1.1 -git add openspec/schemas/superpowers-bridge CLAUDE.md -git commit -m "chore: re-vendor superpowers-bridge from fork v1.1 (H1/H2 + baselines + re-point)" -``` - ---- - -## Self-Review notes (author) - -- **Spec coverage:** every audit finding maps to a task — H2→T2, H1→T3, M2/M3/M5/M6→T4, M4+1.5.0→T5, M7/L1/L4/L5→T6, topology→T7, re-sync+pin+PR→T8. L3 (post_apply) is Global-Constraints OUT-of-scope (upstream-gated). Comprehensive-scope items (docs rewrite, test harness) intentionally deferred per the chosen "correctness pass." -- **No pytest by design:** verification is `openspec schema validate` + grep + (optional) one real apply cycle; stated in the Verification model up top so it isn't read as a placeholder. -- **Outward-facing gates flagged:** fork creation (T1.1), any public push (Global Constraint + T8.6), and Adrian-owned CLAUDE.md edits (T8.5) all require his ok — consistent with "confirm outward-facing actions." -- **Open item for Adrian:** whether the eventual PR is fork-internal (merge to his fork's main) or also raised BACK to JiangWay. Default here: fork-internal; PR-back is a later, separate action. From 9094eee9794b4062b700f09dba6a897f88089979 Mon Sep 17 00:00:00 2001 From: Adrian Theopold <83468052+AdrianTheopold@users.noreply.github.com> Date: Mon, 6 Jul 2026 12:04:33 +0000 Subject: [PATCH 11/12] docs(bridge): reframe fork header as maintained working fork, not PR-back This fork is the actively-maintained working line for its users, not a staging ground for upstream contributions. Drop "Upstream-PR-back welcome" (EN + zh-TW); keep attribution and the upstream-compatibility drift notes. Co-Authored-By: Claude Opus 4.8 (1M context) --- superpowers-bridge/README.md | 2 +- superpowers-bridge/README.zh-TW.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/superpowers-bridge/README.md b/superpowers-bridge/README.md index 2f246b7..4dd7438 100644 --- a/superpowers-bridge/README.md +++ b/superpowers-bridge/README.md @@ -10,7 +10,7 @@ > > The integration lives entirely at the prompt layer — no Superpowers source modified, no OpenSpec CLI changes. Schema version: v1. > -> **Fork** of [JiangWay/openspec-schemas](https://github.com/JiangWay/openspec-schemas) (upstream commit `f5d4040`), maintained independently since 2026-07-02. Upstream-PR-back welcome. +> **Fork** of [JiangWay/openspec-schemas](https://github.com/JiangWay/openspec-schemas) (upstream commit `f5d4040`), independently maintained since 2026-07-02 as the actively-maintained working fork (upstream is inactive); it diverges as needed and is not aimed at upstream PR-back. --- diff --git a/superpowers-bridge/README.zh-TW.md b/superpowers-bridge/README.zh-TW.md index 3ad84e4..41eba79 100644 --- a/superpowers-bridge/README.zh-TW.md +++ b/superpowers-bridge/README.zh-TW.md @@ -10,7 +10,7 @@ > > 整合**完全發生在 prompt 層**——不修改 Superpowers 任何程式碼,不修改 OpenSpec CLI。Schema 版本:v1。 > -> 本 repo 是 [JiangWay/openspec-schemas](https://github.com/JiangWay/openspec-schemas) 的 **fork**(upstream commit `f5d4040`),自 2026-07-02 起獨立維護。歡迎回饋 upstream PR。 +> 本 repo 是 [JiangWay/openspec-schemas](https://github.com/JiangWay/openspec-schemas) 的 **fork**(upstream commit `f5d4040`),自 2026-07-02 起作為實際維護的 working fork 獨立維護(upstream 已停止維護);會依需要自由分歧,不以回饋 upstream PR 為目標。 --- From f5c527f77b7c55535c15ed71dd9919463f83a172 Mon Sep 17 00:00:00 2001 From: Adrian Theopold <83468052+AdrianTheopold@users.noreply.github.com> Date: Wed, 8 Jul 2026 07:07:52 +0000 Subject: [PATCH 12/12] docs(bridge): drop internal "H2" label from the compatibility note MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "H2" referenced the correctness-pass fold-in list, which isn't part of the shipped bridge — the sentence stands on its own without it (EN + zh-TW). Co-Authored-By: Claude Opus 4.8 (1M context) --- superpowers-bridge/README.md | 2 +- superpowers-bridge/README.zh-TW.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/superpowers-bridge/README.md b/superpowers-bridge/README.md index 4dd7438..6cb4bde 100644 --- a/superpowers-bridge/README.md +++ b/superpowers-bridge/README.md @@ -488,7 +488,7 @@ Current bundle release: **`1.1.0`** (see [VERSION](./VERSION)). |---|---|---|---| | v1 | `1.5.0` | `6.1.0` | 2026-07-02 | -> Re-attested against **Superpowers 6.1.0** (2026-07-02) via a full v5.1.0→6.1.0 skill diff: only `finishing-a-development-branch` (its push option no longer auto-creates the PR) and the merged SDD task-reviewer needed prose alignment; the SDD self-finish conflict (H2) predates v6 and is suppressed by the apply instruction. **OpenSpec 1.5.0** "Stores" is opt-in beta and does not affect this bridge — re-check the `changes/`+`specs/` paths only if a future release makes Stores the default layout. +> Re-attested against **Superpowers 6.1.0** (2026-07-02) via a full v5.1.0→6.1.0 skill diff: only `finishing-a-development-branch` (its push option no longer auto-creates the PR) and the merged SDD task-reviewer needed prose alignment; the SDD self-finish conflict predates v6 and is suppressed by the apply instruction. **OpenSpec 1.5.0** "Stores" is opt-in beta and does not affect this bridge — re-check the `changes/`+`specs/` paths only if a future release makes Stores the default layout. ### How this is checked diff --git a/superpowers-bridge/README.zh-TW.md b/superpowers-bridge/README.zh-TW.md index 41eba79..5af9a91 100644 --- a/superpowers-bridge/README.zh-TW.md +++ b/superpowers-bridge/README.zh-TW.md @@ -488,7 +488,7 @@ LLM 不必解讀 timing 文字 —— 跑指令、看結果即可。這是顧慮 |---|---|---|---| | v1 | `1.5.0` | `6.1.0` | 2026-07-02 | -> 已對 **Superpowers 6.1.0**(2026-07-02)做完整 v5.1.0→6.1.0 skill diff 重新對齊:只有 `finishing-a-development-branch`(push 選項不再自動開 PR)與合併後的 SDD task-reviewer 需要 prose 對齊;SDD self-finish 衝突(H2)早於 v6 就存在,由 apply instruction 抑制。**OpenSpec 1.5.0** 的 "Stores" 是 opt-in beta,不影響本 bridge —— 只有未來某版把 Stores 設為預設 layout 時,才需重新檢查 `changes/`+`specs/` 路徑。 +> 已對 **Superpowers 6.1.0**(2026-07-02)做完整 v5.1.0→6.1.0 skill diff 重新對齊:只有 `finishing-a-development-branch`(push 選項不再自動開 PR)與合併後的 SDD task-reviewer 需要 prose 對齊;SDD self-finish 衝突早於 v6 就存在,由 apply instruction 抑制。**OpenSpec 1.5.0** 的 "Stores" 是 opt-in beta,不影響本 bridge —— 只有未來某版把 Stores 設為預設 layout 時,才需重新檢查 `changes/`+`specs/` 路徑。 ### 驗證機制