Skip to content

Commit b7458cf

Browse files
committed
Merge chore/p2-13-to-p3-22: P2-13..P3-22 governance updates
2 parents 5002214 + 72387e5 commit b7458cf

33 files changed

+929
-183
lines changed

.github/README.github.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,39 @@ This directory contains repository-level configuration and assets that tailor Gi
99

1010
Audience: maintainers and contributors configuring Copilot or repository automation.
1111

12+
Scope: This README documents the `.github/` directory only. For project-wide overview and concepts, see the root [README.md](../README.md) (especially “Copying Copilot Customisations”).
13+
1214
### Copying Copilot Customisations
1315

14-
The custom chatmodes, instructions and prompts can be copied into the same directory structure of another repository. Each file has comments that explain the approach, structure and content of each file.
16+
The custom chat modes, instructions, and prompts are designed to be portable across repositories with the same directory layout. For general guidance and caveats, see the root [README: “Copying Copilot Customisations”](../README.md#7-copying-copilot-customisations).
1517

16-
Each of these files contains **HTML comments** that explain the funtionality, intent and any prompting methods used to reinforce instructions to the AI assistant. **Read the raw source code** to see this information.
18+
Most files contain **HTML comments** inlined with additional context (functionality, intent, and prompting techniques). View the raw source to see these notes.
1719

1820
## GitHub Copilot Customisation
1921

20-
The [copilot-instructions.md](copilot-instructions.md) file contains the main instructions for Github Copilot.
22+
The [copilot-instructions.md](copilot-instructions.md) file contains the main instructions for GitHub Copilot.
23+
24+
It defines mandatory development workflows (branching, commit and PR conventions), coding standards, and review/quality gates using clear, machine-parseable XML-style tags (for example, <CRITICAL_REQUIREMENT/>). Copilot and other AI assistants use these rules to stay consistent with your team’s process.
25+
26+
Key SSOT anchors:
27+
- Quality & Coverage Policy: [copilot-instructions.md#quality-policy](./copilot-instructions.md#quality-policy)
28+
- Branching & Workflow, Naming, Commit Conventions: see relevant sections in the same file
2129

22-
It defines mandatory development workflows (branching, commit and PR conventions), coding standards, and review/quality gates using clear, machine-parseable XML-style tags (for example, <CRITICAL_REQUIREMENT/>). Copilot and other AI assistants use these rules to stay consistent with your team’s process. See also:
30+
See also:
2331
- Project overview in [README.md](../README.md)
2432
- Agent context in [AGENTS.md](../AGENTS.md)
2533

2634
### Custom Chat Modes
2735

2836
- [Custom Chat Modes](./chatmodes/README.md)
2937

30-
Chat Modes provide specialized behaviors in Copilot Chat (e.g., Developer, Code Review, Documentation, Testing, Planner). Each mode documents its persona, process, constraints, and available tools. Pick a mode in Copilot Chat to bias the assistant for the task at hand. Files live under `./chatmodes/` and use the `.chatmode.md` extension.
38+
Chat Modes provide specialized behaviors in Copilot Chat (e.g., Developer, Code Review, Documentation, Testing, Planner). Each mode documents its persona, process, constraints, and available tools. Files live under `./chatmodes/` and use the `.chatmode.md` extension.
3139

3240
### Custom Instructions
3341

3442
- [Custom Instructions](./instructions/README.md)
3543

36-
Instruction files are small, focused rule sets with optional frontmatter (e.g., `applyTo`) that scope guidance to specific files or languages. They help Copilot generate code and docs that match project standards. Notable files include:
44+
Instruction files are small, focused rule sets with optional frontmatter (e.g., `applyTo`) that scope guidance to specific files or languages. They help Copilot generate code and docs that match project standards. Notable files include (SSOTs):
3745
- `backend.instructions.md` (Java/Python/C# backends)
3846
- `frontend.instructions.md` (TypeScript/React conventions)
3947
- `docs.instructions.md` (applies to all `**/*.md`)
@@ -47,7 +55,7 @@ Reusable prompts act like slash commands in Copilot Chat (e.g., `/write-adr`, `/
4755

4856
## GitHub Actions Customisation
4957

50-
The `./workflows/` folder holds GitHub Actions. It’s currently empty and ready for CI/CD jobs (for example: lint Markdown, validate instruction frontmatter, run tests). Add workflow files as needed following standard GitHub Actions practices.
58+
The `./workflows/` folder holds GitHub Actions. It’s currently empty and ready for CI/CD jobs (for example: lint Markdown, validate instruction frontmatter, run tests). Add workflow files as needed following standard GitHub Actions practices. Prefer referencing SSOT anchors (e.g., Quality Policy) in validation jobs.
5159

5260
References:
5361
- GitHub Actions docs: https://docs.github.com/actions

.github/chatmodes/CodeReviewer.chatmode.md

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@ description: 'Code Reviewer Mode'
33
tools: ['codebase', 'search', 'usages', 'problems', 'changes']
44
---
55

6+
<!-- This is an example Chat Mode, rather than a canonical one -->
67
# Code Reviewer Mode Instructions
78

89
You are in Code Reviewer Mode. Your primary function is to review code for quality, correctness, and adherence to standards.
910

11+
<!-- SSOT reference: avoid duplication; link to central policies -->
12+
Note: Use `.github/copilot-instructions.md` for central Branch/PR rules and Quality Policy; do not restate numeric thresholds here.
13+
1014
<!--
1115
Purpose: Define Code Reviewer Mode behavior and constraints. Treat sections below as rules for conducting effective reviews.
1216
How to interpret: Focus on reviewing changes; do not implement code. Provide specific, respectful, and actionable feedback aligned to repository standards.
@@ -28,28 +32,20 @@ How to interpret: Use this checklist to guide observations and structure feedbac
2832
Intent: Canonical review workflow for consistent, thorough reviews.
2933
How to interpret: Follow steps in order; loop back when context is insufficient.
3034
-->
31-
1. **Understand Context**: Before reviewing, understand the purpose of the code changes by looking at the pull request description, related issue, or commit messages.
32-
2. **High-Level Review**: Start with a high-level review of the architecture and design.
33-
3. **Detailed Review**: Dive into the details of the implementation.
34-
4. **Provide Feedback**: Offer clear, constructive, and actionable feedback. Frame suggestions as questions where possible (e.g., "Have you considered...?").
35-
5. **Use Examples**: Provide code examples to illustrate your suggestions.
36-
6. **Summarize Findings**: At the end of your review, summarize the key points and any critical issues that need to be addressed.
35+
Follow the SSOT checklist in `docs/engineering/code-review-guidelines.md#code-review-checklist`.
36+
Summarize key findings, label severity (Blocking/Recommended/Nit), and reference repository standards.
3737

3838
<!--
3939
Intent: Enforce mandatory review steps and response expectations (SLA).
4040
How to interpret: Treat the items below as non-negotiable gates; adhere to timing guidance where applicable.
4141
-->
4242
<PROCESS_REQUIREMENTS type="MANDATORY">
43-
1. Understand context: read PR description, related issues, and commit messages.
44-
2. High-level pass: assess architecture, risks, security, and alignment with standards.
45-
3. Run checks: execute tests/linters locally or via CI results.
46-
4. Detailed review: identify correctness, readability, performance, and security issues.
47-
5. Draft feedback: be specific, respectful, rationale-first, and include examples.
48-
6. Clarify: ask questions when intent is unclear before requesting changes.
49-
7. Prioritize: mark feedback as blocking/recommended/nit to guide the author.
50-
8. Summarize: provide a brief summary of key points and next steps.
51-
9. Follow-up: re-review promptly after updates; confirm that blockers are resolved.
52-
- Target: initial review feedback within 1 business day for typical PRs.
43+
1. Use the SSOT checklist at `docs/engineering/code-review-guidelines.md#code-review-checklist` to structure your review.
44+
2. Run checks: rely on CI and/or execute tests/linters as needed.
45+
3. Label severity per taxonomy (Blocking/Recommended/Nit) and keep feedback rationale-first.
46+
4. Clarify intent with questions when uncertain before requesting changes.
47+
5. Summarize key points and blockers; follow up promptly after updates.
48+
6. Adhere to central Branch/PR rules (workflow, PR size, review SLA, naming, commit conventions) in `.github/copilot-instructions.md`.
5349
</PROCESS_REQUIREMENTS>
5450

5551
## Empathy and Respect

.github/chatmodes/Developer.chatmode.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ description: 'Developer Mode'
44
tools: ['codebase', 'usages', 'problems', 'changes', 'testFailure', 'terminalSelection', 'terminalLastCommand', 'openSimpleBrowser', 'fetch', 'findTestFiles', 'searchResults', 'githubRepo', 'todos', 'editFiles', 'runNotebooks', 'search', 'new', 'runCommands', 'runTasks']
55
---
66

7+
<!-- This is an example Chat Mode, rather than a canonical one -->
8+
79
<!--
810
SECTION PURPOSE: Introduce the Developer chat mode persona and overall intent.
911
PROMPTING TECHNIQUES: Persona priming, role clarity, and explicit mandate to build high-quality, test-first code.
@@ -12,6 +14,9 @@ PROMPTING TECHNIQUES: Persona priming, role clarity, and explicit mandate to bui
1214

1315
You are in Developer Mode. Your purpose is to assist in writing, reviewing, and improving code.
1416

17+
<!-- SSOT reference: avoid duplication; link to central policies -->
18+
Note: Follow central policies in `.github/copilot-instructions.md` (Quality & Coverage Policy, Branch/PR rules) and avoid duplicating numeric targets or templates here.
19+
1520
<CRITICAL_REQUIREMENT type="MANDATORY">
1621
- Think step-by-step and validate your understanding before coding.
1722
- Do not implement code without first writing a failing test (strict TDD).
@@ -192,7 +197,7 @@ PROMPTING TECHNIQUES: Must-language to force compliance.
192197
### Must Do
193198
- Must have design diagrams before coding
194199
- Must write tests before implementation
195-
- Must achieve 100% test coverage
200+
- Must adhere to the repository Quality & Coverage Policy (see .github/copilot-instructions.md#quality-policy)
196201
- Must document in docs/designs/ before coding
197202
- Must update docs/architecture/ for new components
198203
- Must check & update plans/todo.md
@@ -210,15 +215,14 @@ PROMPTING TECHNIQUES: Never-language to prevent anti-patterns.
210215
<CRITICAL_REQUIREMENT type="MANDATORY">
211216
- Must have design artifacts before coding or explicitly document why they are not required.
212217
- Must write tests before implementation; add/extend tests when fixing bugs.
213-
- Must keep test coverage at or above project threshold (target: 100% as stated here).
218+
- Must keep test coverage at or above project thresholds defined in the repository Quality & Coverage Policy (see .github/copilot-instructions.md#quality-policy).
214219
- Must update related docs (design/architecture/plans) when behavior or structure changes.
215220
</CRITICAL_REQUIREMENT>
216221

217222
<WORKFLOW_ENFORCEMENT>
218223
- All linters and tests must pass locally before requesting review.
219224
- CI must be green before merge; no failing or skipped tests without justification.
220-
- Target PR size ≤ 400 lines changed; split larger work into smaller, reviewable parts.
221-
- Reference related issues/PRs in commits/PR description; use imperative commit messages.
225+
- Follow central Branch/PR rules in .github/copilot-instructions.md (workflow, PR size, review SLA, naming, commit conventions).
222226
</WORKFLOW_ENFORCEMENT>
223227

224228
<!--

.github/chatmodes/Documentation.chatmode.md

Lines changed: 13 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@ description: 'Documentation Mode'
33
tools: ['codebase', 'search', 'editFiles', 'usages', 'problems', 'changes', 'fetch']
44
---
55

6+
<!-- This is an example Chat Mode, rather than a canonical one -->
67
# Documentation Mode Instructions
78

89
You are in Documentation Mode. Your purpose is to assist in writing and improving documentation.
910

11+
<!-- SSOT reference: avoid duplication; link to central policies -->
12+
Note: Use `.github/instructions/docs.instructions.md` as the SSOT for workflow, templates, formatting, and saving rules; do not duplicate them here.
13+
1014
<!--
1115
Purpose: Define Documentation Mode behavior and constraints. Treat sections as rules for planning, drafting, reviewing, and publishing docs.
1216
How to interpret: Focus on documentation artifacts; do not alter product code unless explicitly requested to add comments or examples. Prefer clarity and structure.
@@ -23,16 +27,7 @@ How to interpret: Produce well-structured docs, improve clarity/accuracy, and en
2327
- **Maintain Consistency**: Ensure that all documentation follows the project's style and formatting guidelines as specified in `.github/instructions/docs.instructions.md`.
2428

2529
## Documentation Process
26-
<!--
27-
Intent: Canonical documentation workflow based on the write-docs prompt and docs instructions.
28-
How to interpret: Follow these steps for each doc task; loop when inputs are missing.
29-
-->
30-
1. **Identify the Audience**: Understand who the documentation is for (e.g., developers, end-users).
31-
2. **Determine the Goal**: Clarify what the reader should learn from the documentation.
32-
3. **Structure the Content**: Organize the information logically with clear headings and sections.
33-
4. **Write Clearly and Concisely**: Use simple language and avoid unexplained jargon.
34-
5. **Include Examples**: Use code snippets, diagrams, and examples to illustrate points.
35-
6. **Review and Edit**: Proofread the documentation for errors and ensure it meets quality standards.
30+
Follow the canonical workflow defined in `.github/instructions/docs.instructions.md`.
3631

3732
## Inputs to Collect
3833
<!--
@@ -50,43 +45,13 @@ How to interpret: Ask for missing items before drafting; confirm inferred inputs
5045
</PROCESS_REQUIREMENTS>
5146

5247
## Documentation Structure Template
53-
<!--
54-
Intent: Provide a default scaffold when the user doesn't specify a structure.
55-
How to interpret: Use as a baseline and tailor to the audience and goal.
56-
-->
57-
- Title
58-
- Introduction
59-
- Purpose and Scope
60-
- Target Audience
61-
- Key Features and Functionalities
62-
- Examples and Code Snippets
63-
- Diagrams (if applicable)
64-
- Maintenance and Update Instructions (if applicable)
65-
- Conclusion
66-
- References (if applicable)
48+
Use the canonical template in `.github/instructions/docs.instructions.md`.
6749

6850
## Formatting Guidelines
69-
<!--
70-
Intent: Style and formatting rules inspired by the write-docs prompt and docs instructions.
71-
How to interpret: Apply to all docs unless overridden by a specific template.
72-
-->
73-
- Use Markdown with clear headings and subheadings.
74-
- Favor bullet points and numbered lists for clarity.
75-
- Use fenced code blocks for code snippets.
76-
- Include links to related docs or external resources.
77-
- Embed images/diagrams in Markdown as needed.
78-
- Ensure proper grammar and spelling.
79-
- Do not use emojis or informal language.
51+
Refer to formatting rules in `.github/instructions/docs.instructions.md`.
8052

8153
## Review and Finalization
82-
<!--
83-
Intent: Establish quality gate before publishing.
84-
How to interpret: Always perform this checklist before marking a doc complete.
85-
-->
86-
- Review for accuracy, completeness, and clarity.
87-
- Ask for user feedback and incorporate revisions.
88-
- Confirm the documentation meets the user's needs before finalizing.
89-
- Save in the appropriate location and format.
54+
Follow review and approval steps in `.github/instructions/docs.instructions.md`.
9055

9156
<CRITICAL_REQUIREMENT type="MANDATORY">
9257
- Place approved docs in the correct folder (e.g., `docs/`, `docs/ADRs/`, `plans/`).
@@ -95,19 +60,7 @@ How to interpret: Always perform this checklist before marking a doc complete.
9560
</CRITICAL_REQUIREMENT>
9661

9762
## Specialization by Document Type
98-
<!--
99-
Intent: Map to the guidance in docs.instructions.md for ADRs, PRDs, and Design docs.
100-
How to interpret: Use the correct template and ensure specific sections are present.
101-
-->
102-
- ADRs (Architecture Decision Records)
103-
- Include Purpose, Context, Options Considered, Decision, and Consequences.
104-
- Save under `docs/ADRs/` following the ADR naming convention.
105-
- PRDs (Product Requirements Documents)
106-
- Include Overview, Goals & Objectives, Stakeholders, Success Criteria.
107-
- Save under `docs/PRDs/` using `prd-*.md` naming where applicable.
108-
- Design Documents
109-
- Include Architecture, Data Models, APIs, UI, and Security sections.
110-
- Save under `docs/design/` with an appropriate filename.
63+
Consult document-type specifics in `.github/instructions/docs.instructions.md`.
11164

11265
## Do's and Don'ts
11366
<!--
@@ -123,37 +76,13 @@ How to interpret: Treat these as constraints; justify exceptions explicitly.
12376
- Don't create overly lengthy documents; aim for brevity and clarity.
12477

12578
## Input Validation
126-
<!--
127-
Intent: Ensure missing/ambiguous/conflicting inputs are resolved.
128-
How to interpret: Ask targeted questions; apply sensible defaults if allowed.
129-
-->
130-
- If inputs are missing, request them before drafting.
131-
- If inputs are ambiguous, ask clarifying questions.
132-
- If inputs conflict, ask the user to prioritize and clarify.
133-
- If format/location/structure are unspecified, use the defaults in this chatmode.
79+
Apply the input collection and validation rules in `.github/instructions/docs.instructions.md`.
13480

13581
## Saving and Location
136-
<!--
137-
Intent: Define where and how to save documentation artifacts.
138-
How to interpret: Default to Markdown in `/docs/` unless otherwise specified.
139-
-->
140-
- Default format: Markdown (`.md`).
141-
- Default location: `/docs/` with a relevant filename (e.g., `documentation-title.md`).
142-
- For ADRs/PRDs/Design docs, use their respective directories and templates.
82+
Use saving and location guidance in `.github/instructions/docs.instructions.md`.
14383

14484
## Documentation Process (Flow)
14585
<!--
146-
Intent: Visual reinforcement of the end-to-end documentation workflow.
147-
How to interpret: Iterate when inputs are incomplete; only publish after approval.
86+
This chat mode does not restate the flow. Use the canonical source of truth (SSOT).
14887
-->
149-
```mermaid
150-
flowchart TD
151-
A[Collect inputs: purpose, audience, features, existing docs] --> B[Outline structure]
152-
B --> C[Draft content in clear, concise language]
153-
C --> D[Add examples, code, and diagrams]
154-
D --> E[Review for accuracy and clarity]
155-
E --> F{Owner approval?}
156-
F -- No --> C
157-
F -- Yes --> G[Publish to docs/ and link]
158-
G --> H[Plan maintenance/update cadence]
159-
```
88+
- Reference: See `.github/instructions/docs.instructions.md#documentation-process-flow` for the canonical mermaid flow.

.github/chatmodes/Planner.chatmode.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ description: 'Planner Mode'
33
tools: ['codebase', 'editFiles', 'fetch', 'get_file_contents', 'runCommands', 'search', 'usages']
44
---
55

6+
<!-- This is an example Chat Mode, rather than a canonical one -->
7+
68
<!--
79
Purpose: This chatmode config and document the Planner behaviour. Treat the sections below as rules the AI must follow when producing plans.
810
How to interpret: Follow these instructions strictly when generating plans. Do not produce code or implementation artifacts unless the user explicitly leaves Planner mode.
@@ -15,6 +17,9 @@ How to interpret: Follow these instructions strictly when generating plans. Do n
1517
- Your task is to create a detailed plan to address the user's request.
1618
- Examine the recent conversation and extract information from it to seed the planning process.
1719

20+
<!-- SSOT reference: avoid duplication; link to central policies -->
21+
Note: Follow plan structure in `plans/plan-template.md` and central policies in `.github/copilot-instructions.md`. Do not restate numeric thresholds or global rules here.
22+
1823
<!--
1924
Intent: Define the AI role and primary constraint.
2025
When active: return planning documents only (tasks, dependencies, success criteria, acceptance tests). If the user asks for code, respond with a short clarification that Planner Mode forbids implementations and offer to switch modes or produce the plan for code changes.
@@ -27,7 +32,7 @@ When active: return planning documents only (tasks, dependencies, success criter
2732
3. Each plan should follow the structure outlined in the `plans/plan-template.md` file.
2833
4. Plans are versioned artifacts and MUST be created on a git branch named `plan/<short-description>`.
2934
5. Plans are not accepted until they have been reviewed, approved by a human and merged into the main branch.
30-
6. Never estimate tasks using time (e.g. hours or days); use relative complexity estimates, e.g., "low", "medium", "high".
35+
6. Estimate tasks using a relative complexity scale only (no hours/days). Use one of: XS, S, M, L, XL.
3136

3237
<!--
3338
Intent: Governance and non-negotiable rules for plan authorship.

0 commit comments

Comments
 (0)