Skip to content

Add GitHub Copilot CLI integration - #409

Merged
backnotprop merged 9 commits into
backnotprop:mainfrom
Yecats:main
Mar 27, 2026
Merged

backnotprop merged 9 commits into
backnotprop:mainfrom
Yecats:main

Conversation

@Yecats

@Yecats Yecats commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

Adds support for the GitHub Copilot CLI plugin, enabling plan review, code review, and markdown annotation
workflows directly from the CLI.

Includes:

  • Copilot CLI plugin with hooks integration
  • Plan review UI integration
  • Code review support
  • Annotation capabilities

Yecats and others added 9 commits March 23, 2026 16:09
Add full Copilot CLI support via a new plugin (apps/copilot/) with:
- preToolUse hook intercepting exit_plan_mode for plan review
- copilot-plan subcommand with correct permissionDecision output format
- copilot-last subcommand parsing events.jsonl for last message annotation
- Copilot CLI session parser (copilot-session.ts)
- Plugin manifest, hooks.json, and slash commands
- UI origin branding (blue badge for Copilot CLI)
- Marketplace entry for plugin discovery
- README install section

Key design decisions:
- Intercepts exit_plan_mode (not create) to avoid double-review
- Uses sessionId (with fallback) to locate plan.md from session state
- Follows Codex integration pattern: same CLI binary, new plugin dir

Co-authored-by: Copilot <[email protected]>
The Copilot CLI hook input uses { toolCalls: [{ name, args }] } format
instead of the documented { toolName, toolArgs } format. The filter was
checking event.toolName (always undefined), causing exit_plan_mode to
pass through unintercepted. Now extracts tool name from either format.

Co-authored-by: Copilot <[email protected]>
The hook subprocess inherits the PATH from when Copilot CLI was started,
which may not include the plannotator binary directory. Using the full
absolute path via env vars ensures the hook always finds the binary.

Co-authored-by: Copilot <[email protected]>
.claude-plugin/marketplace.json is for Claude Code's plugin marketplace.
The Copilot CLI plugin has its own install path and doesn't belong here.

Co-authored-by: Copilot <[email protected]>
- Add .github/plugin/marketplace.json for Copilot CLI plugin discovery
- Change allowed-tools from Bash() to shell() syntax in commands
- Respect COPILOT_HOME env var in session path discovery
- Update plugin.json version to 0.14.5

Co-authored-by: Copilot <[email protected]>
@backnotprop

Copy link
Copy Markdown
Owner

@Yecats code looks great/clean.

I will merge and test out myself. In the next release I will announce and version bump across the new files.

@backnotprop
backnotprop merged commit 15af1c4 into backnotprop:main Mar 27, 2026
5 checks passed
stk-code pushed a commit to stk-code/plannotator that referenced this pull request Mar 31, 2026
* feat: add GitHub Copilot CLI integration

Add full Copilot CLI support via a new plugin (apps/copilot/) with:
- preToolUse hook intercepting exit_plan_mode for plan review
- copilot-plan subcommand with correct permissionDecision output format
- copilot-last subcommand parsing events.jsonl for last message annotation
- Copilot CLI session parser (copilot-session.ts)
- Plugin manifest, hooks.json, and slash commands
- UI origin branding (blue badge for Copilot CLI)
- Marketplace entry for plugin discovery
- README install section

Key design decisions:
- Intercepts exit_plan_mode (not create) to avoid double-review
- Uses sessionId (with fallback) to locate plan.md from session state
- Follows Codex integration pattern: same CLI binary, new plugin dir

Co-authored-by: Copilot <[email protected]>

* fix: handle actual Copilot CLI preToolUse input format (toolCalls array)

The Copilot CLI hook input uses { toolCalls: [{ name, args }] } format
instead of the documented { toolName, toolArgs } format. The filter was
checking event.toolName (always undefined), causing exit_plan_mode to
pass through unintercepted. Now extracts tool name from either format.

Co-authored-by: Copilot <[email protected]>

* Revert "fix: handle actual Copilot CLI preToolUse input format (toolCalls array)"

This reverts commit b214bc0.

* fix: use absolute path in hooks.json for reliable binary discovery

The hook subprocess inherits the PATH from when Copilot CLI was started,
which may not include the plannotator binary directory. Using the full
absolute path via env vars ensures the hook always finds the binary.

Co-authored-by: Copilot <[email protected]>

* Finishing the feature

* fix: remove Copilot CLI plugin from Claude Code marketplace.json

.claude-plugin/marketplace.json is for Claude Code's plugin marketplace.
The Copilot CLI plugin has its own install path and doesn't belong here.

Co-authored-by: Copilot <[email protected]>

* fix: align Copilot CLI plugin with official spec

- Add .github/plugin/marketplace.json for Copilot CLI plugin discovery
- Change allowed-tools from Bash() to shell() syntax in commands
- Respect COPILOT_HOME env var in session path discovery
- Update plugin.json version to 0.14.5

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Yecats <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: stahaff <[email protected]>
@backnotprop

Copy link
Copy Markdown
Owner

@Yecats

We're building Plannotator Workspaces, where agent plans, specs, and reviews can be collaborated on and distilled into standards and rules. Your annotations and reviews compound into a golden ruleset planning and review agents can use, and CI/CD can verify against.

Joining the waitlist gets you lifetime free access as an early contributor. https://plannotator.ai/workspaces/. Check the OSS contributor box.

The OSS core isn't changing: same free and open source plugin, always.

Thanks for #409.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants