Skip to content

Commit 78060aa

Browse files
committed
feat(#194): update documentation for clarity and consistency
- Refine instructions for step-by-step refactoring of unhealthy files - Remove redundant references to skills in various sections - Simplify language for better understanding in the guidelines
1 parent 66b2262 commit 78060aa

6 files changed

Lines changed: 41 additions & 13 deletions

File tree

scripts/build/Sync-AgenticCopilotScaffold.psd1

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@{
1+
@{
22
OutputPath = 'src/resources/agentic-copilot'
33

44
SourcePaths = @(
@@ -344,7 +344,31 @@
344344
}
345345
@{
346346
Old = '- For step-by-step refactoring of unhealthy files, use the `building-maintainable-code` and `guiding-refactoring-with-code-health` skills together: the first picks the right guideline, the second runs measured maintainability checks between steps.'
347-
New = '- For step-by-step refactoring of unhealthy files, use the `building-maintainable-code` for checks between steps.'
347+
New = '- For step-by-step refactoring of unhealthy files, use the `building-maintainable-code` skill for checks between steps.'
348+
}
349+
@{
350+
Old = ', `codescene-quality`, `safeguarding-ai-generated-code`'
351+
New = ''
352+
}
353+
@{
354+
Old = '`codescene-quality`, `safeguarding-ai-generated-code`, '
355+
New = ''
356+
}
357+
@{
358+
Old = ', `codescene-quality`, `workflow guidance`, `guiding-refactoring-with-code-health`, `safeguarding-ai-generated-code`'
359+
New = ''
360+
}
361+
@{
362+
Old = '- a `code_health_review`, reviewer, or `./run.ps1` run flags maintainability problems'
363+
New = '- a reviewer or `./run.ps1` run flags maintainability problems'
364+
}
365+
@{
366+
Old = '- measuring or driving a single file''s score across steps — use `guiding-refactoring-with-code-health` for that'
367+
New = '- measuring or driving a single file''s score across steps — use the step-by-step workflow below for that'
368+
}
369+
@{
370+
Old = '. For risk-bearing files, also run `code_health_review` from the `safeguarding-ai-generated-code` skill.'
371+
New = '.'
348372
}
349373
@{
350374
Old = 'CommandInfo = Get-Command -Module NovaModuleTools'
@@ -362,5 +386,9 @@
362386
Old = '- `code_health_review` paired with `guiding-refactoring-with-code-health` when iterating on a single unhealthy file'
363387
New = ''
364388
}
389+
@{
390+
Old = ', or `nova` CLI route naming conventions.'
391+
New = '.'
392+
}
365393
)
366394
}

src/resources/agentic-copilot/.github/copilot-instructions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ The table below shows how to route work. Prompts are the task entry points; each
4040
| Task | Prompt | Agent | Primary skills | Primary instructions |
4141
| ----------------------------- | ------------------------------------------ | ---------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------- |
4242
| Design or scope a change | `design-change.prompt.md` | `architect` | `powershell-module-development`, `workflow guidance`, `release-and-changelog`, `markdown-authoring` | `repository-conventions`, `code-quality-matrix` |
43-
| Implement an issue | `implement-issue.prompt.md` | `powershell-developer` | `powershell-module-development`, `pester-testing`, `building-maintainable-code`, `codescene-quality`, `safeguarding-ai-generated-code` | `repository-conventions`, `code-quality-matrix`, `psscriptanalyzer`, `powershell-coding-standards`, `platyps-help` |
44-
| Review a change | `review-change.prompt.md` | `reviewer` | `codescene-quality`, `safeguarding-ai-generated-code`, `building-maintainable-code`, `documentation`, `markdown-authoring`, `pester-testing`, `release-and-changelog`, `workflow guidance` | All `.github/instructions/*.instructions.md` |
45-
| Improve test coverage | `improve-test-coverage.prompt.md` | `test-engineer` | `pester-testing`, `building-maintainable-code`, `codescene-quality`, `workflow guidance`, `guiding-refactoring-with-code-health`, `safeguarding-ai-generated-code` | `testing-policy`, `psscriptanalyzer` |
43+
| Implement an issue | `implement-issue.prompt.md` | `powershell-developer` | `powershell-module-development`, `pester-testing`, `building-maintainable-code` | `repository-conventions`, `code-quality-matrix`, `psscriptanalyzer`, `powershell-coding-standards`, `platyps-help` |
44+
| Review a change | `review-change.prompt.md` | `reviewer` | `building-maintainable-code`, `documentation`, `markdown-authoring`, `pester-testing`, `release-and-changelog`, `workflow guidance` | All `.github/instructions/*.instructions.md` |
45+
| Improve test coverage | `improve-test-coverage.prompt.md` | `test-engineer` | `pester-testing`, `building-maintainable-code` | `testing-policy`, `psscriptanalyzer` |
4646
| Prepare a release | `prepare-release.prompt.md` | `release-manager` | `release-and-changelog`, `markdown-authoring` | `release-policy`, `repository-conventions` |
4747
| Fix a CI failure | `fix-ci-failure.prompt.md` | `powershell-developer` (or `test-engineer`) | `workflow guidance`, `pester-testing` | `testing-policy`, `psscriptanalyzer`, `repository-conventions` |
4848
| Update project docs | (no dedicated prompt — invoke agent) | `documentation` | `documentation`, `markdown-authoring` | `documentation` |

src/resources/agentic-copilot/.github/instructions/code-quality-matrix.instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,4 @@ This file tells Agentic Copilot how to shape source code from the start. Test-sp
135135
- Flag long mixed-responsibility functions, deep nesting, duplicated blocks, long parameter lists, pass-through helpers, provider-specific branching spread across callers, dead or commented-out code, magic values, and broad or hidden exception handling.
136136
- When a finding is unit-level (Guidelines 1–4), prefer raising it before component-level findings (Guidelines 5–8). The unit fix usually makes the component fix smaller.
137137
- When the code smell is test-specific, route that feedback through `.github/instructions/testing-policy.instructions.md` and the `pester-testing` skill instead of stretching this file to cover test-only patterns.
138-
- For step-by-step refactoring of unhealthy files, use the `building-maintainable-code` for checks between steps.
138+
- For step-by-step refactoring of unhealthy files, use the `building-maintainable-code` skill for checks between steps.

src/resources/agentic-copilot/.github/instructions/powershell-coding-standards.instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Use this file when changing `src/public/`, `src/private/`, or PowerShell build/r
2424
- Additional functions in a private file are allowed only as related top-level support helpers called from that same file.
2525
- If two private functions are both called from outside their file, split them into separate same-named files.
2626
- Do not declare functions inside other functions. Keep private support helpers as sibling top-level functions in the file instead of nested function declarations.
27-
- Private helper names should not use the public `Invoke-{{ShortName}}*`, `Get-{{ShortName}}*`, `Update-{{ShortName}}*`, or `nova` CLI route naming conventions. Give private helpers clear implementation-focused names that describe what the helper does.
27+
- Private helper names should not use the public `Invoke-{{ShortName}}*`, `Get-{{ShortName}}*`, `Update-{{ShortName}}*`. Give private helpers clear implementation-focused names that describe what the helper does.
2828
- Reuse existing adapters and shared helpers before adding new infrastructure calls.
2929
- Keep direct environment access, Git execution, upload requests, and self-update execution in their approved helper locations. `tests/*Architecture*.Tests.ps1` is authoritative.
3030
- Prefer explicit workflow-context objects (`[pscustomobject]` / ordered hashtables) for multi-step flows.

src/resources/agentic-copilot/.github/skills/building-maintainable-code/SKILL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ Use this skill when:
1111

1212
- adding a new public command or private helper to {{ProjectName}}
1313
- refactoring a function, file, or domain folder that has grown over time
14-
- a `code_health_review`, reviewer, or `./run.ps1` run flags maintainability problems
14+
- a reviewer or `./run.ps1` run flags maintainability problems
1515
- you want a concrete, PowerShell-aware playbook for the guidelines
1616

1717
Do not use this skill for:
1818

1919
- test-specific guidance — use the `pester-testing` skill
2020
- release/changelog work — use the `release-and-changelog` skill
21-
- measuring or driving a single file's score across steps — use `guiding-refactoring-with-code-health` for that
21+
- measuring or driving a single file's score across steps — use the step-by-step workflow below for that
2222

2323
The companion instruction file is `.github/instructions/code-quality-matrix.instructions.md`. This skill is the actionable workflow that implements those rules.
2424

@@ -67,7 +67,7 @@ Follow these steps for any non-trivial PowerShell change.
6767
1. Read the changed function and surrounding file. Note where it sits in `src/public/`, `src/private/<domain>/`, or `scripts/`.
6868
2. For each new or heavily changed function, walk the checklist below in order.
6969
3. If a step requires a refactor, make it the smallest structural step that fixes the specific finding. Do not bundle unrelated cleanup.
70-
4. After meaningful steps, run `./run.ps1` (analyzer → build → `Test-NovaBuild`). For risk-bearing files, also run `code_health_review` from the `safeguarding-ai-generated-code` skill.
70+
4. After meaningful steps, run `./run.ps1` (analyzer → build → `Test-NovaBuild`).
7171
5. Before handoff, normalize every changed text file to exactly one trailing newline.
7272

7373
### Step 1 — Short units (≤ 15 lines)

src/resources/agentic-copilot/AGENTS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ The table below shows how to route work. Prompts are the task entry points; each
4242
| Task | Prompt | Agent | Primary skills | Primary instructions |
4343
| ----------------------------- | ------------------------------------------ | ---------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------- |
4444
| Design or scope a change | `design-change.prompt.md` | `architect` | `powershell-module-development`, `workflow guidance`, `release-and-changelog`, `markdown-authoring` | `repository-conventions`, `code-quality-matrix` |
45-
| Implement an issue | `implement-issue.prompt.md` | `powershell-developer` | `powershell-module-development`, `pester-testing`, `building-maintainable-code`, `codescene-quality`, `safeguarding-ai-generated-code` | `repository-conventions`, `code-quality-matrix`, `psscriptanalyzer`, `powershell-coding-standards`, `platyps-help` |
46-
| Review a change | `review-change.prompt.md` | `reviewer` | `codescene-quality`, `safeguarding-ai-generated-code`, `building-maintainable-code`, `documentation`, `markdown-authoring`, `pester-testing`, `release-and-changelog`, `workflow guidance` | All `.github/instructions/*.instructions.md` |
47-
| Improve test coverage | `improve-test-coverage.prompt.md` | `test-engineer` | `pester-testing`, `building-maintainable-code`, `codescene-quality`, `workflow guidance`, `guiding-refactoring-with-code-health`, `safeguarding-ai-generated-code` | `testing-policy`, `psscriptanalyzer` |
45+
| Implement an issue | `implement-issue.prompt.md` | `powershell-developer` | `powershell-module-development`, `pester-testing`, `building-maintainable-code` | `repository-conventions`, `code-quality-matrix`, `psscriptanalyzer`, `powershell-coding-standards`, `platyps-help` |
46+
| Review a change | `review-change.prompt.md` | `reviewer` | `building-maintainable-code`, `documentation`, `markdown-authoring`, `pester-testing`, `release-and-changelog`, `workflow guidance` | All `.github/instructions/*.instructions.md` |
47+
| Improve test coverage | `improve-test-coverage.prompt.md` | `test-engineer` | `pester-testing`, `building-maintainable-code` | `testing-policy`, `psscriptanalyzer` |
4848
| Prepare a release | `prepare-release.prompt.md` | `release-manager` | `release-and-changelog`, `markdown-authoring` | `release-policy`, `repository-conventions` |
4949
| Fix a CI failure | `fix-ci-failure.prompt.md` | `powershell-developer` (or `test-engineer`) | `workflow guidance`, `pester-testing` | `testing-policy`, `psscriptanalyzer`, `repository-conventions` |
5050
| Update project docs | (no dedicated prompt — invoke agent) | `documentation` | `documentation`, `markdown-authoring` | `documentation` |

0 commit comments

Comments
 (0)