Skip to content

Commit c20e878

Browse files
rachaelrenkoz-agent
andcommitted
chore: review fixes — stale MCP URL, URL validation, soften hardcoded counts
- Fix stale /sse path in afdocs-fix MCP example (matches PR #23 fix) - Add URL validation in afdocs_audit.mjs to prevent shell injection - Remove hardcoded baseline score from SKILL.md reporting instructions - Soften hardcoded page counts in known-exceptions.md (varies by run) - Scope page-size exception to /changelog/ only, not all large pages Co-Authored-By: Oz <oz-agent@warp.dev>
1 parent c81c9c7 commit c20e878

4 files changed

Lines changed: 18 additions & 9 deletions

File tree

.agents/skills/afdocs-audit/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Only include a section if its count is > 0. Never list allowlisted issues under
5757

5858
After running the audit, ALWAYS report the results to the user before taking any action. Include:
5959

60-
1. **Score**: Overall score, grade, and comparison to last known score (82/100 B as of 2026-05-05)
60+
1. **Score**: Overall score and grade
6161
2. **Failures first**: List every fail-severity check with its message and fix guidance. These are the most impactful.
6262
3. **Warnings**: List warning-severity checks with context.
6363
4. **Allowlisted**: Briefly note any known exceptions that were flagged.

.agents/skills/afdocs-audit/references/known-exceptions.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# AFDocs Known Exceptions
22

3-
This file lists checks that may flag as warnings or failures but are expected and intentional. When reporting audit results, classify these as "Allowlisted" rather than "Remaining."
3+
This file lists checks from the afdocs-audit skill that may flag as warnings or failures but are expected and intentional. When reporting audit results, classify these as "Allowlisted" rather than "Remaining."
44

55
## content-start-position
66

77
**Expected status**: fail or warn
8-
**Reason**: 34/50 sampled pages have content starting past 50% of the HTML output. This is inherent to Starlight's layout — sidebar navigation, header markup, and JavaScript/CSS precede the `<main>` content area.
8+
**Reason**: Sampled pages may have content starting past 50% of the HTML output. This is inherent to Starlight's layout — sidebar navigation, header markup, and JavaScript/CSS precede the `<main>` content area.
99
**Mitigation**: The llms.txt directive, `<link rel="alternate" type="text/markdown">` in `<head>`, and `Accept: text/markdown` content negotiation middleware all steer agents to the clean markdown version, bypassing the HTML boilerplate entirely.
1010
**Action**: No fix needed. This is a structural property of Starlight sites.
1111

1212
## markdown-content-parity
1313

14-
**Expected status**: warn (7 pages, ~2% average difference)
14+
**Expected status**: warn (several pages, ~2% average difference)
1515
**Reason**: False positive. The "missing" segments are numbered heading text like "2. Tabbed File Viewer" where Turndown correctly escapes the period (`### 2\. Tabbed File Viewer`) to prevent markdown parsers from interpreting it as a list item. The content IS present in the markdown — the AFDocs checker's text comparison doesn't account for markdown escaping.
1616
**Affected pages** (as of 2026-05-05):
1717
- `/agent-platform/cloud-agents/triggers/scheduled-agents-quickstart/` — step headings
@@ -25,9 +25,9 @@ This file lists checks that may flag as warnings or failures but are expected an
2525

2626
## page-size-markdown / page-size-html
2727

28-
**Expected status**: warn (1 page between 50K-100K chars)
28+
**Expected status**: warn — but only allowlist `/changelog/`
2929
**Reason**: The changelog page (`/changelog/`) is intentionally a single long page (~4,000 lines of MDX). It is excluded from `llms-full.txt` generation due to a `hast-util-to-text` stack overflow, but is still accessible at its URL and indexed by the sitemap.
30-
**Action**: No fix needed unless the page grows significantly larger. Petra has indicated long pages are lower priority.
30+
**Action**: If the only flagged page is `/changelog/`, classify as allowlisted. If other pages are flagged, treat those as genuine issues that may need splitting.
3131

3232
## section-header-quality
3333

.agents/skills/afdocs-audit/scripts/afdocs_audit.mjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,16 @@ function parseArgs(argv) {
5252
}
5353

5454
function runAfdocsCheck(url) {
55+
// Validate URL to prevent shell injection
56+
try {
57+
const parsed = new URL(url);
58+
if (!['http:', 'https:'].includes(parsed.protocol)) {
59+
throw new Error(`Invalid protocol: ${parsed.protocol}`);
60+
}
61+
} catch (e) {
62+
throw new Error(`Invalid URL "${url}": ${e.message}`);
63+
}
64+
5565
try {
5666
const stdout = execSync(`npx afdocs check ${url} --format json`, {
5767
encoding: 'utf8',

.agents/skills/afdocs-fix/SKILL.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,11 @@ grep -A1 "label:" astro.config.mjs | grep "paths:"
133133
{
134134
"name": "Warp Documentation",
135135
"description": "Search and retrieve Warp documentation.",
136-
"url": "https://warp.mcp.kapa.ai/sse",
137-
"transport": "sse"
136+
"url": "https://warp.mcp.kapa.ai"
138137
}
139138
```
140139

141-
This points to the existing Kapa-hosted MCP server. No custom implementation needed.
140+
This points to the existing Kapa-hosted MCP server (OAuth-protected). No custom implementation needed.
142141

143142
**Files**: `public/.well-known/mcp.json` (new file)
144143

0 commit comments

Comments
 (0)