Skip to content

Automattic/wordpress-atmosphere / .agents/skills/review

Shared base for reviewing a diff, a branch or a PR in this plugin. How to read the diff, which repo guidelines to load for the changed paths, and the shape of a finding. Used by the code-review and security-audit agents.

FileKindSize
SKILL.mdskill md7.1 KB
guidelines/accessibility.mdmarkdown781 B
guidelines/authorization.mdmarkdown2.8 KB
guidelines/content-exposure.mdmarkdown6.8 KB
guidelines/cron.mdmarkdown1.9 KB
guidelines/hooks.mdmarkdown2.3 KB
guidelines/oauth.mdmarkdown3.6 KB
guidelines/output.mdmarkdown610 B
guidelines/records.mdmarkdown2.1 KB
guidelines/remote-fetch.mdmarkdown5.3 KB
guidelines/supply-chain.mdmarkdown582 B
guidelines/uninstall.mdmarkdown2.0 KB
guidelines/well-known.mdmarkdown1.4 KB
judge.mdmarkdown1.2 KB

guidelines/records.md

View on GitHub
# Records

What goes into `app.bsky.feed.post` and `site.standard.document`, and what building it costs. Who may see a record is in `content-exposure.md`; whether it matches the Lexicon is the spec-check agent's job.

Applies to: `includes/class-publisher.php`, `includes/transformer/**`, `includes/content-parser/**`, `includes/class-mention.php`, `includes/class-link.php`

## Past issues

- **Per-call egress cap read as per-publish** (#165 review, residual): `MAX_RESOLVED_HANDLES` bounds one `Facet::extract()` call, but a teaser thread re-enters `extract()` per entry and multiplies the bound (about 5 × 20 lookups per publish, each up to DNS plus a 10 s HTTPS fetch).

## Building records

- Post content is sanitized before transformation.
- The `applyWrites` batch cannot be steered into writing unexpected records or collections.
- TID generation is not predictable and does not collide.
- Facet detection (`class-facet.php`) cannot inject malicious links or mentions.
- The bsky post transformer respects Bluesky's character and image limits.

## Mention resolution budget

Check four things together:

1. The worst case per publish or request, not per function call: add up every `Facet::extract()` call the publish makes (thread entries and retries multiply a per-call cap).
2. Misses are cached as well as hits, or a dead handle is resolved again on every call.
3. Commenter-controlled content never triggers resolution unless the site opts in with a boolean filter that is cast with `(bool)`.
4. `Resolver::is_valid_handle()` rejects reserved and numeric TLDs before any network I/O (see "Handle syntax" in `remote-fetch.md`).

The fix for attacker-chosen DNS is at the threat-model layer (gating the commenter path, an allow list, DoH with a timeout), not in the syntax regex.

## Publish and display parity

Whatever decides "this `@handle` is a mention" or "this is a link" is shared between the front-end linkifier and the facet extractor. Two tokenizers drift: notifications without links, links without notifications, including `#mention` facets (real Bluesky notifications) for handles inside `<code>`, `<pre>` or `<a>` that the site's own display refuses to link.
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall