---
title: "Watch cited sources in code · Agent Wranglers"
url: https://agentwranglers.se/playbook/engineering/documentation/watch-cited-sources
updated: 2026-10-21
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Watch cited sources in code

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers). Updated 2026-10-21.

For AI agents: [llms.txt](https://agentwranglers.se/llms.txt) is a short guide that sends you to the rules your problem needs, and [rules.json](https://agentwranglers.se/playbook/engineering/rules.json) holds every rule of this playbook as JSON.

- Level: Recommended
- Chapter: [Documentation](https://agentwranglers.se/playbook/engineering/documentation)
- Rule: Once a week, have a job find every cited source that stopped answering, moved or was replaced by a newer version. Alert with the rules that cite it.
- How: Read the sources from the built rules, so the list never drifts. Fetch each address as [Check the links you send people to](https://agentwranglers.se/playbook/website/redirects-and-canonicals/check-outbound-links) says. Ask each standards body's own data whether a document was replaced. The RFC Editor lists the RFCs that obsolete each RFC in a JSON file per RFC. Leave out "updated by", because most updates leave the cited text valid. A redirect to another host or to a home page means the page moved, even when it answers 200. Report the new address. Name every rule that cites the source in the alert, so the fix needs no search. Never rely on people rereading sources on a schedule, because nobody does.
- Check: Cite RFC 7231 in one rule. The next run alerts that RFC 9110 replaced it and names that rule. A cited address that redirects to another host is reported as moved.
- Measured: On a reference site, a check that followed redirects passed 13 of 530 sources that had moved to a new host or a home page.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### JavaScript example

```js
// Which RFCs replaced this one, from the RFC Editor's metadata
const replacedBy = async number => {
  const meta = await (await fetch(`https://www.rfc-editor.org/rfc/rfc${number}.json`)).json();
  return meta.obsoleted_by.filter(Boolean);
};
```

### Python example

```python
import json
import urllib.request

def replaced_by(number: int) -> list[str]:
    url = f"https://www.rfc-editor.org/rfc/rfc{number}.json"
    meta = json.load(urllib.request.urlopen(url))
    return [rfc for rfc in meta["obsoleted_by"] if rfc]
```

## Sources

- [RFC 9110 HTTP Semantics, which obsoletes RFC 7231](https://www.rfc-editor.org/rfc/rfc9110)

## Related rules

- [Cite the primary source for every rule](https://agentwranglers.se/playbook/engineering/documentation/cite-primary-sources) in Engineering
- [Check the links you send people to](https://agentwranglers.se/playbook/website/redirects-and-canonicals/check-outbound-links) in Website
- [Let an agent reread rules whose sources changed](https://agentwranglers.se/playbook/engineering/documentation/recheck-sources-with-an-agent) in Engineering

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/engineering/documentation/watch-cited-sources">Agent Wranglers engineering playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Cite the primary source for every rule](https://agentwranglers.se/playbook/engineering/documentation/cite-primary-sources)
- Next: [Let an agent reread rules whose sources changed](https://agentwranglers.se/playbook/engineering/documentation/recheck-sources-with-an-agent)
- [Documentation](https://agentwranglers.se/playbook/engineering/documentation)
