Problem
The portable core is fully prepared for GitHub Copilot CLI, but the adapter files that enroll it as a host do not exist yet — the plugin cannot be installed or used from Copilot CLI. This issue adds the adapter on top of the prepared core; the goal is that Copilot works exactly like the existing hosts (Claude Code / Cursor / Codex) on the same core.
What already exists (do NOT re-implement or refactor)
Core readiness landed on dev (see .archcore/plugin/host-expansion-core-readiness.plan.md):
plugins/archcore/bin/lib/normalize-stdin.sh — all Copilot branches are in place: native camelCase detection fallback (toolName/toolArgs/hookEventName), field extraction from the escaped toolArgs string, deny semantics (archcore_hook_block emits {"permissionDecision":"deny",...} + exit 0 — on Copilot exit 2 is only a warning and does NOT block), info helpers emit top-level {"additionalContext":"..."}.
plugins/archcore/bin/session-start — copilot arm (top-level additionalContext), .plugin/plugin.json install-dir guard, passes copilot as the host arg to archcore hooks.
test/fixtures/stdin/copilot/ — provisional native fixtures (+ README marking exactly what is provisional until real payload captures).
- Tests: exact-output pins for every copilot branch, negative misroute guards,
test/structure/host-coverage-matrix.bats (enrollment guard), test/structure/host-logic-locality.bats, test/unit/output-helpers-matrix.bats.
Decisions are final and recorded in .archcore/plugin/ — do not re-litigate:
copilot-adapter-design.adr.md — native adapter files (dedicated manifest + hooks config), subdir install archcore-ai/plugin:plugins/archcore, Copilot CLI only scope.
copilot-host-support.rnd.md — verified contract facts (manifest discovery order, hook payload shape, deny semantics, env vars).
host-adapter-contract.spec.md — adapter obligations; adapters are pure config, no logic outside bin/.
Expected result
A Copilot CLI session with the plugin installed behaves like the shipped hosts: session-start injects .archcore context, direct Write/Edit to .archcore/*.md is denied with the redirect-to-MCP message, MCP document tools work, post-tool validation/cascade info arrives.
Proposed approach
Acceptance criteria
- Live Copilot CLI: write guard denies, MCP tools work, session-start context arrives.
- All existing exact-output pins for claude-code/cursor/codex stay green untouched (shipped hosts byte-identical — enforced by
host-logic-locality.bats and the pin tests).
make test, make lint, make check-json green; provisional fixtures replaced with real captures.
Dependencies
needs-cli: the Go CLI must accept archcore hooks copilot session-start. Today an unknown host degrades silently (guard still works, context load does not) — needs a companion issue in the CLI repo.
References
.archcore/plugin/copilot-adapter-design.adr.md, copilot-host-support.rnd.md, host-adapter-contract.spec.md, host-expansion-core-readiness.plan.md, test/fixtures/stdin/copilot/README.md.
Problem
The portable core is fully prepared for GitHub Copilot CLI, but the adapter files that enroll it as a host do not exist yet — the plugin cannot be installed or used from Copilot CLI. This issue adds the adapter on top of the prepared core; the goal is that Copilot works exactly like the existing hosts (Claude Code / Cursor / Codex) on the same core.
What already exists (do NOT re-implement or refactor)
Core readiness landed on
dev(see.archcore/plugin/host-expansion-core-readiness.plan.md):plugins/archcore/bin/lib/normalize-stdin.sh— all Copilot branches are in place: native camelCase detection fallback (toolName/toolArgs/hookEventName), field extraction from the escapedtoolArgsstring, deny semantics (archcore_hook_blockemits{"permissionDecision":"deny",...}+ exit 0 — on Copilot exit 2 is only a warning and does NOT block), info helpers emit top-level{"additionalContext":"..."}.plugins/archcore/bin/session-start— copilot arm (top-leveladditionalContext),.plugin/plugin.jsoninstall-dir guard, passescopilotas the host arg toarchcore hooks.test/fixtures/stdin/copilot/— provisional native fixtures (+ README marking exactly what is provisional until real payload captures).test/structure/host-coverage-matrix.bats(enrollment guard),test/structure/host-logic-locality.bats,test/unit/output-helpers-matrix.bats.Decisions are final and recorded in
.archcore/plugin/— do not re-litigate:copilot-adapter-design.adr.md— native adapter files (dedicated manifest + hooks config), subdir installarchcore-ai/plugin:plugins/archcore, Copilot CLI only scope.copilot-host-support.rnd.md— verified contract facts (manifest discovery order, hook payload shape, deny semantics, env vars).host-adapter-contract.spec.md— adapter obligations; adapters are pure config, no logic outsidebin/.Expected result
A Copilot CLI session with the plugin installed behaves like the shipped hosts: session-start injects
.archcorecontext, directWrite/Editto.archcore/*.mdis denied with the redirect-to-MCP message, MCP document tools work, post-tool validation/cascade info arrives.Proposed approach
plugins/archcore/.plugin/plugin.json— manifest with explicit paths:"hooks": "./hooks/copilot.hooks.json"(critical: default discovery would otherwise pick up Claude'shooks/hooks.json),"mcpServers": "./.mcp.json","skills": "./skills/","agents": "./agents/".plugins/archcore/hooks/copilot.hooks.json— camelCase events:sessionStart→bin/session-start;preToolUsematchercreate|edit|str_replace_editor|apply_patch→bin/check-archcore-write+bin/check-code-alignment;postToolUseentries (self-filtering byARCHCORE_TOOL_NAME, cursorafterMCPExecutionpattern). Commands via"${COPILOT_PLUGIN_ROOT}"/bin/.... Every entry carries"env": {"ARCHCORE_HOST": "copilot"}— deterministic detection; the stdin heuristic is fallback only.Makefile— add both new JSON files toJSON_FILES.test/structure/copilot-plugin.bats(manifest validity, hooks path, version parity with.claude-plugin/plugin.json) + enroll a copilot row intest/structure/host-coverage-matrix.bats(the enrollment guard fails CI until you do).archcore-ai/plugin:plugins/archcorein a scratch project, capture real hook payloads, replace the provisional fixtures, confirm deny-JSON actually blocks (and exit 2 does not). Contingencies A/B/C are pre-planned inhost-expansion-core-readiness.plan.md— none require core refactoring.Acceptance criteria
host-logic-locality.batsand the pin tests).make test,make lint,make check-jsongreen; provisional fixtures replaced with real captures.Dependencies
needs-cli: the Go CLI must acceptarchcore hooks copilot session-start. Today an unknown host degrades silently (guard still works, context load does not) — needs a companion issue in the CLI repo.References
.archcore/plugin/copilot-adapter-design.adr.md,copilot-host-support.rnd.md,host-adapter-contract.spec.md,host-expansion-core-readiness.plan.md,test/fixtures/stdin/copilot/README.md.