Skip to content

Commit ef520df

Browse files
authored
feat(agents): replace hve-core-specific references with portable discovery-based language (#1335)
## Description Distributed AI artifacts contained hardcoded hve-core paths, npm scripts, template references, and branding that broke or confused when installed via extension or plugin in consumer repositories. This PR applied a two-phase migration across 15 files: hve-core-specific content moved into `copilot-instructions.md` as the canonical reference, then hardcoded references in distributed artifacts were replaced with discovery-based patterns and template fallbacks. > The code-review-standards agent already demonstrated the correct fallback pattern after #1286 — this PR extended that model to the remaining artifacts identified in a portability audit. ### copilot-instructions.md Expansion Six new subsections were added to `.github/copilot-instructions.md` preserving hve-core-specific details removed from distributed artifacts. **Documentation Templates** catalogs all `docs/templates/*.md` files by consuming agent. **Commit Message Scopes** maps 14 scopes to repository directories. **Frontmatter Schema Validation** records schema paths and validation commands. **PowerShell Conventions** captures the copyright header script, CI helpers module, and test directory patterns. **Documentation Operations** defines doc-ops scanning targets and validation commands. These sections sit within the existing `project-structure` and `script-operations` comment boundaries. ### Agent and Prompt Template Fallbacks Six agent and prompt files received **template fallback patterns** following the code-review-standards model. Each file now checks template availability and provides a minimal but functional structure when the template is absent. - *code-review-full.agent.md* added a best-effort fallback for the *full-review-output-format.md* template, annotating output with a "template not found" warning - *brd-builder.agent.md* made the template path conditional and added a BRD skeleton fallback derived from the agent's own section structure - *adr-creation.agent.md* removed the "for HVE Core" qualifier and added a minimal ADR fallback (Title, Status, Context, Decision, Consequences) - *system-architecture-reviewer.agent.md* added template availability conditions with the same minimal ADR structure fallback - *ux-ui-designer.agent.md* replaced relative template paths with generic `docs/templates/` references and discovery-based fallbacks - *incident-response.prompt.md* changed the RCA template reference to a conditional with a detailed Google SRE-format fallback structure ### Instruction Discovery Patterns Seven instruction files replaced hardcoded paths and commands with **discovery-based guidance** that works across any repository structure. - *doc-ops.agent.md* underwent a major rewrite, replacing hardcoded directory scanning paths and npm script references with guidance to discover directories and validation commands from `package.json` - *pester.instructions.md* replaced fixed test directory references with discovery patterns and made test execution flexible between npm runners and direct Pester invocation - *commit-message.instructions.md* converted the fixed 14-item scope list to discovery-based guidance: "Derive the commit scope from the primary directory affected by the change" - *markdown.instructions.md* generalized schema validation references and replaced HVE Core-specific example frontmatter with generic values - *powershell.instructions.md* generalized the PSScriptAnalyzer configuration reference to discover `.psd1` files rather than hardcoding a path - *bash.instructions.md* generalized copyright validation to check `package.json` instead of referencing a specific npm command - *prompt-builder.instructions.md* genericized the subagent path example to a `{collection}` placeholder and made collection system references conditional ### RPI Agent Cleanup Removed `RPI Validator` and `Implementation Validator` from the *rpi-agent.agent.md* agents frontmatter list in a separate commit. These subagents were never called by the RPI agent — they belong to *task-reviewer.agent.md* and were leftovers from a prior architecture where the RPI agent had a heavier review phase. ## Related Issue(s) Related to #741 — overlapping scope on hardcoded `.github/` path references (tracked separately) Related to #1286 — precursor fix establishing the template fallback pattern for code-review agents Related to #643 — structural coordination with collection-based subdirectory reorganization Closes #1334 ## Type of Change Select all that apply: **Code & Documentation:** * [ ] Bug fix (non-breaking change fixing an issue) * [x] New feature (non-breaking change adding functionality) * [ ] Breaking change (fix or feature causing existing functionality to change) * [ ] Documentation update **Infrastructure & Configuration:** * [ ] GitHub Actions workflow * [ ] Linting configuration (markdown, PowerShell, etc.) * [ ] Security configuration * [ ] DevContainer configuration * [ ] Dependency update **AI Artifacts:** * [ ] Reviewed contribution with `prompt-builder` agent and addressed all feedback * [x] Copilot instructions (`.github/instructions/*.instructions.md`) * [x] Copilot prompt (`.github/prompts/*.prompt.md`) * [x] Copilot agent (`.github/agents/*.agent.md`) * [ ] Copilot skill (`.github/skills/*/SKILL.md`) > Note for AI Artifact Contributors: > > * Agents: Research, indexing/referencing other project (using standard VS Code GitHub Copilot/MCP tools), planning, and general implementation agents likely already exist. Review `.github/agents/` before creating new ones. > * Skills: Must include both bash and PowerShell scripts. See [Skills](../docs/contributing/skills.md). > * Model Versions: Only contributions targeting the **latest Anthropic and OpenAI models** will be accepted. Older model versions (e.g., GPT-3.5, Claude 3) will be rejected. > * See [Agents Not Accepted](../docs/contributing/custom-agents.md#agents-not-accepted) and [Model Version Requirements](../docs/contributing/ai-artifacts-common.md#model-version-requirements). **Other:** * [ ] Script/automation (`.ps1`, `.sh`, `.py`) * [ ] Other (please describe): ## Sample Prompts (for AI Artifact Contributions) **User Request:** Install hve-core artifacts into a consumer repository via the VS Code extension. Then invoke the BRD Builder agent, ADR Creation agent, or incident-response prompt in a repository that does not have `docs/templates/` files. **Execution Flow:** 1. Agent attempts to read the referenced template file (e.g., `docs/templates/brd-template.md`). 2. Template not found — agent applies the fallback structure defined in its own instructions. 3. Agent generates the output using the fallback skeleton with a note indicating the template was unavailable. 4. For instruction files (commit-message, pester, etc.), the agent discovers available tools from `package.json` or repository structure rather than assuming specific npm scripts exist. **Output Artifacts:** Output varies by artifact. When templates are present, behavior is identical to before. When templates are absent, agents produce the same document types using embedded fallback structures. Instruction-driven agents discover available validation commands rather than failing on missing npm scripts. **Success Indicators:** - No "file not found" errors when template files are absent. - hve-core agents resolve all paths via `copilot-instructions.md` with no behavior regression. - Commit message instructions work in any repository by deriving scopes from directory structure. ## Testing - Diff-based analysis verified all 15 changed files match the portability transformation pattern. - Confirmed all template fallback patterns follow the model from #1286 (*code-review-standards.agent.md*). - Verified `copilot-instructions.md` preserves the hve-core-specific content removed from distributed artifacts. - Security analysis: no sensitive data exposure, no dependency changes, no privilege escalation patterns detected. - Commit message follows conventional commits format: `feat(agents,instructions,prompts): ...` - Manual testing was not performed. ## Checklist ### Required Checks * [x] Documentation is updated (if applicable) * [x] Files follow existing naming conventions * [x] Changes are backwards compatible (if applicable) * [ ] Tests added for new functionality (if applicable) (N/A — markdown-only changes with no testable code) ### AI Artifact Contributions <!-- If contributing an agent, prompt, instruction, or skill, complete these checks --> * [x] Used `/prompt-analyze` to review contribution * [x] Addressed all feedback from `prompt-builder` review * [x] Verified contribution follows common standards and type-specific requirements ### Required Automated Checks The following validation commands must pass before merging: * [x] Markdown linting: `npm run lint:md` * [x] Spell checking: `npm run spell-check` * [x] Frontmatter validation: `npm run lint:frontmatter` * [x] Skill structure validation: `npm run validate:skills` * [x] Link validation: `npm run lint:md-links` * [x] PowerShell analysis: `npm run lint:ps` * [x] Plugin freshness: `npm run plugin:generate` * [x] Docusaurus tests: `npm run docs:test` ## Security Considerations <!-- ⚠️ WARNING: Do not commit sensitive information such as API keys, passwords, or personal data --> * [x] This PR does not contain any sensitive or NDA information * [ ] Any new dependencies have been reviewed for security issues (N/A — no dependency changes) * [ ] Security-related scripts follow the principle of least privilege (N/A — no security scripts modified) ## GHCP Artifact Maturity | File | Type | Maturity | Notes | |---|---|---|---| | `.github/agents/coding-standards/code-review-full.agent.md` | Agent | ⚠️ experimental | Pre-release only | | `.github/agents/project-planning/brd-builder.agent.md` | Agent | ✅ stable | All builds | | `.github/agents/project-planning/adr-creation.agent.md` | Agent | ✅ stable | All builds | | `.github/agents/project-planning/system-architecture-reviewer.agent.md` | Agent | ✅ stable | All builds | | `.github/agents/project-planning/ux-ui-designer.agent.md` | Agent | ✅ stable | All builds | | `.github/agents/hve-core/doc-ops.agent.md` | Agent | ✅ stable | All builds | | `.github/agents/hve-core/rpi-agent.agent.md` | Agent | ✅ stable | All builds | | `.github/instructions/coding-standards/bash/bash.instructions.md` | Instructions | ✅ stable | All builds | | `.github/instructions/coding-standards/powershell/pester.instructions.md` | Instructions | ✅ stable | All builds | | `.github/instructions/coding-standards/powershell/powershell.instructions.md` | Instructions | ✅ stable | All builds | | `.github/instructions/hve-core/commit-message.instructions.md` | Instructions | ✅ stable | All builds | | `.github/instructions/hve-core/markdown.instructions.md` | Instructions | ✅ stable | All builds | | `.github/instructions/hve-core/prompt-builder.instructions.md` | Instructions | ✅ stable | All builds | | `.github/prompts/security/incident-response.prompt.md` | Prompt | ⚠️ experimental | Pre-release only | > [!WARNING] > This PR includes **experimental** GHCP artifacts that may have breaking changes. > - `.github/agents/coding-standards/code-review-full.agent.md` > - `.github/prompts/security/incident-response.prompt.md` ### GHCP Maturity Acknowledgment - [x] I acknowledge this PR includes non-stable GHCP artifacts - [x] Non-stable artifacts are intentional for this change
1 parent a3acef3 commit ef520df

15 files changed

+132
-93
lines changed

.github/agents/coding-standards/code-review-full.agent.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,15 +205,15 @@ Read all findings, the review-artifacts protocol, and the output format template
205205
* `<findingsFolder>/functional-findings.json`
206206
* `<findingsFolder>/standards-findings.json`
207207
* #file:../../instructions/coding-standards/code-review/review-artifacts.instructions.md (for the persistence protocol — read exactly once here; do not re-read later)
208-
* `docs/templates/full-review-output-format.md` (for the JSON schema, report skeleton, and persist-and-present rules — read exactly once here)
208+
* `docs/templates/full-review-output-format.md` (for the JSON schema, report skeleton, and persist-and-present rules — read exactly once here). If the file is not found, apply a best-effort structure using the section names and field definitions in this agent as guidance and note: "⚠️ Report template not found — output structure may vary."
209209

210210
Issue all four `read_file` calls in one tool-call block. Do not read any of these files a second time during this step. Do not read source files, diff content, diff-state.json, or agent definition files during Step 3 — all information needed for the merge is contained in the findings JSON files, the review-artifacts protocol, and the output format template.
211211

212212
For L or XL batch reviews, read `functional-findings-batch-N.json` and `standards-findings-batch-N.json` for each batch and concatenate findings arrays within each reviewer before applying transformation rules.
213213

214214
#### Output Format Reference
215215

216-
Read `docs/templates/full-review-output-format.md` for the Subagent Findings JSON Schema, Report Skeleton, and Persist and Present protocol. This file is loaded in the Read Findings parallel batch — do not read it separately.
216+
Read `docs/templates/full-review-output-format.md` for the Subagent Findings JSON Schema, Report Skeleton, and Persist and Present protocol. This file is loaded in the Read Findings parallel batch — do not read it separately. If the file was not found during the parallel read, apply a best-effort report structure.
217217

218218
#### Transformation Rules
219219

.github/agents/hve-core/doc-ops.agent.md

Lines changed: 21 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,18 @@ The main agent executes directly only for:
3535

3636
### Included Files
3737

38-
| Pattern | Description |
39-
|----------------------|----------------------------------------------|
40-
| `docs/**/*.md` | User-facing documentation, tutorials, guides |
41-
| `README.md` | Repository root README |
42-
| `CONTRIBUTING.md` | Contribution guidelines |
43-
| `CHANGELOG.md` | Release history |
44-
| `CODE_OF_CONDUCT.md` | Community standards |
45-
| `GOVERNANCE.md` | Project governance |
46-
| `SECURITY.md` | Security policy |
47-
| `SUPPORT.md` | Support information |
48-
| `LICENSE` | License file |
49-
| `scripts/**/*.md` | Script documentation and READMEs |
38+
| Pattern | Description |
39+
|----------------------------------------------|------------------------------------------------------------------------|
40+
| `docs/**/*.md` | User-facing documentation, tutorials, guides |
41+
| `README.md` | Repository root README |
42+
| `CONTRIBUTING.md` | Contribution guidelines |
43+
| `CHANGELOG.md` | Release history |
44+
| `CODE_OF_CONDUCT.md` | Community standards |
45+
| `GOVERNANCE.md` | Project governance |
46+
| `SECURITY.md` | Security policy |
47+
| `SUPPORT.md` | Support information |
48+
| `LICENSE` | License file |
49+
| Top-level directories containing `.md` files | Script documentation, tool READMEs, and other markdown outside `docs/` |
5050

5151
### Excluded Files
5252

@@ -84,9 +84,9 @@ Verify documentation matches implementation:
8484

8585
Discover undocumented functionality:
8686

87-
* Scan `scripts/` for scripts without corresponding documentation.
88-
* Check `extension/` for undocumented features or commands.
89-
* Identify `.github/skills/` entries without adequate documentation.
87+
* Scan top-level directories for scripts, tools, or modules without corresponding documentation.
88+
* Check for undocumented features or commands in build, packaging, or extension directories if they exist.
89+
* Identify `.github/skills/` entries without adequate documentation if the repository uses skills.
9090
* Find exported functions or APIs lacking usage documentation.
9191

9292
## Tracking Integration
@@ -157,7 +157,7 @@ Run `Researcher Subagent` with:
157157
Run `Researcher Subagent` with:
158158

159159
* Task: Compare documentation claims against actual implementation.
160-
* Focus areas: Script parameter documentation in scripts/, file structure descriptions in docs/, example commands and their expected behavior.
160+
* Focus areas: Script parameter documentation, file structure descriptions in documentation directories, example commands and their expected behavior.
161161
* Response format: List each discrepancy with documentation file, implementation file, discrepancy type, and current vs. documented values.
162162
* Requirement: Indicate whether additional passes are needed.
163163

@@ -166,7 +166,7 @@ Run `Researcher Subagent` with:
166166
Run `Researcher Subagent` with:
167167

168168
* Task: Identify undocumented functionality.
169-
* Scan locations: scripts/ (scripts without README or usage docs), extension/ (undocumented features), .github/skills/ (skills without adequate documentation).
169+
* Scan locations: Top-level directories containing scripts or tools (look for missing README or usage docs), packaging or extension directories if present (undocumented features), .github/skills/ if the repository uses skills (inadequate documentation).
170170
* Response format: List each gap with location, functionality type, and suggested documentation approach.
171171
* Requirement: Indicate whether additional passes are needed.
172172

@@ -225,10 +225,7 @@ After implementation subagents complete:
225225

226226
Run validation scripts and verify work completion.
227227

228-
* Execute available validation commands:
229-
* `npm run lint:md` for markdown linting.
230-
* `npm run lint:frontmatter` for frontmatter validation.
231-
* `npm run lint:md-links` for link checking.
228+
* Execute available validation commands from `package.json` (common examples: markdown linting, frontmatter validation, link checking). If no validation scripts are defined, rely on manual review against the repository's instructions files.
232229
* Parse validation output for remaining issues.
233230
* Compare against baseline from Phase 1.
234231

@@ -355,21 +352,15 @@ All subagents return responses containing:
355352

356353
## Validation Integration
357354

358-
Use available npm scripts for automated validation:
355+
Check `package.json` for available validation scripts. Common validation types include markdown linting, frontmatter schema validation, and link checking.
359356

360-
| Script | Purpose |
361-
|----------------------------|-------------------------------|
362-
| `npm run lint:md` | Markdownlint validation |
363-
| `npm run lint:frontmatter` | Frontmatter schema validation |
364-
| `npm run lint:md-links` | Link validity checking |
365-
366-
If validation scripts are unavailable, rely on manual review against instructions files.
357+
If validation scripts are unavailable, rely on manual review against the repository's instructions files.
367358

368359
Run validation:
369360

370361
* Before Phase 1 to establish baseline.
371362
* After Phase 3 to verify fixes.
372-
* Parse JSON output from logs/ when available.
363+
* Parse structured output from the repository's log or output directory when available.
373364

374365
## Error Handling
375366

.github/agents/hve-core/rpi-agent.agent.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ disable-model-invocation: true
66
agents:
77
- Researcher Subagent
88
- Phase Implementor
9-
- RPI Validator
10-
- Implementation Validator
119
handoffs:
1210
- label: Compact
1311
agent: RPI Agent

.github/agents/project-planning/adr-creation.agent.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Create a working draft only after understanding the core decision well enough to
4444

4545
After identifying the core decision and before creating the working draft, establish the final ADR location. This enables checking for related decisions and ensures consistent organization.
4646

47-
Recommended placement for HVE Core is `docs/decisions/`. This follows industry standards (adr.github.io, AWS guidance, GitHub ADR community), uses accessible language, and scales to include non-architecture decisions.
47+
Recommended placement is `docs/decisions/`. This follows industry standards (adr.github.io, AWS guidance, GitHub ADR community), uses accessible language, and scales to include non-architecture decisions.
4848

4949
File naming uses ISO date prefix with version: `YYYY-MM-DD-descriptive-topic-v01.md`
5050

@@ -131,4 +131,4 @@ Apply Socratic methods throughout:
131131

132132
Adapt communication to match energy levels, technical depth, and time constraints. Acknowledge growth and note insights as understanding evolves.
133133

134-
Reference `docs/templates/adr-template-solutions.md` when helpful, but let structure emerge from good decision-making rather than forcing template sections. The ADR is the artifact, but the learning and confidence are the real outcomes.
134+
Reference `docs/templates/adr-template-solutions.md` when helpful. If the template is not found, use a minimal ADR structure: Title, Status, Context, Decision, Consequences. Let structure emerge from good decision-making rather than forcing template sections. The ADR is the artifact, but the learning and confidence are the real outcomes.

.github/agents/project-planning/brd-builder.agent.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ File locations:
4141

4242
* BRD file: `docs/brds/<kebab-case-name>-brd.md`
4343
* State file: `.copilot-tracking/brd-sessions/<kebab-case-name>.state.json`
44-
* Template: `docs/templates/brd-template.md`
44+
* Template: `docs/templates/brd-template.md` (if available in the repository or extension/plugin context)
4545

4646
File creation process:
4747

48-
1. Read the BRD template from `docs/templates/brd-template.md`.
49-
2. Create BRD file at `docs/brds/<kebab-case-name>-brd.md` using the template structure.
48+
1. Read the BRD template from `docs/templates/brd-template.md`. If the template is not found, use the section structure defined in this agent as the BRD skeleton.
49+
2. Create BRD file at `docs/brds/<kebab-case-name>-brd.md` using the template structure (or the agent-defined skeleton if the template was unavailable).
5050
3. Create state file at `.copilot-tracking/brd-sessions/<kebab-case-name>.state.json`.
5151
4. Initialize BRD by replacing `{{placeholder}}` values with known content.
5252
5. Announce creation to user and explain next steps.

.github/agents/project-planning/system-architecture-reviewer.agent.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Architecture review specialist focused on design trade-offs, well-architected al
2222
* Drive toward clear architectural recommendations with documented trade-offs.
2323
* Preserve decision rationale through ADRs so future team members understand the context.
2424
* Escalate security-specific concerns to the `security-planner` agent.
25-
* Reference `docs/templates/adr-template-solutions.md` for ADR structure.
25+
* Reference `docs/templates/adr-template-solutions.md` for ADR structure, if available. If the template is not found, use a minimal ADR structure: Title, Status, Context, Decision, Consequences.
2626
* Follow repository conventions from `.github/copilot-instructions.md`.
2727

2828
## Required Steps
@@ -133,7 +133,7 @@ For each trade-off, document the decision drivers, options considered, and ratio
133133

134134
### Step 5: Document Architecture Decisions
135135

136-
Create an Architecture Decision Record for each significant architectural choice. Use the ADR template at `docs/templates/adr-template-solutions.md` as the structural foundation.
136+
Create an Architecture Decision Record for each significant architectural choice. Use the ADR template at `docs/templates/adr-template-solutions.md` as the structural foundation, if available. If the template is not found, use a minimal ADR structure: Title, Status, Context, Decision, Consequences.
137137

138138
ADR creation criteria: document decisions when they involve:
139139

.github/agents/project-planning/ux-ui-designer.agent.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Analyze the incumbent solution:
7171

7272
Tag each element of the JTBD analysis with its evidence basis: observed (from user research), reported (from stakeholder or user feedback), or assumed (team hypothesis). Journey maps built primarily on assumptions should include a recommendation to validate through user interviews before influencing design.
7373

74-
Document the JTBD analysis using the Jobs-to-be-Done Analysis section of the [user journey template](../../../docs/templates/user-journey-template.md).
74+
Document the JTBD analysis using the Jobs-to-be-Done Analysis section of the user journey template at `docs/templates/user-journey-template.md` in repo, extension or plugin context. If the template is not found, structure the JTBD analysis with: Job Statement, Context, Functional/Emotional/Social dimensions, and Success Metrics.
7575

7676
### Step 3: User Journey Mapping
7777

@@ -85,7 +85,7 @@ Structure each journey around sequential stages (awareness, exploration, action,
8585
* Pain points that create friction, confusion, or abandonment.
8686
* Design opportunities that address the identified pain points.
8787

88-
Use the [user journey template](../../../docs/templates/user-journey-template.md) as the structural foundation.
88+
Use the user journey template at `docs/templates/user-journey-template.md` as the structural foundation. If the template is not found, structure journey maps with: Persona, Scenario, Phases (with steps, touchpoints, emotions, pain points, opportunities per phase), and Key Insights.
8989

9090
### Step 4: Accessibility Requirements
9191

@@ -128,7 +128,7 @@ When collaborating with the product manager, provide journey maps and JTBD analy
128128

129129
## Documentation Output
130130

131-
Save research artifacts using the [user journey template](../../../docs/templates/user-journey-template.md) structure. Place completed journey maps in a location appropriate to the project's documentation conventions.
131+
Save research artifacts using the user journey template at `docs/templates/user-journey-template.md` if available. Place completed journey maps in a location appropriate to the project's documentation conventions. If the template is not found, use the structural patterns described in this agent.
132132

133133
Each research cycle produces:
134134

.github/copilot-instructions.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,18 @@ By convention, skills are self-contained packages organized under `.github/skill
7171
* Contributing (`docs/contributing/`) - Guidelines for instructions, prompts, agents, and AI artifacts.
7272
* Templates (`docs/templates/`) - Templates for custom agents, instructions, and prompts.
7373

74+
### Documentation Templates
75+
76+
Templates for agent and prompt outputs are stored in `docs/templates/`:
77+
78+
* `docs/templates/full-review-output-format.md` - Code review full output format.
79+
* `docs/templates/standards-review-output-format.md` - Standards review output format.
80+
* `docs/templates/engineering-fundamentals.md` - Engineering fundamentals reference.
81+
* `docs/templates/brd-template.md` - Business requirements document template.
82+
* `docs/templates/user-journey-template.md` - User journey template.
83+
* `docs/templates/adr-template-solutions.md` - Architecture decision record template.
84+
* `docs/templates/rca-template.md` - Root cause analysis template.
85+
7486
### Copilot Tracking
7587

7688
The `.copilot-tracking/` directory (gitignored) contains AI-assisted workflow artifacts:
@@ -117,6 +129,52 @@ Collection manifests in `collections/` define bundles of agents, prompts, instru
117129
* Artifacts at the root of `.github/agents/`, `.github/instructions/`, `.github/prompts/`, or `.github/skills/` (without a subdirectory) are repo-specific and excluded from collection manifests, plugin generation, and extension packaging. Validation enforces this rule.
118130

119131
PowerShell scripts follow PSScriptAnalyzer rules from `scripts/linting/PSScriptAnalyzer.psd1` and include proper comment-based help. Validation runs via `npm run lint:ps` with results output to `logs/`.
132+
133+
### Commit Message Scopes
134+
135+
Commit message scopes map to repository directories:
136+
137+
* `(agents)` = `.github/agents/`
138+
* `(prompts)` = `.github/prompts/`
139+
* `(instructions)` = `.github/instructions/`
140+
* `(skills)` = `.github/skills/`
141+
* `(templates)` = `.github/ISSUE_TEMPLATE/`
142+
* `(workflows)` = `.github/workflows/`
143+
* `(extension)` = `extension/`
144+
* `(scripts)` = `scripts/`
145+
* `(docs)` = `docs/`
146+
* `(collections)` = `collections/`
147+
* `(adrs)` = Architecture Decision Records
148+
* `(settings)` = Configuration files (`.vscode/`, linter configs)
149+
* `(build)` = Build system and dependencies
150+
* `(ci)` = CI/CD configuration changes
151+
152+
### Frontmatter Schema Validation
153+
154+
Frontmatter schemas are stored in `scripts/linting/schemas/`. Schema-to-file mapping is defined in `scripts/linting/schemas/schema-mapping.json`. Run `npm run validate:frontmatter` or `pwsh scripts/linting/Validate-MarkdownFrontmatter.ps1` to validate.
155+
156+
### PowerShell Conventions
157+
158+
* Copyright header validation: `scripts/linting/Test-CopyrightHeaders.ps1` (also used by bash scripts).
159+
* Shared CI helpers module: `scripts/lib/Modules/CIHelpers.psm1`.
160+
* Test directories follow the pattern `scripts/tests/{category}/Test-*.Tests.ps1`.
161+
* Test organization mirrors source: `scripts/linting/` tests live in `scripts/tests/linting/`, `scripts/security/` tests live in `scripts/tests/security/`.
162+
163+
### Documentation Operations
164+
165+
The doc-ops agent scans these directories for documentation coverage analysis:
166+
167+
* `docs/` - Primary documentation tree.
168+
* `scripts/` - Script-level markdown files and inline documentation.
169+
* `extension/` - Extension packaging documentation.
170+
* `.github/` - Agent, prompt, instruction, and skill documentation.
171+
172+
Validation commands for documentation quality:
173+
174+
* `npm run lint:md` - Markdown linting.
175+
* `npm run lint:frontmatter` - Frontmatter validation.
176+
* `npm run lint:md-links` - Markdown link checking.
177+
* Parse JSON output from `logs/` when available for structured validation results.
120178
<!-- </script-operations> -->
121179

122180
<!-- <coding-agent-environment> -->

.github/instructions/coding-standards/bash/bash.instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Two required lines:
6666

6767
Placement: after `#!/usr/bin/env bash`, before any other content.
6868

69-
CI validates copyright headers via `npm run validate:copyright` using `scripts/linting/Test-CopyrightHeaders.ps1`.
69+
CI validates copyright headers through the repository's copyright validation script, if one is configured. Check `package.json` for a copyright validation command.
7070

7171
<!-- <example-copyright-header> -->
7272
```bash

0 commit comments

Comments
 (0)