code-puppy-core-plugins 0.0.2__py3-none-any.whl
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.
- code_puppy_core_plugins/__init__.py +5 -0
- code_puppy_core_plugins/acp/README.md +266 -0
- code_puppy_core_plugins/acp/__init__.py +8 -0
- code_puppy_core_plugins/acp/agent.py +494 -0
- code_puppy_core_plugins/acp/bridge.py +309 -0
- code_puppy_core_plugins/acp/capabilities.py +73 -0
- code_puppy_core_plugins/acp/commands.py +116 -0
- code_puppy_core_plugins/acp/content.py +115 -0
- code_puppy_core_plugins/acp/io_delegation.py +231 -0
- code_puppy_core_plugins/acp/mcp_config.py +66 -0
- code_puppy_core_plugins/acp/permissions.py +159 -0
- code_puppy_core_plugins/acp/persistence.py +197 -0
- code_puppy_core_plugins/acp/register_callbacks.py +110 -0
- code_puppy_core_plugins/acp/replay.py +114 -0
- code_puppy_core_plugins/acp/session.py +329 -0
- code_puppy_core_plugins/acp/session_config.py +179 -0
- code_puppy_core_plugins/acp/state.py +135 -0
- code_puppy_core_plugins/agent_skills/__init__.py +22 -0
- code_puppy_core_plugins/agent_skills/config.py +208 -0
- code_puppy_core_plugins/agent_skills/discovery.py +337 -0
- code_puppy_core_plugins/agent_skills/downloader.py +392 -0
- code_puppy_core_plugins/agent_skills/enabled_skills.py +82 -0
- code_puppy_core_plugins/agent_skills/installer.py +22 -0
- code_puppy_core_plugins/agent_skills/metadata.py +219 -0
- code_puppy_core_plugins/agent_skills/prompt_builder.py +49 -0
- code_puppy_core_plugins/agent_skills/provider.py +52 -0
- code_puppy_core_plugins/agent_skills/register_callbacks.py +309 -0
- code_puppy_core_plugins/agent_skills/remote_catalog.py +322 -0
- code_puppy_core_plugins/agent_skills/skill_catalog.py +257 -0
- code_puppy_core_plugins/agent_skills/skill_commands.py +102 -0
- code_puppy_core_plugins/agent_skills/skills_install_menu.py +698 -0
- code_puppy_core_plugins/agent_skills/skills_menu.py +794 -0
- code_puppy_core_plugins/aws_bedrock/__init__.py +14 -0
- code_puppy_core_plugins/aws_bedrock/config.py +101 -0
- code_puppy_core_plugins/aws_bedrock/register_callbacks.py +243 -0
- code_puppy_core_plugins/aws_bedrock/utils.py +186 -0
- code_puppy_core_plugins/azure_foundry/README.md +238 -0
- code_puppy_core_plugins/azure_foundry/__init__.py +15 -0
- code_puppy_core_plugins/azure_foundry/config.py +126 -0
- code_puppy_core_plugins/azure_foundry/discovery.py +189 -0
- code_puppy_core_plugins/azure_foundry/register_callbacks.py +506 -0
- code_puppy_core_plugins/azure_foundry/token.py +182 -0
- code_puppy_core_plugins/azure_foundry/utils.py +375 -0
- code_puppy_core_plugins/btw/__init__.py +1 -0
- code_puppy_core_plugins/btw/inline_view.py +135 -0
- code_puppy_core_plugins/btw/register_callbacks.py +106 -0
- code_puppy_core_plugins/btw/side_query.py +91 -0
- code_puppy_core_plugins/chatgpt_oauth/IMAGEGEN_SKILL.md +83 -0
- code_puppy_core_plugins/chatgpt_oauth/__init__.py +8 -0
- code_puppy_core_plugins/chatgpt_oauth/config.py +52 -0
- code_puppy_core_plugins/chatgpt_oauth/image_generation.py +253 -0
- code_puppy_core_plugins/chatgpt_oauth/image_tool.py +70 -0
- code_puppy_core_plugins/chatgpt_oauth/oauth_flow.py +461 -0
- code_puppy_core_plugins/chatgpt_oauth/register_callbacks.py +288 -0
- code_puppy_core_plugins/chatgpt_oauth/test_plugin.py +663 -0
- code_puppy_core_plugins/chatgpt_oauth/usage.py +113 -0
- code_puppy_core_plugins/chatgpt_oauth/utils.py +534 -0
- code_puppy_core_plugins/claude_code_hooks/__init__.py +1 -0
- code_puppy_core_plugins/claude_code_hooks/config.py +137 -0
- code_puppy_core_plugins/claude_code_hooks/register_callbacks.py +383 -0
- code_puppy_core_plugins/claude_code_oauth/README.md +167 -0
- code_puppy_core_plugins/claude_code_oauth/SETUP.md +93 -0
- code_puppy_core_plugins/claude_code_oauth/__init__.py +25 -0
- code_puppy_core_plugins/claude_code_oauth/config.py +59 -0
- code_puppy_core_plugins/claude_code_oauth/fast_mode.py +122 -0
- code_puppy_core_plugins/claude_code_oauth/prompt_handler.py +64 -0
- code_puppy_core_plugins/claude_code_oauth/register_callbacks.py +719 -0
- code_puppy_core_plugins/claude_code_oauth/test_plugin.py +285 -0
- code_puppy_core_plugins/claude_code_oauth/token_refresh_heartbeat.py +240 -0
- code_puppy_core_plugins/claude_code_oauth/utils.py +663 -0
- code_puppy_core_plugins/code_puppy_agent/AGENTS_AND_TOOLS.md +155 -0
- code_puppy_core_plugins/code_puppy_agent/MODELS_AND_MCP.md +104 -0
- code_puppy_core_plugins/code_puppy_agent/PLUGINS_AND_CALLBACKS.md +147 -0
- code_puppy_core_plugins/code_puppy_agent/SESSIONS_AND_HISTORY.md +39 -0
- code_puppy_core_plugins/code_puppy_agent/SKILL.md +180 -0
- code_puppy_core_plugins/code_puppy_agent/SKILLS_SYSTEM.md +136 -0
- code_puppy_core_plugins/code_puppy_agent/SYSTEM_PROMPT_CONFIG_AND_I18N.md +160 -0
- code_puppy_core_plugins/code_puppy_agent/__init__.py +5 -0
- code_puppy_core_plugins/code_puppy_agent/register_callbacks.py +46 -0
- code_puppy_core_plugins/computer_use/NativeCapture.swift +123 -0
- code_puppy_core_plugins/computer_use/README.md +109 -0
- code_puppy_core_plugins/computer_use/__init__.py +1 -0
- code_puppy_core_plugins/computer_use/accessibility.py +163 -0
- code_puppy_core_plugins/computer_use/activation.py +75 -0
- code_puppy_core_plugins/computer_use/backend.py +584 -0
- code_puppy_core_plugins/computer_use/backend_types.py +5 -0
- code_puppy_core_plugins/computer_use/capture.py +110 -0
- code_puppy_core_plugins/computer_use/commands.py +62 -0
- code_puppy_core_plugins/computer_use/geometry.py +81 -0
- code_puppy_core_plugins/computer_use/inline_image.py +56 -0
- code_puppy_core_plugins/computer_use/keycodes.py +47 -0
- code_puppy_core_plugins/computer_use/policy.py +144 -0
- code_puppy_core_plugins/computer_use/register_callbacks.py +96 -0
- code_puppy_core_plugins/computer_use/safety.py +18 -0
- code_puppy_core_plugins/computer_use/settle.py +64 -0
- code_puppy_core_plugins/computer_use/state.py +86 -0
- code_puppy_core_plugins/computer_use/tools.py +469 -0
- code_puppy_core_plugins/context_indicator/__init__.py +14 -0
- code_puppy_core_plugins/context_indicator/register_callbacks.py +249 -0
- code_puppy_core_plugins/context_indicator/usage.py +40 -0
- code_puppy_core_plugins/copilot_auth/__init__.py +11 -0
- code_puppy_core_plugins/copilot_auth/config.py +93 -0
- code_puppy_core_plugins/copilot_auth/reasoning_client.py +409 -0
- code_puppy_core_plugins/copilot_auth/register_callbacks.py +460 -0
- code_puppy_core_plugins/copilot_auth/utils.py +587 -0
- code_puppy_core_plugins/customizable_commands/__init__.py +0 -0
- code_puppy_core_plugins/customizable_commands/register_callbacks.py +464 -0
- code_puppy_core_plugins/dbos_durable_exec/__init__.py +1 -0
- code_puppy_core_plugins/dbos_durable_exec/cancel.py +15 -0
- code_puppy_core_plugins/dbos_durable_exec/commands.py +31 -0
- code_puppy_core_plugins/dbos_durable_exec/config.py +31 -0
- code_puppy_core_plugins/dbos_durable_exec/lifecycle.py +83 -0
- code_puppy_core_plugins/dbos_durable_exec/register_callbacks.py +45 -0
- code_puppy_core_plugins/dbos_durable_exec/runtime.py +65 -0
- code_puppy_core_plugins/dbos_durable_exec/startup_lock.py +155 -0
- code_puppy_core_plugins/dbos_durable_exec/workflow_ids.py +16 -0
- code_puppy_core_plugins/dbos_durable_exec/wrapper.py +58 -0
- code_puppy_core_plugins/destructive_command_guard/AGENTS.md +79 -0
- code_puppy_core_plugins/destructive_command_guard/__init__.py +14 -0
- code_puppy_core_plugins/destructive_command_guard/detector.py +374 -0
- code_puppy_core_plugins/destructive_command_guard/register_callbacks.py +165 -0
- code_puppy_core_plugins/emoji_filter/__init__.py +12 -0
- code_puppy_core_plugins/emoji_filter/config.py +26 -0
- code_puppy_core_plugins/emoji_filter/register_callbacks.py +238 -0
- code_puppy_core_plugins/emoji_filter/stripper.py +45 -0
- code_puppy_core_plugins/empty_html_comment_filter/register_callbacks.py +116 -0
- code_puppy_core_plugins/example_custom_command/README.md +328 -0
- code_puppy_core_plugins/example_custom_command/register_callbacks.py +66 -0
- code_puppy_core_plugins/file_permission_handler/__init__.py +4 -0
- code_puppy_core_plugins/file_permission_handler/register_callbacks.py +575 -0
- code_puppy_core_plugins/flux_bootstrap/__init__.py +5 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/_docs/README.md +173 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/_docs/cheatsheet.md +86 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/_docs/pipeline.md +167 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/_docs/synopsis.md +392 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/about.md +51 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/address-feedback.md +129 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/ask.md +211 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/aug.md +181 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/auto-pilot.md +71 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/cheatsheet.md +16 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/commit.md +103 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/config.md +108 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/create-pr.md +195 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/exec.md +221 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/new.md +151 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/qa.md +208 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/rebase.md +180 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/review.md +304 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/split.md +120 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/squash-commits.md +179 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/status.md +46 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/commands/flux/tests.md +155 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/scripts/flux_about.py +154 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/scripts/flux_cheatsheet.py +248 -0
- code_puppy_core_plugins/flux_bootstrap/bundled/scripts/flux_status.py +345 -0
- code_puppy_core_plugins/flux_bootstrap/installer.py +256 -0
- code_puppy_core_plugins/flux_bootstrap/register_callbacks.py +71 -0
- code_puppy_core_plugins/force_push_guard/__init__.py +5 -0
- code_puppy_core_plugins/force_push_guard/detector.py +96 -0
- code_puppy_core_plugins/force_push_guard/register_callbacks.py +161 -0
- code_puppy_core_plugins/fork/__init__.py +7 -0
- code_puppy_core_plugins/fork/register_callbacks.py +445 -0
- code_puppy_core_plugins/frontend_emitter/__init__.py +25 -0
- code_puppy_core_plugins/frontend_emitter/emitter.py +249 -0
- code_puppy_core_plugins/frontend_emitter/register_callbacks.py +412 -0
- code_puppy_core_plugins/frontend_emitter/session_context.py +50 -0
- code_puppy_core_plugins/grok_oauth/__init__.py +6 -0
- code_puppy_core_plugins/grok_oauth/config.py +49 -0
- code_puppy_core_plugins/grok_oauth/oauth_flow.py +213 -0
- code_puppy_core_plugins/grok_oauth/register_callbacks.py +132 -0
- code_puppy_core_plugins/grok_oauth/utils.py +195 -0
- code_puppy_core_plugins/herdr/README.md +168 -0
- code_puppy_core_plugins/herdr/__init__.py +9 -0
- code_puppy_core_plugins/herdr/client.py +339 -0
- code_puppy_core_plugins/herdr/register_callbacks.py +140 -0
- code_puppy_core_plugins/herdr/reporter.py +212 -0
- code_puppy_core_plugins/herdr/smoke.py +143 -0
- code_puppy_core_plugins/herdr/sources.py +133 -0
- code_puppy_core_plugins/hook_creator/__init__.py +1 -0
- code_puppy_core_plugins/hook_creator/register_callbacks.py +33 -0
- code_puppy_core_plugins/hook_manager/__init__.py +1 -0
- code_puppy_core_plugins/hook_manager/config.py +290 -0
- code_puppy_core_plugins/hook_manager/hooks_menu.py +571 -0
- code_puppy_core_plugins/hook_manager/register_callbacks.py +227 -0
- code_puppy_core_plugins/meta_oauth/__init__.py +1 -0
- code_puppy_core_plugins/meta_oauth/config.py +55 -0
- code_puppy_core_plugins/meta_oauth/oauth_flow.py +109 -0
- code_puppy_core_plugins/meta_oauth/register_callbacks.py +154 -0
- code_puppy_core_plugins/meta_oauth/utils.py +252 -0
- code_puppy_core_plugins/namespace_skill_search/README.md +118 -0
- code_puppy_core_plugins/namespace_skill_search/__init__.py +15 -0
- code_puppy_core_plugins/namespace_skill_search/namespaces.py +125 -0
- code_puppy_core_plugins/namespace_skill_search/register_callbacks.py +99 -0
- code_puppy_core_plugins/namespace_skill_search/search_tool.py +158 -0
- code_puppy_core_plugins/no_tools/__init__.py +0 -0
- code_puppy_core_plugins/no_tools/register_callbacks.py +42 -0
- code_puppy_core_plugins/oauth_pasteback.py +110 -0
- code_puppy_core_plugins/oauth_puppy_html.py +194 -0
- code_puppy_core_plugins/obsidian_agent/README.md +52 -0
- code_puppy_core_plugins/obsidian_agent/__init__.py +8 -0
- code_puppy_core_plugins/obsidian_agent/agent_obsidian.py +147 -0
- code_puppy_core_plugins/obsidian_agent/register_callbacks.py +13 -0
- code_puppy_core_plugins/ollama/__init__.py +1 -0
- code_puppy_core_plugins/ollama/register_callbacks.py +127 -0
- code_puppy_core_plugins/ollama_setup/__init__.py +5 -0
- code_puppy_core_plugins/ollama_setup/completer.py +38 -0
- code_puppy_core_plugins/ollama_setup/register_callbacks.py +419 -0
- code_puppy_core_plugins/plugin_list/__init__.py +0 -0
- code_puppy_core_plugins/plugin_list/plugin_contributions.py +348 -0
- code_puppy_core_plugins/plugin_list/plugin_meta.py +67 -0
- code_puppy_core_plugins/plugin_list/plugin_text_utils.py +173 -0
- code_puppy_core_plugins/plugin_list/plugins_menu.py +455 -0
- code_puppy_core_plugins/plugin_list/plugins_menu_layout.py +194 -0
- code_puppy_core_plugins/plugin_list/plugins_menu_render.py +431 -0
- code_puppy_core_plugins/plugin_list/project_trust_flow.py +162 -0
- code_puppy_core_plugins/plugin_list/register_callbacks.py +281 -0
- code_puppy_core_plugins/pop_command/__init__.py +1 -0
- code_puppy_core_plugins/pop_command/register_callbacks.py +191 -0
- code_puppy_core_plugins/prompt_newline/__init__.py +13 -0
- code_puppy_core_plugins/prompt_newline/config.py +21 -0
- code_puppy_core_plugins/prompt_newline/register_callbacks.py +163 -0
- code_puppy_core_plugins/prune/__init__.py +1 -0
- code_puppy_core_plugins/prune/prune_menu.py +308 -0
- code_puppy_core_plugins/prune/prune_model.py +517 -0
- code_puppy_core_plugins/prune/prune_render.py +354 -0
- code_puppy_core_plugins/prune/register_callbacks.py +388 -0
- code_puppy_core_plugins/puppy_kennel/README.md +203 -0
- code_puppy_core_plugins/puppy_kennel/__init__.py +6 -0
- code_puppy_core_plugins/puppy_kennel/commands.py +206 -0
- code_puppy_core_plugins/puppy_kennel/config.py +36 -0
- code_puppy_core_plugins/puppy_kennel/kennel.py +368 -0
- code_puppy_core_plugins/puppy_kennel/packer.py +152 -0
- code_puppy_core_plugins/puppy_kennel/recorder.py +83 -0
- code_puppy_core_plugins/puppy_kennel/register_callbacks.py +109 -0
- code_puppy_core_plugins/puppy_kennel/retriever.py +28 -0
- code_puppy_core_plugins/puppy_kennel/schema.py +78 -0
- code_puppy_core_plugins/puppy_kennel/state.py +68 -0
- code_puppy_core_plugins/puppy_kennel/tools.py +449 -0
- code_puppy_core_plugins/puppy_kennel/wings.py +110 -0
- code_puppy_core_plugins/puppy_spinner/README.md +93 -0
- code_puppy_core_plugins/puppy_spinner/__init__.py +11 -0
- code_puppy_core_plugins/puppy_spinner/builtin_frames.py +172 -0
- code_puppy_core_plugins/puppy_spinner/commands.py +116 -0
- code_puppy_core_plugins/puppy_spinner/picker.py +379 -0
- code_puppy_core_plugins/puppy_spinner/register_callbacks.py +193 -0
- code_puppy_core_plugins/puppy_spinner/spinners.py +444 -0
- code_puppy_core_plugins/quick_resume/__init__.py +0 -0
- code_puppy_core_plugins/quick_resume/register_callbacks.py +77 -0
- code_puppy_core_plugins/review_pr/__init__.py +1 -0
- code_puppy_core_plugins/review_pr/register_callbacks.py +162 -0
- code_puppy_core_plugins/shell_safety/__init__.py +6 -0
- code_puppy_core_plugins/shell_safety/agent_shell_safety.py +69 -0
- code_puppy_core_plugins/shell_safety/command_cache.py +156 -0
- code_puppy_core_plugins/shell_safety/register_callbacks.py +203 -0
- code_puppy_core_plugins/stack_dump/__init__.py +1 -0
- code_puppy_core_plugins/stack_dump/register_callbacks.py +79 -0
- code_puppy_core_plugins/statusline/__init__.py +14 -0
- code_puppy_core_plugins/statusline/config.py +68 -0
- code_puppy_core_plugins/statusline/payload.py +138 -0
- code_puppy_core_plugins/statusline/prompt_patch.py +76 -0
- code_puppy_core_plugins/statusline/register_callbacks.py +45 -0
- code_puppy_core_plugins/statusline/runner.py +122 -0
- code_puppy_core_plugins/statusline/statusline_command.py +197 -0
- code_puppy_core_plugins/steer_queue/__init__.py +10 -0
- code_puppy_core_plugins/steer_queue/queue_menu.py +444 -0
- code_puppy_core_plugins/steer_queue/register_callbacks.py +138 -0
- code_puppy_core_plugins/subagent_panel/README.md +102 -0
- code_puppy_core_plugins/subagent_panel/__init__.py +24 -0
- code_puppy_core_plugins/subagent_panel/coalesce_patch.py +242 -0
- code_puppy_core_plugins/subagent_panel/panel_render.py +145 -0
- code_puppy_core_plugins/subagent_panel/register_callbacks.py +535 -0
- code_puppy_core_plugins/subagent_panel/resume_repaint.py +112 -0
- code_puppy_core_plugins/subagent_panel/state.py +231 -0
- code_puppy_core_plugins/switch_agent_resume/__init__.py +5 -0
- code_puppy_core_plugins/switch_agent_resume/register_callbacks.py +314 -0
- code_puppy_core_plugins/theme/README.md +86 -0
- code_puppy_core_plugins/theme/__init__.py +14 -0
- code_puppy_core_plugins/theme/bundled_palettes.py +346 -0
- code_puppy_core_plugins/theme/content_styles.py +146 -0
- code_puppy_core_plugins/theme/osc_palette.py +178 -0
- code_puppy_core_plugins/theme/picker.py +358 -0
- code_puppy_core_plugins/theme/prompt_toolkit_theme.py +113 -0
- code_puppy_core_plugins/theme/register_callbacks.py +348 -0
- code_puppy_core_plugins/theme/rich_themes.py +202 -0
- code_puppy_core_plugins/theme/themes.py +720 -0
- code_puppy_core_plugins/timestamp_heartbeat/__init__.py +1 -0
- code_puppy_core_plugins/timestamp_heartbeat/register_callbacks.py +114 -0
- code_puppy_core_plugins/token_ratio_learner/__init__.py +5 -0
- code_puppy_core_plugins/token_ratio_learner/ratios.py +208 -0
- code_puppy_core_plugins/token_ratio_learner/register_callbacks.py +213 -0
- code_puppy_core_plugins/universal_constructor/__init__.py +13 -0
- code_puppy_core_plugins/universal_constructor/models.py +138 -0
- code_puppy_core_plugins/universal_constructor/provider.py +62 -0
- code_puppy_core_plugins/universal_constructor/register_callbacks.py +75 -0
- code_puppy_core_plugins/universal_constructor/registry.py +302 -0
- code_puppy_core_plugins/universal_constructor/sandbox.py +584 -0
- code_puppy_core_plugins/wide_completion_menu/__init__.py +6 -0
- code_puppy_core_plugins/wide_completion_menu/register_callbacks.py +165 -0
- code_puppy_core_plugins/wiggum/__init__.py +1 -0
- code_puppy_core_plugins/wiggum/goal_runs.py +91 -0
- code_puppy_core_plugins/wiggum/judge.py +299 -0
- code_puppy_core_plugins/wiggum/judge_config.py +249 -0
- code_puppy_core_plugins/wiggum/judges_menu.py +814 -0
- code_puppy_core_plugins/wiggum/register_callbacks.py +569 -0
- code_puppy_core_plugins/wiggum/state.py +89 -0
- code_puppy_core_plugins/yolo_cli/__init__.py +1 -0
- code_puppy_core_plugins/yolo_cli/register_callbacks.py +41 -0
- code_puppy_core_plugins-0.0.2.dist-info/METADATA +64 -0
- code_puppy_core_plugins-0.0.2.dist-info/RECORD +313 -0
- code_puppy_core_plugins-0.0.2.dist-info/WHEEL +4 -0
- code_puppy_core_plugins-0.0.2.dist-info/entry_points.txt +55 -0
- code_puppy_core_plugins-0.0.2.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review
|
|
3
|
+
argument-hint: pr_number(optional) | additional_instructions
|
|
4
|
+
description: Code review with smart parent branch detection and optional PR posting
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# CODE REVIEW WORKFLOW
|
|
8
|
+
|
|
9
|
+
**Argument:** `$ARGUMENTS` (optional PR number)
|
|
10
|
+
|
|
11
|
+
## STEP 1: Branch setup
|
|
12
|
+
|
|
13
|
+
### 1a. If PR number provided:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
CURRENT_BRANCH=$(git branch --show-current)
|
|
17
|
+
PR_NUMBER="${ARGUMENTS}"
|
|
18
|
+
PR_BRANCH=$(gh pr view $PR_NUMBER --json headRefName -q '.headRefName')
|
|
19
|
+
PARENT_BRANCH=$(gh pr view $PR_NUMBER --json baseRefName -q '.baseRefName')
|
|
20
|
+
if [ "$PR_BRANCH" != "$CURRENT_BRANCH" ]; then
|
|
21
|
+
git fetch origin "$PR_BRANCH" && git checkout "$PR_BRANCH"
|
|
22
|
+
fi
|
|
23
|
+
git fetch origin "$PARENT_BRANCH"
|
|
24
|
+
echo "PARENT_BRANCH: $PARENT_BRANCH"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### 1b. If no PR number:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
CURRENT_BRANCH=$(git branch --show-current)
|
|
31
|
+
PARENT_BRANCH=""
|
|
32
|
+
for branch in main master develop; do
|
|
33
|
+
if git rev-parse --verify "origin/$branch" >/dev/null 2>&1; then
|
|
34
|
+
MERGE_BASE=$(git merge-base HEAD "origin/$branch" 2>/dev/null)
|
|
35
|
+
if [ -n "$MERGE_BASE" ] && [ "$branch" != "$CURRENT_BRANCH" ]; then
|
|
36
|
+
PARENT_BRANCH="$branch"; break
|
|
37
|
+
fi
|
|
38
|
+
fi
|
|
39
|
+
done
|
|
40
|
+
PARENT_BRANCH="${PARENT_BRANCH:-main}"
|
|
41
|
+
echo "PARENT_BRANCH: $PARENT_BRANCH"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## STEP 2: Detect stack
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
FLUX_ROOT="${FLUX_ROOT:-$HOME/.flux}"
|
|
48
|
+
FLUX_DIR=$(printf '%s' "$(pwd -P)" | tr -cs 'a-zA-Z0-9' '-')
|
|
49
|
+
FLUX_BASE="$FLUX_ROOT/$FLUX_DIR"
|
|
50
|
+
echo "FLUX_BASE=$FLUX_BASE"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
If a file called `stack.env` exists at `$FLUX_BASE/stack.env`, read it and set `$STACK` from its contents. Otherwise, run the following detection script to determine `$STACK` and save it (this only ever runs the first time for this directory):
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
STACK="software"
|
|
57
|
+
if [ -f "package.json" ]; then
|
|
58
|
+
STACK=$(bun -e "
|
|
59
|
+
const d=JSON.parse(require('fs').readFileSync('./package.json','utf8'));
|
|
60
|
+
const deps=Object.assign({}, d.dependencies, d.devDependencies, d.peerDependencies);
|
|
61
|
+
const frameworks=['ink','react','vue','angular','next','express'];
|
|
62
|
+
const fw=frameworks.find(f=>deps[f]);
|
|
63
|
+
const ts=deps['typescript']?'TypeScript':'JavaScript';
|
|
64
|
+
console.log(fw?fw+' + '+ts:ts);
|
|
65
|
+
" 2>/dev/null || echo "JavaScript/TypeScript")
|
|
66
|
+
elif [ -f "Cargo.toml" ]; then STACK="Rust"
|
|
67
|
+
elif [ -f "go.mod" ]; then STACK="Go"
|
|
68
|
+
elif [ -f "requirements.txt" ] || [ -f "pyproject.toml" ]; then STACK="Python"
|
|
69
|
+
elif [ -f "pom.xml" ] || [ -f "build.gradle" ]; then STACK="Java/Kotlin"
|
|
70
|
+
fi
|
|
71
|
+
mkdir -p "$FLUX_BASE"
|
|
72
|
+
echo "$STACK" > "$FLUX_BASE/stack.env"
|
|
73
|
+
echo "Detected stack: $STACK (saved)"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## STEP 3: Branch ownership & merge base
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
MERGE_BASE=$(git merge-base HEAD "origin/$PARENT_BRANCH")
|
|
80
|
+
BRANCH_AUTHOR=$(git log --format='%an' --reverse "$MERGE_BASE..HEAD" 2>/dev/null | head -1)
|
|
81
|
+
CURRENT_USER=$(git config user.name)
|
|
82
|
+
[ "$BRANCH_AUTHOR" = "$CURRENT_USER" ] && IS_MY_BRANCH="true" || IS_MY_BRANCH="false"
|
|
83
|
+
echo "MERGE_BASE: $MERGE_BASE IS_MY_BRANCH: $IS_MY_BRANCH"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## SCOPE CONSTRAINTS (CRITICAL)
|
|
87
|
+
|
|
88
|
+
**ONLY** flag issues **newly introduced** by changes vs `$MERGE_BASE` in files **directly modified**.
|
|
89
|
+
|
|
90
|
+
**DO NOT** flag: pre-existing issues in unchanged code, files/lines not touched, missing tests/benchmarks, style preferences.
|
|
91
|
+
|
|
92
|
+
> Why `$MERGE_BASE` not `origin/$PARENT_BRANCH`: upstream commits that landed after this branch was created would pollute the diff. Merge-base is the exact divergence point.
|
|
93
|
+
|
|
94
|
+
## STEP 4: Identify changed files
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
git diff --name-only "$MERGE_BASE"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## STEP 5: Analyze diffs
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
git diff "$MERGE_BASE"
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Group files by: key modules, logical areas, high-risk changes (security, performance, data handling).
|
|
107
|
+
|
|
108
|
+
## STEP 6: Spawn code review sub-agents
|
|
109
|
+
|
|
110
|
+
Launch with `invoke_agent` tool, `run_in_background: false`.
|
|
111
|
+
|
|
112
|
+
**Agent count:**
|
|
113
|
+
| Changed Files | Agents | Strategy |
|
|
114
|
+
|---|---|---|
|
|
115
|
+
| 1-5 | 1-3 | Group related files |
|
|
116
|
+
| 6-15 | 4-8 | One per module/feature area |
|
|
117
|
+
| 16-50 | 8-12 | Group by directory |
|
|
118
|
+
| 50+ | 12-15 max | By directory, prioritize high-risk |
|
|
119
|
+
|
|
120
|
+
Per agent, provide: file paths + line ranges, relevant diff snippets, module/area name, PR context.
|
|
121
|
+
|
|
122
|
+
### Sub-agent prompt template
|
|
123
|
+
|
|
124
|
+
````
|
|
125
|
+
# CODE REVIEW: {{MODULE_NAME}}
|
|
126
|
+
|
|
127
|
+
## Files: {{FILE_LIST_WITH_LINE_RANGES}}
|
|
128
|
+
|
|
129
|
+
## Diffs
|
|
130
|
+
```diff
|
|
131
|
+
{{RELEVANT_DIFF_SNIPPETS}}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Checklist — flag only issues in code CHANGED by this PR vs `$MERGE_BASE`:
|
|
135
|
+
- [ ] Stubs/Placeholders: non-functional required code (TODOs, NotImplemented)
|
|
136
|
+
- [ ] Race Conditions: concurrency, async/await problems
|
|
137
|
+
- [ ] Performance: O(n²) loops, memory leaks, excessive allocations, blocking calls
|
|
138
|
+
- [ ] Logic Errors: off-by-one, null checks, edge cases, wrong conditionals
|
|
139
|
+
- [ ] Dead Code: unwired code, unreachable paths
|
|
140
|
+
- [ ] Security: input validation, injection risks, exposed secrets
|
|
141
|
+
- [ ] Requirements Mismatch: code doesn't fulfill intended purpose
|
|
142
|
+
- [ ] Complexity: functions >50 lines, cyclomatic complexity >10 branches, nesting >4 levels
|
|
143
|
+
- [ ] Duplication: repeated code blocks >5 lines, duplicate constants/magic strings used 3+ times
|
|
144
|
+
- [ ] Maintainability: unused variables/imports, dead code paths, hardcoded magic numbers
|
|
145
|
+
- [ ] Design: commented-out code blocks >3 lines, inconsistent naming, TODO/FIXME in changed code
|
|
146
|
+
- [ ] Language-specific (TypeScript): missing async/await handling, unhandled promise rejections, `var` usage, `==` vs `===` in changed lines
|
|
147
|
+
|
|
148
|
+
DO NOT create tasks for: missing tests, benchmarks, style preferences, pre-existing issues.
|
|
149
|
+
|
|
150
|
+
## Task File Creation
|
|
151
|
+
|
|
152
|
+
For each issue, create `$FLUX_BASE/review/<issue-slug>.md`:
|
|
153
|
+
|
|
154
|
+
```markdown
|
|
155
|
+
---
|
|
156
|
+
severity: critical|high|medium|low
|
|
157
|
+
file: <filepath>
|
|
158
|
+
lines: <start>-<end>
|
|
159
|
+
introduced: true
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
# <Issue Title>
|
|
163
|
+
|
|
164
|
+
## Problem
|
|
165
|
+
<description>
|
|
166
|
+
|
|
167
|
+
## Evidence
|
|
168
|
+
<code snippet or diff>
|
|
169
|
+
|
|
170
|
+
## Impact
|
|
171
|
+
<what could go wrong>
|
|
172
|
+
|
|
173
|
+
## Suggested Fix
|
|
174
|
+
<recommended approach>
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Before creating any task, verify: issue is in CHANGED code, did NOT exist before these changes, is genuinely problematic.
|
|
178
|
+
````
|
|
179
|
+
|
|
180
|
+
## STEP 7: Categorize by severity
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
FLUX_ROOT="${FLUX_ROOT:-$HOME/.flux}"
|
|
184
|
+
FLUX_DIR=$(printf '%s' "$(pwd -P)" | tr -cs 'a-zA-Z0-9' '-')
|
|
185
|
+
FLUX_BASE="$FLUX_ROOT/$FLUX_DIR"
|
|
186
|
+
mkdir -p "$FLUX_BASE/todo" "$FLUX_BASE/done" "$FLUX_BASE/review" "$FLUX_BASE/research"
|
|
187
|
+
mkdir -p "$FLUX_BASE/review/critical" "$FLUX_BASE/review/high" "$FLUX_BASE/review/medium" "$FLUX_BASE/review/low"
|
|
188
|
+
echo "FLUX_BASE=$FLUX_BASE"
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Launch sub-agents (groups of 10) to move `$FLUX_BASE/review/*.md` to the appropriate severity subdirectory.
|
|
192
|
+
|
|
193
|
+
| Severity | Criteria |
|
|
194
|
+
| -------- | ------------------------------------------------------------------- |
|
|
195
|
+
| Critical | Security vulns, data loss, crashes, blocking bugs |
|
|
196
|
+
| High | Significant logic errors, perf issues affecting UX, race conditions |
|
|
197
|
+
| Medium | Minor logic issues, clarity problems, non-blocking bugs |
|
|
198
|
+
| Low | Minor improvements, low-probability edge cases |
|
|
199
|
+
|
|
200
|
+
## PATH REFRESH (after STEP 7)
|
|
201
|
+
|
|
202
|
+
Flat paths `$FLUX_BASE/review/*.md` no longer exist after categorization. All subsequent steps must locate files via:
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
find "$FLUX_BASE/review/" -name "*.md" -type f | sort
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Steps 8, 10, and 11 sub-agents must use `find` or explicit subdirectory paths — never assume flat paths still exist.
|
|
209
|
+
|
|
210
|
+
## STEP 8: Verify newly introduced issues
|
|
211
|
+
|
|
212
|
+
Enumerate all task files with `find "$FLUX_BASE/review/" -name "*.md" -type f | sort`, then launch sub-agents. Each agent diffs the flagged file:
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
git diff "$MERGE_BASE" -- <filepath>
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Classify each issue:
|
|
219
|
+
| Classification | Definition |
|
|
220
|
+
|---|---|
|
|
221
|
+
| Introduced | Exists only in new changes; parent branch is clean |
|
|
222
|
+
| Pre-existing | Exists in parent branch; these changes didn't create it |
|
|
223
|
+
| Aggravated | Pre-existing but made worse by these changes |
|
|
224
|
+
|
|
225
|
+
## STEP 9: Summarize findings
|
|
226
|
+
|
|
227
|
+
Enumerate with `find "$FLUX_BASE/review/" -name "*.md" -type f | sort`. Report: introduced issues requiring attention, aggravated issues to consider, pre-existing issues flagged for removal.
|
|
228
|
+
|
|
229
|
+
## STEP 10: User checkpoint
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
find "$FLUX_BASE/review/" -name "*.md" -type f | sort
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Use `ask_user_question`: present pre-existing issues (full paths), ask which to keep. Default if no response: DELETE pre-existing issue tasks.
|
|
236
|
+
|
|
237
|
+
## STEP 11: Consolidation & deduplication
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
find "$FLUX_BASE/review/" -name "*.md" -type f | sort
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
Divide into groups, assign to sub-agents. Sub-agents use full paths from `find` (e.g. `$FLUX_BASE/review/high/auth-race-condition.md`).
|
|
244
|
+
|
|
245
|
+
| Classification | Action |
|
|
246
|
+
| ----------------------- | ------------------------ |
|
|
247
|
+
| Exact Duplicate | Remove one |
|
|
248
|
+
| Semantic Duplicate | Merge into one |
|
|
249
|
+
| Consolidation Candidate | Combine into single task |
|
|
250
|
+
| Unique | Keep as-is |
|
|
251
|
+
|
|
252
|
+
## STEP 12: Final summary & post-review actions
|
|
253
|
+
|
|
254
|
+
```
|
|
255
|
+
Total Issues Found: X
|
|
256
|
+
+-- Critical: A +-- High: B +-- Medium: C +-- Low: D
|
|
257
|
+
|
|
258
|
+
Duplicates Removed: Y Tasks Consolidated: Z -> W Final Task Count: N
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
**Recommendation:** `APPROVE` / `REQUEST CHANGES` / `NEEDS DISCUSSION`
|
|
262
|
+
|
|
263
|
+
**If PR provided OR reviewing someone else's branch (`IS_MY_BRANCH=false`):**
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
REVIEW_COUNT=$(find "$FLUX_BASE/review/" -name "*.md" -type f 2>/dev/null | wc -l | tr -d ' ')
|
|
267
|
+
if [ "$REVIEW_COUNT" -eq 0 ]; then
|
|
268
|
+
echo "No issues found — no zip created."
|
|
269
|
+
else
|
|
270
|
+
FLAT_BRANCH=$(echo "$(git branch --show-current)" | tr '/' '-')
|
|
271
|
+
ZIP_NAME="${FLAT_BRANCH}-review.zip"
|
|
272
|
+
cd "$FLUX_BASE" && zip -r "$ZIP_NAME" review/
|
|
273
|
+
echo "Review package: $FLUX_BASE/$ZIP_NAME"
|
|
274
|
+
fi
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
Report zip location. If PR provided: "share with PR author or attach manually." If no PR, someone else's branch: "share with the branch author."
|
|
278
|
+
|
|
279
|
+
**If `IS_MY_BRANCH=true`:** Leave files in `$FLUX_BASE/review/`. Report: "Issues saved to `$FLUX_BASE/review/` organized by severity."
|
|
280
|
+
|
|
281
|
+
## ERROR HANDLING
|
|
282
|
+
|
|
283
|
+
- Git command fails → report and stop
|
|
284
|
+
- Sub-agent fails → log, continue with remaining agents
|
|
285
|
+
- No changes found → report "No files changed vs parent branch" and exit
|
|
286
|
+
- 100+ issues found → pause and ask user how to proceed before categorization
|
|
287
|
+
- gh CLI fails → report but continue with local review
|
|
288
|
+
|
|
289
|
+
## HARD CONSTRAINTS
|
|
290
|
+
|
|
291
|
+
- **Path**: All `create_file`/`replace_in_file`/`mv`/`cp` file paths MUST use the exact `FLUX_BASE` value printed by STEP 2 or STEP 7 bash output (e.g. `FLUX_BASE=/Users/...`). Copy it character-for-character — never reconstruct it from `cwd` or memory.
|
|
292
|
+
- `/flux/review` MUST NOT modify any source files. The only permitted file operations are: creating issue task files in `$FLUX_BASE/review/`, moving/deleting those files during deduplication, and creating the zip archive. No changes to `./src/`, no git commits, no pushes.
|
|
293
|
+
|
|
294
|
+
## NEXT STEP
|
|
295
|
+
|
|
296
|
+
Then propose the next step:
|
|
297
|
+
|
|
298
|
+
- if user is reviewing their own branch: `/flux/address-feedback`
|
|
299
|
+
- if user is reviewing someone else's PR: `share the zip with the author`
|
|
300
|
+
|
|
301
|
+
Valid `//flux` commands: `/flux/config`, `/flux/new`, `/flux/ask`, `/flux/split`, `/flux/aug`, `/flux/exec`, `/flux/qa`, `/flux/tests`, `/flux/commit`, `/flux/create-pr`, `/flux/review`, `/flux/address-feedback`, `/flux/status`, `/flux/auto-pilot`, `/flux/rebase`. Do NOT suggest any command not on this list.
|
|
302
|
+
|
|
303
|
+
=================
|
|
304
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: split
|
|
3
|
+
argument-hint: task_file | additional_instructions
|
|
4
|
+
description: Decompose a large task into smaller, single-session tasks.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# DECOMPOSE A LARGE TASK
|
|
8
|
+
|
|
9
|
+
**Argument:** `$ARGUMENTS`
|
|
10
|
+
|
|
11
|
+
## STEP 1: Mark as in-progress
|
|
12
|
+
|
|
13
|
+
Before anything else, update the input task file's frontmatter (replace existing values, or prepend if no frontmatter exists):
|
|
14
|
+
|
|
15
|
+
```yaml
|
|
16
|
+
---
|
|
17
|
+
stage: split
|
|
18
|
+
status: in-progress
|
|
19
|
+
updated: <YYYY-MM-DD HH:MM>
|
|
20
|
+
---
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## STEP 2: Resolve path & setup
|
|
24
|
+
|
|
25
|
+
If `$ARGUMENTS` has no `/`, prepend `$FLUX_BASE/todo/`. If no `.md`, append `.md`. (e.g. `NOTIFS` → `$FLUX_BASE/todo/NOTIFS.md`)
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
FLUX_ROOT="${FLUX_ROOT:-$HOME/.flux}"
|
|
29
|
+
FLUX_DIR=$(printf '%s' "$(pwd -P)" | tr -cs 'a-zA-Z0-9' '-')
|
|
30
|
+
FLUX_BASE="$FLUX_ROOT/$FLUX_DIR"
|
|
31
|
+
mkdir -p "$FLUX_BASE/todo" "$FLUX_BASE/done" "$FLUX_BASE/review" "$FLUX_BASE/research"
|
|
32
|
+
echo "FLUX_BASE=$FLUX_BASE"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## STEP 3: Decompose into subtask files
|
|
36
|
+
|
|
37
|
+
### 3.1 Choose a prefix
|
|
38
|
+
|
|
39
|
+
Short, uppercase, human-meaningful, fewer than 8 characters. Example: tasks about "in production" stubs → `IN_PROD_1.md`, `IN_PROD_2.md`, etc.
|
|
40
|
+
|
|
41
|
+
### 3.2 Write subtask files
|
|
42
|
+
|
|
43
|
+
Output files:
|
|
44
|
+
|
|
45
|
+
- `$FLUX_BASE/todo/PREFIX_1.md`
|
|
46
|
+
- `$FLUX_BASE/todo/PREFIX_2.md`
|
|
47
|
+
- `$FLUX_BASE/todo/PREFIX_3.md`
|
|
48
|
+
- ... etc.
|
|
49
|
+
|
|
50
|
+
Each task must be:
|
|
51
|
+
|
|
52
|
+
- Focused on a single area of concern
|
|
53
|
+
- Achievable in **one Claude session** — after writing, ask yourself "is this really doable in one session?" If no, split into A/B/C variants
|
|
54
|
+
- Free of research tasks (all research is done prior to execution)
|
|
55
|
+
- Free of tests and benchmarks (see 3.3 and 3.4)
|
|
56
|
+
|
|
57
|
+
**Frontmatter (required at top of every subtask file):**
|
|
58
|
+
|
|
59
|
+
```yaml
|
|
60
|
+
---
|
|
61
|
+
stage: new
|
|
62
|
+
status: done
|
|
63
|
+
updated: <YYYY-MM-DD HH:MM>
|
|
64
|
+
---
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Body must include:**
|
|
68
|
+
|
|
69
|
+
- `OBJECTIVE:` — what this task accomplishes
|
|
70
|
+
- Numbered subtasks: SUBTASK1, SUBTASK2, SUBTASK3...
|
|
71
|
+
- For each: what changes, where it changes, why it changes
|
|
72
|
+
- Clear definition of done
|
|
73
|
+
- Research notes and locations of relevant docs/source code
|
|
74
|
+
|
|
75
|
+
### 3.3 No tests
|
|
76
|
+
|
|
77
|
+
Another team owns tests. Writing any test code makes their work harder. Each task file must explicitly state: no tests to be written.
|
|
78
|
+
|
|
79
|
+
### 3.4 No benchmarks
|
|
80
|
+
|
|
81
|
+
Another team owns benchmarks. Writing any benchmark code makes their work harder. Each task file must explicitly state: no benchmarks to be written.
|
|
82
|
+
|
|
83
|
+
## STEP 4: Preserve the original task file
|
|
84
|
+
|
|
85
|
+
Update the original task file's frontmatter to mark it as split, then move it to the session done directory.
|
|
86
|
+
|
|
87
|
+
1. Update the original file's frontmatter (replace `stage`, `status`, `updated` — keep body unchanged):
|
|
88
|
+
|
|
89
|
+
```yaml
|
|
90
|
+
---
|
|
91
|
+
stage: split
|
|
92
|
+
status: complete
|
|
93
|
+
updated: <YYYY-MM-DD HH:MM>
|
|
94
|
+
---
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
2. Read the session timestamp and move to the session done subdirectory:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
SESSION_TS=$(grep '^SESSION_TS=' "$FLUX_BASE/session.env" 2>/dev/null | cut -d= -f2)
|
|
101
|
+
SESSION_TS="${SESSION_TS:-$(date +%Y-%m-%d-%H-%M)}"
|
|
102
|
+
mkdir -p "$FLUX_BASE/done/$SESSION_TS"
|
|
103
|
+
mv "<original_task_file_path>" "$FLUX_BASE/done/$SESSION_TS/"
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
The original file is preserved in `done/$SESSION_TS/` as an audit trail of the pre-split specification.
|
|
107
|
+
|
|
108
|
+
## HARD CONSTRAINTS
|
|
109
|
+
|
|
110
|
+
- **Path**: All `create_file` file paths MUST use the exact `FLUX_BASE` value printed by the STEP 2 bash output (e.g. `FLUX_BASE=/Users/...`). Copy it character-for-character — never reconstruct it from `cwd` or memory.
|
|
111
|
+
- `/flux/split` is a **decompose-only** command. You MUST NOT modify any source files, run any tests, or touch any file outside of `$FLUX_BASE/todo/`. The only file operations allowed are: writing the new subtask files and deleting the original task file. If you find yourself about to do anything else, stop immediately.
|
|
112
|
+
|
|
113
|
+
## PROPOSE NEXT STEP
|
|
114
|
+
|
|
115
|
+
Then propose the next step: `/flux/aug` (include arguments if needed).
|
|
116
|
+
|
|
117
|
+
Valid `//flux` commands: `/flux/config`, `/flux/new`, `/flux/ask`, `/flux/split`, `/flux/aug`, `/flux/exec`, `/flux/qa`, `/flux/tests`, `/flux/commit`, `/flux/create-pr`, `/flux/review`, `/flux/address-feedback`, `/flux/status`, `/flux/auto-pilot`, `/flux/rebase`. Do NOT suggest any command not on this list.
|
|
118
|
+
|
|
119
|
+
=================
|
|
120
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: squash-commits
|
|
3
|
+
description: Squash all unmerged commits on the current branch into a single commit
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SQUASH ALL UNMERGED COMMITS INTO ONE
|
|
7
|
+
|
|
8
|
+
Collapses every commit on your branch that hasn't landed on the default branch yet into a single commit. Useful before opening a PR or when you want a clean history.
|
|
9
|
+
|
|
10
|
+
**Example:** 7 work-in-progress commits on `luc/my-feature` → squashed into 1 clean commit, preserving all changes.
|
|
11
|
+
|
|
12
|
+
## STEP 1: Capture current state
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
BRANCH=$(git branch --show-current)
|
|
16
|
+
TICKET=$(echo "$BRANCH" | grep -oE '[A-Z]+-[0-9]+' | head -1 || echo "")
|
|
17
|
+
DEFAULT_BRANCH=$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name' 2>/dev/null || echo "main")
|
|
18
|
+
echo "BRANCH: $BRANCH"
|
|
19
|
+
echo "TICKET: $TICKET"
|
|
20
|
+
echo "DEFAULT_BRANCH: $DEFAULT_BRANCH"
|
|
21
|
+
|
|
22
|
+
# Commits on our branch that aren't on the default branch
|
|
23
|
+
COMMIT_COUNT=$(git log "$DEFAULT_BRANCH"..HEAD --oneline | wc -l | tr -d ' ')
|
|
24
|
+
echo "Commits to squash: $COMMIT_COUNT"
|
|
25
|
+
git log "$DEFAULT_BRANCH"..HEAD --oneline
|
|
26
|
+
|
|
27
|
+
# Files we touch
|
|
28
|
+
git diff "$DEFAULT_BRANCH" --stat
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**Guards — stop if any of the following are true:**
|
|
32
|
+
|
|
33
|
+
- `$BRANCH` is empty or equals `HEAD` (detached HEAD state) → stop and tell the user: "You are in a detached HEAD state. Please checkout a real feature branch before squashing."
|
|
34
|
+
- `$COMMIT_COUNT` == 0 → stop and tell the user: "No commits found on this branch ahead of `$DEFAULT_BRANCH`. Nothing to squash."
|
|
35
|
+
- `$COMMIT_COUNT` == 1 → stop and tell the user: "This branch has only 1 commit ahead of `$DEFAULT_BRANCH`. There is nothing to squash — you already have a single commit."
|
|
36
|
+
|
|
37
|
+
## STEP 2: Working tree must be clean
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
git status --porcelain
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
If there is **any** output (staged or unstaged changes, untracked files you care about):
|
|
44
|
+
|
|
45
|
+
`ask_user_question` — question: "Your working tree is not clean. Squashing requires a clean tree (or stashed work). How do you want to proceed?" / header: "Unclean working tree" / options:
|
|
46
|
+
|
|
47
|
+
- `Stash changes and continue` → run `git stash push -u -m "myproj-flux-squash-wip"`. Set an internal flag that a stash was created — STEP 9 will offer to pop it.
|
|
48
|
+
- `Abort` → stop. Do not squash.
|
|
49
|
+
|
|
50
|
+
If the tree is already clean, continue to STEP 3.
|
|
51
|
+
|
|
52
|
+
## STEP 3: Check remote sync
|
|
53
|
+
|
|
54
|
+
Fetch the remote branch ref (quietly, so offline environments don't hard-fail), then check if the remote is ahead of the local branch:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
git fetch origin "$BRANCH" 2>/dev/null || true
|
|
58
|
+
|
|
59
|
+
REMOTE_AHEAD=$(git rev-list HEAD..origin/"$BRANCH" --count 2>/dev/null || echo "0")
|
|
60
|
+
echo "Remote ahead by: $REMOTE_AHEAD commit(s)"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
If `$REMOTE_AHEAD` > 0 → **stop** and inform the user:
|
|
64
|
+
|
|
65
|
+
> ⚠️ Your local branch `$BRANCH` is behind its remote counterpart (`origin/$BRANCH`) by **$REMOTE_AHEAD commit(s)**. Squashing now would rewrite history on top of a stale base, causing a push conflict.
|
|
66
|
+
>
|
|
67
|
+
> **What to do first:**
|
|
68
|
+
>
|
|
69
|
+
> 1. Run `/flux/rebase` to bring your branch up to date with the latest `$DEFAULT_BRANCH` while incorporating the remote's changes.
|
|
70
|
+
> 2. Once your branch is in sync, run `/flux/squash-commits` again.
|
|
71
|
+
>
|
|
72
|
+
> Alternatively, run `git pull --rebase origin $BRANCH` to sync with the remote, then re-run `/flux/squash-commits`.
|
|
73
|
+
|
|
74
|
+
If `$REMOTE_AHEAD` == 0 (or the remote branch doesn't exist yet), continue to STEP 4.
|
|
75
|
+
|
|
76
|
+
## STEP 4: Show commits and confirm
|
|
77
|
+
|
|
78
|
+
Display the commits that will be squashed:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
echo "The following $COMMIT_COUNT commits will be squashed into one:"
|
|
82
|
+
git log "$DEFAULT_BRANCH"..HEAD --oneline
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
`ask_user_question` — question: "Squash these $COMMIT_COUNT commits into one?" / header: "Confirm squash" / options:
|
|
86
|
+
|
|
87
|
+
- `Yes, squash them` → continue to STEP 5.
|
|
88
|
+
- `Abort` → stop. Do not squash.
|
|
89
|
+
|
|
90
|
+
## STEP 5: Build the combined commit message
|
|
91
|
+
|
|
92
|
+
Collect all commit subjects and bodies, in chronological order (oldest first), and format as a bulleted list:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
SQUASH_MSG=$(git log "$DEFAULT_BRANCH"..HEAD --format="- %s%n%b" --reverse | sed '/^$/d' | sed 's/^- -/ -/')
|
|
96
|
+
echo "Proposed commit message:"
|
|
97
|
+
echo "---"
|
|
98
|
+
echo "$SQUASH_MSG"
|
|
99
|
+
echo "---"
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
`ask_user_question` — question: "Use this combined commit message for the squashed commit?" / header: "Commit message" / options:
|
|
103
|
+
|
|
104
|
+
- `Yes, use this message` → use `$SQUASH_MSG` as-is. Continue to STEP 6.
|
|
105
|
+
- `Let me write my own` → `ask_user_question` — question: "Enter your commit message:" / header: "Custom message" / options: _(free text — user selects Other)_. Use the user's input as `$SQUASH_MSG`.
|
|
106
|
+
|
|
107
|
+
## STEP 6: Squash
|
|
108
|
+
|
|
109
|
+
Perform the squash using a soft reset to the merge base, then commit:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
MERGE_BASE=$(git merge-base HEAD "$DEFAULT_BRANCH")
|
|
113
|
+
echo "Merge base: $MERGE_BASE"
|
|
114
|
+
git reset --soft "$MERGE_BASE"
|
|
115
|
+
git commit -m "$SQUASH_MSG"
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
> **What this does:** `git reset --soft` moves HEAD back to the merge base while keeping all changes staged, then a single `git commit` creates one new commit containing everything.
|
|
119
|
+
|
|
120
|
+
## STEP 7: Verify
|
|
121
|
+
|
|
122
|
+
Confirm the squash produced exactly 1 commit and that all changes are intact:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
echo "Commits on branch after squash:"
|
|
126
|
+
git log "$DEFAULT_BRANCH"..HEAD --oneline
|
|
127
|
+
|
|
128
|
+
echo ""
|
|
129
|
+
echo "Changed files vs $DEFAULT_BRANCH:"
|
|
130
|
+
git diff "$DEFAULT_BRANCH" --stat
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Expected: exactly 1 commit in the log. Changed files should match what was there before the squash. If the log shows more than 1 commit or the diff looks wrong — stop and investigate before pushing.
|
|
134
|
+
|
|
135
|
+
## STEP 8: Confirm push
|
|
136
|
+
|
|
137
|
+
After a squash, commit hashes differ from any previous push of the same branch. Choose the right push: first-time upstream vs `--force-with-lease` when the branch already exists on the remote.
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
git rev-parse @{u} >/dev/null 2>&1 && echo HAS_UPSTREAM || echo NO_UPSTREAM
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
- **`NO_UPSTREAM`** (first push of this branch): `ask_user_question` — question: "Squash is complete and verified. Push this branch and set upstream with `git push -u origin \"$BRANCH\"`? (No force needed.)" / header: "Push branch" / options: `Yes, push now` | `No, I'll push manually later`
|
|
144
|
+
|
|
145
|
+
- Yes → `git push -u origin "$BRANCH"`
|
|
146
|
+
- No → skip push; say so in STEP 9.
|
|
147
|
+
|
|
148
|
+
- **`HAS_UPSTREAM`**: `ask_user_question` — question: "Squash rewrote history. Push with `git push --force-with-lease origin \"$BRANCH\"`? Refuses if someone else pushed in the meantime. Only do this for your own feature branch — never `$DEFAULT_BRANCH`." / header: "Push squashed branch" / options: `Yes, force-with-lease now` | `No, I'll push manually later`
|
|
149
|
+
- Yes → `git push --force-with-lease origin "$BRANCH"`
|
|
150
|
+
- No → skip push; say so in STEP 9.
|
|
151
|
+
|
|
152
|
+
If `--force-with-lease` fails because the remote moved, run `git fetch origin`, re-evaluate (and re-ask if appropriate), then retry.
|
|
153
|
+
|
|
154
|
+
> ⚠️ Never `git push --force` without lease, and never force-push `$DEFAULT_BRANCH`.
|
|
155
|
+
|
|
156
|
+
## STEP 9: Summarize
|
|
157
|
+
|
|
158
|
+
Report:
|
|
159
|
+
|
|
160
|
+
- `$TICKET` (if any) and `$BRANCH`
|
|
161
|
+
- How many commits were squashed into 1 (the original `$COMMIT_COUNT`)
|
|
162
|
+
- The final commit message used
|
|
163
|
+
- Push: done vs deferred by user choice
|
|
164
|
+
- If STEP 2 stashed: use `ask_user_question` — question: "You stashed changes before squashing. Do you want to pop the stash now?" / header: "Restore stash" / options: `Yes, pop stash now` | `No, I'll pop it manually later`
|
|
165
|
+
- Yes → run `git stash pop`. If it produces conflicts, list the conflicted files and instruct the user to resolve them manually (`git add <file>` after editing, then `git stash drop` once done — do NOT run `git stash pop` again).
|
|
166
|
+
- No → remind the user to run `git stash pop` manually when ready.
|
|
167
|
+
|
|
168
|
+
## HARD CONSTRAINT
|
|
169
|
+
|
|
170
|
+
`/flux/squash-commits` MUST NOT modify commit content beyond the squash itself. MUST NOT commit to `$DEFAULT_BRANCH`. MUST NOT use `git push --force` (use `--force-with-lease` when updating an existing remote branch). MUST NOT touch any commits already present on `$DEFAULT_BRANCH`.
|
|
171
|
+
|
|
172
|
+
## Propose next step
|
|
173
|
+
|
|
174
|
+
Then propose the next step: `/flux/create-pr` (include arguments if needed).
|
|
175
|
+
|
|
176
|
+
Valid `//flux` commands: `/flux/config`, `/flux/new`, `/flux/ask`, `/flux/split`, `/flux/aug`, `/flux/exec`, `/flux/qa`, `/flux/tests`, `/flux/commit`, `/flux/create-pr`, `/flux/review`, `/flux/address-feedback`, `/flux/status`, `/flux/auto-pilot`, `/flux/rebase`, `/flux/squash-commits`. Do NOT suggest any command not on this list.
|
|
177
|
+
|
|
178
|
+
=================
|
|
179
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: status
|
|
3
|
+
description: Display the pipeline stage and status of all task files
|
|
4
|
+
ui-mode: flux-status
|
|
5
|
+
exec: {python} {script:flux_status.py}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /flux/status — PIPELINE STATUS
|
|
9
|
+
|
|
10
|
+
Show the current pipeline stage and status of every active task file in `todo/`.
|
|
11
|
+
|
|
12
|
+
> **Note:** This command is handled natively by the bundled flux_status.py
|
|
13
|
+
> script (resolved under code-puppy's config dir). The markdown below is
|
|
14
|
+
> reference documentation only — it is not executed by the AI.
|
|
15
|
+
|
|
16
|
+
## DATA SOURCE
|
|
17
|
+
|
|
18
|
+
Reads `~/.flux/<flattened-dir>/todo/*.md` only. `<flattened-dir>` is derived from
|
|
19
|
+
the current working directory at the time `/flux/status` is invoked — every
|
|
20
|
+
non-alphanumeric character in the absolute path is replaced with a hyphen.
|
|
21
|
+
Completed tasks moved to `done/` by `/flux/qa` are intentionally excluded.
|
|
22
|
+
|
|
23
|
+
## DISPLAY
|
|
24
|
+
|
|
25
|
+
Renders a floating overlay panel (upper-right corner) with:
|
|
26
|
+
|
|
27
|
+
- One row per task file: filename | stage | status
|
|
28
|
+
- Summary footer with counts per status value
|
|
29
|
+
- ESC to close
|
|
30
|
+
|
|
31
|
+
### Example output
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
𝕱 PIPELINE STATUS (Ctrl+F to close)
|
|
35
|
+
══════════════════════════════════════════════
|
|
36
|
+
─────────────────────────────────────────────
|
|
37
|
+
FIX_COMMAND_HINTS.md exec 🔄 in-progress
|
|
38
|
+
DARK_MODE.md qa 🔁 needs-rework
|
|
39
|
+
═══════════════════════════════════════════════
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
If there are no task files in `todo/`, the panel shows:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
(no todos)
|
|
46
|
+
```
|