Skip to content

Pipeline Plan 203

ezigus edited this page Mar 20, 2026 · 3 revisions

Plan created at docs/plan-issue-203.md. Here's the summary:

Plan Overview

Approach: Extract sw-recruit.sh (2644 lines) into 4 new modules + thin orchestrator, preserving the exact CLI interface so all callers remain unchanged.

New Files

File Purpose ~Lines
sw-recruit-common.sh Shared infrastructure (DB paths, policy, helpers, builtin roles) 300
sw-role-manager.sh Role matching, creation, evolution (cmd_match, cmd_route, cmd_roles, cmd_evolve, etc.) 700
sw-team-composer.sh Team assembly, goal decomposition (cmd_team, cmd_decompose) 200
sw-config-validator.sh Schema validation, defaults, type checking (NEW functionality) 250

Key Decisions

  1. sw-recruit-common.sh prevents DRY violations — all modules source it for shared state
  2. Orchestrator pattern — sw-recruit.sh sources modules and routes commands; zero caller changes
  3. Config-validator adds new schema validation capabilities (validate_roles_db, validate_profiles_db, etc.) since the original had no structured validation

Residual in orchestrator (~850 lines)

Commands that don't fit the 3 modules stay: record-outcome, ingest-pipeline, self-tune, reflect, invent, mind, onboard, evaluate, promote, stats, audit, help

11 tasks covering extraction, testing (45 new unit tests + existing 25 integration tests pass unchanged), and verification of external callers.

Clone this wiki locally