Refactor to native routing: skill-owned dispatch, consolidated meta-skills, openspec removal - #19
Open
cpliakas wants to merge 4 commits into
Open
Refactor to native routing: skill-owned dispatch, consolidated meta-skills, openspec removal#19cpliakas wants to merge 4 commits into
cpliakas wants to merge 4 commits into
Conversation
… grants Add .claude-plugin/plugin.json and hooks/hooks.json so the markdownlint PostToolUse hook actually registers and fires (previously the script existed but was never wired). Harden the hook script: discriminate lint findings (exit 1) from tool failures, escape output via jq, and mark truncation. Give every agent an explicit tools grant: advisory agents are read-only (Read, Glob, Grep) plus Skill so they can invoke the skills their bodies reference; Bash only where the body runs commands (engineering-manager). Codify the convention in CLAUDE.md and document the hook wiring in README. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AcZDonkHbahjy1SYuGHVye
…h-lead to judgment Invert routing ownership: /plan-implementation now reads the routing model from the Tech Lead's memory directly, matches specialists semantically, classifies the tier via the Signals Catalog, and dispatches all five target types itself (subagent/external-agent spawned in parallel, skills invoked, docs read, human questions surfaced). The Tech Lead is invoked exactly once, for judgment only: escalation flags, conflict resolution between specialists, constraints, and the recommended approach. This deletes the hand-parsed markdown contract between the two (the "Parseable Phase 1/2 Output Contracts") and every parse-failure path built around it. tech-lead.md drops from 782 to ~440 lines. Incident-analysis and retrospective consultation move to the same single-invocation pattern, and conduct-postmortem/facilitate-retrospective/onboard gain the Agent, Write, and Skill grants their bodies already required. Remove routing-outcome capture outright rather than closing the loop: an auto-tuning registry would violate the plugin's advise-never-mandate stance, and the write-only log had no feedback path. Deletes the Routing Value grading rubric, the Routing Outcomes memory log, and /audit-routing-quality. BREAKING CHANGE: tech-lead no longer emits consultation-request output; callers that drove the two-phase protocol manually must use /plan-implementation. /audit-routing-quality is removed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016myji5spWpb6qwqUQesXCr
Merge /re-onboard into /onboard as a --check-drift mode (same diff pass, same confirm-before-write flow; an optional agent name scopes the check). Fold /audit-routing-table's structural checks into /audit-agent-memory as a tech-lead-only section, with the legacy-format MIGRATION.md ported alongside. Remove the openspec/ directory and every live reference to it — proposals no longer flow through openspec. BREAKING CHANGE: /re-onboard and /audit-routing-table are removed; use /onboard --check-drift and /audit-agent-memory tech-lead. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016myji5spWpb6qwqUQesXCr
…view findings The target-type registry format introduced by the routing refactor was not understood by every consumer: the onboard drift check could flag valid human/skill/external-agent registrations as drifted and batch-delete them, and audit-agent-memory's routing checks reported permanent false broken pointers for them. Both now parse the target-type suffix and scope file checks to subagent and doc entries. Also: plan-implementation falls back to .claude/agents/ for agent files (the default path only matched this plugin's own repo) and no longer claims an unreadable file makes a specialist undispatchable; unknown target types are excluded with a loud warning instead of coerced to subagent; add-specialist discovers agents in both directories; write-convention spawns the domain owner directly instead of emitting a consultation request nothing consumes; agent bodies search with Glob/Grep directly instead of delegating to the Explore subagent (subagents cannot nest); the markdownlint hook surfaces tool failures (exit >= 2) instead of silently disabling linting; drift-check messages never name onboarding skills that do not ship; dispatch semantics are documented once in plan-implementation Step 4 with README and add-specialist summarizing it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016myji5spWpb6qwqUQesXCr
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
Restructures the plugin around Claude Code's native mechanisms, removing the hand-rolled orchestration machinery while keeping the advisory-agent premise intact. Net effect excluding the openspec removal: 35 files, +1,214/−1,935.
1. Plugin hook infrastructure + explicit tool grants (
1227592).claude-plugin/plugin.jsonandhooks/hooks.jsonso the markdownlintPostToolUsehook actually registers and fires (the script existed but was never wired).toolsgrant: advisory agents getRead, Glob, Grep, Skill(theskills:frontmatter only preloads content — theSkilltool is what allows invocation);Bashonly where the body runs commands. Codified in CLAUDE.md.2. Routing inversion (
010da7d) — breaking/plan-implementationnow owns all mechanical routing: it reads the Tech Lead's registry directly, matches specialists semantically, classifies the tier via the Signals Catalog, and dispatches all five target types itself (subagent/external-agent spawned in parallel, skills invoked, docs read, human questions surfaced as open items).chief-architect), conflict resolution between specialists, constraints, and the recommended approach.tech-lead.mddrops from 782 to ~440 lines./audit-routing-qualityis deleted with it.3. Consolidation + openspec removal (
fc6b95b) — breaking/re-onboardmerges into/onboard --check-drift(same diff pass, same confirm-before-write flow, optional agent-name scoping)./audit-routing-table's structural checks fold into/audit-agent-memoryas a tech-lead-only section; the legacy-formatMIGRATION.mdmoves alongside.openspec/is removed along with every live reference — proposals no longer flow through openspec.4. Review-gate fixes (
d17877b)Cross-cutting fixes from the final adversarial review, dominated by one theme: the target-type registry format wasn't understood by every consumer. The drift check and the audit checks are now target-type aware (previously the drift check could batch-delete valid
human/skill/external-agentregistrations), agent-file resolution falls back to.claude/agents/for consuming projects, unknown target types warn-and-exclude instead of coercing tosubagent,write-conventionspawns the domain owner directly, and agent bodies search with Glob/Grep instead of delegating to a subagent they cannot spawn.Breaking changes
tech-leadno longer emits consultation-request output; callers that drove the two-phase protocol manually must use/plan-implementation./audit-routing-quality,/re-onboard(→/onboard --check-drift),/audit-routing-table(→/audit-agent-memory tech-lead).Review process
Each batch ran through an explore → implement → review → fix → test workflow (Opus adversarial review of the staged diff) followed by an independent
/code-review highgate; all findings from both layers were addressed before each commit.After merge
v0.14.0per the repo's versioning convention.🤖 Generated with Claude Code
https://claude.ai/code/session_016myji5spWpb6qwqUQesXCr