Skip to content

feat: add GitHub Copilot instructions for contributors - #470

Draft
ChibaYuki347 wants to merge 1 commit into
awslabs:mainfrom
ChibaYuki347:feat/github-copilot-support
Draft

feat: add GitHub Copilot instructions for contributors#470
ChibaYuki347 wants to merge 1 commit into
awslabs:mainfrom
ChibaYuki347:feat/github-copilot-support

Conversation

@ChibaYuki347

@ChibaYuki347 ChibaYuki347 commented Jul 1, 2026

Copy link
Copy Markdown

Summary

Add .github/copilot-instructions.md so contributors who use GitHub Copilot
to work on this repository get the same project context that Claude Code
(.claude/) and Kiro (.kiro/steering/) already receive. Content is a concise
subset of AGENTS.md (build/test/lint commands, code style, PR rules, security
scanners, and the do-not-rename public-contract constraints).

Scope note: This is intentionally limited to contributor tooling for the
current repository
. It does not expand the product's supported-platform
surface. See the comment below for how this aligns with the v2 direction.

Changes

  • .github/copilot-instructions.md — repository-wide Copilot context for contributors.

User experience

  • Before: Copilot users editing this repo received no repo-specific guidance,
    unlike Claude Code and Kiro contributors.
  • After: Copilot automatically loads the repo's conventions (commands, style,
    PR rules, constraints) from .github/copilot-instructions.md.

Checklist

  • I have reviewed the contributing guidelines
  • I have performed a self-review of this change
  • Changes have been tested
  • Changes are documented

Test Plan

  • npx markdownlint-cli2 ".github/copilot-instructions.md" passes (0 errors).
  • No .gitignore change needed — .github/** is version-controlled.
  • No product files, README, or aidlc-rules/ content touched.

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

Copilot AI review requested due to automatic review settings July 1, 2026 05:23
@github-actions github-actions Bot added documentation Improvements or additions to documentation github labels Jul 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds first-class GitHub Copilot contributor support to this repository by introducing repo-wide and path-specific Copilot instruction/prompt files, and documenting how AI-DLC workflows map onto Copilot surfaces (Ask/Plan/Agent, CLI, cloud agent). This complements the existing contributor configuration for other agents (e.g., .claude/, .kiro/steering/) and improves discoverability in existing docs.

Changes:

  • Add repository-wide Copilot instructions plus path-scoped instruction files for aidlc-rules/**, scripts/aidlc-evaluator/**, and docs/**.
  • Add reusable Copilot prompt files (/new-rule, /security-finding-triage) to standardize common contributor workflows.
  • Add a dedicated Copilot integration guide and link it from existing contributor documentation and the README.
Show a summary per file
File Description
README.md Expands Copilot setup guidance, including recommended surfaces/modes and links to the new integration guide.
docs/GITHUB-COPILOT-INTEGRATION.md New guide describing Copilot customization mechanisms and surface compatibility with AI-DLC runtime behavior.
AGENTS.md Adds the new Copilot integration guide to the documentation map.
.github/copilot-instructions.md New always-on Copilot context distilled for repo contributors.
.github/instructions/aidlc-rules.instructions.md Adds path-scoped guidance for contributors editing the distributable aidlc-rules/** content.
.github/instructions/scripts.instructions.md Adds path-scoped guidance for the Python evaluator subtree (uv/pytest + scanner conventions).
.github/instructions/docs.instructions.md Adds path-scoped guidance for editing human-facing docs under docs/.
.github/prompts/new-rule.prompt.md New reusable prompt to scaffold rule detail files under aidlc-rules/.
.github/prompts/security-finding-triage.prompt.md New reusable prompt to triage scanner findings and apply fixes/suppressions correctly.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 9/9 changed files
  • Comments generated: 3
  • Review effort level: Low

Comment on lines +27 to +28
- Always add a language to fenced code blocks (MD040 is enforced).
- Keep table pipes vertically aligned (MD060 `aligned` is enforced).
Comment thread .github/prompts/new-rule.prompt.md Outdated
Comment thread .github/prompts/new-rule.prompt.md Outdated
Copilot AI review requested due to automatic review settings July 1, 2026 05:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 9/9 changed files
  • Comments generated: 0 new
  • Review effort level: Low

Add .github/copilot-instructions.md so contributors who use GitHub Copilot to
work on this repository get the same project context that Claude Code and Kiro
already receive (build/test/lint commands, code style, PR rules, security
scanners, and the do-not-rename public-contract constraints). Content is a
concise subset of AGENTS.md.

Scope is intentionally limited to contributor tooling for the current repo; it
does not expand the product's platform support.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ChibaYuki347
ChibaYuki347 force-pushed the feat/github-copilot-support branch from 6c99e04 to d2995d7 Compare July 1, 2026 05:43
@ChibaYuki347 ChibaYuki347 changed the title feat: add GitHub Copilot repository configuration and integration guide feat: add GitHub Copilot instructions for contributors Jul 1, 2026
@ChibaYuki347

Copy link
Copy Markdown
Author

Rescoped to avoid conflicting with the v2 direction

After reviewing the repository's direction, I've significantly reduced the scope of this PR.

What I found:

  • main is still v1 (v1.0.1), with a "2.0 (Preview)" banner pointing to the v2 branch.
  • v2 (RFC [RFC]: Restructure AI-DLC workflows #105) re-architects AI-DLC from a rules-only model to rules + skills + subagents + hooks running on a deterministic TypeScript/Bun engine ("one harness-neutral core rendered onto the CLI").
  • The v2 harness set is Claude Code, Kiro IDE, Kiro CLI, and Codex CLI only — there is no harness/copilot/ anywhere in the v2 tree. GitHub Copilot (along with Amazon Q, Cursor, and Cline) is not carried over, because the v2 harness contract (manifest + hook adapter + emit.ts, per docs/harness-engineering/09-porting-to-a-new-harness.md) requires programmable hooks, subagents, and a local Bun runtime that Copilot's custom-instructions model does not provide.

What changed in this PR as a result:

  • Removed the product-facing changes that would have promoted Copilot as a supported product platform (README GitHub Copilot section edits and a docs/GITHUB-COPILOT-INTEGRATION.md guide), since that runs counter to v2's direction.
  • Removed the v1-structure-coupled files (.github/instructions/* and .github/prompts/*) that reference aidlc-rules/**, which would go stale once v2 lands.
  • Kept only .github/copilot-instructions.md — contributor tooling for the current repo, orthogonal to the product's harness support and parallel to the existing .claude/ and .kiro/steering/ configs.

Happy to close this entirely if maintainers prefer, or to instead open a discussion about a proper v2 Copilot harness (and the hook/subagent primitives that would be prerequisites).

@ChibaYuki347

Copy link
Copy Markdown
Author

Correction / addendum: Copilot's 2026 extensibility (my earlier comment was too pessimistic)

My previous comment stated that "the v2 harness contract requires programmable hooks, subagents, and a local Bun runtime that Copilot's custom-instructions model does not provide." After a deeper look at the current (2026) GitHub Copilot documentation, that claim is out of date and I want to correct it for the record.

Copilot now provides the primitives the v2 harness contract needs — most notably on the Copilot CLI (GA):

  • Lifecycle hooks (sessionStart, postToolUse, preCompact, subagentStart/subagentStop, and agentStop — the analog of Claude Code's blocking Stop). Hook commands can run any local shell/script (e.g. bash: "bun run ./hooks/aidlc-adapter.ts"), and can block: preToolUse → permissionDecision: "deny" and agentStop/Stop → {"decision":"block","reason"} (with stop_hook_active to avoid loops). This is functionally equivalent to the settings.json/hooks.json + core-hook wiring the Claude and Codex harnesses use. https://docs.github.com/en/copilot/reference/hooks-reference
  • Tool-restricted subagents with per-agent tools: allowlist and model: in .github/agents/*.agent.md, dispatched with isolated context (GA on CLI). https://docs.github.com/en/copilot/reference/custom-agents-configuration
  • Agent Skills (.github/skills/<name>/SKILL.md, GA), local terminal execution, and MCP.

Status caveats: hooks are Preview in VS Code (and VS Code currently ignores hook matchers + uses different tool names, so an adapter shim must normalize them), and the cloud agent is a poor fit for AI-DLC's interactive approval gates (it runs autonomously to a PR, has an ephemeral FS, and doesn't ship bun).

Net: a harness/copilot/ for v2 is technically feasible — most cleanly targeting Copilot CLI, mapping closely onto the existing harness/codex/ pattern (a manifest.ts + an aidlc-copilot-adapter.ts hook shim + an emit.ts that generates the hook config/skills/trust). The remaining real constraints are model parity (v2 is tuned to Claude Opus 4.8 on AWS Bedrock — the biggest open question), VS Code hook maturity, and the porting work itself.

This does not change this PR. #470 stays correctly scoped to contributor tooling (.github/copilot-instructions.md) and does not add Copilot as a v2 product harness. I'll open a separate [RFC] to discuss whether a v2 Copilot harness is desirable and to work through the model-parity question with the maintainers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation github

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants