Skip to content

Commit b9c23bd

Browse files
committed
New scripts and updates to instructions to remove references
1 parent 7f76b2b commit b9c23bd

29 files changed

+93
-193
lines changed

.github/agents/a11y.agent.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,3 @@ Block theme accessibility rests on the **POUR** model:
193193
- [ ] Reduced motion respected
194194

195195
---
196-
197-
## References
198-
199-
- **Theme Accessibility Handbook** — WordPress Theme Handbook on accessibility readiness and requirements.
200-
- **Learn WordPress Accessibility Lesson** — fundamentals for theme accessibility basics.
201-
- **WCAG (W3C)** — global accessibility standard underpinning these requirements.

.github/agents/reporting.agent.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -773,15 +773,6 @@ async function runLighthouse() {
773773
- Keep comparison baselines and project updates in their dedicated subfolders
774774
- Archive or rotate older files instead of deleting unless policy requires
775775

776-
## References
777-
778-
- Agent index: `.github/agents/agent.md`
779-
- Instructions: `.github/instructions/reporting.instructions.md`
780-
- Script: `scripts/reporting.agent.js`
781-
- Tests: `tests/agents/reporting.agent.test.js`
782-
- Workflow: `.github/workflows/agent-reporting.yml`
783-
- Logs: `logs/` (per-category subfolders)
784-
785776
## Summary
786777

787778
✅ Each report type has defined structure and location

.github/copilot-tasks.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ audience: AI Assistants, Developers
77
date: 2025-12-01
88
---
99

10-
1110
> **Status**: ✅ All audit remediation tasks completed (21/21)
1211
1312
## 1. Missing Files

.github/instructions/README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ This directory lists the instruction files that guide Copilot and contributors w
2121
- Treat this file as a directory index, not a source of standards.
2222
- Link to topic-specific instructions rather than re-stating them.
2323
- Keep file names and paths up to date when instructions move or are added.
24+
- Actively prevent circular reference loops: remove any `## References` or `## See Also` sections (or similar headings) from individual instruction files and keep their metadata limited to `custom-instructions.md` and `_index.instructions.md`.
25+
- Run `scripts/clean-github-references.js` from the repo root before updating `.github` instruction files so that those sections are purged consistently and only the clean hierarchy remains.
2426

2527
## Detailed Guidance
2628

@@ -57,9 +59,4 @@ See the file list below for topic coverage. Open the relevant `*.instructions.md
5759

5860
- Confirm links resolve to existing files in `.github/instructions/`.
5961
- Run `rg --files .github/instructions` to ensure the index reflects current contents.
60-
61-
## References
62-
63-
- [../custom-instructions.md](../custom-instructions.md)
64-
- [./instructions.instructions.md](./instructions.instructions.md)
65-
- [../agents/agent.md](../agents/agent.md)
62+
- After editing instructions, rerun `node scripts/fix-instruction-references.js` and `scripts/clean-github-references.js` to enforce the allowed metadata and ensure no "References" or "See Also" blocks reappear.

.github/instructions/_index.instructions.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,4 @@ _index.instructions.md (Tier 2 navigator)
4949
*.instructions.md topic files (Tier 3 subjects)
5050
```
5151
- Tier 3 files should only reference `custom-instructions.md` and `_index.instructions.md` in their metadata.
52-
- Keep other links in body sections such as `## See Also`, `## Examples`, or `## Resources` so the metadata graph stays clean.
53-
- Document new instruction files and any path changes here to keep the catalog accurate.
54-
55-
## See Also
56-
- [Custom AI Instructions](../custom-instructions.md)
57-
- [AGENTS.md](../../AGENTS.md)
58-
- [Block Theme Build Agent spec](../agents/block-theme-build.agent.md)
59-
- [Block Theme Build & E2E workflow](../workflows/block-theme-build-and-e2e.yml)
60-
- [Instruction authoring guide](./instructions.instructions.md)
52+
- Keep other links in body sections such as `

.github/instructions/a11y.instructions.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,3 @@ Apply these instructions whenever adding or modifying markup, patterns, template
4747
- Manual: keyboard navigation (Tab/Shift+Tab/Esc) and visible focus.
4848
- Screen readers: spot-check with VoiceOver/NVDA for form labels and landmarks.
4949
- Quick checklist: semantic HTML and headings, visible focus, sufficient contrast, labelled form controls, ARIA only when necessary.
50-
51-
## References
52-
53-
- [WordPress Accessibility Handbook](https://make.wordpress.org/accessibility/handbook/)
54-
- [./html-markup.instructions.md](./html-markup.instructions.md)
55-
- [./block-theme-development.instructions.md](./block-theme-development.instructions.md)

.github/instructions/agent-spec.instructions.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,3 @@ Use this instruction file when drafting or reviewing any `.agent.md` in `.github
9090
- [ ] Three validation tasks cover typical, edge, and failure cases.
9191
- [ ] Observability requirements (logs/reports) are included.
9292
- [ ] Changelog updated and references (prompt/script/tests/workflow) are accurate.
93-
94-
## References
95-
96-
- [../agents/template.agent.md](../agents/template.agent.md)
97-
- [../agents/agent.md](../agents/agent.md)
98-
- [./instructions.instructions.md](./instructions.instructions.md)
99-
- [./copilot-ai-agent.instructions.md](./copilot-ai-agent.instructions.md)
100-
- [../workflows/block-theme-build-and-e2e.yml](../workflows/block-theme-build-and-e2e.yml)

.github/instructions/block-theme-development.instructions.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -360,12 +360,3 @@ Add `.editorconfig` for consistent indentation and formatting.
360360
- Run `npm run lint`, `npm run test`, and `npm run build` before merging changes.
361361
- Validate block comments in templates/parts and pattern metadata headers.
362362
- Check `theme.json` changes against the WordPress schema (e.g., VS Code schema validation).
363-
364-
## References
365-
366-
- [./theme-json.instructions.md](./theme-json.instructions.md)
367-
- [./wpcs-php.instructions.md](./wpcs-php.instructions.md)
368-
- [./javascript.instructions.md](./javascript.instructions.md)
369-
- [./wpcs-css.instructions.md](./wpcs-css.instructions.md)
370-
- [./html-markup.instructions.md](./html-markup.instructions.md)
371-
- [../custom-instructions.md](../custom-instructions.md)

.github/instructions/copilot-ai-agent.instructions.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -613,13 +613,3 @@ npm run lint -- --verbose
613613
- Run `npm run lint`, `npm run test`, `npm audit`, and `npm run coverage` when applicable.
614614
- Ensure reports and logs are stored under `logs/` and `.github/reports/` with ISO-dated filenames.
615615
- Verify naming and folder usage against `naming-conventions.instructions.md` and `FOLDER_STRUCTURE.md`.
616-
617-
## References
618-
619-
- [../custom-instructions.md](../custom-instructions.md)
620-
- [./reporting.instructions.md](./reporting.instructions.md)
621-
- [./naming-conventions.instructions.md](./naming-conventions.instructions.md)
622-
- [../../docs/GOVERNANCE.md](../../docs/GOVERNANCE.md)
623-
- [../../docs/ARCHITECTURE.md](../../docs/ARCHITECTURE.md)
624-
- [../../docs/FOLDER_STRUCTURE.md](../../docs/FOLDER_STRUCTURE.md)
625-
- [../../docs/LOGGING.md](../../docs/LOGGING.md)

.github/instructions/generate-theme.instructions.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -862,12 +862,3 @@ As an AI agent guiding theme generation:
862862
6. **Guide post-generation** setup and next steps
863863

864864
**Remember:** Mustache variables are simple string replacements. Your job is to collect valid values and pass them to the generator script. The script handles the actual replacement process.
865-
866-
## References
867-
868-
- [GENERATE_THEME.md](../../docs/GENERATE_THEME.md) - Complete generator system documentation
869-
- [generate-theme.prompt.md](../prompts/generate-theme.prompt.md) - User-facing generation prompt
870-
- [generate-theme.agent.md](../agents/generate-theme.agent.md) - Agent specification
871-
- [theme-json.instructions.md](./theme-json.instructions.md) - theme.json configuration guide
872-
- [theme-config.schema.json](../schemas/theme-config.schema.json) - JSON Schema for validation
873-
- [theme-config.template.json](../../theme-config.template.json) - Template config file

0 commit comments

Comments
 (0)