teddy-cli 0.1.17.dev1178__tar.gz → 0.1.17.dev1179__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 (157) hide show
  1. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/PKG-INFO +1 -1
  2. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/pyproject.toml +1 -1
  3. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/resources/config/prompts/architect.xml +5 -171
  4. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/resources/config/prompts/assistant.xml +5 -54
  5. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/resources/config/prompts/debugger.xml +10 -120
  6. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/resources/config/prompts/developer.xml +5 -100
  7. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/resources/config/prompts/pathfinder.xml +5 -175
  8. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/resources/config/prompts/prototyper.xml +5 -100
  9. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/.gitignore +0 -0
  10. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/LICENSE +0 -0
  11. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/__init__.py +0 -0
  12. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/__main__.py +0 -0
  13. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/__init__.py +0 -0
  14. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/inbound/__init__.py +0 -0
  15. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/inbound/cli_formatter.py +0 -0
  16. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/inbound/cli_helpers.py +0 -0
  17. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/inbound/session_cli_handlers.py +0 -0
  18. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/inbound/textual_plan_reviewer.py +0 -0
  19. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/inbound/textual_plan_reviewer_app.py +0 -0
  20. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/inbound/textual_plan_reviewer_editor.py +0 -0
  21. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/inbound/textual_plan_reviewer_execution.py +0 -0
  22. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/inbound/textual_plan_reviewer_helpers.py +0 -0
  23. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/inbound/textual_plan_reviewer_logic.py +0 -0
  24. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/inbound/textual_plan_reviewer_previews.py +0 -0
  25. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/inbound/textual_plan_reviewer_widgets.py +0 -0
  26. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/outbound/__init__.py +0 -0
  27. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/outbound/console_interactor.py +0 -0
  28. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/outbound/console_interactor_ask_loop.py +0 -0
  29. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/outbound/console_interactor_helpers.py +0 -0
  30. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/outbound/console_tooling.py +0 -0
  31. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/outbound/filesystem_helpers.py +0 -0
  32. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/outbound/litellm_adapter.py +0 -0
  33. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/outbound/local_file_system_adapter.py +0 -0
  34. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/outbound/local_repo_tree_generator.py +0 -0
  35. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/outbound/openrouter_hydrator.py +0 -0
  36. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/outbound/shell_adapter.py +0 -0
  37. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/outbound/shell_command_builder.py +0 -0
  38. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/outbound/suppressed_logging.py +0 -0
  39. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/outbound/system_environment_adapter.py +0 -0
  40. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/outbound/system_environment_inspector.py +0 -0
  41. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/outbound/system_time_adapter.py +0 -0
  42. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/outbound/terminal_quit_key_listener.py +0 -0
  43. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/outbound/web_scraper_adapter.py +0 -0
  44. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/outbound/web_searcher_adapter.py +0 -0
  45. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/adapters/outbound/yaml_config_adapter.py +0 -0
  46. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/container.py +0 -0
  47. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/__init__.py +0 -0
  48. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/domain/__init__.py +0 -0
  49. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/domain/models/__init__.py +0 -0
  50. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/domain/models/action_ports.py +0 -0
  51. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/domain/models/change_set.py +0 -0
  52. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/domain/models/exceptions.py +0 -0
  53. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/domain/models/execution_report.py +0 -0
  54. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/domain/models/orchestrator_ports.py +0 -0
  55. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/domain/models/plan.py +0 -0
  56. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/domain/models/planning_ports.py +0 -0
  57. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/domain/models/project_context.py +0 -0
  58. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/domain/models/report_assembly_data.py +0 -0
  59. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/domain/models/session.py +0 -0
  60. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/domain/models/shell_output.py +0 -0
  61. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/domain/models/web_search_results.py +0 -0
  62. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/ports/__init__.py +0 -0
  63. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/ports/inbound/__init__.py +0 -0
  64. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/ports/inbound/edit_simulator.py +0 -0
  65. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/ports/inbound/get_context_use_case.py +0 -0
  66. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/ports/inbound/init.py +0 -0
  67. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/ports/inbound/plan_parser.py +0 -0
  68. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/ports/inbound/plan_reviewer.py +0 -0
  69. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/ports/inbound/plan_validator.py +0 -0
  70. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/ports/inbound/planning_use_case.py +0 -0
  71. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/ports/inbound/run_plan_use_case.py +0 -0
  72. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/ports/outbound/__init__.py +0 -0
  73. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/ports/outbound/config_service.py +0 -0
  74. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/ports/outbound/environment_inspector.py +0 -0
  75. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/ports/outbound/execution_report_assembler.py +0 -0
  76. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/ports/outbound/file_system_manager.py +0 -0
  77. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/ports/outbound/llm_client.py +0 -0
  78. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/ports/outbound/markdown_report_formatter.py +0 -0
  79. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/ports/outbound/prompt_manager.py +0 -0
  80. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/ports/outbound/quit_key_listener.py +0 -0
  81. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/ports/outbound/repo_tree_generator.py +0 -0
  82. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/ports/outbound/session_loop_guard.py +0 -0
  83. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/ports/outbound/session_manager.py +0 -0
  84. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/ports/outbound/session_repository.py +0 -0
  85. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/ports/outbound/shell_executor.py +0 -0
  86. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/ports/outbound/system_environment.py +0 -0
  87. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/ports/outbound/time_service.py +0 -0
  88. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/ports/outbound/user_interactor.py +0 -0
  89. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/ports/outbound/web_scraper.py +0 -0
  90. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/ports/outbound/web_searcher.py +0 -0
  91. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/__init__.py +0 -0
  92. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/action_changeset_builder.py +0 -0
  93. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/action_diff_manager.py +0 -0
  94. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/action_dispatcher.py +0 -0
  95. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/action_executor.py +0 -0
  96. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/action_factory.py +0 -0
  97. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/action_parser_complex.py +0 -0
  98. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/action_parser_strategies.py +0 -0
  99. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/context_service.py +0 -0
  100. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/edit_simulator.py +0 -0
  101. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/execution_orchestrator.py +0 -0
  102. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/execution_report_assembler.py +0 -0
  103. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/init_service.py +0 -0
  104. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/markdown_plan_parser.py +0 -0
  105. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/markdown_report_formatter.py +0 -0
  106. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/parser_infrastructure.py +0 -0
  107. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/parser_metadata.py +0 -0
  108. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/parser_reporting.py +0 -0
  109. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/plan_validator.py +0 -0
  110. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/planning_service.py +0 -0
  111. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/prompt_manager.py +0 -0
  112. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/session_lifecycle_manager.py +0 -0
  113. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/session_loop_guard.py +0 -0
  114. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/session_orchestrator.py +0 -0
  115. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/session_planner.py +0 -0
  116. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/session_pruning_service.py +0 -0
  117. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/session_replanner.py +0 -0
  118. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/session_repository.py +0 -0
  119. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/session_service.py +0 -0
  120. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/templates/execution_report.md.j2 +0 -0
  121. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/update_checker.py +0 -0
  122. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/validation_rules/__init__.py +0 -0
  123. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/validation_rules/edit.py +0 -0
  124. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/validation_rules/edit_matcher.py +0 -0
  125. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/validation_rules/edit_matcher_heuristics.py +0 -0
  126. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/validation_rules/execute.py +0 -0
  127. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/validation_rules/filesystem.py +0 -0
  128. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/validation_rules/helpers.py +0 -0
  129. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/services/validation_rules/message.py +0 -0
  130. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/utils/__init__.py +0 -0
  131. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/utils/diff.py +0 -0
  132. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/utils/interrupt_guard.py +0 -0
  133. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/utils/io.py +0 -0
  134. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/utils/markdown.py +0 -0
  135. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/utils/serialization.py +0 -0
  136. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/utils/stdin_ownership.py +0 -0
  137. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/utils/string.py +0 -0
  138. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/core/utils/terminal.py +0 -0
  139. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/prompts.py +0 -0
  140. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/registries/__init__.py +0 -0
  141. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/registries/infrastructure.py +0 -0
  142. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/registries/reviewer.py +0 -0
  143. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/registries/validators.py +0 -0
  144. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/resources/__init__.py +0 -0
  145. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/resources/config/__init__.py +0 -0
  146. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/resources/config/config.yaml +0 -0
  147. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/resources/config/init.context +0 -0
  148. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/resources/templates/ARCHITECTURE.md +0 -0
  149. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/resources/templates/MM-NN-vertical-slice.md +0 -0
  150. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/resources/templates/MM-milestone.md +0 -0
  151. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/resources/templates/NN-case-file.md +0 -0
  152. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/resources/templates/NN-task-brief.md +0 -0
  153. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/resources/templates/PROJECT.md +0 -0
  154. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/resources/templates/ci.md +0 -0
  155. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/resources/templates/component-design.md +0 -0
  156. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/resources/templates/makefile.md +0 -0
  157. {teddy_cli-0.1.17.dev1178 → teddy_cli-0.1.17.dev1179}/src/teddy_executor/resources/templates/specification-document.md +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: teddy-cli
3
- Version: 0.1.17.dev1178
3
+ Version: 0.1.17.dev1179
4
4
  Summary: A local-first, file-based AI coding workflow that applies the UNIX philosophy to AI collaboration.
5
5
  Author: Raphael Atteritano
6
6
  License: AGPL-3.0-only
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "teddy-cli"
3
- version = "0.1.17.dev1178"
3
+ version = "0.1.17.dev1179"
4
4
  description = "A local-first, file-based AI coding workflow that applies the UNIX philosophy to AI collaboration."
5
5
  authors = [{ name = "Raphael Atteritano" }]
6
6
  license = { text = "AGPL-3.0-only" }
@@ -53,163 +53,6 @@
53
53
  <step n="1" name="Handoff">Message the user with instructions to start a new session based on the slice's Key Unknowns: if the slice has any unresolved `[ ]` items in `## Key Unknowns`, invoke the Prototyper to de-risk them first. If all Key Unknowns are resolved (`[x]`) or the section is absent, invoke the Developer directly.</step>
54
54
  </phase>
55
55
  </workflow>
56
-
57
- <blueprints>
58
- <blueprint name="Milestone">
59
- <description>The technical execution roadmap for a specific epic. Exclusively owned and created by the Architect.</description>
60
- <section n="1" name="Metadata">
61
- <item name="Heading"># Milestone {{N}}: {{milestone_title}}</item>
62
- <item name="Status">- **Status:** [Planned | In Progress | Completed]</item>
63
- <item name="Specs">- **Specs:** [links]</item>
64
- </section>
65
- <section n="2" name="Goal">
66
- <item name="Description">## Goal (The "Why"): Approved problem definition and core objectives.</item>
67
- </section>
68
- <section n="3" name="Proposed Solution">
69
- <item name="Description">## Proposed Solution (The "What"): Approved tech and trade-offs.</item>
70
- </section>
71
- <section n="4" name="Guidelines">
72
- <item name="Description">## Guidelines (The "How"): Actionable plan. MUST explicitly include Test Harness strategy.</item>
73
- </section>
74
- <section n="5" name="Technical Specifications">
75
- <item name="Description">## Technical Specifications: API contracts and data models.</item>
76
- </section>
77
- <section n="6" name="Vertical Slices">
78
- <item name="Description">## Vertical Slices: High-level checklist of implementation steps.</item>
79
- </section>
80
- </section>
81
- </blueprint>
82
-
83
-
84
- <blueprint name="Component Design Documents">
85
- <description>Applies to ALL design documents (docs/architecture/**/*.md).</description>
86
- <section n="1" name="Metadata">
87
- <item name="Heading"># Component Design: {{component_name}}</item>
88
- <item name="Status">- **Status:** [Planned | Implemented | Refactoring]</item>
89
- </section>
90
- <section n="2" name="Responsibility">
91
- <item name="Heading">## Purpose / Responsibility</item>
92
- </section>
93
- <section n="3" name="Failure Modes">
94
- <item name="Heading">## Failure Modes</item>
95
- <item name="Content">Explicitly list known failure modes for this component. Each entry MUST reference the specific precondition or postcondition it violates. Ports (Interfaces) MUST NOT return generic "error-swallowing" values (like `None` or `False`) to hide internal crashes; instead, they should allow exceptions to propagate to the boundary where they can be handled transparently.</item>
96
- <item name="Content">Format: "- **Failure Title**: Violates the precondition/postcondition 'XYZ'. The component MUST raise a specific exception rather than returning a partial/invalid result."</item>
97
- </section>
98
- <section n="4" name="Class Invariants">
99
- <item name="Heading">## Class Invariants</item>
100
- <item name="Content">Document conditions that must always hold true for instances of this component (e.g., "turn_counter >= 0", "plan is never None after initialization"). Invariants are checked at public method entry and exit. If no invariants apply, state: "None — stateless component."</item>
101
- </section>
102
- <section n="5" name="Ports">
103
- <item name="Heading">## Ports</item>
104
- <item name="Content">Explicit inbound/outbound relationships.</item>
105
- <item name="Content">If this component depends on other Ports' contracts, list them under **Contract Dependencies:** with links to the relevant doc sections. Example: "- Relies on `IFileSystemManager.read()` postcondition 'Returns file content as string'."</item>
106
- </section>
107
- <section n="6" name="Logic">
108
- <item name="Heading">## Implementation Details / Logic</item>
109
- </section>
110
- <section n="7" name="Contracts">
111
- <item name="Heading">## Data Contracts / Methods</item>
112
- <item name="Content">Document every public method with the following standard subsections:</item>
113
- <item name="Content">```text
114
- ### `method_name`
115
- - **Preconditions:** (required) What must be true before calling. Use "must" language: "key must be a non-empty string."
116
- - **Postconditions:** (required) What is guaranteed after successful return. Use "returns" or "ensures" language: "Returns a valid ConfigValue. Ensures the cache is updated."
117
- - **Exceptions:** (required) What errors can be raised and under what conditions.
118
- - **Invariants:** (optional) Class-level invariants that must hold before and after this method executes.
119
- ```</item>
120
- <item name="Content">**Contract Enforcement:** Implementations MUST validate preconditions with explicit guard clauses (assertions or early raises). Postcondition failures MUST be surfaced as specific exceptions, never swallowed. Invariants should be checked at public method entry and exit where practical. Core domain code should enforce contracts at boundary crossings (ports), not deep inside implementation details.</item>
121
- </section>
122
- <directory_conventions>
123
- <rule>Doc path: docs/architecture/BOUNDARY/LAYER/TYPE/name.md -> Source path: src/{pkg}/BOUNDARY/LAYER/TYPE/name.py -> Test path: tests/suites/TEST_TYPE/BOUNDARY/LAYER/TYPE/test_name.py</rule>
124
- <boundary name="core">Layers: domain, ports (inbound/outbound), services.</boundary>
125
- <boundary name="adapters">Layers: inbound, outbound.</boundary>
126
- <boundary name="tests">Treat as first-class boundary. Layers: setup, drivers, observers. Doc path: docs/architecture/tests/TYPE/name.md -> Source: tests/harness/TYPE/name.py.</boundary>
127
- </directory_conventions>
128
- </blueprint>
129
-
130
- <blueprint name="Vertical Slice">
131
- <description>A cohesive feature that delivers a set of correlated and testable behaviors.</description>
132
- <section n="1" name="Metadata">
133
- <item name="Heading"># Slice: {{feature_name}}</item>
134
- <item name="Status">- **Status:** [Planned | In Progress | Completed]</item>
135
- <item name="Milestone">- **Milestone:** [link]</item>
136
- <item name="Specs">- **Specs:** [links]</item>
137
- <item name="Prototype">- **Prototype:** [link]</item>
138
- <item name="Component Docs">- **Component Docs:** [links]</item>
139
- <item name="Scope Slug">- **Scope Slug:** `feature-slug`</item>
140
- </section>
141
- <section n="2" name="Business Goal">
142
- <item name="Heading">## Business Goal</item>
143
- </section>
144
- <section n="3" name="Scenarios">
145
- <item name="Heading">## Scenarios</item>
146
- <item name="Content">Each scenario MUST begin with a user story formatted as a Markdown blockquote (e.g., "> As a [user type], I want to [action] so that [benefit]"). This MUST be immediately followed by a strictly formatted Markdown code block (using ```gherkin) containing the concrete Given/When/Then steps.</item>
147
- </section>
148
- <section n="4" name="Edge Cases">
149
- <item name="Heading">## Edge Cases</item>
150
- <item name="Content">List of anticipated edge cases and failures. Each item MUST follow this format: `- **Title**: If [condition], then [behavior], in order to / because [reason/goal]`.</item>
151
- </section>
152
- <section n="5" name="Key Unknowns">
153
- <item name="Heading">## Key Unknowns</item>
154
- <item name="Content">Checklist of uncertainties and risks identified during scoping. Tag with either `[Technical]` for code/architecture/API uncertainties or `[Functional]` for behavior/UX/interaction needing user preference input. Each item MUST follow this format: `- [ ] [Tag] Title: Description of the unknown` and once resolved `- [x] [Tag] Title: Description of the unknown – Resolution description`</item>
155
- </section>
156
- <section n="6" name="Implementation Plan">
157
- <item name="Heading">## Implementation Plan</item>
158
- <item name="Content">Summary of changes required to integrate the feature into the existing codebase, combined with the actionable strategy and guidelines for implementation (such as Test Harness strategy or Mermaid diagrams). Can be populated by the Architect, Prototyper, Pathfinder, or Debugger, and updated by the Developer.</item>
159
- </section>
160
- <section n="7" name="Deliverables">
161
- <item name="Heading">## Deliverables</item>
162
- <item name="Content">Checklist of atomic units of work ordered following the Tracer Bullet Dependency Sequence: 1. Contract (Interfaces; DTOs; Signatures; Expansion), 2. Harness (Infrastructure; Env), 3. Seam (Abstraction; Toggles; DI), 4. Wiring (The Tracer Bullet: Connecting components to the Composition Root/entrypoints returning trivial/hardcoded data to prove the end-to-end path), 5. Logic (Replacing the Tracer Bullet with complex Rules/Algorithms via TDD), 6. Migration (Updating consumers), 7. Refactor (Internal restructuring; non-breaking), 8. Cleanup (Pruning; Contraction). Every deliverable MUST be an atomic "Green-to-Green" transition; behavioral tests MUST be bundled with Wiring; Unit tests with Logic. Format: `- [ ] **Type** - Description`.</item>
163
- </section>
164
- <section n="8" name="Implementation Notes">
165
- <item name="Heading">## Implementation Notes</item>
166
- <item name="Content">Filled by the Developer as things get implemented. Record of frictions, technical decisions, and findings. Used for the as-built update of Component Docs.</item>
167
- </section>
168
- <section n="9" name="Verification">
169
- <item name="Heading">## Verification</item>
170
- <item name="Content">Checklist of manual smoke-test scenarios that the Developer executes before marking the slice as Complete. Populated by the Architect or Prototyper.</item>
171
- </section>
172
-
173
- </blueprint>
174
-
175
- <blueprint name="Case File">
176
- <description>The formal state snapshot for tracking the bug. Must be created as a NEW file using sequential numbering (NN-{{bug_title}}.md) to invoke the Debugger. NEVER overwrite an existing Case File.</description>
177
- <section n="1" name="Metadata">
178
- <item name="Heading"># Bug: {{bug_title}}</item>
179
- <item name="Status">- **Status:** Unresolved</item>
180
- <item name="Milestone">- **Milestone:** [link or N/A]</item>
181
- <item name="Vertical Slice">- **Vertical Slice:** [link or N/A]</item>
182
- <item name="Specs">- **Specs:** [links or N/A]</item>
183
- </section>
184
- <section n="2" name="Symptoms">
185
- <item name="Heading">## Symptoms</item>
186
- <item name="Content">Expected vs. Actual behavior and minimal reproduction steps. The creating agent should populate this with their current knowledge of the failure.</item>
187
- </section>
188
- <section n="3" name="Context & Scope">
189
- <item name="Heading">## Context & Scope</item>
190
- <item name="Content">### Regressing Delta
191
- [Identify the exact changes responsible for the regression to narrow the search space. Specify if it is in the current workspace or a past commit. Explicitly state which components were altered and summarize the exact changes made (the delta) that likely introduced the bug.]</item>
192
- <item name="Content">### Environmental Triggers
193
- [Describe the specific OS, configurations, or state conditions required to reproduce the issue]</item>
194
- <item name="Content">### Ruled Out
195
- [List any components, layers, or files definitively proven to be unrelated to the bug]</item>
196
- </section>
197
- <section n="4" name="Diagnostic Analysis">
198
- <item name="Heading">## Diagnostic Analysis</item>
199
- <item name="Content">### Causal Model
200
- A concise, causal description of how the faulty SUT operates. Continuously updated as new information is discovered.</item>
201
- <item name="Content">### Discrepancies
202
- A concise list of observations that contradict the current Causal Model. Format: `- Observation. Conflict. (Resolved: Explanation (once resolution is confirmed))`.</item>
203
- <item name="Content">### Investigation History
204
- A concise, numbered log of investigation attempts. Format: `N. Hypothesis. Observation. Conclusion.`.</item>
205
- </section>
206
- <section n="5" name="Solution">
207
- <item name="Heading">## Solution</item>
208
- <item name="Content">A high-level explanation of the root cause, the proven fix, and the systemic preventative measures to prevent this class of issue globally.</item>
209
- </section>
210
- </blueprint>
211
- </blueprints>
212
-
213
56
  <general_rules>
214
57
  <description>All rules in this section apply to every turn, independent of which phase you are currently in.</description>
215
58
  <rule n="1" name="State Transition Protocol">
@@ -261,23 +104,10 @@ WIP & REMINDERS:
261
104
  The entire commit cycle (test, stage, commit, push) MUST occur in a dedicated Version Control turn.
262
105
  1. Pre-conditions: Clean up temporary files (spikes/, .tmp/). If unsure of changes, `EXECUTE git add . && git diff HEAD`.
263
106
  2. Commit Message: Use Conventional Commits '<type>(<scope>): <description>' wrapped in single quotes. Use imperative mood. Append ! for breaking changes.
264
- 3. Execution: You MUST test, stage, commit locally, pull safely with rebase, and push by executing exactly this codeblock:
265
- ```shell
266
- # 1. Stage changes and run pre-commit
267
- git add .
268
- pre-commit run || true
269
-
270
- # 2. Re-stage and Commit
271
- git add .
272
- git commit -m '<type>(<scope>): <description>'
273
-
274
- # 3. Pull and Push (if remote exists)
275
- git pull --rebase && git push || [ -z "$(git remote)" ]
276
- ```
107
+ 3. Execution: You MUST test, stage, commit locally, pull safely with rebase, and push by running `make commit '<type>(<scope>): <description>'`. If a `Makefile` does not exist in the project root, you MUST first create one following the template at `docs/templates/makefile.md`. To bypass pre-commit checks (e.g., for known false positives), use `make commit '<type>(<scope>): <description>' no-verify`.
277
108
  4. Post-conditions: All tests MUST pass (post-commit hook enforces this; never bypass). Pre-commit may be bypassed with --no-verify if needed to bypass non-trivial quality gate failures (like file length); if so, log technical debt in PROJECT.md.
278
109
  </rule>
279
110
 
280
-
281
111
  <rule n="7" name="Standardized Plan Types">
282
112
  Each turn MUST have ONE responsibility. Plan Type MUST be one of:
283
113
  - `Information Gathering`: Using READ, RESEARCH, or grep.
@@ -305,6 +135,10 @@ WIP & REMINDERS:
305
135
 
306
136
  <rule n="10" name="Conflict Resolution Protocol">If any git rebase/pull fails or conflicts: 1. Identify conflicted files via `git status`. 2. `READ` and surgically `EDIT` those files to resolve conflict markers. 3. Run the full test suite to verify correctness. 4. Stage resolved files via `git add`. 5. Complete the rebase via `EXECUTE git rebase --continue`.</rule>
307
137
  <rule n="11" name="Programmatic Edits">You may use `EXECUTE` with bash tools to modify files when surgical `EDIT` matching is brittle or for bulk changes. You MUST scope these actions to specific files and chain a verification command to output the results. Example: `sed 's/old/new/g' <file> > <file>.tmp && mv <file>.tmp <file> && git grep "new_string" <file>`</rule>
138
+
139
+ <rule n="12" name="Template-First Documentation">
140
+ <description>Before creating or modifying a documentation file under docs/, you MUST first READ the corresponding template from docs/templates/. Templates define the required structure and format for each artifact type. Template files are named by artifact type (e.g., specification-document.md, task-brief.md, case-file.md, PROJECT.md, ARCHITECTURE.md). If no template exists for your artifact, READ the most similar one as a reference.</description>
141
+ </rule>
308
142
  </general_rules>
309
143
 
310
144
  <response_format>
@@ -92,23 +92,10 @@ WIP & REMINDERS:
92
92
  The entire commit cycle (test, stage, commit, push) MUST occur in a dedicated Version Control turn.
93
93
  1. Pre-conditions: Clean up temporary files (spikes/, .tmp/). If unsure of changes, `EXECUTE git add . && git diff HEAD`.
94
94
  2. Commit Message: Use Conventional Commits '<type>(<scope>): <description>' wrapped in single quotes. Use imperative mood. Append ! for breaking changes.
95
- 3. Execution: You MUST test, stage, commit locally, pull safely with rebase, and push by executing exactly this codeblock:
96
- ```shell
97
- # 1. Stage changes and run pre-commit
98
- git add .
99
- pre-commit run || true
100
-
101
- # 2. Re-stage and Commit
102
- git add .
103
- git commit -m '<type>(<scope>): <description>'
104
-
105
- # 3. Pull and Push (if remote exists)
106
- git pull --rebase && git push || [ -z "$(git remote)" ]
107
- ```
95
+ 3. Execution: You MUST test, stage, commit locally, pull safely with rebase, and push by running `make commit '<type>(<scope>): <description>'`. If a `Makefile` does not exist in the project root, you MUST first create one following the template at `docs/templates/makefile.md`. To bypass pre-commit checks (e.g., for known false positives), use `make commit '<type>(<scope>): <description>' no-verify`.
108
96
  4. Post-conditions: All tests MUST pass (post-commit hook enforces this; never bypass). Pre-commit may be bypassed with --no-verify if needed to bypass non-trivial quality gate failures (like file length); if so, log technical debt in PROJECT.md.
109
97
  </rule>
110
98
 
111
-
112
99
  <rule n="7" name="Standardized Plan Types">
113
100
  Each turn MUST have ONE responsibility. Plan Type MUST be one of:
114
101
  - `Information Gathering`: Using READ, RESEARCH, or grep.
@@ -136,47 +123,11 @@ WIP & REMINDERS:
136
123
 
137
124
  <rule n="10" name="Conflict Resolution Protocol">If any git rebase/pull fails or conflicts: 1. Identify conflicted files via `git status`. 2. `READ` and surgically `EDIT` those files to resolve conflict markers. 3. Run the full test suite to verify correctness. 4. Stage resolved files via `git add`. 5. Complete the rebase via `EXECUTE git rebase --continue`.</rule>
138
125
  <rule n="11" name="Programmatic Edits">You may use `EXECUTE` with bash tools to modify files when surgical `EDIT` matching is brittle or for bulk changes. You MUST scope these actions to specific files and chain a verification command to output the results. Example: `sed 's/old/new/g' <file> > <file>.tmp && mv <file>.tmp <file> && git grep "new_string" <file>`</rule>
139
- </general_rules>
140
-
141
- <blueprints>
142
- <blueprint name="Case File">
143
- <description>The formal state snapshot for tracking the bug. Must be created as a NEW file using sequential numbering (NN-{{bug_title}}.md) to invoke the Debugger. NEVER overwrite an existing Case File.</description>
144
- <section n="1" name="Metadata">
145
- <item name="Heading"># Bug: {{bug_title}}</item>
146
- <item name="Status">- **Status:** Unresolved</item>
147
- <item name="Milestone">- **Milestone:** [link or N/A]</item>
148
- <item name="Vertical Slice">- **Vertical Slice:** [link or N/A]</item>
149
- <item name="Specs">- **Specs:** [links or N/A]</item>
150
- </section>
151
- <section n="2" name="Symptoms">
152
- <item name="Heading">## Symptoms</item>
153
- <item name="Content">Expected vs. Actual behavior and minimal reproduction steps. The creating agent should populate this with their current knowledge of the failure.</item>
154
- </section>
155
- <section n="3" name="Context & Scope">
156
- <item name="Heading">## Context & Scope</item>
157
- <item name="Content">### Regressing Delta
158
- [Identify the exact changes responsible for the regression to narrow the search space. Specify if it is in the current workspace or a past commit. Explicitly state which components were altered and summarize the exact changes made (the delta) that likely introduced the bug.]</item>
159
- <item name="Content">### Environmental Triggers
160
- [Describe the specific OS, configurations, or state conditions required to reproduce the issue]</item>
161
- <item name="Content">### Ruled Out
162
- [List any components, layers, or files definitively proven to be unrelated to the bug]</item>
163
- </section>
164
- <section n="4" name="Diagnostic Analysis">
165
- <item name="Heading">## Diagnostic Analysis</item>
166
- <item name="Content">### Causal Model
167
- A concise, causal description of how the faulty SUT operates. Continuously updated as new information is discovered.</item>
168
- <item name="Content">### Discrepancies
169
- A concise list of observations that contradict the current Causal Model. Format: `- Observation. Conflict. (Resolved: Explanation (once resolution is confirmed))`.</item>
170
- <item name="Content">### Investigation History
171
- A concise, numbered log of investigation attempts. Format: `N. Hypothesis. Observation. Conclusion.`.</item>
172
- </section>
173
- <section n="5" name="Solution">
174
- <item name="Heading">## Solution</item>
175
- <item name="Content">A high-level explanation of the root cause, the proven fix, and the systemic preventative measures to prevent this class of issue globally.</item>
176
- </section>
177
- </blueprint>
178
- </blueprints>
179
126
 
127
+ <rule n="12" name="Template-First Documentation">
128
+ <description>Before creating or modifying a documentation file under docs/, you MUST first READ the corresponding template from docs/templates/. Templates define the required structure and format for each artifact type. Template files are named by artifact type (e.g., specification-document.md, task-brief.md, case-file.md, PROJECT.md, ARCHITECTURE.md). If no template exists for your artifact, READ the most similar one as a reference.</description>
129
+ </rule>
130
+ </general_rules>
180
131
  <response_format>
181
132
  <title>Markdown Response Protocol (MRP)</title>
182
133
  <description>Your entire response is parsed into an AST and must strictly adhere to the formatting rules below. Any deviation will cause a validation failure.</description>
@@ -12,7 +12,7 @@
12
12
  <phase n="1" name="Reproduction">
13
13
  <goal>Gather context and build/verify an end-to-end Minimal Reproducible Example (MRE).</goal>
14
14
  <step n="1" name="Case File Check">If a Case File was not provided in the initial context, you MUST CREATE one following the Case File Blueprint.</step>
15
- <step n="2" name="Context & History Gathering">Use `EXECUTE` (`git grep`, `git log -n 5 --stat`), `READ`, and `RESEARCH` to understand the codebase, recent changes, and identify the last known green CI run or commit. For historical CI failures, do NOT try to read the entire log. You MUST first use `gh run view [ID]` to see the execution tree and identify the exact name of the failed step. Then, extract ONLY that step's logs (stripping ANSI and boilerplate) by executing: `gh run view [ID] --log | awk -F'\t' '$2=="FAILED_STEP_NAME" { if(j!=$1){j=$1; print "\n["j"]"} l=$3; p=index(l,"Z "); if(p>0)l=substr(l,p+2); gsub(/\x1B\[[0-9;]*[a-zA-Z]/, "", l); gsub(/\^\[\[[0-9;]*[a-zA-Z]/, "", l); if(l ~ /^##\[group\]Run /){k=1;next} if(k && l ~ /^##\[endgroup\]/){k=0;next} if(k)next; if(l ~ /^##\[group\]/ || l ~ /^##\[endgroup\]/)next; gsub(/^##\[error\]/, "Error: ", l); print l }'`.</step>
15
+ <step n="2" name="Context & History Gathering">Use `EXECUTE` (`git grep`, `git log -n 5 --stat`), `READ`, and `RESEARCH` to understand the codebase, recent changes, and identify the last known green CI run or commit. For historical CI failures, do NOT try to read the entire log. You MUST first use `gh run view [ID]` to see the execution tree and identify the exact name of the failed step. Then, extract ONLY that step's logs (stripping ANSI and boilerplate) by executing: `gh run view [ID] --log | awk -F'\t' '$2=="[FAILED_STEP_NAME]" { if(j!=$1){j=$1; print "\n["j"]"} l=$3; p=index(l,"Z "); if(p>0)l=substr(l,p+2); gsub(/\x1B\[[0-9;]*[a-zA-Z]/, "", l); gsub(/\^\[\[[0-9;]*[a-zA-Z]/, "", l); if(l ~ /^##\[group\]Run /){k=1;next} if(k && l ~ /^##\[endgroup\]/){k=0;next} if(k)next; if(l ~ /^##\[group\]/ || l ~ /^##\[endgroup\]/)next; gsub(/^##\[error\]/, "Error: ", l); print l }'`.</step>
16
16
  <step n="3" name="Diagnostic MRE & Platform Check">CREATE a self-contained MRE script (`spikes/debug/{{NN}}-{{bug_title}}-mre.{{ext}}`) that imports the target components directly from `src/` to reproduce the symptom of the bug. It MUST fail currently. If the bug depends on specific environment conditions, mock them inside the script without permanently changing the host. Immediately after execution, `EDIT` the Case File to establish the causal baseline. If the bug is platform-specific (e.g., fails in CI but passes locally), immediately pivot to the Remote Probing Protocol (RPP) and skip local reproduction. If you determine the bug is platform-specific after a local attempt, you MUST NOT continue local work; transition to Remote Probing for all subsequent checks.</step>
17
17
  </phase>
18
18
 
@@ -130,23 +130,10 @@ WIP & REMINDERS:
130
130
  The entire commit cycle (test, stage, commit, push) MUST occur in a dedicated Version Control turn.
131
131
  1. Pre-conditions: Clean up temporary files (spikes/, .tmp/). If unsure of changes, `EXECUTE git add . && git diff HEAD`.
132
132
  2. Commit Message: Use Conventional Commits '<type>(<scope>): <description>' wrapped in single quotes. Use imperative mood. Append ! for breaking changes.
133
- 3. Execution: You MUST test, stage, commit locally, pull safely with rebase, and push by executing exactly this codeblock:
134
- ```shell
135
- # 1. Stage changes and run pre-commit
136
- git add .
137
- pre-commit run || true
138
-
139
- # 2. Re-stage and Commit
140
- git add .
141
- git commit -m '<type>(<scope>): <description>'
142
-
143
- # 3. Pull and Push (if remote exists)
144
- git pull --rebase && git push || [ -z "$(git remote)" ]
145
- ```
133
+ 3. Execution: You MUST test, stage, commit locally, pull safely with rebase, and push by running `make commit '<type>(<scope>): <description>'`. If a `Makefile` does not exist in the project root, you MUST first create one following the template at `docs/templates/makefile.md`. To bypass pre-commit checks (e.g., for known false positives), use `make commit '<type>(<scope>): <description>' no-verify`.
146
134
  4. Post-conditions: All tests MUST pass (post-commit hook enforces this; never bypass). Pre-commit may be bypassed with --no-verify if needed to bypass non-trivial quality gate failures (like file length); if so, log technical debt in PROJECT.md.
147
135
  </rule>
148
136
 
149
-
150
137
  <rule n="7" name="Standardized Plan Types">
151
138
  Each turn MUST have ONE responsibility. Plan Type MUST be one of:
152
139
  - `Information Gathering`: Using READ, RESEARCH, or grep.
@@ -174,116 +161,19 @@ WIP & REMINDERS:
174
161
 
175
162
  <rule n="10" name="Debug Mode & Branch by Abstraction">Permanent diagnostic/prototype branching MUST be documented in `ARCHITECTURE.md` and MUST adhere to: 1. Zero-Cost Guards (Language-native dead-code elimination), 2. Composition Root Injection (Mid-logic checks are forbidden), and 3. Scoped Toggles & State Dumps.</rule>
176
163
 
177
- <rule n="11" name="Remote Probing Protocol (RPP)">
164
+ <rule n="11" name="Remote Probing Protocol (RPP)">
178
165
  <description>For CI/platform-specific bugs that cannot be probed locally.</description>
179
- 1. Pre-flight Check: Verify that `.github/workflows/debug.yml` exists. If not, you MUST CREATE a minimal triggerable workflow (using `workflow_dispatch`) and commit it before proceeding.
180
- 2. Probe File: Consolidate diagnostic logic into a shell entry point `spikes/debug/remote_probe.sh`. You SHOULD use the "Heredoc" pattern to keep the probe to a single file.
181
- 3. Execution: You MUST execute the following standardized codeblock to EXECUTE with a 300s Timeout in order to push the probe, trigger the mailbox, and retrieve distilled results:
182
- ~~~~~~shell
183
- # 1. Commit and push the probe code only
184
- git add -f spikes/debug/<file> && git commit -m 'debug: probe' --no-verify && git push
185
-
186
- # 2. Trigger the remote workflow
187
- gh workflow run <workflow.yml> --field reason='[Reason]'
188
-
189
- # 3. Wait for registration and watch
190
- sleep 10
191
- RUN_ID=$(gh run list -w <workflow.yml> -L 1 --json databaseId -q '.[0].databaseId')
192
- gh run watch $RUN_ID
193
-
194
- 4. Retrieve Logs
195
- gh run view $RUN_ID --log | awk -F'\t' 'BEGIN { print "\n=== REMOTE PROBE LOG START ===" } $2=="STEP_NAME" { if(j!=$1){j=$1; print "\n["j"]"} l=$3; p=index(l,"Z "); if(p>0)l=substr(l,p+2); gsub(/\x1B\[[0-9;]*[a-zA-Z]/, "", l); gsub(/\^\[\[[0-9;]*[a-zA-Z]/, "", l); if(l ~ /^##\[group\]Run /){k=1;next} if(k && l ~ /^##\[endgroup\]/){k=0;next} if(k)next; if(l ~ /^##\[group\]/ || l ~ /^##\[endgroup\]/)next; gsub(/^##\[error\]/, "Error: ", l); print l } END { print "=== REMOTE PROBE LOG END ===\n" }'
196
- ~~~~~~
197
- 4. Timeout Recovery: If the execution times out or `gh run view` reports the run is still in progress, EXECUTE step 3 and 4 of the execution block again using the `RUN_ID` from your history and ensuring you've set the Timeout action parameter.
166
+ 1. Pre-flight Check: Verify that `.github/workflows/debug.yml` exists. You MUST first READ docs/templates/ci.md before creating or modifying the debug workflow. If the workflow does not exist, you MUST CREATE a minimal triggerable workflow (using `workflow_dispatch`) following the ci.md template, and commit it before proceeding.
167
+ 2. Probe File: Consolidate diagnostic logic into a shell entry point `spikes/debug/probe.sh`. Before writing the probe script, first READ the makefile.md template at `docs/templates/makefile.md` for the Probe Script pattern (the probe output must be written to `spikes/debug/probe_output.txt` for artifact upload). You SHOULD use the "Heredoc" pattern to keep the probe to a single file.
168
+ 3. Execution: You MUST use `make probe '<reason>'` to push the probe, trigger the workflow, and retrieve logs. The `make probe` command handles the entire workflow: commit (with `--allow-empty`), push, dispatch, and log retrieval. If a `Makefile` does not exist in the project root, you MUST first create one following the template at `docs/templates/makefile.md`.
198
169
  </rule>
199
170
  <rule n="12" name="Conflict Resolution Protocol">If any git rebase/pull fails or conflicts: 1. Identify conflicted files via `git status`. 2. `READ` and surgically `EDIT` those files to resolve conflict markers. 3. Run the full test suite to verify correctness. 4. Stage resolved files via `git add`. 5. Complete the rebase via `EXECUTE git rebase --continue`.</rule>
200
171
  <rule n="13" name="Programmatic Edits">You may use `EXECUTE` with bash tools to modify files when surgical `EDIT` matching is brittle or for bulk changes. You MUST scope these actions to specific files and chain a verification command to output the results. Example: `sed 's/old/new/g' <file> > <file>.tmp && mv <file>.tmp <file> && git grep "new_string" <file>`</rule>
201
- </general_rules>
202
-
203
- <blueprints>
204
- <blueprint name="Vertical Slice">
205
- <description>A cohesive feature that delivers a set of correlated and testable behaviors.</description>
206
- <section n="1" name="Metadata">
207
- <item name="Heading"># Slice: {{feature_name}}</item>
208
- <item name="Status">- **Status:** [Planned | In Progress | Completed]</item>
209
- <item name="Milestone">- **Milestone:** [link]</item>
210
- <item name="Specs">- **Specs:** [links]</item>
211
- <item name="Prototype">- **Prototype:** [link]</item>
212
- <item name="Component Docs">- **Component Docs:** [links]</item>
213
- <item name="Scope Slug">- **Scope Slug:** `feature-slug`</item>
214
- </section>
215
- <section n="2" name="Business Goal">
216
- <item name="Heading">## Business Goal</item>
217
- </section>
218
- <section n="3" name="Scenarios">
219
- <item name="Heading">## Scenarios</item>
220
- <item name="Content">Each scenario MUST begin with a user story formatted as a Markdown blockquote (e.g., "> As a [user type], I want to [action] so that [benefit]"). This MUST be immediately followed by a strictly formatted Markdown code block (using ```gherkin) containing the concrete Given/When/Then steps.</item>
221
- </section>
222
- <section n="4" name="Edge Cases">
223
- <item name="Heading">## Edge Cases</item>
224
- <item name="Content">List of anticipated edge cases and failures. Each item MUST follow this format: `- **Title**: If [condition], then [behavior], in order to / because [reason/goal]`.</item>
225
- </section>
226
- <section n="5" name="Key Unknowns">
227
- <item name="Heading">## Key Unknowns</item>
228
- <item name="Content">Checklist of uncertainties and risks identified during scoping. Tag with either `[Technical]` for code/architecture/API uncertainties or `[Functional]` for behavior/UX/interaction needing user preference input. Each item MUST follow this format: `- [ ] [Tag] Title: Description of the unknown` and once resolved `- [x] [Tag] Title: Description of the unknown – Resolution description`</item>
229
- </section>
230
- <section n="6" name="Implementation Plan">
231
- <item name="Heading">## Implementation Plan</item>
232
- <item name="Content">Summary of changes required to integrate the feature into the existing codebase, combined with the actionable strategy and guidelines for implementation (such as Test Harness strategy or Mermaid diagrams). Can be populated by the Architect, Prototyper, Pathfinder, or Debugger, and updated by the Developer.</item>
233
- </section>
234
- <section n="7" name="Deliverables">
235
- <item name="Heading">## Deliverables</item>
236
- <item name="Content">Checklist of atomic units of work ordered following the Tracer Bullet Dependency Sequence: 1. Contract (Interfaces; DTOs; Signatures; Expansion), 2. Harness (Infrastructure; Env), 3. Seam (Abstraction; Toggles; DI), 4. Wiring (The Tracer Bullet: Connecting components to the Composition Root/entrypoints returning trivial/hardcoded data to prove the end-to-end path), 5. Logic (Replacing the Tracer Bullet with complex Rules/Algorithms via TDD), 6. Migration (Updating consumers), 7. Refactor (Internal restructuring; non-breaking), 8. Cleanup (Pruning; Contraction). Every deliverable MUST be an atomic "Green-to-Green" transition; behavioral tests MUST be bundled with Wiring; Unit tests with Logic. Format: `- [ ] **Type** - Description`.</item>
237
- </section>
238
- <section n="8" name="Implementation Notes">
239
- <item name="Heading">## Implementation Notes</item>
240
- <item name="Content">Filled by the Developer as things get implemented. Record of frictions, technical decisions, and findings. Used for the as-built update of Component Docs.</item>
241
- </section>
242
- <section n="9" name="Verification">
243
- <item name="Heading">## Verification</item>
244
- <item name="Content">Checklist of manual smoke-test scenarios that the Developer executes before marking the slice as Complete. Populated by the Architect or Prototyper.</item>
245
- </section>
246
-
247
- </blueprint>
248
-
249
- <blueprint name="Case File">
250
- <description>The formal state snapshot for tracking the bug. Must be created as a NEW file using sequential numbering (NN-{{bug_title}}.md). NEVER overwrite an existing Case File.</description>
251
- <section n="1" name="Metadata">
252
- <item name="Heading"># Bug: {{bug_title}}</item>
253
- <item name="Status">- **Status:** Unresolved</item>
254
- <item name="Milestone">- **Milestone:** [link or N/A]</item>
255
- <item name="Vertical Slice">- **Vertical Slice:** [link or N/A]</item>
256
- <item name="Specs">- **Specs:** [links or N/A]</item>
257
- </section>
258
- <section n="2" name="Symptoms">
259
- <item name="Heading">## Symptoms</item>
260
- <item name="Content">Expected vs. Actual behavior and minimal reproduction steps.</item>
261
- </section>
262
- <section n="3" name="Context & Scope">
263
- <item name="Heading">## Context & Scope</item>
264
- <item name="Content">### Regressing Delta
265
- [Identify the exact changes responsible for the regression to narrow the search space. Specify if it is in the current workspace or a past commit. Explicitly state which components were altered and summarize the exact changes made (the delta) that likely introduced the bug.]</item>
266
- <item name="Content">### Environmental Triggers
267
- [Describe the specific OS, configurations, or state conditions required to reproduce the issue]</item>
268
- <item name="Content">### Ruled Out
269
- [List any components, layers, or files definitively proven to be unrelated to the bug]</item>
270
- </section>
271
- <section n="4" name="Diagnostic Analysis">
272
- <item name="Heading">## Diagnostic Analysis</item>
273
- <item name="Content">### Causal Model
274
- A concise, causal description of how the faulty SUT operates. Continuously updated as new information is discovered.</item>
275
- <item name="Content">### Discrepancies
276
- A concise list of observations that contradict the current Causal Model. Format: `- Observation. Conflict. (Resolved: Explanation (once resolution is confirmed))`.</item>
277
- <item name="Content">### Investigation History
278
- A concise, numbered log of investigation attempts. Format: `N. Hypothesis. Observation. Conclusion.`.</item>
279
- </section>
280
- <section n="5" name="Solution">
281
- <item name="Heading">## Solution</item>
282
- <item name="Content">A high-level explanation of the root cause, the proven fix, and the systemic preventative measures to prevent this class of issue globally.</item>
283
- </section>
284
- </blueprint>
285
- </blueprints>
286
172
 
173
+ <rule n="14" name="Template-First Documentation">
174
+ <description>Before creating or modifying a documentation file under docs/, you MUST first READ the corresponding template from docs/templates/. Templates define the required structure and format for each artifact type. Template files are named by artifact type (e.g., specification-document.md, task-brief.md, case-file.md, PROJECT.md, ARCHITECTURE.md). If no template exists for your artifact, READ the most similar one as a reference.</description>
175
+ </rule>
176
+ </general_rules>
287
177
  <response_format>
288
178
  <title>Markdown Response Protocol (MRP)</title>
289
179
  <description>Your entire response is parsed into an AST and must strictly adhere to the formatting rules below. Any deviation will cause a validation failure.</description>
@@ -162,23 +162,10 @@ WIP & REMINDERS:
162
162
  The entire commit cycle (test, stage, commit, push) MUST occur in a dedicated Version Control turn.
163
163
  1. Pre-conditions: Clean up temporary files (spikes/, .tmp/). If unsure of changes, `EXECUTE git add . && git diff HEAD`.
164
164
  2. Commit Message: Use Conventional Commits '<type>(<scope>): <description>' wrapped in single quotes. Use imperative mood. Append ! for breaking changes.
165
- 3. Execution: You MUST test, stage, commit locally, pull safely with rebase, and push by executing exactly this codeblock:
166
- ```shell
167
- # 1. Stage changes and run pre-commit
168
- git add .
169
- pre-commit run || true
170
-
171
- # 2. Re-stage and Commit
172
- git add .
173
- git commit -m '<type>(<scope>): <description>'
174
-
175
- # 3. Pull and Push (if remote exists)
176
- git pull --rebase && git push || [ -z "$(git remote)" ]
177
- ```
165
+ 3. Execution: You MUST test, stage, commit locally, pull safely with rebase, and push by running `make commit '<type>(<scope>): <description>'`. If a `Makefile` does not exist in the project root, you MUST first create one following the template at `docs/templates/makefile.md`. To bypass pre-commit checks (e.g., for known false positives), use `make commit '<type>(<scope>): <description>' no-verify`.
178
166
  4. Post-conditions: All tests MUST pass (post-commit hook enforces this; never bypass). Pre-commit may be bypassed with --no-verify if needed to bypass non-trivial quality gate failures (like file length); if so, log technical debt in PROJECT.md.
179
167
  </rule>
180
168
 
181
-
182
169
  <rule n="7" name="Standardized Plan Types">
183
170
  Each turn MUST have ONE responsibility. Plan Type MUST be one of:
184
171
  - `Information Gathering`: Using READ, RESEARCH, or grep.
@@ -214,93 +201,11 @@ WIP & REMINDERS:
214
201
 
215
202
  <rule n="12" name="Conflict Resolution Protocol">If any git rebase/pull fails or conflicts: 1. Identify conflicted files via `git status`. 2. `READ` and surgically `EDIT` those files to resolve conflict markers. 3. Run the full test suite to verify correctness. 4. Stage resolved files via `git add`. 5. Complete the rebase via `EXECUTE git rebase --continue`.</rule>
216
203
  <rule n="13" name="Programmatic Edits">You may use `EXECUTE` with bash tools to modify files when surgical `EDIT` matching is brittle or for bulk changes. You MUST scope these actions to specific files and chain a verification command to output the results. Example: `sed 's/old/new/g' <file> > <file>.tmp && mv <file>.tmp <file> && git grep "new_string" <file>`</rule>
217
- </general_rules>
218
-
219
- <blueprints>
220
- <blueprint name="Vertical Slice">
221
- <description>A cohesive feature that delivers a set of correlated and testable behaviors.</description>
222
- <section n="1" name="Metadata">
223
- <item name="Heading"># Slice: {{feature_name}}</item>
224
- <item name="Status">- **Status:** [Planned | In Progress | Completed]</item>
225
- <item name="Milestone">- **Milestone:** [link]</item>
226
- <item name="Specs">- **Specs:** [links]</item>
227
- <item name="Prototype">- **Prototype:** [link]</item>
228
- <item name="Component Docs">- **Component Docs:** [links]</item>
229
- <item name="Scope Slug">- **Scope Slug:** `feature-slug`</item>
230
- </section>
231
- <section n="2" name="Business Goal">
232
- <item name="Heading">## Business Goal</item>
233
- </section>
234
- <section n="3" name="Scenarios">
235
- <item name="Heading">## Scenarios</item>
236
- <item name="Content">Each scenario MUST begin with a user story formatted as a Markdown blockquote (e.g., "> As a [user type], I want to [action] so that [benefit]"). This MUST be immediately followed by a strictly formatted Markdown code block (using ```gherkin) containing the concrete Given/When/Then steps.</item>
237
- </section>
238
- <section n="4" name="Edge Cases">
239
- <item name="Heading">## Edge Cases</item>
240
- <item name="Content">List of anticipated edge cases and failures. Each item MUST follow this format: `- **Title**: If [condition], then [behavior], in order to / because [reason/goal]`.</item>
241
- </section>
242
- <section n="5" name="Key Unknowns">
243
- <item name="Heading">## Key Unknowns</item>
244
- <item name="Content">Checklist of uncertainties and risks identified during scoping. Tag with either `[Technical]` for code/architecture/API uncertainties or `[Functional]` for behavior/UX/interaction needing user preference input. Each item MUST follow this format: `- [ ] [Tag] Title: Description of the unknown` and once resolved `- [x] [Tag] Title: Description of the unknown – Resolution description`</item>
245
- </section>
246
- <section n="6" name="Implementation Plan">
247
- <item name="Heading">## Implementation Plan</item>
248
- <item name="Content">Summary of changes required to integrate the feature into the existing codebase, combined with the actionable strategy and guidelines for implementation (such as Test Harness strategy or Mermaid diagrams). Can be populated by the Architect, Prototyper, Pathfinder, or Debugger, and updated by the Developer.</item>
249
- </section>
250
- <section n="7" name="Deliverables">
251
- <item name="Heading">## Deliverables</item>
252
- <item name="Content">Checklist of atomic units of work ordered following the Tracer Bullet Dependency Sequence: 1. Contract (Interfaces; DTOs; Signatures; Expansion), 2. Harness (Infrastructure; Env), 3. Seam (Abstraction; Toggles; DI), 4. Wiring (The Tracer Bullet: Connecting components to the Composition Root/entrypoints returning trivial/hardcoded data to prove the end-to-end path), 5. Logic (Replacing the Tracer Bullet with complex Rules/Algorithms via TDD), 6. Migration (Updating consumers), 7. Refactor (Internal restructuring; non-breaking), 8. Cleanup (Pruning; Contraction). Every deliverable MUST be an atomic "Green-to-Green" transition; behavioral tests MUST be bundled with Wiring; Unit tests with Logic. Format: `- [ ] **Type** - Description`.</item>
253
- </section>
254
- <section n="8" name="Implementation Notes">
255
- <item name="Heading">## Implementation Notes</item>
256
- <item name="Content">Filled by the Developer as things get implemented. Record of frictions, technical decisions, and findings. Used for the as-built update of Component Docs.</item>
257
- </section>
258
- <section n="9" name="Verification">
259
- <item name="Heading">## Verification</item>
260
- <item name="Content">Checklist of manual smoke-test scenarios that the Developer executes before marking the slice as Complete. Populated by the Architect or Prototyper.</item>
261
- </section>
262
-
263
- </blueprint>
264
-
265
- <blueprint name="Case File">
266
- <description>The formal state snapshot for tracking the bug. Must be created as a NEW file using sequential numbering (NN-{{bug_title}}.md) to invoke the Debugger. NEVER overwrite an existing Case File.</description>
267
- <section n="1" name="Metadata">
268
- <item name="Heading"># Bug: {{bug_title}}</item>
269
- <item name="Status">- **Status:** Unresolved</item>
270
- <item name="Milestone">- **Milestone:** [link or N/A]</item>
271
- <item name="Vertical Slice">- **Vertical Slice:** [link or N/A]</item>
272
- <item name="Specs">- **Specs:** [links or N/A]</item>
273
- </section>
274
- <section n="2" name="Symptoms">
275
- <item name="Heading">## Symptoms</item>
276
- <item name="Content">Expected vs. Actual behavior and minimal reproduction steps. The creating agent should populate this with their current knowledge of the failure.</item>
277
- </section>
278
- <section n="3" name="Context & Scope">
279
- <item name="Heading">## Context & Scope</item>
280
- <item name="Content">### Regressing Delta
281
- [Identify the exact changes responsible for the regression to narrow the search space. Specify if it is in the current workspace or a past commit. Explicitly state which components were altered and summarize the exact changes made (the delta) that likely introduced the bug.]</item>
282
- <item name="Content">### Environmental Triggers
283
- [Describe the specific OS, configurations, or state conditions required to reproduce the issue]</item>
284
- <item name="Content">### Ruled Out
285
- [List any components, layers, or files definitively proven to be unrelated to the bug]</item>
286
- </section>
287
- <section n="4" name="Diagnostic Analysis">
288
- <item name="Heading">## Diagnostic Analysis</item>
289
- <item name="Content">### Causal Model
290
- A concise, causal description of how the faulty SUT operates. Continuously updated as new information is discovered.</item>
291
- <item name="Content">### Discrepancies
292
- A concise list of observations that contradict the current Causal Model. Format: `- Observation. Conflict. (Resolved: Explanation (once resolution is confirmed))`.</item>
293
- <item name="Content">### Investigation History
294
- A concise, numbered log of investigation attempts. Format: `N. Hypothesis. Observation. Conclusion.`.</item>
295
- </section>
296
- <section n="5" name="Solution">
297
- <item name="Heading">## Solution</item>
298
- <item name="Content">A high-level explanation of the root cause, the proven fix, and the systemic preventative measures to prevent this class of issue globally.</item>
299
- </section>
300
- </blueprint>
301
-
302
- </blueprints>
303
204
 
205
+ <rule n="14" name="Template-First Documentation">
206
+ <description>Before creating or modifying a documentation file under docs/, you MUST first READ the corresponding template from docs/templates/. Templates define the required structure and format for each artifact type. Template files are named by artifact type (e.g., specification-document.md, task-brief.md, case-file.md, PROJECT.md, ARCHITECTURE.md). If no template exists for your artifact, READ the most similar one as a reference.</description>
207
+ </rule>
208
+ </general_rules>
304
209
  <response_format>
305
210
  <title>Markdown Response Protocol (MRP)</title>
306
211
  <description>Your entire response is parsed into an AST and must strictly adhere to the formatting rules below. Any deviation will cause a validation failure.</description>