feat: restore companion skill loading to orch skills and commands - #218
Conversation
Commit d56f391 migrated companion loading from the router into guided skills but dropped it from ORCHESTRATED depth entirely. This restores always-on companion skills to all 5 orch skills and 10 commands, matching the guided skill lists exactly. File-type conditionals are not included at ORCH depth as agents load their own language skills. Companion loading is placed before Continuation Detection so no resume/re-validation/refinement path can bypass it.
… - Add cli-rules KNOWLEDGE.md entry to index - Update index version marker for reliability rule changes Co-Authored-By: Claude <noreply@anthropic.com>
|
[INLINE #1] Inconsistent Section Ordering in debug:orch (HIGH, 85% confidence) The "Load Companion Skills" section is placed after Worktree Support (line 25), but in For consistency, move the "Load Companion Skills" section to immediately after Iron Law and before any content sections (Worktree Support, etc.), matching the 3-of-5 majority pattern. Claude Code Attribution: This is a code review finding from automated review analysis. |
|
[INLINE #2] Inconsistent Section Ordering in plan:orch (HIGH, 85% confidence) The "Load Companion Skills" section is placed after Worktree Support, but in For consistency, move the "Load Companion Skills" section to immediately after Iron Law and before any content sections, matching the 3-of-5 majority pattern. Claude Code Attribution: This is a code review finding from automated review analysis. |
|
[BLOCKING] CLAUDE.md Ambient Mode Description Needs Update (HIGH, 85% confidence) File: CLAUDE.md, around line 46 Problem: CLAUDE.md states that the router "maps intent + depth to a guided skill (short, focused, loads companion skills) or an orch skill (full agent pipeline)". The parenthetical implies only guided skills load companions, but this PR restores companion skill loading to orch skills too. Impact: The primary project documentation now contradicts the implemented behavior. The new Fix: Update line 46 to: Claude Code Attribution: This is a code review finding from automated review analysis. |
Code Review SummaryIssues IdentifiedBLOCKING ISSUES (3):
SHOULD FIX ISSUES (2 - Medium confidence, 80-82%):
Review Scores
RecommendationAPPROVED_WITH_CONDITIONS — Merge after:
The core feature (restoring companion skill loading) is sound and complete — all 5 orch skills, 10 commands, and the skill catalog are consistent today. The issues are about structural standardization and test coverage to prevent future drift. Claude Code Attribution: Comprehensive review completed by automated devflow code review system. |
…e CLAUDE.md, add consistency test - Move Load Companion Skills before Worktree Support in debug:orch and plan:orch to match the majority pattern (Iron Law → Companions → rest) - Update CLAUDE.md ambient mode description to reflect orch companion loading - Add companion skill consistency test validating catalog/orch/command parity
|
File: Missing error handling for teams variant file reads The test calls This contrasts with the pattern at line 992-996 which wraps teams file reads in try/catch. Fix: Wrap the readFileSync in try/catch, consistent with the existing pattern: for (const cmdRelPath of intentCommandMap[intent]) {
const cmdPath = path.join(ROOT, cmdRelPath);
let cmdContent: string;
try {
cmdContent = readFileSync(cmdPath, 'utf-8');
} catch {
continue; // teams variant may not exist
}
const cmdSkills = parseCompanionLine(cmdContent);
expect(cmdSkills, `${cmdRelPath} companions must match catalog for ${intent}`).toEqual(expectedSkills);
} |
|
File: Incomplete orch skill ordering standardization The PR's stated goal is to standardize section ordering so "Load Companion Skills" comes before "Worktree Support." This was successfully applied to The commit message claims "standardize orch skill ordering" but the standardization is incomplete. Fix: Move the "Worktree Support" section to line 25 (right after "Load Companion Skills"), matching the pattern in |
Code Review SummaryReviewers: Architecture, Consistency, Reliability, Testing Blocking Issues (≥80% confidence)1. Incomplete Orch Skill Ordering StandardizationFiles: The PR's stated goal is to standardize section ordering so "Load Companion Skills" comes before "Worktree Support." This was successfully applied to
The new test validates companion skill names but not section ordering, so future reordering drift would go undetected. Action: Move Worktree Support to immediately after Load Companion Skills in all orch skills for consistency. 2. Missing Error Handling for Teams Variant File ReadsFile: The test calls This contrasts with the pattern at line 992-996 which wraps teams variant reads in try/catch. Action: Wrap readFileSync in try/catch block (see inline comment with fix). 3. Test Validates Content But Not Section OrderingFile: The new test validates that companion skill names match the catalog across orch skills and commands — good coverage. However, the PR's main change was about section ordering (Load Companion Skills before Worktree Support), and the test does not verify that constraint. A future change could reorder sections incorrectly and the test would still pass. Action: Add lightweight ordering assertion for orch skills containing both sections. Pre-Existing Issues (Informational)
Lower-Confidence Suggestions (60-79%)
SummaryScores: Architecture 8/10 | Consistency 7/10 | Reliability 8/10 | Testing 8/10 The core architectural pattern is sound: companion skill loading sections restored with a catalog as single source of truth, backed by a consistency test. However, the "standardization" of section ordering is incomplete across the five orch skills, and the test doesn't enforce the ordering that this PR is specifically about. Fixing the Recommendation: CHANGES_REQUESTED (3 MEDIUM issues at ≥80% confidence) |
…Wrap command-file readFileSync in try/catch so missing teams variants skip gracefully (matching existing pattern at line 992-996) rather than throwing an uncaught ENOENT - Add ordering assertion: Load Companion Skills must precede Worktree Support in each orch skill that contains both sections, locking the invariant introduced by this PR against future regressions Co-Authored-By: Claude <noreply@anthropic.com>
…ase:orch Move the Worktree Support section in both skills to immediately after Load Companion Skills, matching the pattern established in debug:orch and plan:orch (Iron Law, Load Companion Skills, Worktree Support, phases). Previously implement:orch had Worktree Support buried between Phase 3 and Phase 4, and release:orch had it after Phase 7 near end of file. Co-Authored-By: Claude <noreply@anthropic.com>
…ons The ordering test silently skipped validation when a section was missing via an if-guard. Replace with explicit toBeGreaterThanOrEqual(0) assertions so missing sections produce clear failures instead of passing silently.
…nce The skill catalog is a cross-cutting reference doc, not router-specific. Move it alongside the other reference docs and update the test path.
Restore companion skill loading mechanism to all orch skills and orchestration commands.
Summary
Re-enable the companion skill loading infrastructure that was previously disabled. This restores the ability for orchestration skills to automatically load specialized companion skills during execution, improving code organization and reducing boilerplate in command implementations.
Changes
Testing
Related Issues
Completes restoration of skill composition patterns after recent refactoring.
Co-Authored-By: Claude noreply@anthropic.com