Repository navigation
feat(cli): add --project scope to dirctl install/uninstall - #1894
Merged
Merged
Conversation
akijakya
force-pushed
the
feat/dirctl-install-project-scope
branch
from
July 27, 2026 08:36
23b7577 to
c8c31e4
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds a project-scoped install/uninstall mode to dirctl install / dirctl uninstall via a new --project flag, allowing MCP entries and Agent Skills to be written into the current working directory repo (instead of user/global config) while keeping default behavior unchanged.
Changes:
- Thread a new
agentcfg.Scope(Global/Project) throughagentcfgengines,agentinstall, andcli/cmd/install, adding project-path support to MCP and skill targets. - Add per-agent project config resolvers (where documented) and make missing project locations skip-with-note rather than error.
- Document
--projectin the CLI reference and scenarios docs (plus add internal spec/plan docs).
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/superpowers/specs/2026-07-21-dirctl-install-project-scope-design.md | Design spec for project-scope install/uninstall behavior. |
| docs/superpowers/plans/2026-07-21-dirctl-install-project-scope.md | Implementation plan outlining scope threading and tests/docs. |
| docs/content/dir/dir-features-scenarios.md | Adds --project usage example and clarifies scope behavior. |
| docs/content/dir/dir-cli-reference.md | Documents --project flag and project-scope behavior/examples. |
| cli/internal/agentcfg/types.go | Introduces Scope; extends MCPTarget with ProjectConfigPath. |
| cli/internal/agentcfg/skill_path.go | Makes skill path display scope-aware; replaces global fallback semantics. |
| cli/internal/agentcfg/skill_engine.go | Threads Scope through skill install/remove and removes fallback behavior. |
| cli/internal/agentcfg/skill_engine_test.go | Updates tests for explicit scope behavior + project-scope cases. |
| cli/internal/agentcfg/mcp_engine.go | Adds scoped MCP path resolution + display helper; threads Scope. |
| cli/internal/agentcfg/mcp_engine_test.go | Updates MCP tests for scope and adds project-scope coverage. |
| cli/internal/agentcfg/mcp_remove_test.go | Updates RemoveMCP calls for new scoped signature. |
| cli/internal/agentcfg/result.go | Adds a helper for consistent skip outcomes on missing scope location. |
| cli/internal/agentcfg/paths.go | Adds project MCP/skill path resolvers for supported agents. |
| cli/internal/agentcfg/registry.go | Wires per-agent project MCP/skill resolvers into the registry. |
| cli/internal/agentcfg/registry_test.go | Updates registry path resolution test for new signature. |
| cli/internal/agentinstall/apply.go | Threads scope through orchestrator install/uninstall flows. |
| cli/internal/agentinstall/apply_test.go | Updates call sites; adds a project-scope integration-style test. |
| cli/cmd/install/options.go | Adds project flag to shared install options. |
| cli/cmd/install/flags.go | Registers --project; adds scopeFromOpts() + scope printing helper. |
| cli/cmd/install/install.go | Introduces shared runApplyCmd and threads scope into apply/plan. |
| cli/cmd/install/uninstall.go | Refactors uninstall to reuse shared apply flow. |
| cli/cmd/install/batch.go | Threads scope through batch apply path and plan/summary generation. |
| cli/cmd/install/list.go | Makes install list scope-aware for displayed MCP/skill paths. |
| cli/cmd/install/install_test.go | Adds unit test coverage for scopeFromOpts(). |
| cli/cmd/init/agents.go | Pins dirctl init to global scope explicitly for install/uninstall. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Signed-off-by: András Jáky <[email protected]>
Signed-off-by: András Jáky <[email protected]>
akijakya
force-pushed
the
feat/dirctl-install-project-scope
branch
from
July 27, 2026 10:53
c8c31e4 to
1e8d8c3
Compare
csirmazbendeguz
approved these changes
Jul 27, 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.
Summary
Adds a
--projectflag todirctl install/install uninstall(and the top-leveldirctl uninstall) that writes a record's artifacts into the current repository instead of the user's global config. Default behavior is unchanged (global).Which artifacts get installed is still derived from the record's OASF modules;
--projectonly changes where they land (e.g..cursor/mcp.json,.vscode/mcp.json,.mcp.json,.cursor/skills/…).Changes
agentcfg: newScope(Global/Project) andMCPTarget.ProjectConfigPath; scope-aware skill + MCP path resolution. An agent with no location for the chosen scope is skipped with a note (ErrNoScopePath→ActionSkipped), replacing the old implicit global→project skill fallback.agentinstall: scope threaded throughInstall/Uninstall.--projecton all install/uninstall entry points, a "Scope: project" banner in the plan/summary, andinstall list --project;dirctl initis pinned to global scope.--projectdocumented in the CLI reference and features guide.Behavior notes
--projectnever writes for an agent the user doesn't have.skippedrather than silently writing a project file.Testing
go build,go vet,go test ./...(cli module) all pass;task lint:goreports 0 issues. New unit tests cover project-scope skill/MCP install, no-project-path skip, orchestrator scope, and the--project→scope mapping. Manually smoke-testeddirctl install list --project.Closes #1855