Pattern miner: Add curated link-checker archetype from upstream pattern mining - #264
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The new link-checker workflow-generation entry currently can’t render required pre-steps (missing capabilities.pre_steps) and unconditionally requires cache-memory even though that tool isn’t enabled by default.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a new curated link-checker archetype to the pattern library so the wizard can generate scheduled workflows focused on deterministic link validation + targeted fixes, distinct from the broader documentation-updater archetype.
Changes:
- Added a new
patterns/archetypes/link-checker.jsoncurated archetype definition. - Registered the new archetype ID in
patterns/manifest.json. - Added a new
link-checkerworkflow-generation template inpatterns/workflow-generation.json.
File summaries
| File | Description |
|---|---|
| patterns/workflow-generation.json | Adds the workflow-generation template for the new link-checker archetype. |
| patterns/manifest.json | Registers link-checker in the archetype list so it’s loadable by the app. |
| patterns/archetypes/link-checker.json | Defines the curated archetype metadata, triggers, outputs, and tips for link checking. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| "capabilities": { | ||
| "bash": true | ||
| }, |
| "1. Read the link check results collected in the pre-step", | ||
| "2. Load cache memory for previously confirmed unfixable links and skip them", | ||
| "3. For each broken link, research whether the content moved to a new URL, redirect, or official replacement", | ||
| "4. Fix links you can confirm a working replacement for; record unconfirmed ones in cache memory as unfixable", | ||
| "5. Open a pull request with the fixes, or call `noop` if nothing needed fixing", | ||
| "", | ||
| "## Constraints", | ||
| "", | ||
| "- **DO NOT** guess at replacement URLs without confirming they resolve.", | ||
| "- **DO NOT** modify relative links or anchors — only HTTP(S) links.", | ||
| "- **DO NOT** retry links already recorded as unfixable in cache memory without new evidence." |
There was a problem hiding this comment.
Reviewer kind: both (auto-dispatch found no TS/JS or UI/HTML changes — only JSON pattern data files).
No blocking issues found. This PR only adds/edits static JSON pattern data (patterns/archetypes/link-checker.json, patterns/manifest.json, patterns/workflow-generation.json) — no TypeScript/JS logic or UI/HTML behavior changed, so neither a Matt Pocock-style type-safety review nor a Ponytail-style UX review surfaces actionable findings. The JSON is well-formed and consistent with existing archetype entries. Note: PR is already merged, so this review is informational only.
Generated by Specialist PR Review for #264 · copilot · auto · 9.02 AIC · ⌖ 6.11 AIC · ⊞ 8.1K
Upstream sources mined
githubnext-agentics/files/workflows/link-checker.md— daily scheduled workflow that pre-tests all documentation links deterministically in asteps:block, then uses cache-memory to track links previously confirmed unfixable, and opens a PR viacreate-pull-requestwithprotected-files: fallback-to-issueandif-no-changes: warn, falling back tonoopwhen nothing needs fixing.githubnext-agentics/files/workflows/update-docs.md(line 99: "Check for broken links, missing images, or formatting issues") andgithub-gh-aw/files/.github/aw/triggers.md(line 19/41: "Govern documentation content (stale pages, broken links, outdated ownership)" / "Documentation governance: schedule (weekly) or pull_request... check stale ownership, broken links, and missing metadata") — corroborating upstream documentation recommending scheduled link/content governance as a recognized pattern distinct from general doc updates.Recurring pattern found
A dedicated "check and fix broken links" shape recurs distinctly from the existing
documentation-updaterarchetype: it is deterministic-first (pre-fetch/test links insteps:rather than agent judgment), usescache-memoryas a persistent skip-list for links with no available fix, and is scoped narrowly to link validity rather than general content accuracy. One direct upstream workflow (link-checker.md) demonstrates the full shape, corroborated by upstreamtriggers.mddocumentation explicitly calling out "broken links" governance as a canonicalschedule-triggered pattern with its owncreate-issue/add-commentoutput guidance, satisfying the "one workflow + explicit doc recommendation" bar.Why the existing library did not cover it
The existing
documentation-updaterarchetype only generically mentions "Fix inaccuracies, broken links, and outdated examples" in its runtime body text, but its curated tips do not capture the two evidence-backed techniques that distinguish this shape: (1) pre-fetching/testing links deterministically before the agent starts, and (2) persisting a cache-memory list of confirmed-unfixable links to avoid repeated wasted retries on a recurring schedule. No archetype inpatterns/archetypes/or entry inpatterns/manifest.jsoncovers this narrower, deterministic-first link-checking shape.What changed in
patterns/patterns/archetypes/link-checker.json— new curated archetype (success_rate: null,count: 0,top_repos: []) withscheduletrigger,pull-requestssafe output, and tips reflecting the deterministic pre-check + cache-memory skip-list pattern."link-checker"toarchetypesinpatterns/manifest.json.link-checkerentry topatterns/workflow-generation.jsonwith icon, capabilities, permissions, and a prompt body reflecting the mined process (read pre-fetched results, consult cache memory, fix confirmed replacements, open PR or noop).Validation
npm test— 18 test files, 319 tests passed.npm run build— production build succeeded (site + patterns copied intodist/).Candidates deliberately left out
discussion-task-miner.md) — only one upstream workflow demonstrates this shape (scan discussions → create issues); no corroborating upstream documentation recommends it as a distinct pattern, so it does not meet the two-workflow or doc-backed bar.sub-issue-closer.md) — largely already covered by the existingissue-hierarchy-managerarchetype'supdate-issue/close-parent tips.tech-content-editorial-board.md,unbloat-docs.md) — a useful refinement, but scoped tocode-improvement/documentation-updatertips that already mention the "skip scheduled runs once too many open PRs" guidance, so it is already represented.campaign.md,multi-agent-research.md) — these are meta-guidance documents, not recurring workflow shapes from actual upstream workflows, so they don't meet the archetype bar.