feat: add Copilot/AI instructions and framework instruction sync#708
Merged
Conversation
There was a problem hiding this comment.
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-aiand chain it fromnpm run init. - Update
bin/init.jsto 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.
pratik-londhe4
approved these changes
Jun 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Copilot/AI review instructions to the skeleton and wires it to receive the shared rules from
rtcamp/wp-frameworkvianpm 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) + thinCLAUDE.mdthat defers to it.package.json—sync-aiscript (refreshes the framework rules from vendor and projects instructions to thewp-contentroot); chained fromnpm 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 bynpm run init, or manually aftercomposer update) reads the framework rules fromvendor/rtcamp/wp-frameworkand writes the package'sframework-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.mdis produced bynpm run sync-aionce the framework change is available, then committed in a follow-up.