Add GitHub Copilot as a supported host
Traceability
- Spec ID:
copilot-host-support - Status: Implemented
Intent
Make GitHub Copilot a first-class, evidence-safe Better Harness host alongside Qoder, Codex, Claude Code, Cursor, and Qwen Code.
Copilot already loads the canonical better-harness Skill today, but only by falling back to the Claude Code shell: Copilot resolves plugin manifests in the order .plugin/plugin.json, plugin.json, .github/plugin/plugin.json, .claude-plugin/plugin.json, and marketplace manifests in the order marketplace.json, .plugin/marketplace.json, .github/plugin/marketplace.json, .claude-plugin/marketplace.json. That fallback is undocumented for users, gives Copilot no shell of its own, and leaves the load order dependent on which other host shells happen to exist.
The larger gap is evidence. Every provider enum rejects copilot, so the workflow cannot inventory Copilot's configured assets or read Copilot session transcripts. A Copilot user can run the Skill but cannot get a Copilot-scoped Harness report.
Copilot's transcript is the richest of any supported host: events.jsonl records hook, subagent, plan, compaction, and permission lifecycle events directly. That evidence must be normalized without inventing coverage Copilot does not record. Copilot records output tokens per assistant message but no input tokens, cache tokens, or cost, and VS Code Copilot Chat has no documented durable transcript, so both stay explicit boundaries rather than zero values.
Acceptance Scenarios
- CHS-AC-1 (native shell): The repository exposes a Copilot-native plugin manifest at
.github/plugin/plugin.jsonand a marketplace manifest at.github/plugin/marketplace.json. Both carry thepackage.jsonversion, and the manifest declaresskillsexplicitly rather than relying on a default. Copilot resolves them ahead of.claude-plugin/, so host selection no longer depends on the Claude shell. - CHS-AC-2 (version alignment):
package.jsonand the Qoder, Codex, Claude Code, Cursor, Qwen, and Copilot host manifests expose the same package version, and the packaging verification gate covers the new manifests. - CHS-AC-3 (configured assets):
agent-customizesupports--provider copilotthrough a capability-owned provider module that inventories Copilot Rules, Skills, Agents, Hooks, MCP, and installed-Plugin metadata from documented Copilot locations. Installed-Plugin records stay separate from marketplace catalogs and never become runtime-use claims. - CHS-AC-4 (session evidence):
session-analysissupports--platform copilotthrough a capability-owned platform module that reads workspace-matching~/.copilot/session-state/<id>/events.jsonl, and both the public and capability-owned analyzer factories resolve it. - CHS-AC-5 (evidence boundaries): Copilot facts carry the per-response
outputTokensthe transcript records and omit input tokens, cache tokens, and cost rather than reporting them as zero, so per-response usage coverage is partial and complete usage still requires the opt-in OpenTelemetry export. Permission request and result events normalize into the shared permission lifecycle without retaining prompt intents, paths, or commands. Session Diagnostics states that VS Code Copilot Chat has no supported durable transcript and thatsession-store.dbis documented as auto-managed and is not an evidence source. - CHS-AC-6 (bundle propagation):
harness evidence-bundle --platform copilotfreezes a Copilot context and returns all three lanes, and--copilot-homeroutes isolated configuration paths into the Agent Customize lane through both the collector API and theagent-customizeCLI. - CHS-AC-7 (host routing): The host adapter matrix carries a Copilot row with discovery paths, evidence sources, default output, and a smoke command. Portable HTML routing includes Copilot, and Qoder remains the only Canvas host.
- CHS-AC-8 (provider behavior): Deterministic fixtures cover Copilot asset inventory and transcript normalization, including tool call/result pairing, hook lifecycle, subagent delegation, and absent or unreadable transcripts. Raw prompts, commands, output, paths, and secrets do not enter production facts.
- CHS-AC-9 (documentation integrity): Markdown links and the generated Better Harness documentation routing graph remain current, and the README documents the marketplace install path rather than the deprecated direct install.
Non-goals
- Modify
~/.copilot, publish togithub/copilot-pluginsorgithub/awesome-copilot, or install a user-level Copilot Skill. - Read
~/.copilot/session-store.db. It is documented as automatically managed and its schema is internal. - Treat VS Code Copilot Chat
debug-logsas durable session evidence. - Add Copilot OpenTelemetry ingestion for token usage.
- Add a
scripts/packaging/Copilot host-artifact builder. That path is scoped to an accepted host-artifact contract and currently supports Codex only. - Automate Copilot cloud agent
enabledPluginsconfiguration. - Add Copilot sources to
agent-linthost instructions, which currently support Qoder, Claude Code, and Codex only. - Add Copilot metadata to the Qoder runtime bundle.
- Treat configured Copilot assets, zero candidates, or a loaded Skill as proof of runtime quality or Skill invocation.
Plan and Tasks
- Add
.github/plugin/plugin.jsonand.github/plugin/marketplace.jsonas a thin Copilot shell, and include.github/plugin/in the public package files list. (CHS-AC-1, CHS-AC-2) - Add
scripts/agent-customize/providers/copilot.mjsas the capability-local owner and register it in the provider registry. Resolve Copilot home throughCOPILOT_HOMEand an explicit override, and build the same Manage collections as existing providers. (CHS-AC-3) - Add
scripts/session-analysis/platforms/copilot.mjsand register it in both the publicsession-analysis.mjsdispatch and the capability-ownedanalyzer.mjsdispatch. (CHS-AC-4, CHS-AC-5) - Register
copilotin the remaining provider enums: evidence-bundle contract and lanes, report run, task-loop source and report, report quality, coding-agent-practices asset baseline, asset integrity, and inventory, lifecycle demand signals, session core facts, selection profile, usage summary, and agent-lint usage. (CHS-AC-6) - Add
references/agent-customize/platforms/copilot.md, a Copilot asset route, and a Copilot section in Session Diagnostics. (CHS-AC-3, CHS-AC-5) - Add the Copilot host matrix row, update the metadata-root counts across the architecture, community, glossary, and concepts docs, and route Copilot through portable HTML reporting. (CHS-AC-7)
- Document the Copilot marketplace install path in both READMEs. (CHS-AC-9)
- Extend tests and packaging verification for the new shell, provider, platform, and enums, replacing the assertion that excluded Copilot from the host matrix. (CHS-AC-2, CHS-AC-8, CHS-AC-9)
Test and Review Evidence
node --testnode --test test/doc-link-graph.test.mjsnpm run pack:verifycopilot plugin marketplace add <repo>thencopilot plugin install better-harness@better-harness, expecting the reported skill install count.node scripts/better-harness.mjs harness evidence-bundle --platform copilot --workspace . --depth quick --format json
Risk
Copilot's plugin surface is evolving: direct repository installs are deprecated in favor of marketplace installs, and the manifest resolution order is the only guarantee that a Copilot-native shell takes precedence over the Claude shell. Both are pinned by the host matrix row and manifest tests so a Copilot change surfaces as a failing contract rather than silent host misrouting.
Copilot transcript event names are observed from a real session rather than a published schema. The platform module therefore treats unknown event types as ignorable and keeps coverage explicit instead of inferring activity.
Unknowns
- [NEEDS CLARIFICATION: whether Copilot publishes a versioned JSON schema for
plugin.jsonthat the manifest test should validate against.] - [NEEDS CLARIFICATION: whether
~/.copilot/session-statelayout is stable enough to promote from observed to documented in the host matrix.]