Skip to content

feat: add Copilot/AI instructions and framework instruction sync#708

Merged
aryanjasala merged 4 commits into
theme-elementary-v2from
feat/ai-instructions
Jun 7, 2026
Merged

feat: add Copilot/AI instructions and framework instruction sync#708
aryanjasala merged 4 commits into
theme-elementary-v2from
feat/ai-instructions

Conversation

@aryanjasala

@aryanjasala aryanjasala commented Jun 7, 2026

Copy link
Copy Markdown
Member

Summary

Adds Copilot/AI review instructions to the skeleton and wires it to receive the shared rules from rtcamp/wp-framework via npm run sync-ai.

What's included

  • .github/copilot-instructions.md — repo-wide overview + review conduct.
  • .github/instructions/structure.instructions.md — layout and wiring.
  • AGENTS.md (tool-agnostic brief) + thin CLAUDE.md that defers to it.
  • package.jsonsync-ai script (refreshes the framework rules from vendor and projects instructions to the wp-content root); chained from npm run init.
  • bin/init.js — no longer skips .github, so placeholder names are renamed there too at init.

How instructions arrive

npm run sync-ai (run by npm run init, or manually after composer update) reads the framework rules from vendor/rtcamp/wp-framework and writes the package's framework-php.instructions.md. No Composer hooks, so there is no install-order coupling.

Depends on

rtcamp/wp-framework (feat/ai-instructions). The generated .github/instructions/framework-php.instructions.md is produced by npm run sync-ai once the framework change is available, then committed in a follow-up.

@aryanjasala aryanjasala marked this pull request as ready for review June 7, 2026 17:40
@aryanjasala aryanjasala requested a review from Copilot June 7, 2026 18:00

Copilot AI left a comment

Copy link
Copy Markdown

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 introduces repository-level AI agent instructions and adds a sync-ai workflow to pull shared instruction rules from rtcamp/wp-framework, plus adjusts the init script so .github/ content participates in placeholder renames during theme initialization.

Changes:

  • Add agent-facing instruction entrypoints (AGENTS.md, CLAUDE.md, .github/copilot-instructions.md) and a theme structure instruction file under .github/instructions/.
  • Add npm run sync-ai and chain it from npm run init.
  • Update bin/init.js to include .github/ in init-time search/replace.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
package.json Adds sync-ai script and chains it from init.
CLAUDE.md Adds Claude entrypoint that defers to AGENTS.md.
bin/init.js Allows init-time replacements to apply inside .github/.
AGENTS.md Adds tool-agnostic agent brief and points to instruction sources.
.github/instructions/structure.instructions.md Adds path-scoped theme structure rules for inc/**.
.github/copilot-instructions.md Adds Copilot overview + review conduct rules and points to instruction files.

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

Comment thread package.json Outdated
Comment thread AGENTS.md Outdated
Comment thread .github/copilot-instructions.md Outdated
@aryanjasala aryanjasala merged commit 3534df9 into theme-elementary-v2 Jun 7, 2026
8 checks passed
@aryanjasala aryanjasala deleted the feat/ai-instructions branch June 7, 2026 18:39
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.

3 participants