Skip to content

chore: consolidate documentation and create standardised prompts#637

Merged
ashleyshaw merged 7 commits into
developfrom
feat/doc-consolidation-and-prompts
May 31, 2026
Merged

chore: consolidate documentation and create standardised prompts#637
ashleyshaw merged 7 commits into
developfrom
feat/doc-consolidation-and-prompts

Conversation

@ashleyshaw
Copy link
Copy Markdown
Member

Summary

Streamlines repository documentation and creates a reusable prompts library for AI agents and scenarios. Eliminates 5 redundant documentation files while maintaining portable instructions for cross-repository use.

Changes

Documentation Consolidation

Labeling Documentation:

  • Consolidated docs/LABEL_STRATEGY.md, docs/ISSUE_LABELS.md, and docs/PR_LABELS.md into single comprehensive docs/LABELING.md (380+ lines)
  • New guide covers labeling strategy, label families, issue/PR/discussion labeling, agent integration, and best practices
  • Maintains portable instructions/labeling.instructions.md for cross-repository reusability

Automation Documentation:

  • Consolidated docs/AUTOMATION_GOVERNANCE.md and docs/WORKFLOWS.md into single docs/AUTOMATION.md (450+ lines)
  • New guide covers automation philosophy, branching strategy, workflow registry, governance, and configuration management
  • Maintains portable instructions/automation.instructions.md for cross-repository reusability

File Structure Corrections:

  • Moved workflow-coordination.md from nested .github/.github/docs/ to correct path docs/workflow-coordination.md
  • Updated instructions/DEPRECATED.md with deprecation index and migration guide for consolidated files

Standardised Prompts Directory

Created /prompts directory at repository root with 7 reusable prompt templates:

  1. agent-setup.prompt — Initial agent context, instructions, and operational guidelines
  2. code-generation.prompt — Code implementation, scaffolding, and generation scenarios
  3. documentation.prompt — Documentation creation, updates, and refinement workflows
  4. testing.prompt — Test suite creation, coverage improvement, and debugging
  5. code-review.prompt — Code review, quality feedback, and standards enforcement
  6. debugging.prompt — Problem diagnosis, root cause analysis, and resolution
  7. refactoring.prompt — Code refactoring, optimisation, and modernisation

Each prompt follows a consistent structure (Context, Task, Constraints, Acceptance Criteria, References) for reusability across agents and projects.

Added prompts/README.md with usage guide and contribution guidelines.

Benefits

  • ✅ Eliminated 5 redundant documentation files
  • ✅ Improved discoverability with canonical single sources of truth
  • ✅ Enhanced maintainability by reducing duplication
  • ✅ Established reusable prompt library for common agent scenarios
  • ✅ Clarified scope boundaries between docs/, instructions/, and .github/

Related Issue

Fixes #636

Test Plan

  • Review consolidated documentation files for accuracy and completeness
  • Verify all internal links in consolidated docs still work
  • Check that portable instructions maintain cross-repository reusability
  • Review prompt templates for consistency and usefulness
  • Confirm DEPRECATED.md accurately tracks consolidated files

Generated by Claude Code

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 31, 2026

Review Change Stack

Warning

Review limit reached

@ashleyshaw, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 29 minutes and 21 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 95854d42-7e57-4dba-8dd0-e82f8e592d30

📥 Commits

Reviewing files that changed from the base of the PR and between b368bf3 and 5e89625.

📒 Files selected for processing (21)
  • .github/workflows/metrics-summary.yml
  • CHANGELOG.md
  • agents/template.agent.md
  • docs/AUTOMATION.md
  • docs/AUTOMATION_GOVERNANCE.md
  • docs/ISSUE_LABELS.md
  • docs/LABELING.md
  • docs/LABEL_STRATEGY.md
  • docs/MIGRATION.md
  • docs/PR_LABELS.md
  • docs/WORKFLOWS.md
  • docs/WORKFLOW_COORDINATION.md
  • instructions/DEPRECATED.md
  • prompts/README.md
  • prompts/agent-setup.prompt
  • prompts/code-generation.prompt
  • prompts/code-review.prompt
  • prompts/debugging.prompt
  • prompts/documentation.prompt
  • prompts/refactoring.prompt
  • prompts/testing.prompt
📝 Walkthrough

Walkthrough

This PR executes Phase 1 and Phase 2 of the documentation consolidation initiative: it consolidates five overlapping labeling/automation guidance files into two canonical guides (AUTOMATION.md, LABELING.md), establishes a standardised prompts directory with seven reusable templates, updates migration tracking, refines the metrics workflow, and refreshes supporting references.

Changes

Documentation Consolidation & Migration

Layer / File(s) Summary
Consolidated automation and labeling guidance
docs/AUTOMATION.md, docs/LABELING.md
AUTOMATION.md introduces automation philosophy, branching strategy (develop/main), label and issue-type policy, workflow governance standards, and configuration management rules. LABELING.md rewrites label taxonomy, enforcement rules, and unified-agent workflow overview, replacing five fragmented files (AUTOMATION_GOVERNANCE.md, WORKFLOWS.md, LABEL_STRATEGY.md, ISSUE_LABELS.md, PR_LABELS.md).
Migration guide and deprecation index
docs/MIGRATION.md, instructions/DEPRECATED.md
MIGRATION.md now provides concrete link-correction steps for deprecated docs and lists portable instructions to reference. DEPRECATED.md expands from minimal v0.1.0 to comprehensive v1.0.0 index mapping consolidated files to their new canonical locations and rationale.

Standardized Prompts Directory

Layer / File(s) Summary
Prompts directory foundation
prompts/README.md
Documents the standardised /prompts directory, lists seven template files with usage examples, defines expected prompt structure (Context/Task/Constraints/Acceptance Criteria/References), and outlines contribution guidelines.
Reusable prompt templates
prompts/agent-setup.prompt, prompts/code-generation.prompt, prompts/code-review.prompt, prompts/debugging.prompt, prompts/documentation.prompt, prompts/refactoring.prompt, prompts/testing.prompt
Seven structured prompt templates with placeholder sections and guidance for common agent scenarios: agent onboarding, code implementation, code review/quality, production debugging, documentation creation, refactoring workflows, and test creation/debugging.

Workflow Refinement & Support Updates

Layer / File(s) Summary
Metrics-summary workflow refinement
.github/workflows/metrics-summary.yml
Job if: condition updated to gate post-to-discussions based on scheduled vs workflow_dispatch trigger; GitHub Script refactored to build discussion body via intermediate serverUrl/repository variables; category_id changed from string 'general' to numeric 1.
Changelog and reference updates
CHANGELOG.md, agents/template.agent.md
Adds [Unreleased] changelog entries documenting documentation consolidation and prompts directory creation; updates agent template "Agents Directory" link from ./README.md to ./agent.md.

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly Related PRs

  • lightspeedwp/.github#634: Both PRs modify .github/workflows/metrics-summary.yml—specifically the post-to-discussions job condition and discussion body construction logic.
  • lightspeedwp/.github#7: This PR replaces guidance previously introduced by consolidating/removing AUTOMATION_GOVERNANCE.md and creating AUTOMATION.md as the new canonical source.
  • lightspeedwp/.github#418: Overlaps by refactoring labeling guidance (especially ISSUE_LABELS.md removal) to align with canonical label family taxonomy.

Suggested Labels

documentation

Suggested Reviewers

  • krugazul
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description covers summary, detailed changes, benefits, related issue, and test plan. However, it lacks required sections like Risk Assessment and Linked Issues from the template. Add Risk Assessment and Changelog sections (Added/Changed/Fixed/Removed) to meet template requirements, and explicitly list the related issue number in the Linked Issues section.
Out of Scope Changes check ❓ Inconclusive All changes directly align with issue #636 scope: documentation consolidation, prompts directory creation, and deprecation tracking. The workflow file update (metrics-summary.yml) appears tangential. Clarify the purpose of the metrics-summary.yml workflow changes—whether they relate to issue #636 or represent separate maintenance work that should be in a distinct PR.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarises the main changes: documentation consolidation and creation of standardised prompts directory.
Linked Issues check ✅ Passed The PR successfully addresses all primary objectives from issue #636: documentation consolidation of labelling and automation files, standardised prompts creation, deprecation index updates, and path corrections.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/doc-consolidation-and-prompts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

ashleyshaw pushed a commit that referenced this pull request May 31, 2026
Adds YAML frontmatter to all prompt template files to meet LightSpeed
documentation standards. Each prompt now includes:
- file_type: 'prompt'
- title: Descriptive title
- description: Brief description of prompt purpose

Also adds frontmatter to prompts/README.md to comply with file validation.

Fixes frontmatter validation errors in PR #637.
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request consolidates and refines the repository's documentation structure by merging several redundant labeling and automation files into comprehensive guides (docs/LABELING.md and docs/AUTOMATION.md), deleting the deprecated files, and updating the deprecation index in instructions/DEPRECATED.md. It also introduces a standardized /prompts directory containing reusable prompt templates for AI agents. The reviewer feedback is highly constructive, pointing out broken relative links in docs/AUTOMATION.md, an incorrect path and naming convention violation in instructions/DEPRECATED.md, and recommending that the migration guide be relocated to a central /docs/MIGRATION.md file.

Comment thread docs/AUTOMATION.md Outdated
Comment thread instructions/DEPRECATED.md Outdated
Comment thread instructions/DEPRECATED.md
@github-actions github-actions Bot added status:needs-review Awaiting code review type:feature Feature or enhancement priority:normal Default priority area:ci Build and CI pipelines area:labels Label governance and routing area:documentation Docs & guides lang:md Markdown content/docs type:chore Chore / small hygiene change type:documentation Documentation meta:needs-changelog Requires a changelog entry before merge labels May 31, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 31, 2026

🔍 Reviewer Summary for PR #637

CI Status:success
Files changed: 21
Risk Distribution: 1 critical, 1 high, 0 medium, 19 low

Recommendations

  • ⚠️ 1 critical-risk file(s) modified (workflows, secrets)
  • ⚠️ Security-sensitive files modified (review carefully)
  • ⚠️ Large deletion detected (>500 lines removed)
  • ⚠️ Database migration without rollback plan documented

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 consolidates duplicated governance documentation into fewer canonical guides and introduces a reusable prompt-template library to standardise common AI/agent workflows across the repository.

Changes:

  • Consolidated labelling and automation/workflow documentation, removing redundant legacy docs and adding a workflow coordination reference.
  • Added a new /prompts directory containing standardised prompt templates plus a usage README.
  • Updated migration/deprecation docs and changelog; made a small adjustment to the metrics-summary workflow’s discussion-posting script.

Reviewed changes

Copilot reviewed 19 out of 20 changed files in this pull request and generated 27 comments.

Show a summary per file
File Description
prompts/agent-setup.prompt New reusable agent setup prompt template.
prompts/code-generation.prompt New code generation prompt template.
prompts/code-review.prompt New code review prompt template.
prompts/debugging.prompt New debugging prompt template.
prompts/documentation.prompt New documentation prompt template.
prompts/refactoring.prompt New refactoring prompt template.
prompts/testing.prompt New testing prompt template.
prompts/README.md Documents the prompts library and usage.
docs/LABELING.md Consolidates prior labelling docs into a single guide.
docs/AUTOMATION.md Consolidates automation/workflow governance docs into a single guide.
docs/WORKFLOW_COORDINATION.md Adds workflow coordination patterns/reference doc.
docs/MIGRATION.md Updates migration guidance for renamed/consolidated docs.
instructions/DEPRECATED.md Expanded deprecation index for consolidated/relocated docs.
CHANGELOG.md Records the consolidation and prompts-library changes.
.github/workflows/metrics-summary.yml Tweaks discussion body generation for weekly metrics summary posting.
docs/LABEL_STRATEGY.md Deleted (content consolidated into docs/LABELING.md).
docs/ISSUE_LABELS.md Deleted (content consolidated into docs/LABELING.md).
docs/PR_LABELS.md Deleted (content consolidated into docs/LABELING.md).
docs/AUTOMATION_GOVERNANCE.md Deleted (content consolidated into docs/AUTOMATION.md).
docs/WORKFLOWS.md Deleted (content consolidated into docs/AUTOMATION.md).

Comment thread instructions/DEPRECATED.md
Comment thread instructions/DEPRECATED.md
Comment thread instructions/DEPRECATED.md
Comment thread docs/MIGRATION.md
Comment thread prompts/README.md Outdated
Comment thread docs/MIGRATION.md
Comment on lines +74 to +77
#### Workflow Coordination Documentation

1. **Advance notice** (at least 2 releases or 1 month notice)
2. **Deprecation warnings** in documentation
3. **Migration guide** in this file
4. **Major version bump** when released
5. **Clear communication** to all stakeholders
- Any link to `.github/docs/workflow-coordination.md` → change to `docs/WORKFLOW_COORDINATION.md`

Comment thread CHANGELOG.md Outdated
Comment on lines +34 to +37
- Consolidated labeling documentation: merged `docs/LABEL_STRATEGY.md`, `docs/ISSUE_LABELS.md`, `docs/PR_LABELS.md` into single comprehensive `docs/LABELING.md` (now 380+ lines covering strategy, issue/PR/discussion labeling, agent integration, and best practices)
- Consolidated automation documentation: merged `docs/AUTOMATION_GOVERNANCE.md`, `docs/WORKFLOWS.md` into single `docs/AUTOMATION.md` (now 450+ lines covering strategy, governance, workflow registry, and configuration management)
- Corrected nested file path: moved `.github/.github/docs/workflow-coordination.md` to `.github/docs/workflow-coordination.md`
- Updated `instructions/DEPRECATED.md` with deprecation index and migration guide for consolidated files
Comment thread .github/workflows/metrics-summary.yml Outdated
Comment on lines 148 to 149
category_id: 'general'
});
Comment thread docs/LABELING.md
Comment on lines +292 to +296
### Configuration Files

- `.github/labels.yml` — Canonical label definitions, colors, and aliases
- `.github/labeler.yml` — File/branch-based label rules
- `.github/issue-types.yml` — Canonical issue type definitions
Comment thread prompts/README.md Outdated
@ashleyshaw ashleyshaw marked this pull request as ready for review May 31, 2026 11:50
@ashleyshaw ashleyshaw requested a review from Copilot May 31, 2026 11:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 19 out of 20 changed files in this pull request and generated 17 comments.

Comment thread prompts/README.md
Comment on lines +1 to +7
---
file_type: "prompt"
---
file_type: "prompt"
title: "Standardised Prompts Directory"
description: "Reusable prompt templates for agents and AI scenarios across LightSpeed projects"
---
Comment thread prompts/README.md
Comment on lines +19 to +20
- **[refactoring.prompt](./refactoring.prompt)** — Code refactoring, optimisation, and modernisation
## Usage
Comment thread docs/AUTOMATION.md Outdated
Comment on lines +89 to +99
1. **Justification:** Document why the label is needed
3. **Naming Convention:** Follow `family:name` format (e.g., `status:in-progress`, `area:ci`)
4. **Colour Coding:** Use category-appropriate colours:
- Status: Blue tones
- Priority: Red/Orange gradient
- Type: Green (features), Red (bugs), Purple (docs)
- Area/Component: Light blue
- Meta: Grey
- Meta: Grey
5. **Description:** Provide clear, concise purpose
6. **Documentation:** Update [Labeling Guide](./LABELING.md) with new label details
Comment thread .github/workflows/metrics-summary.yml Outdated
Comment on lines +138 to +141
const reportContent = `${{ steps.read_report.outputs.content }}`;
const serverUrl = `${{ github.server_url }}`;
const repository = `${{ github.repository }}`;
const body = reportContent + '\n\n---\n\n*Generated by metrics-summary workflow. [View full reports](' + serverUrl + '/' + repository + '/tree/develop/.github/reports/metrics/)*';
Comment thread prompts/debugging.prompt Outdated

# Debugging Prompt Template

Use this prompt when diagnosing problems, analyzing root causes, or resolving issues.
Comment thread prompts/testing.prompt Outdated
Comment on lines +74 to +75
- Assert [specific output/behavior for test 1]
- Assert [specific output/behavior for test 2]
Comment thread prompts/testing.prompt Outdated

### Test Structure

```
Comment on lines +9 to +10
Use this prompt when planning code refactoring, optimisation, or modernisation.
## Context
Comment thread prompts/refactoring.prompt Outdated
### In Scope

- [Files/modules to refactor]
- [Patterns/approaches to modernize]
Comment thread docs/AUTOMATION.md Outdated
Comment on lines +89 to +99
1. **Justification:** Document why the label is needed
3. **Naming Convention:** Follow `family:name` format (e.g., `status:in-progress`, `area:ci`)
4. **Colour Coding:** Use category-appropriate colours:
- Status: Blue tones
- Priority: Red/Orange gradient
- Type: Green (features), Red (bugs), Purple (docs)
- Area/Component: Light blue
- Meta: Grey
- Meta: Grey
5. **Description:** Provide clear, concise purpose
6. **Documentation:** Update [Labeling Guide](./LABELING.md) with new label details
ashleyshaw pushed a commit that referenced this pull request May 31, 2026
…ter validation, code fence language tags, template injection security, and documentation fixes
@coderabbitai coderabbitai Bot requested a review from krugazul May 31, 2026 13:21
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 19

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@CHANGELOG.md`:
- Around line 33-39: Choose approach 1 (keep the actual filename
`docs/LABELING.md` and change the prose to UK spelling): update the entry to use
"labelling" everywhere in the description (e.g., change "issue/PR/discussion
labeling" to "issue/PR/discussion labelling") while leaving the filename
`docs/LABELING.md` as-is, and wrap the nested path
`.github/.github/docs/workflow-coordination.md` in backticks for consistency;
ensure all other occurrences in this entry follow UK English (optimise,
organisation, colour, behaviour, analyse).

In `@docs/AUTOMATION.md`:
- Line 163: The heading "Labeling and label sync workflows" and other
occurrences use US spelling; change them to UK English ("Labelling" and
"labelling") where the word describes the process (not filenames). Update the
text in docs/AUTOMATION.md — specifically the heading currently "Labeling and
label sync workflows" and the other two instances referenced — to use
"Labelling" in prose and keep filenames unchanged if any; ensure consistency
across the document (e.g., "labelling", "label sync workflows") so all process
descriptions follow UK spelling conventions.
- Around line 1-5: The frontmatter in AUTOMATION.md is missing required YAML
fields; update the frontmatter block (the existing keys file_type, title,
description) to include version, last_updated, owners, tags, status, stability,
and domain by adding those keys with appropriate values (e.g., version: "1.0",
last_updated: "YYYY-MM-DD", owners: ["team@org.com"], tags:
["automation","workflow"], status: "draft|active", stability:
"stable|experimental", domain: "engineering"). Ensure the YAML remains at the
top of the file and follows the same formatting style as the existing
frontmatter so all required metadata is present.
- Line 139: Update the UK English spelling in the docs by changing the phrase
"**Automation:** The labeling agent applies `type:*` labels based on issue type
field and title/body heuristics" to use "labelling" instead of "labeling";
search the AUTOMATION.md file for any other occurrences of "labeling" (e.g., the
phrase "labeling agent" or similar) and replace them with "labelling" so the
documentation conforms to the project's UK English wording standard.
- Line 66: Update the purpose text in the AUTOMATION.md table row that
references labeling.yml / labeling.agent.js: change "Unified labeling,
status/priority, and type automation" to UK English spelling "Unified labelling,
status/priority, and type automation" (keep the filename labeling.yml
unchanged); ensure any other occurrences in that row or nearby description use
"labelling" to comply with the project's UK English guideline.
- Around line 131-134: Update descriptive copy to UK English by replacing
occurrences of "labeling" with "labelling" in prose only: change "Labeling
Guide" display text to "Labelling Guide" (keep the link target ./LABELING.md
unchanged), change "labeling agent" to "labelling agent", and change "Automated
standardisation: The labeling agent ..." to use "labelling" while leaving the
filename `.github/labels.yml` and any file names or paths unchanged.

In `@docs/LABELING.md`:
- Line 154: Update the US spelling "Labeling" to UK English "Labelling" in the
document: replace the section heading "## Issue Labeling" and any other
occurrences of "Labeling" (notably the other headings/text instances referenced)
with "Labelling" so all headings and mentions use UK spelling consistently
across the file.
- Line 174: Replace US spelling "labeling" with UK spelling "labelling" in
descriptive text occurrences (e.g., the sentence "The unified labeling agent
enforces one-hot rules (exactly one status, one priority, one type)") and the
other mentioned descriptive passages; do not change filenames. Search for the
token "labeling" in the document content (not file names) and update each
occurrence to "labelling" while preserving surrounding wording and punctuation.
- Around line 1-5: The frontmatter block is missing required YAML keys; update
the existing frontmatter (the top --- block) to include version, last_updated,
owners, tags, status, stability, and domain, using a semantic version string for
version (e.g., "1.0.0"), an ISO date for last_updated, an array of owner
usernames/emails for owners, an array of tag strings for tags, a status value
(e.g., "draft" or "released"), a stability value (e.g., "stable" or
"experimental"), and a domain string; ensure keys are added alongside the
existing file_type, title, and description so the frontmatter conforms to
repository guidelines.
- Around line 1-7: Update the document metadata title and the main heading to
use UK English spelling: replace "GitHub Labeling & Automation" with "GitHub
Labelling & Automation" in the frontmatter title and change the H1 heading from
"# GitHub Labeling & Automation" to "# GitHub Labelling & Automation" so both
the file_type/title metadata and the heading text are consistent with the
project's UK English guideline.
- Around line 15-19: The TOC uses US spelling "Labeling" but the project uses UK
English; update all occurrences in the Table of Contents from "Labeling" to
"Labelling" (for example change "Issue Labeling", "Pull Request Labeling",
"Discussion Labeling" to "Issue Labelling", "Pull Request Labelling",
"Discussion Labelling") and ensure any internal anchor links or corresponding
section headings that contain "Labeling" are renamed to match the UK spelling so
anchors remain consistent (search for the string "Labeling" and replace with
"Labelling" in headings/links such as the existing "[Label Categories &
Families](`#label-categories--families`)" entries).

In `@docs/MIGRATION.md`:
- Line 20: Update the heading text "Labeling Documentation (Consolidated)" to
use UK English by changing it to "Labelling Documentation (Consolidated)"; also
scan the same document for the other occurrences mentioned (the strings at the
other noted locations) and replace US spellings with their UK equivalents (e.g.,
"labeling" → "labelling", "optimize" → "optimise") so the docs consistently
follow UK English orthography.
- Around line 1-8: The YAML frontmatter at the top (file_type, title,
description, version, last_updated, owners) is missing the required keys tags,
status, stability, and domain; update the frontmatter block by adding those four
keys with appropriate values (e.g., tags: [...], status: "draft|published",
stability: "stable|experimental", domain: "docs|api|guides") directly in the
existing YAML header so the file complies with the repository guideline that all
.md files include file_type, title, description, version, last_updated, owners,
tags, status, stability, and domain.

In `@instructions/DEPRECATED.md`:
- Around line 1-8: The frontmatter in DEPRECATED.md is missing required fields;
update the YAML block at the top of the file (the existing keys file_type,
title, description, version, last_updated, owners) to also include the required
keys tags, status, stability, and domain with appropriate values (e.g., tags:
[...], status: "deprecated" or "active", stability: "stable|beta|deprecated",
domain: "documentation|platform|..." as applicable) so the file conforms to the
repository frontmatter policy.
- Line 18: Replace the US spelling in the markdown heading "### Labeling
Documentation (Consolidated)" with UK English by changing it to "### Labelling
Documentation (Consolidated)"; ensure any other occurrences flagged (e.g., the
one noted at the other location) also use "Labelling" to conform with the
project's UK English wording convention.

In `@prompts/agent-setup.prompt`:
- Around line 1-5: Rename the template file prompts/agent-setup.prompt to
prompts/agent-setup.prompt.md and update its YAML frontmatter to satisfy the
prompt contract and repo docs schema: add required keys version, scope, role,
tags, inputs, outputs (with brief schemas/placeholders) and repo metadata
last_updated, author, maintainer, owners, status, stability, domain; ensure the
frontmatter is properly delimited with --- and retains existing file_type,
title, and description, and keep the body content unchanged aside from the
frontmatter rename and additions so discovery via
instructions/prompt.instructions.md and metadata validation succeed.

In `@prompts/documentation.prompt`:
- Around line 71-78: Update the example YAML frontmatter block so it includes
all required fields instead of the minimal set shown; specifically add version,
last_updated, owners, tags, stability, and domain alongside the existing
file_type, title, description, and status, and ensure the example uses realistic
placeholders (e.g., version: [e.g., 1.0.0], last_updated: [YYYY-MM-DD], owners:
[e.g., ["`@username`"]], tags: [e.g., ["documentation","guide"]], stability:
[stable/experimental/deprecated], domain: [e.g., automation/governance/tooling])
so users copying the example will produce complete frontmatter.

In `@prompts/README.md`:
- Around line 1-5: The frontmatter in the prompt file is missing required
fields; update the YAML frontmatter at the top of the file that currently
contains file_type, title, description to also include the required keys:
version, last_updated, owners, tags, status, stability, and domain (use the
existing title "Standardised Prompts Directory" as the document title). Populate
version with a semantic version like "1.0.0", last_updated with the current ISO
date, owners with an array of owner identifiers, tags with relevant keywords,
status with a repo-approved state (e.g., "draft" or "stable"), stability with a
value like "stable" or "experimental", and domain with the appropriate domain
string so the frontmatter block fully satisfies the repository guidelines.
- Around line 13-17: The README list of prompt templates is missing two entries;
add links for the missing templates by inserting
**[code-review.prompt](./code-review.prompt)** and
**[debugging.prompt](./debugging.prompt)** into the existing list so all seven
templates are listed alongside the existing **agent-setup.prompt**,
**code-generation.prompt**, **documentation.prompt**, **testing.prompt**, and
**refactoring.prompt** entries; ensure ordering and markdown style match the
surrounding items.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: ce9eb47a-ff5c-404b-848b-a140f314cb55

📥 Commits

Reviewing files that changed from the base of the PR and between b30046c and b368bf3.

📒 Files selected for processing (21)
  • .github/workflows/metrics-summary.yml
  • CHANGELOG.md
  • agents/template.agent.md
  • docs/AUTOMATION.md
  • docs/AUTOMATION_GOVERNANCE.md
  • docs/ISSUE_LABELS.md
  • docs/LABELING.md
  • docs/LABEL_STRATEGY.md
  • docs/MIGRATION.md
  • docs/PR_LABELS.md
  • docs/WORKFLOWS.md
  • docs/WORKFLOW_COORDINATION.md
  • instructions/DEPRECATED.md
  • prompts/README.md
  • prompts/agent-setup.prompt
  • prompts/code-generation.prompt
  • prompts/code-review.prompt
  • prompts/debugging.prompt
  • prompts/documentation.prompt
  • prompts/refactoring.prompt
  • prompts/testing.prompt
💤 Files with no reviewable changes (5)
  • docs/AUTOMATION_GOVERNANCE.md
  • docs/WORKFLOWS.md
  • docs/ISSUE_LABELS.md
  • docs/LABEL_STRATEGY.md
  • docs/PR_LABELS.md
📜 Review details
🧰 Additional context used
📓 Path-based instructions (7)
**/*.{md,mdx,yaml,yml}

📄 CodeRabbit inference engine (CLAUDE.md)

Use UK English throughout (optimise, organisation, colour, behaviour)

Files:

  • agents/template.agent.md
  • instructions/DEPRECATED.md
  • prompts/README.md
  • docs/LABELING.md
  • CHANGELOG.md
  • docs/AUTOMATION.md
  • docs/MIGRATION.md
**/*.md

📄 CodeRabbit inference engine (.github/instructions/markdown.instructions.md)

**/*.md: Use one H1 (#) per file; keep heading levels sequential (never skip from H2 to H4)
Use fenced code blocks with explicit language tags (bash, yaml, markdown, etc.)
Keep links relative for in-repo files; verify they resolve before merging
Use 1. for ordered lists and - for unordered lists
Keep all wording in UK English (optimise, organisation, colour, behaviour, analyse)
Do not add a references: frontmatter field — use inline links or a footer section instead
Blank lines before and after headings, code blocks, and block-level elements
Maximum line length: 120 characters (soft limit; prefer wrapping at natural sentence boundaries)
All .md files in this repository should include YAML frontmatter with required fields: file_type, title, description, version, last_updated, owners, tags, status, stability, domain
Every image (![]()) must have descriptive alt text explaining the image's purpose, not its appearance. Empty alt (![ ]()) is valid only for purely decorative images
Link text must describe the destination — never use 'click here', 'read more', or bare URLs as visible text
Every table must have a header row (| Header |). Avoid merged cells
Use headings to communicate document structure, not for visual styling
Do not rely on colour alone to convey information in diagrams or callout blocks
Mermaid diagrams must include accTitle and accDescr attributes for accessibility
Specify language in frontmatter; use plain language, avoid jargon where possible

Files:

  • agents/template.agent.md
  • instructions/DEPRECATED.md
  • prompts/README.md
  • docs/LABELING.md
  • CHANGELOG.md
  • docs/AUTOMATION.md
  • docs/MIGRATION.md
**/{agents,ai}/**/*.{js,py,ts,tsx,md}

📄 CodeRabbit inference engine (AGENTS.md)

Each AI agent must have both a code file (.js, .py, etc.) and a spec (.md) following the agent template

Files:

  • agents/template.agent.md
instructions/**

⚙️ CodeRabbit configuration file

instructions/**: Review portable instruction files:

  • Verify frontmatter follows the canonical pattern (file_type, version, last_updated, owners, tags, status, domain, stability).
  • Flag any references: frontmatter field — prohibited by CLAUDE.md.
  • Confirm the file has: Overview, General Rules, Detailed Guidance, Examples, Validation, and Cross-References sections.
  • Check that language is UK English throughout.

Files:

  • instructions/DEPRECATED.md
**/docs/**/*.md

⚙️ CodeRabbit configuration file

**/docs/**/*.md: Review documentation files:

  • Ensure markdown is linted and formatted per project style guides.
  • Flag illogical folder structures, file naming, or misplaced content.
  • Confirm documentation is up to date, accurate, and cross-referenced.
  • Ensure accessibility (heading hierarchy, alt text for images, UK English).

Files:

  • docs/LABELING.md
  • docs/AUTOMATION.md
  • docs/MIGRATION.md
CHANGELOG.md

⚙️ CodeRabbit configuration file

CHANGELOG.md: Review CHANGELOG.md:

  • Confirm entries follow Keep a Changelog 1.1.0 format.
  • Each entry under [Unreleased] must include a PR link and issue link.
  • Verify entries use the correct section headings (Added, Changed, Fixed, Deprecated, Removed, Security, Documentation, Performance).
  • Check UK English spelling throughout.

Files:

  • CHANGELOG.md
**/.github/workflows/*.yml

⚙️ CodeRabbit configuration file

**/.github/workflows/*.yml: Review GitHub Actions workflows for this governance repo:

  • Security: check for least-privilege permissions (use permissions: at job level, default to read-only).
  • Secret handling: ensure secrets are passed via env vars, not interpolated directly into run: steps to prevent injection.
  • Action pinning: prefer SHA-pinned actions over mutable tags (e.g. actions/checkout@v4 is acceptable; SHA pins are better).
  • No pull_request_target with untrusted code execution unless explicitly justified.
  • Avoid storing sensitive outputs as unmasked step outputs.
  • Check for reusable workflow patterns and matrix strategies where appropriate.
  • Validate on: triggers: ensure branch/path filters are present to avoid unnecessary runs.
  • Confirm workflows are documented, DRY, and maintainable.
  • Ensure agent-triggered workflows use workflow_dispatch with defined inputs.

Files:

  • .github/workflows/metrics-summary.yml
🪛 LanguageTool
instructions/DEPRECATED.md

[uncategorized] ~53-~53: The official name of this software platform is spelled with a capital “H”.
Context: ...| Change Reason | | --- | --- | --- | | .github/.github/docs/workflow-coordination.md ...

(GITHUB)


[uncategorized] ~53-~53: The official name of this software platform is spelled with a capital “H”.
Context: ...docs/WORKFLOW_COORDINATION.md| Nested.github` directory removed; renamed to uppercas...

(GITHUB)


[duplication] ~79-~79: Possible typo: you repeated a word.
Context: ...d) — Consolidated labeling strategy and automation - Automation Guide — Consoli...

(ENGLISH_WORD_REPEAT_RULE)


[style] ~81-~81: Would you like to use the Oxford spelling “organization”? The spelling ‘organisation’ is also correct.
Context: ...CLAUDE.md#repository-boundaries) — File organisation conventions ---

(OXFORD_SPELLING_Z_NOT_S)

prompts/README.md

[style] ~7-~7: Would you like to use the Oxford spelling “Standardized”? The spelling ‘Standardised’ is also correct.
Context: ...rios across LightSpeed projects" --- # Standardised Prompts This directory contains reusab...

(OXFORD_SPELLING_Z_NOT_S)


[style] ~9-~9: Would you like to use the Oxford spelling “customize”? The spelling ‘customise’ is also correct.
Context: ...pts as starting points for common tasks—customise as needed for your specific context. #...

(OXFORD_SPELLING_Z_NOT_S)


[style] ~17-~17: Would you like to use the Oxford spelling “optimization”? The spelling ‘optimisation’ is also correct.
Context: ...factoring.prompt)** — Code refactoring, optimisation, and modernisation ## Usage Each prom...

(OXFORD_SPELLING_Z_NOT_S)


[style] ~17-~17: Would you like to use the Oxford spelling “modernization”? The spelling ‘modernisation’ is also correct.
Context: ...* — Code refactoring, optimisation, and modernisation ## Usage Each prompt is designed to b...

(OXFORD_SPELLING_Z_NOT_S)


[style] ~23-~23: Would you like to use the Oxford spelling “Customizable”? The spelling ‘Customisable’ is also correct.
Context: ...ge Each prompt is designed to be: - Customisable: Adapt sections to your project conte...

(OXFORD_SPELLING_Z_NOT_S)

docs/LABELING.md

[uncategorized] ~29-~29: The official name of this software platform is spelled with a capital “H”.
Context: ...ollow a shared, canonical taxonomy (see .github/labels.yml). - Discoverability: La...

(GITHUB)


[style] ~38-~38: Would you like to use the Oxford spelling “organization”? The spelling ‘organisation’ is also correct.
Context: ...nonical labels use a family prefix. The organisation recognises the following label families...

(OXFORD_SPELLING_Z_NOT_S)


[style] ~38-~38: Would you like to use the Oxford spelling “recognizes”? The spelling ‘recognises’ is also correct.
Context: ...s use a family prefix. The organisation recognises the following label families: ### Stat...

(OXFORD_SPELLING_Z_NOT_S)


[style] ~76-~76: Would you like to use the Oxford spelling “optimization”? The spelling ‘optimisation’ is also correct.
Context: ...ange - type:performance — Performance optimisation - type:security — Security-related ch...

(OXFORD_SPELLING_Z_NOT_S)


[style] ~92-~92: Would you like to use the Oxford spelling “optimization”? The spelling ‘optimisation’ is also correct.
Context: ...ards - area:performance — Performance optimisation - Other areas as needed **Component la...

(OXFORD_SPELLING_Z_NOT_S)


[misspelling] ~112-~112: This word is normally spelled as one.
Context: ...hase:** phase:1, phase:2, etc. (for multi-phase projects) - Device/Platform: `devic...

(EN_COMPOUNDS_MULTI_PHASE)


[uncategorized] ~170-~170: The official name of this software platform is spelled with a capital “H”.
Context: ...s or scope evolves - Labeler rules: .github/labeler.yml can auto-apply labels base...

(GITHUB)


[uncategorized] ~216-~216: Loose punctuation mark.
Context: ...s needed for your projects): - proto/, ds/, api/, schema/ — Product/desi...

(UNLIKELY_OPENING_PUNCTUATION)


[style] ~263-~263: Would you like to use the Oxford spelling “standardization”? The spelling ‘standardisation’ is also correct.
Context: ...tatus enforcement, type assignment, and standardisation are handled by the **unified labeling a...

(OXFORD_SPELLING_Z_NOT_S)


[uncategorized] ~263-~263: The official name of this software platform is spelled with a capital “H”.
Context: ...g.agent.js) and **labeling workflow** (.github/workflows/labeling.yml`). **How it wor...

(GITHUB)


[uncategorized] ~268-~268: The official name of this software platform is spelled with a capital “H”.
Context: ...s 2. Reads canonical configuration from .github/labels.yml, .github/labeler.yml, and...

(GITHUB)


[uncategorized] ~268-~268: The official name of this software platform is spelled with a capital “H”.
Context: ...onfiguration from .github/labels.yml, .github/labeler.yml, and `.github/issue-types....

(GITHUB)


[style] ~288-~288: Would you like to use the Oxford spelling “standardization”? The spelling ‘standardisation’ is also correct.
Context: ...abel-reporting.js| Build labeling and standardisation reports | |type-lookup.js` | Load iss...

(OXFORD_SPELLING_Z_NOT_S)


[uncategorized] ~308-~308: The official name of this software platform is spelled with a capital “H”.
Context: ...ually adjust when needed. 5. Refer to .github/labels.yml as the source of truth fo...

(GITHUB)


[uncategorized] ~309-~309: Do not mix variants of the same word (‘organise’ and ‘organize’) within a single text.
Context: ...scussion labels** to keep conversations organised and welcoming. 7. **Review and clean up...

(EN_WORD_COHERENCY)


[uncategorized] ~319-~319: The official name of this software platform is spelled with a capital “H”.
Context: ...Missing or incorrect labels?** - Check .github/labels.yml for missing/typo entries - ...

(GITHUB)


[uncategorized] ~331-~331: The official name of this software platform is spelled with a capital “H”.
Context: ...new label or modify rules?** 1. Update .github/labels.yml with the new canonical defi...

(GITHUB)


[uncategorized] ~332-~332: The official name of this software platform is spelled with a capital “H”.
Context: ... the new canonical definition 2. Update .github/labeler.yml if you need automatic appl...

(GITHUB)


[uncategorized] ~339-~339: The official name of this software platform is spelled with a capital “H”.
Context: ...quivalents - If a label persists, check .github/label-governance-policy.yml for except...

(GITHUB)

CHANGELOG.md

[uncategorized] ~34-~34: Do not mix variants of the same word (‘labelling’ and ‘labeling’) within a single text.
Context: ...` (covers strategy, issue/PR/discussion labelling, agent integration, and best practices)...

(EN_EXACT_COHERENCY_RULE)


[uncategorized] ~36-~36: The official name of this software platform is spelled with a capital “H”.
Context: ...) - Corrected nested file path: moved .github/.github/docs/workflow-coordination.md ...

(GITHUB)


[style] ~41-~41: Would you like to use the Oxford spelling “Standardized”? The spelling ‘Standardised’ is also correct.
Context: ...//issues/636)) - Standardised Prompts Directory — Created `/prompts...

(OXFORD_SPELLING_Z_NOT_S)


[style] ~48-~48: Would you like to use the Oxford spelling “optimization”? The spelling ‘optimisation’ is also correct.
Context: ...refactoring.prompt` — Code refactoring, optimisation, and modernisation workflows - Each p...

(OXFORD_SPELLING_Z_NOT_S)


[style] ~48-~48: Would you like to use the Oxford spelling “modernization”? The spelling ‘modernisation’ is also correct.
Context: ...` — Code refactoring, optimisation, and modernisation workflows - Each prompt follows consi...

(OXFORD_SPELLING_Z_NOT_S)

docs/AUTOMATION.md

[grammar] ~53-~53: The plural noun “Workflows” cannot be used with the article “a”.
Context: ...o main only for tagging and deploying a release - Workflows: Release, Tag, Publish, Deployment ###...

(A_NNS)


[uncategorized] ~66-~66: Do not mix variants of the same word (‘labeling’ and ‘labelling’) within a single text.
Context: ...| Agent | | --- | --- | --- | --- | | labeling.yml | develop | Unified labeling, sta...

(EN_EXACT_COHERENCY_RULE)


[uncategorized] ~66-~66: Do not mix variants of the same word (‘labeling’ and ‘labelling’) within a single text.
Context: ... | labeling.yml | develop | Unified labeling, status/priority, and type automation |...

(EN_EXACT_COHERENCY_RULE)


[uncategorized] ~66-~66: Do not mix variants of the same word (‘labeling’ and ‘labelling’) within a single text.
Context: ... status/priority, and type automation | labeling.agent.js | | changelog-validate.yml...

(EN_EXACT_COHERENCY_RULE)


[style] ~73-~73: Would you like to use the Oxford spelling “organization”? The spelling ‘organisation’ is also correct.
Context: ...rics.yml** | develop | Track and report organisation metrics | metrics.agent.js | --- ## L...

(OXFORD_SPELLING_Z_NOT_S)


[duplication] ~124-~124: Possible typo: you repeated a word.
Context: ...:** - Alternative status/priority/type labels - Labels conflicting with canonical naming **Do...

(ENGLISH_WORD_REPEAT_RULE)


[uncategorized] ~131-~131: Do not mix variants of the same word (‘labeling’ and ‘labelling’) within a single text.
Context: ... one type:* per issue/PR (enforced by labeling agent) - Minimum requirements: See ...

(EN_EXACT_COHERENCY_RULE)


[style] ~134-~134: Would you like to use the Oxford spelling “standardization”? The spelling ‘standardisation’ is also correct.
Context: ...s in .github/labels.yml - Automated standardisation: The labeling agent removes non-canon...

(OXFORD_SPELLING_Z_NOT_S)


[uncategorized] ~134-~134: Do not mix variants of the same word (‘labeling’ and ‘labelling’) within a single text.
Context: ...l` - Automated standardisation: The labeling agent removes non-canonical labels and ...

(EN_EXACT_COHERENCY_RULE)


[uncategorized] ~139-~139: Do not mix variants of the same word (‘labeling’ and ‘labelling’) within a single text.
Context: .../issue-types.yml- **Automation:** The labeling agent appliestype:*` labels based on ...

(EN_EXACT_COHERENCY_RULE)


[uncategorized] ~215-~215: The official name of this software platform is spelled with a capital “H”.
Context: ... Required | | --- | --- | --- | --- | | .github/labels.yml | Label definitions, colour...

(GITHUB)


[uncategorized] ~216-~216: The official name of this software platform is spelled with a capital “H”.
Context: ...ses | Governance Team | 2 approvals | | .github/labeler.yml | File/branch-based label ...

(GITHUB)


[uncategorized] ~217-~217: The official name of this software platform is spelled with a capital “H”.
Context: ...les | Governance Team | 2 approvals | | .github/issue-types.yml | Issue type definitio...

(GITHUB)


[uncategorized] ~224-~224: Do not mix variants of the same word (‘labeling’ and ‘labelling’) within a single text.
Context: ...idate-labeling-configs.cjs` runs on all labeling PRs - Deployment: Configuration is ...

(EN_EXACT_COHERENCY_RULE)


[uncategorized] ~238-~238: Do not mix variants of the same word (‘labeling’ and ‘labelling’) within a single text.
Context: ...beling Guide](./LABELING.md) — Complete labeling strategy and label families - [Canonica...

(EN_EXACT_COHERENCY_RULE)

docs/MIGRATION.md

[style] ~49-~49: Consider using a different verb for a more formal wording.
Context: ...ollowing files were moved or renamed to correct structural issues and enforce naming co...

(FIX_RESOLVE)


[uncategorized] ~53-~53: The official name of this software platform is spelled with a capital “H”.
Context: ...| Change Reason | | --- | --- | --- | | .github/docs/workflow-coordination.md | `docs/...

(GITHUB)


[uncategorized] ~76-~76: The official name of this software platform is spelled with a capital “H”.
Context: ...ordination Documentation - Any link to .github/docs/workflow-coordination.md → change...

(GITHUB)


[duplication] ~103-~103: Possible typo: you repeated a word.
Context: ...d) — Consolidated labeling strategy and automation - Automation Guide — Consolidated ...

(ENGLISH_WORD_REPEAT_RULE)


[style] ~106-~106: Would you like to use the Oxford spelling “organization”? The spelling ‘organisation’ is also correct.
Context: ...CLAUDE.md#repository-boundaries) — File organisation conventions --- *Last updated: 2026-0...

(OXFORD_SPELLING_Z_NOT_S)

🪛 zizmor (1.25.2)
.github/workflows/metrics-summary.yml

[info] 138-138: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)

🔇 Additional comments (10)
.github/workflows/metrics-summary.yml (3)

102-106: LGTM!


138-141: ⚡ Quick win

Nicely refactored discussion body construction! 🎯

The intermediate variables (serverUrl, repository) make the link construction much clearer, and using toJson(...) to wrap the report content properly escapes special characters—this is actually the correct mitigation against injection, not a risk. The static analysis hint is a false positive here since the content originates from a repository-controlled file on the develop branch, not untrusted user input.


148-148: ⚡ Quick win

Recheck category_id: 1—can’t confirm against repo Discussion categories with current environment.

The earlier gh api graphql call failed because the owner/repo arguments were wrong, and the follow-up script also errored (nl not found), so we still don’t have a category list to confirm whether node ID 1 exists (and is the intended “general”/default category).

agents/template.agent.md (1)

122-122: LGTM!

CHANGELOG.md (1)

41-50: ⚡ Quick win

Standardised Prompts Directory: all seven templates are present ✅
The changelog’s seven prompt files all exist: prompts/agent-setup.prompt, prompts/code-generation.prompt, prompts/documentation.prompt, prompts/testing.prompt, prompts/code-review.prompt, prompts/debugging.prompt, and prompts/refactoring.prompt.
Double-check that prompts/README.md also lists all seven (not just the five seen in the snippet) so the docs don’t leave anyone guessin’.

prompts/code-generation.prompt (1)

1-92: LGTM!

prompts/code-review.prompt (1)

1-143: LGTM!

prompts/debugging.prompt (1)

1-146: LGTM!

prompts/refactoring.prompt (1)

1-178: LGTM!

prompts/testing.prompt (1)

1-129: LGTM!

Comment thread CHANGELOG.md
Comment thread docs/AUTOMATION.md
Comment thread docs/AUTOMATION.md Outdated
Comment thread docs/AUTOMATION.md Outdated
Comment thread docs/AUTOMATION.md Outdated
Comment thread instructions/DEPRECATED.md Outdated
Comment on lines +1 to +5
---
file_type: "prompt"
title: "Agent Setup Prompt Template"
description: "Initial agent context, instructions, and operational guidelines"
---
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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if .prompt.md is the canonical extension per instructions
rg -n "prompt.md" instructions/prompt.instructions.md

# Check if there are other .prompt.md files in the repo
fd -e prompt.md -t f

Repository: lightspeedwp/.github

Length of output: 195


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) Pull required frontmatter fields from instructions
echo "=== instructions/prompt.instructions.md (frontmatter requirements) ==="
rg -n "version|last_updated|owners|tags|status|stability|domain|file_type|title|description" instructions/prompt.instructions.md
echo

# 2) List all prompt template files currently present
echo "=== Files matching *.prompt (excluding *.prompt.md) ==="
fd -t f -e prompt | rg '\.prompt$' || true
echo

echo "=== Files matching *.prompt.md ==="
fd -t f -e md | rg '\.prompt\.md$' || true
echo

# 3) For the specific file mentioned in the review comment, show its YAML frontmatter block
TARGET="prompts/agent-setup.prompt"
if [ -f "$TARGET" ]; then
  echo "=== YAML frontmatter for $TARGET ==="
  awk 'NR==1{found=0} found==0 && $0=="---"{found=1} found==1{print; if($0=="---" && NR!=1){exit}}' "$TARGET"
else
  echo "=== Expected file not found: $TARGET ==="
  # try to locate similarly named file(s)
  fd -t f "agent-setup.prompt" || true
fi

# 4) Parse all *.prompt files under any prompts/ directory for frontmatter keys
echo
echo "=== Frontmatter key audit for all *.prompt files ==="
python3 - <<'PY'
import subprocess, re, pathlib, sys

def sh(cmd):
    return subprocess.check_output(cmd, shell=True, text=True).splitlines()

# get candidate files: any file ending with .prompt under paths containing 'prompts/'
paths = sh("fd -t f -e prompt | rg '/?prompts/.+\\.prompt$' || true")
if not paths:
    # fallback: if 'prompts/' isn't in path, still consider .prompt files
    paths = sh("fd -t f -e prompt | rg '\\.prompt$' || true")

req_keys = ["file_type","title","description","version","last_updated","owners","tags","status","stability","domain"]

def parse_frontmatter(p):
    txt = pathlib.Path(p).read_text(encoding="utf-8", errors="ignore").splitlines()
    if not txt or txt[0] != '---':
        return None
    # find closing ---
    end = None
    for i in range(1, len(txt)):
        if txt[i].strip() == '---':
            end = i
            break
    if end is None:
        return None
    block = "\n".join(txt[1:end])
    keys = set()
    for line in block.splitlines():
        m = re.match(r'^([A-Za-z0-9_]+)\s*:', line.strip())
        if m:
            keys.add(m.group(1))
    return keys

rows=[]
for p in paths:
    keys = parse_frontmatter(p)
    if keys is None:
        rows.append((p, "NO_FRONT_MATTER"))
        continue
    missing = [k for k in req_keys if k not in keys]
    rows.append((p, ",".join(missing) if missing else "OK"))

for p, status in rows:
    print(f"{p}: {status}")
PY

Repository: lightspeedwp/.github

Length of output: 1886


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show the exact parts of prompt.instructions.md that define the required frontmatter keys and the canonical extension
echo "=== Extension guidance ==="
rg -n "prompt\\.md|\\.prompt\\.md|discoverability|applyTo" instructions/prompt.instructions.md

echo
echo "=== Stability/domain guidance ==="
rg -n "stability|domain" instructions/prompt.instructions.md

echo
echo "=== Frontmatter requirements section (context) ==="
# Print a chunk around the likely frontmatter requirement area
rg -n "frontmatter|YAML|file_type|owners|last_updated|version|status|tags" instructions/prompt.instructions.md

Repository: lightspeedwp/.github

Length of output: 257


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== occurrences of stability/domain in instructions/prompt.instructions.md ==="
rg -n "stability|domain" instructions/prompt.instructions.md || true

echo
echo "=== first 120 lines of instructions/prompt.instructions.md (for frontmatter requirements context) ==="
nl -ba instructions/prompt.instructions.md | head -n 120

echo
echo "=== search for frontmatter requirement lists mentioning required keys ==="
rg -n "frontmatter|YAML|required|must include|metadata" instructions/prompt.instructions.md

echo
echo "=== check if any other prompt instruction docs exist and mention stability/domain ==="
fd -t f -e md instructions | xargs -I{} sh -c 'echo "--- {} ---"; rg -n "stability|domain|\\.prompt\\.md" "{}" || true'

Repository: lightspeedwp/.github

Length of output: 307


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== List markdown files under instructions/ ==="
fd -t f -e md instructions | sort

echo
echo "=== Prompt instructions file: first 220 lines ==="
cat -n instructions/prompt.instructions.md | head -n 220

echo
echo "=== Prompt instructions: any explicit required/metadata list cues ==="
rg -n "frontmatter|YAML|required|must include|metadata|owners|last_updated|version|tags|status|stability|domain|\\.prompt\\.md" instructions/prompt.instructions.md || true

echo
echo "=== Search all instructions/ for stability/domain ==="
rg -n "stability|domain" instructions || true

echo
echo "=== Search all instructions/ for .prompt.md guidance ==="
rg -n "\\.prompt\\.md|prompt\\.md extension|discoverability|applyTo" instructions || true

Repository: lightspeedwp/.github

Length of output: 11689


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== occurrences of file_type / prompt in prompt.instructions.md ==="
rg -n "file_type|file type|\\\"prompt\\\"|role\\s—|inputs\\s—|outputs\\s—|scope\\s—|Frontmatter Fields|All prompt files must" instructions/prompt.instructions.md

echo
echo "=== exact section 'Frontmatter Fields' (lines 25-45-ish) ==="
sed -n '20,50p' instructions/prompt.instructions.md

Repository: lightspeedwp/.github

Length of output: 346


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Look for general frontmatter requirements across documentation formats ==="
rg -n "Every documentation file|must include|YAML frontmatter|frontmatter schema|owners|last_updated|status|stability|domain" instructions/documentation-formats.instructions.md

echo
echo "=== Show the area around 'Every documentation file must include YAML frontmatter' ==="
rg -n "Every documentation file" instructions/documentation-formats.instructions.md

Repository: lightspeedwp/.github

Length of output: 1833


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show the frontmatter schema table area that lists required YAML keys + checkmarks
sed -n '200,270p' instructions/documentation-formats.instructions.md

echo
echo "=== Show the 'update last_updated' rule for context ==="
sed -n '250,290p' instructions/documentation-formats.instructions.md

Repository: lightspeedwp/.github

Length of output: 5159


🏁 Script executed:

#!/bin/bash
set -euo pipefail

for f in prompts/agent-setup.prompt prompts/code-review.prompt; do
  echo "=== $f: first 40 lines ==="
  cat -n "$f" | head -n 40
  echo
done

Repository: lightspeedwp/.github

Length of output: 2868


Fix prompt template contract: rename to .prompt.md and complete required YAML frontmatter

  • Extension mismatch: instructions/prompt.instructions.md expects prompt files to use the .prompt.md extension for discoverability, but the repo has 7 files named prompts/*.prompt (no *.prompt.md).
  • YAML frontmatter is incomplete across all 7 templates: current frontmatter only includes file_type, title, description. The prompt contract also requires at least version, scope, role, tags, inputs, and outputs; additionally, the repo-wide documentation frontmatter schema requires metadata like last_updated, author, maintainer, owners, status, stability, and domain.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@prompts/agent-setup.prompt` around lines 1 - 5, Rename the template file
prompts/agent-setup.prompt to prompts/agent-setup.prompt.md and update its YAML
frontmatter to satisfy the prompt contract and repo docs schema: add required
keys version, scope, role, tags, inputs, outputs (with brief
schemas/placeholders) and repo metadata last_updated, author, maintainer,
owners, status, stability, domain; ensure the frontmatter is properly delimited
with --- and retains existing file_type, title, and description, and keep the
body content unchanged aside from the frontmatter rename and additions so
discovery via instructions/prompt.instructions.md and metadata validation
succeed.

Comment thread prompts/documentation.prompt
Comment thread prompts/README.md
Comment thread prompts/README.md
ashleyshaw pushed a commit that referenced this pull request May 31, 2026
- Add missing YAML frontmatter fields (version, last_updated, owners, tags, status, stability, domain) to all documentation and prompt files
- Replace US spelling 'labeling' with UK spelling 'labelling' in prose throughout docs/AUTOMATION.md, docs/LABELING.md, docs/MIGRATION.md, CHANGELOG.md, and instructions/DEPRECATED.md (keep filenames unchanged)
- Update section headings and title in docs/LABELING.md to use 'Labelling' instead of 'Labeling'
- Update Table of Contents anchors in docs/LABELING.md to match new heading names
- Add missing template entries to prompts/README.md (code-review.prompt, debugging.prompt)
- Update example YAML frontmatter in prompts/documentation.prompt to show all required fields
- Add complete frontmatter to all 7 prompt template files (agent-setup, code-generation, code-review, debugging, documentation, refactoring, testing)
- Wrap nested file path in backticks in CHANGELOG.md for consistency
- Fix table formatting in instructions/DEPRECATED.md with proper spacing

Addresses 20 CodeRabbit review comments across 8 files.

https://claude.ai/code/session_015QNP4SGYZTmRmXNQachTTf
claude added 3 commits May 31, 2026 13:49
…ctory

This commit streamlines repository documentation and creates reusable prompt templates:

Documentation Consolidation:
- Merge labeling documentation into single docs/LABELING.md (eliminates LABEL_STRATEGY.md, ISSUE_LABELS.md, PR_LABELS.md)
- Merge automation governance into single docs/AUTOMATION.md (eliminates AUTOMATION_GOVERNANCE.md, WORKFLOWS.md)
- Move workflow-coordination.md from nested .github/.github/docs to docs/
- Update instructions/DEPRECATED.md with deprecation index and migration guide
- Maintain portable instructions for cross-repository reusability

Standardised Prompts Directory:
- Create /prompts directory with 7 reusable templates:
  - agent-setup.prompt
  - code-generation.prompt
  - documentation.prompt
  - testing.prompt
  - code-review.prompt
  - debugging.prompt
  - refactoring.prompt
- Each follows consistent structure for reusability across agents and scenarios
- Add prompts/README.md with usage guide

Benefits:
- Eliminated 5 redundant documentation files
- Improved discoverability with single canonical sources
- Enhanced maintainability by reducing duplication
- Established reusable prompt library for agent scenarios

Fixes #636

https://claude.ai/code/session_015QNP4SGYZTmRmXNQachTTf
Adds YAML frontmatter to all prompt template files to meet LightSpeed
documentation standards. Each prompt now includes:
- file_type: 'prompt'
- title: Descriptive title
- description: Brief description of prompt purpose

Also adds frontmatter to prompts/README.md to comply with file validation.

Fixes frontmatter validation errors in PR #637.
…ns, and migration guide location

- Fix relative links in docs/AUTOMATION.md (lines 244-245): change ./.github/ to ../.github/
- Rename docs/workflow-coordination.md to docs/WORKFLOW_COORDINATION.md per uppercase naming convention
- Create docs/MIGRATION.md as central repository for migration documentation
- Update instructions/DEPRECATED.md to reference docs/MIGRATION.md instead of duplicating migration guide
- Update path reference from .github/docs/ to docs/ in consolidation index
ashleyshaw and others added 4 commits May 31, 2026 13:50
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Ash Shaw <ashley@lightspeedwp.agency>
…ter validation, code fence language tags, template injection security, and documentation fixes
- Add missing YAML frontmatter fields (version, last_updated, owners, tags, status, stability, domain) to all documentation and prompt files
- Replace US spelling 'labeling' with UK spelling 'labelling' in prose throughout docs/AUTOMATION.md, docs/LABELING.md, docs/MIGRATION.md, CHANGELOG.md, and instructions/DEPRECATED.md (keep filenames unchanged)
- Update section headings and title in docs/LABELING.md to use 'Labelling' instead of 'Labeling'
- Update Table of Contents anchors in docs/LABELING.md to match new heading names
- Add missing template entries to prompts/README.md (code-review.prompt, debugging.prompt)
- Update example YAML frontmatter in prompts/documentation.prompt to show all required fields
- Add complete frontmatter to all 7 prompt template files (agent-setup, code-generation, code-review, debugging, documentation, refactoring, testing)
- Wrap nested file path in backticks in CHANGELOG.md for consistency
- Fix table formatting in instructions/DEPRECATED.md with proper spacing

Addresses 20 CodeRabbit review comments across 8 files.

https://claude.ai/code/session_015QNP4SGYZTmRmXNQachTTf
@ashleyshaw ashleyshaw force-pushed the feat/doc-consolidation-and-prompts branch from c29988c to 5e89625 Compare May 31, 2026 13:51
@github-actions github-actions Bot added type:documentation Documentation and removed type:documentation Documentation type:chore Chore / small hygiene change documentation labels May 31, 2026
@ashleyshaw ashleyshaw merged commit 3b10a3b into develop May 31, 2026
14 of 19 checks passed
@ashleyshaw ashleyshaw deleted the feat/doc-consolidation-and-prompts branch May 31, 2026 13:52
ashleyshaw added a commit that referenced this pull request May 31, 2026
* chore: consolidate documentation and create standardised prompts directory

This commit streamlines repository documentation and creates reusable prompt templates:

Documentation Consolidation:
- Merge labeling documentation into single docs/LABELING.md (eliminates LABEL_STRATEGY.md, ISSUE_LABELS.md, PR_LABELS.md)
- Merge automation governance into single docs/AUTOMATION.md (eliminates AUTOMATION_GOVERNANCE.md, WORKFLOWS.md)
- Move workflow-coordination.md from nested .github/.github/docs to docs/
- Update instructions/DEPRECATED.md with deprecation index and migration guide
- Maintain portable instructions for cross-repository reusability

Standardised Prompts Directory:
- Create /prompts directory with 7 reusable templates:
  - agent-setup.prompt
  - code-generation.prompt
  - documentation.prompt
  - testing.prompt
  - code-review.prompt
  - debugging.prompt
  - refactoring.prompt
- Each follows consistent structure for reusability across agents and scenarios
- Add prompts/README.md with usage guide

Benefits:
- Eliminated 5 redundant documentation files
- Improved discoverability with single canonical sources
- Enhanced maintainability by reducing duplication
- Established reusable prompt library for agent scenarios

Fixes #636

https://claude.ai/code/session_015QNP4SGYZTmRmXNQachTTf

* fix: add required frontmatter to prompt files and README

Adds YAML frontmatter to all prompt template files to meet LightSpeed
documentation standards. Each prompt now includes:
- file_type: 'prompt'
- title: Descriptive title
- description: Brief description of prompt purpose

Also adds frontmatter to prompts/README.md to comply with file validation.

Fixes frontmatter validation errors in PR #637.

* fix: resolve code review feedback on relative links, naming conventions, and migration guide location

- Fix relative links in docs/AUTOMATION.md (lines 244-245): change ./.github/ to ../.github/
- Rename docs/workflow-coordination.md to docs/WORKFLOW_COORDINATION.md per uppercase naming convention
- Create docs/MIGRATION.md as central repository for migration documentation
- Update instructions/DEPRECATED.md to reference docs/MIGRATION.md instead of duplicating migration guide
- Update path reference from .github/docs/ to docs/ in consolidation index

* Apply suggestions from code review

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Ash Shaw <ashley@lightspeedwp.agency>

* fix: correct agents directory link in template.agent.md

* Address copilot feedback on PR #637: UK English consistency, frontmatter validation, code fence language tags, template injection security, and documentation fixes

* fix(ci): address CodeRabbit feedback from PR #637

- Add missing YAML frontmatter fields (version, last_updated, owners, tags, status, stability, domain) to all documentation and prompt files
- Replace US spelling 'labeling' with UK spelling 'labelling' in prose throughout docs/AUTOMATION.md, docs/LABELING.md, docs/MIGRATION.md, CHANGELOG.md, and instructions/DEPRECATED.md (keep filenames unchanged)
- Update section headings and title in docs/LABELING.md to use 'Labelling' instead of 'Labeling'
- Update Table of Contents anchors in docs/LABELING.md to match new heading names
- Add missing template entries to prompts/README.md (code-review.prompt, debugging.prompt)
- Update example YAML frontmatter in prompts/documentation.prompt to show all required fields
- Add complete frontmatter to all 7 prompt template files (agent-setup, code-generation, code-review, debugging, documentation, refactoring, testing)
- Wrap nested file path in backticks in CHANGELOG.md for consistency
- Fix table formatting in instructions/DEPRECATED.md with proper spacing

Addresses 20 CodeRabbit review comments across 8 files.

https://claude.ai/code/session_015QNP4SGYZTmRmXNQachTTf

---------

Signed-off-by: Ash Shaw <ashley@lightspeedwp.agency>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci Build and CI pipelines area:documentation Docs & guides area:labels Label governance and routing lang:md Markdown content/docs meta:needs-changelog Requires a changelog entry before merge priority:normal Default priority status:needs-review Awaiting code review type:documentation Documentation type:feature Feature or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation Consolidation & Standardized Prompts Directory

3 participants