tradingcodex 0.1.0a7__tar.gz → 0.2.0__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 (372) hide show
  1. tradingcodex-0.2.0/PKG-INFO +344 -0
  2. tradingcodex-0.2.0/README.md +316 -0
  3. tradingcodex-0.2.0/apps/audit/admin.py +6 -0
  4. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/audit/migrations/0001_initial.py +1 -1
  5. tradingcodex-0.2.0/apps/harness/admin.py +6 -0
  6. tradingcodex-0.2.0/apps/harness/migrations/0001_initial.py +35 -0
  7. tradingcodex-0.2.0/apps/harness/models.py +22 -0
  8. tradingcodex-0.2.0/apps/integrations/admin.py +6 -0
  9. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/integrations/migrations/0001_initial.py +1 -1
  10. tradingcodex-0.2.0/apps/integrations/migrations/0002_brokerconnection_brokeraccount_instrumentmap.py +85 -0
  11. tradingcodex-0.2.0/apps/integrations/models.py +97 -0
  12. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/integrations/services.py +1 -1
  13. tradingcodex-0.2.0/apps/mcp/admin.py +20 -0
  14. tradingcodex-0.2.0/apps/mcp/migrations/0001_initial.py +168 -0
  15. tradingcodex-0.2.0/apps/mcp/models.py +154 -0
  16. tradingcodex-0.2.0/apps/mcp/services.py +763 -0
  17. tradingcodex-0.2.0/apps/orders/admin.py +14 -0
  18. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/orders/migrations/0001_initial.py +1 -1
  19. tradingcodex-0.2.0/apps/orders/migrations/0002_approvalreceipt_approved_order_type_and_more.py +184 -0
  20. tradingcodex-0.2.0/apps/orders/migrations/0003_migrate_orderintent_to_orderticket.py +122 -0
  21. tradingcodex-0.2.0/apps/orders/migrations/0004_remove_order_intent_compat_fields.py +60 -0
  22. tradingcodex-0.2.0/apps/orders/models.py +181 -0
  23. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/orders/services.py +32 -9
  24. tradingcodex-0.2.0/apps/policy/admin.py +6 -0
  25. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/policy/migrations/0001_initial.py +1 -1
  26. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/policy/services.py +1 -1
  27. tradingcodex-0.2.0/apps/portfolio/admin.py +13 -0
  28. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/portfolio/migrations/0001_initial.py +1 -1
  29. tradingcodex-0.2.0/apps/portfolio/migrations/0002_brokersyncrun_portfolioledgerevent_reconciliationrun.py +83 -0
  30. tradingcodex-0.2.0/apps/portfolio/models.py +154 -0
  31. tradingcodex-0.2.0/apps/research/admin.py +1 -0
  32. tradingcodex-0.2.0/apps/research/models.py +1 -0
  33. tradingcodex-0.2.0/apps/workflows/admin.py +6 -0
  34. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/workflows/migrations/0001_initial.py +2 -1
  35. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/workflows/models.py +8 -0
  36. tradingcodex-0.2.0/docs/README.md +63 -0
  37. tradingcodex-0.2.0/docs/components.md +72 -0
  38. tradingcodex-0.2.0/docs/core-concepts-and-rules.md +140 -0
  39. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/docs/deployment.md +49 -14
  40. tradingcodex-0.2.0/docs/generated-workspaces.md +338 -0
  41. tradingcodex-0.2.0/docs/guardrails.md +91 -0
  42. tradingcodex-0.2.0/docs/harness.md +117 -0
  43. tradingcodex-0.2.0/docs/improvement-loop.md +111 -0
  44. tradingcodex-0.2.0/docs/interfaces-and-surfaces.md +352 -0
  45. tradingcodex-0.2.0/docs/product-direction.md +130 -0
  46. tradingcodex-0.2.0/docs/research-memory-and-artifacts.md +171 -0
  47. tradingcodex-0.2.0/docs/roles-skills-and-workflows.md +356 -0
  48. tradingcodex-0.2.0/docs/safety-policy-and-execution.md +223 -0
  49. tradingcodex-0.2.0/docs/system-architecture.md +238 -0
  50. tradingcodex-0.2.0/docs/validation-and-test-plan.md +204 -0
  51. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/install.sh +19 -6
  52. tradingcodex-0.2.0/installation.md +126 -0
  53. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/pyproject.toml +6 -3
  54. tradingcodex-0.2.0/static/tradingcodex_web/app.css +2501 -0
  55. tradingcodex-0.2.0/tests/test_broker_center_prd.py +175 -0
  56. tradingcodex-0.2.0/tests/test_e2e_user_scenarios.py +298 -0
  57. tradingcodex-0.2.0/tests/test_python_migration.py +2616 -0
  58. tradingcodex-0.2.0/tradingcodex.egg-info/PKG-INFO +344 -0
  59. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/tradingcodex.egg-info/SOURCES.txt +90 -51
  60. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/tradingcodex.egg-info/requires.txt +3 -0
  61. tradingcodex-0.2.0/tradingcodex_cli/__main__.py +124 -0
  62. tradingcodex-0.2.0/tradingcodex_cli/commands/__init__.py +2 -0
  63. tradingcodex-0.2.0/tradingcodex_cli/commands/bootstrap.py +157 -0
  64. tradingcodex-0.2.0/tradingcodex_cli/commands/db.py +36 -0
  65. tradingcodex-0.2.0/tradingcodex_cli/commands/doctor.py +245 -0
  66. tradingcodex-0.2.0/tradingcodex_cli/commands/mcp.py +296 -0
  67. tradingcodex-0.2.0/tradingcodex_cli/commands/orders.py +86 -0
  68. tradingcodex-0.2.0/tradingcodex_cli/commands/policy.py +21 -0
  69. tradingcodex-0.2.0/tradingcodex_cli/commands/profile.py +110 -0
  70. tradingcodex-0.2.0/tradingcodex_cli/commands/research.py +76 -0
  71. tradingcodex-0.2.0/tradingcodex_cli/commands/skills.py +93 -0
  72. tradingcodex-0.2.0/tradingcodex_cli/commands/strategies.py +67 -0
  73. tradingcodex-0.2.0/tradingcodex_cli/commands/subagents.py +106 -0
  74. tradingcodex-0.2.0/tradingcodex_cli/commands/utils.py +134 -0
  75. tradingcodex-0.2.0/tradingcodex_cli/commands/workspaces.py +53 -0
  76. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/tradingcodex_cli/generator.py +16 -0
  77. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/tradingcodex_cli/mcp_stdio.py +2 -2
  78. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/tradingcodex_cli/service_autostart.py +55 -3
  79. tradingcodex-0.2.0/tradingcodex_service/admin.py +1 -0
  80. tradingcodex-0.2.0/tradingcodex_service/api.py +600 -0
  81. tradingcodex-0.2.0/tradingcodex_service/application/__init__.py +2 -0
  82. tradingcodex-0.2.0/tradingcodex_service/application/agents.py +1533 -0
  83. tradingcodex-0.2.0/tradingcodex_service/application/audit.py +71 -0
  84. tradingcodex-0.2.0/tradingcodex_service/application/brokers.py +733 -0
  85. tradingcodex-0.2.0/tradingcodex_service/application/common.py +129 -0
  86. tradingcodex-0.2.0/tradingcodex_service/application/components.py +333 -0
  87. tradingcodex-0.2.0/tradingcodex_service/application/harness.py +747 -0
  88. tradingcodex-0.2.0/tradingcodex_service/application/markdown_preview.py +179 -0
  89. tradingcodex-0.2.0/tradingcodex_service/application/orders.py +980 -0
  90. tradingcodex-0.2.0/tradingcodex_service/application/policy.py +201 -0
  91. tradingcodex-0.2.0/tradingcodex_service/application/portfolio.py +195 -0
  92. tradingcodex-0.2.0/tradingcodex_service/application/research.py +365 -0
  93. tradingcodex-0.2.0/tradingcodex_service/application/runtime.py +321 -0
  94. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/tradingcodex_service/mcp_http.py +2 -1
  95. tradingcodex-0.2.0/tradingcodex_service/mcp_runtime.py +928 -0
  96. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/tradingcodex_service/settings.py +0 -1
  97. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/tradingcodex_service/templates/web/activity.html +0 -9
  98. tradingcodex-0.2.0/tradingcodex_service/templates/web/agent_skills.html +111 -0
  99. tradingcodex-0.2.0/tradingcodex_service/templates/web/agents.html +121 -0
  100. tradingcodex-0.2.0/tradingcodex_service/templates/web/base.html +150 -0
  101. tradingcodex-0.2.0/tradingcodex_service/templates/web/brokers.html +120 -0
  102. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/tradingcodex_service/templates/web/dashboard.html +39 -29
  103. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/tradingcodex_service/templates/web/fragments/role_inspector.html +15 -0
  104. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/tradingcodex_service/templates/web/fragments/topology_canvas.html +7 -1
  105. tradingcodex-0.2.0/tradingcodex_service/templates/web/harness.html +87 -0
  106. tradingcodex-0.2.0/tradingcodex_service/templates/web/mcp_router.html +268 -0
  107. tradingcodex-0.2.0/tradingcodex_service/templates/web/orders.html +113 -0
  108. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/tradingcodex_service/templates/web/policy.html +16 -15
  109. tradingcodex-0.2.0/tradingcodex_service/templates/web/portfolio.html +81 -0
  110. tradingcodex-0.2.0/tradingcodex_service/templates/web/research.html +73 -0
  111. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/tradingcodex_service/templates/web/starter_prompt.html +5 -14
  112. tradingcodex-0.2.0/tradingcodex_service/templates/web/strategies.html +74 -0
  113. tradingcodex-0.2.0/tradingcodex_service/urls.py +52 -0
  114. tradingcodex-0.2.0/tradingcodex_service/version.py +1 -0
  115. tradingcodex-0.2.0/tradingcodex_service/web.py +1072 -0
  116. tradingcodex-0.2.0/workspace_templates/modules/codex-base/files/.codex/config.toml +287 -0
  117. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/codex-base/files/.codex/hooks/tradingcodex_hook.py +37 -7
  118. tradingcodex-0.2.0/workspace_templates/modules/codex-base/files/.codex/prompts/base_instructions/head-manager.md +129 -0
  119. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/codex-base/files/.codex/rules/tradingcodex.rules +3 -3
  120. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/codex-base/files/.tradingcodex/capabilities.yaml +20 -5
  121. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/codex-base/files/.tradingcodex/config.yaml +5 -20
  122. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/codex-base/files/.tradingcodex/policies/policy-bindings.yaml +6 -0
  123. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/codex-base/files/.tradingcodex/policies/principals.yaml +4 -0
  124. tradingcodex-0.2.0/workspace_templates/modules/codex-base/files/.tradingcodex/policies/roles.yaml +47 -0
  125. tradingcodex-0.2.0/workspace_templates/modules/codex-base/files/AGENTS.md +53 -0
  126. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/codex-base/files/tcx +11 -0
  127. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/policies/access-policies.yaml +1 -1
  128. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/approval_receipt.schema.json +4 -3
  129. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/execution_result.schema.json +2 -2
  130. tradingcodex-0.1.0a7/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/order_intent.schema.json → tradingcodex-0.2.0/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/order_ticket.schema.json +2 -1
  131. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/enforcement-guardrails/module.json +1 -1
  132. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/fixed-subagents/files/.codex/agents/execution-operator.toml +11 -5
  133. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/fixed-subagents/files/.codex/agents/fundamental-analyst.toml +7 -6
  134. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/fixed-subagents/files/.codex/agents/instrument-analyst.toml +7 -6
  135. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/fixed-subagents/files/.codex/agents/macro-analyst.toml +7 -6
  136. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/fixed-subagents/files/.codex/agents/news-analyst.toml +7 -6
  137. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/fixed-subagents/files/.codex/agents/portfolio-manager.toml +11 -10
  138. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/fixed-subagents/files/.codex/agents/risk-manager.toml +8 -7
  139. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/fixed-subagents/files/.codex/agents/technical-analyst.toml +7 -6
  140. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/fixed-subagents/files/.codex/agents/valuation-analyst.toml +6 -5
  141. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/fixed-subagents/files/.tradingcodex/mainagent/head-manager.yaml +0 -1
  142. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/fixed-subagents/files/.tradingcodex/mainagent/subagent-registry.yaml +1 -1
  143. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/guidance-guardrails/files/.tradingcodex/guidance/guardrails.md +2 -0
  144. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/guidance-guardrails/files/.tradingcodex/guidance/task-quality-checklist.md +5 -3
  145. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/information-barriers/files/.tradingcodex/policies/information-barriers.yaml +1 -1
  146. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/repo-skills/files/.agents/skills/investment-workflow-map/SKILL.md +15 -9
  147. tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.agents/skills/manage-optional-skills/SKILL.md +101 -0
  148. tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.agents/skills/manage-optional-skills/agents/openai.yaml +6 -0
  149. tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.agents/skills/manage-subagents/SKILL.md +140 -0
  150. tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.agents/skills/manage-subagents/agents/openai.yaml +6 -0
  151. tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.agents/skills/orchestrate-workflow/SKILL.md +138 -0
  152. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/repo-skills/files/.agents/skills/postmortem/SKILL.md +2 -2
  153. tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.agents/skills/postmortem/agents/openai.yaml +6 -0
  154. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/repo-skills/files/.agents/skills/scenario-quality-gates/SKILL.md +25 -13
  155. tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.agents/skills/scenario-quality-gates/agents/openai.yaml +6 -0
  156. tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.agents/skills/strategy-creator/SKILL.md +109 -0
  157. tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.agents/skills/strategy-creator/agents/openai.yaml +6 -0
  158. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/repo-skills/files/.agents/skills/synthesize-decision/SKILL.md +16 -7
  159. tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.agents/skills/tradingcodex-operator/SKILL.md +73 -0
  160. tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.agents/skills/tradingcodex-operator/agents/openai.yaml +6 -0
  161. {tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills → tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/execution-operator}/execute-paper-order/SKILL.md +10 -9
  162. {tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills → tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/execution-operator}/execute-paper-order/agents/openai.yaml +2 -2
  163. {tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills → tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/fundamental-analyst}/fundamental-analysis/SKILL.md +3 -3
  164. tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/fundamental-analyst/fundamental-analysis/agents/openai.yaml +6 -0
  165. {tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills → tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/instrument-analyst}/instrument-analysis/SKILL.md +5 -5
  166. {tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills → tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/macro-analyst}/macro-analysis/SKILL.md +4 -4
  167. {tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills → tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/news-analyst}/news-analysis/SKILL.md +3 -3
  168. tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/news-analyst/news-analysis/agents/openai.yaml +6 -0
  169. {tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills/create-order-intent → tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/portfolio-manager/create-order-ticket}/SKILL.md +19 -17
  170. tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/portfolio-manager/create-order-ticket/agents/openai.yaml +6 -0
  171. {tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills → tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/portfolio-manager}/portfolio-review/SKILL.md +15 -4
  172. tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/portfolio-manager/portfolio-review/agents/openai.yaml +6 -0
  173. tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/risk-manager/approve-order/SKILL.md +42 -0
  174. tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/risk-manager/approve-order/agents/openai.yaml +6 -0
  175. {tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills → tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/risk-manager}/policy-review/SKILL.md +4 -4
  176. tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/risk-manager/policy-review/agents/openai.yaml +6 -0
  177. {tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills → tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/risk-manager}/review-risk/SKILL.md +15 -5
  178. tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/risk-manager/review-risk/agents/openai.yaml +6 -0
  179. {tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills → tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/shared}/collect-evidence/SKILL.md +5 -5
  180. {tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills → tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/shared}/collect-evidence/agents/openai.yaml +1 -1
  181. {tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills → tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/shared}/external-data-source-gate/SKILL.md +2 -12
  182. tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/shared/external-data-source-gate/agents/openai.yaml +6 -0
  183. {tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills → tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/technical-analyst}/technical-analysis/SKILL.md +4 -4
  184. tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/technical-analyst/technical-analysis/agents/openai.yaml +6 -0
  185. {tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills → tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/valuation-analyst}/valuation-review/SKILL.md +2 -2
  186. tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/valuation-analyst/valuation-review/agents/openai.yaml +6 -0
  187. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/repo-skills/module.json +4 -2
  188. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/tradingcodex-mcp/module.json +2 -1
  189. tradingcodex-0.1.0a7/PKG-INFO +0 -187
  190. tradingcodex-0.1.0a7/README.md +0 -162
  191. tradingcodex-0.1.0a7/apps/audit/admin.py +0 -11
  192. tradingcodex-0.1.0a7/apps/harness/admin.py +0 -52
  193. tradingcodex-0.1.0a7/apps/harness/migrations/0001_initial.py +0 -68
  194. tradingcodex-0.1.0a7/apps/harness/models.py +0 -55
  195. tradingcodex-0.1.0a7/apps/harness/services.py +0 -49
  196. tradingcodex-0.1.0a7/apps/harness/templatetags/tradingcodex_admin.py +0 -111
  197. tradingcodex-0.1.0a7/apps/integrations/admin.py +0 -24
  198. tradingcodex-0.1.0a7/apps/integrations/models.py +0 -16
  199. tradingcodex-0.1.0a7/apps/mcp/admin.py +0 -33
  200. tradingcodex-0.1.0a7/apps/mcp/migrations/0001_initial.py +0 -57
  201. tradingcodex-0.1.0a7/apps/mcp/migrations/0002_mcptooldefinition_experimental.py +0 -18
  202. tradingcodex-0.1.0a7/apps/mcp/models.py +0 -45
  203. tradingcodex-0.1.0a7/apps/mcp/services.py +0 -26
  204. tradingcodex-0.1.0a7/apps/orders/admin.py +0 -27
  205. tradingcodex-0.1.0a7/apps/orders/models.py +0 -66
  206. tradingcodex-0.1.0a7/apps/policy/admin.py +0 -60
  207. tradingcodex-0.1.0a7/apps/portfolio/admin.py +0 -21
  208. tradingcodex-0.1.0a7/apps/portfolio/models.py +0 -53
  209. tradingcodex-0.1.0a7/apps/research/admin.py +0 -42
  210. tradingcodex-0.1.0a7/apps/research/migrations/0001_initial.py +0 -99
  211. tradingcodex-0.1.0a7/apps/research/models.py +0 -85
  212. tradingcodex-0.1.0a7/apps/universes/admin.py +0 -10
  213. tradingcodex-0.1.0a7/apps/universes/apps.py +0 -8
  214. tradingcodex-0.1.0a7/apps/universes/migrations/0001_initial.py +0 -29
  215. tradingcodex-0.1.0a7/apps/universes/models.py +0 -16
  216. tradingcodex-0.1.0a7/apps/workflows/admin.py +0 -17
  217. tradingcodex-0.1.0a7/apps/workflows/migrations/__init__.py +0 -0
  218. tradingcodex-0.1.0a7/docs/README.md +0 -40
  219. tradingcodex-0.1.0a7/docs/core-concepts-and-rules.md +0 -273
  220. tradingcodex-0.1.0a7/docs/tradingcodex-prd.md +0 -547
  221. tradingcodex-0.1.0a7/installation.md +0 -85
  222. tradingcodex-0.1.0a7/static/tradingcodex_admin/admin.css +0 -1113
  223. tradingcodex-0.1.0a7/static/tradingcodex_web/app.css +0 -1526
  224. tradingcodex-0.1.0a7/tests/test_python_migration.py +0 -917
  225. tradingcodex-0.1.0a7/tradingcodex.egg-info/PKG-INFO +0 -187
  226. tradingcodex-0.1.0a7/tradingcodex_cli/__main__.py +0 -123
  227. tradingcodex-0.1.0a7/tradingcodex_cli/workspace.py +0 -783
  228. tradingcodex-0.1.0a7/tradingcodex_service/admin.py +0 -7
  229. tradingcodex-0.1.0a7/tradingcodex_service/api.py +0 -303
  230. tradingcodex-0.1.0a7/tradingcodex_service/domain.py +0 -1797
  231. tradingcodex-0.1.0a7/tradingcodex_service/mcp_runtime.py +0 -507
  232. tradingcodex-0.1.0a7/tradingcodex_service/templates/admin/base_site.html +0 -35
  233. tradingcodex-0.1.0a7/tradingcodex_service/templates/admin/index.html +0 -242
  234. tradingcodex-0.1.0a7/tradingcodex_service/templates/admin/login.html +0 -56
  235. tradingcodex-0.1.0a7/tradingcodex_service/templates/web/base.html +0 -93
  236. tradingcodex-0.1.0a7/tradingcodex_service/templates/web/harness.html +0 -48
  237. tradingcodex-0.1.0a7/tradingcodex_service/templates/web/orders.html +0 -77
  238. tradingcodex-0.1.0a7/tradingcodex_service/templates/web/portfolio.html +0 -61
  239. tradingcodex-0.1.0a7/tradingcodex_service/templates/web/research.html +0 -52
  240. tradingcodex-0.1.0a7/tradingcodex_service/urls.py +0 -26
  241. tradingcodex-0.1.0a7/tradingcodex_service/version.py +0 -1
  242. tradingcodex-0.1.0a7/tradingcodex_service/web.py +0 -243
  243. tradingcodex-0.1.0a7/workspace_templates/__init__.py +0 -1
  244. tradingcodex-0.1.0a7/workspace_templates/modules/codex-base/files/.codex/config.toml +0 -359
  245. tradingcodex-0.1.0a7/workspace_templates/modules/codex-base/files/.tradingcodex/integrations/openbb-mcp.safe-profile.md +0 -61
  246. tradingcodex-0.1.0a7/workspace_templates/modules/codex-base/files/.tradingcodex/policies/roles.yaml +0 -27
  247. tradingcodex-0.1.0a7/workspace_templates/modules/codex-base/files/AGENTS.md +0 -46
  248. tradingcodex-0.1.0a7/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/scripts/validate-order-intent.py +0 -15
  249. tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills/approve-order/SKILL.md +0 -38
  250. tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills/approve-order/agents/openai.yaml +0 -6
  251. tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills/create-order-intent/agents/openai.yaml +0 -6
  252. tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills/fundamental-analysis/agents/openai.yaml +0 -6
  253. tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills/head-manager-interview/SKILL.md +0 -81
  254. tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills/head-manager-interview/agents/openai.yaml +0 -6
  255. tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills/head-manager-interview/references/investor-profile-reference.md +0 -50
  256. tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills/manage-subagents/SKILL.md +0 -120
  257. tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills/news-analysis/agents/openai.yaml +0 -6
  258. tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills/orchestrate-workflow/SKILL.md +0 -291
  259. tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills/policy-review/agents/openai.yaml +0 -6
  260. tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills/portfolio-review/agents/openai.yaml +0 -6
  261. tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills/review-risk/agents/openai.yaml +0 -6
  262. tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills/technical-analysis/agents/openai.yaml +0 -6
  263. tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills/valuation-review/agents/openai.yaml +0 -6
  264. tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.tradingcodex/mainagent/head-manager-interview.md +0 -97
  265. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/CONTRIBUTING.md +0 -0
  266. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/LICENSE +0 -0
  267. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/MANIFEST.in +0 -0
  268. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/NOTICE +0 -0
  269. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/TRADEMARKS.md +0 -0
  270. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/__init__.py +0 -0
  271. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/audit/__init__.py +0 -0
  272. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/audit/apps.py +0 -0
  273. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/audit/migrations/__init__.py +0 -0
  274. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/audit/models.py +0 -0
  275. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/harness/__init__.py +0 -0
  276. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/harness/apps.py +0 -0
  277. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/harness/migrations/__init__.py +0 -0
  278. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/harness/templatetags/__init__.py +0 -0
  279. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/integrations/__init__.py +0 -0
  280. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/integrations/apps.py +0 -0
  281. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/integrations/migrations/__init__.py +0 -0
  282. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/mcp/__init__.py +0 -0
  283. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/mcp/apps.py +0 -0
  284. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/mcp/migrations/__init__.py +0 -0
  285. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/orders/__init__.py +0 -0
  286. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/orders/apps.py +0 -0
  287. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/orders/migrations/__init__.py +0 -0
  288. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/policy/__init__.py +0 -0
  289. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/policy/apps.py +0 -0
  290. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/policy/migrations/__init__.py +0 -0
  291. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/policy/models.py +0 -0
  292. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/portfolio/__init__.py +0 -0
  293. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/portfolio/apps.py +0 -0
  294. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/portfolio/migrations/__init__.py +0 -0
  295. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/research/__init__.py +0 -0
  296. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/research/apps.py +0 -0
  297. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/research/migrations/__init__.py +0 -0
  298. {tradingcodex-0.1.0a7/apps/universes → tradingcodex-0.2.0/apps/workflows}/__init__.py +0 -0
  299. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/apps/workflows/apps.py +0 -0
  300. {tradingcodex-0.1.0a7/apps/universes → tradingcodex-0.2.0/apps/workflows}/migrations/__init__.py +0 -0
  301. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/assets/tradingcodex-banner.svg +0 -0
  302. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/docs/licensing-and-commercialization.md +0 -0
  303. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/setup.cfg +0 -0
  304. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/static/tradingcodex_admin/favicon.svg +0 -0
  305. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/static/vendor/alpine/alpine.min.js +0 -0
  306. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/static/vendor/htmx/htmx.min.js +0 -0
  307. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/tradingcodex.egg-info/dependency_links.txt +0 -0
  308. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/tradingcodex.egg-info/entry_points.txt +0 -0
  309. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/tradingcodex.egg-info/top_level.txt +0 -0
  310. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/tradingcodex_cli/__init__.py +0 -0
  311. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/tradingcodex_service/__init__.py +0 -0
  312. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/tradingcodex_service/asgi.py +0 -0
  313. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/tradingcodex_service/templates/web/fragments/starter_prompt.html +0 -0
  314. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/tradingcodex_service/wsgi.py +0 -0
  315. {tradingcodex-0.1.0a7/apps/workflows → tradingcodex-0.2.0/workspace_templates}/__init__.py +0 -0
  316. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/audit/files/.tradingcodex/audit/README.md +0 -0
  317. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/audit/files/trading/audit/.gitkeep +0 -0
  318. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/audit/module.json +0 -0
  319. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/codex-base/files/.codex/hooks.json +0 -0
  320. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/codex-base/files/.tradingcodex/cli.py +0 -0
  321. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/codex-base/files/pyproject.toml +0 -0
  322. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/codex-base/module.json +0 -0
  323. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/policies/restricted-list.yaml +0 -0
  324. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/audit_event.schema.json +0 -0
  325. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/evidence_pack.schema.json +0 -0
  326. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/fundamental_report.schema.json +0 -0
  327. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/news_report.schema.json +0 -0
  328. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/portfolio_review.schema.json +0 -0
  329. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/postmortem_report.schema.json +0 -0
  330. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/risk_report.schema.json +0 -0
  331. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/technical_report.schema.json +0 -0
  332. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/thesis.schema.json +0 -0
  333. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/valuation.schema.json +0 -0
  334. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/fixed-subagents/files/.tradingcodex/mainagent/skill-change-proposals/.gitkeep +0 -0
  335. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/fixed-subagents/module.json +0 -0
  336. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/guidance-guardrails/module.json +0 -0
  337. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/information-barriers/files/.tradingcodex/secrets.md +0 -0
  338. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/information-barriers/files/trading/approvals/.gitkeep +0 -0
  339. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/information-barriers/files/trading/market-data/.gitkeep +0 -0
  340. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/information-barriers/files/trading/orders/approved/.gitkeep +0 -0
  341. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/information-barriers/files/trading/orders/draft/.gitkeep +0 -0
  342. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/information-barriers/files/trading/orders/executed/.gitkeep +0 -0
  343. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/information-barriers/files/trading/orders/rejected/.gitkeep +0 -0
  344. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/information-barriers/files/trading/portfolio/.gitkeep +0 -0
  345. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/information-barriers/files/trading/reports/fundamental/.gitkeep +0 -0
  346. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/information-barriers/files/trading/reports/instrument/.gitkeep +0 -0
  347. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/information-barriers/files/trading/reports/macro/.gitkeep +0 -0
  348. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/information-barriers/files/trading/reports/news/.gitkeep +0 -0
  349. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/information-barriers/files/trading/reports/policy/.gitkeep +0 -0
  350. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/information-barriers/files/trading/reports/portfolio/.gitkeep +0 -0
  351. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/information-barriers/files/trading/reports/postmortem/.gitkeep +0 -0
  352. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/information-barriers/files/trading/reports/risk/.gitkeep +0 -0
  353. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/information-barriers/files/trading/reports/technical/.gitkeep +0 -0
  354. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/information-barriers/files/trading/reports/valuation/.gitkeep +0 -0
  355. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/information-barriers/files/trading/research/.gitkeep +0 -0
  356. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/information-barriers/module.json +0 -0
  357. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/paper-trading/files/.tradingcodex/mcp/adapters/paper-trading.py +0 -0
  358. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/paper-trading/module.json +0 -0
  359. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/postmortem/files/.tradingcodex/workflows/postmortem.yaml +0 -0
  360. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/postmortem/module.json +0 -0
  361. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/repo-skills/files/.agents/skills/investment-workflow-map/agents/openai.yaml +0 -0
  362. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/repo-skills/files/.agents/skills/orchestrate-workflow/agents/openai.yaml +0 -0
  363. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/repo-skills/files/.agents/skills/synthesize-decision/agents/openai.yaml +0 -0
  364. {tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills → tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/instrument-analyst}/instrument-analysis/agents/openai.yaml +0 -0
  365. {tradingcodex-0.1.0a7/workspace_templates/modules/repo-skills/files/.agents/skills → tradingcodex-0.2.0/workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/macro-analyst}/macro-analysis/agents/openai.yaml +0 -0
  366. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/stub-execution/files/.tradingcodex/mcp/adapters/stub-execution.py +0 -0
  367. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/stub-execution/module.json +0 -0
  368. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/tradingcodex-mcp/files/.tradingcodex/mcp/adapters/live-adapter.contract.md +0 -0
  369. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/tradingcodex-mcp/files/.tradingcodex/mcp/enforcer/README.md +0 -0
  370. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/tradingcodex-mcp/files/.tradingcodex/mcp/gateway/README.md +0 -0
  371. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/tradingcodex-mcp/files/.tradingcodex/mcp/server.py +0 -0
  372. {tradingcodex-0.1.0a7 → tradingcodex-0.2.0}/workspace_templates/modules/tradingcodex-mcp/files/.tradingcodex/mcp/smoke-call.py +0 -0
@@ -0,0 +1,344 @@
1
+ Metadata-Version: 2.4
2
+ Name: tradingcodex
3
+ Version: 0.2.0
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 :: 3 - 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: markdown-it-py<5,>=3
22
+ Requires-Dist: nh3<0.4,>=0.3
23
+ Requires-Dist: pydantic>=2
24
+ Requires-Dist: PyYAML>=6
25
+ Provides-Extra: dev
26
+ Requires-Dist: pytest>=8; extra == "dev"
27
+ Dynamic: license-file
28
+
29
+ <p align="center">
30
+ <img src="assets/tradingcodex-banner.svg" alt="TradingCodex" width="100%">
31
+ </p>
32
+
33
+ <div align="center">
34
+ <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>
35
+ <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>
36
+ <a href="https://pypi.org/project/tradingcodex/"><img alt="PyPI" src="https://img.shields.io/pypi/v/tradingcodex?label=PyPI"></a>
37
+ <a href="LICENSE"><img alt="License" src="https://img.shields.io/badge/license-Apache--2.0-blue"></a>
38
+ <img alt="Python" src="https://img.shields.io/badge/python-3.14-3776AB?logo=python&logoColor=white">
39
+ </div>
40
+
41
+ <div align="center">
42
+ <a href="#quick-start">Quick Start</a> |
43
+ <a href="#what-tradingcodex-does">Features</a> |
44
+ <a href="#local-web-dashboard">Web Dashboard</a> |
45
+ <a href="#how-a-workflow-moves">Workflow</a> |
46
+ <a href="#role-roster">Roles</a> |
47
+ <a href="#architecture">Architecture</a> |
48
+ <a href="#safety-boundary">Safety</a> |
49
+ <a href="#documentation">Documentation</a>
50
+ </div>
51
+
52
+ ---
53
+
54
+ # TradingCodex: Codex-Native Trading Harness
55
+
56
+ TradingCodex is a local-first trading harness for doing investment work with
57
+ Codex. It gives Codex a durable operating system: role-separated agents,
58
+ file-native research memory, a Django service plane, a central local ledger,
59
+ and an MCP execution boundary that turns risky actions into explicit,
60
+ auditable service-layer decisions.
61
+
62
+ It is not an autonomous trading bot. Codex coordinates and explains the work;
63
+ Django owns durable state and policy; TradingCodex MCP is the only executable
64
+ agent boundary; live broker adapters are not shipped in the initial core.
65
+
66
+ ## Product Concept
67
+
68
+ TradingCodex exists because serious Codex-assisted investment work should not
69
+ live only in a chat transcript. Research, source freshness, role handoffs,
70
+ portfolio context, approvals, policy decisions, execution attempts, and audit
71
+ records need a system of record that remains inspectable after the thread ends.
72
+
73
+ The product model is a harness:
74
+
75
+ | Plane | What it gives you |
76
+ | --- | --- |
77
+ | Codex control plane | A generated Codex workspace with one `head-manager`, nine specialist subagents, role prompts, repo skills, hooks, and project-scoped MCP config. |
78
+ | Workspace file plane | Human-readable research markdown, source snapshots, strategy skills, policy exports, and generated `./tcx` wrappers inside the user's Codex workspace. |
79
+ | Django service plane | Local durable services for policy, orders, approvals, portfolio state, audit, workflows, MCP registry, external router review, API, Admin, and product web. |
80
+ | MCP execution boundary | Typed tools, role allowlists, policy checks, approval checks, idempotency, adapter submission, and ledgered results for executable actions. |
81
+
82
+ Generated workspaces are Codex workbenches, not brokerage accounts. Canonical
83
+ execution-sensitive state lives in the central local runtime DB:
84
+
85
+ ```text
86
+ ~/.tradingcodex/state/tradingcodex.sqlite3
87
+ ```
88
+
89
+ ## What TradingCodex Does
90
+
91
+ TradingCodex `0.2.0` provides:
92
+
93
+ - A generated Codex workspace with fixed role topology, project-scoped MCP,
94
+ local wrappers, workspace manifest, generated policy/config files, and
95
+ `./tcx doctor` validation.
96
+ - An explicit workspace update path that refreshes generated files, applies
97
+ central DB migrations, preserves workspace identity/profile state, and
98
+ re-runs doctor checks.
99
+ - A role workflow model where `head-manager` dispatches work and specialists
100
+ return bounded artifacts instead of every agent redoing every part of the
101
+ investment question.
102
+ - File-native research memory: markdown artifacts, source snapshots, versioned
103
+ handoffs, export/search flows, and source/as-of posture that agents and
104
+ humans can both read.
105
+ - Strategy and skill management through workspace files, including
106
+ `strategy-*` skills and role-local optional skills without weakening core
107
+ role boundaries.
108
+ - Policy, restricted-symbol, approval, order, execution, portfolio, MCP, and
109
+ audit services behind a shared Django application layer.
110
+ - Broker Center foundations: broker connections, broker accounts, read-only
111
+ paper sync, external MCP broker discovery import, and reconciliation
112
+ summaries behind the service layer.
113
+ - Canonical Order Ticket foundations: natural-language or structured draft
114
+ tickets, schema/policy/cash-position/broker validation checks, state-machine
115
+ events, exact approval-scope binding, broker order timeline, and paper fills.
116
+ - Experimental paper/stub order lifecycle support: check order tickets, request
117
+ approval receipts, submit approved orders, cancel approved orders, and record
118
+ outcomes.
119
+ - A local product web surface for browsing agents, skills, research markdown,
120
+ external MCP Gate metadata, starter prompts, and operational state.
121
+ - Django Admin, Django Ninja API, CLI, and MCP surfaces that call the same
122
+ service-layer logic instead of creating parallel execution paths.
123
+ - A managed External MCP Gate that imports discovery metadata,
124
+ classifies tool risk, scopes role access, and blocks unsafe direct proxy
125
+ paths by default.
126
+
127
+ ## Quick Start
128
+
129
+ Choose an empty target directory for the generated Codex workspace. Source
130
+ checkouts of this repository are for TradingCodex development; generated
131
+ TradingCodex workspaces are separate Codex projects.
132
+
133
+ Agents and install helpers do not invent a default workspace path. If the
134
+ target path is not supplied, ask the user before creating or attaching a
135
+ workspace.
136
+
137
+ Install TradingCodex and attach it to a user-selected workspace:
138
+
139
+ ```bash
140
+ mkdir -p /path/to/target-workspace
141
+ cd /path/to/target-workspace
142
+ curl -fsSL https://raw.githubusercontent.com/monarchjuno/tradingcodex/main/install.sh | sh -s -- .
143
+ ```
144
+
145
+ Run the smoke check:
146
+
147
+ ```bash
148
+ ./tcx doctor
149
+ ```
150
+
151
+ After installation, fully quit and restart Codex, then open the generated
152
+ workspace and start from a new thread so project MCP config is reloaded. When
153
+ TradingCodex MCP autostarts the local service, the dashboard is available at:
154
+
155
+ ```text
156
+ http://127.0.0.1:48267/
157
+ ```
158
+
159
+ Start an orchestrated Codex workflow from the generated workspace:
160
+
161
+ ```text
162
+ $orchestrate-workflow analyze Apple with public equity research, valuation, portfolio, and risk review
163
+ ```
164
+
165
+ For repeated workspace creation, install the CLI as a user-level tool:
166
+
167
+ ```bash
168
+ uv python install 3.14
169
+ uv tool install --python 3.14 tradingcodex
170
+ uv tool update-shell
171
+ cd /path/to/target-workspace
172
+ tcx attach .
173
+ ./tcx doctor
174
+ ```
175
+
176
+ See [installation.md](https://github.com/monarchjuno/tradingcodex/blob/main/installation.md)
177
+ for GitHub-main installs, direct `uvx`, MCP/service details, and additional
178
+ smoke checks.
179
+
180
+ Update an existing generated workspace after a package release:
181
+
182
+ ```bash
183
+ cd /path/to/target-workspace
184
+ curl -fsSL https://raw.githubusercontent.com/monarchjuno/tradingcodex/main/install.sh | sh -s -- --update .
185
+ ```
186
+
187
+ ## Local Web Dashboard
188
+
189
+ TradingCodex includes a local Django web surface so users do not have to inspect
190
+ everything through chat or CLI output. When Codex trusts a generated workspace,
191
+ project MCP startup also starts the local service and exposes the dashboard at:
192
+
193
+ ```text
194
+ http://127.0.0.1:48267/
195
+ ```
196
+
197
+ The dashboard is a review and control surface for the agent roster, required
198
+ and optional skills, strategy skills, research markdown, Broker Center,
199
+ External MCP Gate metadata, portfolio sync/reconciliation, order-ticket
200
+ drafts/checks, starter prompts, policy/order/portfolio/activity status, and
201
+ local workspace state. It does not spawn Codex agents, approve orders, submit
202
+ executions, or provide investment recommendations.
203
+
204
+ For CLI-only sessions, start it manually:
205
+
206
+ ```bash
207
+ ./tcx service runserver
208
+ ```
209
+
210
+ Django Admin is available separately at `http://127.0.0.1:48267/admin/` for
211
+ local/staff DB inspection.
212
+
213
+ ## How A Workflow Moves
214
+
215
+ TradingCodex is designed around handoffs rather than one giant answer:
216
+
217
+ 1. The user asks Codex for an investment workflow.
218
+ 2. `head-manager` classifies the request, maps the investment universe and
219
+ workflow lane, and dispatches bounded work to specialist roles.
220
+ 3. Analysts create evidence-backed artifacts with source/as-of posture.
221
+ 4. Downstream roles consume accepted upstream artifacts instead of silently
222
+ filling missing work outside their role.
223
+ 5. Portfolio and risk roles review fit, sizing, broker sync/reconciliation,
224
+ limits, restricted symbols, order-ticket checks, and approval readiness.
225
+ 6. If an executable paper/stub action is requested, `risk-manager` creates an
226
+ approval receipt bound to the exact order payload hash and
227
+ `execution-operator` submits only through TradingCodex MCP.
228
+ 7. Policy decisions, MCP calls, approvals, execution results, and audit events
229
+ remain inspectable through local service surfaces.
230
+
231
+ ## Role Roster
232
+
233
+ | Layer | Agent | Role summary |
234
+ | --- | --- | --- |
235
+ | Main agent | `head-manager` | Dispatches specialist roles, preserves constraints, and synthesizes completed artifacts. |
236
+ | Analysis subagent | `fundamental-analyst` | Reviews business quality, financial evidence, company fundamentals, and source claims. |
237
+ | Analysis subagent | `technical-analyst` | Reviews price action, trend structure, levels, and market behavior. |
238
+ | Analysis subagent | `news-analyst` | Tracks news, catalysts, events, and freshness-sensitive context. |
239
+ | Market-context subagent | `macro-analyst` | Covers macro, rates, FX, commodities, policy, and cross-asset context. |
240
+ | Market-context subagent | `instrument-analyst` | Supports ETF/index, options, crypto market structure, and instrument-level work. |
241
+ | Decision-review subagent | `valuation-analyst` | Reviews valuation assumptions, sensitivity, and decision-quality gaps. |
242
+ | Portfolio subagent | `portfolio-manager` | Reviews portfolio fit, sizing, exposure, and draft order readiness. |
243
+ | Risk subagent | `risk-manager` | Reviews downside, policy constraints, restricted lists, and approval readiness. |
244
+ | Execution subagent | `execution-operator` | Handles approved paper/stub execution through TradingCodex MCP only. |
245
+
246
+ The default generated workspace includes this one-plus-nine roster. The main
247
+ agent coordinates and synthesizes; specialist agents own the actual role work.
248
+
249
+ ## Architecture
250
+
251
+ TradingCodex is a Python/Django modular monolith packaged as a local-first
252
+ tool. The important implementation rule is that every interface calls shared
253
+ application services:
254
+
255
+ | Surface | Role |
256
+ | --- | --- |
257
+ | Product web | Agents-first review dashboard for roles, skills, research markdown, External MCP Gate lifecycle/review, starter prompts, and local status. |
258
+ | Django Admin | Local/staff DB inspection for policy, orders, portfolio, MCP registry, workflows, integrations, and audit rows. |
259
+ | Django Ninja API | Typed local/staff REST and control endpoints. |
260
+ | MCP | Agent/tool boundary with typed tools, role scopes, policy checks, and audit. |
261
+ | CLI | Local operator commands and generated workspace wrapper behavior. |
262
+
263
+ Canonical implementation lives in:
264
+
265
+ ```txt
266
+ tradingcodex_service/application/
267
+ tradingcodex_cli/commands/
268
+ apps/
269
+ workspace_templates/modules/
270
+ ```
271
+
272
+ The baseline frontend uses Django templates, local static HTMX, and local
273
+ static Alpine. There is no Node, bundler, React, or frontend build step in the
274
+ core package.
275
+
276
+ ## Safety Boundary
277
+
278
+ TradingCodex treats executable actions as a deterministic service-layer
279
+ lifecycle:
280
+
281
+ ```text
282
+ principal -> capability -> policy -> schema -> approval/idempotency -> adapter -> audit
283
+ ```
284
+
285
+ Important boundaries:
286
+
287
+ - Product web routes do not spawn agents, generate investment analysis, create
288
+ approvals, or submit executions.
289
+ - REST/Admin/CLI/MCP call shared Django service functions.
290
+ - Role MCP allowlists are narrow: `head-manager` cannot submit orders,
291
+ `risk-manager` owns approvals, and `execution-operator` owns execution calls.
292
+ - Paper/stub execution remains experimental.
293
+ - Live broker adapters are not shipped in the initial core.
294
+ - Raw broker secrets must not be stored in this repository or generated
295
+ workspaces.
296
+
297
+ TradingCodex is research, workflow, and execution-guardrail tooling. It is not
298
+ financial, investment, legal, tax, or regulatory advice, and it does not provide
299
+ investment recommendations or guarantee returns.
300
+
301
+ ## Supported Workflow Scope
302
+
303
+ Public equity is the first deeply specified sleeve. The harness keeps explicit
304
+ paths for ETF/index, public crypto market, macro/rates/FX/commodities, options,
305
+ credit-signal, and cross-asset workflows when the required data source, role
306
+ workflow, and policy boundary exist.
307
+
308
+ Unsupported or weakly sourced workflows should receive conservative readiness
309
+ labels such as `research-only`, `screen-grade`, `not-decision-ready`, or
310
+ `blocked`.
311
+
312
+ ## Release Status
313
+
314
+ `0.2.0` is the OrderTicket rewrite release for the generated workspace, Python
315
+ CLI, Django service plane, product web, MCP boundary, and documentation set.
316
+ The package still uses an alpha development classifier because live broker
317
+ adapters and hosted service modes are intentionally outside the initial core.
318
+
319
+ ## Documentation
320
+
321
+ - [Installation](installation.md)
322
+ - [Docs index](docs/README.md)
323
+ - [Product direction](docs/product-direction.md)
324
+ - [Core concepts and rules](docs/core-concepts-and-rules.md)
325
+ - [Harness model](docs/harness.md)
326
+ - [Roles, skills, and workflows](docs/roles-skills-and-workflows.md)
327
+ - [Safety policy and execution](docs/safety-policy-and-execution.md)
328
+ - [Interfaces and surfaces](docs/interfaces-and-surfaces.md)
329
+ - [Deployment](docs/deployment.md)
330
+
331
+ ## Contributing
332
+
333
+ Contributions use Apache-2.0 with DCO sign-off. See
334
+ [CONTRIBUTING.md](CONTRIBUTING.md).
335
+
336
+ ## License
337
+
338
+ TradingCodex is an Apache-2.0 open-core project.
339
+
340
+ Source code, generated workspace templates, and project documentation are
341
+ licensed under the Apache License, Version 2.0 unless marked otherwise. The
342
+ TradingCodex name, future logos, and official product marks are not granted by
343
+ the code license. See [LICENSE](LICENSE), [NOTICE](NOTICE), and
344
+ [TRADEMARKS.md](TRADEMARKS.md).
@@ -0,0 +1,316 @@
1
+ <p align="center">
2
+ <img src="assets/tradingcodex-banner.svg" alt="TradingCodex" width="100%">
3
+ </p>
4
+
5
+ <div align="center">
6
+ <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>
7
+ <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>
8
+ <a href="https://pypi.org/project/tradingcodex/"><img alt="PyPI" src="https://img.shields.io/pypi/v/tradingcodex?label=PyPI"></a>
9
+ <a href="LICENSE"><img alt="License" src="https://img.shields.io/badge/license-Apache--2.0-blue"></a>
10
+ <img alt="Python" src="https://img.shields.io/badge/python-3.14-3776AB?logo=python&logoColor=white">
11
+ </div>
12
+
13
+ <div align="center">
14
+ <a href="#quick-start">Quick Start</a> |
15
+ <a href="#what-tradingcodex-does">Features</a> |
16
+ <a href="#local-web-dashboard">Web Dashboard</a> |
17
+ <a href="#how-a-workflow-moves">Workflow</a> |
18
+ <a href="#role-roster">Roles</a> |
19
+ <a href="#architecture">Architecture</a> |
20
+ <a href="#safety-boundary">Safety</a> |
21
+ <a href="#documentation">Documentation</a>
22
+ </div>
23
+
24
+ ---
25
+
26
+ # TradingCodex: Codex-Native Trading Harness
27
+
28
+ TradingCodex is a local-first trading harness for doing investment work with
29
+ Codex. It gives Codex a durable operating system: role-separated agents,
30
+ file-native research memory, a Django service plane, a central local ledger,
31
+ and an MCP execution boundary that turns risky actions into explicit,
32
+ auditable service-layer decisions.
33
+
34
+ It is not an autonomous trading bot. Codex coordinates and explains the work;
35
+ Django owns durable state and policy; TradingCodex MCP is the only executable
36
+ agent boundary; live broker adapters are not shipped in the initial core.
37
+
38
+ ## Product Concept
39
+
40
+ TradingCodex exists because serious Codex-assisted investment work should not
41
+ live only in a chat transcript. Research, source freshness, role handoffs,
42
+ portfolio context, approvals, policy decisions, execution attempts, and audit
43
+ records need a system of record that remains inspectable after the thread ends.
44
+
45
+ The product model is a harness:
46
+
47
+ | Plane | What it gives you |
48
+ | --- | --- |
49
+ | Codex control plane | A generated Codex workspace with one `head-manager`, nine specialist subagents, role prompts, repo skills, hooks, and project-scoped MCP config. |
50
+ | Workspace file plane | Human-readable research markdown, source snapshots, strategy skills, policy exports, and generated `./tcx` wrappers inside the user's Codex workspace. |
51
+ | Django service plane | Local durable services for policy, orders, approvals, portfolio state, audit, workflows, MCP registry, external router review, API, Admin, and product web. |
52
+ | MCP execution boundary | Typed tools, role allowlists, policy checks, approval checks, idempotency, adapter submission, and ledgered results for executable actions. |
53
+
54
+ Generated workspaces are Codex workbenches, not brokerage accounts. Canonical
55
+ execution-sensitive state lives in the central local runtime DB:
56
+
57
+ ```text
58
+ ~/.tradingcodex/state/tradingcodex.sqlite3
59
+ ```
60
+
61
+ ## What TradingCodex Does
62
+
63
+ TradingCodex `0.2.0` provides:
64
+
65
+ - A generated Codex workspace with fixed role topology, project-scoped MCP,
66
+ local wrappers, workspace manifest, generated policy/config files, and
67
+ `./tcx doctor` validation.
68
+ - An explicit workspace update path that refreshes generated files, applies
69
+ central DB migrations, preserves workspace identity/profile state, and
70
+ re-runs doctor checks.
71
+ - A role workflow model where `head-manager` dispatches work and specialists
72
+ return bounded artifacts instead of every agent redoing every part of the
73
+ investment question.
74
+ - File-native research memory: markdown artifacts, source snapshots, versioned
75
+ handoffs, export/search flows, and source/as-of posture that agents and
76
+ humans can both read.
77
+ - Strategy and skill management through workspace files, including
78
+ `strategy-*` skills and role-local optional skills without weakening core
79
+ role boundaries.
80
+ - Policy, restricted-symbol, approval, order, execution, portfolio, MCP, and
81
+ audit services behind a shared Django application layer.
82
+ - Broker Center foundations: broker connections, broker accounts, read-only
83
+ paper sync, external MCP broker discovery import, and reconciliation
84
+ summaries behind the service layer.
85
+ - Canonical Order Ticket foundations: natural-language or structured draft
86
+ tickets, schema/policy/cash-position/broker validation checks, state-machine
87
+ events, exact approval-scope binding, broker order timeline, and paper fills.
88
+ - Experimental paper/stub order lifecycle support: check order tickets, request
89
+ approval receipts, submit approved orders, cancel approved orders, and record
90
+ outcomes.
91
+ - A local product web surface for browsing agents, skills, research markdown,
92
+ external MCP Gate metadata, starter prompts, and operational state.
93
+ - Django Admin, Django Ninja API, CLI, and MCP surfaces that call the same
94
+ service-layer logic instead of creating parallel execution paths.
95
+ - A managed External MCP Gate that imports discovery metadata,
96
+ classifies tool risk, scopes role access, and blocks unsafe direct proxy
97
+ paths by default.
98
+
99
+ ## Quick Start
100
+
101
+ Choose an empty target directory for the generated Codex workspace. Source
102
+ checkouts of this repository are for TradingCodex development; generated
103
+ TradingCodex workspaces are separate Codex projects.
104
+
105
+ Agents and install helpers do not invent a default workspace path. If the
106
+ target path is not supplied, ask the user before creating or attaching a
107
+ workspace.
108
+
109
+ Install TradingCodex and attach it to a user-selected workspace:
110
+
111
+ ```bash
112
+ mkdir -p /path/to/target-workspace
113
+ cd /path/to/target-workspace
114
+ curl -fsSL https://raw.githubusercontent.com/monarchjuno/tradingcodex/main/install.sh | sh -s -- .
115
+ ```
116
+
117
+ Run the smoke check:
118
+
119
+ ```bash
120
+ ./tcx doctor
121
+ ```
122
+
123
+ After installation, fully quit and restart Codex, then open the generated
124
+ workspace and start from a new thread so project MCP config is reloaded. When
125
+ TradingCodex MCP autostarts the local service, the dashboard is available at:
126
+
127
+ ```text
128
+ http://127.0.0.1:48267/
129
+ ```
130
+
131
+ Start an orchestrated Codex workflow from the generated workspace:
132
+
133
+ ```text
134
+ $orchestrate-workflow analyze Apple with public equity research, valuation, portfolio, and risk review
135
+ ```
136
+
137
+ For repeated workspace creation, install the CLI as a user-level tool:
138
+
139
+ ```bash
140
+ uv python install 3.14
141
+ uv tool install --python 3.14 tradingcodex
142
+ uv tool update-shell
143
+ cd /path/to/target-workspace
144
+ tcx attach .
145
+ ./tcx doctor
146
+ ```
147
+
148
+ See [installation.md](https://github.com/monarchjuno/tradingcodex/blob/main/installation.md)
149
+ for GitHub-main installs, direct `uvx`, MCP/service details, and additional
150
+ smoke checks.
151
+
152
+ Update an existing generated workspace after a package release:
153
+
154
+ ```bash
155
+ cd /path/to/target-workspace
156
+ curl -fsSL https://raw.githubusercontent.com/monarchjuno/tradingcodex/main/install.sh | sh -s -- --update .
157
+ ```
158
+
159
+ ## Local Web Dashboard
160
+
161
+ TradingCodex includes a local Django web surface so users do not have to inspect
162
+ everything through chat or CLI output. When Codex trusts a generated workspace,
163
+ project MCP startup also starts the local service and exposes the dashboard at:
164
+
165
+ ```text
166
+ http://127.0.0.1:48267/
167
+ ```
168
+
169
+ The dashboard is a review and control surface for the agent roster, required
170
+ and optional skills, strategy skills, research markdown, Broker Center,
171
+ External MCP Gate metadata, portfolio sync/reconciliation, order-ticket
172
+ drafts/checks, starter prompts, policy/order/portfolio/activity status, and
173
+ local workspace state. It does not spawn Codex agents, approve orders, submit
174
+ executions, or provide investment recommendations.
175
+
176
+ For CLI-only sessions, start it manually:
177
+
178
+ ```bash
179
+ ./tcx service runserver
180
+ ```
181
+
182
+ Django Admin is available separately at `http://127.0.0.1:48267/admin/` for
183
+ local/staff DB inspection.
184
+
185
+ ## How A Workflow Moves
186
+
187
+ TradingCodex is designed around handoffs rather than one giant answer:
188
+
189
+ 1. The user asks Codex for an investment workflow.
190
+ 2. `head-manager` classifies the request, maps the investment universe and
191
+ workflow lane, and dispatches bounded work to specialist roles.
192
+ 3. Analysts create evidence-backed artifacts with source/as-of posture.
193
+ 4. Downstream roles consume accepted upstream artifacts instead of silently
194
+ filling missing work outside their role.
195
+ 5. Portfolio and risk roles review fit, sizing, broker sync/reconciliation,
196
+ limits, restricted symbols, order-ticket checks, and approval readiness.
197
+ 6. If an executable paper/stub action is requested, `risk-manager` creates an
198
+ approval receipt bound to the exact order payload hash and
199
+ `execution-operator` submits only through TradingCodex MCP.
200
+ 7. Policy decisions, MCP calls, approvals, execution results, and audit events
201
+ remain inspectable through local service surfaces.
202
+
203
+ ## Role Roster
204
+
205
+ | Layer | Agent | Role summary |
206
+ | --- | --- | --- |
207
+ | Main agent | `head-manager` | Dispatches specialist roles, preserves constraints, and synthesizes completed artifacts. |
208
+ | Analysis subagent | `fundamental-analyst` | Reviews business quality, financial evidence, company fundamentals, and source claims. |
209
+ | Analysis subagent | `technical-analyst` | Reviews price action, trend structure, levels, and market behavior. |
210
+ | Analysis subagent | `news-analyst` | Tracks news, catalysts, events, and freshness-sensitive context. |
211
+ | Market-context subagent | `macro-analyst` | Covers macro, rates, FX, commodities, policy, and cross-asset context. |
212
+ | Market-context subagent | `instrument-analyst` | Supports ETF/index, options, crypto market structure, and instrument-level work. |
213
+ | Decision-review subagent | `valuation-analyst` | Reviews valuation assumptions, sensitivity, and decision-quality gaps. |
214
+ | Portfolio subagent | `portfolio-manager` | Reviews portfolio fit, sizing, exposure, and draft order readiness. |
215
+ | Risk subagent | `risk-manager` | Reviews downside, policy constraints, restricted lists, and approval readiness. |
216
+ | Execution subagent | `execution-operator` | Handles approved paper/stub execution through TradingCodex MCP only. |
217
+
218
+ The default generated workspace includes this one-plus-nine roster. The main
219
+ agent coordinates and synthesizes; specialist agents own the actual role work.
220
+
221
+ ## Architecture
222
+
223
+ TradingCodex is a Python/Django modular monolith packaged as a local-first
224
+ tool. The important implementation rule is that every interface calls shared
225
+ application services:
226
+
227
+ | Surface | Role |
228
+ | --- | --- |
229
+ | Product web | Agents-first review dashboard for roles, skills, research markdown, External MCP Gate lifecycle/review, starter prompts, and local status. |
230
+ | Django Admin | Local/staff DB inspection for policy, orders, portfolio, MCP registry, workflows, integrations, and audit rows. |
231
+ | Django Ninja API | Typed local/staff REST and control endpoints. |
232
+ | MCP | Agent/tool boundary with typed tools, role scopes, policy checks, and audit. |
233
+ | CLI | Local operator commands and generated workspace wrapper behavior. |
234
+
235
+ Canonical implementation lives in:
236
+
237
+ ```txt
238
+ tradingcodex_service/application/
239
+ tradingcodex_cli/commands/
240
+ apps/
241
+ workspace_templates/modules/
242
+ ```
243
+
244
+ The baseline frontend uses Django templates, local static HTMX, and local
245
+ static Alpine. There is no Node, bundler, React, or frontend build step in the
246
+ core package.
247
+
248
+ ## Safety Boundary
249
+
250
+ TradingCodex treats executable actions as a deterministic service-layer
251
+ lifecycle:
252
+
253
+ ```text
254
+ principal -> capability -> policy -> schema -> approval/idempotency -> adapter -> audit
255
+ ```
256
+
257
+ Important boundaries:
258
+
259
+ - Product web routes do not spawn agents, generate investment analysis, create
260
+ approvals, or submit executions.
261
+ - REST/Admin/CLI/MCP call shared Django service functions.
262
+ - Role MCP allowlists are narrow: `head-manager` cannot submit orders,
263
+ `risk-manager` owns approvals, and `execution-operator` owns execution calls.
264
+ - Paper/stub execution remains experimental.
265
+ - Live broker adapters are not shipped in the initial core.
266
+ - Raw broker secrets must not be stored in this repository or generated
267
+ workspaces.
268
+
269
+ TradingCodex is research, workflow, and execution-guardrail tooling. It is not
270
+ financial, investment, legal, tax, or regulatory advice, and it does not provide
271
+ investment recommendations or guarantee returns.
272
+
273
+ ## Supported Workflow Scope
274
+
275
+ Public equity is the first deeply specified sleeve. The harness keeps explicit
276
+ paths for ETF/index, public crypto market, macro/rates/FX/commodities, options,
277
+ credit-signal, and cross-asset workflows when the required data source, role
278
+ workflow, and policy boundary exist.
279
+
280
+ Unsupported or weakly sourced workflows should receive conservative readiness
281
+ labels such as `research-only`, `screen-grade`, `not-decision-ready`, or
282
+ `blocked`.
283
+
284
+ ## Release Status
285
+
286
+ `0.2.0` is the OrderTicket rewrite release for the generated workspace, Python
287
+ CLI, Django service plane, product web, MCP boundary, and documentation set.
288
+ The package still uses an alpha development classifier because live broker
289
+ adapters and hosted service modes are intentionally outside the initial core.
290
+
291
+ ## Documentation
292
+
293
+ - [Installation](installation.md)
294
+ - [Docs index](docs/README.md)
295
+ - [Product direction](docs/product-direction.md)
296
+ - [Core concepts and rules](docs/core-concepts-and-rules.md)
297
+ - [Harness model](docs/harness.md)
298
+ - [Roles, skills, and workflows](docs/roles-skills-and-workflows.md)
299
+ - [Safety policy and execution](docs/safety-policy-and-execution.md)
300
+ - [Interfaces and surfaces](docs/interfaces-and-surfaces.md)
301
+ - [Deployment](docs/deployment.md)
302
+
303
+ ## Contributing
304
+
305
+ Contributions use Apache-2.0 with DCO sign-off. See
306
+ [CONTRIBUTING.md](CONTRIBUTING.md).
307
+
308
+ ## License
309
+
310
+ TradingCodex is an Apache-2.0 open-core project.
311
+
312
+ Source code, generated workspace templates, and project documentation are
313
+ licensed under the Apache License, Version 2.0 unless marked otherwise. The
314
+ TradingCodex name, future logos, and official product marks are not granted by
315
+ the code license. See [LICENSE](LICENSE), [NOTICE](NOTICE), and
316
+ [TRADEMARKS.md](TRADEMARKS.md).
@@ -0,0 +1,6 @@
1
+ from django.contrib import admin
2
+
3
+ from apps.audit.models import AuditEvent
4
+
5
+
6
+ admin.site.register(AuditEvent)
@@ -1,4 +1,4 @@
1
- # Generated by Django 5.2.5 on 2026-06-08 09:49
1
+ # Generated by Django 5.2.5 on 2026-06-12 16:32
2
2
 
3
3
  from django.db import migrations, models
4
4
 
@@ -0,0 +1,6 @@
1
+ from django.contrib import admin
2
+
3
+ from apps.harness.models import WorkspaceContext
4
+
5
+
6
+ admin.site.register(WorkspaceContext)