@polderlabs/bizar 10.23.21 → 10.23.22

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 (129) hide show
  1. package/cli/banner.mjs +1 -1
  2. package/cli/commands/models.mjs +25 -2
  3. package/cli/commands/validate.mjs +1 -1
  4. package/cli/install/banner.mjs +1 -1
  5. package/config/claude/agents/bizar-accessibility-architect.md +153 -0
  6. package/config/claude/agents/bizar-agent-evaluator.md +210 -0
  7. package/config/claude/agents/bizar-architect.md +224 -0
  8. package/config/claude/agents/bizar-build-error-resolver.md +127 -0
  9. package/config/claude/agents/bizar-chief-of-staff.md +164 -0
  10. package/config/claude/agents/bizar-code-architect.md +84 -0
  11. package/config/claude/agents/bizar-code-explorer.md +82 -0
  12. package/config/claude/agents/bizar-code-reviewer.md +327 -0
  13. package/config/claude/agents/bizar-code-simplifier.md +60 -0
  14. package/config/claude/agents/bizar-comment-analyzer.md +58 -0
  15. package/config/claude/agents/bizar-conversation-analyzer.md +65 -0
  16. package/config/claude/agents/bizar-cpp-build-resolver.md +103 -0
  17. package/config/claude/agents/bizar-cpp-reviewer.md +85 -0
  18. package/config/claude/agents/bizar-csharp-reviewer.md +114 -0
  19. package/config/claude/agents/bizar-dart-build-resolver.md +214 -0
  20. package/config/claude/agents/bizar-database-reviewer.md +104 -0
  21. package/config/claude/agents/bizar-django-build-resolver.md +256 -0
  22. package/config/claude/agents/bizar-django-reviewer.md +173 -0
  23. package/config/claude/agents/bizar-doc-updater.md +120 -0
  24. package/config/claude/agents/bizar-docs-lookup.md +81 -0
  25. package/config/claude/agents/bizar-end-to-end-runner.md +120 -0
  26. package/config/claude/agents/bizar-fastapi-reviewer.md +83 -0
  27. package/config/claude/agents/bizar-flutter-reviewer.md +256 -0
  28. package/config/claude/agents/bizar-fsharp-reviewer.md +113 -0
  29. package/config/claude/agents/bizar-gan-evaluator.md +236 -0
  30. package/config/claude/agents/bizar-gan-generator.md +144 -0
  31. package/config/claude/agents/bizar-gan-planner.md +112 -0
  32. package/config/claude/agents/bizar-go-build-resolver.md +107 -0
  33. package/config/claude/agents/bizar-go-reviewer.md +89 -0
  34. package/config/claude/agents/bizar-harmonyos-app-resolver.md +186 -0
  35. package/config/claude/agents/bizar-harness-optimizer.md +59 -0
  36. package/config/claude/agents/bizar-healthcare-reviewer.md +96 -0
  37. package/config/claude/agents/bizar-homelab-architect.md +111 -0
  38. package/config/claude/agents/bizar-java-build-resolver.md +279 -0
  39. package/config/claude/agents/bizar-java-reviewer.md +194 -0
  40. package/config/claude/agents/bizar-kotlin-build-resolver.md +131 -0
  41. package/config/claude/agents/bizar-kotlin-reviewer.md +172 -0
  42. package/config/claude/agents/bizar-loop-operator.md +49 -0
  43. package/config/claude/agents/bizar-marketing-agent.md +163 -0
  44. package/config/claude/agents/bizar-mle-reviewer.md +166 -0
  45. package/config/claude/agents/bizar-network-architect.md +110 -0
  46. package/config/claude/agents/bizar-network-config-reviewer.md +110 -0
  47. package/config/claude/agents/bizar-network-troubleshooter.md +132 -0
  48. package/config/claude/agents/bizar-opensource-forker.md +211 -0
  49. package/config/claude/agents/bizar-opensource-packager.md +262 -0
  50. package/config/claude/agents/bizar-opensource-sanitizer.md +201 -0
  51. package/config/claude/agents/bizar-performance-optimizer.md +459 -0
  52. package/config/claude/agents/bizar-php-reviewer.md +113 -0
  53. package/config/claude/agents/bizar-planner.md +225 -0
  54. package/config/claude/agents/bizar-pr-test-analyzer.md +58 -0
  55. package/config/claude/agents/bizar-python-reviewer.md +111 -0
  56. package/config/claude/agents/bizar-pytorch-build-resolver.md +133 -0
  57. package/config/claude/agents/bizar-rag-pipeline-reviewer.md +71 -0
  58. package/config/claude/agents/bizar-react-build-resolver.md +219 -0
  59. package/config/claude/agents/bizar-react-reviewer.md +171 -0
  60. package/config/claude/agents/bizar-refactor-cleaner.md +98 -0
  61. package/config/claude/agents/bizar-rust-build-resolver.md +161 -0
  62. package/config/claude/agents/bizar-rust-reviewer.md +107 -0
  63. package/config/claude/agents/bizar-security-reviewer.md +121 -0
  64. package/config/claude/agents/bizar-seo-specialist.md +75 -0
  65. package/config/claude/agents/bizar-silent-failure-hunter.md +63 -0
  66. package/config/claude/agents/bizar-spec-miner.md +221 -0
  67. package/config/claude/agents/bizar-swift-build-resolver.md +174 -0
  68. package/config/claude/agents/bizar-swift-reviewer.md +120 -0
  69. package/config/claude/agents/bizar-tdd-guide.md +104 -0
  70. package/config/claude/agents/bizar-type-design-analyzer.md +54 -0
  71. package/config/claude/agents/bizar-typescript-reviewer.md +128 -0
  72. package/config/claude/agents/bizar-vue-reviewer.md +210 -0
  73. package/config/claude/hooks/agent-model-guard.mjs +2 -2
  74. package/config/skills/brainstorming/SKILL.md +253 -0
  75. package/config/skills/brainstorming/scripts/frame-template.html +213 -0
  76. package/config/skills/brainstorming/scripts/helper.js +167 -0
  77. package/config/skills/brainstorming/scripts/server.cjs +723 -0
  78. package/config/skills/brainstorming/scripts/start-server.sh +209 -0
  79. package/config/skills/brainstorming/scripts/stop-server.sh +120 -0
  80. package/config/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  81. package/config/skills/brainstorming/visual-companion.md +299 -0
  82. package/config/skills/dispatching-parallel-agents/SKILL.md +170 -0
  83. package/config/skills/executing-plans/SKILL.md +67 -0
  84. package/config/skills/finishing-a-development-branch/SKILL.md +228 -0
  85. package/config/skills/receiving-code-review/SKILL.md +208 -0
  86. package/config/skills/requesting-code-review/SKILL.md +98 -0
  87. package/config/skills/requesting-code-review/code-reviewer.md +181 -0
  88. package/config/skills/subagent-driven-development/SKILL.md +571 -0
  89. package/config/skills/subagent-driven-development/implementer-prompt.md +154 -0
  90. package/config/skills/subagent-driven-development/re-review-prompt.md +115 -0
  91. package/config/skills/subagent-driven-development/scripts/review-package +46 -0
  92. package/config/skills/subagent-driven-development/scripts/sdd-workspace +40 -0
  93. package/config/skills/subagent-driven-development/scripts/task-brief +41 -0
  94. package/config/skills/subagent-driven-development/task-reviewer-prompt.md +207 -0
  95. package/config/skills/systematic-debugging/CREATION-LOG.md +119 -0
  96. package/config/skills/systematic-debugging/SKILL.md +286 -0
  97. package/config/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  98. package/config/skills/systematic-debugging/condition-based-waiting.md +115 -0
  99. package/config/skills/systematic-debugging/defense-in-depth.md +122 -0
  100. package/config/skills/systematic-debugging/find-polluter.sh +72 -0
  101. package/config/skills/systematic-debugging/root-cause-tracing.md +169 -0
  102. package/config/skills/systematic-debugging/test-academic.md +14 -0
  103. package/config/skills/systematic-debugging/test-pressure-1.md +58 -0
  104. package/config/skills/systematic-debugging/test-pressure-2.md +68 -0
  105. package/config/skills/systematic-debugging/test-pressure-3.md +69 -0
  106. package/config/skills/test-driven-development/SKILL.md +323 -0
  107. package/config/skills/test-driven-development/writing-good-tests.md +198 -0
  108. package/config/skills/using-git-worktrees/SKILL.md +170 -0
  109. package/config/skills/using-superpowers/SKILL.md +66 -0
  110. package/config/skills/using-superpowers/references/antigravity-tools.md +23 -0
  111. package/config/skills/using-superpowers/references/codex-tools.md +108 -0
  112. package/config/skills/using-superpowers/references/gemini-tools.md +63 -0
  113. package/config/skills/using-superpowers/references/hermes-tools.md +56 -0
  114. package/config/skills/using-superpowers/references/pi-tools.md +16 -0
  115. package/config/skills/verification-before-completion/SKILL.md +123 -0
  116. package/config/skills/writing-plans/SKILL.md +174 -0
  117. package/config/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
  118. package/config/skills/writing-skills/SKILL.md +682 -0
  119. package/config/skills/writing-skills/anthropic-best-practices.md +1150 -0
  120. package/config/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
  121. package/config/skills/writing-skills/graphviz-conventions.dot +172 -0
  122. package/config/skills/writing-skills/persuasion-principles.md +187 -0
  123. package/config/skills/writing-skills/render-graphs.js +169 -0
  124. package/config/skills/writing-skills/testing-skills-with-subagents.md +384 -0
  125. package/config/trigger-patterns.json +1 -1
  126. package/package.json +1 -1
  127. package/packages/sdk/dist/version.d.ts +1 -1
  128. package/packages/sdk/dist/version.js +1 -1
  129. package/packages/sdk/package.json +1 -1
@@ -0,0 +1,170 @@
1
+ ---
2
+ name: dispatching-parallel-agents
3
+ description: Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies
4
+ ---
5
+
6
+ > **Bizar compatibility:** This procedure is fully integrated into Bizar. Bizar system, repository, model-routing, autonomy, and approval policy control whenever they differ. Do not add a separate mandatory approval gate, recurse into dispatch, or override the active Bizar workflow.
7
+
8
+
9
+ # Dispatching Parallel Agents
10
+
11
+ ## Overview
12
+
13
+ You delegate tasks to specialized agents with isolated context. By precisely crafting their instructions and context, you ensure they stay focused and succeed at their task. They should never inherit your session's context or history — you construct exactly what they need. This also preserves your own context for coordination work.
14
+
15
+ When you have multiple unrelated failures (different test files, different subsystems, different bugs), investigating them sequentially wastes time. Each investigation is independent and can happen in parallel.
16
+
17
+ **Core principle:** Dispatch one agent per independent problem domain. Let them work concurrently.
18
+
19
+ ## When to Use
20
+
21
+ ```dot
22
+ digraph when_to_use {
23
+ "Multiple failures?" [shape=diamond];
24
+ "Are they independent?" [shape=diamond];
25
+ "Single agent investigates all" [shape=box];
26
+ "One agent per problem domain" [shape=box];
27
+ "Can they work in parallel?" [shape=diamond];
28
+ "Sequential agents" [shape=box];
29
+ "Parallel dispatch" [shape=box];
30
+
31
+ "Multiple failures?" -> "Are they independent?" [label="yes"];
32
+ "Are they independent?" -> "Single agent investigates all" [label="no - related"];
33
+ "Are they independent?" -> "Can they work in parallel?" [label="yes"];
34
+ "Can they work in parallel?" -> "Parallel dispatch" [label="yes"];
35
+ "Can they work in parallel?" -> "Sequential agents" [label="no - shared state"];
36
+ }
37
+ ```
38
+
39
+ **Use when:**
40
+ - 3+ test files failing with different root causes
41
+ - Multiple subsystems broken independently
42
+ - Each problem can be understood without context from others
43
+ - No shared state between investigations
44
+
45
+ **Don't use when:**
46
+ - Failures are related (fix one might fix others)
47
+ - Need to understand full system state
48
+ - Agents would interfere with each other
49
+
50
+ ## The Pattern
51
+
52
+ ### 1. Identify Independent Domains
53
+
54
+ Group failures by what's broken:
55
+ - File A tests: Tool approval flow
56
+ - File B tests: Batch completion behavior
57
+ - File C tests: Abort functionality
58
+
59
+ Each domain is independent - fixing tool approval doesn't affect abort tests.
60
+
61
+ ### 2. Create Focused Agent Tasks
62
+
63
+ Each agent gets:
64
+ - **Specific scope:** One test file or subsystem
65
+ - **Clear goal:** Make these tests pass
66
+ - **Constraints:** Don't change other code
67
+ - **Expected output:** Summary of what you found and fixed
68
+
69
+ ### 3. Dispatch in Parallel
70
+
71
+ Issue all three subagent dispatches in the same response — they run in parallel:
72
+
73
+ ```text
74
+ Subagent (general-purpose): "Fix agent-tool-abort.test.ts failures"
75
+ Subagent (general-purpose): "Fix batch-completion-behavior.test.ts failures"
76
+ Subagent (general-purpose): "Fix tool-approval-race-conditions.test.ts failures"
77
+ # All three run concurrently.
78
+ ```
79
+
80
+ Multiple dispatch calls in one response = parallel execution. One per response = sequential.
81
+
82
+ ### 4. Review and Integrate
83
+
84
+ When agents return:
85
+ - Read each summary
86
+ - Verify fixes don't conflict
87
+ - Run full test suite
88
+ - Integrate all changes
89
+
90
+ ## Agent Prompt Structure
91
+
92
+ Good agent prompts are:
93
+ 1. **Focused** - One clear problem domain
94
+ 2. **Self-contained** - All context needed to understand the problem
95
+ 3. **Specific about output** - What should the agent return?
96
+
97
+ ```markdown
98
+ Fix the 3 failing tests in src/agents/agent-tool-abort.test.ts:
99
+
100
+ 1. "should abort tool with partial output capture" - expects 'interrupted at' in message
101
+ 2. "should handle mixed completed and aborted tools" - fast tool aborted instead of completed
102
+ 3. "should properly track pendingToolCount" - expects 3 results but gets 0
103
+
104
+ These are timing/race condition issues. Your task:
105
+
106
+ 1. Read the test file and understand what each test verifies
107
+ 2. Identify root cause - timing issues or actual bugs?
108
+ 3. Fix by:
109
+ - Replacing arbitrary timeouts with event-based waiting
110
+ - Fixing bugs in abort implementation if found
111
+ - Adjusting test expectations if testing changed behavior
112
+
113
+ Do NOT just increase timeouts - find the real issue.
114
+
115
+ Return: Summary of what you found and what you fixed.
116
+ ```
117
+
118
+ ## Common Mistakes
119
+
120
+ **❌ Too broad:** "Fix all the tests" - agent gets lost
121
+ **✅ Specific:** "Fix agent-tool-abort.test.ts" - focused scope
122
+
123
+ **❌ No context:** "Fix the race condition" - agent doesn't know where
124
+ **✅ Context:** Paste the error messages and test names
125
+
126
+ **❌ No constraints:** Agent might refactor everything
127
+ **✅ Constraints:** "Do NOT change production code" or "Fix tests only"
128
+
129
+ **❌ Vague output:** "Fix it" - you don't know what changed
130
+ **✅ Specific:** "Return summary of root cause and changes"
131
+
132
+ ## When NOT to Use
133
+
134
+ **Related failures:** Fixing one might fix others - investigate together first
135
+ **Need full context:** Understanding requires seeing entire system
136
+ **Exploratory debugging:** You don't know what's broken yet
137
+ **Shared state:** Agents would interfere (editing same files, using same resources)
138
+
139
+ ## Real Example from Session
140
+
141
+ **Scenario:** 6 test failures across 3 files after major refactoring
142
+
143
+ **Failures:**
144
+ - agent-tool-abort.test.ts: 3 failures (timing issues)
145
+ - batch-completion-behavior.test.ts: 2 failures (tools not executing)
146
+ - tool-approval-race-conditions.test.ts: 1 failure (execution count = 0)
147
+
148
+ **Decision:** Independent domains - abort logic separate from batch completion separate from race conditions
149
+
150
+ **Dispatch:**
151
+ ```
152
+ Agent 1 → Fix agent-tool-abort.test.ts
153
+ Agent 2 → Fix batch-completion-behavior.test.ts
154
+ Agent 3 → Fix tool-approval-race-conditions.test.ts
155
+ ```
156
+
157
+ **Results:**
158
+ - Agent 1: Replaced timeouts with event-based waiting
159
+ - Agent 2: Fixed event structure bug (threadId in wrong place)
160
+ - Agent 3: Added wait for async tool execution to complete
161
+
162
+ **Integration:** All fixes independent, no conflicts, full suite green
163
+
164
+ ## Verification
165
+
166
+ After agents return:
167
+ 1. **Review each summary** - Understand what changed
168
+ 2. **Check for conflicts** - Did agents edit same code?
169
+ 3. **Run full suite** - Verify all fixes work together
170
+ 4. **Spot check** - Agents can make systematic errors
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: executing-plans
3
+ description: Use when you have a written implementation plan to execute in a separate session with review checkpoints
4
+ ---
5
+
6
+ > **Bizar compatibility:** This procedure is fully integrated into Bizar. Bizar system, repository, model-routing, autonomy, and approval policy control whenever they differ. Do not add a separate mandatory approval gate, recurse into dispatch, or override the active Bizar workflow.
7
+
8
+
9
+ # Executing Plans
10
+
11
+ ## Overview
12
+
13
+ Load plan, review critically, execute all tasks, report when complete.
14
+
15
+ **Announce at start:** "I'm using the executing-plans skill to implement this plan."
16
+
17
+ **Note:** Tell your human partner that Superpowers works much better with access to subagents (Claude Code, Codex CLI, Codex App, Copilot CLI, and Gemini CLI all qualify; see the per-platform tool refs in `../using-superpowers/references/`). If subagents are available, use superpowers:subagent-driven-development instead of this skill.
18
+
19
+ ## The Process
20
+
21
+ ### Step 1: Load and Review Plan
22
+ 1. Ensure an isolated workspace: use superpowers:using-git-worktrees to create one or verify the existing one
23
+ 2. Read plan file
24
+ 3. Review critically - identify any questions or concerns about the plan
25
+ 4. If concerns: Raise them with your human partner before starting
26
+ 5. If no concerns: Create todos for the plan items and proceed
27
+
28
+ ### Step 2: Execute Tasks
29
+
30
+ For each task:
31
+ 1. Mark as in_progress
32
+ 2. Follow each step exactly (plan has bite-sized steps)
33
+ 3. Run verifications as specified
34
+ 4. Mark as completed
35
+
36
+ ### Step 3: Complete Development
37
+
38
+ After all tasks complete and verified:
39
+ - Announce: "I'm using the finishing-a-development-branch skill to complete this work."
40
+ - **REQUIRED SUB-SKILL:** Use superpowers:finishing-a-development-branch
41
+ - Follow that skill to verify tests, present options, execute choice
42
+
43
+ ## When to Stop and Ask for Help
44
+
45
+ **STOP executing immediately when:**
46
+ - Hit a blocker (missing dependency, test fails, instruction unclear)
47
+ - Plan has critical gaps preventing starting
48
+ - You don't understand an instruction
49
+ - Verification fails repeatedly
50
+
51
+ **Ask for clarification rather than guessing.**
52
+
53
+ ## When to Revisit Earlier Steps
54
+
55
+ **Return to Review (Step 1) when:**
56
+ - Partner updates the plan based on your feedback
57
+ - Fundamental approach needs rethinking
58
+
59
+ **Don't force through blockers** - stop and ask.
60
+
61
+ ## Remember
62
+ - Review plan critically first
63
+ - Follow plan steps exactly
64
+ - Don't skip verifications
65
+ - Reference skills when plan says to
66
+ - Stop when blocked, don't guess
67
+ - Never start implementation on main/master branch without explicit user consent
@@ -0,0 +1,228 @@
1
+ ---
2
+ name: finishing-a-development-branch
3
+ description: Use when implementation is complete, all tests pass, and you need to decide how to integrate the work
4
+ ---
5
+
6
+ > **Bizar compatibility:** This procedure is fully integrated into Bizar. Bizar system, repository, model-routing, autonomy, and approval policy control whenever they differ. Do not add a separate mandatory approval gate, recurse into dispatch, or override the active Bizar workflow.
7
+
8
+
9
+ # Finishing a Development Branch
10
+
11
+ ## Overview
12
+
13
+ **Core principle:** Verify tests → Detect environment → Present options → Execute choice → Clean up.
14
+
15
+ **Announce at start:** "I'm using the finishing-a-development-branch skill to complete this work."
16
+
17
+ ## Step 1: Verify Tests
18
+
19
+ Run the project's full test suite (`npm test` / `cargo test` / `pytest` / `go test ./...`).
20
+
21
+ **If tests fail**, report the failures and stop — the menu comes after a green suite:
22
+
23
+ ```
24
+ Tests failing (<N> failures). Must fix before completing:
25
+
26
+ [Show failures]
27
+ ```
28
+
29
+ **If tests pass:** continue to Step 2.
30
+
31
+ ## Step 2: Detect Environment
32
+
33
+ ```bash
34
+ GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)
35
+ GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)
36
+ # Capture now, while still inside the workspace — Step 5 changes directory
37
+ # before cleanup (Step 6) needs this value
38
+ WORKTREE_PATH=$(git rev-parse --show-toplevel)
39
+ ```
40
+
41
+ This determines which menu to show and how cleanup works:
42
+
43
+ | State | Menu | Cleanup |
44
+ |-------|------|---------|
45
+ | `GIT_DIR == GIT_COMMON` (normal repo) | Standard 3 options | No worktree to clean up |
46
+ | `GIT_DIR != GIT_COMMON`, named branch | Standard 3 options | Provenance-based (see Step 6) |
47
+ | `GIT_DIR != GIT_COMMON`, detached HEAD | Reduced 2 options (no merge) | Externally managed — leave in place |
48
+
49
+ ## Step 3: Determine Base Branch
50
+
51
+ The base branch is whatever this work forked from — usually named in the
52
+ plan, the conversation, or the branch's upstream. If it is not already
53
+ known, ask: "This branch split from <your best guess> - is that correct?"
54
+ Confirm before merging: merging into the wrong base is expensive to undo.
55
+
56
+ ## Step 4: Present Options
57
+
58
+ **Normal repo and named-branch worktree — present exactly these 3 options:**
59
+
60
+ ```
61
+ Implementation complete. What would you like to do?
62
+
63
+ 1. Merge back to <base-branch> locally
64
+ 2. Push and create a Pull Request
65
+ 3. Keep the branch as-is (I'll handle it later)
66
+
67
+ Which option?
68
+ ```
69
+
70
+ **Detached HEAD — present exactly these 2 options:**
71
+
72
+ ```
73
+ Implementation complete. You're on a detached HEAD (externally managed workspace).
74
+
75
+ 1. Push as new branch and create a Pull Request
76
+ 2. Keep as-is (I'll handle it later)
77
+
78
+ Which option?
79
+ ```
80
+
81
+ Present the menu exactly as written — concise, with every option coming
82
+ from the list above. Discarding the work happens only in response to your
83
+ human partner explicitly asking for it (see "If your human partner asks to
84
+ discard the work" below). Wait for their answer; the integration decision
85
+ is theirs.
86
+
87
+ ## Step 5: Execute Choice
88
+
89
+ ### Option 1: Merge Locally
90
+
91
+ ```bash
92
+ # Get main repo root for CWD safety
93
+ MAIN_ROOT=$(git -C "$(git rev-parse --git-common-dir)/.." rev-parse --show-toplevel)
94
+ cd "$MAIN_ROOT"
95
+
96
+ # Merge first — verify success before removing anything
97
+ git checkout <base-branch>
98
+ git pull
99
+ git merge <feature-branch>
100
+
101
+ # Verify tests on merged result
102
+ <test command>
103
+ ```
104
+
105
+ If tests fail on the merged result: stop, leave the worktree and branch in
106
+ place, and investigate — nothing has been pushed, so the merge is local
107
+ and recoverable.
108
+
109
+ Once the merged result is green: clean up the worktree (Step 6), then
110
+ delete the branch:
111
+
112
+ ```bash
113
+ git branch -d <feature-branch>
114
+ ```
115
+
116
+ ### Option 2: Push and Create PR
117
+
118
+ ```bash
119
+ git push -u origin <feature-branch>
120
+ # From a detached HEAD, name the new branch on the remote:
121
+ # git push origin HEAD:refs/heads/<new-branch>
122
+ ```
123
+
124
+ Then create the pull/merge request against <base-branch> with the forge's
125
+ tooling — its CLI if one is available, or the creation URL most forges
126
+ print when you push — following the repo's PR template and conventions if
127
+ present, and report the URL to your human partner.
128
+
129
+ Keep the worktree — your human partner iterates on PR feedback there.
130
+
131
+ ### Option 3: Keep As-Is
132
+
133
+ Report: "Keeping branch <name>. Worktree preserved at <path>."
134
+
135
+ ### If your human partner asks to discard the work
136
+
137
+ This path exists only as a response to an explicit request to throw the
138
+ work away. Confirm first:
139
+
140
+ ```
141
+ This will permanently delete:
142
+ - Branch <name>
143
+ - All commits: <commit-list>
144
+ - Worktree at <path>
145
+
146
+ Type 'discard' to confirm.
147
+ ```
148
+
149
+ Wait for that exact confirmation. When it arrives:
150
+
151
+ ```bash
152
+ MAIN_ROOT=$(git -C "$(git rev-parse --git-common-dir)/.." rev-parse --show-toplevel)
153
+ cd "$MAIN_ROOT"
154
+ ```
155
+
156
+ Then clean up the worktree (Step 6) and force-delete the branch:
157
+
158
+ ```bash
159
+ git branch -D <feature-branch>
160
+ ```
161
+
162
+ ## Step 6: Cleanup Workspace
163
+
164
+ **Runs for Option 1 and confirmed discards.** Options 2 and 3 always
165
+ preserve the worktree. Both callers have already changed directory to the
166
+ main repo root — worktree removal must run from outside the worktree —
167
+ and use the `GIT_DIR`/`GIT_COMMON`/`WORKTREE_PATH` values captured in
168
+ Step 2, from before that directory change.
169
+
170
+ **If `GIT_DIR == GIT_COMMON`:** Normal repo, no worktree to clean up. Done.
171
+
172
+ **If `WORKTREE_PATH` is under `.worktrees/` or `worktrees/`:** Superpowers
173
+ created this worktree — we own cleanup:
174
+
175
+ ```bash
176
+ git worktree remove "$WORKTREE_PATH"
177
+ git worktree prune # Self-healing: clean up any stale registrations
178
+ ```
179
+
180
+ **If removal is refused** (`contains modified or untracked files`): the
181
+ worktree holds files that exist nowhere else — uncommitted plans, notes,
182
+ or scratch work. Never `--force` on your own initiative. Show your human
183
+ partner what is at stake and ask:
184
+
185
+ ```bash
186
+ git -C "$WORKTREE_PATH" status --porcelain -uall
187
+ ```
188
+
189
+ ```
190
+ Worktree removal refused — these files were never committed:
191
+
192
+ <file list>
193
+
194
+ 1. Commit them to <branch> before cleanup
195
+ 2. Move them into <main repo root>
196
+ 3. Delete them (unrecoverable)
197
+
198
+ Which?
199
+ ```
200
+
201
+ Carry out the choice, then remove the worktree.
202
+
203
+ **Otherwise:** The host environment owns this workspace — leave it in
204
+ place. If your platform provides a workspace-exit tool, use it.
205
+
206
+ ## Quick Reference
207
+
208
+ | Option | Merge | Push | Keep Worktree | Cleanup Branch |
209
+ |--------|-------|------|---------------|----------------|
210
+ | 1. Merge locally | yes | - | - | yes |
211
+ | 2. Create PR | - | yes | yes | - |
212
+ | 3. Keep as-is | - | - | yes | - |
213
+ | Discard (explicit request only) | - | - | - | yes (force) |
214
+
215
+ ## Common Rationalizations
216
+
217
+ | Excuse | Reality |
218
+ |--------|---------|
219
+ | "Tests passed earlier this session" | Run the suite on the tree you are about to integrate. A green run only proves the tree it ran on. |
220
+ | "They obviously want it merged" | Integration is your human partner's decision. Present the menu and wait. |
221
+ | "They seem done with this feature — I'll offer to discard it" | The menu is complete as written. Discard happens only when your human partner asks for it in so many words. |
222
+ | "'Yeah, get rid of it' counts as confirmation" | Only the typed word `discard` authorizes deletion. |
223
+ | "The PR is up, so the worktree is clutter now" | PR feedback gets fixed in that worktree. It stays until the work lands. |
224
+ | "This other worktree looks stale — I'll clean it too" | Clean up only worktrees under `.worktrees/` or `worktrees/`. Everything else belongs to the host. |
225
+ | "Removal refused — `--force` is just finishing the cleanup" | The refusal means files exist only in that worktree. `--force` destroys them permanently. Show your human partner and ask. |
226
+ | "The merged-result failure is probably flaky" | A failing merged result stops everything. Branch and worktree stay put while you investigate. |
227
+ | "The base branch is obviously main" | Confirm the fork point or ask. Merging into the wrong base is expensive to undo. |
228
+ | "The push was rejected — force-push will fix it" | A rejected push means the remote moved. Investigate; force-push only on your human partner's explicit request. |
@@ -0,0 +1,208 @@
1
+ ---
2
+ name: receiving-code-review
3
+ description: Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation
4
+ ---
5
+
6
+ > **Bizar compatibility:** This procedure is fully integrated into Bizar. Bizar system, repository, model-routing, autonomy, and approval policy control whenever they differ. Do not add a separate mandatory approval gate, recurse into dispatch, or override the active Bizar workflow.
7
+
8
+
9
+ # Code Review Reception
10
+
11
+ ## Overview
12
+
13
+ Code review requires technical evaluation, not emotional performance.
14
+
15
+ **Core principle:** Verify before implementing. Ask before assuming. Technical correctness over social comfort.
16
+
17
+ ## The Response Pattern
18
+
19
+ ```
20
+ WHEN receiving code review feedback:
21
+
22
+ 1. READ: Complete feedback without reacting
23
+ 2. UNDERSTAND: Restate requirement in own words (or ask)
24
+ 3. VERIFY: Check against codebase reality
25
+ 4. EVALUATE: Technically sound for THIS codebase?
26
+ 5. RESPOND: Technical acknowledgment or reasoned pushback
27
+ 6. IMPLEMENT: One item at a time, test each
28
+ ```
29
+
30
+ ## Forbidden Responses
31
+
32
+ **NEVER:**
33
+ - "You're absolutely right!" (explicit instruction-file violation)
34
+ - "Great point!" / "Excellent feedback!" (performative)
35
+ - "Let me implement that now" (before verification)
36
+
37
+ **INSTEAD:**
38
+ - Restate the technical requirement
39
+ - Ask clarifying questions
40
+ - Push back with technical reasoning if wrong
41
+ - Just start working (actions > words)
42
+
43
+ ## Handling Unclear Feedback
44
+
45
+ ```
46
+ IF any item is unclear:
47
+ STOP - do not implement anything yet
48
+ ASK for clarification on unclear items
49
+
50
+ WHY: Items may be related. Partial understanding = wrong implementation.
51
+ ```
52
+
53
+ **Example:**
54
+ ```
55
+ your human partner: "Fix 1-6"
56
+ You understand 1,2,3,6. Unclear on 4,5.
57
+
58
+ ❌ WRONG: Implement 1,2,3,6 now, ask about 4,5 later
59
+ ✅ RIGHT: "I understand items 1,2,3,6. Need clarification on 4 and 5 before proceeding."
60
+ ```
61
+
62
+ ## Source-Specific Handling
63
+
64
+ ### From your human partner
65
+ - **Trusted** - implement after understanding
66
+ - **Still ask** if scope unclear
67
+ - **No performative agreement**
68
+ - **Skip to action** or technical acknowledgment
69
+
70
+ ### From External Reviewers
71
+ ```
72
+ BEFORE implementing:
73
+ 1. Check: Technically correct for THIS codebase?
74
+ 2. Check: Breaks existing functionality?
75
+ 3. Check: Reason for current implementation?
76
+ 4. Check: Works on all platforms/versions?
77
+ 5. Check: Does reviewer understand full context?
78
+
79
+ IF suggestion seems wrong:
80
+ Push back with technical reasoning
81
+
82
+ IF can't easily verify:
83
+ Say so: "I can't verify this without [X]. Should I [investigate/ask/proceed]?"
84
+
85
+ IF conflicts with your human partner's prior decisions:
86
+ Stop and discuss with your human partner first
87
+ ```
88
+
89
+ **your human partner's rule:** "External feedback - be skeptical, but check carefully"
90
+
91
+ ## YAGNI Check for "Professional" Features
92
+
93
+ ```
94
+ IF reviewer suggests "implementing properly":
95
+ grep codebase for actual usage
96
+
97
+ IF unused: "This endpoint isn't called. Remove it (YAGNI)?"
98
+ IF used: Then implement properly
99
+ ```
100
+
101
+ **your human partner's rule:** "You and reviewer both report to me. If we don't need this feature, don't add it."
102
+
103
+ ## Implementation Order
104
+
105
+ ```
106
+ FOR multi-item feedback:
107
+ 1. Clarify anything unclear FIRST
108
+ 2. Then implement in this order:
109
+ - Blocking issues (breaks, security)
110
+ - Simple fixes (typos, imports)
111
+ - Complex fixes (refactoring, logic)
112
+ 3. Test each fix individually
113
+ 4. Verify no regressions
114
+ ```
115
+
116
+ ## When To Push Back
117
+
118
+ Push back when:
119
+ - Suggestion breaks existing functionality
120
+ - Reviewer lacks full context
121
+ - Violates YAGNI (unused feature)
122
+ - Technically incorrect for this stack
123
+ - Legacy/compatibility reasons exist
124
+ - Conflicts with your human partner's architectural decisions
125
+
126
+ **How to push back:**
127
+ - Use technical reasoning, not defensiveness
128
+ - Ask specific questions
129
+ - Reference working tests/code
130
+ - Involve your human partner if architectural
131
+
132
+ **If you're uncomfortable pushing back out loud:** Name that tension, then tell your partner about the issue you've seen. They'll appreciate your honesty.
133
+
134
+ ## Acknowledging Correct Feedback
135
+
136
+ When feedback IS correct:
137
+ ```
138
+ ✅ "Fixed. [Brief description of what changed]"
139
+ ✅ "Good catch - [specific issue]. Fixed in [location]."
140
+ ✅ [Just fix it and show in the code]
141
+
142
+ ❌ "You're absolutely right!"
143
+ ❌ "Great point!"
144
+ ❌ "Thanks for catching that!"
145
+ ❌ "Thanks for [anything]"
146
+ ❌ ANY gratitude expression
147
+ ```
148
+
149
+ **Why no thanks:** Actions speak. Just fix it. The code itself shows you heard the feedback.
150
+
151
+ **If you catch yourself about to write "Thanks":** DELETE IT. State the fix instead.
152
+
153
+ ## Gracefully Correcting Your Pushback
154
+
155
+ If you pushed back and were wrong:
156
+ ```
157
+ ✅ "You were right - I checked [X] and it does [Y]. Implementing now."
158
+ ✅ "Verified this and you're correct. My initial understanding was wrong because [reason]. Fixing."
159
+
160
+ ❌ Long apology
161
+ ❌ Defending why you pushed back
162
+ ❌ Over-explaining
163
+ ```
164
+
165
+ State the correction factually and move on.
166
+
167
+ ## Common Mistakes
168
+
169
+ | Mistake | Fix |
170
+ |---------|-----|
171
+ | Performative agreement | State requirement or just act |
172
+ | Blind implementation | Verify against codebase first |
173
+ | Batch without testing | One at a time, test each |
174
+ | Assuming reviewer is right | Check if breaks things |
175
+ | Avoiding pushback | Technical correctness > comfort |
176
+ | Partial implementation | Clarify all items first |
177
+ | Can't verify, proceed anyway | State limitation, ask for direction |
178
+
179
+ ## Real Examples
180
+
181
+ **Performative Agreement (Bad):**
182
+ ```
183
+ Reviewer: "Remove legacy code"
184
+ ❌ "You're absolutely right! Let me remove that..."
185
+ ```
186
+
187
+ **Technical Verification (Good):**
188
+ ```
189
+ Reviewer: "Remove legacy code"
190
+ ✅ "Checking... build target is 10.15+, this API needs 13+. Need legacy for backward compat. Current impl has wrong bundle ID - fix it or drop pre-13 support?"
191
+ ```
192
+
193
+ **YAGNI (Good):**
194
+ ```
195
+ Reviewer: "Implement proper metrics tracking with database, date filters, CSV export"
196
+ ✅ "Grepped codebase - nothing calls this endpoint. Remove it (YAGNI)? Or is there usage I'm missing?"
197
+ ```
198
+
199
+ **Unclear Item (Good):**
200
+ ```
201
+ your human partner: "Fix items 1-6"
202
+ You understand 1,2,3,6. Unclear on 4,5.
203
+ ✅ "Understand 1,2,3,6. Need clarification on 4 and 5 before implementing."
204
+ ```
205
+
206
+ ## GitHub Thread Replies
207
+
208
+ When replying to inline review comments on GitHub, reply in the comment thread (`gh api repos/{owner}/{repo}/pulls/{pr}/comments/{id}/replies`), not as a top-level PR comment.