bug-protocol
Skill82 starsChanged 3 months agoMITView on GitHub
The \"loudly declare\" protocol for platform, engine, or data bugs during a NexusTrade certification campaign — bugs are a first-class deliverable, not something to route around. Use whenever a NexusTrade tool errors, hangs, or returns numbers that contradict the config; whenever you're tempted to write \"probably an engine quirk\"; or when a discovered bug invalidates prior backtests and results must be quarantined. Includes the bug hand-off doc template (see references/BUG_TEMPLATE.md).
In this repository23 other files it gives its agents.
- skills/alt-data-indicators/AGENTS.mdAGENTS.md
- skills/breadth-audit/AGENTS.mdAGENTS.md
- skills/bug-protocol/AGENTS.mdAGENTS.md
- skills/deploy-gate/AGENTS.mdAGENTS.md
- skills/engine-sanity/AGENTS.mdAGENTS.md
- skills/lockbox-holdout/AGENTS.mdAGENTS.md
- skills/options-structure-rules/AGENTS.mdAGENTS.md
- skills/portfolio-certification/AGENTS.mdAGENTS.md
- skills/run-episode/AGENTS.mdAGENTS.md
- skills/strategy-bakeoff/AGENTS.mdAGENTS.md
- skills/sweep-reoptimization/AGENTS.mdAGENTS.md
- skills/walk-forward-oos/AGENTS.mdAGENTS.md
- alt-data-indicatorsSkill
- breadth-auditSkill
- deploy-gateSkill
- engine-sanitySkill
- lockbox-holdoutSkill
- options-structure-rulesSkill
- portfolio-certificationSkill
- run-episodeSkill
- strategy-bakeoffSkill
- sweep-reoptimizationSkill
- walk-forward-oosSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 57
Before writing any claim about engine behavior into a deliverable, back it with one of: query_backtest_events / query_portfolio_events, a …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Bug Protocol — "Loudly Declare"
The compute + engine stack is new and moves. Every failure gets this protocol. Never paper over an error to keep a campaign moving — a swallowed bug is worse than a blocked stage. A confabulated mechanism (inventing why the engine did something) is the worst failure mode: the campaign's worst moments have been confabulated reconcile events, pricing behavior, and budget behavior. Verify, don't assert.
Precedent: a totalBudget over-deployment bug (a book with a 40% budget deployed ~96% of NAV at cold
start) was caught exactly this way and invalidated weeks of results. The general lesson is to
quarantine every result affected by an engine defect and rerun only after the behavior is corrected.
The five steps (apply on every failure)
- Stop and characterize — is it config (my fault), data (source-side), or engine (NexusTrade)? Reproduce minimally — the smallest job/backtest that still shows it.
- Log it immediately in the run's
CAMPAIGN_LOG.mdunder a⚠️ BUG/ISSUEheading: symptom, repro IDs, expected-vs-observed, current hypothesis (labeled hypothesis), what it blocks. - If it's a real engine/data bug, write a hand-off doc
<NAME>_BUG.mdin the run directory, modeled on the template inreferences/BUG_TEMPLATE.md(one-line summary, expected vs observed, reproduction with IDs, leading hypothesis, alternatives to rule out, where to look, impact on results). - Quarantine affected results — mark every backtest/study that ran before the fix as suspect/invalid. Re-run after the fix. If the bug inflated leverage, both returns AND drawdowns are inflated and any sweep gene it touched may be non-differentiating — re-validate all of it.
- Tell the human, prominently, in the chat. Bugs are a co-equal deliverable of the episode with the trading result — not an embarrassment to route around.
What is NOT a bug (honest-signal failures — don't file these)
- A fold returning
NoEligibleCandidate= an honest signal, not a bug. Widen validation; don't drop the certification floors. - A dead / not-yet-listed name (e.g. SNDK in 2022) being absent or in a reject list with no fabricated values = correct behavior. The engine fabricating a price/indicator value for a name that didn't trade IS a bug (see engine-sanity).
- A single-tick reconcile target = the live strategy accretes the rest over daily rebalances — say so, don't re-diagnose it as a bug (see deploy-gate).
Verify-don't-assert checklist
Before writing any claim about engine behavior into a deliverable, back it with one of:
query_backtest_events / query_portfolio_events, a conditionFieldAudit, or a minimal
reproduction. "The engine probably…" is not evidence.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

