rea-analysis-optimization
MOmorluto/rea485k近 7 天新增 7,690 个 star
Documenting an AI-built app for handoff, review or audit: the docs that make it reviewable (architecture, flows, permissions, variables, coverage).
Keep a durable record of intent so the code can be reviewed. Record what the system should do, who may do what, where secrets live, and which rules are actually verified. Without that record, neither a human nor an auditing agent can tell whether AI-built code is safe to ship. This skill defines the small document set that restores reviewability.
Write the intended-state record for humans and the next coding agent. Every later audit compares code against these docs. A security or performance review is only as good as the intent it can compare against.
Treat this plugin's locations, file names, and doc formats as defaults. The host repo's own setup comes first. Before writing any system doc, coverage map, or audit report, look for:
AGENTS.md, CLAUDE.md, and everything they import or point to. They often name the docs folder, its files, who maintains each one, and how dates are recorded.docs/, documentation/, or similar folder.ARCHITECTURE.md, docs/security.md, docs/env.md. Match on coverage, not file name.docs/test-coverage.md. Match on coverage: a TESTS.md or testing.md describing how the repo tests is the testing method, not the coverage map.documentation/ at the repo root, with the names below; the map goes at documentation/tests.md, reports at reports/<name>_{timestamp}.md. Add no "updated date" line: the file's history is the source of truth.tests.md beside TESTS.md, or Architecture.md beside architecture.md. On Windows and macOS, they are the same file, so writing overwrites it. Elsewhere, they become two files that collide on the next checkout. Check case-insensitively before creating a file. Use the existing one if it covers the same thing. If it covers something else, such as a testing-method TESTS.md, don't write into it. Use the repo's real equivalent; where none exists, pick a name that collides with nothing.Throughout this plugin, a name such as architecture.md or tests.md means that document, wherever and under whatever name the repo keeps it.
Always produce core docs; add conditional docs only for existing capabilities. This is a small core plus conditional docs, not a fixed list. Every reviewable app has the core surfaces.
Record an absent capability instead of inventing an empty document. Write one line in architecture.md: "No scheduled work — no cron.md." An honest map includes what the system doesn't do.
Derive the coverage map from intent and existing tests. The derive-tests skill produces tests.md; it is a verification map, not a subsystem description. The document-app skill reverse-engineers the other docs from code.
Describe the current state honestly, without being paranoid. The job is an accurate map, not a clean bill of health. Keep each doc short, table-and-bullet heavy, and free of generic theory. Docs say what is built now; stage changes belong in the log or release history, rather than dated paragraphs superseding one another.
Capture each core document's required contents and purpose for its reviewer. Each entry gives its default file name, purpose, required contents, and reviewer use.
architecture.mdDescribe what the system is and how it hangs together. Capture:
This is the reviewer's root document; everything else is cross-referenced from here.
flows.mdDocument journeys where permissions and side effects are actually exercised. Capture:
This gives the runtime view a static permissions.md matrix cannot show. Reviewers see where and in what order authorization is enforced, and where it can be skipped.
Include only flows that touch security or operational concerns. A flow belongs here only if it touches permissions, data integrity, external side effects, money, privacy, or operational safety. This is a security/operations map, not a feature spec.
permissions.mdDocument who may do what and where each permission is enforced. Capture:
This is the static baseline an access-control audit compares code against; flows.md shows it in motion.
variables.mdMap configuration and secrets to their risks and rotation needs. Capture:
Reviewers use it for the secrets/PII-leak surface and the incident-response rotation plan.
tests.mdDistinguish rules checked today, proposed tests, and rules checked by nothing. Keep three clearly separated sections so the map cannot read falsely green:
Give every coverage row its rule, expected result, evidence, and status. Each row carries:
use-case → rule → expected behavior (including the deny/negative case) → evidence source (doc + code) → status (existing / proposed / none).
Also note which checks the repo's gate requires. Follow its stated policy, such as a local command plus human go; where none exists, note the CI checks gating merges to main.
This is the operational form of "documented == implemented" for reviewers. It shows whether each rule the other docs claim is pinned by a test today, only proposed, or unverified.
Use the derive-tests skill to produce the coverage map. The document-app skill does not produce it. It comes from the other docs and existing test suite, rather than being read off a subsystem.
Include conditional documents only when their stated capability exists. Their contents make those surfaces reviewable.
emails.mdDocument every notification only if the app sends transactional or automated email. Capture:
Reviewers use it to spot unvalidated template inputs and PII exposure boundaries.
cron.mdDocument scheduled work only if scheduled or background jobs exist. Describe all scheduled work and how to operate it safely. Capture:
Reviewers use it to find forgeable triggers and unbounded background jobs.
seo.mdDocument SPA previews only if public, indexable, or bot-facing routes exist. Describe how the single-page app handles SEO and social previews. Capture:
Reviewers use it to catch public-data-only violations and metadata injection on bot routes.
automation.mdDocument automation only if the app embeds one of these capabilities. Include it only if the app embeds AI agents, LLM workflows, tool-calling, webhooks, or external automation. Cover embedded agents and other automation paths. An agent's entry is its card, written before the agent is built and updated in the same change as a tool, a prompt or a limit (the embedded-agents skill has its shape). For every automation or agent, capture:
This exposes hidden automation paths and separates what an agent proposes from what the app enforces. It is the highest-risk surface in modern AI-built apps.
Each rule's origin, the case that taught it, is in receipts.md beside this file; read it when a rule's edge is unclear.
A reviewer who has never seen the code can answer from the docs alone who may do what, where each secret lives and what is tested. Each doc agrees with the code.
architecture.md, or in the repo's existing docs index.AGENTS.md or CLAUDE.md, whichever the repo's structure makes canonical, contains instructions derived from these docs. The ship check's handoff step produces it, following that structure, not here. The user types /ai-shipping:ship-check in Claude Code, $ai-shipping:ship-check in Codex.derive-tests for tests.md and document-app for the other docs.MOmorluto/rea485k近 7 天新增 7,690 个 star
MAmattpocock/skills336k近 7 天新增 4,217 个 star
MAmattpocock/skills336k近 7 天新增 4,217 个 star
MAmattpocock/skills336k近 7 天新增 4,217 个 star
MAmattpocock/skills336k近 7 天新增 4,217 个 star