Skip to content

Commit 5901143

Browse files
Address PR review feedback
- Align documented slash-command names with plugin manifest: /acreadiness-assess, /acreadiness-generate-instructions, /acreadiness-policy (was /assess, /generate-instructions, /policy inside SKILL bodies and argument-hints). - Move the literal % from the report template into the substituted values for {{passRate}} and {{threshold}} so an N/A value of '—' no longer renders as '—%'. Updated the agent placeholder contract accordingly. - Point the report footer at the canonical plugin folder under github/awesome-copilot instead of the personal source fork. - Add explicit HTML-escaping rules to the agent: HTML-escape every {{placeholder}} substitution, and replace </script with <\/script inside the embedded JSON block so untrusted repo content cannot break the markup or inject scripts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent a4c2807 commit 5901143

5 files changed

Lines changed: 14 additions & 10 deletions

File tree

agents/ai-readiness-reporter.agent.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ Hard rules — do **not** deviate:
173173
- Do not add tabs, toggles, theme switches, dark/light variants, or extra navigation. The report is a single, unified view.
174174
- Do not add external CSS, fonts, JS frameworks, or analytics. The file must open with `file://` and have zero network dependencies.
175175
- Preserve the embedded `<script type="application/json" id="raw-data">…</script>` block so the report is self-describing.
176+
- **Escape every substituted value** before inserting it into the template:
177+
- HTML-escape `&`, `<`, `>`, `"`, and `'` in all `{{placeholder}}` substitutions destined for HTML body content or attribute values (e.g. `{{repoName}}`, `{{pillarCurrent}}`, `{{pillarRecommendation}}`, `{{policySummary}}`, `{{rawJsonPretty}}`).
178+
- For `{{rawJsonCompact}}` (which lives inside the `<script type="application/json">` block), replace any `</script` substring with `<\/script` to prevent the script tag from being closed early. Do NOT HTML-escape inside this block — the JSON must remain valid.
179+
- Never substitute raw user-controlled strings (filenames, commit messages, recommendations) without escaping. A repo with `<img onerror=…>` in a filename must NOT produce executable HTML in the report.
176180

177181
Placeholders the template uses (all required unless marked optional):
178182

@@ -182,7 +186,7 @@ Placeholders the template uses (all required unless marked optional):
182186
| `{{date}}` | ISO date the report was generated |
183187
| `{{level}}` / `{{levelName}}` | AgentRC maturity level number + name |
184188
| `{{overallPct}}` / `{{grade}}` | overall score as integer percent + letter grade |
185-
| `{{passRatePct}}` / `{{thresholdPct}}` | pass rate vs policy threshold (use `` if N/A) |
189+
| `{{passRate}}` / `{{threshold}}` | pass rate vs policy threshold, fully-formatted (e.g. `85%` or `` if N/A). The literal `%` is part of the substituted value, not the template. |
186190
| `{{policyName}}` / `{{policySummary}}` | only if a policy is active; otherwise omit the policy section |
187191
| `{{rawJsonCompact}}` / `{{rawJsonPretty}}` | embed the AgentRC JSON envelope |
188192

skills/acreadiness-assess/SKILL.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
name: acreadiness-assess
33
description: 'Run the AgentRC readiness assessment on the current repository and produce a static HTML dashboard at reports/index.html. Wraps `npx github:microsoft/agentrc readiness` and hands off rendering to the @ai-readiness-reporter custom agent. Supports policies (--policy) for org-specific scoring. Use when asked to assess, audit, or score the AI readiness of a repo.'
4-
argument-hint: "[--policy <path-or-pkg>] [--per-area] — e.g. /assess, /assess --policy ./policies/strict.json"
4+
argument-hint: "[--policy <path-or-pkg>] [--per-area] — e.g. /acreadiness-assess, /acreadiness-assess --policy ./policies/strict.json"
55
---
66

7-
# /assess — AI-readiness assessment
7+
# /acreadiness-assess — AI-readiness assessment
88

99
Use this skill whenever the user asks for an **AI-readiness assessment**, a **readiness check**, an **audit**, or wants to **see how AI-ready** their repository is.
1010

@@ -18,7 +18,7 @@ This skill is the *Measure* step in AgentRC's **Measure → Generate → Maintai
1818
- If the user provided `--policy <source>`, capture it.
1919
- Otherwise check `agentrc.config.json` for a `policies` array.
2020
- If neither, run with no policy (built-in defaults).
21-
- For a primer on policies, suggest the `policy` skill.
21+
- For a primer on policies, suggest the `acreadiness-policy` skill.
2222

2323
3. **Run the readiness scan** in the repo root with structured output:
2424
```bash
@@ -37,7 +37,7 @@ This skill is the *Measure* step in AgentRC's **Measure → Generate → Maintai
3737
- Produces a **Prioritised Remediation Plan** (🔴 Fix First / 🟡 Fix Next / 🔵 Plan).
3838
- Embeds the raw AgentRC JSON for reuse.
3939

40-
5. **Tell the user where the report lives** (`reports/index.html`) and how to open it. Summarise in chat: maturity level, overall score, top three lowest pillars, and the single highest-leverage next action (almost always: run the `generate-instructions` skill).
40+
5. **Tell the user where the report lives** (`reports/index.html`) and how to open it. Summarise in chat: maturity level, overall score, top three lowest pillars, and the single highest-leverage next action (almost always: run the `acreadiness-generate-instructions` skill).
4141

4242
## Notes
4343

skills/acreadiness-assess/report-template.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ <h2>What is AI Readiness?</h2>
123123
<section class="grid cols-3">
124124
<div class="panel kpi"><span class="lbl">Maturity</span><div class="num"><span class="badge lvl-{{level}}">L{{level}} — {{levelName}}</span></div></div>
125125
<div class="panel kpi"><span class="lbl">Overall Score</span><div class="num">{{overallPct}}%</div><div style="color:var(--muted);font-size:12px">Grade {{grade}}</div></div>
126-
<div class="panel kpi"><span class="lbl">Pass rate</span><div class="num">{{passRatePct}}%</div><div style="color:var(--muted);font-size:12px">Threshold {{thresholdPct}}%</div></div>
126+
<div class="panel kpi"><span class="lbl">Pass rate</span><div class="num">{{passRate}}</div><div style="color:var(--muted);font-size:12px">Threshold {{threshold}}</div></div>
127127
</section>
128128

129129
<!-- 3. Maturity progression -->
@@ -220,7 +220,7 @@ <h2>Next Steps</h2>
220220
</main>
221221

222222
<footer>
223-
Generated by <a href="https://github.com/mvanderbend-msoft/acreadiness-cockpit">acreadiness-cockpit</a>
223+
Generated by <a href="https://github.com/github/awesome-copilot/tree/main/plugins/acreadiness-cockpit">acreadiness-cockpit</a>
224224
· powered by <a href="https://github.com/microsoft/agentrc">microsoft/agentrc</a>.
225225
</footer>
226226
</body>

skills/acreadiness-generate-instructions/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: 'Generate tailored AI agent instruction files via AgentRC instructi
44
argument-hint: "[--output .github/copilot-instructions.md|AGENTS.md] [--strategy flat|nested] [--areas | --area <name>] [--apply-to <glob>] [--claude-md] [--dry-run]"
55
---
66

7-
# /generate-instructions — write AI agent instructions
7+
# /acreadiness-generate-instructions — write AI agent instructions
88

99
Use this skill whenever the user wants to **create**, **regenerate**, or **refresh** their custom instructions for AI coding agents (Copilot, Claude, etc.). This is the *Generate* step in AgentRC's **Measure → Generate → Maintain** loop and the single highest-leverage action for the **AI Tooling** pillar.
1010

skills/acreadiness-policy/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
name: acreadiness-policy
33
description: 'Help the user pick, write, or apply an AgentRC policy. Policies customise readiness scoring by disabling irrelevant checks, overriding impact/level, setting pass-rate thresholds, or chaining org baselines with team overrides. Use when the user asks about strict mode, AI-only scoring, custom weights, CI gating, or wants org-wide standardisation.'
4-
argument-hint: "[show | new <name> | apply <path-or-pkg>] — e.g. /policy show, /policy new strict-frontend"
4+
argument-hint: "[show | new <name> | apply <path-or-pkg>] — e.g. /acreadiness-policy show, /acreadiness-policy new strict-frontend"
55
---
66

7-
# /policy — AgentRC policies
7+
# /acreadiness-policy — AgentRC policies
88

99
Use this skill when the user asks about **policies**, **strict mode**, **custom scoring**, **disabling checks**, **org standards**, or **CI gating** of readiness.
1010

0 commit comments

Comments
 (0)