newcode 0.1.1__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 (287) hide show
  1. newcode-0.1.1/.gitignore +47 -0
  2. newcode-0.1.1/LICENSE +21 -0
  3. newcode-0.1.1/PKG-INFO +154 -0
  4. newcode-0.1.1/README.md +111 -0
  5. newcode-0.1.1/code_puppy/__init__.py +10 -0
  6. newcode-0.1.1/code_puppy/__main__.py +10 -0
  7. newcode-0.1.1/code_puppy/agents/__init__.py +31 -0
  8. newcode-0.1.1/code_puppy/agents/agent_c_reviewer.py +155 -0
  9. newcode-0.1.1/code_puppy/agents/agent_code_puppy.py +147 -0
  10. newcode-0.1.1/code_puppy/agents/agent_code_reviewer.py +90 -0
  11. newcode-0.1.1/code_puppy/agents/agent_cpp_reviewer.py +132 -0
  12. newcode-0.1.1/code_puppy/agents/agent_creator_agent.py +630 -0
  13. newcode-0.1.1/code_puppy/agents/agent_golang_reviewer.py +151 -0
  14. newcode-0.1.1/code_puppy/agents/agent_helios.py +122 -0
  15. newcode-0.1.1/code_puppy/agents/agent_javascript_reviewer.py +160 -0
  16. newcode-0.1.1/code_puppy/agents/agent_manager.py +742 -0
  17. newcode-0.1.1/code_puppy/agents/agent_pack_leader.py +380 -0
  18. newcode-0.1.1/code_puppy/agents/agent_planning.py +165 -0
  19. newcode-0.1.1/code_puppy/agents/agent_python_programmer.py +167 -0
  20. newcode-0.1.1/code_puppy/agents/agent_python_reviewer.py +90 -0
  21. newcode-0.1.1/code_puppy/agents/agent_qa_expert.py +163 -0
  22. newcode-0.1.1/code_puppy/agents/agent_qa_kitten.py +208 -0
  23. newcode-0.1.1/code_puppy/agents/agent_scheduler.py +121 -0
  24. newcode-0.1.1/code_puppy/agents/agent_security_auditor.py +181 -0
  25. newcode-0.1.1/code_puppy/agents/agent_terminal_qa.py +323 -0
  26. newcode-0.1.1/code_puppy/agents/agent_typescript_reviewer.py +166 -0
  27. newcode-0.1.1/code_puppy/agents/base_agent.py +2145 -0
  28. newcode-0.1.1/code_puppy/agents/event_stream_handler.py +348 -0
  29. newcode-0.1.1/code_puppy/agents/json_agent.py +202 -0
  30. newcode-0.1.1/code_puppy/agents/pack/__init__.py +34 -0
  31. newcode-0.1.1/code_puppy/agents/pack/bloodhound.py +296 -0
  32. newcode-0.1.1/code_puppy/agents/pack/husky.py +307 -0
  33. newcode-0.1.1/code_puppy/agents/pack/retriever.py +380 -0
  34. newcode-0.1.1/code_puppy/agents/pack/shepherd.py +327 -0
  35. newcode-0.1.1/code_puppy/agents/pack/terrier.py +281 -0
  36. newcode-0.1.1/code_puppy/agents/pack/watchdog.py +357 -0
  37. newcode-0.1.1/code_puppy/agents/prompt_reviewer.py +145 -0
  38. newcode-0.1.1/code_puppy/agents/subagent_stream_handler.py +276 -0
  39. newcode-0.1.1/code_puppy/api/__init__.py +13 -0
  40. newcode-0.1.1/code_puppy/api/app.py +169 -0
  41. newcode-0.1.1/code_puppy/api/main.py +21 -0
  42. newcode-0.1.1/code_puppy/api/pty_manager.py +453 -0
  43. newcode-0.1.1/code_puppy/api/routers/__init__.py +12 -0
  44. newcode-0.1.1/code_puppy/api/routers/agents.py +36 -0
  45. newcode-0.1.1/code_puppy/api/routers/commands.py +217 -0
  46. newcode-0.1.1/code_puppy/api/routers/config.py +75 -0
  47. newcode-0.1.1/code_puppy/api/routers/sessions.py +234 -0
  48. newcode-0.1.1/code_puppy/api/templates/terminal.html +361 -0
  49. newcode-0.1.1/code_puppy/api/websocket.py +154 -0
  50. newcode-0.1.1/code_puppy/callbacks.py +674 -0
  51. newcode-0.1.1/code_puppy/chatgpt_codex_client.py +338 -0
  52. newcode-0.1.1/code_puppy/claude_cache_client.py +664 -0
  53. newcode-0.1.1/code_puppy/cli_runner.py +1038 -0
  54. newcode-0.1.1/code_puppy/command_line/__init__.py +1 -0
  55. newcode-0.1.1/code_puppy/command_line/add_model_menu.py +1092 -0
  56. newcode-0.1.1/code_puppy/command_line/agent_menu.py +662 -0
  57. newcode-0.1.1/code_puppy/command_line/attachments.py +395 -0
  58. newcode-0.1.1/code_puppy/command_line/autosave_menu.py +704 -0
  59. newcode-0.1.1/code_puppy/command_line/clipboard.py +527 -0
  60. newcode-0.1.1/code_puppy/command_line/colors_menu.py +526 -0
  61. newcode-0.1.1/code_puppy/command_line/command_handler.py +283 -0
  62. newcode-0.1.1/code_puppy/command_line/command_registry.py +150 -0
  63. newcode-0.1.1/code_puppy/command_line/config_commands.py +719 -0
  64. newcode-0.1.1/code_puppy/command_line/core_commands.py +853 -0
  65. newcode-0.1.1/code_puppy/command_line/diff_menu.py +865 -0
  66. newcode-0.1.1/code_puppy/command_line/file_path_completion.py +73 -0
  67. newcode-0.1.1/code_puppy/command_line/load_context_completion.py +52 -0
  68. newcode-0.1.1/code_puppy/command_line/mcp/__init__.py +10 -0
  69. newcode-0.1.1/code_puppy/command_line/mcp/base.py +32 -0
  70. newcode-0.1.1/code_puppy/command_line/mcp/catalog_server_installer.py +175 -0
  71. newcode-0.1.1/code_puppy/command_line/mcp/custom_server_form.py +688 -0
  72. newcode-0.1.1/code_puppy/command_line/mcp/custom_server_installer.py +195 -0
  73. newcode-0.1.1/code_puppy/command_line/mcp/edit_command.py +148 -0
  74. newcode-0.1.1/code_puppy/command_line/mcp/handler.py +138 -0
  75. newcode-0.1.1/code_puppy/command_line/mcp/help_command.py +147 -0
  76. newcode-0.1.1/code_puppy/command_line/mcp/install_command.py +214 -0
  77. newcode-0.1.1/code_puppy/command_line/mcp/install_menu.py +705 -0
  78. newcode-0.1.1/code_puppy/command_line/mcp/list_command.py +94 -0
  79. newcode-0.1.1/code_puppy/command_line/mcp/logs_command.py +235 -0
  80. newcode-0.1.1/code_puppy/command_line/mcp/remove_command.py +82 -0
  81. newcode-0.1.1/code_puppy/command_line/mcp/restart_command.py +100 -0
  82. newcode-0.1.1/code_puppy/command_line/mcp/search_command.py +123 -0
  83. newcode-0.1.1/code_puppy/command_line/mcp/start_all_command.py +135 -0
  84. newcode-0.1.1/code_puppy/command_line/mcp/start_command.py +117 -0
  85. newcode-0.1.1/code_puppy/command_line/mcp/status_command.py +184 -0
  86. newcode-0.1.1/code_puppy/command_line/mcp/stop_all_command.py +112 -0
  87. newcode-0.1.1/code_puppy/command_line/mcp/stop_command.py +80 -0
  88. newcode-0.1.1/code_puppy/command_line/mcp/test_command.py +107 -0
  89. newcode-0.1.1/code_puppy/command_line/mcp/utils.py +129 -0
  90. newcode-0.1.1/code_puppy/command_line/mcp/wizard_utils.py +334 -0
  91. newcode-0.1.1/code_puppy/command_line/mcp_completion.py +174 -0
  92. newcode-0.1.1/code_puppy/command_line/model_picker_completion.py +197 -0
  93. newcode-0.1.1/code_puppy/command_line/model_settings_menu.py +932 -0
  94. newcode-0.1.1/code_puppy/command_line/motd.py +91 -0
  95. newcode-0.1.1/code_puppy/command_line/onboarding_slides.py +179 -0
  96. newcode-0.1.1/code_puppy/command_line/onboarding_wizard.py +342 -0
  97. newcode-0.1.1/code_puppy/command_line/pin_command_completion.py +329 -0
  98. newcode-0.1.1/code_puppy/command_line/prompt_toolkit_completion.py +846 -0
  99. newcode-0.1.1/code_puppy/command_line/session_commands.py +302 -0
  100. newcode-0.1.1/code_puppy/command_line/skills_completion.py +160 -0
  101. newcode-0.1.1/code_puppy/command_line/uc_menu.py +893 -0
  102. newcode-0.1.1/code_puppy/command_line/utils.py +93 -0
  103. newcode-0.1.1/code_puppy/command_line/wiggum_state.py +78 -0
  104. newcode-0.1.1/code_puppy/config.py +1787 -0
  105. newcode-0.1.1/code_puppy/error_logging.py +133 -0
  106. newcode-0.1.1/code_puppy/gemini_code_assist.py +385 -0
  107. newcode-0.1.1/code_puppy/gemini_model.py +754 -0
  108. newcode-0.1.1/code_puppy/hook_engine/README.md +105 -0
  109. newcode-0.1.1/code_puppy/hook_engine/__init__.py +15 -0
  110. newcode-0.1.1/code_puppy/hook_engine/aliases.py +155 -0
  111. newcode-0.1.1/code_puppy/hook_engine/engine.py +195 -0
  112. newcode-0.1.1/code_puppy/hook_engine/executor.py +293 -0
  113. newcode-0.1.1/code_puppy/hook_engine/matcher.py +145 -0
  114. newcode-0.1.1/code_puppy/hook_engine/models.py +222 -0
  115. newcode-0.1.1/code_puppy/hook_engine/registry.py +106 -0
  116. newcode-0.1.1/code_puppy/hook_engine/validator.py +141 -0
  117. newcode-0.1.1/code_puppy/http_utils.py +361 -0
  118. newcode-0.1.1/code_puppy/keymap.py +128 -0
  119. newcode-0.1.1/code_puppy/main.py +10 -0
  120. newcode-0.1.1/code_puppy/mcp_/__init__.py +66 -0
  121. newcode-0.1.1/code_puppy/mcp_/async_lifecycle.py +286 -0
  122. newcode-0.1.1/code_puppy/mcp_/blocking_startup.py +469 -0
  123. newcode-0.1.1/code_puppy/mcp_/captured_stdio_server.py +275 -0
  124. newcode-0.1.1/code_puppy/mcp_/circuit_breaker.py +290 -0
  125. newcode-0.1.1/code_puppy/mcp_/config_wizard.py +507 -0
  126. newcode-0.1.1/code_puppy/mcp_/dashboard.py +308 -0
  127. newcode-0.1.1/code_puppy/mcp_/error_isolation.py +407 -0
  128. newcode-0.1.1/code_puppy/mcp_/examples/retry_example.py +226 -0
  129. newcode-0.1.1/code_puppy/mcp_/health_monitor.py +589 -0
  130. newcode-0.1.1/code_puppy/mcp_/managed_server.py +428 -0
  131. newcode-0.1.1/code_puppy/mcp_/manager.py +807 -0
  132. newcode-0.1.1/code_puppy/mcp_/mcp_logs.py +224 -0
  133. newcode-0.1.1/code_puppy/mcp_/registry.py +451 -0
  134. newcode-0.1.1/code_puppy/mcp_/retry_manager.py +337 -0
  135. newcode-0.1.1/code_puppy/mcp_/server_registry_catalog.py +1126 -0
  136. newcode-0.1.1/code_puppy/mcp_/status_tracker.py +355 -0
  137. newcode-0.1.1/code_puppy/mcp_/system_tools.py +209 -0
  138. newcode-0.1.1/code_puppy/mcp_prompts/__init__.py +1 -0
  139. newcode-0.1.1/code_puppy/mcp_prompts/hook_creator.py +103 -0
  140. newcode-0.1.1/code_puppy/messaging/__init__.py +255 -0
  141. newcode-0.1.1/code_puppy/messaging/bus.py +613 -0
  142. newcode-0.1.1/code_puppy/messaging/commands.py +167 -0
  143. newcode-0.1.1/code_puppy/messaging/markdown_patches.py +57 -0
  144. newcode-0.1.1/code_puppy/messaging/message_queue.py +361 -0
  145. newcode-0.1.1/code_puppy/messaging/messages.py +569 -0
  146. newcode-0.1.1/code_puppy/messaging/queue_console.py +271 -0
  147. newcode-0.1.1/code_puppy/messaging/renderers.py +311 -0
  148. newcode-0.1.1/code_puppy/messaging/rich_renderer.py +1153 -0
  149. newcode-0.1.1/code_puppy/messaging/spinner/__init__.py +83 -0
  150. newcode-0.1.1/code_puppy/messaging/spinner/console_spinner.py +240 -0
  151. newcode-0.1.1/code_puppy/messaging/spinner/spinner_base.py +96 -0
  152. newcode-0.1.1/code_puppy/messaging/subagent_console.py +460 -0
  153. newcode-0.1.1/code_puppy/model_factory.py +848 -0
  154. newcode-0.1.1/code_puppy/model_switching.py +63 -0
  155. newcode-0.1.1/code_puppy/model_utils.py +168 -0
  156. newcode-0.1.1/code_puppy/models.json +130 -0
  157. newcode-0.1.1/code_puppy/models_dev_api.json +1 -0
  158. newcode-0.1.1/code_puppy/models_dev_parser.py +592 -0
  159. newcode-0.1.1/code_puppy/plugins/__init__.py +186 -0
  160. newcode-0.1.1/code_puppy/plugins/agent_skills/__init__.py +22 -0
  161. newcode-0.1.1/code_puppy/plugins/agent_skills/config.py +175 -0
  162. newcode-0.1.1/code_puppy/plugins/agent_skills/discovery.py +136 -0
  163. newcode-0.1.1/code_puppy/plugins/agent_skills/downloader.py +392 -0
  164. newcode-0.1.1/code_puppy/plugins/agent_skills/installer.py +22 -0
  165. newcode-0.1.1/code_puppy/plugins/agent_skills/metadata.py +219 -0
  166. newcode-0.1.1/code_puppy/plugins/agent_skills/prompt_builder.py +100 -0
  167. newcode-0.1.1/code_puppy/plugins/agent_skills/register_callbacks.py +241 -0
  168. newcode-0.1.1/code_puppy/plugins/agent_skills/remote_catalog.py +322 -0
  169. newcode-0.1.1/code_puppy/plugins/agent_skills/skill_catalog.py +257 -0
  170. newcode-0.1.1/code_puppy/plugins/agent_skills/skills_install_menu.py +664 -0
  171. newcode-0.1.1/code_puppy/plugins/agent_skills/skills_menu.py +781 -0
  172. newcode-0.1.1/code_puppy/plugins/antigravity_oauth/__init__.py +10 -0
  173. newcode-0.1.1/code_puppy/plugins/antigravity_oauth/accounts.py +406 -0
  174. newcode-0.1.1/code_puppy/plugins/antigravity_oauth/antigravity_model.py +706 -0
  175. newcode-0.1.1/code_puppy/plugins/antigravity_oauth/config.py +42 -0
  176. newcode-0.1.1/code_puppy/plugins/antigravity_oauth/constants.py +133 -0
  177. newcode-0.1.1/code_puppy/plugins/antigravity_oauth/oauth.py +478 -0
  178. newcode-0.1.1/code_puppy/plugins/antigravity_oauth/register_callbacks.py +518 -0
  179. newcode-0.1.1/code_puppy/plugins/antigravity_oauth/storage.py +288 -0
  180. newcode-0.1.1/code_puppy/plugins/antigravity_oauth/test_plugin.py +319 -0
  181. newcode-0.1.1/code_puppy/plugins/antigravity_oauth/token.py +167 -0
  182. newcode-0.1.1/code_puppy/plugins/antigravity_oauth/transport.py +863 -0
  183. newcode-0.1.1/code_puppy/plugins/antigravity_oauth/utils.py +168 -0
  184. newcode-0.1.1/code_puppy/plugins/chatgpt_oauth/__init__.py +8 -0
  185. newcode-0.1.1/code_puppy/plugins/chatgpt_oauth/config.py +52 -0
  186. newcode-0.1.1/code_puppy/plugins/chatgpt_oauth/oauth_flow.py +328 -0
  187. newcode-0.1.1/code_puppy/plugins/chatgpt_oauth/register_callbacks.py +176 -0
  188. newcode-0.1.1/code_puppy/plugins/chatgpt_oauth/test_plugin.py +295 -0
  189. newcode-0.1.1/code_puppy/plugins/chatgpt_oauth/utils.py +499 -0
  190. newcode-0.1.1/code_puppy/plugins/claude_code_hooks/__init__.py +1 -0
  191. newcode-0.1.1/code_puppy/plugins/claude_code_hooks/config.py +131 -0
  192. newcode-0.1.1/code_puppy/plugins/claude_code_hooks/register_callbacks.py +163 -0
  193. newcode-0.1.1/code_puppy/plugins/claude_code_oauth/README.md +167 -0
  194. newcode-0.1.1/code_puppy/plugins/claude_code_oauth/SETUP.md +93 -0
  195. newcode-0.1.1/code_puppy/plugins/claude_code_oauth/__init__.py +25 -0
  196. newcode-0.1.1/code_puppy/plugins/claude_code_oauth/config.py +52 -0
  197. newcode-0.1.1/code_puppy/plugins/claude_code_oauth/register_callbacks.py +453 -0
  198. newcode-0.1.1/code_puppy/plugins/claude_code_oauth/test_plugin.py +283 -0
  199. newcode-0.1.1/code_puppy/plugins/claude_code_oauth/token_refresh_heartbeat.py +241 -0
  200. newcode-0.1.1/code_puppy/plugins/claude_code_oauth/utils.py +601 -0
  201. newcode-0.1.1/code_puppy/plugins/customizable_commands/__init__.py +0 -0
  202. newcode-0.1.1/code_puppy/plugins/customizable_commands/register_callbacks.py +152 -0
  203. newcode-0.1.1/code_puppy/plugins/example_custom_command/README.md +280 -0
  204. newcode-0.1.1/code_puppy/plugins/example_custom_command/register_callbacks.py +48 -0
  205. newcode-0.1.1/code_puppy/plugins/file_permission_handler/__init__.py +4 -0
  206. newcode-0.1.1/code_puppy/plugins/file_permission_handler/register_callbacks.py +528 -0
  207. newcode-0.1.1/code_puppy/plugins/frontend_emitter/__init__.py +25 -0
  208. newcode-0.1.1/code_puppy/plugins/frontend_emitter/emitter.py +121 -0
  209. newcode-0.1.1/code_puppy/plugins/frontend_emitter/register_callbacks.py +261 -0
  210. newcode-0.1.1/code_puppy/plugins/hook_creator/__init__.py +1 -0
  211. newcode-0.1.1/code_puppy/plugins/hook_creator/register_callbacks.py +33 -0
  212. newcode-0.1.1/code_puppy/plugins/hook_manager/__init__.py +1 -0
  213. newcode-0.1.1/code_puppy/plugins/hook_manager/config.py +277 -0
  214. newcode-0.1.1/code_puppy/plugins/hook_manager/hooks_menu.py +551 -0
  215. newcode-0.1.1/code_puppy/plugins/hook_manager/register_callbacks.py +205 -0
  216. newcode-0.1.1/code_puppy/plugins/oauth_puppy_html.py +224 -0
  217. newcode-0.1.1/code_puppy/plugins/scheduler/__init__.py +1 -0
  218. newcode-0.1.1/code_puppy/plugins/scheduler/register_callbacks.py +88 -0
  219. newcode-0.1.1/code_puppy/plugins/scheduler/scheduler_menu.py +522 -0
  220. newcode-0.1.1/code_puppy/plugins/scheduler/scheduler_wizard.py +341 -0
  221. newcode-0.1.1/code_puppy/plugins/shell_safety/__init__.py +6 -0
  222. newcode-0.1.1/code_puppy/plugins/shell_safety/agent_shell_safety.py +69 -0
  223. newcode-0.1.1/code_puppy/plugins/shell_safety/command_cache.py +156 -0
  224. newcode-0.1.1/code_puppy/plugins/shell_safety/register_callbacks.py +202 -0
  225. newcode-0.1.1/code_puppy/plugins/synthetic_status/__init__.py +1 -0
  226. newcode-0.1.1/code_puppy/plugins/synthetic_status/register_callbacks.py +132 -0
  227. newcode-0.1.1/code_puppy/plugins/synthetic_status/status_api.py +147 -0
  228. newcode-0.1.1/code_puppy/plugins/universal_constructor/__init__.py +13 -0
  229. newcode-0.1.1/code_puppy/plugins/universal_constructor/models.py +138 -0
  230. newcode-0.1.1/code_puppy/plugins/universal_constructor/register_callbacks.py +47 -0
  231. newcode-0.1.1/code_puppy/plugins/universal_constructor/registry.py +302 -0
  232. newcode-0.1.1/code_puppy/plugins/universal_constructor/sandbox.py +584 -0
  233. newcode-0.1.1/code_puppy/prompts/antigravity_system_prompt.md +1 -0
  234. newcode-0.1.1/code_puppy/pydantic_patches.py +317 -0
  235. newcode-0.1.1/code_puppy/reopenable_async_client.py +232 -0
  236. newcode-0.1.1/code_puppy/round_robin_model.py +150 -0
  237. newcode-0.1.1/code_puppy/scheduler/__init__.py +41 -0
  238. newcode-0.1.1/code_puppy/scheduler/__main__.py +9 -0
  239. newcode-0.1.1/code_puppy/scheduler/cli.py +118 -0
  240. newcode-0.1.1/code_puppy/scheduler/config.py +126 -0
  241. newcode-0.1.1/code_puppy/scheduler/daemon.py +280 -0
  242. newcode-0.1.1/code_puppy/scheduler/executor.py +155 -0
  243. newcode-0.1.1/code_puppy/scheduler/platform.py +19 -0
  244. newcode-0.1.1/code_puppy/scheduler/platform_unix.py +22 -0
  245. newcode-0.1.1/code_puppy/scheduler/platform_win.py +32 -0
  246. newcode-0.1.1/code_puppy/session_storage.py +338 -0
  247. newcode-0.1.1/code_puppy/status_display.py +257 -0
  248. newcode-0.1.1/code_puppy/summarization_agent.py +176 -0
  249. newcode-0.1.1/code_puppy/terminal_utils.py +418 -0
  250. newcode-0.1.1/code_puppy/tools/__init__.py +470 -0
  251. newcode-0.1.1/code_puppy/tools/agent_tools.py +616 -0
  252. newcode-0.1.1/code_puppy/tools/ask_user_question/__init__.py +26 -0
  253. newcode-0.1.1/code_puppy/tools/ask_user_question/constants.py +73 -0
  254. newcode-0.1.1/code_puppy/tools/ask_user_question/demo_tui.py +55 -0
  255. newcode-0.1.1/code_puppy/tools/ask_user_question/handler.py +232 -0
  256. newcode-0.1.1/code_puppy/tools/ask_user_question/models.py +304 -0
  257. newcode-0.1.1/code_puppy/tools/ask_user_question/registration.py +36 -0
  258. newcode-0.1.1/code_puppy/tools/ask_user_question/renderers.py +309 -0
  259. newcode-0.1.1/code_puppy/tools/ask_user_question/terminal_ui.py +329 -0
  260. newcode-0.1.1/code_puppy/tools/ask_user_question/theme.py +155 -0
  261. newcode-0.1.1/code_puppy/tools/ask_user_question/tui_loop.py +423 -0
  262. newcode-0.1.1/code_puppy/tools/browser/__init__.py +37 -0
  263. newcode-0.1.1/code_puppy/tools/browser/browser_control.py +289 -0
  264. newcode-0.1.1/code_puppy/tools/browser/browser_interactions.py +545 -0
  265. newcode-0.1.1/code_puppy/tools/browser/browser_locators.py +640 -0
  266. newcode-0.1.1/code_puppy/tools/browser/browser_manager.py +378 -0
  267. newcode-0.1.1/code_puppy/tools/browser/browser_navigation.py +251 -0
  268. newcode-0.1.1/code_puppy/tools/browser/browser_screenshot.py +179 -0
  269. newcode-0.1.1/code_puppy/tools/browser/browser_scripts.py +462 -0
  270. newcode-0.1.1/code_puppy/tools/browser/browser_workflows.py +221 -0
  271. newcode-0.1.1/code_puppy/tools/browser/chromium_terminal_manager.py +259 -0
  272. newcode-0.1.1/code_puppy/tools/browser/terminal_command_tools.py +534 -0
  273. newcode-0.1.1/code_puppy/tools/browser/terminal_screenshot_tools.py +552 -0
  274. newcode-0.1.1/code_puppy/tools/browser/terminal_tools.py +525 -0
  275. newcode-0.1.1/code_puppy/tools/command_runner.py +1346 -0
  276. newcode-0.1.1/code_puppy/tools/common.py +1409 -0
  277. newcode-0.1.1/code_puppy/tools/display.py +84 -0
  278. newcode-0.1.1/code_puppy/tools/file_modifications.py +739 -0
  279. newcode-0.1.1/code_puppy/tools/file_operations.py +802 -0
  280. newcode-0.1.1/code_puppy/tools/scheduler_tools.py +412 -0
  281. newcode-0.1.1/code_puppy/tools/skills_tools.py +251 -0
  282. newcode-0.1.1/code_puppy/tools/subagent_context.py +158 -0
  283. newcode-0.1.1/code_puppy/tools/tools_content.py +51 -0
  284. newcode-0.1.1/code_puppy/tools/universal_constructor.py +889 -0
  285. newcode-0.1.1/code_puppy/uvx_detection.py +242 -0
  286. newcode-0.1.1/code_puppy/version_checker.py +82 -0
  287. newcode-0.1.1/pyproject.toml +105 -0
@@ -0,0 +1,47 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # Virtual environments
10
+ .venv
11
+
12
+ .coverage
13
+
14
+ # Session memory
15
+ .puppy_session_memory.json
16
+
17
+ # Pytest cache
18
+ .pytest_cache/
19
+
20
+ dummy_path
21
+
22
+ .idea/
23
+
24
+ .DS_Store
25
+ .env
26
+ .serena/
27
+ .beads/
28
+ main.dist/
29
+ nuitka-crash-report.xml
30
+ *.backup
31
+ main.bin
32
+
33
+ # Bundled skills removed — skills are now fetched from remote catalog
34
+ code_puppy/bundled_skills/
35
+
36
+ # Hook engine runtime artifacts (logs, compiled outputs)
37
+ .claude/activity.jsonl
38
+ .claude/hooks/audit.log
39
+
40
+ # Compiled hook binaries (built from .go sources in .claude/hooks/go-hooks/)
41
+ .claude/hooks/go-hooks/audit-bash
42
+ .claude/hooks/go-hooks/file-policy
43
+
44
+ # Compiled TypeScript hook output (built from .ts sources)
45
+ .claude/hooks/ts-hooks/dist/
46
+
47
+ .json
newcode-0.1.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Mike Pfaffenberger
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
newcode-0.1.1/PKG-INFO ADDED
@@ -0,0 +1,154 @@
1
+ Metadata-Version: 2.4
2
+ Name: newcode
3
+ Version: 0.1.1
4
+ Summary: AI-powered code generation agent - a fedstew fork of code-puppy
5
+ Project-URL: repository, https://github.com/janfeddersen-wq/new_code
6
+ Project-URL: HomePage, https://github.com/janfeddersen-wq/new_code
7
+ Project-URL: Upstream, https://github.com/mpfaffenberger/code_puppy
8
+ Author: Jan Feddersen, Michael Pfaffenberger (original code-puppy author)
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Software Development :: Code Generators
18
+ Requires-Python: <3.14,>=3.11
19
+ Requires-Dist: anthropic==0.79.0
20
+ Requires-Dist: dbos>=2.11.0
21
+ Requires-Dist: fastapi>=0.109.0
22
+ Requires-Dist: httpx[http2]>=0.24.1
23
+ Requires-Dist: json-repair>=0.46.2
24
+ Requires-Dist: mcp>=1.9.4
25
+ Requires-Dist: openai>=1.99.1
26
+ Requires-Dist: pillow>=10.0.0
27
+ Requires-Dist: playwright>=1.40.0
28
+ Requires-Dist: prompt-toolkit>=3.0.52
29
+ Requires-Dist: pydantic-ai-slim[anthropic,mcp,openai]==1.56.0
30
+ Requires-Dist: pydantic>=2.4.0
31
+ Requires-Dist: pyfiglet>=0.8.post1
32
+ Requires-Dist: python-dotenv>=1.0.0
33
+ Requires-Dist: rapidfuzz>=3.13.0
34
+ Requires-Dist: requests>=2.28.0
35
+ Requires-Dist: rich>=13.4.2
36
+ Requires-Dist: ripgrep==14.1.0
37
+ Requires-Dist: tenacity>=8.2.0
38
+ Requires-Dist: termflow-md>=0.1.8
39
+ Requires-Dist: typer>=0.12.0
40
+ Requires-Dist: uvicorn[standard]>=0.27.0
41
+ Requires-Dist: websockets>=12.0
42
+ Description-Content-Type: text/markdown
43
+
44
+ # NewCode
45
+
46
+ An AI-powered code generation and modification agent for the terminal.
47
+
48
+ NewCode is a fork of [code-puppy](https://github.com/mpfaffenberger/code_puppy) by Michael Pfaffenberger, customized for the fedstew workflow. We wanted a clean, professional CLI agent with opinionated defaults, streamlined prompts, and a focus on practical code generation without the playful branding.
49
+
50
+ ## What changed from code-puppy
51
+
52
+ - Removed all dog/puppy-themed branding and emojis in favor of a clean, professional interface
53
+ - Renamed "Pack" multi-agent system to use functional names (Orchestrator, Tracker, Executor, Reviewer, etc.)
54
+ - Rewrote all agent system prompts for clarity and professionalism
55
+ - Increased output validation retries from 3 to 10 for more robust model interactions
56
+ - Updated configuration keys and display names throughout
57
+ - Published to PyPI as `newcode` instead of `code-puppy`
58
+
59
+ ## Installation
60
+
61
+ ```bash
62
+ pip install newcode
63
+ ```
64
+
65
+ Or with [uv](https://docs.astral.sh/uv/):
66
+
67
+ ```bash
68
+ uv pip install newcode
69
+ ```
70
+
71
+ ## Quick Start
72
+
73
+ ```bash
74
+ # Run the agent
75
+ newcode
76
+
77
+ # Or use the short alias
78
+ nc
79
+ ```
80
+
81
+ On first run, you'll be guided through a setup wizard to configure your API keys and preferences.
82
+
83
+ ## Requirements
84
+
85
+ - Python 3.11 - 3.13
86
+ - An API key for at least one supported provider (OpenAI, Anthropic, Cerebras, Google Gemini, etc.)
87
+
88
+ ## Features
89
+
90
+ - Multi-model support: OpenAI, Anthropic Claude, Google Gemini, Cerebras, and more
91
+ - Multi-agent workflows with specialized agents (Orchestrator, Tracker, Executor, Reviewer, QA Checker, Workspace Manager, Merger)
92
+ - File operations: read, write, edit, delete with diff previews and permission prompts
93
+ - Shell command execution with safety controls
94
+ - Browser-based terminal via built-in API server
95
+ - Scheduled task execution with a background daemon
96
+ - Plugin system with lifecycle callbacks and event-based hooks
97
+ - Interactive TUI menus for configuration, model selection, and task management
98
+ - Session auto-save and restore
99
+ - MCP (Model Context Protocol) server support
100
+
101
+ ## Configuration
102
+
103
+ Configuration is stored in `~/.config/code_puppy/puppy.cfg` (XDG-compliant paths). The setup wizard handles initial configuration. You can also use CLI commands:
104
+
105
+ ```bash
106
+ # Inside the agent REPL:
107
+ /config # Show current configuration
108
+ /model # Switch models
109
+ /agent # Switch agents
110
+ /scheduler # Manage scheduled tasks
111
+ /colors # Customize terminal colors
112
+ ```
113
+
114
+ ## Agents
115
+
116
+ | Agent | Purpose |
117
+ |-------|---------|
118
+ | Code Agent | General-purpose code generation and modification (default) |
119
+ | Orchestrator | Multi-agent workflow coordination |
120
+ | Tracker | Code search and navigation |
121
+ | Executor | Shell command execution |
122
+ | Reviewer | Code review and quality checks |
123
+ | QA Checker | Testing and validation |
124
+ | Workspace Manager | File system operations |
125
+ | Merger | Result integration |
126
+ | Python Reviewer | Python-specific code review |
127
+ | QA Expert | Testing strategy and quality assurance |
128
+ | Security Auditor | Security analysis |
129
+
130
+ ## Development
131
+
132
+ ```bash
133
+ # Clone the repo
134
+ git clone https://github.com/janfeddersen-wq/new_code.git
135
+ cd new_code
136
+
137
+ # Install with dev dependencies
138
+ uv pip install -e ".[dev]"
139
+
140
+ # Run tests
141
+ uv run pytest tests/ -v
142
+
143
+ # Lint
144
+ ruff check .
145
+ ruff format --check .
146
+ ```
147
+
148
+ ## Credits
149
+
150
+ This project is a fork of [code-puppy](https://github.com/mpfaffenberger/code_puppy) by [Michael Pfaffenberger](https://github.com/mpfaffenberger), licensed under the MIT License. We are grateful for the original work and the open-source foundation it provides.
151
+
152
+ ## License
153
+
154
+ MIT License - see [LICENSE](LICENSE) for details.
@@ -0,0 +1,111 @@
1
+ # NewCode
2
+
3
+ An AI-powered code generation and modification agent for the terminal.
4
+
5
+ NewCode is a fork of [code-puppy](https://github.com/mpfaffenberger/code_puppy) by Michael Pfaffenberger, customized for the fedstew workflow. We wanted a clean, professional CLI agent with opinionated defaults, streamlined prompts, and a focus on practical code generation without the playful branding.
6
+
7
+ ## What changed from code-puppy
8
+
9
+ - Removed all dog/puppy-themed branding and emojis in favor of a clean, professional interface
10
+ - Renamed "Pack" multi-agent system to use functional names (Orchestrator, Tracker, Executor, Reviewer, etc.)
11
+ - Rewrote all agent system prompts for clarity and professionalism
12
+ - Increased output validation retries from 3 to 10 for more robust model interactions
13
+ - Updated configuration keys and display names throughout
14
+ - Published to PyPI as `newcode` instead of `code-puppy`
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ pip install newcode
20
+ ```
21
+
22
+ Or with [uv](https://docs.astral.sh/uv/):
23
+
24
+ ```bash
25
+ uv pip install newcode
26
+ ```
27
+
28
+ ## Quick Start
29
+
30
+ ```bash
31
+ # Run the agent
32
+ newcode
33
+
34
+ # Or use the short alias
35
+ nc
36
+ ```
37
+
38
+ On first run, you'll be guided through a setup wizard to configure your API keys and preferences.
39
+
40
+ ## Requirements
41
+
42
+ - Python 3.11 - 3.13
43
+ - An API key for at least one supported provider (OpenAI, Anthropic, Cerebras, Google Gemini, etc.)
44
+
45
+ ## Features
46
+
47
+ - Multi-model support: OpenAI, Anthropic Claude, Google Gemini, Cerebras, and more
48
+ - Multi-agent workflows with specialized agents (Orchestrator, Tracker, Executor, Reviewer, QA Checker, Workspace Manager, Merger)
49
+ - File operations: read, write, edit, delete with diff previews and permission prompts
50
+ - Shell command execution with safety controls
51
+ - Browser-based terminal via built-in API server
52
+ - Scheduled task execution with a background daemon
53
+ - Plugin system with lifecycle callbacks and event-based hooks
54
+ - Interactive TUI menus for configuration, model selection, and task management
55
+ - Session auto-save and restore
56
+ - MCP (Model Context Protocol) server support
57
+
58
+ ## Configuration
59
+
60
+ Configuration is stored in `~/.config/code_puppy/puppy.cfg` (XDG-compliant paths). The setup wizard handles initial configuration. You can also use CLI commands:
61
+
62
+ ```bash
63
+ # Inside the agent REPL:
64
+ /config # Show current configuration
65
+ /model # Switch models
66
+ /agent # Switch agents
67
+ /scheduler # Manage scheduled tasks
68
+ /colors # Customize terminal colors
69
+ ```
70
+
71
+ ## Agents
72
+
73
+ | Agent | Purpose |
74
+ |-------|---------|
75
+ | Code Agent | General-purpose code generation and modification (default) |
76
+ | Orchestrator | Multi-agent workflow coordination |
77
+ | Tracker | Code search and navigation |
78
+ | Executor | Shell command execution |
79
+ | Reviewer | Code review and quality checks |
80
+ | QA Checker | Testing and validation |
81
+ | Workspace Manager | File system operations |
82
+ | Merger | Result integration |
83
+ | Python Reviewer | Python-specific code review |
84
+ | QA Expert | Testing strategy and quality assurance |
85
+ | Security Auditor | Security analysis |
86
+
87
+ ## Development
88
+
89
+ ```bash
90
+ # Clone the repo
91
+ git clone https://github.com/janfeddersen-wq/new_code.git
92
+ cd new_code
93
+
94
+ # Install with dev dependencies
95
+ uv pip install -e ".[dev]"
96
+
97
+ # Run tests
98
+ uv run pytest tests/ -v
99
+
100
+ # Lint
101
+ ruff check .
102
+ ruff format --check .
103
+ ```
104
+
105
+ ## Credits
106
+
107
+ This project is a fork of [code-puppy](https://github.com/mpfaffenberger/code_puppy) by [Michael Pfaffenberger](https://github.com/mpfaffenberger), licensed under the MIT License. We are grateful for the original work and the open-source foundation it provides.
108
+
109
+ ## License
110
+
111
+ MIT License - see [LICENSE](LICENSE) for details.
@@ -0,0 +1,10 @@
1
+ import importlib.metadata
2
+
3
+ # Version detection
4
+ try:
5
+ _detected_version = importlib.metadata.version("code-puppy")
6
+ # Ensure we never end up with None or empty string
7
+ __version__ = _detected_version if _detected_version else "0.0.0-dev"
8
+ except Exception:
9
+ # Fallback for dev environments where metadata might not be available
10
+ __version__ = "0.0.0-dev"
@@ -0,0 +1,10 @@
1
+ """
2
+ Entry point for running newcode as a module.
3
+
4
+ This allows the package to be run with: python -m code_puppy
5
+ """
6
+
7
+ from code_puppy.main import main_entry
8
+
9
+ if __name__ == "__main__":
10
+ main_entry()
@@ -0,0 +1,31 @@
1
+ """Agent management system for code-puppy.
2
+
3
+ This module provides functionality for switching between different agent
4
+ configurations, each with their own system prompts and tool sets.
5
+ """
6
+
7
+ from .agent_manager import (
8
+ clone_agent,
9
+ delete_clone_agent,
10
+ get_agent_descriptions,
11
+ get_available_agents,
12
+ get_current_agent,
13
+ is_clone_agent_name,
14
+ load_agent,
15
+ refresh_agents,
16
+ set_current_agent,
17
+ )
18
+ from .subagent_stream_handler import subagent_stream_handler
19
+
20
+ __all__ = [
21
+ "clone_agent",
22
+ "delete_clone_agent",
23
+ "get_available_agents",
24
+ "get_current_agent",
25
+ "is_clone_agent_name",
26
+ "set_current_agent",
27
+ "load_agent",
28
+ "get_agent_descriptions",
29
+ "refresh_agents",
30
+ "subagent_stream_handler",
31
+ ]
@@ -0,0 +1,155 @@
1
+ """C99/C11 systems code reviewer agent."""
2
+
3
+ from .base_agent import BaseAgent
4
+
5
+
6
+ class CReviewerAgent(BaseAgent):
7
+ """Low-level C-focused code review agent."""
8
+
9
+ @property
10
+ def name(self) -> str:
11
+ return "c-reviewer"
12
+
13
+ @property
14
+ def display_name(self) -> str:
15
+ return "C Reviewer 🧵"
16
+
17
+ @property
18
+ def description(self) -> str:
19
+ return "Hardcore C systems reviewer obsessed with determinism, perf, and safety"
20
+
21
+ def get_available_tools(self) -> list[str]:
22
+ """Reviewers need read-only inspection helpers plus agent collaboration."""
23
+ return [
24
+ "agent_share_your_reasoning",
25
+ "agent_run_shell_command",
26
+ "list_files",
27
+ "read_file",
28
+ "grep",
29
+ "invoke_agent",
30
+ "list_agents",
31
+ ]
32
+
33
+ def get_system_prompt(self) -> str:
34
+ return """
35
+ You are the C systems reviewer puppy. Think C99/C11 in the trenches: kernels, drivers, embedded firmware, high-performance network stacks. Embrace the sass, but never compromise on correctness.
36
+
37
+ Mission profile:
38
+ - Review only `.c`/`.h` files with meaningful code diffs. Skip untouched files or mechanical formatting changes.
39
+ - Inspect build scripts (Makefiles, CMakeLists, linker scripts) only when they alter compiler flags, memory layout, sanitizers, or ABI contracts.
40
+ - Assume grim environments: tight memory, real-time deadlines, hostile inputs, mixed architectures. Highlight portability and determinism risks.
41
+
42
+ Design doctrine:
43
+ - SRP obsessed: one function, one responsibility. Flag multi-purpose monsters instantly.
44
+ - DRY zealot: common logic goes into shared helpers or macros when they reduce duplication responsibly.
45
+ - YAGNI watchdog: punt speculative hooks and future-proof fantasies. Minimal viable change only.
46
+ - Composition > inheritance: prefer structs + function pointers/interfaces for pluggable behaviour.
47
+
48
+ Style canon (keep it tight):
49
+ ```
50
+ /* good: focused helper */
51
+ static int
52
+ validate_vlan_id(uint16_t vlan_id)
53
+ {
54
+ return vlan_id > 0 && vlan_id < 4095;
55
+ }
56
+
57
+ /* bad: monolith */
58
+ static int
59
+ process_and_validate_and_swap_vlan(...)
60
+ {
61
+ /* mixed responsibilities */
62
+ }
63
+ ```
64
+
65
+ Quality gates:
66
+ - Cyclomatic complexity under 10 per function unless justified.
67
+ - Zero warnings under `-Wall -Wextra -Werror`.
68
+ - Valgrind/ASan/MSan clean for relevant paths.
69
+ - No dynamic allocation in the hot path without profiling proof.
70
+
71
+ Required habits:
72
+ - Validate inputs in every public function and critical static helper.
73
+ - Use `likely`/`unlikely` hints for hot branches when profiling backs it up.
74
+ - Inline packet-processing helpers sparingly to keep the instruction cache happy.
75
+ - Replace magic numbers with `#define` or `enum` constants.
76
+
77
+ Per C file that matters:
78
+ 1. Start with a concise summary of the behavioural or architectural impact.
79
+ 2. List findings in severity order (blockers → warnings → nits). Focus on correctness, undefined behaviour, memory lifetime, concurrency, interrupt safety, networking edge cases, and performance.
80
+ 3. Award genuine praise when the diff nails it—clean DMA handling, lock-free queues, branchless hot paths, bulletproof error unwinding.
81
+
82
+ Review heuristics:
83
+ - Memory & lifetime: manual allocation strategy, ownership transfer, alignment, cache friendliness, stack vs heap, DMA constraints.
84
+ - Concurrency & interrupts: atomic discipline, memory barriers, ISR safety, lock ordering, wait-free structures, CPU affinity, NUMA awareness.
85
+ - Performance: branch prediction, cache locality, vectorization (intrinsics), prefetching, zero-copy I/O, batching, syscall amortization.
86
+ - Networking: protocol compliance, endian handling, buffer management, MTU/fragmentation, congestion control hooks, timing windows.
87
+ - OS/driver specifics: register access, MMIO ordering, power management, hotplug resilience, error recovery paths, watchdog expectations.
88
+ - Safety: null derefs, integer overflow, double free, TOCTOU windows, privilege boundaries, sandbox escape surfaces.
89
+ - Tooling: compile flags (`-O3 -march=native`, `-flto`, `-fstack-protector-strong`), sanitizers (`-fsanitize=address,undefined,thread`), static analysis (clang-tidy, cppcheck, coverity), coverage harnesses (gcov, lcov), fuzz targets (libFuzzer, AFL, honggfuzz).
90
+ - Testing: deterministic unit tests, stress/load tests, fuzz plans, HW-in-loop sims, perf counters.
91
+ - Maintainability: SRP enforcement, header hygiene, composable modules, boundary-defined interfaces.
92
+
93
+ C Code Quality Checklist (verify for each file):
94
+ - [ ] Zero warnings under `-Wall -Wextra -Werror`
95
+ - [ ] Valgrind/ASan/MSan clean for relevant paths
96
+ - [ ] Static analysis passes (clang-tidy, cppcheck)
97
+ - [ ] Memory management: no leaks, proper free/delete pairs
98
+ - [ ] Thread safety: proper locking, no race conditions
99
+ - [ ] Input validation: bounds checking, null pointer checks
100
+ - [ ] Error handling: graceful failure paths, proper error codes
101
+ - [ ] Performance: no O(n²) in hot paths, cache-friendly access
102
+ - [ ] Documentation: function headers, complex algorithm comments
103
+ - [ ] Testing: unit tests, edge cases, memory error tests
104
+
105
+ Critical Security Checklist:
106
+ - [ ] Buffer overflow protection (strncpy, bounds checking)
107
+ - [ ] Integer overflow prevention (size_t validation)
108
+ - [ ] Format string security (no %s in user input)
109
+ - [ ] TOCTOU (Time-of-Check-Time-of-Use) prevention
110
+ - [ ] Proper random number generation (arc4random, /dev/urandom)
111
+ - [ ] Secure memory handling (zeroing sensitive data)
112
+ - [ ] Privilege separation and drop privileges
113
+ - [ ] Safe string operations (strlcpy, strlcat where available)
114
+
115
+ Performance Optimization Checklist:
116
+ - [ ] Profile hot paths with perf/valgrind callgrind
117
+ - [ ] Cache line alignment for critical data structures
118
+ - [ ] Minimize system calls in loops
119
+ - [ ] Use appropriate data structures (hash tables O(1) vs linear)
120
+ - [ ] Compiler optimization flags (-O3 -march=native)
121
+ - [ ] Branch prediction optimization (likely/unlikely macros)
122
+ - [ ] Memory layout optimization (struct reordering)
123
+ - [ ] SIMD vectorization where applicable
124
+
125
+ Feedback etiquette:
126
+ - Be blunt but constructive. "Consider …" and "Double-check …" land better than "Nope."
127
+ - Group related issues. Cite precise lines like `drivers/net/ring_buffer.c:144`. No ranges.
128
+ - Call out assumptions ("Assuming cache line is 64B …") so humans confirm or adjust.
129
+ - If everything looks battle-ready, celebrate and spotlight the craftsmanship.
130
+
131
+ Wrap-up cadence:
132
+ - Close with repo verdict: "Ship it", "Needs fixes", or "Mixed bag", plus rationale (safety, perf targets, portability).
133
+
134
+ Advanced C Engineering:
135
+ - Systems Programming: kernel development, device drivers, embedded systems programming
136
+ - Performance Engineering: CPU cache optimization, SIMD vectorization, memory hierarchy utilization
137
+ - Low-Level Optimization: assembly integration, compiler intrinsics, link-time optimization
138
+ - C Security: secure coding practices, memory safety, input validation, cryptography integration
139
+ - C Ecosystem: build systems (Make, CMake, Meson), package management, cross-platform development
140
+ - C Testing: unit testing frameworks, property-based testing, fuzzing, static analysis integration
141
+ - C Standards: C11/C18 features, POSIX compliance, compiler extensions
142
+ - C Tooling: debuggers (GDB, LLDB), profilers, static analyzers, code coverage tools
143
+ - C Architecture: modular design, interface design, error handling patterns, memory management strategies
144
+ - C Future: C2x features, compiler developments, embedded systems evolution
145
+ - Suggest pragmatic next steps for blockers (add KASAN run, tighten barriers, extend soak tests, add coverage for rare code paths).
146
+
147
+ Agent collaboration:
148
+ - When encountering security vulnerabilities, invoke the security-auditor for detailed risk assessment
149
+ - For performance-critical sections, collaborate with qa-expert for benchmarking strategies
150
+ - When reviewing build systems, consult with relevant language specialists (cpp-reviewer for C++ interop)
151
+ - Use list_agents to discover specialists for domain-specific concerns (embedded, networking, etc.)
152
+ - Always explain why you're invoking another agent and what specific expertise you need
153
+
154
+ You're the C review persona for this CLI. Be witty, relentless about low-level rigor, and absurdly helpful.
155
+ """