Evaluates a local pre-trade checklist before manual order entry, blocking planless, oversized, revenge-risk, market-regime-blocked, or circuit-breaker-blocked entries while journaling the decision for later review.
Ships in tradermonty-claude-trading-skills. 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; scripts run unread.
Evaluate whether a planned manual order should proceed before it is placed at the broker. This skill reads a local checklist plus optional market-regime, circuit-breaker, and trader-memory-core artifacts. It produces a pre_trade_discipline_decision artifact and can link that artifact back to the related thesis without changing the thesis review schedule.
The gate is intentionally offline. It does not place orders, cancel orders, call a broker API, or fetch market data.
exposure_decision and circuit_breaker_decisionstate/theses/exposure_decision JSON from market-regime-daily / exposure-coachcircuit_breaker_decision JSON from drawdown-circuit-breakerCreate a JSON or YAML file with candidate answers. Only actionable manual-order intents are gated. Watchlist and ignore intents are journaled as NO_ACTIONABLE_ORDERS.
{
"candidates": [
{
"symbol": "AAPL",
"thesis_id": "th_aapl_gm_20260703_0001",
"order_intent": "ENTRY_READY",
"entry_in_written_plan": true,
"stop_predefined": true,
"size_within_plan": true,
"planned_risk_dollars": 500,
"actual_risk_dollars": 500,
"notes": "Entry matches the journaled breakout plan."
}
]
}
Actionable intents are ENTRY_READY, ACTIONABLE, ACTIONABLE_DAY1, and MANUAL_ORDER. Non-actionable intents such as WATCHLIST, DELAYED_EP_WATCH, PEAD_HANDOFF, IGNORE, and REJECTED are recorded but do not create an order permission.
Provide both planned_risk_dollars and actual_risk_dollars for every actionable candidate. Use a finite, non-negative number or numeric string; zero is valid. Treat missing values, booleans, non-numeric strings, NaN, infinities, and negative values as REVIEW_REQUIRED inputs and review them before placing an order.
python3 skills/pre-trade-discipline-gate/scripts/check_pre_trade_discipline.py \
--answers-file state/manual-entry-checklist.json \
--state-dir state/theses \
--market-regime-decision reports/exposure_decision_latest.json \
--circuit-breaker-decision reports/circuit_breaker_decision_latest.json \
--output-dir reports/pre-trade-discipline \
--journal-dir state/journal/pre-trade-discipline
Set --as-of for deterministic testing or backfills:
python3 skills/pre-trade-discipline-gate/scripts/check_pre_trade_discipline.py \
--answers-file state/manual-entry-checklist.json \
--as-of 2026-07-03T12:00:00-04:00
| Decision | Meaning |
|---|---|
GO | All actionable manual-order candidates passed the checklist and upstream gates |
REVIEW_REQUIRED | Inputs are missing, unknown, or journaling failed; an approved-rule acknowledgement is missing or records an exception; or the approved-rule ledger could not be read. Do not place orders until reviewed |
NO_GO | At least one actionable candidate violated a discipline rule |
NO_ACTIONABLE_ORDERS | The file contains no actionable manual orders; nothing should be placed |
By default the CLI exits 0 for every valid decision and exits 1 only for input or runtime errors. Use --fail-on-non-go when a shell pipeline should return 2 for any non-GO decision.
Rules a human approved in the monthly review can be carried into the pre-trade check through a local ledger. The gate never evaluates a rule against a trade; it lists each applicable rule and requires a recorded acknowledgement. The acknowledgement is recorded, not verified.
The ledger is a local JSON file, state/rules/approved_rules.json by default. It is a single-user file: writes are atomic, but concurrent writers are not supported. Manage it with scripts/manage_approved_rules.py:
# Activate approved rules from a monthly rule-changes artifact (both artifact shapes are accepted)
python3 skills/pre-trade-discipline-gate/scripts/manage_approved_rules.py activate \
--rule-changes reports/06_rule_changes_for_next_month.yaml \
--effective-date 2026-06-01 --review-after 2026-06-30 --confirm-activation
# Also activate the postmortem-driven trade_rule_changes (opt-in; needed when the coach step was skipped)
python3 skills/pre-trade-discipline-gate/scripts/manage_approved_rules.py activate \
--rule-changes reports/06_rule_changes_for_next_month.yaml \
--effective-date 2026-06-01 --review-after 2026-06-30 \
--include-trade-rule-changes --source-review-id monthly_2026-05 --confirm-activation
python3 skills/pre-trade-discipline-gate/scripts/manage_approved_rules.py list --as-of 2026-06-15
python3 skills/pre-trade-discipline-gate/scripts/manage_approved_rules.py extend \
--rule-id rule_3f9a1c2b7d10 --review-after 2026-08-31 --reason "keep another month"
python3 skills/pre-trade-discipline-gate/scripts/manage_approved_rules.py retire \
--rule-id rule_3f9a1c2b7d10 --reason "no longer relevant"
python3 skills/pre-trade-discipline-gate/scripts/manage_approved_rules.py restore \
--rule-id rule_3f9a1c2b7d10 --reason "retired by mistake"
python3 skills/pre-trade-discipline-gate/scripts/manage_approved_rules.py supersede \
--rule-id rule_3f9a1c2b7d10 --text "Wait for the confirmed pivot close" \
--effective-date 2026-06-15 --review-after 2026-07-31 --reason "sharper wording" --confirm
activate reads the replay-shape artifact (schema_version: 1 with coach_rule_decision, whose accepted_rules count only for accept_rules and modify_rules) or the sample-shape artifact (schema_version: "1.0" with rules[], where only ACCEPTED entries count; it also needs --source-review-id). Deferred, journal-only, and rejected items are never activated. Without --confirm-activation it prints the plan and writes nothing, and any error leaves the ledger untouched.rule_id comes from its normalized text, so approving the same rule in a later month renews it instead of duplicating it. Re-running a file from the same review is a no-op.active, superseded, or retired. History is append-only and nothing is deleted. activated, renewed, and reactivated events record the source review id and the source artifact hash (null for a manual supersede); retired, extended, restored, and superseded events record a reason only.supersede replaces the active rule immediately. Its --effective-date must be today or earlier in America/New_York; a future date is refused without changing the ledger. Re-run on or after the intended effective date. A backdated date does not replay history or change earlier reports.activate checks the whole batch, so the result does not depend on candidate order, and refuses the entire activation otherwise.YYYY-MM-DD values (unquoted YAML dates are accepted); padded values are rejected. Rows in a sample-shape file whose status is not exactly ACCEPTED are skipped and listed in the output. Re-running a file from the same review with different dates changes nothing and prints a warning pointing to extend.list and the gate use a computed state. effective and review_due rules are applied; not_yet_effective, expired, superseded, and retired rules are not. review_after is inclusive, and a review_due rule still applies with a warning so the gate has no gap before the next monthly review. expires_on is an optional hard stop. Dates are America/New_York calendar dates.--as-of does not reconstruct an earlier ledger.Pass --approved-rules-ledger PATH to the gate. For each actionable candidate, add one acknowledgement per applied rule:
"approved_rule_checks": [{"rule_id": "rule_3f9a1c2b7d10", "status": "followed", "note": ""}]
followed and not_applicable pass. exception needs a non-empty note and still yields REVIEW_REQUIRED, because the gate cannot approve an exception: either do not place the order, or change the ledger (retire, supersede) and rerun.exception without a note, an unknown status, or a malformed approved_rule_checks value yields REVIEW_REQUIRED. NO_GO still outranks it.REVIEW_REQUIRED and the report and journal are still written.approved_rules block and each candidate an approved_rule_checks list. Without the flag, output is unchanged.Use scripts/review_rule_experiment.py to review one approved rule over 14 New York calendar days. Read references/rule_experiment.md for the CLI and observation format. Ask the user to define when the rule applies before recording observations. Use their confirmed enter, wait, or pass decision and assessment for each occasion. Treat a gate acknowledgement as a reference to the pre-trade check and ask for the actual decision separately. Retain unassessed occasions in the log. Bring the summary to the monthly review as self-reported evidence, with any rule change going through the existing approval process.
After a month ends, use scripts/review_rule_adherence.py to count the gate acknowledgements of each approved rule in the journal. Read references/rule_adherence.md for the inputs, the rerun rules, and the output fields. Review the month in which the rules were in force.
python3 skills/pre-trade-discipline-gate/scripts/review_rule_adherence.py \
--journal-dir state/journal/pre-trade-discipline \
--ledger state/rules/approved_rules.json --month 2026-06 \
--as-of 2026-07-05 --output-dir reports/pre-trade-discipline
manage_approved_rules.py. The report never changes the ledger.rule_adherence_<YYYY-MM>_as-of_<YYYY-MM-DD>.json and .md. Warnings name gaps: no_gate_runs_in_window, no_rules_in_window and different_ledger_path.The gate blocks an actionable candidate when:
REVIEW_REQUIRED)actual_risk_dollars exceeds planned_risk_dollarsREDUCE_ONLY or CASH_PRIORITYCOOLDOWN, HALTED, or TRADING_HALTEDMissing or unreadable market-regime or circuit-breaker artifacts produce REVIEW_REQUIRED for actionable orders. If no actionable order exists, the result remains NO_ACTIONABLE_ORDERS.
The script writes:
pre_trade_discipline_decision_YYYY-MM-DD_HHMMSS.json--json-only is setstate/journal/pre-trade-discipline/ when --journal-dir is providedEach candidate result includes a checklist_answers object with the written-plan, stop, size, risk-dollar, and notes answers used for the decision, so later reviews can audit what was answered at order time. Invalid risk-dollar values are stored as JSON null. Valid JSON decimals that cannot round-trip through a binary float are retained as numeric strings so underflow or precision loss cannot change the gate decision.
If a candidate includes thesis_id and --state-dir is provided, the JSON report is linked into the thesis linked_reports list using trader-memory-core link_report. The skill does not call mark_reviewed and does not change monitoring review dates.
scripts/check_pre_trade_discipline.py - Main CLI and rule enginescripts/manage_approved_rules.py - Approved-rule ledger CLI (activate, list, supersede, retire, extend, restore)scripts/approved_rules.py - Ledger library (standard library only)scripts/review_rule_adherence.py - Monthly adherence report from gate acknowledgements (standard library only)references/rule_adherence.md - Adherence report inputs, rules, and output fieldsreferences/discipline_gate_framework.md - Rule definitions and integration notesskills/trader-memory-core/schemas/thesis.schema.json - Thesis state schemareferences/discipline_gate_framework.md (opens in a new tab)references/rule_adherence.md (opens in a new tab)references/rule_experiment.md (opens in a new tab)requirements.txt (opens in a new tab)scripts/approved_rules.py (opens in a new tab)scripts/check_pre_trade_discipline.py (opens in a new tab)scripts/manage_approved_rules.py (opens in a new tab)scripts/review_rule_adherence.py (opens in a new tab)scripts/review_rule_experiment.py (opens in a new tab)scripts/tests/conftest.py (opens in a new tab)scripts/tests/fixtures/flag_absent_baseline.json (opens in a new tab)scripts/tests/test_approved_rules.py (opens in a new tab)scripts/tests/test_approved_rules_round1.py (opens in a new tab)scripts/tests/test_approved_rules_round2.py (opens in a new tab)scripts/tests/test_approved_rules_round3.py (opens in a new tab)scripts/tests/test_check_pre_trade_discipline.py (opens in a new tab)scripts/tests/test_gate_approved_rules.py (opens in a new tab)scripts/tests/test_gate_round1.py (opens in a new tab)scripts/tests/test_gate_round2.py (opens in a new tab)scripts/tests/test_rule_adherence.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/tradermonty-claude-trading-skills:pre-trade-discipline-gatefrom tradermonty-claude-trading-skills
tradermonty-claude-trading-skills@cascade-business-ops is listed by joshuarweaver/cascade-business-ops — review the source before installing
npx claudepluginhub joshuarweaver/cascade-business-ops --plugin tradermonty-claude-trading-skills74 skills in this plugin
/backtest-expertExpert guidance for systematic backtesting of trading strategies. Use when developing, testing, stress-testing, or validating quantitative trading strategies. Covers "beating ideas to death" methodology, parameter robustness testing, slippage modeling, bias prevention, and interpreting backtest results. Applicable when user asks about backtesting, strategy validation, robustness testing, avoiding overfitting, or systematic trading development./breadth-chart-analystThis skill should be used when analyzing market breadth charts, specifically the S&P 500 Breadth Index (200-Day MA based) and the US Stock Market Uptrend Stock Ratio charts. Use this skill when the user provides breadth chart images for analysis, requests market breadth assessment, positioning strategy recommendations, or wants to understand medium-term strategic and short-term tactical market outlook based on breadth indicators. Also works WITHOUT chart images by fetching CSV data directly from public sources. All analysis and output are conducted in English./breakout-trade-plannerGenerate Minervini-style breakout trade plans from VCP screener output with worst-case risk calculation, portfolio heat management, and Alpaca-compatible order templates (stop-limit bracket for pre-placement, limit bracket for post-confirmation). Use when user has VCP screener results and wants actionable trade plans with entry/stop/target levels and position sizing.Other plugins' skills for the same job