Skip to content

feat(agent-config): wire GitHub Copilot (.github/copilot-instructions.md) - #195

Merged
sandstream merged 1 commit into
mainfrom
claude/copilot-agent-config
Jul 1, 2026
Merged

sandstream merged 1 commit into
mainfrom
claude/copilot-agent-config

Conversation

@sandstream

Copy link
Copy Markdown
Owner

Description

kit agent-config now writes the managed "use kit" rules block into GitHub Copilot's canonical custom-instructions file, .github/copilot-instructions.md — the fifth rules-file target alongside CLAUDE.md / AGENTS.md / .cursorrules / .clinerules. Copilot (VS Code / Visual Studio) was the one common agent kit didn't reach for the advisory rules block. (Google Antigravity is already covered via its AGENTS.md support, so no separate target is needed for it.)

Type of Change

  • New feature (non-breaking change that adds functionality)

Related Issues

Changes Made

  • AGENT_TARGETS gains { agent: "Copilot", file: ".github/copilot-instructions.md" }.
  • detectAgentTargets wires Copilot when a .vscode/ dir is present or the file already exists.
  • writeAgentConfig now mkdirs the parent dir before writing, so a nested target (.github/) is created — a no-op for the existing root-level files.
  • COMMAND_HELP, the README agent-support table (+ footnote 8), and CHANGELOG.md updated.

Scope / deliberately out

Advisory rules block only. Memory indexing (a Copilot transcript parser → new harness) and a blocking install-gate for Copilot are intentionally not included: they require Copilot's transcript serialization format and a verified pre-tool-hook surface, and kit's rule is to build adapters only after verifying against primary sources (never guessed). The agent-agnostic git-hook floor and the MCP server (kit mcp, added to .vscode/mcp.json) already apply to Copilot today.

Testing

Test Coverage

  • Added new tests (detectAgentTargets: .vscode/ and existing-file detection; writeAgentConfig: nested-dir creation)
  • All tests pass (npm test) — 1989 tests, 0 fail

Manual Testing

  1. In a repo with a .vscode/ dir, kit agent-config now creates .github/copilot-instructions.md containing the marker-delimited kit block.
  2. Re-running is idempotent (unchanged); editing outside the markers is preserved.
  3. public-surface snapshot unchanged; eslint src reports 0 errors.

Breaking Changes

None / N/A

Checklist

  • My code follows the project's style guidelines
  • I've updated documentation as needed (README table + footnote, COMMAND_HELP, CHANGELOG)
  • All new code has test coverage
  • All tests pass locally (npm test)
  • No new warnings or errors introduced
  • Commit messages follow conventions
  • No hardcoded secrets or sensitive data
  • Code has been self-reviewed

Performance Impact

  • No performance impact

Migration Guide

N/A — additive. Existing rules files are untouched; the Copilot file is only written when the project looks like a VS Code/Copilot project (or already has the file).

Reviewer Notes

The .vscode/ heuristic is intentionally permissive (a VS Code project is the best available "Copilot likely" signal); an extra marker-guarded, idempotent instructions file is harmless if Copilot isn't actually used. Open to gating it differently (e.g. only on an existing file) if you'd prefer a narrower trigger.

🤖 Generated with Claude Code


Generated by Claude Code

….md)

kit agent-config now writes the managed "use kit" block into Copilot's
canonical custom-instructions file, .github/copilot-instructions.md — the
fifth rules-file target alongside CLAUDE.md / AGENTS.md / .cursorrules /
.clinerules. Copilot was the one common agent kit didn't reach for the rules
block; VS Code Copilot reads this file (and Antigravity is already covered via
its AGENTS.md support).

- AGENT_TARGETS gains { agent: "Copilot", file: ".github/copilot-instructions.md" }.
- detectAgentTargets wires it when a .vscode/ dir is present or the file exists.
- writeAgentConfig now mkdir's the parent dir before writing, so a nested
  target (.github/) is created (no-op for root-level files).
- COMMAND_HELP, README agent table (+ footnote 8), CHANGELOG updated.

Scope: advisory rules block only. Memory indexing and a blocking install-gate
for Copilot are deliberately NOT included — they need Copilot's transcript
format and pre-tool hook surface verified against primary sources first (kit's
"never guessed" rule). The git-hook floor and the MCP server (kit mcp) already
apply to Copilot today.

Tests: new detectAgentTargets + writeAgentConfig cases; full suite green
(1989 tests, 0 fail); public-surface snapshot unchanged; eslint clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbF4MFePXWNCd4dxBQvqH2
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

✅ Docker image built successfully

  • CLI image: docker.io/sandstream/kit:test

@sandstream
sandstream merged commit 9eaf8aa into main Jul 1, 2026
17 checks passed
@sandstream
sandstream deleted the claude/copilot-agent-config branch July 1, 2026 09:45
@sandstream sandstream mentioned this pull request Jul 1, 2026
2 of 5 tasks
sandstream added a commit that referenced this pull request Jul 1, 2026
#196)

Cut 3.1.0 from [Unreleased]:
- gzip-compress memory sync blobs before encryption (~3x smaller, #193)
- public-key sync mode — ephemeral sessions push with no secret (#192)
- kit agent-config wires GitHub Copilot (#195)
- external timestamp anchor via command transport (#186)
- plus device-identity hardening + transport fixes

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.

2 participants