Skip to content

feat: add GitHub Copilot CLI as a supported host#1044

Open
sumitgogia wants to merge 2 commits intogarrytan:mainfrom
sumitgogia:feat/copilot-cli-host
Open

feat: add GitHub Copilot CLI as a supported host#1044
sumitgogia wants to merge 2 commits intogarrytan:mainfrom
sumitgogia:feat/copilot-cli-host

Conversation

@sumitgogia
Copy link
Copy Markdown

Summary

Adds GitHub Copilot CLI as gstack's 11th supported host.

What's included

  • hosts/copilot-cli.ts — Declarative host config following the pattern in ADDING_A_HOST.md
  • hosts/index.ts — Registration in the host registry
  • .gitignore — Added .copilot-cli/ for generated skill docs
  • test/host-config.test.ts — Bumped host count assertion (10→11)

Design decisions

Tool rewrites — Copilot CLI uses different tool names than Claude Code:

Claude Code Copilot CLI
Read view
Write create
Edit edit
Bash bash
Agent task
AskUserQuestion ask_user
WebSearch web_fetch
Grep grep
Glob glob

Path rewrites:

  • .claude/skills/gstack.copilot-cli/skills/gstack
  • CLAUDE.mdAGENTS.md (Copilot CLI reads AGENTS.md as custom instructions)

Suppressed resolvers:

  • CODEX_SECOND_OPINION, CODEX_PLAN_REVIEW — Codex-specific
  • GBRAIN_CONTEXT_LOAD, GBRAIN_SAVE_RESULTS — Not available

Kept resolvers:

  • REVIEW_ARMY, ADVERSARIAL_STEP, DESIGN_OUTSIDE_VOICES — these map to Copilot CLI's task tool which supports parallel sub-agent dispatch (similar to Claude's Agent tool)

Detection: cliCommand: 'gh' with alias 'copilot'. The GitHub CLI (gh) hosts the Copilot CLI extension.

Boundary instruction: Prevents the agent from reading .claude/ or .agents/ directories.

Verification

$ bun run scripts/host-config-export.ts validate
All 11 configs valid

$ bun run gen:skill-docs --host copilot-cli
36 skills generated (0 errors)

$ bun test test/host-config.test.ts
73 pass, 0 fail

$ bun test test/gen-skill-docs.test.ts
355 pass, 0 fail

Context

I use GitHub Copilot CLI as my primary AI coding agent. gstack's methodology (especially /review, /office-hours, /cso) is exactly what's missing from my workflow. The generated skill docs work as reference documents that the agent reads on demand via its view tool.

TODO (follow-up PRs)

  • Add copilot-cli detection to setup script (gh copilot --version check)
  • Add install section to README.md
  • Test with actual Copilot CLI sessions to refine tool rewrites

sumitgogia and others added 2 commits April 17, 2026 16:42
Add hosts/copilot-cli.ts with tool rewrites mapping Claude Code tools to
Copilot CLI equivalents (view, create, edit, bash, grep, glob, task, ask_user,
web_fetch). Path rewrites translate .claude/skills → .copilot-cli/skills and
CLAUDE.md → AGENTS.md.

Suppressed resolvers: CODEX_SECOND_OPINION, CODEX_PLAN_REVIEW (Codex-specific),
GBRAIN_CONTEXT_LOAD, GBRAIN_SAVE_RESULTS (not available). REVIEW_ARMY,
ADVERSARIAL_STEP, and DESIGN_OUTSIDE_VOICES are kept — they map to Copilot
CLI's task tool for parallel sub-agent dispatch.

Includes boundary instruction to prevent reading .claude/ skill definitions.

- Generation: bun run gen:skill-docs --host copilot-cli (36 skills)
- Detection: cliCommand 'gh' with alias 'copilot'
- Install path: ~/.copilot-cli/skills/gstack
- All 355 gen-skill-docs tests pass
- All 73 host-config tests pass (count bumped 10→11)

Co-authored-by: Copilot <[email protected]>
Copilot CLI discovers personal skills at ~/.copilot/skills/ and project
skills at .github/skills/ (not .copilot-cli/). Updated:

- globalRoot: .copilot-cli → .copilot (matches ~/.copilot/ config home)
- localSkillRoot: .copilot-cli → .github (native project skill path)
- hostSubdir: .copilot-cli → .copilot (build output dir)
- cliCommand: copilot is the actual binary (gh is an alias)
- All path rewrites and boundary instruction updated

Skills are now auto-discovered by /skills list without manual /skills add.

Co-authored-by: Copilot <[email protected]>
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.

1 participant