Goal
Integrate the obra/superpowers skills library (MIT, https://github.com/obra/superpowers) into SIN-Code as a top-level subcommand. Skills are cloned from upstream, pinned to a reviewed commit SHA, overlaid with SIN-Code tool mappings, and served as MCP tools.
Why
obra/superpowers is the de-facto standard for methodology skills (TDD, systematic-debugging, subagent-driven-development, verification-before-completion, writing-plans, brainstorming, requesting-code-review, finishing-a-development-branch, using-git-worktrees). Each skill enforces a workflow that maps directly onto SIN-Code's mandates: M3 (verify-before-completion → sin_preflight + verify_tests + prove), M6 (SIN tools over naive builtins), M7 (race-free agent loop).
Scope (already implemented on feat/v3.7.0-superpowers-integration)
- cmd/sin-code/internal/superpowers/superpowers.go — Install/Update/Pin + supply-chain lock (upstream.lock)
- cmd/sin-code/internal/superpowers/frontmatter.go — full YAML parser (>– and |– block scalars, indented continuations)
- cmd/sin-code/internal/superpowers/overlay.go — idempotent SIN-Code tool mapping (base + skill-specific)
- cmd/sin-code/internal/superpowers/mcpserver.go — minimal stdio MCP server, 3 tools (list/find/use)
- cmd/sin-code/internal/superpowers/prompt.go — Superpowers prompt block injection into AGENTS.md
- cmd/sin-code/superpowers_cmd.go — CLI: install, update [--yes], pin , list, show, find, serve, init, doctor
- cmd/sin-code/internal/superpowers/superpowers_test.go — tests including local-fixture pinning test (no network)
Design decisions
- Overlay instead of fork: upstream skills stay pristine; the SIN-Code mapping is appended in a marked block.
git pull never breaks the integration.
- Pinned SHA:
sin-code superpowers install records the current upstream HEAD in upstream.lock. sin-code superpowers update requires update --yes after showing the diff. The 12-factor 'review before trust' principle applied to skill content (which flows into agent context).
- Idempotent everywhere: install, init, RegisterMCP are all re-runnable without corruption.
- Test-only stdlib: no CGo, no external deps (consistent with M2).
Definition of done
- All 8 files present, race-clean under -count=3
- Coverage ≥80% on the new files
sin-code superpowers install clones obra/superpowers, writes the lock, applies overlays, registers in mcp.json
sin-code superpowers find 'fix the failing test' returns the relevant skill
sin-code superpowers update shows the diff before applying
sin-code mcp status shows the superpowers server as up with 3 tools
Cross-refs
Goal
Integrate the obra/superpowers skills library (MIT, https://github.com/obra/superpowers) into SIN-Code as a top-level subcommand. Skills are cloned from upstream, pinned to a reviewed commit SHA, overlaid with SIN-Code tool mappings, and served as MCP tools.
Why
obra/superpowers is the de-facto standard for methodology skills (TDD, systematic-debugging, subagent-driven-development, verification-before-completion, writing-plans, brainstorming, requesting-code-review, finishing-a-development-branch, using-git-worktrees). Each skill enforces a workflow that maps directly onto SIN-Code's mandates: M3 (verify-before-completion → sin_preflight + verify_tests + prove), M6 (SIN tools over naive builtins), M7 (race-free agent loop).
Scope (already implemented on feat/v3.7.0-superpowers-integration)
Design decisions
git pullnever breaks the integration.sin-code superpowers installrecords the current upstream HEAD inupstream.lock.sin-code superpowers updaterequiresupdate --yesafter showing the diff. The 12-factor 'review before trust' principle applied to skill content (which flows into agent context).Definition of done
sin-code superpowers installclones obra/superpowers, writes the lock, applies overlays, registers in mcp.jsonsin-code superpowers find 'fix the failing test'returns the relevant skillsin-code superpowers updateshows the diff before applyingsin-code mcp statusshows the superpowers server as up with 3 toolsCross-refs