Skip to content

feat: add Copilot CLI as 5th supported runtime#911

Open
shoootyou wants to merge 36 commits intogsd-build:mainfrom
shoootyou:feat/copilot-install
Open

feat: add Copilot CLI as 5th supported runtime#911
shoootyou wants to merge 36 commits intogsd-build:mainfrom
shoootyou:feat/copilot-install

Conversation

@shoootyou
Copy link

Summary

Adds GitHub Copilot CLI as the 5th supported runtime in the GSD installer alongside Claude Code, OpenCode, Gemini, and Codex.

What's included

Core Installer Plumbing

  • --copilot CLI flag and interactive prompt selection
  • Directory resolution: .github/ (local), ~/.copilot/ (global)
  • getDirName(), getGlobalDir(), getConfigDirFromHome() for Copilot

Content Conversion Engine

  • 31 commands → skills (.github/skills/gsd-*/SKILL.md)
  • 11 agents → .agent.md format (.github/agents/gsd-*.agent.md)
  • 13 tool name mappings (Read→read, Bash→execute, etc.)
  • 4 path replacement patterns with isGlobal support

Instructions & Lifecycle

  • copilot-instructions.md template with marker-based merge/strip
  • Full uninstall support, manifest hashing, patch persistence

Integration Testing

  • 104 Copilot-specific tests (15 E2E with SHA256 integrity checks)
  • 566 total tests passing

Bug Fixes

  • Local path mapping: isGlobal parameter across all converters
  • YAML argument-hint quoting via yamlQuote()

Files Changed

  • bin/install.js — All runtime support (~22 locations)
  • tests/copilot-install.test.cjs — 104 tests
  • get-shit-done/templates/copilot-instructions.md — Instructions template

Stats

  • 33 commits, 42 files, +10,425/-29 lines
  • All 566 tests passing

@shoootyou shoootyou requested a review from glittercowboy as a code owner March 3, 2026 18:13
shoootyou and others added 29 commits March 3, 2026 19:16
Research for adding GitHub Copilot CLI as 5th runtime to installer.

Files:
- STACK.md: Zero new deps, Copilot reads from .github/, tool name mapping
- FEATURES.md: 18 table stakes, 4 differentiators, 6 anti-features
- ARCHITECTURE.md: Codex-parallel pattern, 5 new functions, 12 existing changes
- PITFALLS.md: 10 pitfalls with prevention strategies and phase mapping
- SUMMARY.md: Synthesized findings, 4-phase roadmap suggestion
- Add --copilot flag parsing and selectedRuntimes integration
- Add 'copilot' to --all array (5 runtimes)
- getDirName('copilot') returns '.github' (local path)
- getGlobalDir('copilot') returns ~/.copilot with COPILOT_CONFIG_DIR override
- getConfigDirFromHome handles copilot for both local/global
- Banner and help text updated to include Copilot
- promptRuntime: Copilot as option 5, All renumbered to option 6
- install(): isCopilot variable, runtimeLabel, skip hooks (Codex pattern)
- install(): Copilot early return before hooks/settings configuration
- finishInstall(): Copilot program name and /gsd-new-project command
- uninstall(): Copilot runtime label and isCopilot variable
- GSD_TEST_MODE exports: getDirName, getGlobalDir, getConfigDirFromHome
- 19 tests covering getDirName, getGlobalDir, getConfigDirFromHome
- getGlobalDir: default path, explicit dir, COPILOT_CONFIG_DIR env var, priority
- Source code integration checks for CLI-01 through CLI-06
- Verifies --both flag unchanged, hooks skipped, prompt options correct
- All 481 tests pass (19 new + 462 existing, no regressions)
- Mark Phase 1 and Plan 01-01 as complete in ROADMAP.md
- All 6 requirements (CLI-01 through CLI-06) fulfilled
- Add claudeToCopilotTools constant (13 Claude→Copilot tool mappings)
- Add convertCopilotToolName() with mcp__context7__ wildcard handling
- Add convertClaudeToCopilotContent() for CONV-06 (4 path patterns) + CONV-07 (gsd:→gsd-)
- Add convertClaudeCommandToCopilotSkill() for skill frontmatter transformation
- Add convertClaudeAgentToCopilotAgent() with tool dedup and JSON array format
- Export all new functions + constant via GSD_TEST_MODE
- Add copyCommandsAsCopilotSkills() for folder-per-skill structure
- Add isCopilot branch in install() skill copy section
- Add isCopilot branch in agent loop with .agent.md rename
- Skip generic path replacement for Copilot (converter handles it)
- Add isCopilot branch in copyWithPathReplacement for .md files
- Add .cjs/.js content transformation for CONV-06/CONV-07
- Export copyCommandsAsCopilotSkills via GSD_TEST_MODE
- CONV-09 not generated (discarded), CONV-10 confirmed working
- Create 02-01-SUMMARY.md with execution results
- Update STATE.md with Phase 2 position and decisions
- Mark CONV-01 through CONV-10 requirements complete
- 16 tests for convertCopilotToolName (all 12 direct mappings, mcp prefix, wildcard, unknown fallback, constant size)
- 8 tests for convertClaudeToCopilotContent (4 path patterns, gsd: conversion, mixed content, no double-replace, passthrough)
- 7 tests for convertClaudeCommandToCopilotSkill (all fields, missing optional fields, CONV-06/07, no frontmatter, agent field)
- 7 tests for convertClaudeAgentToCopilotAgent (dedup, JSON array, field preservation, mcp tools, no tools, CONV-06/07, no frontmatter)
…onversion

- copyCommandsAsCopilotSkills produces 31 skill folders with SKILL.md files
- Skill content verified: comma-separated allowed-tools, no YAML multiline, CONV-06/07 applied
- Old skill directories cleaned up on re-run
- gsd-executor agent: 6 tools → 4 after dedup (Write+Edit→edit, Grep+Glob→search)
- gsd-phase-researcher: mcp__context7__* wildcard → io.github.upstash/context7/*
- All 11 agents convert without error, all have frontmatter and tools
- Engine .md and .cjs files: no ~/.claude/ or gsd: references after conversion
- Full suite: 527 tests pass, zero regressions
- SUMMARY: 46 new tests covering all conversion functions
- STATE: Phase 02 complete, 3/3 plans done
- ROADMAP: Phase 02 marked complete
- Create get-shit-done/templates/copilot-instructions.md with 5 GSD instructions
- Add GSD_COPILOT_INSTRUCTIONS_MARKER and GSD_COPILOT_INSTRUCTIONS_CLOSE_MARKER constants
- Add mergeCopilotInstructions() with 3-case merge (create, replace, append)
- Add stripGsdFromCopilotInstructions() with null-return for GSD-only content
- Wire mergeCopilotInstructions() into install() before Copilot early return
- Add else-if isCopilot uninstall branch: remove skills/gsd-*/ + clean instructions
- Fix writeManifest() to hash Copilot skills: (isCodex || isCopilot)
- Fix reportLocalPatches() to show /gsd-reapply-patches for Copilot
- Export new functions and constants in GSD_TEST_MODE
- All 527 existing tests pass with zero regressions
- Create 03-01-SUMMARY.md with execution results
- Update STATE.md: Phase 3 Plan 1 position, decisions, session
- Update ROADMAP.md: Phase 03 progress (1/2 plans)
- Mark INST-01, INST-02, LIFE-01, LIFE-02, LIFE-03 complete
…FromCopilotInstructions

- 10 new tests: 5 merge cases + 5 strip cases
- Tests cover create/replace/append merge scenarios
- Tests cover null-return, content preservation, no-markers passthrough
- Added beforeEach/afterEach imports for temp dir lifecycle
- Exported writeManifest and reportLocalPatches via GSD_TEST_MODE for Task 2
…es Copilot fixes

- 3 uninstall tests: gsd-* skill identification, instructions cleanup, GSD-only deletion
- writeManifest hashes Copilot skills in manifest JSON (proves isCopilot fix)
- reportLocalPatches uses /gsd-reapply-patches for Copilot (dash format)
- reportLocalPatches uses /gsd:reapply-patches for Claude (no regression)
- Full suite: 543 tests pass, 0 failures
- SUMMARY.md with 16 new tests documented
- STATE.md updated: Phase 3 complete, 5/5 plans done
- ROADMAP.md updated: Phase 03 marked complete
- 9 tests: skills count/structure, agents count/names, instructions markers
- Manifest structure, categories, SHA256 integrity verification
- Engine directory completeness (bin, references, templates, workflows, CHANGELOG, VERSION)
- Uses execFileSync in isolated /tmp dirs with GSD_TEST_MODE stripped from env
- 6 tests: engine removal, instructions removal, GSD skills/agents cleanup
- Preserves non-GSD custom skills and agents after uninstall
- Standalone lifecycle tests for preservation (install → add custom → uninstall → verify)
- Full suite: 558 tests passing, 0 failures
… plan

- SUMMARY.md: 15 E2E tests, SHA256 integrity, 558 total tests passing
- STATE.md: Phase 4 complete, 6/6 plans done
- ROADMAP.md: Phase 4 marked complete
- REQUIREMENTS.md: QUAL-01 complete, QUAL-02 out of scope
convertClaudeToCopilotContent() was hardcoded to always map ~/.claude/
and $HOME/.claude/ to ~/.copilot/ and $HOME/.copilot/ regardless of
install mode. For --local installs these should map to .github/ (repo-
relative, no ./ prefix) since Copilot resolves @file references from
the repo root.

Local mode:  ~/.claude/ → .github/  |  $HOME/.claude/ → .github/
Global mode: ~/.claude/ → ~/.copilot/  |  $HOME/.claude/ → $HOME/.copilot/

Added isGlobal parameter to convertClaudeToCopilotContent,
convertClaudeCommandToCopilotSkill, convertClaudeAgentToCopilotAgent,
copyCommandsAsCopilotSkills, and copyWithPathReplacement. All call
sites in install() now pass isGlobal through.

Tests updated to cover both local (default) and global modes.
565 tests passing, 0 failures.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
shoootyou and others added 5 commits March 3, 2026 19:17
The converter was hardcoding single quotes around argument-hint values
in skill frontmatter. This breaks YAML parsing when the value itself
contains single quotes (e.g., "e.g., 'v1.1 Notifications'").

Now uses yamlQuote() (JSON.stringify) which produces double-quoted
strings with proper escaping.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Archive milestone artifacts, retrospective, and update project docs.

- Archive: v1.23-ROADMAP.md, v1.23-REQUIREMENTS.md, v1.23-MILESTONE-AUDIT.md
- Create: MILESTONES.md, RETROSPECTIVE.md
- Evolve: PROJECT.md (validated reqs, key decisions, shipped context)
- Reorganize: ROADMAP.md (collapsed v1.23, progress table)
- Update: STATE.md (status: completed)
- Delete: REQUIREMENTS.md (archived, fresh for next milestone)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Upstream added validate-phase command (32 skills) and nyquist-auditor agent (12 agents).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@shoootyou shoootyou force-pushed the feat/copilot-install branch from b9ee03f to 62ea6f4 Compare March 3, 2026 18:20
@shoootyou
Copy link
Author

shoootyou commented Mar 3, 2026

Hey @glittercowboy! I put together a proposal/PR to add GitHub Copilot CLI as a supported platform. I’ve been using it with this CLI and it works great.

I previously created a fork:

But with this PR, my goal is to deprecate that fork and move the Copilot support into this project instead.

PS: I used the fork (get-shit-done-multi) to build this feature.

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