/lion:lion-researchfrom lion
Frames deep research as proof-building using a Lion logic model. Records source quotes as facts, derives conclusions with rules, and produces queryable, auditable findings with confidence levels and source citations.
Ships in lion. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Lion is a JSON-based Lisp with a Datalog logic layer, an exact symbolic solver (Fourier-Motzkin, Pugh's Omega test, mixed-integer branch-and-bound, Charnes-Cooper & integer Dinkelbach linear-fractional optimization, and 2D bilinear/quadratic polygon projection), rule induction (proof/rules), all-derivations epistemic fragility (proof/sensitivity), a sound claim-bound zero-solver proof kernel (proof/valid?), reactive pattern-driven counterfactuals (assuming + retract ... {"where": ...}), persisted model helpers (define ... {"persist": true}), deterministic UTC time (time/), and ontology graph algorithms (graph/, including weighted multi-hop graph/influence).
Frame every deep research run as proof-building, not passive note-taking. You keep a live Lion model: what each source said (verbatim quotes as facts), rules that derive conclusions, and formal proof obligations that turn each question the reader asked into a theorem to prove, refute with a concrete counterexample, or bound with an exact certificate.
Evidence goes in, proofs and bounds follow automatically from it, and when evidence changes the proofs change with it. That buys four things a notes file cannot:
N * P) constraints, integer counts, or uncertain time windows, Lion's exact solver (proof/bounds and proof/prove) proves whether a thesis holds for every consistent value, computes the exact [min, max] interval and endpoint witnesses (including interior stationary points on slanted bilinear boundaries!), or returns a concrete counterexample or unsatisfiability certificate — never hard-code hand-enumerated vertices, never relax value/integer? counts to value/number?, and never trust midpoint or corner estimates.graph/cycles), weighted multi-hop propagation (graph/influence), and single points of failure (graph/dominators) surface mechanically.proof/valid? checks proof/prove, proof/bounds (directly — no need to peel minProof/maxProof!), proof/rules, and why trees with zero solver calls, and 2-argument ["proof/valid?", result, {"atLeast": T}] verifies the bound and threshold in one call. proof/sensitivity computes all-derivations resilience, single-point-of-failure critical facts, and exact minCutSize/minimalCuts in one call. assuming + retract ... {"where": goal} proves whether a conclusion survives retracting an entire class of claims (e.g. all tertiary sources) without hardcoding claim IDs.explorer.html page holding the live model and quoted sources, alongside report.md.The model does not replace reading and judgment. You still search, read, and judge sources; the model is the proof engine that keeps every step honest.
You need node or bun. Run every Lion program through this skill's runner script, which automatically uses $LION_CLI when set or bunx @lionlang/cli otherwise:
node <this skill's folder>/scripts/lion.mjs program.json --database model.json
(Or bunx @lionlang/cli program.json --database model.json if running outside the script.) The command loads model.json, runs the program, prints its value as JSON, and saves the model only if it changed. A program that fails prints ERROR and leaves model.json untouched.
The skill needs version 0.9.0 or later: its core reads the numbers written in a quote with string/numbers and takes a question's readings off it with object/remove, and its wording and clock functions use string/join, string/padStart, and number/toString with a separator (and proof-building uses proof/prove, proof/bounds, linear-fractional ratios, and time/). The page needs lion worker, which versions after 0.13.1 have: the page runs the Lion of the command that checks it. When $LION_CLI is not set, bunx keeps running whatever version it fetched first, so ask for the newest once, before anything else:
bunx @lionlang/cli@latest --version
Read references/lion.md before writing your first rule or proof obligation, and references/patterns.md for tested proof-building patterns (coupled ratio bounds, cross-source impossibility proofs, uncertain UTC SLA windows, counterfactual retraction, cycles/dominators, and proof/rules soundness).
Keep one folder for the run, in the user's working directory unless they name another:
research/<topic>/
steps/ every program that changed the model, in order
00-core.json
01-frame.src.json the frame as you write it
01-frame.json the frame as it runs, written by the replay
02-<batch>.json written from your notes
probes/
capabilities/ live executable boolean capability probes (<run>.json),
evaluated automatically at HEAD during replay so Lion
capability verdicts never go stale
notes/ what each batch of sources said, as plain JSON
sources/ the text of each source as you read it: <source id>.txt
model.json the model, built from the steps; never edited by hand
checks.json your standing questions: one record, question → Lion query
page.json the plan of the reader's page: its views and what each holds,
chosen for what this reader wants to know
explorer.html the page for the reader, built from the model and the plan
report.md the written answer, every time, beside the model it came from
steps/ is the source and model.json is what it builds. The steps say what the model holds: a schema cannot be removed from a model once added, and a rule or invariant that retract takes back would come back with the next replay, so to change one you edit the step that wrote it and replay the steps:
node <this skill's folder>/scripts/replay.mjs
It runs every step in natural order (00..99 before 100+, followed by conflict-free YYYYMMDD-HHMMSS-<slug>.json steps) into a new model and replaces model.json only when all of them pass; a step that fails prints its error and leaves the model as it was. Unchanged replays reuse .cache/replay-cache.json keyed by SHA-256 over steps, live capability probes, the CLI binary, and git HEAD/workspace status (pass --no-cache for a cold replay). Replaying proves the model can be rebuilt from its sources.
Write the frame as steps/01-frame.src.json. The replay writes it out as 01-frame.json, putting the skill's time functions wherever the frame says "@utc-minutes" or "@utc-text", so the frame you edit stays short. Edit the .src.json file only.
If the project already keeps a research model, add the run to it instead of starting a new folder. Look for a folder with steps/ and sources/, or instructions that name one; in the Lion repository it is research/. One model lets a later run start from what earlier runs established, and new evidence corrects their conclusions, since rules derive them.
report.md and page.json in a folder of its own beside the model, and build its page with build-explorer.mjs's --out.probes/capabilities/), never only frozen snapshots. External papers, posts, and benchmarks are archival historical evidence (sources/*.txt + dated claim facts). By contrast, present-tense claims about what the host repository currently has or lacks (such as {"lion": feature, "has": true/false}) go stale the moment code lands on main. Whenever a run introduces or weighs a present-tense capability claim about the repository:
probes/capabilities/<run>.json: an array of {"id": "cap-...", "run": "<run>", "feature": "<exact feature string>", "program": <Lion expr returning boolean>} using pure @lionlang/core stdlib + read-only repo/* inspection (repo/files, repo/read, repo/json, repo/exports, repo/includes-normalized?, repo/includes-tokens?, lion/special-form?) — never shell repo/run or live network calls, and never eager boolean/and/boolean/or over guarded file reads.live_lion_has automatically. scripts/replay.mjs executes probes/capabilities/*.json against HEAD and asserts live_lion_has(feature, has, probe_id) into the model; the frame's overruled/stated rules let live_lion_has override any older static backing automatically, so shipping an implementation flips to_build → Lion does this already with zero hand-edited status steps."Lion probes"), never reuse a coarse YYYYMMDD integer — use full second precision (YYYYMMDDHHMMSS or monotonic integer ordering) and verify probe_contradiction in checks.json is empty ([]).probes/<run>/.assets/core.json in this skill's folder is the first step of every model. Copy it to steps/00-core.json. It declares the relations every research model shares, so the same queries and the explorer work on all of them.
You record these:
| Relation | Holds |
|---|---|
source(id, url, title, publisher, kind, published) | A source. publisher is who stands behind it; kind and published are described under Record each source. |
claim(id, source, quote, says) | One statement by one source: the words that carry it, and a record of what it says. |
attributed(claim, to) | The source does not say this on its own authority: it credits another source. |
located(claim, where) | Where in the source the quote stands, as a reader would look for it: "Page 47, Consolidated Statements of Operations". |
assumption(id, statement) | Something you believe going in. |
reading(key) | A key of your questions that picks one sense of a word, such as "basis" (as reported, or excluding fuel surcharges) or "period" (fiscal or calendar). You declare these in the frame. |
context(field) | A field of says whose number comes from where the quote stands, not from its words, such as a date given in the heading. You declare these in the frame. |
decided(key, value, words) | The reader's choice of a reading, in their own words. |
lead(id, statement, patience) | A line of inquiry you follow, and how many sources in a row may give nothing first-hand on it before it is set aside. |
pursues(lead, question) | A question a lead sets out to answer, as a pattern: {"warehouses": "tarnwell"} covers every question with that key and value, whatever else it has. |
read_for(source, lead, order) | A source read to follow a lead, numbered in the order you recorded it. |
obligation(id, statement) | A formal research theorem/question you must settle before concluding (e.g. a covenant check, SLA breach check, consistency check, or control audit). |
Your rules add to these three:
| Relation | Holds |
|---|---|
answer(question, value, claim) | This claim answers a question that has one right answer. You write one rule for each kind of claim. |
violated(assumption, witness) | Evidence against an assumption. You write one rule for each assumption. |
closed_obligation(obligation, status, detail) | A settled proof obligation: status is "proved", "refuted", "bounded", or "inconsistent", derived from proof/prove, proof/bounds, graph/cycles, graph/dominators, or assuming — never typed in as a fact. |
And the core derives the rest (including open_obligation(obligation) for obligations not yet closed):
| Relation | Tells you |
|---|---|
unquoted(claim, field, value) | A number in a claim's says that its quote does not write. The figure was converted or worked out by whoever recorded it, not copied. |
restated(question, publisher, before, after) | A publisher answered a question, and in a later source answered it otherwise. Its latest dated word counts. |
withdrawn(question, value) | An answer its publisher restated that nobody else still gives first-hand. Relays of it do not keep it alive. |
backing(question, value, publishers) | The publishers who give this answer first-hand, in a claim credited to nobody else, and have not restated it since. |
corroborated(question, value) | Answers that two or more publishers give first-hand. |
single_origin(question, value, publisher) | Answers that rest on one publisher's word, however many sources repeat it. |
reliance(publisher, answers) | How many answers rest on each publisher alone. |
secondhand(question, value, credited) | Answers nobody gives first-hand: every source that states them credits someone else. |
misquoted(claim, to, question, relayed, said) | A claim credits a source that you have read, and that source answers the question differently. |
unread(source) | Sources that others credit and you hold no claim from. |
disputed(question, values) | Questions that sources answer differently, leaving out answers that were withdrawn. |
ambiguous(base, key, values) | Sources answer one question in more than one sense of key, and the reader has not chosen: {"revenue": "acme"} as reported and excluding fuel surcharges. base is the question without its readings; a source that does not say which sense shows as null. |
meant(base, question) | The questions the reader means by base: every reading the sources answer, less those the reader's choices set aside. |
set_aside(question, key, stated, chosen) | A question answered in another sense than the one the reader chose. |
holds(assumption) | Assumptions with no evidence against them. |
covered(lead, pursued, question) | The answered questions a lead's pattern covers, leaving out senses the reader set aside. |
done(lead) | Leads whose every pattern covers an answer two publishers give first-hand. |
blocked(lead, base, key) | Leads waiting for the reader to choose a sense of a question they cover. |
paid_off(lead, source) | Sources read for a lead that say something first-hand it covers. A relay is not a payoff. |
exhausted(lead) | Leads whose sources since their last payoff gave nothing, as many as their patience. |
live(lead) | Leads that are not done, exhausted, or blocked. |
progress(lead, read, paid_off, misses) | Each lead's sources read, payoffs, and misses since its last payoff. |
Only first-hand claims count as confirmation. Two sources with one publisher are one voice, and a source that relays another adds nothing to it. That is strict on purpose: a statement repeated by ten outlets is still one statement. A publisher's later word replaces its earlier one, so a figure a company corrected in its annual report is not a dispute with its own press release: it is a restatement, and the earlier figure is set aside along with everyone who repeats it.
The core also keeps invariants: a claim's source must exist, an attribution must name a known claim and a known source, a location must belong to a claim, a decision must be about a reading, and a source must fit its schema. A write that breaks one fails and changes nothing, and the message says which row and why.
Treat the research run as constructing a formal proof whose axioms are verbatim quoted claims:
assets/core.json to steps/00-core.json, and run it.steps/01-frame.json):
obligation(id, statement) per analytical question the user asked (typically 2–4 per run: a threshold/covenant bound, a cross-source consistency check, an SLA window, a control/counterfactual check, or a dependency/chokepoint/fragility audit). Keep the frame lean (ideally 4–7 KB): do not create obligations for plain source-integrity checks (corroborated/disputed/restated/misquoted/secondhand) that core already tracks, use cond inside a single closed_obligation rule per obligation instead of separate proved/refuted rules, and do not duplicate constraints into both proof/bounds and proof/prove — one proof/bounds rule + 2-argument ["proof/valid?", "?b", {"atLeast": T}] (or above/atMost/below) returns min, max, witnesses, AND kernel-verifies both the bounds and the threshold in one shot!{"persist": true} (e.g. ["define", "pct", ["lambda", ["x"], ["number/round", ["number/multiply", 100, "x"], 2]], {"persist": true}]) so 01-frame.json, checks.json, and page.json reuse them without repetition.Says schema + answer rules (every recorded claim must be read by an answer rule!).reading keys for ambiguous senses (basis, period, SLA clock start) and context fields for numbers taken from headings/metadata.assumption facts + violated rules for hypotheses going in.proof/bounds + proof/valid?: handles continuous linear, integer/mixed-integer linear, linear-fractional ratios (continuous AND integer via Dinkelbach — keep value/integer? on integer counts!), and univariate quadratic / coupled bilinear x * y products (finds exact interior edge stationary points!). Always read parameters from backing/accepted facts, verify with ["proof/valid?", "?b"] or ["proof/valid?", "?b", {"atLeast": T}], and round rational outputs with ["pct", ...] or ["number/round", ..., 2] for JSON display.proof/prove: for universal impossibility proofs (["not", ["exists", ...]]) to obtain a kernel-valid certificate (proof/valid?), minimal contradicting unsat core, or concrete counterexample witness, and for empirical findings (["corroborated", ...]) to obtain facts and assumptions.graph/influence: exact cumulative weighted multi-hop path propagation across arbitrary depth (["graph/influence", "stake_edge", "aegis", "?to", "?w"]) — never hand-roll 1-hop/2-hop/3-hop path rules!assuming + retract ... {"where": goal}: live reactive bulk counterfactuals (["assuming", ["retract", ["claim", "?c", "?s", "?_", "?_"], {"where": ["source", "?s", "?_", "?_", "?_", "tertiary", "?_"]}], ...]) — never hardcode claim IDs/quotes or duplicate all/no_tertiary relation tiers!proof/sensitivity: one-call all-derivations epistemic fragility & minimal cut-set analysis (["proof/sensitivity", ["corroborated", q, v]] → {holds, critical, redundant, resilient, minCutSize, minimalCuts}) — never hand-roll breaks1/breaks2/cut_size relations! Run it over corroborated facts to verify which headline findings survive single-fact retraction (resilient: true, minCutSize >= 2) and which have single points of failure (minCutSize: 1).time/parse, time/diff, time/add, time/format: for all UTC timestamps & timelines (never use legacy @utc-minutes unless maintaining an old model!).graph/cycles (non-throwing cycle detection) and graph/dominators (exact single-point-of-failure chokepoints) for dependency/supply graphs.proof/rules when appropriate, and run lion check on any complex step before replaying if unsure of syntax.sources/<id>.txt, notes/, record.mjs, lion.mjs / replay.mjs).checks.json after every batch — including open_obligation and closed_obligation! Let counterexamples, disputed, unquoted, misquoted, ambiguous, violated, and open_obligation drive your next step.obligation is closed (or explicitly reported as open with the exact missing premise).check-quotes.mjs, verify open_obligation is empty (or explained), check proof/valid? on every formal proof, write report.md covering EVERY finding, exact bound, counterexample, dispute (explicitly naming both sides!), restatement, misquote, limit, and — whenever recommending options, features, or adoptions — concrete caveats, tradeoffs, failure modes, complexity/maintenance costs, and host-system impacts for every recommended item (never leave caveats blank or wait for the reader to ask), then build explorer.html and run page-check.json.mkdir -p research/<topic>/steps research/<topic>/sources && cd research/<topic>
cp <this skill's folder>/assets/core.json steps/00-core.json
node <this skill's folder>/scripts/lion.mjs steps/00-core.json --database model.json
Do this before the deep reading, after a first skim tells you what the topic is made of. The frame is a first draft that grows as you learn. Write steps/01-frame.json (plain JSON; no .src.json needed when using native time/ functions) with six things:
obligation facts for each question the user needs proved, refuted, or bounded.Says schema + invariant) so typos fail loudly.answer rule for each kind (keep "Which statements does no answer rule read?" empty []).reading and context declarations for multi-sense terms and headline/context numbers.assumption facts and violated rules for beliefs going in.proof/bounds, proof/prove, assuming, time/, graph/dominators, graph/cycles, aggregates) that derive closed_obligation directly from recorded facts — never hard-coded vertices or hand-worked corners!["begin",
["schema", "Says", ["schema/anyOf",
{"revenue": "value/string?", "year": "value/integer?", "usd_m": "value/number?"},
{"headcount": "value/string?", "year": "value/integer?", "people": "value/integer?"},
{"acquired": "value/string?", "by": "value/string?", "year": "value/integer?"}]],
["invariant", ["and", ["claim", "?id", "?_", "?_", "?says"], ["not", ["Says", "?says"]]], {"assert": "none"}],
["fact", ["context", "year"]],
["rule", ["answer", {"revenue": "?company", "year": "?year"}, "?usd_m", "?claim"],
["claim", "?claim", "?_", "?_", {"revenue": "?company", "year": "?year", "usd_m": "?usd_m"}]],
["rule", ["answer", {"headcount": "?company", "year": "?year"}, "?people", "?claim"],
["claim", "?claim", "?_", "?_", {"headcount": "?company", "year": "?year", "people": "?people"}]],
["fact",
["assumption", "organic", ["quote", "Acme grew without acquisitions before 2020"]],
["assumption", "filed", ["quote", "A primary source reports revenue"]]],
["rule", ["violated", "organic", "?claim"],
["claim", "?claim", "?_", "?_", ["schema/open", {"by": "acme", "year": "?year"}]],
["number/lessThan", "?year", 2020]],
["rule", ["violated", "filed", "no primary source reports revenue"],
["not", ["and",
["claim", "?_", "?source", "?_", ["schema/open", {"revenue": "?_"}]],
["source", "?source", "?_", "?_", "?_", "primary", "?_"]]]],
"framed"]
The frame will change as you learn the topic. Edit the step and replay.
Start checks.json now too, with the standing questions every run asks. These are for you, to steer the research. It is one record, so running it answers all of them at once:
{
"What do sources disagree on?": ["query", ["disputed", "?question", "?values"]],
"What do independent publishers confirm first-hand?": ["query", ["and",
["corroborated", "?question", "?value"], ["backing", "?question", "?value", "?publishers"]]],
"How much rests on each publisher alone?": ["query", ["reliance", "?publisher", "?answers"], {"order": "-answers"}],
"What rests on one publisher's word?": ["query", ["single_origin", "?question", "?value", "?publisher"]],
"What is known only second-hand?": ["query", ["secondhand", "?question", "?value", "?credited"]],
"Which sources are credited with something they do not say?": ["query", ["misquoted", "?claim", "?to", "?question", "?relayed", "?said"]],
"Which figures did their publisher change?": ["query", ["restated", "?question", "?publisher", "?before", "?after"]],
"Which figures are not written in the words quoted?": ["query", ["unquoted", "?claim", "?field", "?value"]],
"Which questions do sources answer in more than one sense?": ["query", ["ambiguous", "?question", "?key", "?readings"]],
"Which credited sources are still unread?": ["find", "?source", ["unread", "?source"]],
"Which assumptions failed, and on what evidence?": ["query", ["violated", "?assumption", "?witness"]],
"Where should the next search go?": ["query", ["and", ["live", "?lead"],
["progress", "?lead", "?read", "?paid_off", "?misses"]], {"order": ["-paid_off", "read"]}],
"Which leads are done, set aside, or waiting for the reader?": ["find", {"lead": "?lead", "why": "?why"}, ["or",
["and", ["done", "?lead"], ["=", "?why", "confirmed by two publishers first-hand"]],
["and", ["exhausted", "?lead"], ["progress", "?lead", "?_", "?_", "?misses"],
["=", "?why", {"read for nothing first-hand, in a row": "?misses"}]],
["and", ["blocked", "?lead", "?base", "?key"], ["=", "?why", {"waits for the reader to choose": "?key", "of": "?base"}]]]],
"Which proof obligations are closed, and with what verdict?": ["query", ["closed_obligation", "?obligation", "?status", "?detail"]],
"Which proof obligations are still open?": ["find", "?obligation", ["open_obligation", "?obligation"]],
"Which statements does no answer rule read?": ["find", "?claim", ["and",
["claim", "?claim", "?_", "?_", "?_"], ["not", ["answer", "?_", "?_", "?claim"]]]]
}
Save the text first. Before you record a source's claims, save the text you read as sources/<source id>.txt:
node <this skill's folder>/scripts/page-text.mjs "https://example.com/press/fy24" > sources/pr.txt
Quotes are taken from that file. This matters for two reasons. A fetch tool that answers a question about a page gives you its own words, not the page's, and a quote made from a summary is not a quote. And pages change, so the copy is the only proof of what the source said when you read it. page-text.mjs enforces HTTP/HTTPS-only SSRF IP and redirect validation, a 15-second timeout (--timeout-ms), and a 2 MB streaming size cap (--max-bytes). When delegating claim extraction over untrusted external text, use scripts/quarantined-reader.mjs to wrap raw pages in cryptographic-nonce data_not_instructions boundaries with zero write/shell tools and verbatim quote checking. If the script cannot reach a page, save the text by whatever means you read it; if you could not read it at all, the source has no claims of its own (see attribution below).
Then write notes on what the source says, as plain JSON in notes/, and let the recorder turn them into a step:
{"sources": [
{"id": "pr", "url": "https://example.com/press/fy24", "title": "Acme FY24 press release", "publisher": "Acme", "kind": "primary", "published": 20250201},
{"id": "wire", "url": "https://news.example.org/acme", "title": "Acme posts record year", "publisher": "Newswire", "kind": "secondary", "published": 20250202},
{"id": "blog", "url": "https://blog.example.net/acme", "title": "Acme by the numbers", "publisher": "Ledger Blog", "kind": "tertiary", "published": 20250205}],
"claims": [
{"id": "c1", "source": "pr", "quote": "revenue of $120M for fiscal 2024",
"says": {"revenue": "acme", "year": 2024, "usd_m": 120}, "where": "Highlights"},
{"id": "c2", "source": "wire", "quote": "posted $120M in revenue, the company said",
"says": {"revenue": "acme", "year": 2024, "usd_m": 120}, "credits": ["pr"]},
{"id": "c3", "source": "blog", "quote": "$120M in sales, per the wire report",
"says": {"revenue": "acme", "year": 2024, "usd_m": 120}, "credits": ["wire"]},
{"id": "c4", "source": "blog", "quote": "it bought Bolt back in 2018",
"says": {"acquired": "bolt", "by": "acme", "year": 2018}}]}
node <this skill's folder>/scripts/record.mjs notes/02-press.json
node <this skill's folder>/scripts/lion.mjs steps/02-press.json --database model.json
The recorder looks for every quote in the saved text of its source and writes nothing if one is missing, so a paraphrase is caught when you write it and not at the end. It writes the step with everything as data, so no text from a source can be read as a Lion name. The step it writes is one fact form, which is one change: a source and the claims that cite it go in together.
How to record a source:
publisher is who stands behind it: the organization or person, named as you would print it ("Acme", "The Guardian") and written the same way for every channel they speak through. A company's press release, status page, and filing share one publisher, and so do two articles from one newspaper. This is what keeps one voice from counting twice. The reader sees this name.title is the source's own title, as the reader would recognize it. Keep your notes about how you read it out of the title.kind is primary (first-hand: filings, data, official statements, the people involved), secondary (reporting and analysis built on those), or tertiary (summaries of summaries). published is an integer date such as 20250201, or null. When one publisher speaks several times a day, such as commits to a repository, give the time too, to the minute or the second (20250201143005), so its latest word is the one it said last.sources/.How to record a claim:
["quote", …]: URLs, titles, the quoted words, and every says record. In Lion a bare string is a name first, so text that happens to equal a relation's name, or starts with ?, would not stay text. The recorder does this for you.source even if you have not read it. A source you cannot read (behind a login, taken down, refused) stays in the model with no claims of its own, and what it is said to say stays second-hand. A mirror or an extract of a source is a source of its own whose claims are attributed to the original, and so is a page that embeds another's post word for word: until you read the original, its words are second-hand, and the page should say so where it matters. By contrast, when a reporter or analyst independently verifies records or makes their own observation ("records reviewed independently by X", "counted by X"), X stands behind that finding first-hand — record it as X's own claim without "credits" to a synthetic unread placeholder."exact": false, so rules that order statements can leave it out or treat it as a bound.unread no longer lists it.usd_m, minutes), yes/no facts as JSON booleans true and false (never "yes"/"no" strings, and record denials as false so disputed and corroborated compare them directly), dates as integers (20250201) or ISO-8601 strings ("2025-02-01", comparable with string/lessThan / string/greaterThan), names as short lowercase ids used the same way every time. Clock times and time zones use native time/parse, time/diff, time/add, and time/format.{"usd_bn": 1.2}, not {"usd_m": 1200}; "2.5 hours" is {"hours": 2.5}. The core reads the numbers written in each quote, and unquoted lists every number in a claim that its quote does not write, so a slip in copying or converting shows up at once. Keep unquoted strictly empty ([]): when a source writes a number as an English word rather than digits (such as "fifth pad", "two", or "a dozen"), record it as a string ("plan": "fifth pad") — never invent a numeric field whose digits are absent from the quote! Converting units is a job for the model: give the kind a shape with the unit as written, and an answer rule that converts, as in references/patterns.md. A number taken from where the quote stands, such as the year in a headline, goes in a field the frame declares as context."where" in the note: "Page 47, Consolidated Statements of Operations". The reader sees it beside the quote, and the page shows the quote in its place in the saved text either way.If research is fanned out to subagents, have them save each source's text and return claims as data (source, quote, what it says, who it credits), and record them yourself. One writer keeps ids and kinds consistent.
node <this skill's folder>/scripts/lion.mjs checks.json --database model.json
After the step above, the model already knows something a reader of three articles would not:
{
"What rests on one publisher's word?": [
{"question": {"revenue": "acme", "year": 2024}, "value": 120, "publisher": "Acme"}
],
"Which assumptions failed, and on what evidence?": [
{"assumption": "organic", "witness": "c4"}
]
}
Three sources give $120M and all of them are Acme's own word. And the belief that Acme grew without acquisitions has evidence against it, from a tertiary source worth checking.
A later step adds Acme's 10-K, a state registry, and two more relayed claims, and the same questions give:
{
"What do sources disagree on?": [
{"question": {"headcount": "acme", "year": 2024}, "values": [1150, 1200]}
],
"Which figures did their publisher change?": [
{"question": {"revenue": "acme", "year": 2024}, "publisher": "Acme", "before": 120, "after": 118.6}
],
"What do independent publishers confirm first-hand?": [
{"question": {"headcount": "acme", "year": 2024}, "value": 1150, "publishers": ["Acme", "State Registry"]}
],
"What is known only second-hand?": [
{"question": {"headcount": "acme", "year": 2024}, "value": 1200, "credited": ["memo"]}
],
"Which sources are credited with something they do not say?": [
{"claim": "c9", "to": "10k", "question": {"revenue": "acme", "year": 2024}, "relayed": 120, "said": 118.6}
],
"Which credited sources are still unread?": ["memo"]
}
Acme's 10-K, filed after its press release, gives a different revenue figure, so the 10-K's figure is Acme's word now. That is not a dispute. The wire and the blog, which repeat the release, still give the old figure, and the report should say so. ["query", ["withdrawn", "?question", "?value"]] names the figure nobody stands behind any more: [{"question": {"revenue": "acme", "year": 2024}, "value": 120}].
Let the answers decide what you read next. This is where the model earns its keep:
"decisions": [{"key": "basis", "value": "reported", "words": "…"}]), and every rule and page that reads through meant follows it. If you cannot ask, say in the report and on the page that the answer depends on the choice, and give each sense.unquoted non-empty): NEVER ignore this or merely note it in the report — fix the claim so unquoted returns []! Either fix the typo, record the unit as written and convert in a rule, or (for spelled-out words like "fifth" or "two") record the statement as text instead of an unquoted number.reliance says so in one row, and that is a limit to state."for" when you record what you read.When a write fails, read the message before retrying. It names the row and the rule it broke. Usually it is a typo in a key, which you fix in the step. Sometimes it is the evidence contradicting the frame, and then the frame is what needs to change.
Do not wait for a batch to ask. Whenever you are about to lean on something, a figure you will build on or a source you are starting to trust, ask the model about it first. A one-line query costs seconds, and why on an answer that surprises you shows which statements and rules produced it, before you believe it or dismiss it.
Research is a set of lines of inquiry run side by side: find an outside count of warehouses, find who first reported the outage, find the filing behind a figure. Record each as a lead when you start it, with the questions it pursues, and name it in "for" on every source you read to follow it:
{"leads": [
{"id": "outside-warehouses", "statement": "Find a count of warehouses from someone other than Tarnwell",
"pursues": [{"warehouses": "tarnwell"}], "patience": 2},
{"id": "outside-staff", "statement": "Find a headcount from someone other than Tarnwell",
"pursues": [{"staff": "tarnwell"}], "patience": 2},
{"id": "revenue", "statement": "Confirm Tarnwell's revenue", "pursues": [{"revenue": "tarnwell"}]}],
"sources": [
{"id": "cargo-ledger", "url": "https://cargoledger.example/tarnwell-pharma",
"title": "Tarnwell Cold Chain grows on pharma demand", "publisher": "Cargo Ledger",
"kind": "secondary", "published": 20250807, "for": ["outside-warehouses"]}]}
A source pays off for a lead when it says something first-hand that the lead covers; a relay of what someone else said does not, by the same rule that keeps relays from confirming anything. A lead is done once every question it pursues has an answer two publishers give first-hand. It is set aside when as many sources in a row as its patience, 3 unless you say, gave it nothing, and it waits while the sources answer its question in more than one sense and the reader has not chosen. The model numbers the sources read for leads in the order you record them, so "in a row" means since the lead's last payoff.
Here three leads were followed through the Tarnwell sources. After the press coverage, the standing questions gave:
{"Where should the next search go?": [
{"lead": "outside-warehouses", "read": 2, "paid_off": 1, "misses": 1}],
"Which leads are done, set aside, or waiting for the reader?": [
{"lead": "outside-staff", "why": {"read for nothing first-hand, in a row": 2}},
{"lead": "revenue", "why": {"waits for the reader to choose": "basis", "of": {"revenue": "tarnwell"}}},
{"lead": "revenue", "why": {"waits for the reader to choose": "period", "of": {"revenue": "tarnwell"}}}]}
Cargo Ledger counted the warehouses itself, so it paid off, and Reefer Quarterly, which credits Tarnwell's spokesperson, did not. The headcount lead read two sources that only relay Tarnwell and is set aside: what it found is that nobody independent gives a headcount, which the report should say. After the state licensing registry, the warehouse lead is done: Tarnwell and the registry both say 37 first-hand. The dispute with Cargo Ledger's 39 is still listed by disputed, where it belongs.
A lead set aside stays in the model with its sources, and the page's "What was looked for" shows the reader each lead, how it ended, and how many sources were read for it.
The frame you wrote at the start knew little. Each thing you learn about the topic is a chance to make the model check more for you. Whenever one of these happens, stop for a minute and give the model what it needs, by adding to the frame step and replaying:
| When you | Give the model |
|---|---|
| form a belief: about a cause, an order, a size, who knew what, whether two sources are independent | an assumption and its violated rule, then and there. An unwritten belief is the one the evidence overturns without your noticing. |
| compare, add up, convert, or count something by hand a second time | a rule that derives it: an aggregate for a total or a count, a computed column for a ratio or a difference, utc-minutes for a time. You will not do it by hand a third time, and the rule covers sources you have not read yet. |
| meet a kind of statement the frame has no shape for | a new shape in Says and its answer rule. The check "Which statements does no answer rule read?" lists what was recorded and is being ignored. |
| see sources use one word in different senses: two definitions, two periods, two units of count | a key for the sense in that kind's says and question, declared as a reading, then ask the reader which sense they mean. |
| meet a figure in another unit than the frame's | a shape with the unit as written, and an answer rule that converts it. |
| see sources answer one question differently | a rule that states which answer the model accepts and on what basis, so the choice is on record and why can show it. |
| find a value that could have been recorded wrongly | a tighter schema: a list of allowed words, a number's range, a list's exact length. The mistake then fails when it is recorded. |
| see sources leaning on one another | a relation of who relies on whom. graph/pageRank over it shows which source the rest stand on, and graph/components which sources form one cluster. |
| follow a chain: causes, dependencies, ownership, citations | a recursive rule for everything downstream, and graph/topologicalOrder, which fails and names the cycle if sources describe a loop. |
| weigh competing explanations | what each predicts, as facts, and a rule that lists which predictions the evidence bears out. |
| wonder what you still lack | a rule that lists the questions with no answer. An empty list is a reason to stop searching. |
| start a line of inquiry | a lead, with the questions it pursues, and "for" on each source you read to follow it. |
| wonder what would follow if something were true | the same step run against a copy of the model. |
references/patterns.md has a tested rule for each row.
Keep the rules honest as they grow:
checks.json whenever you ask the model something worth asking after every batch. When you ask it something the reader will want to know, note it for the page.When the research is done:
Replay the steps with replay.mjs, to prove the model builds from them.
Check the quotes:
node <this skill's folder>/scripts/check-quotes.mjs
It looks for every claim's quote in the saved text of its source and lists the ones it does not find, word for word, and the sources with no saved text. Fix a quote that is not found: it is a paraphrase or a slip, and the model's explanations end in these quotes. State in the report which sources have no saved text.
Answer from queries. Every number, date, ranking, and count in the report comes from a query result, not from memory and not from arithmetic done in your head. If the report needs a figure the model cannot give, add the rule.
Run why on each key finding and cite the sources at its leaves:
["why", ["corroborated", ["quote", {"headcount": "acme", "year": 2024}], 1150]]
In the report, cite sources. The quotes themselves live in the model, where the page shows them beside each finding. why on a figure a rule computed shows the arithmetic with the values it was given, {"check": ["=", 26.4, ["number/divide", ["number/round", ["number/multiply", 1000, ["number/divide", ["number/subtract", 409.8, 301.5], 409.8]]], 10]]}, so a ratio or a total traces to the line items it came from.
Say what the model says about its own limits and every epistemic finding: list every closed and open proof obligation (with exact bounds, counterexamples, and whether proof/valid? passed), every disputed question (explicitly naming the subject, the word "disputed", and both competing sides with their sources — even when one side is primary and the other is secondary or tertiary), every restated figure (both before and after), every misquoted claim, every ambiguous reading, every single_origin or secondhand dependency, every violated assumption, and any leads set aside.
Write the answer to report.md in the research folder: lead every yes/no user question with a complete plain-English verdict sentence stating the subject and outcome (e.g., "No — Acme does not provably clear the 25.0% margin covenant; its provable range is 23.40% to 26.80%." rather than a bare "No."), cite exact figures/bounds/witnesses from queries and proofs, name every dispute/restatement/misquote/fragility from step 5, and give the user the same words in chat.
Design the page for this reader and write its plan, page.json. Include headline computed figures and proof verdicts (exact min/max bounds, SLA durations, covenant verdicts) as live expressions so the page updates if the model changes.
Build the page, and run every query in it:
node <this skill's folder>/scripts/build-explorer.mjs model.json --page page.json
node <this skill's folder>/scripts/lion.mjs page-check.json --database model.json
The first command writes explorer.html beside the model: one file with the model, the plan, the Lion engine of the lion command, which it gets from lion worker, and the saved text of every source a claim quotes, which opens from disk with no server, and keeps each screen within a reader's attention: measure it with the cognitive-load skill if you have it. Each statement on the page has "Show it in the source", which shows the quote marked in its paragraph of the saved text, and the whole text on request. It also writes page-check.json, every text the plan computes and every query it asks, as one Lion record, with one more check: the questions the plan names that the reader's choices set aside, or that sources answer in senses nobody chose between. The second command runs them all and prints the page's wording, so a sentence that reads wrong, a query that fails or comes back empty, or a question the plan should reach through meant, shows up before the reader finds it. It runs the same Lion as the page. When LION_CLI names another lion command for the scripts, such as bun ~/lion/packages/cli/dist/bin.mjs, run the check with that one: the first command prints the check with it. bun runs the scripts too.
The last check, "Questions the plan names…", must give []. A question it lists has more than one sense the reader has not chosen between, or one their choice set aside, and the page has picked a sense for them: reach the question through meant, as Writing what goes in them shows, rebuild, and run the check again. When the reader has not chosen, the page says the answer depends on it.
The reader asked for research because they had a goal: a decision to make, an event to understand, a claim to check, options to compare. They do not know what Lion is, and they will not write a query. explorer.html is made for them, and it has no fixed form. You design it for their goal, the way you would lay out a report for one particular reader, so that the things they came for are on top and the questions they will ask next take one click.
Before writing the plan, answer three questions in a sentence each:
Then name the views in the reader's words. Some shapes, to adapt and not to copy:
| The reader wants to | Lead with | Views that follow |
|---|---|---|
| understand an event or incident | the short account, key figures, the main answers | a timeline they can filter; causes, with what was said about each; who and what was affected |
| choose between options | the recommendation and what it rests on | a comparison grid of options against criteria; one view per criterion that needs explaining; risks |
| check a claim | the verdict and how sure it is | the evidence for and against; where each version of the claim came from; what is still unverified |
| size up an organization or market | the headline figures, each with who stands behind it | one view per theme (money, people, products, risks); a lookup by entity |
| survey a field or literature | what is established, what is contested | a view per question; who cites whom; the open problems |
Whatever the shape, keep two views for trust unless the goal makes them pointless: how solid the findings are, and the sources. A reader who cannot check you has no reason to believe you.
page.json is one record. The model is the source of everything the reader is told, so the plan does not state facts: it holds Lion expressions, and the page works them out from the model each time it opens. Nobody reads this file, so write each expression in full and do not shorten it.
{
"title": "Acme in 2024",
"summary": ["string/concat",
"Acme's 2024 revenue was ",
["words/listed", ["words/first", ["find", "?values", ["answers", {"revenue": "acme", "year": 2024}, "?values"]]]],
" million dollars",
["cond",
[["restated", {"revenue": "acme", "year": 2024}, "?_", "?_", "?_"],
["string/concat", ", after Acme corrected the ",
["words/listed", ["find", "?before", ["restated", {"revenue": "acme", "year": 2024}, "?_", "?before", "?_"]]],
" million it first reported"]],
["else", ""]],
". It has ",
["words/number", ["words/first", ["find", "?people", ["corroborated", {"headcount": "acme", "year": 2024}, "?people"]]]],
" staff, which an independent source confirms."],
"names": {"acme": "Acme Corp"},
"views": [
{"name": "The numbers", "blocks": [
{"type": "figures", "items": [
{"label": "Staff, 2024",
"value": ["words/number", ["words/first", ["find", "?people", ["corroborated", {"headcount": "acme", "year": 2024}, "?people"]]]],
"note": ["string/concat", "confirmed by ",
["words/listed", ["words/first", ["find", "?publishers", ["backing", {"headcount": "acme", "year": 2024}, "?_", "?publishers"]]]]]},
{"label": "Revenue, 2024, in millions",
"value": ["words/listed", ["words/first", ["find", "?values", ["answers", {"revenue": "acme", "year": 2024}, "?values"]]]],
"note": ["cond",
[["disputed", {"revenue": "acme", "year": 2024}, "?_"], "sources disagree"],
[["restated", {"revenue": "acme", "year": 2024}, "?_", "?_", "?_"],
["string/concat", "corrected from ",
["words/listed", ["find", "?before", ["restated", {"revenue": "acme", "year": 2024}, "?_", "?before", "?_"]]]]],
["else", "sources agree"]]}]},
{"type": "answer",
"question": "How much revenue did Acme report for 2024?",
"answer": ["cond",
[["disputed", {"revenue": "acme", "year": 2024}, "?_"],
["string/concat", "Its sources give different figures: ",
["words/listed", ["words/first", ["find", "?values", ["answers", {"revenue": "acme", "year": 2024}, "?values"]]]],
" million dollars. ",
["cond",
[["corroborated", {"revenue": "acme", "year": 2024}, "?_"], "One of them is confirmed independently."],
["else", "No independent publisher gives a figure."]]]],
[["restated", {"revenue": "acme", "year": 2024}, "?_", "?_", "?_"],
["string/concat",
["words/listed", ["words/first", ["find", "?values", ["answers", {"revenue": "acme", "year": 2024}, "?values"]]]],
" million dollars. Acme first reported ",
["words/listed", ["find", "?before", ["restated", {"revenue": "acme", "year": 2024}, "?_", "?before", "?_"]]],
" million and later corrected it, so sources that repeat the first figure are out of date."]],
["else",
["string/concat",
["words/listed", ["words/first", ["find", "?values", ["answers", {"revenue": "acme", "year": 2024}, "?values"]]]],
" million dollars."]]],
"evidence": ["query", ["and",
["answer", {"revenue": "acme", "year": 2024}, "?usd_m", "?statement"],
["claim", "?statement", "?source", "?_", "?_"]], {"order": "usd_m"}]},
{"type": "lookup", "title": "What does each source say?",
"choose": {"source": {"label": "Source", "options": ["aggregate/unique", ["find", "?s", ["claim", "?_", "?s", "?_", "?_"]]]}},
"example": {"source": "10k"},
"query": ["lambda", ["source"], ["query", ["claim", "?_", "source", "?quote", "?says"]]]}]},
{"name": "How solid is it", "blocks": [{"type": "trust"}]},
{"name": "Sources", "blocks": [{"type": "sources"}]}
]
}
summary, an answer's answer, a block's note or text, and a figure's value and note each take either. A string is shown as written. Anything else is evaluated against the model, and what it gives is the text. Use a string only for words that state no fact of the research: a label, a caveat about method. Whatever states a finding is an expression, so it cannot disagree with the model and changes when the model does.cond picks the sentence: one when disputed holds, another when it does not. Write the sentence for each case the evidence could end in, not only the case it is in today.value is always an expression. The build lists any figure that was typed in, and any text typed into the plan that holds a digit, for you to turn into expressions. A digit in a name, such as a product's, is fine.title and view and block titles are plain strings. names gives the model's ids the names a reader should see; an id in it is shown by its name everywhere on the page.define binds names for the plan's expressions to use: a record of name to Lion value, usually a lambda. Put a phrase or a query you use more than once there.views are the page's tabs, in order; the first is what the reader sees on opening. Each has a name and a list of blocks. "Query the model", the Lion editor for readers who know Lion, is reached from a link at the end of the last view, so the tabs hold only what the reader came for.The page binds these before any expression runs, for turning values into words:
| Function | Gives |
|---|---|
["words/listed", list] | the items as a sentence lists them: a, a and b, a, b and c. These functions never fail: given what is not a list or a number, they write it as words/text does |
["words/number", n] | a number with separators: 130,000, 1,234.5. Anything else, as words/text writes it, so a figure the model lacks reads nothing and does not fail |
["words/count", n, "source", "sources"] | 1 source, 2,400 sources |
["words/first", list] | the first item of a list, or null when it is empty, so a figure the model lacks reads nothing; a find gives a list even when one thing matches. The library's array/head fails on an empty list |
["words/text", value] | any value as text: a number as its digits, true as yes |
string/concat joins any number of strings, and number/toString writes a number that needs no separators, such as a year.
Every block can have a title and a note of plain words under it.
| Block | Shows | Needs |
|---|---|---|
answer | a question, your answer in words, and "Show the evidence" under it | question, answer, evidence: a query |
figures | a row of the few numbers or facts that matter most, each with a label | items: each a label, a value, and an optional note |
table | a query's rows as a table the reader can sort and filter | query |
timeline | rows in time order, a day at a time | query giving ?when as text from utc-text, and ?what; other columns show under each moment |
comparison | a grid: one row for each value of one column, one column for each value of another | query, and rows, columns, cell: the names of three of its variables |
lookup | a question the reader completes by choosing, from a list or, past twelve options, from a box that finds them as they type; the answer changes as they choose | choose: for each name a label and options, a query giving the list; query: a lambda with one parameter for each name in choose, in order, whose body is the query; example, one choice for each name. Optionally answer, a lambda like query that gives the answer in words |
trust | how solid the findings are, built from the core: what needs the reader's decision (undecided), confirmed, disputed, figures their publisher changed (restated), one publisher's word (alone), second-hand, misquoted, figures not written in their quote (unquoted), what the reader chose (choices), assumptions, what was looked for (searched), unread | nothing. show picks and orders the parts; about keeps the findings whose question has a given key, such as "region hit" |
sources | every source by kind, with its publisher, date, and statements | nothing |
text | a few paragraphs of your own, for what no query says: context, method, a caveat | text |
custom | anything the others cannot | script: the body of a function of root and kit |
lookup is the block for "the kinds of question they will keep asking". One lookup answers a whole family of questions: any service, any person, any year. Its as shows the answer as a "timeline" or a "comparison" instead of a table. Its example is what is chosen when the page opens, and what page-check.json runs. A choice's labels gives its options other names.
A lookup's query is a Lion function. The page calls it with what the reader chose, each choice passed as data, so text they pick is never read as Lion.
Give a lookup an answer when its rows need reading. With one, the page leads with the sentence it gives for the reader's choice, and folds the query's rows under "Show the evidence", as an answer block does. page-check.json asks it with the example:
{"type": "lookup", "title": "What does Lion do in this case?",
"choose": {"item": {"label": "Behavior", "options": ["aggregate/unique", ["find", "?b", ["claim", "?_", "?_", "?_", ["schema/open", {"behavior": "?b"}]]]]}},
"example": {"item": "lambda-extra-arguments"},
"answer": ["lambda", ["item"], ["string/concat", "Lion today: ", ["words/listed", ["find", "?v", ["firsthand", {"behavior": "item"}, "?v", "Lion at HEAD"]]], "."]],
"query": ["lambda", ["item"], ["query", ["claim", "?statement", "?source", "?_", ["schema/open", {"behavior": "item"}]]]]}
Asked of the model of Lion's own development, in the Lion repository's history/research/, it gives "Lion today: ignored."
The page shows how far it has got. While Lion opens the model, a line under the title says so, then "Working out the answers: 3 of 15" with a bar, and each view shows its questions at once with "Working this out from the model…" until each part is worked out. The view the reader has open is worked out first, and the page asks Lion one question at a time, so a question's time limit counts only its own run.
custom is the last resort. Its script gets root, an element to fill, and kit: query to ask the model, and el, shown, table, timeline, comparison, and statement to build what it shows. Build with those, so text from sources is never placed as markup.
checks.json; the trust block already shows it.cond on the relation that shows it.page-check.json runs every text and every query of the plan, so its output is the page's wording as the reader will see it. Read it as prose: an empty list reads as nothing, and a null as "nothing".meant. ["meant", {"revenue": "acme"}, "?q"] gives the questions the reader means by revenue: every sense the sources answer until the reader chooses, and then only the one they chose. A plan that names {"revenue": "acme", "basis": "reported"} itself has made the choice for the reader, and the page check lists it. When the reader has not chosen, the wording says the answer depends on it, with a cond on ambiguous.["why", [relation, …, figure]], with the figure itself an expression such as ["words/first", ["find", "?p", [relation, …, "?p"]]], and the page shows "Worked out as …" with the values the rule used, above the statements they came from.?publishers, ?minutes_apart, ?when. Leave out with "?_" whatever is only for the engine, such as a count of minutes beside a time as text. A variable named ?statement or ?claim that holds a claim's id is shown as that claim's quote, and ?source as the source's title. A record of queries is shown as parts, each under its key.utc-text. Text of that form sorts in time order, so {"order": "when"} works.After the model changes, rebuild and run page-check.json again. The texts follow the model on their own; read them once more to see that each still reads as a sentence.
report.md in the research folder, and also given in whatever form the user asked for. The file keeps the answer beside the model it came from, so a follow-up, an audit, or a check against known answers reads the same words the user read.explorer.html, as the place to read the answers and check them. Say that it opens in a browser from the file, and what its parts are for.model.json, page.json, and the replay command.When the user asks something about research that has a model, answer from the model first. Write the query, run it, and give the result with its why when they ask how you know. Add the question and its answer to page.json, in the view where the reader would look for it, so the page holds it too. If the questions they keep asking are of one kind, give that kind a lookup. Search again only when the model lacks the evidence, and then record what you find as a new step. After any change, run page-check.json again, revise what changed, and rebuild the page.
model.json. The next replay undoes the edit. Change the step.says record that no rule reads. It was recorded and then ignored. Either a rule should use it or it was not worth recording.unquoted lists it. Record what the source writes and let a rule convert it.ambiguous lists a question, ask.usd_m. The reader did not ask for a database."None" caveats forces the reader to audit complexity, performance/memory/storage overhead, composability breaks, determinism limits, sandboxing risks, and package boundaries themselves. Record explicit caveats, mitigations, and tradeoffs in the model (and enforce zero unexamined adoptions) before recommending anything.bun info <pkg> version or official release notes) and present the dependency-upgrade path alongside any raw-client alternative upfront.YYYYMMDD probe timestamps). Static {"lion": feature, "has": false} quotes go stale as soon as a feature ships on main, and two "Lion probes" sources sharing the same YYYYMMDD integer leave both true and false stated at once. Always back every {"lion": feature, "has": ?} capability claim with a fast, deterministic offline boolean probe in probes/capabilities/<run>.json (live_lion_has), use full second-precision timestamps (YYYYMMDDHHMMSS) when re-probing on the same day, and keep probe_contradiction strictly empty ([]).$REX_BLOCK)When $REX_BLOCK is present in the environment, the research run is executing inside a Superlogical Rex workspace:
explorer.html or lion repl --rex directly on the user's Rex client via rex open <path-or-url> (or $BROWSER=rex-open) so remote SSH runs open locally without manual port forwarding.rex run --focus=false --keep-open -- ...) rather than blocking the primary reasoning pane.$REX_BLOCK as provenance metadata when routing review callbacks (POST /rex/callback) back to the originating Rex pane, and query workspace state via lion mcp's lion_rex_status / lion_rex_attention tools rather than scraping terminal buffers ad hoc.assets/core.json (opens in a new tab)assets/explorer.html (opens in a new tab)assets/explorer.js (opens in a new tab)assets/utc-minutes.json (opens in a new tab)assets/utc-text.json (opens in a new tab)assets/words.json (opens in a new tab)evals/audits-merger-bounds/answers.json (opens in a new tab)evals/audits-merger-bounds/case.yaml (opens in a new tab)evals/audits-merger-bounds/corpus/biotech-wire.txt (opens in a new tab)evals/audits-merger-bounds/corpus/fy25-10k.txt (opens in a new tab)evals/audits-merger-bounds/corpus/investor-deck.txt (opens in a new tab)evals/audits-merger-bounds/corpus/lab-blog.txt (opens in a new tab)evals/audits-merger-bounds/corpus/prelim-release.txt (opens in a new tab)evals/audits-merger-bounds/corpus/regulator-registry.txt (opens in a new tab)evals/audits-merger-bounds/grade.mjs (opens in a new tab)evals/audits-merger-bounds/prompt.md (opens in a new tab)evals/audits-orbital-portfolio/answers.json (opens in a new tab)evals/audits-orbital-portfolio/case.yaml (opens in a new tab)evals/audits-orbital-portfolio/corpus/faa-registry.txt (opens in a new tab)evals/audits-orbital-portfolio/corpus/fy25-10k.txt (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
research, logic-model, proof-building, fact-checking, source-tracing
3 skills in this plugin
/lion-archExtract, surgically update, review, and verify living software architecture models as canonical Lion JSON (separated model.json + evidence.json) with verbatim code-snippet anchors, two-sided Reflexion checks, counterfactual proposals, Markdown PR reports, and zero-server interactive diffs./lion-reasoningKeep a Lion logic model of what you have observed and what you believe while you work, so a belief the evidence contradicts, evidence that went out of date when a file changed, and a claim that rests only on what you were told are caught as they happen, not in your final answer. Use it for work where a wrong belief is costly or easy to slip in. That includes debugging and finding the cause of a failure, a change that has to be verified across many places, auditing docs, notes, or memory against the code, mapping how parts of a system depend on each other, making a number better (a benchmark, a size, a test or eval score) by experiments you keep or revert, tuning a prompt, a skill, or an agent's harness against evals and carrying what you learned to a new model or benchmark, and any task long enough that your context will be summarized before it ends. Use it even when the user never mentions Lion or a model. Skip it for a task a few tool calls settle.npx claudepluginhub andrueandersoncs/lion --plugin lionOther plugins' skills for the same job