Persona and rules
How the rules load
The plugin has three hooks:
| Hook | When | What it does |
|---|---|---|
SessionStart |
start, resume, clear, compact | Injects the core rules, the house rules, your approved learned rules and the language tiers |
SubagentStart |
each subagent | Injects the same rules, so delegated code follows them too |
UserPromptSubmit |
each prompt | Handles /lucid-coder on/off/status/nudge/lang; adds at most one nudge line when a prompt reads like a lasting correction |
Prompt text is never stored. Only the on/off flags are written to disk.
The rule files
| File | Holds |
|---|---|
rules/core.md |
The persona: what goes wrong in analysis code, and eight habits |
rules/house.md |
Conventions the user decided, as flat rules |
rules/r.md, rules/python.md |
Language tiers, loaded for the languages the repo uses |
The lucid-coder skill adds worked before-and-after examples. Its house-style.md lists every convention with the evidence behind it: corpus repositories, external guides and the user’s own picks.
The eight habits
From rules/core.md:
- Open cold. A header with Purpose, Run, Inputs and Outputs, then blocks in run order.
- Knobs at the top. Values a reader may change sit first, in
UPPER_SNAKE, each with a reason. - Say it once, inline until it repeats. A named function only at three or more calls.
- Trust the package. Call edgeR, limma, dplyr and scanpy; never rebuild them.
- Check where data enters, then trust it. One named identity check where metadata meets a matrix, and a cardinality argument on joins.
- Scripts compute, notebooks show.
- Every number reruns. Read-only
data/, seeds, explicit factor levels, session info. - Figures show the data. Each donor a point over any summary, units on axes, one palette keyed by label.
Learned rules
A correction such as “always use |>, never %>%” can become a rule:
- You correct Claude’s code.
- Claude offers
/lucid-coder:learnonce. It never saves a rule unasked. - You approve the wording. The rule loads at every later session start.
Manage rules with /lucid-coder:rules: list, approve, reject, supersede or retire one. The narrowest scope wins within a topic.
A team can share rules through lucid-coder.rules.json at a repository root. That file loads only after you trust it with /lucid-coder:rules trust.
Biology-core claims
Reports and captions word a result by what produced it:
| Evidence | Wording |
|---|---|
| Data | observed, measured |
| A test or correlation | associated with |
| A model or a transferred label | predicted, scored |
Never “drives”, “causes” or “regulates” without a perturbation. A score is not a probability. A gene that was filtered is “not tested”, never absent.