refactor(agent-cli): scan /opt/plugins dynamically + verify Skill tool chain#8375
Merged
HydraOps-T-rav merged 1 commit intomainfrom Apr 21, 2026
Merged
refactor(agent-cli): scan /opt/plugins dynamically + verify Skill tool chain#8375HydraOps-T-rav merged 1 commit intomainfrom
HydraOps-T-rav merged 1 commit intomainfrom
Conversation
agent_cli._DOCKER_PLUGIN_DIRS hardcoded three plugin paths. Adding a new pre-cloned plugin in Dockerfile.agent-base required a parallel edit here that was easy to forget. Replace with a single _PRE_CLONED_PLUGIN_ROOT=/opt/plugins constant plus a dynamic scan. Also adds 6 unit tests locking in the flag-emission contract, and a Verification section in ADR-0043 documenting the host-mode probe that proved claude -p correctly invokes the Skill tool for discovered plugins. No signature changes to build_agent_command / build_lightweight_command. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 tasks
HydraOps-T-rav
added a commit
that referenced
this pull request
Apr 21, 2026
* docs(agents): 5 new avoided patterns + planner self-audit step Retrospective of PR #8374/#8375 surfaced five recurring anti-patterns that the plan review caught repeatedly. Document each in the canonical `docs/agents/avoided-patterns.md` (the sensor enricher and audit agents already read this file) and add a Planning-Steps self-audit reference so the planner phase catches them BEFORE emitting a plan. New patterns: - Underscore-prefixed names imported across modules - Writing a new test helper without checking conftest - logger.error(value) without a format string - Hardcoded path lists that duplicate filesystem state - _name for unused loop variables (prefer bare _) Catching these at plan-writing time prevents the agent-review-fix loop cost observed in PR #8374 (8 fix commits beyond the initial 8 task commits). * test(planner): bump truncation-test threshold for expanded planning-steps block Adding the new step 8 (self-audit against avoided-patterns.md) grew the planner prompt baseline by ~650 chars. The truncation test's `< 10_000` sanity bound was tight; bump to 11_000. Semantic is unchanged — "…(truncated)" marker assertion still verifies body truncation works and the prompt remains well under the original 20k body size. --------- Co-authored-by: T-rav-Hydra-Ops <t@koderex.dev>
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.
Follow-up to #8374. Two small improvements:
1. Dynamic scan of
/opt/plugins/*agent_cli._DOCKER_PLUGIN_DIRSwas a hardcoded tuple of three pre-cloned plugin paths. Adding a new plugin toDockerfile.agent-baserequired a parallel edit here — easy to forget. Replaced with a single_PRE_CLONED_PLUGIN_ROOT = Path("/opt/plugins")constant + dynamiciterdir()scan. No API changes.2. End-to-end verification of the Skill-tool chain
Probed the merged #8374 feature against real
claude -p:```
echo 'Use the Skill tool to invoke "superpowers:systematic-debugging"…'
| claude -p --output-format stream-json --verbose --permission-mode bypassPermissions …
```
Stream included
"tool_use","name":"Skill","input":{"skill":"superpowers:systematic-debugging"}— the Skill tool IS exposed in-pmode and routes to plugins discovered from~/.claude/plugins/cache/. Docker mode uses the same mechanism via host~/.claude/mount +CLAUDE_CONFIG_DIR. Documented in ADR-0043's new Verification section.Test plan
🤖 Generated with Claude Code