autonomous-coding-toolkit 1.0.0
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.
- package/.claude-plugin/marketplace.json +22 -0
- package/.claude-plugin/plugin.json +13 -0
- package/LICENSE +21 -0
- package/Makefile +21 -0
- package/README.md +140 -0
- package/SECURITY.md +28 -0
- package/agents/bash-expert.md +113 -0
- package/agents/dependency-auditor.md +138 -0
- package/agents/integration-tester.md +120 -0
- package/agents/lesson-scanner.md +149 -0
- package/agents/python-expert.md +179 -0
- package/agents/service-monitor.md +141 -0
- package/agents/shell-expert.md +147 -0
- package/benchmarks/runner.sh +147 -0
- package/benchmarks/tasks/01-rest-endpoint/rubric.sh +29 -0
- package/benchmarks/tasks/01-rest-endpoint/task.md +17 -0
- package/benchmarks/tasks/02-refactor-module/task.md +8 -0
- package/benchmarks/tasks/03-fix-integration-bug/task.md +8 -0
- package/benchmarks/tasks/04-add-test-coverage/task.md +8 -0
- package/benchmarks/tasks/05-multi-file-feature/task.md +8 -0
- package/bin/act.js +238 -0
- package/commands/autocode.md +6 -0
- package/commands/cancel-ralph.md +18 -0
- package/commands/code-factory.md +53 -0
- package/commands/create-prd.md +55 -0
- package/commands/ralph-loop.md +18 -0
- package/commands/run-plan.md +117 -0
- package/commands/submit-lesson.md +122 -0
- package/docs/ARCHITECTURE.md +630 -0
- package/docs/CONTRIBUTING.md +125 -0
- package/docs/lessons/0001-bare-exception-swallowing.md +34 -0
- package/docs/lessons/0002-async-def-without-await.md +28 -0
- package/docs/lessons/0003-create-task-without-callback.md +28 -0
- package/docs/lessons/0004-hardcoded-test-counts.md +28 -0
- package/docs/lessons/0005-sqlite-without-closing.md +33 -0
- package/docs/lessons/0006-venv-pip-path.md +27 -0
- package/docs/lessons/0007-runner-state-self-rejection.md +35 -0
- package/docs/lessons/0008-quality-gate-blind-spot.md +33 -0
- package/docs/lessons/0009-parser-overcount-empty-batches.md +36 -0
- package/docs/lessons/0010-local-outside-function-bash.md +33 -0
- package/docs/lessons/0011-batch-tests-for-unimplemented-code.md +36 -0
- package/docs/lessons/0012-api-markdown-unescaped-chars.md +33 -0
- package/docs/lessons/0013-export-prefix-env-parsing.md +33 -0
- package/docs/lessons/0014-decorator-registry-import-side-effect.md +43 -0
- package/docs/lessons/0015-frontend-backend-schema-drift.md +43 -0
- package/docs/lessons/0016-event-driven-cold-start-seeding.md +44 -0
- package/docs/lessons/0017-copy-paste-logic-diverges.md +43 -0
- package/docs/lessons/0018-layer-passes-pipeline-broken.md +45 -0
- package/docs/lessons/0019-systemd-envfile-ignores-export.md +41 -0
- package/docs/lessons/0020-persist-state-incrementally.md +44 -0
- package/docs/lessons/0021-dual-axis-testing.md +48 -0
- package/docs/lessons/0022-jsx-factory-shadowing.md +43 -0
- package/docs/lessons/0023-static-analysis-spiral.md +51 -0
- package/docs/lessons/0024-shared-pipeline-implementation.md +55 -0
- package/docs/lessons/0025-defense-in-depth-all-entry-points.md +65 -0
- package/docs/lessons/0026-linter-no-rules-false-enforcement.md +54 -0
- package/docs/lessons/0027-jsx-silent-prop-drop.md +64 -0
- package/docs/lessons/0028-no-infrastructure-in-client-code.md +49 -0
- package/docs/lessons/0029-never-write-secrets-to-files.md +61 -0
- package/docs/lessons/0030-cache-merge-not-replace.md +62 -0
- package/docs/lessons/0031-verify-units-at-boundaries.md +66 -0
- package/docs/lessons/0032-module-lifecycle-subscribe-unsubscribe.md +89 -0
- package/docs/lessons/0033-async-iteration-mutable-snapshot.md +72 -0
- package/docs/lessons/0034-caller-missing-await-silent-discard.md +65 -0
- package/docs/lessons/0035-duplicate-registration-silent-overwrite.md +85 -0
- package/docs/lessons/0036-websocket-dirty-disconnect.md +33 -0
- package/docs/lessons/0037-parallel-agents-worktree-corruption.md +31 -0
- package/docs/lessons/0038-subscribe-no-stored-ref.md +36 -0
- package/docs/lessons/0039-fallback-or-default-hides-bugs.md +34 -0
- package/docs/lessons/0040-event-firehose-filter-first.md +36 -0
- package/docs/lessons/0041-ambiguous-base-dir-path-nesting.md +32 -0
- package/docs/lessons/0042-spec-compliance-insufficient.md +36 -0
- package/docs/lessons/0043-exact-count-extensible-collections.md +32 -0
- package/docs/lessons/0044-relative-file-deps-worktree.md +39 -0
- package/docs/lessons/0045-iterative-design-improvement.md +33 -0
- package/docs/lessons/0046-plan-assertion-math-bugs.md +38 -0
- package/docs/lessons/0047-pytest-single-threaded-default.md +37 -0
- package/docs/lessons/0048-integration-wiring-batch.md +40 -0
- package/docs/lessons/0049-ab-verification.md +41 -0
- package/docs/lessons/0050-editing-sourced-files-during-execution.md +33 -0
- package/docs/lessons/0051-infrastructure-fixes-cant-self-heal.md +30 -0
- package/docs/lessons/0052-uncommitted-changes-poison-quality-gates.md +31 -0
- package/docs/lessons/0053-jq-compact-flag-inconsistency.md +31 -0
- package/docs/lessons/0054-parser-matches-inside-code-blocks.md +30 -0
- package/docs/lessons/0055-agents-compensate-for-garbled-prompts.md +31 -0
- package/docs/lessons/0056-grep-count-exit-code-on-zero.md +42 -0
- package/docs/lessons/0057-new-artifacts-break-git-clean-gates.md +42 -0
- package/docs/lessons/0058-dead-config-keys-never-consumed.md +49 -0
- package/docs/lessons/0059-contract-test-shared-structures.md +53 -0
- package/docs/lessons/0060-set-e-silent-death-in-runners.md +53 -0
- package/docs/lessons/0061-context-injection-dirty-state.md +50 -0
- package/docs/lessons/0062-sibling-bug-neighborhood-scan.md +29 -0
- package/docs/lessons/0063-one-flag-two-lifetimes.md +31 -0
- package/docs/lessons/0064-test-passes-wrong-reason.md +31 -0
- package/docs/lessons/0065-pipefail-grep-count-double-output.md +39 -0
- package/docs/lessons/0066-local-keyword-outside-function.md +37 -0
- package/docs/lessons/0067-stdin-hang-non-interactive-shell.md +36 -0
- package/docs/lessons/0068-agent-builds-wrong-thing-correctly.md +31 -0
- package/docs/lessons/0069-plan-quality-dominates-execution.md +30 -0
- package/docs/lessons/0070-spec-echo-back-prevents-drift.md +31 -0
- package/docs/lessons/0071-positive-instructions-outperform-negative.md +30 -0
- package/docs/lessons/0072-lost-in-the-middle-context-placement.md +30 -0
- package/docs/lessons/0073-unscoped-lessons-cause-false-positives.md +30 -0
- package/docs/lessons/0074-stale-context-injection-wrong-batch.md +32 -0
- package/docs/lessons/0075-research-artifacts-must-persist.md +32 -0
- package/docs/lessons/0076-wrong-decomposition-contaminates-downstream.md +30 -0
- package/docs/lessons/0077-cherry-pick-merges-need-manual-resolution.md +30 -0
- package/docs/lessons/0078-static-review-without-live-test.md +30 -0
- package/docs/lessons/0079-integration-wiring-batch-required.md +32 -0
- package/docs/lessons/FRAMEWORK.md +161 -0
- package/docs/lessons/SUMMARY.md +201 -0
- package/docs/lessons/TEMPLATE.md +85 -0
- package/docs/plans/2026-02-21-code-factory-v2-design.md +204 -0
- package/docs/plans/2026-02-21-code-factory-v2-implementation-plan.md +2189 -0
- package/docs/plans/2026-02-21-code-factory-v2-phase4-design.md +537 -0
- package/docs/plans/2026-02-21-code-factory-v2-phase4-implementation-plan.md +2012 -0
- package/docs/plans/2026-02-21-hardening-pass-design.md +108 -0
- package/docs/plans/2026-02-21-hardening-pass-plan.md +1378 -0
- package/docs/plans/2026-02-21-mab-research-report.md +406 -0
- package/docs/plans/2026-02-21-marketplace-restructure-design.md +240 -0
- package/docs/plans/2026-02-21-marketplace-restructure-plan.md +832 -0
- package/docs/plans/2026-02-21-phase4-completion-plan.md +697 -0
- package/docs/plans/2026-02-21-validator-suite-design.md +148 -0
- package/docs/plans/2026-02-21-validator-suite-plan.md +540 -0
- package/docs/plans/2026-02-22-mab-research-round2.md +556 -0
- package/docs/plans/2026-02-22-mab-run-design.md +462 -0
- package/docs/plans/2026-02-22-mab-run-plan.md +2046 -0
- package/docs/plans/2026-02-22-operations-design-methodology-research.md +681 -0
- package/docs/plans/2026-02-22-research-agent-failure-taxonomy.md +532 -0
- package/docs/plans/2026-02-22-research-code-guideline-policies.md +886 -0
- package/docs/plans/2026-02-22-research-codebase-audit-refactoring.md +908 -0
- package/docs/plans/2026-02-22-research-coding-standards-documentation.md +541 -0
- package/docs/plans/2026-02-22-research-competitive-landscape.md +687 -0
- package/docs/plans/2026-02-22-research-comprehensive-testing.md +1076 -0
- package/docs/plans/2026-02-22-research-context-utilization.md +459 -0
- package/docs/plans/2026-02-22-research-cost-quality-tradeoff.md +548 -0
- package/docs/plans/2026-02-22-research-lesson-transferability.md +508 -0
- package/docs/plans/2026-02-22-research-multi-agent-coordination.md +312 -0
- package/docs/plans/2026-02-22-research-phase-integration.md +602 -0
- package/docs/plans/2026-02-22-research-plan-quality.md +428 -0
- package/docs/plans/2026-02-22-research-prompt-engineering.md +558 -0
- package/docs/plans/2026-02-22-research-unconventional-perspectives.md +528 -0
- package/docs/plans/2026-02-22-research-user-adoption.md +638 -0
- package/docs/plans/2026-02-22-research-verification-effectiveness.md +433 -0
- package/docs/plans/2026-02-23-agent-suite-design.md +299 -0
- package/docs/plans/2026-02-23-agent-suite-plan.md +578 -0
- package/docs/plans/2026-02-23-phase3-cost-infrastructure-design.md +148 -0
- package/docs/plans/2026-02-23-phase3-cost-infrastructure-plan.md +1062 -0
- package/docs/plans/2026-02-23-research-bash-expert-agent.md +543 -0
- package/docs/plans/2026-02-23-research-dependency-auditor-agent.md +564 -0
- package/docs/plans/2026-02-23-research-improving-existing-agents.md +503 -0
- package/docs/plans/2026-02-23-research-integration-tester-agent.md +454 -0
- package/docs/plans/2026-02-23-research-python-expert-agent.md +429 -0
- package/docs/plans/2026-02-23-research-service-monitor-agent.md +425 -0
- package/docs/plans/2026-02-23-research-shell-expert-agent.md +533 -0
- package/docs/plans/2026-02-23-roadmap-to-completion.md +530 -0
- package/docs/plans/2026-02-24-headless-module-split-design.md +98 -0
- package/docs/plans/2026-02-24-headless-module-split.md +443 -0
- package/docs/plans/2026-02-24-lesson-scope-metadata-design.md +228 -0
- package/docs/plans/2026-02-24-lesson-scope-metadata-plan.md +968 -0
- package/docs/plans/2026-02-24-npm-packaging-design.md +841 -0
- package/docs/plans/2026-02-24-npm-packaging-plan.md +1965 -0
- package/docs/plans/audit-findings.md +186 -0
- package/docs/telegram-notification-format.md +98 -0
- package/examples/example-plan.md +51 -0
- package/examples/example-prd.json +72 -0
- package/examples/example-roadmap.md +33 -0
- package/examples/quickstart-plan.md +63 -0
- package/hooks/hooks.json +26 -0
- package/hooks/setup-symlinks.sh +48 -0
- package/hooks/stop-hook.sh +135 -0
- package/package.json +47 -0
- package/policies/bash.md +71 -0
- package/policies/python.md +71 -0
- package/policies/testing.md +61 -0
- package/policies/universal.md +60 -0
- package/scripts/analyze-report.sh +97 -0
- package/scripts/architecture-map.sh +145 -0
- package/scripts/auto-compound.sh +273 -0
- package/scripts/batch-audit.sh +42 -0
- package/scripts/batch-test.sh +101 -0
- package/scripts/entropy-audit.sh +221 -0
- package/scripts/failure-digest.sh +51 -0
- package/scripts/generate-ast-rules.sh +96 -0
- package/scripts/init.sh +112 -0
- package/scripts/lesson-check.sh +428 -0
- package/scripts/lib/common.sh +61 -0
- package/scripts/lib/cost-tracking.sh +153 -0
- package/scripts/lib/ollama.sh +60 -0
- package/scripts/lib/progress-writer.sh +128 -0
- package/scripts/lib/run-plan-context.sh +215 -0
- package/scripts/lib/run-plan-echo-back.sh +231 -0
- package/scripts/lib/run-plan-headless.sh +396 -0
- package/scripts/lib/run-plan-notify.sh +57 -0
- package/scripts/lib/run-plan-parser.sh +81 -0
- package/scripts/lib/run-plan-prompt.sh +215 -0
- package/scripts/lib/run-plan-quality-gate.sh +132 -0
- package/scripts/lib/run-plan-routing.sh +315 -0
- package/scripts/lib/run-plan-sampling.sh +170 -0
- package/scripts/lib/run-plan-scoring.sh +146 -0
- package/scripts/lib/run-plan-state.sh +142 -0
- package/scripts/lib/run-plan-team.sh +199 -0
- package/scripts/lib/telegram.sh +54 -0
- package/scripts/lib/thompson-sampling.sh +176 -0
- package/scripts/license-check.sh +74 -0
- package/scripts/mab-run.sh +575 -0
- package/scripts/module-size-check.sh +146 -0
- package/scripts/patterns/async-no-await.yml +5 -0
- package/scripts/patterns/bare-except.yml +6 -0
- package/scripts/patterns/empty-catch.yml +6 -0
- package/scripts/patterns/hardcoded-localhost.yml +9 -0
- package/scripts/patterns/retry-loop-no-backoff.yml +12 -0
- package/scripts/pipeline-status.sh +197 -0
- package/scripts/policy-check.sh +226 -0
- package/scripts/prior-art-search.sh +133 -0
- package/scripts/promote-mab-lessons.sh +126 -0
- package/scripts/prompts/agent-a-superpowers.md +29 -0
- package/scripts/prompts/agent-b-ralph.md +29 -0
- package/scripts/prompts/judge-agent.md +61 -0
- package/scripts/prompts/planner-agent.md +44 -0
- package/scripts/pull-community-lessons.sh +90 -0
- package/scripts/quality-gate.sh +266 -0
- package/scripts/research-gate.sh +90 -0
- package/scripts/run-plan.sh +329 -0
- package/scripts/scope-infer.sh +159 -0
- package/scripts/setup-ralph-loop.sh +155 -0
- package/scripts/telemetry.sh +230 -0
- package/scripts/tests/run-all-tests.sh +52 -0
- package/scripts/tests/test-act-cli.sh +46 -0
- package/scripts/tests/test-agents-md.sh +87 -0
- package/scripts/tests/test-analyze-report.sh +114 -0
- package/scripts/tests/test-architecture-map.sh +89 -0
- package/scripts/tests/test-auto-compound.sh +169 -0
- package/scripts/tests/test-batch-test.sh +65 -0
- package/scripts/tests/test-benchmark-runner.sh +25 -0
- package/scripts/tests/test-common.sh +168 -0
- package/scripts/tests/test-cost-tracking.sh +158 -0
- package/scripts/tests/test-echo-back.sh +180 -0
- package/scripts/tests/test-entropy-audit.sh +146 -0
- package/scripts/tests/test-failure-digest.sh +66 -0
- package/scripts/tests/test-generate-ast-rules.sh +145 -0
- package/scripts/tests/test-helpers.sh +82 -0
- package/scripts/tests/test-init.sh +47 -0
- package/scripts/tests/test-lesson-check.sh +278 -0
- package/scripts/tests/test-lesson-local.sh +55 -0
- package/scripts/tests/test-license-check.sh +109 -0
- package/scripts/tests/test-mab-run.sh +182 -0
- package/scripts/tests/test-ollama-lib.sh +49 -0
- package/scripts/tests/test-ollama.sh +60 -0
- package/scripts/tests/test-pipeline-status.sh +198 -0
- package/scripts/tests/test-policy-check.sh +124 -0
- package/scripts/tests/test-prior-art-search.sh +96 -0
- package/scripts/tests/test-progress-writer.sh +140 -0
- package/scripts/tests/test-promote-mab-lessons.sh +110 -0
- package/scripts/tests/test-pull-community-lessons.sh +149 -0
- package/scripts/tests/test-quality-gate.sh +241 -0
- package/scripts/tests/test-research-gate.sh +132 -0
- package/scripts/tests/test-run-plan-cli.sh +86 -0
- package/scripts/tests/test-run-plan-context.sh +305 -0
- package/scripts/tests/test-run-plan-e2e.sh +153 -0
- package/scripts/tests/test-run-plan-headless.sh +424 -0
- package/scripts/tests/test-run-plan-notify.sh +124 -0
- package/scripts/tests/test-run-plan-parser.sh +217 -0
- package/scripts/tests/test-run-plan-prompt.sh +254 -0
- package/scripts/tests/test-run-plan-quality-gate.sh +222 -0
- package/scripts/tests/test-run-plan-routing.sh +178 -0
- package/scripts/tests/test-run-plan-scoring.sh +148 -0
- package/scripts/tests/test-run-plan-state.sh +261 -0
- package/scripts/tests/test-run-plan-team.sh +157 -0
- package/scripts/tests/test-scope-infer.sh +150 -0
- package/scripts/tests/test-setup-ralph-loop.sh +63 -0
- package/scripts/tests/test-telegram-env.sh +38 -0
- package/scripts/tests/test-telegram.sh +121 -0
- package/scripts/tests/test-telemetry.sh +46 -0
- package/scripts/tests/test-thompson-sampling.sh +139 -0
- package/scripts/tests/test-validate-all.sh +60 -0
- package/scripts/tests/test-validate-commands.sh +89 -0
- package/scripts/tests/test-validate-hooks.sh +98 -0
- package/scripts/tests/test-validate-lessons.sh +150 -0
- package/scripts/tests/test-validate-plan-quality.sh +235 -0
- package/scripts/tests/test-validate-plans.sh +187 -0
- package/scripts/tests/test-validate-plugin.sh +106 -0
- package/scripts/tests/test-validate-prd.sh +184 -0
- package/scripts/tests/test-validate-skills.sh +134 -0
- package/scripts/validate-all.sh +57 -0
- package/scripts/validate-commands.sh +67 -0
- package/scripts/validate-hooks.sh +89 -0
- package/scripts/validate-lessons.sh +98 -0
- package/scripts/validate-plan-quality.sh +369 -0
- package/scripts/validate-plans.sh +120 -0
- package/scripts/validate-plugin.sh +86 -0
- package/scripts/validate-policies.sh +42 -0
- package/scripts/validate-prd.sh +118 -0
- package/scripts/validate-skills.sh +96 -0
- package/skills/autocode/SKILL.md +285 -0
- package/skills/autocode/ab-verification.md +51 -0
- package/skills/autocode/code-quality-standards.md +37 -0
- package/skills/autocode/competitive-mode.md +364 -0
- package/skills/brainstorming/SKILL.md +97 -0
- package/skills/capture-lesson/SKILL.md +187 -0
- package/skills/check-lessons/SKILL.md +116 -0
- package/skills/dispatching-parallel-agents/SKILL.md +110 -0
- package/skills/executing-plans/SKILL.md +85 -0
- package/skills/finishing-a-development-branch/SKILL.md +201 -0
- package/skills/receiving-code-review/SKILL.md +72 -0
- package/skills/requesting-code-review/SKILL.md +59 -0
- package/skills/requesting-code-review/code-reviewer.md +82 -0
- package/skills/research/SKILL.md +145 -0
- package/skills/roadmap/SKILL.md +115 -0
- package/skills/subagent-driven-development/SKILL.md +98 -0
- package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +18 -0
- package/skills/subagent-driven-development/implementer-prompt.md +73 -0
- package/skills/subagent-driven-development/spec-reviewer-prompt.md +57 -0
- package/skills/systematic-debugging/SKILL.md +134 -0
- package/skills/systematic-debugging/condition-based-waiting.md +64 -0
- package/skills/systematic-debugging/defense-in-depth.md +32 -0
- package/skills/systematic-debugging/root-cause-tracing.md +55 -0
- package/skills/test-driven-development/SKILL.md +167 -0
- package/skills/using-git-worktrees/SKILL.md +219 -0
- package/skills/using-superpowers/SKILL.md +54 -0
- package/skills/verification-before-completion/SKILL.md +140 -0
- package/skills/verify/SKILL.md +82 -0
- package/skills/writing-plans/SKILL.md +128 -0
- package/skills/writing-skills/SKILL.md +93 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: check-lessons
|
|
3
|
+
description: Use when starting planning or coding to surface relevant lessons that prevent repeating past mistakes
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Check Lessons
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Proactive lesson retrieval that searches the lessons-learned system for patterns matching the current work. Surfaces relevant cluster mitigations, open corrective actions, and key takeaways before you start coding — preventing the same bug from happening twice.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
- Before `EnterPlanMode` — check if planned work touches any lesson clusters
|
|
15
|
+
- When editing a file that appears in any lesson's `**Files:**` field
|
|
16
|
+
- When a test fails in a pattern matching a known cluster
|
|
17
|
+
- When starting work on a system with known failure history
|
|
18
|
+
- When `/check-lessons` is invoked
|
|
19
|
+
|
|
20
|
+
## Process
|
|
21
|
+
|
|
22
|
+
### Step 1: Identify the Work Domain
|
|
23
|
+
|
|
24
|
+
Determine what is being touched:
|
|
25
|
+
- Which files and directories?
|
|
26
|
+
- Which systems (HA, Telegram, Notion, systemd, etc.)?
|
|
27
|
+
- Which patterns (async, error handling, data flow, schema, startup, etc.)?
|
|
28
|
+
|
|
29
|
+
### Step 2: Search by Keyword
|
|
30
|
+
|
|
31
|
+
Grep the SUMMARY.md Quick Reference table for matching terms:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Search for keywords matching the work domain
|
|
35
|
+
grep -i "keyword1\|keyword2\|keyword3" ~/Documents/docs/lessons/SUMMARY.md
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Search for:
|
|
39
|
+
- System names (e.g., "aria", "telegram", "systemd")
|
|
40
|
+
- Pattern names (e.g., "async", "schema", "cache", "startup")
|
|
41
|
+
- Error types (e.g., "silent", "missing", "wrong")
|
|
42
|
+
- Cluster letters (A through F) relevant to the work type
|
|
43
|
+
|
|
44
|
+
### Step 3: Search by File Overlap
|
|
45
|
+
|
|
46
|
+
If specific files are being modified, check if any lesson references them:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# Search lesson files for matching file paths
|
|
50
|
+
grep -rl "filename\|module_name" ~/Documents/docs/lessons/2026-*.md
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Then read matching lessons to extract their Key Takeaway and Corrective Actions.
|
|
54
|
+
|
|
55
|
+
### Step 4: Read Cluster Mitigations
|
|
56
|
+
|
|
57
|
+
For each matching cluster, read the mitigations from SUMMARY.md:
|
|
58
|
+
|
|
59
|
+
| Work Type | Check Clusters |
|
|
60
|
+
|-----------|---------------|
|
|
61
|
+
| Error handling, exception flow | A (Silent Failures) |
|
|
62
|
+
| Cross-service changes, API contracts | B (Integration Boundary) |
|
|
63
|
+
| Service restart, initialization | C (Cold-Start) |
|
|
64
|
+
| Plan execution, spec interpretation | D (Specification Drift) |
|
|
65
|
+
| Context management, lesson scoping | E (Context & Retrieval) |
|
|
66
|
+
| Task decomposition, batch ordering | F (Planning & Control Flow) |
|
|
67
|
+
|
|
68
|
+
### Step 5: Present Findings
|
|
69
|
+
|
|
70
|
+
Format output as:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
Relevant Lessons for [current work]:
|
|
74
|
+
|
|
75
|
+
Cluster [X] ([Name]) — N matches:
|
|
76
|
+
#[num]: [one-line summary from Quick Reference table] (Tier: [tier])
|
|
77
|
+
#[num]: [one-line summary] (Tier: [tier])
|
|
78
|
+
Mitigations:
|
|
79
|
+
1. [applicable mitigation from SUMMARY.md cluster section]
|
|
80
|
+
2. [applicable mitigation]
|
|
81
|
+
|
|
82
|
+
File overlap:
|
|
83
|
+
#[num] references [matching file] — Key Takeaway: [takeaway text]
|
|
84
|
+
|
|
85
|
+
Open corrective actions:
|
|
86
|
+
#[num] Action [N]: [action description] (status: proposed)
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Step 6: Flag Open Corrective Actions
|
|
90
|
+
|
|
91
|
+
Read each matching lesson file and check the Corrective Actions table. If any action has `| proposed |` status, flag it — these are known fixes that haven't been validated yet.
|
|
92
|
+
|
|
93
|
+
## Proactive Trigger Guidance
|
|
94
|
+
|
|
95
|
+
This skill should be invoked automatically in these situations:
|
|
96
|
+
|
|
97
|
+
1. **Before planning:** When about to enter plan mode for work touching files in `~/Documents/projects/ha-aria/`, `~/Documents/projects/telegram-*/`, or any project with lesson history
|
|
98
|
+
2. **On test failure:** When a test fails with a pattern matching cluster keywords (silent return, schema mismatch, missing await, empty collection)
|
|
99
|
+
3. **On file edit:** When modifying a file that appears in any lesson's Files field — use a quick grep to check
|
|
100
|
+
|
|
101
|
+
## Key References
|
|
102
|
+
|
|
103
|
+
| File | Purpose |
|
|
104
|
+
|------|---------|
|
|
105
|
+
| `~/Documents/docs/lessons/SUMMARY.md` | Quick Reference table + cluster mitigations |
|
|
106
|
+
| `~/Documents/docs/lessons/FRAMEWORK.md` | OIL taxonomy and category definitions |
|
|
107
|
+
| `~/Documents/docs/lessons/DIAGNOSTICS.md` | Symptom-to-cause lookup table |
|
|
108
|
+
|
|
109
|
+
## Common Mistakes
|
|
110
|
+
|
|
111
|
+
| Mistake | Fix |
|
|
112
|
+
|---------|-----|
|
|
113
|
+
| Searching only by system name | Also search by pattern (async, schema, cache) and error type (silent, missing) |
|
|
114
|
+
| Ignoring standalone lessons (no cluster) | Standalone lessons still have Key Takeaways — include them if keywords match |
|
|
115
|
+
| Skipping open corrective actions | Proposed actions are the highest-signal items — they represent known but unvalidated fixes |
|
|
116
|
+
| Dumping all 72 lessons | Filter aggressively — only surface lessons with keyword, file, or cluster overlap to the current work |
|
|
@@ -0,0 +1,110 @@
|
|
|
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
|
+
version: 1.0.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Dispatching Parallel Agents
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
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.
|
|
12
|
+
|
|
13
|
+
**Core principle:** Dispatch one agent per independent problem domain. Let them work concurrently.
|
|
14
|
+
|
|
15
|
+
## When to Use
|
|
16
|
+
|
|
17
|
+
```dot
|
|
18
|
+
digraph when_to_use {
|
|
19
|
+
"Multiple failures?" [shape=diamond];
|
|
20
|
+
"Are they independent?" [shape=diamond];
|
|
21
|
+
"Single agent investigates all" [shape=box];
|
|
22
|
+
"One agent per problem domain" [shape=box];
|
|
23
|
+
"Can they work in parallel?" [shape=diamond];
|
|
24
|
+
"Sequential agents" [shape=box];
|
|
25
|
+
"Parallel dispatch" [shape=box];
|
|
26
|
+
|
|
27
|
+
"Multiple failures?" -> "Are they independent?" [label="yes"];
|
|
28
|
+
"Are they independent?" -> "Single agent investigates all" [label="no - related"];
|
|
29
|
+
"Are they independent?" -> "Can they work in parallel?" [label="yes"];
|
|
30
|
+
"Can they work in parallel?" -> "Parallel dispatch" [label="yes"];
|
|
31
|
+
"Can they work in parallel?" -> "Sequential agents" [label="no - shared state"];
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Use when:**
|
|
36
|
+
- 3+ test files failing with different root causes
|
|
37
|
+
- Multiple subsystems broken independently
|
|
38
|
+
- Each problem can be understood without context from others
|
|
39
|
+
- No shared state between investigations
|
|
40
|
+
|
|
41
|
+
**Don't use when:**
|
|
42
|
+
- Failures are related (fix one might fix others)
|
|
43
|
+
- Need to understand full system state
|
|
44
|
+
- Agents would interfere with each other
|
|
45
|
+
|
|
46
|
+
## The Pattern
|
|
47
|
+
|
|
48
|
+
### 1. Identify Independent Domains
|
|
49
|
+
|
|
50
|
+
Group failures by what's broken:
|
|
51
|
+
- File A tests: Tool approval flow
|
|
52
|
+
- File B tests: Batch completion behavior
|
|
53
|
+
- File C tests: Abort functionality
|
|
54
|
+
|
|
55
|
+
Each domain is independent - fixing tool approval doesn't affect abort tests.
|
|
56
|
+
|
|
57
|
+
### 2. Create Focused Agent Tasks
|
|
58
|
+
|
|
59
|
+
Each agent gets:
|
|
60
|
+
- **Specific scope:** One test file or subsystem
|
|
61
|
+
- **Clear goal:** Make these tests pass
|
|
62
|
+
- **Constraints:** Don't change other code
|
|
63
|
+
- **Expected output:** Summary of what you found and fixed
|
|
64
|
+
|
|
65
|
+
### 3. Dispatch in Parallel
|
|
66
|
+
|
|
67
|
+
```typescript
|
|
68
|
+
// In Claude Code / AI environment
|
|
69
|
+
Task("Fix agent-tool-abort.test.ts failures")
|
|
70
|
+
Task("Fix batch-completion-behavior.test.ts failures")
|
|
71
|
+
Task("Fix tool-approval-race-conditions.test.ts failures")
|
|
72
|
+
// All three run concurrently
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 4. Review and Integrate
|
|
76
|
+
|
|
77
|
+
When agents return:
|
|
78
|
+
- Read each summary
|
|
79
|
+
- Verify fixes don't conflict
|
|
80
|
+
- Run full test suite
|
|
81
|
+
- Integrate all changes
|
|
82
|
+
|
|
83
|
+
## Common Mistakes
|
|
84
|
+
|
|
85
|
+
**❌ Too broad:** "Fix all the tests" - agent gets lost
|
|
86
|
+
**✅ Specific:** "Fix agent-tool-abort.test.ts" - focused scope
|
|
87
|
+
|
|
88
|
+
**❌ No context:** "Fix the race condition" - agent doesn't know where
|
|
89
|
+
**✅ Context:** Paste the error messages and test names
|
|
90
|
+
|
|
91
|
+
**❌ No constraints:** Agent might refactor everything
|
|
92
|
+
**✅ Constraints:** "Do NOT change production code" or "Fix tests only"
|
|
93
|
+
|
|
94
|
+
**❌ Vague output:** "Fix it" - you don't know what changed
|
|
95
|
+
**✅ Specific:** "Return summary of root cause and changes"
|
|
96
|
+
|
|
97
|
+
## When NOT to Use
|
|
98
|
+
|
|
99
|
+
**Related failures:** Fixing one might fix others - investigate together first
|
|
100
|
+
**Need full context:** Understanding requires seeing entire system
|
|
101
|
+
**Exploratory debugging:** You don't know what's broken yet
|
|
102
|
+
**Shared state:** Agents would interfere (editing same files, using same resources)
|
|
103
|
+
|
|
104
|
+
## Verification
|
|
105
|
+
|
|
106
|
+
After agents return:
|
|
107
|
+
1. **Review each summary** - Understand what changed
|
|
108
|
+
2. **Check for conflicts** - Did agents edit same code?
|
|
109
|
+
3. **Run full suite** - Verify all fixes work together
|
|
110
|
+
4. **Spot check** - Agents can make systematic errors
|
|
@@ -0,0 +1,85 @@
|
|
|
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
|
+
version: 1.0.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Executing Plans
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
Load plan, review critically, execute tasks in batches, report for review between batches.
|
|
12
|
+
|
|
13
|
+
**Core principle:** Batch execution with checkpoints for architect review.
|
|
14
|
+
|
|
15
|
+
**Announce at start:** "I'm using the executing-plans skill to implement this plan."
|
|
16
|
+
|
|
17
|
+
## The Process
|
|
18
|
+
|
|
19
|
+
### Step 1: Load and Review Plan
|
|
20
|
+
1. Read plan file
|
|
21
|
+
2. Review critically - identify any questions or concerns about the plan
|
|
22
|
+
3. If concerns: Raise them with your human partner before starting
|
|
23
|
+
4. If no concerns: Create TodoWrite and proceed
|
|
24
|
+
|
|
25
|
+
### Step 2: Execute Batch
|
|
26
|
+
**Default: First 3 tasks**
|
|
27
|
+
|
|
28
|
+
For each task:
|
|
29
|
+
1. Mark as in_progress
|
|
30
|
+
2. Follow each step exactly (plan has bite-sized steps)
|
|
31
|
+
3. Run verifications as specified
|
|
32
|
+
4. Mark as completed
|
|
33
|
+
|
|
34
|
+
### Step 3: Report
|
|
35
|
+
When batch complete:
|
|
36
|
+
- Show what was implemented
|
|
37
|
+
- Show verification output
|
|
38
|
+
- Say: "Ready for feedback."
|
|
39
|
+
|
|
40
|
+
### Step 4: Continue
|
|
41
|
+
Based on feedback:
|
|
42
|
+
- Apply changes if needed
|
|
43
|
+
- Execute next batch
|
|
44
|
+
- Repeat until complete
|
|
45
|
+
|
|
46
|
+
### Step 5: Complete Development
|
|
47
|
+
|
|
48
|
+
After all tasks complete and verified:
|
|
49
|
+
- Announce: "I'm using the finishing-a-development-branch skill to complete this work."
|
|
50
|
+
- **REQUIRED SUB-SKILL:** Use superpowers:finishing-a-development-branch
|
|
51
|
+
- Follow that skill to verify tests, present options, execute choice
|
|
52
|
+
|
|
53
|
+
## When to Stop and Ask for Help
|
|
54
|
+
|
|
55
|
+
**STOP executing immediately when:**
|
|
56
|
+
- Hit a blocker mid-batch (missing dependency, test fails, instruction unclear)
|
|
57
|
+
- Plan has critical gaps preventing starting
|
|
58
|
+
- You don't understand an instruction
|
|
59
|
+
- Verification fails repeatedly
|
|
60
|
+
|
|
61
|
+
**Ask for clarification rather than guessing.**
|
|
62
|
+
|
|
63
|
+
## When to Revisit Earlier Steps
|
|
64
|
+
|
|
65
|
+
**Return to Review (Step 1) when:**
|
|
66
|
+
- Partner updates the plan based on your feedback
|
|
67
|
+
- Fundamental approach needs rethinking
|
|
68
|
+
|
|
69
|
+
**Don't force through blockers** - stop and ask.
|
|
70
|
+
|
|
71
|
+
## Remember
|
|
72
|
+
- Review plan critically first
|
|
73
|
+
- Follow plan steps exactly
|
|
74
|
+
- Don't skip verifications
|
|
75
|
+
- Reference skills when plan says to
|
|
76
|
+
- Between batches: just report and wait
|
|
77
|
+
- Stop when blocked, don't guess
|
|
78
|
+
- Never start implementation on main/master branch without explicit user consent
|
|
79
|
+
|
|
80
|
+
## Integration
|
|
81
|
+
|
|
82
|
+
**Required workflow skills:**
|
|
83
|
+
- **superpowers:using-git-worktrees** - REQUIRED: Set up isolated workspace before starting
|
|
84
|
+
- **superpowers:writing-plans** - Creates the plan this skill executes
|
|
85
|
+
- **superpowers:finishing-a-development-branch** - Complete development after all tasks
|
|
@@ -0,0 +1,201 @@
|
|
|
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 - guides completion of development work by presenting structured options for merge, PR, or cleanup
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Finishing a Development Branch
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
Guide completion of development work by presenting clear options and handling chosen workflow.
|
|
12
|
+
|
|
13
|
+
**Core principle:** Verify tests → 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
|
+
## The Process
|
|
18
|
+
|
|
19
|
+
### Step 1: Verify Tests
|
|
20
|
+
|
|
21
|
+
**Before presenting options, verify tests pass:**
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Run project's test suite
|
|
25
|
+
npm test / cargo test / pytest / go test ./...
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
**If tests fail:**
|
|
29
|
+
```
|
|
30
|
+
Tests failing (<N> failures). Must fix before completing:
|
|
31
|
+
|
|
32
|
+
[Show failures]
|
|
33
|
+
|
|
34
|
+
Cannot proceed with merge/PR until tests pass.
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Stop. Don't proceed to Step 2.
|
|
38
|
+
|
|
39
|
+
**If tests pass:** Continue to Step 2.
|
|
40
|
+
|
|
41
|
+
### Step 2: Determine Base Branch
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Try common base branches
|
|
45
|
+
git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Or ask: "This branch split from main - is that correct?"
|
|
49
|
+
|
|
50
|
+
### Step 3: Present Options
|
|
51
|
+
|
|
52
|
+
Present exactly these 4 options:
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
Implementation complete. What would you like to do?
|
|
56
|
+
|
|
57
|
+
1. Merge back to <base-branch> locally
|
|
58
|
+
2. Push and create a Pull Request
|
|
59
|
+
3. Keep the branch as-is (I'll handle it later)
|
|
60
|
+
4. Discard this work
|
|
61
|
+
|
|
62
|
+
Which option?
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**Don't add explanation** - keep options concise.
|
|
66
|
+
|
|
67
|
+
### Step 4: Execute Choice
|
|
68
|
+
|
|
69
|
+
#### Option 1: Merge Locally
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# Switch to base branch
|
|
73
|
+
git checkout <base-branch>
|
|
74
|
+
|
|
75
|
+
# Pull latest
|
|
76
|
+
git pull
|
|
77
|
+
|
|
78
|
+
# Merge feature branch
|
|
79
|
+
git merge <feature-branch>
|
|
80
|
+
|
|
81
|
+
# Verify tests on merged result
|
|
82
|
+
<test command>
|
|
83
|
+
|
|
84
|
+
# If tests pass
|
|
85
|
+
git branch -d <feature-branch>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Then: Cleanup worktree (Step 5)
|
|
89
|
+
|
|
90
|
+
#### Option 2: Push and Create PR
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# Push branch
|
|
94
|
+
git push -u origin <feature-branch>
|
|
95
|
+
|
|
96
|
+
# Create PR
|
|
97
|
+
gh pr create --title "<title>" --body "$(cat <<'EOF'
|
|
98
|
+
## Summary
|
|
99
|
+
<2-3 bullets of what changed>
|
|
100
|
+
|
|
101
|
+
## Test Plan
|
|
102
|
+
- [ ] <verification steps>
|
|
103
|
+
EOF
|
|
104
|
+
)"
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Then: Cleanup worktree (Step 5)
|
|
108
|
+
|
|
109
|
+
#### Option 3: Keep As-Is
|
|
110
|
+
|
|
111
|
+
Report: "Keeping branch <name>. Worktree preserved at <path>."
|
|
112
|
+
|
|
113
|
+
**Don't cleanup worktree.**
|
|
114
|
+
|
|
115
|
+
#### Option 4: Discard
|
|
116
|
+
|
|
117
|
+
**Confirm first:**
|
|
118
|
+
```
|
|
119
|
+
This will permanently delete:
|
|
120
|
+
- Branch <name>
|
|
121
|
+
- All commits: <commit-list>
|
|
122
|
+
- Worktree at <path>
|
|
123
|
+
|
|
124
|
+
Type 'discard' to confirm.
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Wait for exact confirmation.
|
|
128
|
+
|
|
129
|
+
If confirmed:
|
|
130
|
+
```bash
|
|
131
|
+
git checkout <base-branch>
|
|
132
|
+
git branch -D <feature-branch>
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Then: Cleanup worktree (Step 5)
|
|
136
|
+
|
|
137
|
+
### Step 5: Cleanup Worktree
|
|
138
|
+
|
|
139
|
+
**For Options 1, 2, 4:**
|
|
140
|
+
|
|
141
|
+
Check if in worktree:
|
|
142
|
+
```bash
|
|
143
|
+
git worktree list | grep $(git branch --show-current)
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
If yes:
|
|
147
|
+
```bash
|
|
148
|
+
git worktree remove <worktree-path>
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**For Option 3:** Keep worktree.
|
|
152
|
+
|
|
153
|
+
## Quick Reference
|
|
154
|
+
|
|
155
|
+
| Option | Merge | Push | Keep Worktree | Cleanup Branch |
|
|
156
|
+
|--------|-------|------|---------------|----------------|
|
|
157
|
+
| 1. Merge locally | ✓ | - | - | ✓ |
|
|
158
|
+
| 2. Create PR | - | ✓ | ✓ | - |
|
|
159
|
+
| 3. Keep as-is | - | - | ✓ | - |
|
|
160
|
+
| 4. Discard | - | - | - | ✓ (force) |
|
|
161
|
+
|
|
162
|
+
## Common Mistakes
|
|
163
|
+
|
|
164
|
+
**Skipping test verification**
|
|
165
|
+
- **Problem:** Merge broken code, create failing PR
|
|
166
|
+
- **Fix:** Always verify tests before offering options
|
|
167
|
+
|
|
168
|
+
**Open-ended questions**
|
|
169
|
+
- **Problem:** "What should I do next?" → ambiguous
|
|
170
|
+
- **Fix:** Present exactly 4 structured options
|
|
171
|
+
|
|
172
|
+
**Automatic worktree cleanup**
|
|
173
|
+
- **Problem:** Remove worktree when might need it (Option 2, 3)
|
|
174
|
+
- **Fix:** Only cleanup for Options 1 and 4
|
|
175
|
+
|
|
176
|
+
**No confirmation for discard**
|
|
177
|
+
- **Problem:** Accidentally delete work
|
|
178
|
+
- **Fix:** Require typed "discard" confirmation
|
|
179
|
+
|
|
180
|
+
## Red Flags
|
|
181
|
+
|
|
182
|
+
**Never:**
|
|
183
|
+
- Proceed with failing tests
|
|
184
|
+
- Merge without verifying tests on result
|
|
185
|
+
- Delete work without confirmation
|
|
186
|
+
- Force-push without explicit request
|
|
187
|
+
|
|
188
|
+
**Always:**
|
|
189
|
+
- Verify tests before offering options
|
|
190
|
+
- Present exactly 4 options
|
|
191
|
+
- Get typed confirmation for Option 4
|
|
192
|
+
- Clean up worktree for Options 1 & 4 only
|
|
193
|
+
|
|
194
|
+
## Integration
|
|
195
|
+
|
|
196
|
+
**Called by:**
|
|
197
|
+
- **subagent-driven-development** (Step 7) - After all tasks complete
|
|
198
|
+
- **executing-plans** (Step 5) - After all batches complete
|
|
199
|
+
|
|
200
|
+
**Pairs with:**
|
|
201
|
+
- **using-git-worktrees** - Cleans up worktree created by that skill
|
|
@@ -0,0 +1,72 @@
|
|
|
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
|
+
version: 1.0.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Code Review Reception
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
Code review requires technical evaluation, not emotional performance.
|
|
12
|
+
|
|
13
|
+
**Core principle:** Verify before implementing. Ask before assuming. Technical correctness over social comfort.
|
|
14
|
+
|
|
15
|
+
## The Response Pattern
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
WHEN receiving code review feedback:
|
|
19
|
+
|
|
20
|
+
1. READ: Complete feedback without reacting
|
|
21
|
+
2. UNDERSTAND: Restate requirement in own words (or ask)
|
|
22
|
+
3. VERIFY: Check against codebase reality
|
|
23
|
+
4. EVALUATE: Technically sound for THIS codebase?
|
|
24
|
+
5. RESPOND: Technical acknowledgment or reasoned pushback
|
|
25
|
+
6. IMPLEMENT: One item at a time, test each
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Forbidden Responses
|
|
29
|
+
|
|
30
|
+
**NEVER:**
|
|
31
|
+
- "You're absolutely right!" (performative)
|
|
32
|
+
- "Great point!" / "Excellent feedback!" (performative)
|
|
33
|
+
- "Let me implement that now" (before verification)
|
|
34
|
+
|
|
35
|
+
**INSTEAD:**
|
|
36
|
+
- Restate the technical requirement
|
|
37
|
+
- Ask clarifying questions
|
|
38
|
+
- Push back with technical reasoning if wrong
|
|
39
|
+
- Just start working (actions > words)
|
|
40
|
+
|
|
41
|
+
## When To Push Back
|
|
42
|
+
|
|
43
|
+
Push back when:
|
|
44
|
+
- Suggestion breaks existing functionality
|
|
45
|
+
- Reviewer lacks full context
|
|
46
|
+
- Violates YAGNI (unused feature)
|
|
47
|
+
- Technically incorrect for this stack
|
|
48
|
+
- Conflicts with architectural decisions
|
|
49
|
+
|
|
50
|
+
**How to push back:**
|
|
51
|
+
- Use technical reasoning, not defensiveness
|
|
52
|
+
- Ask specific questions
|
|
53
|
+
- Reference working tests/code
|
|
54
|
+
|
|
55
|
+
## Implementation Order
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
FOR multi-item feedback:
|
|
59
|
+
1. Clarify anything unclear FIRST
|
|
60
|
+
2. Then implement in this order:
|
|
61
|
+
- Blocking issues (breaks, security)
|
|
62
|
+
- Simple fixes (typos, imports)
|
|
63
|
+
- Complex fixes (refactoring, logic)
|
|
64
|
+
3. Test each fix individually
|
|
65
|
+
4. Verify no regressions
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## The Bottom Line
|
|
69
|
+
|
|
70
|
+
**External feedback = suggestions to evaluate, not orders to follow.**
|
|
71
|
+
|
|
72
|
+
Verify. Question. Then implement. No performative agreement. Technical rigor always.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: requesting-code-review
|
|
3
|
+
description: Use when completing tasks, implementing major features, or before merging to verify work meets requirements
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Requesting Code Review
|
|
8
|
+
|
|
9
|
+
Dispatch superpowers:code-reviewer subagent to catch issues before they cascade.
|
|
10
|
+
|
|
11
|
+
**Core principle:** Review early, review often.
|
|
12
|
+
|
|
13
|
+
## When to Request Review
|
|
14
|
+
|
|
15
|
+
**Mandatory:**
|
|
16
|
+
- After each task in subagent-driven development
|
|
17
|
+
- After completing major feature
|
|
18
|
+
- Before merge to main
|
|
19
|
+
|
|
20
|
+
**Optional but valuable:**
|
|
21
|
+
- When stuck (fresh perspective)
|
|
22
|
+
- Before refactoring (baseline check)
|
|
23
|
+
- After fixing complex bug
|
|
24
|
+
|
|
25
|
+
## How to Request
|
|
26
|
+
|
|
27
|
+
**1. Get git SHAs:**
|
|
28
|
+
```bash
|
|
29
|
+
BASE_SHA=$(git rev-parse HEAD~1) # or origin/main
|
|
30
|
+
HEAD_SHA=$(git rev-parse HEAD)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**2. Dispatch code-reviewer subagent:**
|
|
34
|
+
|
|
35
|
+
Use Task tool with superpowers:code-reviewer type, fill template at `code-reviewer.md`
|
|
36
|
+
|
|
37
|
+
**Placeholders:**
|
|
38
|
+
- `{WHAT_WAS_IMPLEMENTED}` - What you just built
|
|
39
|
+
- `{PLAN_OR_REQUIREMENTS}` - What it should do
|
|
40
|
+
- `{BASE_SHA}` - Starting commit
|
|
41
|
+
- `{HEAD_SHA}` - Ending commit
|
|
42
|
+
- `{DESCRIPTION}` - Brief summary
|
|
43
|
+
|
|
44
|
+
**3. Act on feedback:**
|
|
45
|
+
- Fix Critical issues immediately
|
|
46
|
+
- Fix Important issues before proceeding
|
|
47
|
+
- Note Minor issues for later
|
|
48
|
+
- Push back if reviewer is wrong (with reasoning)
|
|
49
|
+
|
|
50
|
+
## Integration with Workflows
|
|
51
|
+
|
|
52
|
+
**Subagent-Driven Development:**
|
|
53
|
+
- Review after EACH task
|
|
54
|
+
- Catch issues before they compound
|
|
55
|
+
|
|
56
|
+
**Executing Plans:**
|
|
57
|
+
- Review after each batch (3 tasks)
|
|
58
|
+
|
|
59
|
+
See template at: requesting-code-review/code-reviewer.md
|