Skip to content

chore: set up shared agent tooling (Copilot + Claude Code)#416

Open
jalezi wants to merge 4 commits into
mainfrom
chore/prepare-repo-for-agents
Open

chore: set up shared agent tooling (Copilot + Claude Code)#416
jalezi wants to merge 4 commits into
mainfrom
chore/prepare-repo-for-agents

Conversation

@jalezi

@jalezi jalezi commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Why

We want every coding agent that touches this repo — GitHub Copilot, Claude Code, and others — to follow the same project guidance and reuse the same skills, instead of each tool having its own divergent config. This PR establishes one tool-neutral source of truth for agent behavior.

The agent definitions, instructions, and skills in this PR were bootstrapped using the github-copilot-starter skill from github/awesome-copilot, then adapted to Podnebnik's stack and conventions.

What

Canonical guidance (tool-neutral)

  • AGENTS.md and CLAUDE.md both resolve to .github/copilot-instructions.md as the single canonical instruction file, so Copilot and Claude Code read identical guidance.
  • .github/instructions/ — domain-specific guidance (TypeScript/Solid/Eleventy, testing, security, documentation, performance, code review).

Copilot custom agents.github/agents/ (architect, debugger, reviewer, software-engineer).

  • Removed the pinned model: field from each agent. The field is optional; when omitted, each agent inherits the contributor's selected Copilot model. Pinning "Claude Sonnet 4" was fragile — it depends on the model being enabled for the contributor's plan + org policy, used a display-name format rather than the documented slug form, and parses inconsistently across Copilot clients (copilot-cli#2133, #1195). See Microsoft Learn — custom agents.

Reusable skills.agents/skills/ (code-review, debug-issue, generate-docs, refactor-code, setup-component, write-tests).

  • .agents/skills/ is the canonical, vendor-neutral location.
  • Claude Code only auto-discovers skills from .claude/skills/, so we mirror the canonical skills there via a new yarn sync-skills script wired into postinstall. The generated copy is git-ignored to keep a single source of truth.
  • skills-lock.json tracks externally-sourced skills (currently empty after pruning the unused starter skill).

Tooling & docs

  • .github/workflows/copilot-setup-steps.yml — Copilot coding agent environment setup.
  • README.md + AGENTS.md document the skills sync workflow (edit in .agents/skills/, run yarn sync-skills).

Notes for reviewers

  • No application code or data is touched — this is purely agent/dev-tooling configuration.
  • .claude/skills/ is intentionally absent from the diff (git-ignored, generated by yarn sync-skills / yarn install).

🤖 Generated with Claude Code

Add cross-tool agent configuration so Copilot, Claude Code, and other
agents share one source of truth:

- Add canonical agent guidance (AGENTS.md, CLAUDE.md,
  .github/copilot-instructions.md, .github/instructions/) and Copilot
  custom agents under .github/agents/.
- Keep reusable skills in .agents/skills/ as the canonical location;
  mirror them to .claude/skills/ (Claude Code's discovery path) via a
  `yarn sync-skills` script wired into postinstall. The generated copy
  is git-ignored.
- Drop the pinned `model` field from .github/agents/*.agent.md so each
  agent inherits the contributor's selected Copilot model, avoiding
  availability and naming-format issues across plans/clients.
- Document the skills sync workflow in README.md and AGENTS.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 20, 2026 12:12
@jalezi jalezi added documentation Improvements or additions to documentation enhancement New feature or request github_actions Pull requests that update GitHub Actions code labels Jun 20, 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

This PR centralizes AI coding-agent guidance for the Podnebnik repository by introducing a single canonical instruction set and a shared, tool-neutral skills library, with mirroring for tools that require alternate discovery paths.

Changes:

  • Adds canonical, repository-wide agent instructions plus domain-specific instruction overlays under .github/instructions/.
  • Introduces vendor-neutral reusable skills under .agents/skills/ and sync tooling to generate a git-ignored .claude/skills/ mirror.
  • Adds Copilot Coding Agent environment setup workflow and supporting documentation updates.

Reviewed changes

Copilot reviewed 23 out of 24 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
skills-lock.json Adds a lock file for externally sourced skills (currently empty).
README.md Documents canonical skill location and the yarn sync-skills workflow.
package.json Adds sync-skills script and runs it in postinstall.
CLAUDE.md Points Claude Code at shared agent instructions via AGENTS.md.
AGENTS.md Establishes .github/copilot-instructions.md as canonical guidance and documents skill mirroring.
.gitignore Ignores generated .claude/skills mirror output.
.github/workflows/copilot-setup-steps.yml Adds a Copilot setup workflow to provision repo dependencies and run typecheck/build.
.github/instructions/typescript-solid-eleventy.instructions.md Adds frontend/TS/Solid/Eleventy-specific instruction overlay (issue noted in review comment).
.github/instructions/testing.instructions.md Adds testing/validation standards overlay.
.github/instructions/security.instructions.md Adds security standards overlay.
.github/instructions/performance.instructions.md Adds performance standards overlay.
.github/instructions/documentation.instructions.md Adds documentation/content standards overlay.
.github/instructions/code-review.instructions.md Adds code review standards overlay.
.github/copilot-instructions.md Adds the canonical repository-wide agent guidance.
.github/agents/software-engineer.agent.md Adds a Copilot custom agent definition for implementation work.
.github/agents/reviewer.agent.md Adds a Copilot custom agent definition for PR review.
.github/agents/debugger.agent.md Adds a Copilot custom agent definition for debugging.
.github/agents/architect.agent.md Adds a Copilot custom agent definition for architecture planning.
.agents/skills/write-tests/SKILL.md Adds a reusable “write-tests” skill.
.agents/skills/setup-component/SKILL.md Adds a reusable “setup-component” skill.
.agents/skills/refactor-code/SKILL.md Adds a reusable “refactor-code” skill.
.agents/skills/generate-docs/SKILL.md Adds a reusable “generate-docs” skill.
.agents/skills/debug-issue/SKILL.md Adds a reusable “debug-issue” skill.
.agents/skills/code-review/SKILL.md Adds a reusable “code-review” skill.

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

Comment thread .github/instructions/typescript-solid-eleventy.instructions.md
TypeScript 6.x treats `baseUrl` as a hard error (TS5101); it stops
functioning entirely in 7.0. The Copilot Setup Steps workflow runs
`yarn typecheck` with a fresh install that resolves typescript ^6.0.3,
which failed on this option.

Under `moduleResolution: "bundler"`, the `paths` mappings resolve
relative to this config without `baseUrl`, so removing it is behavior-
preserving. Prefer this over `ignoreDeprecations: "6.0"` because that
value is rejected by TS 5.x and only defers the break to 7.0.

Verified `tsc --noEmit` passes on both TS 5.9 and 6.x.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
jalezi and others added 2 commits June 20, 2026 14:24
applyTo is a single glob string containing comma-separated patterns. In standard glob matching, the commas outside of a brace expansion are treated as literal characters, so this will likely match no files (and the instruction won’t apply where intended). Use a YAML list (as in the other instruction files in this PR) or a single brace-expanded glob that doesn’t include literal commas.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@jalezi jalezi requested review from kesma01, ntadej and stefanb June 20, 2026 12:25

@kesma01 kesma01 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.

Cool and thoughtful.

@jalezi

jalezi commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #418.

@jalezi

jalezi commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

Correction to my earlier comment: #418 is stacked on this PR and should be reviewed after/against it; it does not supersede #416.

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 enhancement New feature or request github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants