TCX Brain
Manage the complete Investment Brain lifecycle through one user entrypoint. A
Brain shapes Head Manager's inquiry and interpretation; it is not a Strategy,
role roster, workflow, memory store, policy package, or execution extension.
$tcx-brain manages Brains. It never selects one for analysis. A native
analysis still requires one exact active $investment-brain-* id, either as a
plain invocation or a Markdown link whose label and target match the projected
workspace skill. Repeated references to the same id are deduplicated; distinct
multiple ids fail closed.
Read bundle-contract.md before creating,
revising, or deleting a user-owned source bundle.
Action Model
Keep the two managed layers distinct:
- Source actions create, inspect, revise, validate, or explicitly delete a
user-owned workspace-local bundle below
investment-brains/.
- Plugin actions list, inspect, install, update, activate, deactivate, roll
back, or remove registry-managed immutable versions through the canonical
manage_investment_brain MCP service.
remove is the managed delete operation: it removes the Head Manager
projection and marks the plugin removed while retaining immutable versions for
run provenance. It does not delete a user-owned source directory. A source
deletion is a separate, explicitly named action.
Admission
Natural-language requests may create or revise a user-owned source below
investment-brains/, then run read-only validation. list, inspect, and
validate require no lifecycle proof. Use the normal trading-research
profile for both source and lifecycle work.
Require $tcx-brain on the first meaningful line of a fresh root turn only for
managed install, update, activate, deactivate, rollback, or remove.
Do not combine it with $tcx-build, $tcx-wiki, $tcx-strategy, or an order
marker. The marker grants only the matching current-turn lifecycle service
call. Plan mode and subagents cannot perform managed lifecycle mutations.
Source Procedure
- For a new Brain, use the canonical
investment-brains/<investment-brain-id> source directory. Use a new lowercase
hyphen-case investment-brain-* id and version 1.0.0 unless the user chose
another valid initial version.
- Revise or delete only a user-owned source directory explicitly identified by
the user. Never edit or delete
.tradingcodex/investment-brains, projected
.agents/skills/investment-brain-*, a third-party package, an external
source, or an upstream repository. Adapt third-party ideas only under a new
user-owned id with a compatible license and original wording.
- Use only material the user explicitly selected, including named Wiki pages,
Decision Memory episodes, forecasts, postmortems, validated lessons, and
contrary cases. Do not sweep memory or Wiki content or infer consent from
relevance. Ask for the target Brain when no single user-owned source is
unambiguous.
- Require counterexamples and scope limits. Perform a privacy review that
excludes private Investor Context, account or holding details, personal
constraints, confidential sources, issuer-specific cases, and verbatim
private prose.
- Abstract the selected evidence into general hypotheses, inquiry priorities,
interpretation principles, causal frames, scenarios, falsifiers,
applicability limits, and abstention heuristics. Do not copy private cases,
names, tickers, account facts, memory text, or factual Wiki prose into the
bundle.
- Before writing, state the abstraction, counterexamples, limitations,
excluded private material, id, version, publisher, license, destination, and
requested source action. An exact create or revise request with sufficient
inputs already authorizes that reversible source change; do not add a
redundant confirmation. Require a new explicit request for deletion or when
a missing privacy/evidence choice would materially change the bundle.
- Write only the strict source bundle described in the reference. Keep its
content platform-neutral. It must not name roles, tools, models, sandboxes,
workflow order, artifact paths, memory operations, policy, approval, broker,
order, or execution authority.
- For a source deletion, first state that installed immutable versions and
historical provenance remain. Delete only the exact confirmed user-owned
source files; do not translate source deletion into managed plugin removal or
vice versa.
- After create or revise, call the proof-free
manage_investment_brain with
action="validate" and local_source=<source-directory>. Changed content
already represented by an installed
version requires a version higher than every installed version.
- Choose the minimum valid patch version greater than every installed version
unless the user selected another higher version. Stop after any source
create, revise, or delete action. Do not install,
update, activate, remove, stage, commit, configure a remote, push, publish,
or open a pull request in the same turn. A reviewed lifecycle action starts
in a fresh explicit
$tcx-brain turn.
Managed Plugin Procedure
Identify exactly one explicit workspace-local source directory or public,
credential-free HTTPS Git URL and ref. Do not infer a source or search a
marketplace. Private, authenticated, SSH, file, or external local Git
sources remain explicit user-terminal workflows.
Validate before install or update and inspect the returned id, version,
source posture, content digest, and skill digest.
Install inactive first, then inspect the registry result. Activate only when
the user explicitly requested that exact validated id and version.
Use only manage_investment_brain; its lifecycle mutations are
proof-protected. Never edit
registry, package, projection, generated index, or Head Manager config files
directly. Select one exact action and only its matching fields:
action=list [active_only]
action=inspect brain_id=<investment-brain-id>
action=validate local_source=<source-directory>
action=validate git_source=<public-https-url> [ref=<ref>]
action=install local_source=<source-directory>
action=install git_source=<public-https-url> [ref=<ref>]
action=update brain_id=<investment-brain-id> [local_source=<source-directory>|git_source=<public-https-url> ref=<ref>]
action=activate|deactivate brain_id=<investment-brain-id>
action=rollback brain_id=<investment-brain-id> [version=<major.minor.patch>]
action=remove brain_id=<investment-brain-id>
Install always starts inactive. The MCP process owns service access; do not
reopen the denied TradingCodex runtime or call its Python directly.
Update by publishing a higher immutable version. Never rewrite installed
bytes under an existing version. Rollback selects an already-installed
version; remove retains all installed versions for provenance.
Return the action, Brain id, selected version, status, validation posture,
source posture, digests, projection posture, and exact next step. Do not
expose credentials or absolute external local paths.
Hard Stops
- Do not mutate Decision Memory, Investor Context, a Strategy, or current
evidence while managing a Brain.
- Do not use
$tcx-build as a wrapper or use the Brain grant for generic
workspace maintenance.
- Do not present a Brain as validated investment truth; current authenticated
evidence can falsify it.
- Do not stage, commit, configure a remote, push, publish, or open a pull
request unless the user separately requests that Git or publication action.
- Do not approve orders, grant broker authority, change policy, submit, cancel,
or execute through this skill.
1---2name: tcx-brain3description: Author and manage TradingCodex Investment Brains. Use when the user asks to put principles or a Wiki insight into a Brain; create, inspect, revise, or validate a user-owned `investment-brain-*` source; or install, update, activate, deactivate, roll back, or remove a managed Brain. Natural-language source authoring is allowed, while lifecycle mutations require `$tcx-brain` on the first meaningful line of a root turn.4---56# TCX Brain78Manage the complete Investment Brain lifecycle through one user entrypoint. A9Brain shapes Head Manager's inquiry and interpretation; it is not a Strategy,10role roster, workflow, memory store, policy package, or execution extension.1112`$tcx-brain` manages Brains. It never selects one for analysis. A native13analysis still requires one exact active `$investment-brain-*` id, either as a14plain invocation or a Markdown link whose label and target match the projected15workspace skill. Repeated references to the same id are deduplicated; distinct16multiple ids fail closed.1718Read [bundle-contract.md](references/bundle-contract.md) before creating,19revising, or deleting a user-owned source bundle.2021## Action Model2223Keep the two managed layers distinct:2425- Source actions create, inspect, revise, validate, or explicitly delete a26 user-owned workspace-local bundle below `investment-brains/`.27- Plugin actions list, inspect, install, update, activate, deactivate, roll28 back, or remove registry-managed immutable versions through the canonical29 `manage_investment_brain` MCP service.3031`remove` is the managed delete operation: it removes the Head Manager32projection and marks the plugin removed while retaining immutable versions for33run provenance. It does not delete a user-owned source directory. A source34deletion is a separate, explicitly named action.3536## Admission3738Natural-language requests may create or revise a user-owned source below39`investment-brains/`, then run read-only validation. `list`, `inspect`, and40`validate` require no lifecycle proof. Use the normal `trading-research`41profile for both source and lifecycle work.4243Require `$tcx-brain` on the first meaningful line of a fresh root turn only for44managed `install`, `update`, `activate`, `deactivate`, `rollback`, or `remove`.45Do not combine it with `$tcx-build`, `$tcx-wiki`, `$tcx-strategy`, or an order46marker. The marker grants only the matching current-turn lifecycle service47call. Plan mode and subagents cannot perform managed lifecycle mutations.4849## Source Procedure50511. For a new Brain, use the canonical52 `investment-brains/<investment-brain-id>` source directory. Use a new lowercase53 hyphen-case `investment-brain-*` id and version `1.0.0` unless the user chose54 another valid initial version.552. Revise or delete only a user-owned source directory explicitly identified by56 the user. Never edit or delete `.tradingcodex/investment-brains`, projected57 `.agents/skills/investment-brain-*`, a third-party package, an external58 source, or an upstream repository. Adapt third-party ideas only under a new59 user-owned id with a compatible license and original wording.603. Use only material the user explicitly selected, including named Wiki pages,61 Decision Memory episodes, forecasts, postmortems, validated lessons, and62 contrary cases. Do not sweep memory or Wiki content or infer consent from63 relevance. Ask for the target Brain when no single user-owned source is64 unambiguous.654. Require counterexamples and scope limits. Perform a privacy review that66 excludes private Investor Context, account or holding details, personal67 constraints, confidential sources, issuer-specific cases, and verbatim68 private prose.695. Abstract the selected evidence into general hypotheses, inquiry priorities,70 interpretation principles, causal frames, scenarios, falsifiers,71 applicability limits, and abstention heuristics. Do not copy private cases,72 names, tickers, account facts, memory text, or factual Wiki prose into the73 bundle.746. Before writing, state the abstraction, counterexamples, limitations,75 excluded private material, id, version, publisher, license, destination, and76 requested source action. An exact create or revise request with sufficient77 inputs already authorizes that reversible source change; do not add a78 redundant confirmation. Require a new explicit request for deletion or when79 a missing privacy/evidence choice would materially change the bundle.807. Write only the strict source bundle described in the reference. Keep its81 content platform-neutral. It must not name roles, tools, models, sandboxes,82 workflow order, artifact paths, memory operations, policy, approval, broker,83 order, or execution authority.848. For a source deletion, first state that installed immutable versions and85 historical provenance remain. Delete only the exact confirmed user-owned86 source files; do not translate source deletion into managed plugin removal or87 vice versa.889. After create or revise, call the proof-free `manage_investment_brain` with89 `action="validate"` and `local_source=<source-directory>`. Changed content90 already represented by an installed91 version requires a version higher than every installed version.9210. Choose the minimum valid patch version greater than every installed version93 unless the user selected another higher version. Stop after any source94 create, revise, or delete action. Do not install,95 update, activate, remove, stage, commit, configure a remote, push, publish,96 or open a pull request in the same turn. A reviewed lifecycle action starts97 in a fresh explicit `$tcx-brain` turn.9899## Managed Plugin Procedure1001011. Identify exactly one explicit workspace-local source directory or public,102 credential-free HTTPS Git URL and ref. Do not infer a source or search a103 marketplace. Private, authenticated, SSH, file, or external local Git104 sources remain explicit user-terminal workflows.1052. Validate before install or update and inspect the returned id, version,106 source posture, content digest, and skill digest.1073. Install inactive first, then inspect the registry result. Activate only when108 the user explicitly requested that exact validated id and version.1094. Use only `manage_investment_brain`; its lifecycle mutations are110 proof-protected. Never edit111 registry, package, projection, generated index, or Head Manager config files112 directly. Select one exact action and only its matching fields:113114 ```text115 action=list [active_only]116 action=inspect brain_id=<investment-brain-id>117 action=validate local_source=<source-directory>118 action=validate git_source=<public-https-url> [ref=<ref>]119 action=install local_source=<source-directory>120 action=install git_source=<public-https-url> [ref=<ref>]121 action=update brain_id=<investment-brain-id> [local_source=<source-directory>|git_source=<public-https-url> ref=<ref>]122 action=activate|deactivate brain_id=<investment-brain-id>123 action=rollback brain_id=<investment-brain-id> [version=<major.minor.patch>]124 action=remove brain_id=<investment-brain-id>125 ```126127 Install always starts inactive. The MCP process owns service access; do not128 reopen the denied TradingCodex runtime or call its Python directly.1291305. Update by publishing a higher immutable version. Never rewrite installed131 bytes under an existing version. Rollback selects an already-installed132 version; remove retains all installed versions for provenance.1336. Return the action, Brain id, selected version, status, validation posture,134 source posture, digests, projection posture, and exact next step. Do not135 expose credentials or absolute external local paths.136137## Hard Stops138139- Do not mutate Decision Memory, Investor Context, a Strategy, or current140 evidence while managing a Brain.141- Do not use `$tcx-build` as a wrapper or use the Brain grant for generic142 workspace maintenance.143- Do not present a Brain as validated investment truth; current authenticated144 evidence can falsify it.145- Do not stage, commit, configure a remote, push, publish, or open a pull146 request unless the user separately requests that Git or publication action.147- Do not approve orders, grant broker authority, change policy, submit, cancel,148 or execute through this skill.