Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions patterns/archetypes/link-checker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"id": "link-checker",
"label": "Broken Link Checker",
"description": "Find and fix broken links in documentation on a recurring schedule",
"success_rate": null,
"count": 0,
"recommended_triggers": [
{
"type": "schedule",
"config": {}
}
],
"recommended_safe_outputs": [
"pull-requests"
],
"recommended_tools": [
"create-pull-request"
],
"timeout_minutes": 60,
"prompt_style": "phase-based",
"size_range_bytes": [
3000,
8000
],
"top_repos": [],
"tips": [
"Pre-fetch and test every link in a steps: block before the agent starts — link testing is deterministic and does not need agent judgment",
"Persist a list of previously-confirmed unfixable links in cache-memory so scheduled runs don't repeatedly retry links with no available replacement",
"Use protected-files: fallback-to-issue so link fixes in protected paths open an issue instead of silently failing",
"Set if-no-changes: warn on create-pull-request and pair with noop so a run with no broken links exits cleanly instead of failing",
"Only replace a broken link when a working equivalent or redirect target is confirmed — do not guess at replacement URLs"
],
"anti_patterns": []
}
3 changes: 2 additions & 1 deletion patterns/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"ci-failure-triage",
"community-digest",
"agent-cost-tracker",
"contribution-guidelines-checker"
"contribution-guidelines-checker",
"link-checker"
],
"workflow_generation": "workflow-generation.json",
"anti_patterns": [
Expand Down
29 changes: 29 additions & 0 deletions patterns/workflow-generation.json
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,35 @@
"- **DO NOT** post more than one comment per run.",
"- **DO NOT** apply the ready label and post a needs-work comment in the same run — pick one outcome."
]
},
"link-checker": {
"icon": "link",
"capabilities": {
"bash": true
},
"permissions": [
"contents"
],
"body": [
"# {{label}}",
"",
"You are an automated **link checker and fixer** for this repository's documentation.",
"",
"{{pre_steps}}",
"## Process",
"",
"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."
]
}
}
}