Lumen citations

From kortix-ai/CompanyOS · View interactive version

Lumen citations is an AI agent skill from the GitHub repository kortix-ai/CompanyOS. How Lumen cites a document - the citation object, how to get anchors, quote rules and `lumen cite check`. Load before writing any claim about a document.

How to use this skill

Skill file

Citations

Lumen shows every citation to a lawyer next to the source passage, and checks it

against the source before the lawyer sees it. A citation that fails the check is

shown as "Citation not found". Get it right the first time.

The object

{ "doc_id": "<id from lumen docs>", "a": "p3.12", "quote": "verbatim text from that paragraph" }

Get anchors

lumen search --matter <matter_dir> --query "limitation of liability capped"   # hits: doc_id, a, snippet
lumen read --doc <doc_id> --anchor p3.12 --context 1                           # the paragraph and its neighbours
lumen read --doc <doc_id>                                                      # the whole document

Check before you finish

echo '{"citations": [{"doc_id": "...", "a": "p3.12", "quote": "..."}]}' | lumen cite check

| Code | Meaning | Fix |

|---|---|---|

| not_found | The quote is not in the document | Copy the exact words from lumen read output |

| wrong_anchor | The quote is in another paragraph (fixed_anchor) | Use fixed_anchor |

| too_long | Over 300 characters | Quote fewer words |

| unknown_doc | No such document | Use a doc_id from lumen docs |

lumen result write runs the same check on every citation in a result and refuses the file until each passes.

In chat answers

Write each citation as a Markdown link after the claim:

[1](/cite?d=<doc_id>&a=p3.12&q=<url-encoded quote>). lumen cite check prints this link as link for every citation that passes: paste it, do not encode a quote by hand. A bare [1] with no link is not a citation, and Lumen marks the answer as unchecked. Number them in order. Lumen shows each link as a numbered chip that opens the quoted paragraph. Outside the links, name a document by its filename, never by its doc_id.

Examples

Good:

Bad:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.