Skip to content

refactor(sa-implement): make consensus spawning self-contained & host-neutral #17

Description

@sh1ningwang

Background

sa-implement is meant to be a self-contained, host-neutral skill (OpenCode / Codex / Claude
Code alike). In practice its consensus protocol (SKILL.md §3) depended on the host having the
consensus role agents pre-registered as namespaced agent types (auto:solver-minimal, etc.) —
which only existed because a separate Claude-Code plugin (auto) registered them. A plain
install of the skill (no plugin) could not run the design/review consensus: no agents to spawn.

Purpose

Make the consensus genuinely self-contained and host-neutral: role definitions ship inside the
skill as agents/<role>.md and are spawned by reading those files and injecting them into
whatever generic subagent primitive the host provides — zero dependency on any plugin,
marketplace, or pre-registered/namespaced agent type.

Implementation Specification

  • SKILL.md §3: replace "spawn by host convention / auto:-scoped name" with a self-contained,
    host-neutral spawn contract (read $AUTO_HOME/agents/<role>.md; dispatch one isolated generic
    subagent with the role body + brief; enforce the role's tools: line via the brief).
  • agents/*.md (12): drop Claude-specific framing ("Native Claude subagent", "Agent tool") and
    the auto:-namespaced names; keep the tools: contract + role brief.
  • references/, templates/, code comments: clean leftover auto:write-documentation refs, the old
    /auto:sa-* command names in issue templates, and two comments describing the old plugin spawn
    model. Preserve the real auto: labels.

Affected Files

SKILL.md, all agents/*.md, references/architecture.md, references/conventions.md, templates/CLAUDE.md,
templates/.github/ISSUE_TEMPLATE/{bug,feature}.yml, bin/auto-preflight.sh, lib/roles.sh, lib/gitleaks.sh.

Verification Checklist

  • No residual Native Claude / Agent tool / auto:<agent> / /auto:sa-* refs (labels kept).
  • With no plugin installed, a generic subagent reading a bundled role file produces a correct conclusion.
  • All shells parse; role files keep valid frontmatter + tools:.

Definition of Done

  • Consensus runs with zero dependency on a host plugin or agent registry; verified by spawning a
    role from its bundled markdown into a generic subagent.

Activity

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

Metadata

Metadata

Assignees

Labels

priority:P2Normal. Default priority.type:refactorInternal restructuring; no functional change.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions