ADR-265: Make dev_team.py and dev-team.md work as a Claude Code plugin - #1
Merged
Merged
Conversation
- _find_repo_root() now walks up from os.getcwd() so it works when the
script is installed in a plugin directory separate from the consuming repo
- PLUGIN_ROOT global resolves agents/ and commands/ from the plugin install
dir; --plugin-root argument overrides it at runtime
- dev-team.md step 3 uses ${CLAUDE_PLUGIN_ROOT} substitution and passes
--plugin-root so the script knows where its agents and commands live
- plugin.json: removed commands/agents path fields that had invalid format
(paths must start with ./); auto-discovery handles the defaults correctly
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jodavis-claude
commented
Jun 1, 2026
jodavis-claude
left a comment
Collaborator
Author
There was a problem hiding this comment.
Test review body - verifying API works.
jodavis-claude
commented
Jun 1, 2026
jodavis-claude
left a comment
Collaborator
Author
There was a problem hiding this comment.
Test with line-based comments.
jodavis-claude
commented
Jun 1, 2026
jodavis-claude
left a comment
Collaborator
Author
There was a problem hiding this comment.
Review: ADR-265 Plugin Portability
Exit criteria verified:
- OK
_find_repo_root()walks up fromos.getcwd()(line 786) - OK
--plugin-rootaccepted and applied;PLUGIN_ROOTused for agent/command resolution incall_agent()(lines 1021-1022, 1240-1246) - OK
dev-team.mdstep 3 invokesdev_team.pywith${CLAUDE_PLUGIN_ROOT}substitution and passes--plugin-root ${CLAUDE_PLUGIN_ROOT}(line 61) - NEEDS VERIFICATION
plugin.jsonpresent but missingcommandsandagentsfields -- see inline comment
Deferred (acknowledged in task brief, not blocking this PR):
- Log path
REPO_ROOT/.claude/logs/dev-team(line 1059) differs from specREPO_ROOT/.claude/dev-team/logs-- explicitly deferred to Task 8 (ADR-237) - Manual installation, AdaptiveRemote cleanup, and end-to-end validation -- out of scope for code review
One Priority 1 issue requiring resolution before exit criterion 1 can be confirmed; one style note.
The prior implementation removed these fields on the assumption that Claude Code auto-discovers commands/ and agents/ directories. The reviewer correctly identified this as unverified against the plugins reference. Explicit declaration guarantees the plugin system registers the slash command and agent definitions regardless of auto-discovery behaviour.
Fixes missing newline at end of file on the /.claude/logs line.
jodavis-claude
commented
Jun 1, 2026
jodavis-claude
left a comment
Collaborator
Author
There was a problem hiding this comment.
Sign-off review: all prior review threads are resolved and no new issues were found in the modified files.
Threads resolved:
plugin.jsontest comment on closing brace — resolved (no action needed; JSON is syntactically valid).plugin.jsonmissingcommandsandagentsfields — resolved; commit 7a8c69f restores"commands": "./commands"and"agents": "./agents". Both directories exist with the expected files..gitignoremissing trailing newline — resolved; commit 450afbd adds the trailing newline.
Modified files scanned (7a8c69f, 450afbd): .claude-plugin/plugin.json, .gitignore. No new Priority 1–4 issues introduced.
Sign-off outcome: Approved. All review threads resolved, no new blocking issues.
jodavis-claude
marked this pull request as ready for review
June 1, 2026 23:04
jodavis
approved these changes
Jun 2, 2026
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.
Work item
ADR-265 — Make the minimal code changes to
dev_team.pyanddev-team.mdthat allow the pipeline to run as a Claude Code plugin, then install the plugin and cut AdaptiveRemote over to it by deleting its per-repo.claude/directories.Changes
scripts/dev_team.py— Addedimport os;_find_repo_root()now walks up fromos.getcwd()(instead of__file__) and checks for.git; addedPLUGIN_ROOTglobal defaulting to the parent of__file__;call_agent()resolves agent/command paths viaPLUGIN_ROOT; added--plugin-rootCLI argument that overridesPLUGIN_ROOTat startupcommands/dev-team.md— Step 3 command now invokes${CLAUDE_PLUGIN_ROOT}/scripts/dev_team.pyand passes--plugin-root ${CLAUDE_PLUGIN_ROOT}so the plugin system substitutes the absolute install path before Claude acts on the command.claude-plugin/plugin.json— Removed"commands": "commands"and"agents": "agents"path fields; per the Claude Code plugins reference these must start with./, and since they pointed to the same default auto-discovered directories, removal is equivalent and simplerDesign decisions
_find_repo_root()usesos.getcwd()not__file__: When installed as a plugin,__file__points into the plugin installation directory (~/.claude/plugins/dev-team/), not the consuming project.os.getcwd()is reliable because Claude Code invokes commands from the project root.--plugin-rootas a CLI argument, not an env var: Environment variable injection into Python subprocesses is not guaranteed in the plugin system. Passing${CLAUDE_PLUGIN_ROOT}as a CLI argument via the command file is the reliable path.plugin.jsonpath fields removed rather than corrected to./commands/./agents: Auto-discovery handles both directories with no manifest entry needed; explicit entries that mirror the defaults add noise without benefit.run_validate_script()continues to useREPO_ROOT: Validation scripts live in the consuming project'sscripts/dir, not the plugin — this function correctly uses the cwd-based root, notPLUGIN_ROOT.REPO_ROOT/.claude/dev-team/logsbut that change is deferred to Task 8 (ADR-237) and is out of scope here.