Refactor commands to thin wrappers invoking skills#46
Merged
Conversation
Validated design for extending spectacular to support multi-repo workflows: - Pure skills architecture (matching superpowers pattern) - Single spec + plan at workspace root with repo-tagged tasks - Per-repo worktrees, constitutions, and setup commands - Coordinated PR submission across repos
12 tasks across 4 phases: - Phase 1: Architecture refactor (parallel) - Convert commands to thin wrappers - Phase 2: Multi-repo core (parallel) - Add repo field, workspace detection - Phase 3: Execution updates (sequential) - Per-repo worktrees and setup - Phase 4: PR submission & polish (sequential) - Multi-repo finishing workflow Estimated: ~36h sequential, ~24h with parallelization (33% savings)
Architecture refactor following superpowers pattern: - Commands now invoke skills directly (5 lines each) - All orchestration logic moved to skills New skills: - validating-environment: Environment validation with multi-repo detection - executing-plan: Plan execution orchestration Updated skills: - writing-specs: Now includes full workflow (Run ID, worktree, brainstorm, spec, validation) - decomposing-tasks: Now includes full workflow (Run ID extraction, worktree context, plan generation) This is Phase 1 of multi-repo support implementation.
writing-specs skill: - Workspace detection (single-repo vs multi-repo) - Multi-repo skips worktree creation (specs at workspace root) - Multi-repo spec template with per-repo constitution references - Separate completion messages for each mode decomposing-tasks skill: - Multi-repo detection with repo listing - Tasks include repo: field in multi-repo mode - Cross-repo dependency analysis (different repos = independent) - Multi-repo plan template with per-repo breakdown - Report includes per-repo task/hours summary Backwards compatible: single-repo mode unchanged.
executing-plan skill: - Multi-repo workspace detection - Per-repo context passing to phase skills - Per-repo final report with branch stacks executing-parallel-phase skill: - Create worktrees in correct repo directory - Read setup commands from per-repo CLAUDE.md - Pass per-repo constitution to subagents - Per-repo cleanup and stacking executing-sequential-phase skill: - Switch repo context between tasks - Create per-repo main worktrees as needed - Per-repo setup command lookup - Per-repo stacking documentation All skills maintain backwards compatibility with single-repo mode.
CLAUDE.md: - Updated architecture section for pure skills pattern - Added comprehensive Multi-Repo Support section - Added workspace structure, plan format, execution behavior docs - Added multi-repo feature development workflow using-git-spice skill: - Added Multi-Repo Workflows section - Documented per-repo stacking limitation - Added phase-ordered PR submission guide - Added cross-repo dependency coordination validating-environment skill: - Enhanced per-repo validation (CLAUDE.md, setup commands, constitutions) - Creates workspace-level specs directory - Added multi-repo summary with per-repo status This completes Phase 4 of multi-repo support implementation.
Add test scenarios to verify multi-repo support implementation: - init/multi-repo-detection.md: Workspace mode detection - plan/multi-repo-task-format.md: Repo field in task format - execute/multi-repo-execution.md: Per-repo worktrees and setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refactored the spectacular plugin architecture to implement a pure skills-based design pattern. Commands are now thin wrappers (~5 lines) that invoke skills, with all orchestration logic moved into self-contained skill modules. This reduces cognitive load on users and improves maintainability.
Key Changes
init.md,plan.md,execute.md, andspec.mdnow simply invoke their corresponding skills rather than containing full implementation logicvalidating-environment- Environment validation (replaces init.md logic)decomposing-tasks- Plan generation (replaces plan.md logic)executing-plan- Execution orchestration (replaces execute.md logic)writing-specs- Spec generation (replaces spec.md logic)Implementation Details
.git/subdirs)repo:field for each taskBenefits