AGENT SKILL

loupe-documents

Use when writing or revising a document for the Loupe app through the loupe MCP, such as a plan, spec, RFC, audit report or retrospective.

License 许可
AGPL-3.0
所属仓库
loupe-ac/loupe
最近更新
2026-11-15
Stars
★ 2
Forks
0

01 前言 Front Matter

name
loupe-documents
description
Use when writing or revising a document for the Loupe app through the loupe MCP, such as a plan, spec, RFC, audit report or retrospective.

02 资源文件 3

03 SKILL.md 正文

Writing documents for Loupe review

Reviewers read what you send to document_create or document_revise in the Loupe review UI. They select passages there and comment on them. Format for that UI, not for a terminal or a README.

Rules

1. No H1 title in the body

Loupe's own title field holds the title, so an # Heading that repeats it shows twice. Start with content, or with the first ## section.

2. Prefer numbered lists over bullet lists

Reviewers cite entries in comments, such as "point 3 is wrong". Numbers permit this and bullets do not. Use bullets only where order and reference do not matter, such as a short set of interchangeable examples.

3. Give cross-referenced entries stable IDs

Markdown starts a new ordered list after each ##, so list numbering restarts at every heading. Source entries numbered 1–33 show as 1–2 under the first heading, then 1–5 under the next. A "see finding 6" then points at nothing the reviewer can see.

When entries refer to one another, give each a short ID that does not depend on rendering. Use C1, H4, M5 for findings in severity bands, or any scheme where the prefix names the section. Lead the entry with it:

4. **H4 — There is no administrative console command.** …

Refer to H4, never to "finding 4". Keep the list numbered as well, because rule 2 still applies. The number gives the reviewer something to point at, and the ID gives the text something stable to cite. Entries that never refer to each other need no IDs.

4. Open each entry of a long list with a short lead sentence

The lead sentence says what the entry is about, before the detail. A reviewer who scans the list must understand each entry from that sentence alone. They must not need to read a wall of file:line references or jargon.

5. Make decision points look like decisions

When the document offers more than one way to do something, the format must show that you ask for a choice.

  1. Write an explicit "Decision needed:" label, or an equivalent.
  2. Put the alternatives in a numbered sub-list, so that a reviewer can refer to them.
  3. Name your recommendation if you have one.

Never fold alternatives into a flat sentence such as "do X or do Y." The reader takes it as an instruction and misses the choice.

6. Revise the document after you address review comments

Send a new version with document_revise, so that the document shows the resolved state. An outcome recorded only in an issue tracker, the chat or a commit message leaves the returning reviewer on a stale proposal.

  1. Mark each affected entry with a Decided: line. It names what was chosen and where the work now lives.
  2. Add no revision note, changelog or "updated on <date>" header. Loupe tracks versions itself and shows them in the UI.
  3. Skip the revision only when the comments changed nothing in the content. Examples are pure acknowledgements, or questions answered in chat that have no effect on the document.

An orphaned comment is no reason to avoid a revision. Keep the reviewer's quoted phrases intact where you can.

7. Reply to comments before you revise, or read the review again after

document_revise invalidates every comment id from document_get_review. Reply to each comment and mark it addressed first, then call document_revise once at the end. The other order works only when you call document_get_review again after the revision. The first order is usually better. Your replies describe changes that the reviewer is about to see, and the status of each thread is already correct when the new version arrives.

8. Keep a reply to two or three sentences

A reply is a turn in a conversation, not a section of the document. Say what you did or what you concluded, then stop. Use no headings, no bold lead-ins, no bullet or numbered lists and no tables. Do not restate the comment to the reviewer, and do not repeat the reasoning that produced the answer. This is a complete reply: "Renamed to AccountStatusChecker, because ActiveUserChecker collides with countActive(), which already means something else here."

The length of a reply also tells you where an answer belongs. An answer that needs more than a short paragraph belongs in the document, which the reviewer reads again later. A comment thread is the worst place to keep a decision. Put the answer in the next version, and let the reply point to it, as in "Reworked that section in v4." A disagreement gets more room, because the reviewer needs the reasoning to judge it. Even then, one paragraph is enough.

9. Say what changed in the version description

document_revise requires a description, and document_create takes an optional one. Loupe shows it under that version in the version list of the review UI. A reviewer who comes back to "v4" reads it to decide whether to read the document again. Name what you rewrote, added or dropped, and why, in one or two plain sentences.

This one is useful, because a reviewer can act on it:

Replaced the rollout section with a phased plan, and answered the two
questions on caching. Section 3 is unchanged.

This one is useless, because it restates what the new version already proves:

Updated the document. · Revision 4. · Addressed review comments.

Name the sections or entries you touched, so that a reviewer can go straight to them. When something they commented on did not change, say so and say why, because silence reads as an oversight. Do not restate the title, the date or the version number, because Loupe records all three.

On document_create, the description answers a different question: what this document is, and what it exists to settle. One sentence is usually enough, such as "Design spec for the live-review widget, deciding the auth model".

10. Rename with document_rename, not with a revision

A title-only document_revise makes a version that a reviewer must skip. Pass title to it only when the content changes too.

11. Point at the important passages with document_highlight, where the instance offers it

If document_highlight is among your tools, read references/highlights.md before you call it. If it is not, skip this rule. There is no fallback.

12. Use a decision fence to make a choice clickable

Use a fence when the alternatives of rule 5 are a clean either/or. A pair of <!-- decision: some-id --> and <!-- /decision --> comments around the alternatives shows them as radio buttons. The answer comes back in document_get_review under decisions.

  1. Mark every option - [ ] instead to let the reviewer pick several.
  2. End the one option you recommend with (recommended: high), moderate or low to show three stars on it.
  3. An id is permanent once published. A changed id silently discards the answer, with no error and no warning, and the decision reads as unanswered again.
  4. A malformed fence falls back to a plain list, also with no error.
  5. Wrap each Option, Pros and Cons table in an <!-- options --> and <!-- /options --> fence, so that Loupe shows each row as a block.

Read references/decision-fences.md before you write a fence. The same file says how to write the options fence.

13. A stray HTML comment shows as a visible note

On its own line, the comment shows as a block note. Inside a paragraph, it shows as an inline note. Never wrap such a comment in an HTML element that opens its own block. Loupe then keeps the element and drops the comment, so the note disappears with no error.

14. Find a document with document_list, not with document_get on every row

Each row carries the description of the document's current version, so the list alone usually tells you which document you want. Narrow it with search, status, tag or series before you page through it.

15. Follow references/design-structure.md for a product design or a tech design

The design opens with "At a glance", and each open decision gets a pros and cons table. Write the design for a reader who knows the product and not the code. Keep code names in the parts that this reader can skip, as its section "Write for a reader who knows the product" says. Read that file before you write a design.

16. Give the meaning of each outside ID

An outside ID is a short ID that the document does not define and does not take from a referenced document. Examples are a rule ID of a skill, a decision record number, or an ID of a document that is not in references. The reviewer reads the document without the source open, so a bare outside ID tells them nothing.

  1. Put the meaning in a few words at the first mention of the ID in each section, such as "C2 (offer a design session only on a visual option set, from claude-design.md)".
  2. Name the source file or document once in each section, at that first mention.
  3. Put a colliding ID in a code span, with its meaning in prose: `P4` (the Options phase of the session, from `session-flow.md`). An outside ID collides when it shares its letter prefix with IDs that the document or a referenced document defines. The review page gives a bare mention of a defined ID its tooltip. A bare outside P4 therefore shows the tooltip of priority P4 when the document defines P4. The prefix test also protects an ID that a later revision defines. The page skips a code span.
  4. The IDs of a referenced document need no meaning. The review page shows their tooltip when references holds that document and its list entries lead with a bold ID, such as **R3: Title.**. Keep the reference, and keep the bold lead in the source document.

17. Create a document as a draft when you can still change it before your run ends

A new document goes to the reviewer's inbox at once. A revision in the same run then changes the version that the reviewer reads. A draft stays out of review and out of the inbox, and a document_revise keeps it a draft.

  1. Pass draft: true to document_create.
  2. Revise the draft as often as you need.
  3. Call document_publish for each draft of the run, as your last document step. The document then enters review on its final version.
  4. When document_publish is not among your tools, the instance does not have drafts yet, and document_create refuses the draft argument. Create the document without draft, as before.

A product design, a tech design and the deploy notes that the tech design stage creates are the exception to step 3. They stay drafts while an agent reviews them, and the app publishes them when the review ends. Create them as drafts, and never call document_publish for them. The same holds when you revise one in a fix round for an agent review. Deploy notes that you add beside a design already in review are published at once.

A review round on a document that is already in review revises it once, and needs no draft step. A person in the session with you can read the document at once, so an interactive session needs no draft either. The exception is a product design, which stays a draft for the agent review.

18. Make each decision stand on its own

The owner often answers a decision outside its document, or after a long gap. A reader who opens only the decision section must understand it and answer it.

  1. Do not lean on an earlier section, another decision, a card, a pull request or a term that the document defines elsewhere. State the fact in a sentence or two. A link can stay as a source for further reading.
  2. A recommendation says what the option does, in plain words. Never write only "I recommend option 2" or "the option of D1".
  3. The fence question and each option line name the subject. The decisions panel of the review page shows the question with no text around it.
  4. Rule 16 still covers an outside ID. This rule also covers the IDs and terms that the document defines itself, such as D1 or W3.

19. Name a card or a pull request with a token

Write card:<number> for a card of this project and pr:owner/repo#<number> for a pull request. Loupe links each token. Prose such as "card 1116" also links, but a token is exact. The stored text of the document reads "card #1116", so comment anchors keep their place. A document title shows a token as plain text.

Example

This is the shape of an entry, with the lead sentence first and the detail after:

1. **Token write on every request.** Each API call writes
   `last_used_at` synchronously. `auth.go:45` runs
   `markUsed()` + `save()` inside the auth path… (detail follows)

Do not write this. It starts in jargon, joins fragments together and explains nothing:

1. `auth.go:45` — markUsed() + save() on every Bearer
   request · hot-row contention · fix: …

This is the shape of a decision. The choice is visible, and a reviewer can refer to each option:

**Decision needed** — how to stop reset-link host poisoning:

1. Drop `x-forwarded-host` from `trusted_headers` (recommended: smallest
   change, removes the attacker input).
2. Generate emailed links from a pinned `default_uri` instead of request
   context.

Do not write "Drop x-forwarded-host or generate these links from a pinned default_uri." The reader cannot tell that you expect a decision.

Common mistakes

  • Pasting a report written for the terminal into document_create unchanged. These rules exist to undo terminal habits: dense bullets, fragments separated by ·, and H1 headers.
  • Numbering only the top level. Nested lists that reviewers discuss also get numbers.
  • Writing a decision in the terms of the code, with class names, fields, and "(checked, File.php)" on each sentence. The owner decides with no file open. Write the question and the options in product terms. A tech design puts the code in the How list (rule 15).

04 同仓库更多 Skills