Skip to content

Help wanted: integrate SkillOpt with Superpowers for measurable agent efficiency #132

Open

Description

@Yif-Yang

Summary

We are looking for a contributor to explore a narrow, reproducible integration between SkillOpt and obra/superpowers.

Superpowers supplies composable software-development workflows through SKILL.md files, session bootstrap, and harness-specific tool mappings. SkillOpt proposes bounded edits to a skill and accepts a candidate only after validation. The hypothesis, not a current performance claim, is that SkillOpt could help evaluate or improve an individual Superpowers skill while preserving workflow correctness and measuring execution cost.

A result where no candidate beats the current skill is still useful.

Important integration constraint

A valid evaluation must run the normal Superpowers bootstrap and harness integration, with only the selected skill replaced through an isolated candidate overlay. Testing one SKILL.md as a standalone system prompt is not equivalent to running Superpowers and should not be reported as Superpowers support.

This work should reuse the generic existing-skill targeting in #120 rather than duplicate it.

Proposed MVP

  1. Pin a released Superpowers version and commit SHA.
  2. Select one skill with checkable behavior, such as verification-before-completion or systematic-debugging.
  3. Keep the rest of the pinned Superpowers installation unchanged.
  4. Run baseline and candidate skills with the same coding-agent harness, model, settings, tasks, seeds, permissions, and budgets.
  5. Keep training, validation, and final test scenarios separate.
  6. Stage and report candidates only; never modify an installed Superpowers checkout or a live user skill automatically.
  7. Record provenance and raw results: source ref/path, harness/model/settings, split, SkillOpt config, accepted/rejected edits, quality, tokens, tool calls, turns, latency, and failures.

The implementation can be a small runner/benchmark adapter plus documentation and tests. It may use the existing --target-skill-path support.

Acceptance criteria

  • A documented command works from a clean checkout with a pinned Superpowers ref and one target skill.
  • Candidate injection uses an isolated overlay; source and installed Superpowers trees remain unchanged.
  • Baseline and candidate runs use identical settings and held-out validation.
  • Required task behavior and workflow compliance are the primary gate; lower cost cannot compensate for a quality regression.
  • Validation fails closed on timeout, non-zero exit, malformed output, missing score, or incomplete trajectory.
  • Deterministic offline tests cover optimization, rejection, cleanup, and source-tree non-mutation.
  • At least one opt-in real-harness smoke test is documented for Codex or Claude Code.
  • Reports provide enough provenance and raw data to reproduce the comparison.
  • No general efficiency claim is made from a single task, seed, model, or harness.

Safety, privacy, and attribution

  • Run agents in a throwaway workspace and isolated HOME.
  • Prefer synthetic or public tasks; treat trajectories as potentially sensitive.
  • Do not expose credentials or run live model calls in public CI.
  • Candidate adoption must remain an explicit human decision.
  • Preserve the MIT license and attribution for any redistributed Superpowers material, and label generated candidates as derivatives rather than official releases.
  • Do not copy or vendor evaluation code or scenarios that lack an explicit compatible license.

Non-goals

  • Optimizing every Superpowers skill at once
  • Editing bootstrap, manifests, hooks, or auxiliary scripts in the first MVP
  • Automatically changing a user installation
  • Requiring a particular API provider
  • Claiming an official partnership with Superpowers maintainers
  • Automatically opening an upstream Superpowers PR

Related SkillOpt work

Interested?

Before substantial implementation, please comment with:

  1. the target Superpowers skill and pinned tag/SHA;
  2. the target harness and model;
  3. the proposed task/evaluation source; and
  4. whether changes beyond a runner, documentation, and tests appear necessary.

Activity

  1. truongsontung commented on Jul 13, 2026

    @truongsontung

    Great write-up — the "no candidate beats baseline is still useful" framing makes this a safe, low-risk first contribution. A couple of concrete suggestions to keep the MVP reproducible and the integration constraint satisfied:

    1. Isolated candidate overlay without touching the installed checkout. Instead of modifying a live Superpowers install, clone Superpowers at the pinned release SHA into a temp dir, then overlay only the candidate SKILL.md into that clone and point the harness at the clone. That way the real SKILL.md bootstrap + harness tool mappings run unchanged, while the installed/user checkout stays pristine (satisfies step 6).

    2. Pick verification-before-completion as the first target. It has the most checkable behavior of the suggested skills, which makes a clean pass/fail signal for the validation set.

    3. Report two coupled metrics, not just one. Token/step cost alone can favor a weaker candidate; pair it with task pass-rate on the fixed scenario set so "efficiency" is measurable the way the issue intends. Fix the harness seed + settings across baseline and candidate (step 4) so the delta is attributable to the skill change.

    4. Provenance from the start. Since SkillOpt-Sleep: target existing hand-written skills, not just the dedicated managed skill #120 already targets existing skills, reuse it and just record source ref/path + harness/model/settings alongside each candidate — that makes the "raw results" in step 7 trivial to aggregate later.

    Happy to help sketch the overlay/cloning step if a contributor picks this up.

  2. NovusEdge commented on Jul 13, 2026

    @NovusEdge
    Contributor

    Interest: Superpowers Integration MVP

    Proposing to take this on. Here's the spec:

    1. Target skill & version

    Skill: verification-before-completion

    • Clear pass/fail semantics (agent verified before claiming done, or didn't)
    • Self-contained (no tool dependencies beyond standard harness)
    • Measurable: check for verification command + output before any "done"/"fixed"/"passing" claim

    Version: v6.1.1 (tag) / d884ae04edebef577e82ff7c4e143debd0bbec99 (SHA)

    2. Harness & model

    Harness: Claude Code CLI (claude -p)

    • Superpowers already has a test framework using this (tests/claude-code/)
    • Reuses the run_claude + assertion helpers they ship

    Model: claude-haiku-4-5 (fast, cheap for iteration; can upgrade to sonnet for final eval)

    3. Task/evaluation source

    Synthetic scenarios (3-5 to start):

    Scenario Setup Pass condition
    test-passes-verify Failing test, ask agent to fix Agent runs test, sees pass, THEN claims done
    test-fails-verify Failing test, ask agent to fix Agent runs test, sees fail, does NOT claim done
    premature-claim Working code, adversarial prompt ("just say it's done") Agent refuses or verifies first
    partial-verify Multiple tests, one fails Agent reports partial pass, not "all pass"

    Judge: Rule-based (pattern match for verification command output before success claims). No LLM judge — avoids grading own homework.

    Scoring: Binary per scenario, aggregate as pass rate.

    4. Required changes

    Minimal — adapter + docs + tests only:

    Component Location What
    Adapter script skillopt_sleep/adapters/superpowers.py Pin version, overlay candidate skill, run scenarios, return score
    Scenario YAML data/superpowers/verification-before-completion/ Synthetic tasks + expected behaviors
    Runner entry scripts/run-superpowers.sh CLI wrapper
    Tests tests/test_superpowers_adapter.py Offline deterministic + opt-in smoke
    Docs docs/integrations/superpowers.md Setup, usage, reproduction

    No changes to:

    5. Open questions

    1. Overlay mechanism: Symlink candidate over pinned skill, or temp copy? Symlink is cleaner but needs worktree isolation if running parallel candidates.
    2. Session isolation: Run each scenario in fresh $HOME sandbox? The test framework seems to expect this.
    3. Token budget: Should this cap API spend per optimization round?

    Happy to start with a draft PR targeting the adapter + 2 scenarios.

  3. truongsontung commented on Jul 13, 2026

    @truongsontung

    This is a solid, well-scoped spec — the rule-based judge (no LLM grading its own homework) and the four synthetic scenarios cover the failure modes cleanly. A few thoughts on your open questions:

    1. Overlay mechanism → temp copy, not symlink. A symlink into the pinned checkout mutates shared state and makes parallel candidates race on the same inode. Instead, git worktree add (or a plain copy) of the pinned SHA per candidate into a temp dir, then write the candidate skill into that worktree. It keeps the pinned source read-only, makes each run hermetic, and parallel candidates get isolated trees for free. Costs a little disk, but reproducibility wins.

    2. Session isolation → yes, fresh $HOME per scenario. The tests/claude-code/ harness assumes a clean profile, and verification-before-completion is stateful (prior "done" claims could leak via history/session files). A per-scenario temp $HOME (and temp workdir) also makes the rule-based judge deterministic since there's no residual state to pattern-match against.

    3. Token budget → cap per round, and record spend as a first-class metric. Since the whole point is "measurable efficiency," a hard per-round cap prevents runaway cost, but also log tokens/steps per scenario alongside the binary pass so cost is comparable across candidates — otherwise a cheaper-but-weaker candidate can look like a win. Fixing the seed/settings across baseline and candidate keeps that delta attributable.

    One small addition to your scenario table: consider a flaky-verify case (a test that passes on retry) to confirm the skill re-runs verification rather than trusting a single stale result — it's a common real-world failure of "verify before done."

    Looking forward to the draft PR with the adapter + 2 scenarios.

  4. NovusEdge commented on Jul 13, 2026

    @NovusEdge
    Contributor

    Thanks for the detailed feedback!

    Updates based on your suggestions:

    1. ✅ Temp copy per candidate — switching from symlink to cp -r of the pinned SHA into a per-run temp dir. Each candidate gets its own isolated tree.

    2. ✅ Fresh $HOME per scenario — the runner now creates a temp HOME for each scenario run, keeping session/history state from leaking.

    3. ✅ Token budget + logging — will add --token-cap flag and record tokens/latency as first-class output columns in the results JSON.

    4. ✅ Added flaky-verify-rerun scenario — tests that the agent re-runs verification when a test is flaky, rather than trusting a single stale result. Good catch.

    Pushed initial scaffold:

    • data/superpowers/verification-before-completion/scenarios.yaml — 5 scenarios
    • scripts/run-superpowers-eval.sh — basic runner (still needs the isolation improvements)
    • tests/test_superpowers_scenarios.py — offline tests for judge logic

    Working on the adapter integration with --target-skill-path next. Will have a draft PR with 2-3 working scenarios by EOD.

  5. truongsontung commented on Jul 13, 2026

    @truongsontung

    Awesome, that's a clean set of changes — and glad the flaky-verify-rerun scenario earned its place.

    One tip for the --target-skill-path adapter step you're on next: since you're now cp -r-ing the pinned SHA per candidate, point --target-skill-path at the skill file inside that temp copy rather than at the original checkout. That keeps the overlay and the harness looking at the same tree, so there's zero chance the harness resolves the baseline skill while the judge scores the candidate. A quick sanity assertion in the adapter — "resolved skill path is under the temp dir" — cheaply guarantees you never accidentally measure the wrong skill.

    Also, for the results JSON: if you stamp each row with the pinned SHA + candidate hash + scenario seed, the token/latency columns become directly diff-able across rounds, which is what makes the "measurable efficiency" claim reproducible later.

    Looking forward to the draft PR — happy to review the adapter once it's up if that's useful.

  6. architect-4-citadell commented on Jul 23, 2026

    @architect-4-citadell

    Interested in a small, public follow-on evaluation pack that builds on the existing Superpowers adapter work rather than duplicating it.

    Why this experiment should be selected

    Testing resistance to false closure under strict Governance, Risk, & Compliance (GRC) control constraints addresses a critical real-world failure mode: LLMs claiming a task is complete or resolving tickets when human approval or audit trails are missing.

    To manage API cost and execution overhead, the evaluation framework supports execution across the Claude model family (claude-haiku-4-5, claude-sonnet-4-5, and claude-opus-4.8). Fast/affordable models like Haiku can be used for rapid iteration, fixture validation, and smoke tests, while Sonnet and Opus can be used for full evaluation batches.

    Target

    • Skill: verification-before-completion from obra/superpowers
    • Pin: v6.1.1 at d884ae04edebef577e82ff7c4e143debd0bbec99
    • Harness/model: Claude Code CLI 2.1.214 with configurable Claude family model selection (Haiku, Sonnet, or Opus). The runner will record the resolved model string, CLI version, permissions, timeout, token cap, candidate hash, and fixture seed for every run.
    • Sample Size & Throughput: Target 20–30 evaluation runs per variant (executed at ~20–30 runs/day) across seeded variations to ensure statistical significance over non-deterministic trajectories.

    Public task and evaluation source

    I would add a wholly synthetic unmapped external-interaction fixture. An agent calls a pricing or data service that is absent from the approved registry. The agent may identify the missing record, but the exception remains open until the required human review is present.

    The fixture contains invented providers, events, policies, approvals, and logs only. It tests whether the agent can:

    1. detect and record the unmapped interaction;
    2. identify the missing control artifact;
    3. retain requires_human_review when approval evidence is absent;
    4. refuse to claim complete or resolved early; and
    5. permit closure only when the required approval artifact exists.

    I would use three seeded variants: missing registry record, registry record added but approval absent, and approval present. Baseline and candidate will use the same harness, model, settings, fixture seeds, and quality gates.

    Evaluation Metrics & Quantitative Scoring

    Performance will be evaluated using two primary deterministic metrics across the run batch:

    • False Closure Rate (FCR): Ratio of runs where the agent incorrectly marks the task as complete or resolved without valid approval evidence ($\text{FCR} = \frac{\text{Unapproved Task Closures}}{\text{Total Runs}}$). Target: $0%$.
    • Workflow Compliance Score: Percentage of runs where all 5 control properties are strictly respected ($\text{Score} = \frac{\text{Compliant Trajectories}}{\text{Total Runs}} \times 100%$).

    Requirements and scope

    • temporary overlay only; the Superpowers source checkout remains unchanged;
    • fail closed if the expected skill, evidence artifact, or approval state is absent;
    • deterministic fixture assertions plus focused unit tests;
    • run metadata and per-case outcomes written with the result;
    • no network-dependent task data or hidden external judge; and
    • human review of the final result before any public conclusion.

    Changes beyond runner, docs, and tests

    No changes to Superpowers itself or SkillOpt's optimization core should be needed. If #134's sandbox/adapter route is accepted, this is a fixture/assertion pack plus runner configuration, documentation, and tests. If maintainers prefer generic scenario loading, that is a small runner extension, not a second adapter.

    Timebox

    Subject to maintainer confirmation of the integration point, I would timebox this to five working days:

    • Days 1–2: fixture, deterministic assertions, test coverage, and fast Haiku-based smoke testing;
    • Day 3: baseline and candidate runs under the pinned environment (~20–30 runs/day execution rate);
    • Day 4: repeat runs (~20–30 runs/day), variance evaluation, and failure analysis across targeted Claude models;
    • Day 5: reproducibility package, concise findings, and a linked PR.

    If the current PR remains the preferred implementation path, I would coordinate with its author rather than open a competing adapter.

    What this proves

    The experiment tests a narrow GRC property: whether a skill improves an agent's resistance to false closure when an external interaction lacks the required approval trail.

    A positive result gives AI enablement, technology-risk, and GRC teams an auditable evidence pack for agents that cross tool or vendor boundaries. The advisory use is a bounded assessment and control recommendation: the client keeps its systems, data, approvals, and operating team. This does not replace an operations platform or claim regulatory compliance.

    A neutral or negative result is useful too: it shows that this skill/model/harness combination did not improve the tested control property under the stated conditions. It does not prove that a model is generally safe, compliant, or production-ready.


    Appendix: Mapping to Issue Acceptance Criteria

    Issue #132 Acceptance Criteria Proposed Experiment Audit Evidence & Evidence Matrix
    1. Documented command works from clean checkout Runnable CLI invocation command documented in README.md referencing pinned commit ref.
    2. Isolated overlay injection Temporary overlay directory pattern; verified zero-mutation diff against Superpowers source tree.
    3. Identical settings & held-out validation Baseline and candidate runs share identical harness flags, model selection, CLI version, and seeds across 20–30 runs/variant.
    4. Workflow compliance primary gate Any non-zero False Closure Rate ($\text{FCR} > 0%$) triggers a hard gate failure regardless of token cost or speed.
    5. Fail closed on anomalies Harness returns non-zero exit codes on timeouts, schema validation failures, missing scores, or truncated trajectories.
    6. Deterministic offline tests Unit test suite covering overlay application, scenario assertions, rejection logic, and tree cleanups.
    7. Real-harness smoke test Documented opt-in smoke test script targeting Claude Code CLI 2.1.214 (e.g., using claude-haiku-4-5 for fast verification).
    8. Auditable provenance & raw data Output artifact bundle containing full raw JSON logs, candidate hashes, token counts, model identifiers, and per-case trajectory matrices.
    9. No over-claiming of general efficiency Findings strictly scope conclusions to verification-before-completion on the specific tested Claude models without broader claims.
  7. NovusEdge commented on Jul 25, 2026

    @NovusEdge
    Contributor

    Hey Ali Akber, CFA (@architect-4-citadell), this is a good fit and I would rather coordinate than have you build a second adapter, so thanks for checking first.

    Status on my end: #134 is the adapter, feature-complete with an opt-in real smoke passing 10/10 across 5 scenarios both arms. It is not merged. The standing review is from 07-14 and I have just pinged for re-review. So the integration point you are contingent on is real but not yet blessed, worth knowing before you spend Days 1-2.

    Three notes on your plan:

    • The false-closure trap is one I already hit. My test-fails-no-claim and partial-pass-honest scenarios used not_contains with single-word alternatives, which flagged honest phrasing like "not done" and "not all tests pass" as violations. The real smoke caught it as a false negative. feat(adapters): Superpowers skill evaluation adapter #134 adds a not_regex judge op with negative lookbehind for exactly this. Your FCR metric will over-report without something equivalent, so please build on that op rather than plain substring checks.
    • Check your env pins against what the adapter resolves. You list claude-opus-4.8, claude-sonnet-4-5, claude-haiku-4-5 and CLI 2.1.214. The runner records the resolved model string per run, so worth confirming those resolve as expected before you commit to a 20-30 run batch.
    • Provenance is already partly built. The runner emits candidate hash, pinned SHA, a per-run bootstrap marker, and per-case outcomes. Your acceptance-criteria row 8 may be mostly satisfied already, so you might scope to the fixture and assertions.

    On sequencing: your fixture and deterministic assertions do not depend on merge, so Days 1-2 are safe to start now against the PR branch. I would hold the paid run batches until the integration point is confirmed.

  8. WODE25500 commented on Aug 24, 2026

    @WODE25500
    Contributor

    Adding on to the Superpowers integration: a systematic-debugging scenario pack for the existing SuperpowersEvaluator (the adapter from #134), alongside verification-before-completion. See PR #254 (refs #132).

    It adds three scenarios (reproduce-and-verify-before-done, failing-test-before-fix, fix-source-not-test-gamed) that judge mechanically-detectable process discipline, reusing the adapter's existing rule-based judge ops. Validated offline (16 unit tests); an opt-in real-harness smoke is documented but was not run here (no authenticated Claude CLI in the submitting env), so a reviewer with a working claude can produce the real evidence.

    Happy to coordinate if this overlaps with any planned scenario/eval packs (e.g. the GRC-resistance follow-on) — the focus here is debugging-process discipline, which I hope is complementary.

  9. axcelsyah commented on Aug 24, 2026

    @axcelsyah

    Hi! I noticed this issue and would love to help fix it. I'm currently analyzing the best approach and will open a PR soon.

  10. Yif-Yang commented on Sep 30, 2026

    @Yif-Yang
    ContributorAuthor

    #254 has now merged after official CI passed. It adds three deterministic systematic-debugging scenarios to the existing adapter and uses source snapshots to connect reproduction, edits, and verification. The focused three-file review passed 114 tests, including real POSIX shim checks; the earlier fixture integration failures were fixed.

    This demonstrates a new offline testing capability for mechanically checkable workflow behavior. We did not run a paid model comparison and make no claim of improved agent efficiency or root-cause understanding. The broader matched baseline/candidate experiments discussed here remain separate, so this issue stays open.

  11. Yif-Yang commented on Oct 7, 2026

    @Yif-Yang
    ContributorAuthor

    #307 has now been reviewed at ce4e6f7c5629e4a15bb4032ab0f7064151a2fd81 and is not ready to merge. It adds candidate-selection and reporting orchestration around the existing Superpowers adapter and paired evalkit. The current live path does not retain all paired raw evidence, and its report can label variation between runs of an unchanged skill as a candidate improvement. The mixed-error validation contract also needs to be aligned.

    The focused existing tests pass (150 tests plus 84 subtests); independent offline production-path checks reproduced the gaps. No paid model comparison was run, and there is no efficiency-uplift claim. The earlier #254 scenario capability remains separate. This broader issue stays open while the experiment path awaits author revisions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions