tradingcodex 0.1.0a1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (254) hide show
  1. tradingcodex-0.1.0a1/CONTRIBUTING.md +62 -0
  2. tradingcodex-0.1.0a1/LICENSE +202 -0
  3. tradingcodex-0.1.0a1/MANIFEST.in +11 -0
  4. tradingcodex-0.1.0a1/NOTICE +24 -0
  5. tradingcodex-0.1.0a1/PKG-INFO +204 -0
  6. tradingcodex-0.1.0a1/README.md +179 -0
  7. tradingcodex-0.1.0a1/TRADEMARKS.md +58 -0
  8. tradingcodex-0.1.0a1/apps/__init__.py +1 -0
  9. tradingcodex-0.1.0a1/apps/audit/__init__.py +1 -0
  10. tradingcodex-0.1.0a1/apps/audit/admin.py +11 -0
  11. tradingcodex-0.1.0a1/apps/audit/apps.py +8 -0
  12. tradingcodex-0.1.0a1/apps/audit/migrations/0001_initial.py +35 -0
  13. tradingcodex-0.1.0a1/apps/audit/migrations/__init__.py +0 -0
  14. tradingcodex-0.1.0a1/apps/audit/models.py +22 -0
  15. tradingcodex-0.1.0a1/apps/harness/__init__.py +1 -0
  16. tradingcodex-0.1.0a1/apps/harness/admin.py +52 -0
  17. tradingcodex-0.1.0a1/apps/harness/apps.py +8 -0
  18. tradingcodex-0.1.0a1/apps/harness/migrations/0001_initial.py +68 -0
  19. tradingcodex-0.1.0a1/apps/harness/migrations/__init__.py +0 -0
  20. tradingcodex-0.1.0a1/apps/harness/models.py +55 -0
  21. tradingcodex-0.1.0a1/apps/harness/services.py +49 -0
  22. tradingcodex-0.1.0a1/apps/harness/templatetags/__init__.py +1 -0
  23. tradingcodex-0.1.0a1/apps/harness/templatetags/tradingcodex_admin.py +111 -0
  24. tradingcodex-0.1.0a1/apps/integrations/__init__.py +1 -0
  25. tradingcodex-0.1.0a1/apps/integrations/admin.py +24 -0
  26. tradingcodex-0.1.0a1/apps/integrations/apps.py +8 -0
  27. tradingcodex-0.1.0a1/apps/integrations/migrations/0001_initial.py +29 -0
  28. tradingcodex-0.1.0a1/apps/integrations/migrations/__init__.py +0 -0
  29. tradingcodex-0.1.0a1/apps/integrations/models.py +16 -0
  30. tradingcodex-0.1.0a1/apps/integrations/services.py +31 -0
  31. tradingcodex-0.1.0a1/apps/mcp/__init__.py +1 -0
  32. tradingcodex-0.1.0a1/apps/mcp/admin.py +33 -0
  33. tradingcodex-0.1.0a1/apps/mcp/apps.py +8 -0
  34. tradingcodex-0.1.0a1/apps/mcp/migrations/0001_initial.py +57 -0
  35. tradingcodex-0.1.0a1/apps/mcp/migrations/0002_mcptooldefinition_experimental.py +18 -0
  36. tradingcodex-0.1.0a1/apps/mcp/migrations/__init__.py +0 -0
  37. tradingcodex-0.1.0a1/apps/mcp/models.py +45 -0
  38. tradingcodex-0.1.0a1/apps/mcp/services.py +26 -0
  39. tradingcodex-0.1.0a1/apps/orders/__init__.py +1 -0
  40. tradingcodex-0.1.0a1/apps/orders/admin.py +27 -0
  41. tradingcodex-0.1.0a1/apps/orders/apps.py +8 -0
  42. tradingcodex-0.1.0a1/apps/orders/migrations/0001_initial.py +79 -0
  43. tradingcodex-0.1.0a1/apps/orders/migrations/__init__.py +0 -0
  44. tradingcodex-0.1.0a1/apps/orders/models.py +66 -0
  45. tradingcodex-0.1.0a1/apps/orders/services.py +84 -0
  46. tradingcodex-0.1.0a1/apps/policy/__init__.py +1 -0
  47. tradingcodex-0.1.0a1/apps/policy/admin.py +60 -0
  48. tradingcodex-0.1.0a1/apps/policy/apps.py +8 -0
  49. tradingcodex-0.1.0a1/apps/policy/migrations/0001_initial.py +75 -0
  50. tradingcodex-0.1.0a1/apps/policy/migrations/__init__.py +0 -0
  51. tradingcodex-0.1.0a1/apps/policy/models.py +61 -0
  52. tradingcodex-0.1.0a1/apps/policy/services.py +110 -0
  53. tradingcodex-0.1.0a1/apps/portfolio/__init__.py +1 -0
  54. tradingcodex-0.1.0a1/apps/portfolio/admin.py +21 -0
  55. tradingcodex-0.1.0a1/apps/portfolio/apps.py +8 -0
  56. tradingcodex-0.1.0a1/apps/portfolio/migrations/0001_initial.py +67 -0
  57. tradingcodex-0.1.0a1/apps/portfolio/migrations/__init__.py +0 -0
  58. tradingcodex-0.1.0a1/apps/portfolio/models.py +53 -0
  59. tradingcodex-0.1.0a1/apps/research/__init__.py +1 -0
  60. tradingcodex-0.1.0a1/apps/research/admin.py +42 -0
  61. tradingcodex-0.1.0a1/apps/research/apps.py +8 -0
  62. tradingcodex-0.1.0a1/apps/research/migrations/0001_initial.py +99 -0
  63. tradingcodex-0.1.0a1/apps/research/migrations/__init__.py +0 -0
  64. tradingcodex-0.1.0a1/apps/research/models.py +85 -0
  65. tradingcodex-0.1.0a1/apps/universes/__init__.py +1 -0
  66. tradingcodex-0.1.0a1/apps/universes/admin.py +10 -0
  67. tradingcodex-0.1.0a1/apps/universes/apps.py +8 -0
  68. tradingcodex-0.1.0a1/apps/universes/migrations/0001_initial.py +29 -0
  69. tradingcodex-0.1.0a1/apps/universes/migrations/__init__.py +0 -0
  70. tradingcodex-0.1.0a1/apps/universes/models.py +16 -0
  71. tradingcodex-0.1.0a1/apps/workflows/__init__.py +1 -0
  72. tradingcodex-0.1.0a1/apps/workflows/admin.py +17 -0
  73. tradingcodex-0.1.0a1/apps/workflows/apps.py +8 -0
  74. tradingcodex-0.1.0a1/apps/workflows/migrations/0001_initial.py +50 -0
  75. tradingcodex-0.1.0a1/apps/workflows/migrations/__init__.py +0 -0
  76. tradingcodex-0.1.0a1/apps/workflows/models.py +36 -0
  77. tradingcodex-0.1.0a1/assets/tradingcodex-banner.svg +18 -0
  78. tradingcodex-0.1.0a1/docs/README.md +40 -0
  79. tradingcodex-0.1.0a1/docs/core-concepts-and-rules.md +267 -0
  80. tradingcodex-0.1.0a1/docs/deployment.md +182 -0
  81. tradingcodex-0.1.0a1/docs/licensing-and-commercialization.md +83 -0
  82. tradingcodex-0.1.0a1/docs/tradingcodex-prd.md +531 -0
  83. tradingcodex-0.1.0a1/pyproject.toml +55 -0
  84. tradingcodex-0.1.0a1/setup.cfg +4 -0
  85. tradingcodex-0.1.0a1/static/tradingcodex_admin/admin.css +1113 -0
  86. tradingcodex-0.1.0a1/static/tradingcodex_admin/favicon.svg +7 -0
  87. tradingcodex-0.1.0a1/static/tradingcodex_web/app.css +1526 -0
  88. tradingcodex-0.1.0a1/static/vendor/alpine/alpine.min.js +5 -0
  89. tradingcodex-0.1.0a1/static/vendor/htmx/htmx.min.js +1 -0
  90. tradingcodex-0.1.0a1/tests/test_python_migration.py +819 -0
  91. tradingcodex-0.1.0a1/tradingcodex.egg-info/PKG-INFO +204 -0
  92. tradingcodex-0.1.0a1/tradingcodex.egg-info/SOURCES.txt +252 -0
  93. tradingcodex-0.1.0a1/tradingcodex.egg-info/dependency_links.txt +1 -0
  94. tradingcodex-0.1.0a1/tradingcodex.egg-info/entry_points.txt +2 -0
  95. tradingcodex-0.1.0a1/tradingcodex.egg-info/requires.txt +6 -0
  96. tradingcodex-0.1.0a1/tradingcodex.egg-info/top_level.txt +4 -0
  97. tradingcodex-0.1.0a1/tradingcodex_cli/__init__.py +1 -0
  98. tradingcodex-0.1.0a1/tradingcodex_cli/__main__.py +120 -0
  99. tradingcodex-0.1.0a1/tradingcodex_cli/generator.py +209 -0
  100. tradingcodex-0.1.0a1/tradingcodex_cli/mcp_stdio.py +26 -0
  101. tradingcodex-0.1.0a1/tradingcodex_cli/service_autostart.py +75 -0
  102. tradingcodex-0.1.0a1/tradingcodex_cli/workspace.py +782 -0
  103. tradingcodex-0.1.0a1/tradingcodex_service/__init__.py +3 -0
  104. tradingcodex-0.1.0a1/tradingcodex_service/admin.py +7 -0
  105. tradingcodex-0.1.0a1/tradingcodex_service/api.py +303 -0
  106. tradingcodex-0.1.0a1/tradingcodex_service/asgi.py +6 -0
  107. tradingcodex-0.1.0a1/tradingcodex_service/domain.py +1797 -0
  108. tradingcodex-0.1.0a1/tradingcodex_service/mcp_http.py +59 -0
  109. tradingcodex-0.1.0a1/tradingcodex_service/mcp_runtime.py +507 -0
  110. tradingcodex-0.1.0a1/tradingcodex_service/settings.py +92 -0
  111. tradingcodex-0.1.0a1/tradingcodex_service/templates/admin/base_site.html +35 -0
  112. tradingcodex-0.1.0a1/tradingcodex_service/templates/admin/index.html +242 -0
  113. tradingcodex-0.1.0a1/tradingcodex_service/templates/admin/login.html +56 -0
  114. tradingcodex-0.1.0a1/tradingcodex_service/templates/web/activity.html +33 -0
  115. tradingcodex-0.1.0a1/tradingcodex_service/templates/web/base.html +93 -0
  116. tradingcodex-0.1.0a1/tradingcodex_service/templates/web/dashboard.html +99 -0
  117. tradingcodex-0.1.0a1/tradingcodex_service/templates/web/fragments/role_inspector.html +66 -0
  118. tradingcodex-0.1.0a1/tradingcodex_service/templates/web/fragments/starter_prompt.html +24 -0
  119. tradingcodex-0.1.0a1/tradingcodex_service/templates/web/fragments/topology_canvas.html +79 -0
  120. tradingcodex-0.1.0a1/tradingcodex_service/templates/web/harness.html +48 -0
  121. tradingcodex-0.1.0a1/tradingcodex_service/templates/web/orders.html +77 -0
  122. tradingcodex-0.1.0a1/tradingcodex_service/templates/web/policy.html +80 -0
  123. tradingcodex-0.1.0a1/tradingcodex_service/templates/web/portfolio.html +61 -0
  124. tradingcodex-0.1.0a1/tradingcodex_service/templates/web/research.html +52 -0
  125. tradingcodex-0.1.0a1/tradingcodex_service/templates/web/starter_prompt.html +49 -0
  126. tradingcodex-0.1.0a1/tradingcodex_service/urls.py +26 -0
  127. tradingcodex-0.1.0a1/tradingcodex_service/web.py +243 -0
  128. tradingcodex-0.1.0a1/tradingcodex_service/wsgi.py +6 -0
  129. tradingcodex-0.1.0a1/workspace_templates/__init__.py +1 -0
  130. tradingcodex-0.1.0a1/workspace_templates/modules/audit/files/.tradingcodex/audit/README.md +5 -0
  131. tradingcodex-0.1.0a1/workspace_templates/modules/audit/files/trading/audit/.gitkeep +1 -0
  132. tradingcodex-0.1.0a1/workspace_templates/modules/audit/module.json +16 -0
  133. tradingcodex-0.1.0a1/workspace_templates/modules/codex-base/files/.codex/config.toml +356 -0
  134. tradingcodex-0.1.0a1/workspace_templates/modules/codex-base/files/.codex/hooks/tradingcodex_hook.py +139 -0
  135. tradingcodex-0.1.0a1/workspace_templates/modules/codex-base/files/.codex/hooks.json +105 -0
  136. tradingcodex-0.1.0a1/workspace_templates/modules/codex-base/files/.codex/rules/tradingcodex.rules +50 -0
  137. tradingcodex-0.1.0a1/workspace_templates/modules/codex-base/files/.tradingcodex/capabilities.yaml +56 -0
  138. tradingcodex-0.1.0a1/workspace_templates/modules/codex-base/files/.tradingcodex/cli.py +16 -0
  139. tradingcodex-0.1.0a1/workspace_templates/modules/codex-base/files/.tradingcodex/config.yaml +68 -0
  140. tradingcodex-0.1.0a1/workspace_templates/modules/codex-base/files/.tradingcodex/integrations/openbb-mcp.safe-profile.md +61 -0
  141. tradingcodex-0.1.0a1/workspace_templates/modules/codex-base/files/.tradingcodex/policies/policy-bindings.yaml +16 -0
  142. tradingcodex-0.1.0a1/workspace_templates/modules/codex-base/files/.tradingcodex/policies/principals.yaml +17 -0
  143. tradingcodex-0.1.0a1/workspace_templates/modules/codex-base/files/.tradingcodex/policies/roles.yaml +27 -0
  144. tradingcodex-0.1.0a1/workspace_templates/modules/codex-base/files/AGENTS.md +46 -0
  145. tradingcodex-0.1.0a1/workspace_templates/modules/codex-base/files/pyproject.toml +13 -0
  146. tradingcodex-0.1.0a1/workspace_templates/modules/codex-base/files/tcx +7 -0
  147. tradingcodex-0.1.0a1/workspace_templates/modules/codex-base/module.json +17 -0
  148. tradingcodex-0.1.0a1/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/policies/access-policies.yaml +39 -0
  149. tradingcodex-0.1.0a1/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/policies/restricted-list.yaml +6 -0
  150. tradingcodex-0.1.0a1/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/approval_receipt.schema.json +14 -0
  151. tradingcodex-0.1.0a1/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/audit_event.schema.json +11 -0
  152. tradingcodex-0.1.0a1/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/evidence_pack.schema.json +16 -0
  153. tradingcodex-0.1.0a1/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/execution_result.schema.json +12 -0
  154. tradingcodex-0.1.0a1/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/fundamental_report.schema.json +15 -0
  155. tradingcodex-0.1.0a1/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/news_report.schema.json +15 -0
  156. tradingcodex-0.1.0a1/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/order_intent.schema.json +30 -0
  157. tradingcodex-0.1.0a1/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/portfolio_review.schema.json +15 -0
  158. tradingcodex-0.1.0a1/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/postmortem_report.schema.json +14 -0
  159. tradingcodex-0.1.0a1/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/risk_report.schema.json +15 -0
  160. tradingcodex-0.1.0a1/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/technical_report.schema.json +15 -0
  161. tradingcodex-0.1.0a1/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/thesis.schema.json +15 -0
  162. tradingcodex-0.1.0a1/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/valuation.schema.json +15 -0
  163. tradingcodex-0.1.0a1/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/scripts/validate-order-intent.py +15 -0
  164. tradingcodex-0.1.0a1/workspace_templates/modules/enforcement-guardrails/module.json +19 -0
  165. tradingcodex-0.1.0a1/workspace_templates/modules/fixed-subagents/files/.codex/agents/execution-operator.toml +70 -0
  166. tradingcodex-0.1.0a1/workspace_templates/modules/fixed-subagents/files/.codex/agents/fundamental-analyst.toml +61 -0
  167. tradingcodex-0.1.0a1/workspace_templates/modules/fixed-subagents/files/.codex/agents/instrument-analyst.toml +63 -0
  168. tradingcodex-0.1.0a1/workspace_templates/modules/fixed-subagents/files/.codex/agents/macro-analyst.toml +63 -0
  169. tradingcodex-0.1.0a1/workspace_templates/modules/fixed-subagents/files/.codex/agents/news-analyst.toml +62 -0
  170. tradingcodex-0.1.0a1/workspace_templates/modules/fixed-subagents/files/.codex/agents/portfolio-manager.toml +61 -0
  171. tradingcodex-0.1.0a1/workspace_templates/modules/fixed-subagents/files/.codex/agents/risk-manager.toml +64 -0
  172. tradingcodex-0.1.0a1/workspace_templates/modules/fixed-subagents/files/.codex/agents/technical-analyst.toml +62 -0
  173. tradingcodex-0.1.0a1/workspace_templates/modules/fixed-subagents/files/.codex/agents/valuation-analyst.toml +58 -0
  174. tradingcodex-0.1.0a1/workspace_templates/modules/fixed-subagents/files/.tradingcodex/mainagent/head-manager.yaml +67 -0
  175. tradingcodex-0.1.0a1/workspace_templates/modules/fixed-subagents/files/.tradingcodex/mainagent/skill-change-proposals/.gitkeep +1 -0
  176. tradingcodex-0.1.0a1/workspace_templates/modules/fixed-subagents/files/.tradingcodex/mainagent/subagent-registry.yaml +56 -0
  177. tradingcodex-0.1.0a1/workspace_templates/modules/fixed-subagents/module.json +23 -0
  178. tradingcodex-0.1.0a1/workspace_templates/modules/guidance-guardrails/files/.tradingcodex/guidance/guardrails.md +15 -0
  179. tradingcodex-0.1.0a1/workspace_templates/modules/guidance-guardrails/files/.tradingcodex/guidance/task-quality-checklist.md +35 -0
  180. tradingcodex-0.1.0a1/workspace_templates/modules/guidance-guardrails/module.json +18 -0
  181. tradingcodex-0.1.0a1/workspace_templates/modules/information-barriers/files/.tradingcodex/policies/information-barriers.yaml +211 -0
  182. tradingcodex-0.1.0a1/workspace_templates/modules/information-barriers/files/.tradingcodex/secrets.md +9 -0
  183. tradingcodex-0.1.0a1/workspace_templates/modules/information-barriers/files/trading/approvals/.gitkeep +1 -0
  184. tradingcodex-0.1.0a1/workspace_templates/modules/information-barriers/files/trading/market-data/.gitkeep +1 -0
  185. tradingcodex-0.1.0a1/workspace_templates/modules/information-barriers/files/trading/orders/approved/.gitkeep +1 -0
  186. tradingcodex-0.1.0a1/workspace_templates/modules/information-barriers/files/trading/orders/draft/.gitkeep +1 -0
  187. tradingcodex-0.1.0a1/workspace_templates/modules/information-barriers/files/trading/orders/executed/.gitkeep +1 -0
  188. tradingcodex-0.1.0a1/workspace_templates/modules/information-barriers/files/trading/orders/rejected/.gitkeep +1 -0
  189. tradingcodex-0.1.0a1/workspace_templates/modules/information-barriers/files/trading/portfolio/.gitkeep +1 -0
  190. tradingcodex-0.1.0a1/workspace_templates/modules/information-barriers/files/trading/reports/fundamental/.gitkeep +1 -0
  191. tradingcodex-0.1.0a1/workspace_templates/modules/information-barriers/files/trading/reports/instrument/.gitkeep +1 -0
  192. tradingcodex-0.1.0a1/workspace_templates/modules/information-barriers/files/trading/reports/macro/.gitkeep +1 -0
  193. tradingcodex-0.1.0a1/workspace_templates/modules/information-barriers/files/trading/reports/news/.gitkeep +1 -0
  194. tradingcodex-0.1.0a1/workspace_templates/modules/information-barriers/files/trading/reports/policy/.gitkeep +1 -0
  195. tradingcodex-0.1.0a1/workspace_templates/modules/information-barriers/files/trading/reports/portfolio/.gitkeep +1 -0
  196. tradingcodex-0.1.0a1/workspace_templates/modules/information-barriers/files/trading/reports/postmortem/.gitkeep +1 -0
  197. tradingcodex-0.1.0a1/workspace_templates/modules/information-barriers/files/trading/reports/risk/.gitkeep +1 -0
  198. tradingcodex-0.1.0a1/workspace_templates/modules/information-barriers/files/trading/reports/technical/.gitkeep +1 -0
  199. tradingcodex-0.1.0a1/workspace_templates/modules/information-barriers/files/trading/reports/valuation/.gitkeep +1 -0
  200. tradingcodex-0.1.0a1/workspace_templates/modules/information-barriers/files/trading/research/.gitkeep +1 -0
  201. tradingcodex-0.1.0a1/workspace_templates/modules/information-barriers/module.json +19 -0
  202. tradingcodex-0.1.0a1/workspace_templates/modules/paper-trading/files/.tradingcodex/mcp/adapters/paper-trading.py +4 -0
  203. tradingcodex-0.1.0a1/workspace_templates/modules/paper-trading/module.json +16 -0
  204. tradingcodex-0.1.0a1/workspace_templates/modules/postmortem/files/.tradingcodex/workflows/postmortem.yaml +12 -0
  205. tradingcodex-0.1.0a1/workspace_templates/modules/postmortem/module.json +16 -0
  206. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/approve-order/SKILL.md +38 -0
  207. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/approve-order/agents/openai.yaml +6 -0
  208. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/collect-evidence/SKILL.md +46 -0
  209. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/collect-evidence/agents/openai.yaml +6 -0
  210. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/create-order-intent/SKILL.md +46 -0
  211. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/create-order-intent/agents/openai.yaml +6 -0
  212. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/execute-paper-order/SKILL.md +35 -0
  213. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/execute-paper-order/agents/openai.yaml +6 -0
  214. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/external-data-source-gate/SKILL.md +76 -0
  215. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/fundamental-analysis/SKILL.md +46 -0
  216. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/fundamental-analysis/agents/openai.yaml +6 -0
  217. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/head-manager-interview/SKILL.md +81 -0
  218. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/head-manager-interview/agents/openai.yaml +6 -0
  219. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/head-manager-interview/references/investor-profile-reference.md +50 -0
  220. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/instrument-analysis/SKILL.md +40 -0
  221. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/instrument-analysis/agents/openai.yaml +6 -0
  222. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/investment-workflow-map/SKILL.md +100 -0
  223. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/investment-workflow-map/agents/openai.yaml +6 -0
  224. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/macro-analysis/SKILL.md +40 -0
  225. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/macro-analysis/agents/openai.yaml +6 -0
  226. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/manage-subagents/SKILL.md +119 -0
  227. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/news-analysis/SKILL.md +43 -0
  228. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/news-analysis/agents/openai.yaml +6 -0
  229. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/orchestrate-workflow/SKILL.md +290 -0
  230. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/orchestrate-workflow/agents/openai.yaml +6 -0
  231. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/policy-review/SKILL.md +43 -0
  232. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/policy-review/agents/openai.yaml +6 -0
  233. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/portfolio-review/SKILL.md +44 -0
  234. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/portfolio-review/agents/openai.yaml +6 -0
  235. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/postmortem/SKILL.md +31 -0
  236. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/review-risk/SKILL.md +45 -0
  237. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/review-risk/agents/openai.yaml +6 -0
  238. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/scenario-quality-gates/SKILL.md +126 -0
  239. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/synthesize-decision/SKILL.md +45 -0
  240. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/synthesize-decision/agents/openai.yaml +6 -0
  241. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/technical-analysis/SKILL.md +43 -0
  242. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/technical-analysis/agents/openai.yaml +6 -0
  243. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/valuation-review/SKILL.md +47 -0
  244. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.agents/skills/valuation-review/agents/openai.yaml +6 -0
  245. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/files/.tradingcodex/mainagent/head-manager-interview.md +97 -0
  246. tradingcodex-0.1.0a1/workspace_templates/modules/repo-skills/module.json +36 -0
  247. tradingcodex-0.1.0a1/workspace_templates/modules/stub-execution/files/.tradingcodex/mcp/adapters/stub-execution.py +4 -0
  248. tradingcodex-0.1.0a1/workspace_templates/modules/stub-execution/module.json +15 -0
  249. tradingcodex-0.1.0a1/workspace_templates/modules/tradingcodex-mcp/files/.tradingcodex/mcp/adapters/live-adapter.contract.md +25 -0
  250. tradingcodex-0.1.0a1/workspace_templates/modules/tradingcodex-mcp/files/.tradingcodex/mcp/enforcer/README.md +5 -0
  251. tradingcodex-0.1.0a1/workspace_templates/modules/tradingcodex-mcp/files/.tradingcodex/mcp/gateway/README.md +8 -0
  252. tradingcodex-0.1.0a1/workspace_templates/modules/tradingcodex-mcp/files/.tradingcodex/mcp/server.py +27 -0
  253. tradingcodex-0.1.0a1/workspace_templates/modules/tradingcodex-mcp/files/.tradingcodex/mcp/smoke-call.py +18 -0
  254. tradingcodex-0.1.0a1/workspace_templates/modules/tradingcodex-mcp/module.json +24 -0
@@ -0,0 +1,62 @@
1
+ # Contributing to TradingCodex
2
+
3
+ TradingCodex is an Apache-2.0 open-core project. The core repository is meant
4
+ to be easy to study, fork, extend, and use commercially, while official
5
+ commercial offerings, hosted services, verified adapters, enterprise packs,
6
+ and TradingCodex marks may be governed by separate terms.
7
+
8
+ ## License of Contributions
9
+
10
+ Unless explicitly agreed otherwise in writing, every contribution intentionally
11
+ submitted for inclusion in this repository is submitted under the Apache
12
+ License, Version 2.0.
13
+
14
+ TradingCodex uses an inbound-equals-outbound contribution model: by
15
+ contributing, you agree that your contribution can be distributed under the
16
+ same Apache-2.0 license used by the project.
17
+
18
+ ## Developer Certificate of Origin
19
+
20
+ Contributors must certify that they have the right to submit their work by
21
+ using the Developer Certificate of Origin 1.1 (DCO):
22
+
23
+ https://developercertificate.org/
24
+
25
+ Add a sign-off line to every commit:
26
+
27
+ ```text
28
+ Signed-off-by: Your Name <you@example.com>
29
+ ```
30
+
31
+ Git can add it automatically:
32
+
33
+ ```bash
34
+ git commit -s
35
+ ```
36
+
37
+ ## Product and Safety Rules
38
+
39
+ Before changing product rules, generated workspace behavior, subagent roles,
40
+ guardrails, MCP tools, policy behavior, Admin operations, or execution flows,
41
+ read the docs in `docs/` and update the relevant docs in the same change.
42
+
43
+ Important boundaries:
44
+
45
+ - Live broker adapters are not part of the open core unless explicitly added
46
+ by a future product decision.
47
+ - Do not commit broker API keys, credentials, tokens, private account data, or
48
+ other secrets.
49
+ - Executable trading actions must continue to flow through TradingCodex
50
+ service-layer policy, approval, adapter, and audit checks.
51
+ - Public equity is the deepest first investing sleeve, but changes should
52
+ preserve the broader multi-asset direction.
53
+
54
+ ## Trademarks and Commercial Use
55
+
56
+ The Apache-2.0 license grants copyright and patent permissions for the code.
57
+ It does not grant rights to use TradingCodex names, logos, or official product
58
+ branding. See `TRADEMARKS.md`.
59
+
60
+ Forks and integrations are welcome, but they should avoid implying that they
61
+ are official TradingCodex distributions, hosted services, or verified adapters
62
+ unless the project maintainer has granted written permission.
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,11 @@
1
+ include LICENSE
2
+ include NOTICE
3
+ include CONTRIBUTING.md
4
+ include TRADEMARKS.md
5
+ recursive-include assets *
6
+ recursive-include docs *
7
+ recursive-include workspace_templates *
8
+ recursive-include workspace_templates .*
9
+ recursive-include tradingcodex_service/templates *
10
+ recursive-include static *
11
+ global-exclude *.py[cod]
@@ -0,0 +1,24 @@
1
+ TradingCodex
2
+ Copyright 2026 TradingCodex Authors
3
+
4
+ This product includes software developed by the TradingCodex project.
5
+
6
+ Unless a file, directory, or separately distributed artifact states otherwise,
7
+ the source code, generated workspace templates, and project documentation in
8
+ this repository are licensed under the Apache License, Version 2.0.
9
+
10
+ The name "TradingCodex", future TradingCodex logos, and other TradingCodex
11
+ project marks are trademarks or service marks of their respective owners.
12
+ The Apache License, Version 2.0 does not grant trademark rights. See
13
+ TRADEMARKS.md for project trademark guidance.
14
+
15
+ Generated workspaces are scaffolds copied from this repository. The copied
16
+ TradingCodex scaffold files remain under the repository license unless marked
17
+ otherwise. User-created research notes, portfolio data, order artifacts,
18
+ configuration secrets, and other user-provided content remain owned by the
19
+ user unless the user separately chooses to license them.
20
+
21
+ Hosted services, managed deployments, verified broker or market-data adapters,
22
+ enterprise policy packs, compliance packs, support agreements, and other
23
+ official commercial offerings may be distributed under separate commercial
24
+ terms.
@@ -0,0 +1,204 @@
1
+ Metadata-Version: 2.4
2
+ Name: tradingcodex
3
+ Version: 0.1.0a1
4
+ Summary: Codex-native trading harness with a Django service plane and MCP execution boundary.
5
+ Author: TradingCodex Authors
6
+ License-Expression: Apache-2.0
7
+ Keywords: trading,django,codex,mcp,portfolio,research
8
+ Classifier: Development Status :: 2 - Pre-Alpha
9
+ Classifier: Framework :: Django
10
+ Classifier: Framework :: Django :: 5.2
11
+ Classifier: Intended Audience :: Financial and Insurance Industry
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.14
14
+ Classifier: Topic :: Office/Business :: Financial :: Investment
15
+ Requires-Python: <3.15,>=3.14
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ License-File: NOTICE
19
+ Requires-Dist: django<5.3,>=5.2
20
+ Requires-Dist: django-ninja<2,>=1.4
21
+ Requires-Dist: pydantic>=2
22
+ Provides-Extra: dev
23
+ Requires-Dist: pytest>=8; extra == "dev"
24
+ Dynamic: license-file
25
+
26
+ <p align="center">
27
+ <img src="assets/tradingcodex-banner.svg" alt="TradingCodex" width="100%">
28
+ </p>
29
+
30
+ <div align="center">
31
+ <a href="https://github.com/monarchjuno/tradingcodex/actions/workflows/ci.yml"><img alt="CI" src="https://img.shields.io/github/actions/workflow/status/monarchjuno/tradingcodex/ci.yml?branch=main&label=CI"></a>
32
+ <a href="https://github.com/monarchjuno/tradingcodex/releases"><img alt="Release" src="https://img.shields.io/github/v/release/monarchjuno/tradingcodex?include_prereleases&label=release"></a>
33
+ <a href="https://pypi.org/project/tradingcodex/"><img alt="PyPI" src="https://img.shields.io/pypi/v/tradingcodex?label=PyPI"></a>
34
+ <a href="LICENSE"><img alt="License" src="https://img.shields.io/badge/license-Apache--2.0-blue"></a>
35
+ <img alt="Python" src="https://img.shields.io/badge/python-3.14-3776AB?logo=python&logoColor=white">
36
+ </div>
37
+
38
+ <div align="center">
39
+ <a href="#quick-start">Quick Start</a> |
40
+ <a href="#agent-topology">Agent Topology</a> |
41
+ <a href="#architecture">Architecture</a> |
42
+ <a href="#execution-boundary">Execution Boundary</a> |
43
+ <a href="#documentation">Documentation</a>
44
+ </div>
45
+
46
+ ---
47
+
48
+ # TradingCodex: Codex-Native Trading Harness
49
+
50
+ TradingCodex is a Codex-native trading harness for investors who want
51
+ agent-assisted research, role separation, workflow discipline, and deterministic
52
+ execution guardrails in one local-first system.
53
+
54
+ It is not an autonomous trading bot. Codex coordinates the workflow, Django owns
55
+ the durable service layer, and TradingCodex MCP is the execution boundary.
56
+
57
+ ## Quick Start
58
+
59
+ ```bash
60
+ python3.14 -m pip install tradingcodex
61
+ tcx init ./workspace --force
62
+ cd ./workspace
63
+ ./tcx doctor
64
+ ```
65
+
66
+ Start an orchestrated Codex workflow from the generated workspace:
67
+
68
+ ```text
69
+ $orchestrate-workflow analyze Apple with public equity research, valuation, portfolio, and risk review
70
+ ```
71
+
72
+ Open the workspace in Codex and trust the project. The generated project MCP
73
+ config starts TradingCodex MCP and the local dashboard service together.
74
+
75
+ After Codex connects, open:
76
+
77
+ - `http://127.0.0.1:8000/` for the visual harness dashboard
78
+ - `http://127.0.0.1:8000/admin/` for the Django operations console
79
+
80
+ For CLI-only use outside Codex, the dashboard can still be started manually:
81
+
82
+ ```bash
83
+ ./tcx service runserver
84
+ ```
85
+
86
+ Inspect the local MCP surface:
87
+
88
+ ```bash
89
+ printf '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}\n' | ./tcx mcp stdio
90
+ ```
91
+
92
+ Create and search DB-backed research memory:
93
+
94
+ ```bash
95
+ ./tcx research create --markdown-file note.md --id note-1 --title "Research Note"
96
+ ./tcx research search "gross margin"
97
+ ./tcx research export note-1
98
+ ```
99
+
100
+ ## Agent Topology
101
+
102
+ | Layer | Agent | Role summary |
103
+ | --- | --- | --- |
104
+ | Main agent | `head-manager` | Dispatches specialist roles, preserves constraints, and synthesizes completed artifacts. |
105
+ | Analysis subagent | `fundamental-analyst` | Reviews business quality, financial evidence, company fundamentals, and source claims. |
106
+ | Analysis subagent | `technical-analyst` | Reviews price action, trend structure, levels, and market behavior. |
107
+ | Analysis subagent | `news-analyst` | Tracks news, catalysts, events, and freshness-sensitive context. |
108
+ | Market-context subagent | `macro-analyst` | Covers macro, rates, FX, commodities, policy, and cross-asset context. |
109
+ | Market-context subagent | `instrument-analyst` | Supports ETF/index, options, crypto market structure, and instrument-level work. |
110
+ | Decision-review subagent | `valuation-analyst` | Reviews valuation assumptions, sensitivity, and decision-quality gaps. |
111
+ | Portfolio subagent | `portfolio-manager` | Reviews portfolio fit, sizing, exposure, and draft order readiness. |
112
+ | Risk subagent | `risk-manager` | Reviews downside, policy constraints, restricted lists, and approval readiness. |
113
+ | Execution subagent | `execution-operator` | Handles approved paper/stub execution through TradingCodex MCP only. |
114
+
115
+ The default generated workspace includes one `head-manager` and nine fixed
116
+ subagents. The main agent coordinates; specialist agents produce the actual
117
+ role work.
118
+
119
+ ## Architecture
120
+
121
+ TradingCodex separates the local harness into three planes plus one execution
122
+ boundary:
123
+
124
+ | Plane | Owns | Interfaces and artifacts |
125
+ | --- | --- | --- |
126
+ | Codex control plane | Generated workspace instructions, project `.codex` config, role agents, hooks, and workflow routing. | Codex workspace files, role prompts, and human-readable `trading/*` exports. |
127
+ | MCP execution boundary | Role tool allowlists, input schemas, policy checks, approval checks, idempotency, and MCP call audit. | TradingCodex MCP tools exposed to allowed roles only. |
128
+ | Django service plane | Research memory, policy, orders, approvals, portfolio state, audit, Admin, API, and local web dashboard. | Shared service functions used by CLI, Admin, API, web, and MCP. |
129
+ | Adapter boundary | Paper/stub execution adapters for local harness validation. | Live broker adapters are excluded from the initial core. |
130
+
131
+ Executable actions flow through:
132
+
133
+ | Step | Meaning |
134
+ | --- | --- |
135
+ | `principal` | The caller identity and role capability. |
136
+ | `capability` | The requested action and permitted role surface. |
137
+ | `policy` | Restricted-list, limit, and execution-policy validation. |
138
+ | `schema` | Typed input validation before service-layer mutation. |
139
+ | `approval/idempotency` | Approval receipt and duplicate-submit protection. |
140
+ | `adapter` | Paper/stub adapter submission. |
141
+ | `audit` | Durable ledger record for the attempt and result. |
142
+
143
+ The central runtime DB defaults to:
144
+
145
+ ```text
146
+ ~/.tradingcodex/state/tradingcodex.sqlite3
147
+ ```
148
+
149
+ Generated workspaces are clients and provenance sources. They do not own
150
+ canonical investment state.
151
+
152
+ ## Execution Boundary
153
+
154
+ TradingCodex treats executable actions as a service-layer lifecycle:
155
+
156
+ ```text
157
+ principal -> capability -> policy -> schema -> approval/idempotency -> adapter -> audit
158
+ ```
159
+
160
+ Important boundaries:
161
+
162
+ - Product web routes do not spawn agents, create approvals, or submit
163
+ executions.
164
+ - REST/Admin/CLI/MCP call shared Django service functions.
165
+ - Role MCP allowlists are narrow: `head-manager` cannot submit orders,
166
+ `risk-manager` owns approvals, and `execution-operator` owns execution calls.
167
+ - Paper/stub execution remains experimental.
168
+ - Live broker adapters are not shipped in the initial core.
169
+ - Raw broker secrets must not be stored in this repository or generated
170
+ workspaces.
171
+
172
+ TradingCodex is research, workflow, and execution-guardrail tooling. It is not
173
+ financial, investment, legal, tax, or regulatory advice, and it does not provide
174
+ investment recommendations or guarantee returns.
175
+
176
+ ## Supported Workflow Scope
177
+
178
+ Public equity is the first deeply specified sleeve. The harness is designed to
179
+ extend across ETF/index, public crypto market, macro/rates/FX/commodities,
180
+ options, credit-signal, and cross-asset workflows when the required data source,
181
+ role workflow, and policy boundary exist.
182
+
183
+ ## Documentation
184
+
185
+ - [Docs index](docs/README.md)
186
+ - [TradingCodex PRD](docs/tradingcodex-prd.md)
187
+ - [Core concepts and rules](docs/core-concepts-and-rules.md)
188
+ - [Deployment](docs/deployment.md)
189
+ - [Licensing and commercialization](docs/licensing-and-commercialization.md)
190
+
191
+ ## Contributing
192
+
193
+ Contributions use Apache-2.0 with DCO sign-off. See
194
+ [CONTRIBUTING.md](CONTRIBUTING.md).
195
+
196
+ ## License
197
+
198
+ TradingCodex is an Apache-2.0 open-core project.
199
+
200
+ Source code, generated workspace templates, and project documentation are
201
+ licensed under the Apache License, Version 2.0 unless marked otherwise. The
202
+ TradingCodex name, future logos, and official product marks are not granted by
203
+ the code license. See [LICENSE](LICENSE), [NOTICE](NOTICE), and
204
+ [TRADEMARKS.md](TRADEMARKS.md).