@hybridlabor-api/aos 4.8.0 → 4.10.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/.agents/{agents.md → AGENTS.md} +3 -1
- package/.agents/nodes.json +3 -1
- package/.agents/vendor-manifest.json +23 -1
- package/.claude/agents/godmode-media-eventtech.md +1 -1
- package/.claude/hooks/conventional-commits.mjs +125 -0
- package/.claude/hooks/env-file-protection.mjs +105 -0
- package/.claude/hooks/go-gate.mjs +101 -81
- package/.claude/hooks/memb-inject.mjs +29 -1
- package/.claude/settings.json +13 -0
- package/.claude/workflows/startcycle-dispatch.mjs +23 -1
- package/.opencode/agents/godmode-media-eventtech.md +1 -1
- package/.opencode/plugins/bdb-aos.js +31 -4
- package/CLAUDE.md +0 -571
- package/README.de.md +1 -1
- package/README.md +1 -1
- package/README.pt.md +1 -1
- package/THIRD_PARTY_NOTICES.md +126 -0
- package/bin/aos-doctor.mjs +1 -1
- package/docs/skills_table.md +1 -1
- package/installer.js +187 -55
- package/package.json +7 -3
- package/packages/aos-cli/README.md +80 -0
- package/packages/aos-cli/bin/aos-cli.mjs +134 -0
- package/packages/aos-cli/core-skills.json +12 -0
- package/packages/aos-cli/extensions/aos.ts +321 -0
- package/packages/aos-cli/package-lock.json +1923 -0
- package/packages/aos-cli/package.json +29 -0
- package/packages/aos-cli/scripts/check-theme.mjs +63 -0
- package/packages/aos-cli/themes/aos.json +97 -0
- package/scripts/build-plugin-manifest.mjs +131 -0
- package/scripts/validate-skills.mjs +81 -6
- package/skills/basic/ao-orchestrator/SKILL.md +116 -0
- package/skills/basic/bdb-eventagency-skill/SKILL.md +252 -0
- package/skills/basic/bdb-shipping-skill/SKILL.md +161 -0
- package/skills/basic/godmode-eventtech/SKILL.md +4 -1
- package/skills/global_config/agenttrail/SKILL.md +6 -1
- package/skills/global_config/aos-project-init/SKILL.md +2 -0
- package/skills/global_config/aos-project-init/assets/AGENTS.template.md +1 -1
- package/skills/global_config/aos-project-init/scripts/aos-project-doctor.mjs +1 -1
- package/skills/global_config/aos-setup/SKILL.md +1 -1
- package/skills/global_config/aos-setup/scripts/aos-doctor.mjs +1 -1
- package/skills/global_config/ask-tim/SKILL.md +7 -7
- package/skills/global_config/bash-script-generator/SKILL.md +201 -0
- package/skills/global_config/bash-script-generator/assets/templates/standard-template.sh +96 -0
- package/skills/global_config/bash-script-generator/docs/bash-scripting-guide.md +729 -0
- package/skills/global_config/bash-script-generator/docs/generation-best-practices.md +193 -0
- package/skills/global_config/bash-script-generator/docs/script-patterns.md +566 -0
- package/skills/global_config/bash-script-generator/docs/text-processing-guide.md +437 -0
- package/skills/global_config/bash-script-generator/examples/log-analyzer.sh +92 -0
- package/skills/global_config/bash-script-generator/scripts/generate_script_template.sh +123 -0
- package/skills/global_config/bash-script-generator/scripts/run_ci_checks.sh +172 -0
- package/skills/global_config/bash-script-generator/scripts/test_generator.sh +413 -0
- package/skills/global_config/bash-script-validator/SKILL.md +249 -0
- package/skills/global_config/bash-script-validator/docs/awk-reference.md +449 -0
- package/skills/global_config/bash-script-validator/docs/bash-reference.md +468 -0
- package/skills/global_config/bash-script-validator/docs/common-mistakes.md +623 -0
- package/skills/global_config/bash-script-validator/docs/grep-reference.md +395 -0
- package/skills/global_config/bash-script-validator/docs/regex-reference.md +391 -0
- package/skills/global_config/bash-script-validator/docs/sed-reference.md +454 -0
- package/skills/global_config/bash-script-validator/docs/shell-reference.md +463 -0
- package/skills/global_config/bash-script-validator/docs/shellcheck-reference.md +399 -0
- package/skills/global_config/bash-script-validator/examples/bad-bash.sh +55 -0
- package/skills/global_config/bash-script-validator/examples/bad-shell.sh +54 -0
- package/skills/global_config/bash-script-validator/examples/good-bash.sh +71 -0
- package/skills/global_config/bash-script-validator/examples/good-shell.sh +69 -0
- package/skills/global_config/bash-script-validator/scripts/run_ci_checks.sh +23 -0
- package/skills/global_config/bash-script-validator/scripts/shellcheck_wrapper.sh +174 -0
- package/skills/global_config/bash-script-validator/scripts/test_validate.sh +446 -0
- package/skills/global_config/bash-script-validator/scripts/validate.sh +512 -0
- package/skills/global_config/ci-pipeline/SKILL.md +135 -0
- package/skills/global_config/deja-memory/SKILL.md +3 -1
- package/skills/global_config/dispatching-parallel-agents/SKILL.md +170 -0
- package/skills/global_config/dockerfile-generator/SKILL.md +1038 -0
- package/skills/global_config/dockerfile-generator/examples/example.dockerignore +95 -0
- package/skills/global_config/dockerfile-generator/examples/golang-distroless.Dockerfile +34 -0
- package/skills/global_config/dockerfile-generator/examples/java-springboot.Dockerfile +45 -0
- package/skills/global_config/dockerfile-generator/examples/nextjs-production.Dockerfile +49 -0
- package/skills/global_config/dockerfile-generator/examples/nodejs-multistage.Dockerfile +55 -0
- package/skills/global_config/dockerfile-generator/examples/python-fastapi.Dockerfile +48 -0
- package/skills/global_config/dockerfile-generator/references/language_specific_guides.md +510 -0
- package/skills/global_config/dockerfile-generator/references/multistage_builds.md +570 -0
- package/skills/global_config/dockerfile-generator/references/optimization_patterns.md +492 -0
- package/skills/global_config/dockerfile-generator/references/security_best_practices.md +375 -0
- package/skills/global_config/dockerfile-generator/scripts/generate_dockerignore.sh +199 -0
- package/skills/global_config/dockerfile-generator/scripts/generate_golang.sh +172 -0
- package/skills/global_config/dockerfile-generator/scripts/generate_java.sh +185 -0
- package/skills/global_config/dockerfile-generator/scripts/generate_nodejs.sh +279 -0
- package/skills/global_config/dockerfile-generator/scripts/generate_python.sh +218 -0
- package/skills/global_config/dockerfile-generator/scripts/test_generator.sh +210 -0
- package/skills/global_config/dockerfile-validator/SKILL.md +300 -0
- package/skills/global_config/dockerfile-validator/examples/.dockerignore.example +34 -0
- package/skills/global_config/dockerfile-validator/examples/bad-example.Dockerfile +37 -0
- package/skills/global_config/dockerfile-validator/examples/golang-distroless.Dockerfile +50 -0
- package/skills/global_config/dockerfile-validator/examples/good-example.Dockerfile +52 -0
- package/skills/global_config/dockerfile-validator/examples/python-optimized.Dockerfile +53 -0
- package/skills/global_config/dockerfile-validator/examples/security-issues.Dockerfile +42 -0
- package/skills/global_config/dockerfile-validator/references/docker_best_practices.md +348 -0
- package/skills/global_config/dockerfile-validator/references/optimization_guide.md +473 -0
- package/skills/global_config/dockerfile-validator/references/security_checklist.md +208 -0
- package/skills/global_config/dockerfile-validator/scripts/dockerfile-validate.sh +699 -0
- package/skills/global_config/dockerfile-validator/scripts/test_validate.sh +35 -0
- package/skills/global_config/dockerfile-validator/tests/fixtures/copy-before-yarn-lock-read.Dockerfile +6 -0
- package/skills/global_config/dockerfile-validator/tests/fixtures/copy-before-yarn.Dockerfile +6 -0
- package/skills/global_config/dockerfile-validator/tests/fixtures/from-platform-nonroot.Dockerfile +7 -0
- package/skills/global_config/dockerfile-validator/tests/test_regression.sh +164 -0
- package/skills/global_config/finishing-a-development-branch/SKILL.md +228 -0
- package/skills/global_config/github-actions-generator/SKILL.md +353 -0
- package/skills/global_config/github-actions-generator/assets/templates/action/composite/action.yml +82 -0
- package/skills/global_config/github-actions-generator/assets/templates/action/docker/Dockerfile +25 -0
- package/skills/global_config/github-actions-generator/assets/templates/action/docker/action.yml +42 -0
- package/skills/global_config/github-actions-generator/assets/templates/action/docker/entrypoint.sh +27 -0
- package/skills/global_config/github-actions-generator/assets/templates/action/javascript/action.yml +33 -0
- package/skills/global_config/github-actions-generator/assets/templates/action/javascript/index.js +50 -0
- package/skills/global_config/github-actions-generator/assets/templates/action/javascript/package.json +27 -0
- package/skills/global_config/github-actions-generator/assets/templates/workflow/basic_workflow.yml +242 -0
- package/skills/global_config/github-actions-generator/assets/templates/workflow/reusable_workflow.yml +106 -0
- package/skills/global_config/github-actions-generator/examples/README.md +147 -0
- package/skills/global_config/github-actions-generator/examples/actions/setup-node-cached/action.yml +93 -0
- package/skills/global_config/github-actions-generator/examples/caching/docker-buildkit.yml +256 -0
- package/skills/global_config/github-actions-generator/examples/security/dependency-review.yml +62 -0
- package/skills/global_config/github-actions-generator/examples/security/sbom-attestation.yml +119 -0
- package/skills/global_config/github-actions-generator/examples/triggers/chatops-commands.yml +475 -0
- package/skills/global_config/github-actions-generator/examples/triggers/repository-dispatch.yml +418 -0
- package/skills/global_config/github-actions-generator/examples/triggers/workflow-orchestration.yml +404 -0
- package/skills/global_config/github-actions-generator/examples/workflows/docker-build-push.yml +68 -0
- package/skills/global_config/github-actions-generator/examples/workflows/go-ci.yml +161 -0
- package/skills/global_config/github-actions-generator/examples/workflows/monorepo-ci.yml +340 -0
- package/skills/global_config/github-actions-generator/examples/workflows/multi-environment-deploy.yml +406 -0
- package/skills/global_config/github-actions-generator/examples/workflows/nodejs-ci.yml +122 -0
- package/skills/global_config/github-actions-generator/examples/workflows/python-ci.yml +157 -0
- package/skills/global_config/github-actions-generator/examples/workflows/scheduled-tasks.yml +376 -0
- package/skills/global_config/github-actions-generator/references/advanced-triggers.md +917 -0
- package/skills/global_config/github-actions-generator/references/best-practices.md +755 -0
- package/skills/global_config/github-actions-generator/references/common-actions.md +715 -0
- package/skills/global_config/github-actions-generator/references/custom-actions.md +320 -0
- package/skills/global_config/github-actions-generator/references/expressions-and-contexts.md +688 -0
- package/skills/global_config/github-actions-generator/references/modern-features.md +421 -0
- package/skills/global_config/github-actions-generator/scripts/test_generator.sh +344 -0
- package/skills/global_config/github-actions-templates/SKILL.md +7 -0
- package/skills/global_config/github-actions-validator/SKILL.md +576 -0
- package/skills/global_config/github-actions-validator/examples/README.md +88 -0
- package/skills/global_config/github-actions-validator/examples/outdated-versions.yml +76 -0
- package/skills/global_config/github-actions-validator/examples/valid-ci.yml +79 -0
- package/skills/global_config/github-actions-validator/examples/with-errors.yml +47 -0
- package/skills/global_config/github-actions-validator/references/act_usage.md +233 -0
- package/skills/global_config/github-actions-validator/references/action_versions.md +122 -0
- package/skills/global_config/github-actions-validator/references/actionlint_usage.md +343 -0
- package/skills/global_config/github-actions-validator/references/common_errors.md +512 -0
- package/skills/global_config/github-actions-validator/references/modern_features.md +384 -0
- package/skills/global_config/github-actions-validator/references/runners.md +317 -0
- package/skills/global_config/github-actions-validator/scripts/install_tools.sh +113 -0
- package/skills/global_config/github-actions-validator/scripts/validate_workflow.sh +910 -0
- package/skills/global_config/github-actions-validator/tests/test_validate_workflow.sh +237 -0
- package/skills/global_config/makefile-generator/SKILL.md +614 -0
- package/skills/global_config/makefile-generator/assets/templates/.gitkeep +1 -0
- package/skills/global_config/makefile-generator/docs/makefile-structure.md +530 -0
- package/skills/global_config/makefile-generator/docs/optimization-guide.md +784 -0
- package/skills/global_config/makefile-generator/docs/patterns-guide.md +642 -0
- package/skills/global_config/makefile-generator/docs/security-guide.md +361 -0
- package/skills/global_config/makefile-generator/docs/targets-guide.md +642 -0
- package/skills/global_config/makefile-generator/docs/variables-guide.md +596 -0
- package/skills/global_config/makefile-generator/scripts/add_standard_targets.sh +539 -0
- package/skills/global_config/makefile-generator/scripts/generate_makefile_template.sh +690 -0
- package/skills/global_config/makefile-generator/test/test_helper_scripts.sh +190 -0
- package/skills/global_config/makefile-validator/SKILL.md +244 -0
- package/skills/global_config/makefile-validator/docs/bake-tool.md +1000 -0
- package/skills/global_config/makefile-validator/docs/best-practices.md +858 -0
- package/skills/global_config/makefile-validator/docs/common-mistakes.md +944 -0
- package/skills/global_config/makefile-validator/examples/bad-makefile.mk +77 -0
- package/skills/global_config/makefile-validator/examples/good-makefile.mk +103 -0
- package/skills/global_config/makefile-validator/scripts/test_validate.sh +382 -0
- package/skills/global_config/makefile-validator/scripts/validate_makefile.sh +712 -0
- package/skills/global_config/{MCP_Manage → mcp-manage}/SKILL.md +3 -3
- package/skills/global_config/plan-canvas/SKILL.md +9 -2
- package/skills/global_config/plan-canvas/scripts/lib/plan-canvas/ui.js +10 -2
- package/skills/global_config/plan-canvas/scripts/plan-canvas.js +1 -1
- package/skills/global_config/read-the-damn-docs/SKILL.md +175 -0
- package/skills/global_config/requesting-code-review/SKILL.md +98 -0
- package/skills/global_config/requesting-code-review/code-reviewer.md +198 -0
- package/skills/global_config/using-git-worktrees/SKILL.md +170 -0
- package/skills/global_config/verification-before-completion/SKILL.md +123 -0
- package/skills/global_config/writing-plans/SKILL.md +126 -46
- package/skills/global_config/writing-plans-legacy/SKILL.md +152 -0
- package/.claude/CLAUDE.md +0 -12
- package/mcps/RhinoMCP/docs/content/docs/getting-started/gemini.md +0 -61
- /package/{GEMINI.md → RULES.md} +0 -0
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: using-git-worktrees
|
|
3
|
+
description: Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback
|
|
4
|
+
category: engineering-method
|
|
5
|
+
source: superpowers
|
|
6
|
+
date_added: "2026-09-25"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Using Git Worktrees
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
Ensure work happens in an isolated workspace. Prefer your platform's native worktree tools. Fall back to manual git worktrees only when no native tool is available.
|
|
14
|
+
|
|
15
|
+
**Core principle:** Detect existing isolation first. Then use native tools. Then fall back to git. Never fight the harness.
|
|
16
|
+
|
|
17
|
+
**Announce at start:** "I'm using the using-git-worktrees skill to set up an isolated workspace."
|
|
18
|
+
|
|
19
|
+
## Step 0: Detect Existing Isolation
|
|
20
|
+
|
|
21
|
+
**Before creating anything, check if you are already in an isolated workspace.**
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)
|
|
25
|
+
GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)
|
|
26
|
+
BRANCH=$(git branch --show-current)
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Submodule guard:** `GIT_DIR != GIT_COMMON` is also true inside git submodules. Before concluding "already in a worktree," verify you are not in a submodule:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# If this returns a path, you're in a submodule, not a worktree — treat as normal repo
|
|
33
|
+
git rev-parse --show-superproject-working-tree 2>/dev/null
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**If `GIT_DIR != GIT_COMMON` (and not a submodule):** You are already in a linked worktree. Skip to Step 2 (Project Setup). Do NOT create another worktree.
|
|
37
|
+
|
|
38
|
+
Report with branch state:
|
|
39
|
+
- On a branch: "Already in isolated workspace at `<path>` on branch `<name>`."
|
|
40
|
+
- Detached HEAD: "Already in isolated workspace at `<path>` (detached HEAD, externally managed). Branch creation needed at finish time."
|
|
41
|
+
|
|
42
|
+
**If `GIT_DIR == GIT_COMMON` (or in a submodule):** You are in a normal repo checkout.
|
|
43
|
+
|
|
44
|
+
Has the user already indicated their worktree preference in your instructions? If not, ask for consent before creating a worktree:
|
|
45
|
+
|
|
46
|
+
> "Would you like me to set up an isolated worktree? It protects your current branch from changes."
|
|
47
|
+
|
|
48
|
+
Honor any existing declared preference without asking. If the user declines consent, work in place and skip to Step 2.
|
|
49
|
+
|
|
50
|
+
## Step 1: Create Isolated Workspace
|
|
51
|
+
|
|
52
|
+
**You have two mechanisms. Try them in this order.**
|
|
53
|
+
|
|
54
|
+
### 1a. Native Worktree Tools (preferred)
|
|
55
|
+
|
|
56
|
+
The user has asked for an isolated workspace (Step 0 consent). Do you already have a way to create a worktree? It might be a tool with a name like `EnterWorktree`, `WorktreeCreate`, a `/worktree` command, or a `--worktree` flag. If you do, use it and skip to Step 2.
|
|
57
|
+
|
|
58
|
+
Native tools handle directory placement, branch creation, and cleanup automatically. Using `git worktree add` when you have a native tool creates phantom state your harness can't see or manage.
|
|
59
|
+
|
|
60
|
+
Only proceed to Step 1b if you have no native worktree tool available.
|
|
61
|
+
|
|
62
|
+
### 1b. Git Worktree Fallback
|
|
63
|
+
|
|
64
|
+
**Only use this if Step 1a does not apply** — you have no native worktree tool available. Create a worktree manually using git.
|
|
65
|
+
|
|
66
|
+
#### Directory Selection
|
|
67
|
+
|
|
68
|
+
Follow this priority order. Explicit user preference always beats observed filesystem state.
|
|
69
|
+
|
|
70
|
+
1. **Check your instructions for a declared worktree directory preference.** If the user has already specified one, use it without asking.
|
|
71
|
+
|
|
72
|
+
2. **Check for an existing project-local worktree directory:**
|
|
73
|
+
```bash
|
|
74
|
+
ls -d .worktrees 2>/dev/null # Preferred (hidden)
|
|
75
|
+
ls -d worktrees 2>/dev/null # Alternative
|
|
76
|
+
```
|
|
77
|
+
If found, use it. If both exist, `.worktrees` wins.
|
|
78
|
+
|
|
79
|
+
3. **If there is no other guidance available**, default to `.worktrees/` at the project root.
|
|
80
|
+
|
|
81
|
+
#### Safety Verification (project-local directories only)
|
|
82
|
+
|
|
83
|
+
**MUST verify directory is ignored before creating worktree:**
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
git check-ignore -q .worktrees 2>/dev/null || git check-ignore -q worktrees 2>/dev/null
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**If NOT ignored:** Add to .gitignore, commit the change, then proceed.
|
|
90
|
+
|
|
91
|
+
**Why critical:** Prevents accidentally committing worktree contents to repository.
|
|
92
|
+
|
|
93
|
+
#### Create the Worktree
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
# Determine path based on chosen location
|
|
97
|
+
path="$LOCATION/$BRANCH_NAME"
|
|
98
|
+
|
|
99
|
+
git worktree add "$path" -b "$BRANCH_NAME"
|
|
100
|
+
cd "$path"
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**Sandbox fallback:** If `git worktree add` fails with a permission error (sandbox denial), tell the user the sandbox blocked worktree creation and you're working in the current directory instead. Then run setup and baseline tests in place.
|
|
104
|
+
|
|
105
|
+
## Step 2: Project Setup
|
|
106
|
+
|
|
107
|
+
Auto-detect and run appropriate setup:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
# Node.js
|
|
111
|
+
if [ -f package.json ]; then npm install; fi
|
|
112
|
+
|
|
113
|
+
# Rust
|
|
114
|
+
if [ -f Cargo.toml ]; then cargo build; fi
|
|
115
|
+
|
|
116
|
+
# Python
|
|
117
|
+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
118
|
+
if [ -f pyproject.toml ]; then poetry install; fi
|
|
119
|
+
|
|
120
|
+
# Go
|
|
121
|
+
if [ -f go.mod ]; then go mod download; fi
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Step 3: Verify Clean Baseline
|
|
125
|
+
|
|
126
|
+
Run tests to ensure workspace starts clean:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
# Use project-appropriate command
|
|
130
|
+
npm test / cargo test / pytest / go test ./...
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**If tests fail:** Report failures, ask whether to proceed or investigate.
|
|
134
|
+
|
|
135
|
+
**If tests pass:** Report ready.
|
|
136
|
+
|
|
137
|
+
### Report
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
Worktree ready at <full-path>
|
|
141
|
+
Tests passing (<N> tests, 0 failures)
|
|
142
|
+
Ready to implement <feature-name>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Quick Reference
|
|
146
|
+
|
|
147
|
+
| Situation | Action |
|
|
148
|
+
|-----------|--------|
|
|
149
|
+
| Already in linked worktree | Skip creation (Step 0) |
|
|
150
|
+
| In a submodule | Treat as normal repo (Step 0 guard) |
|
|
151
|
+
| Native worktree tool available | Use it (Step 1a) |
|
|
152
|
+
| No native tool | Git worktree fallback (Step 1b) |
|
|
153
|
+
| `.worktrees/` exists | Use it (verify ignored) |
|
|
154
|
+
| `worktrees/` exists | Use it (verify ignored) |
|
|
155
|
+
| Both exist | Use `.worktrees/` |
|
|
156
|
+
| Neither exists | Check instruction file, then default `.worktrees/` |
|
|
157
|
+
| Directory not ignored | Add to .gitignore + commit |
|
|
158
|
+
| Permission error on create | Sandbox fallback, work in place |
|
|
159
|
+
| Tests fail during baseline | Report failures + ask |
|
|
160
|
+
| No package.json/Cargo.toml | Skip dependency install |
|
|
161
|
+
|
|
162
|
+
## Common Rationalizations
|
|
163
|
+
|
|
164
|
+
| Excuse | Reality |
|
|
165
|
+
|--------|---------|
|
|
166
|
+
| "I'm obviously not in a worktree — no need to check" | Run Step 0. Harness-created isolation and submodules both fool eyeballing; the detection commands settle it. |
|
|
167
|
+
| "`git worktree add` is quicker than hunting for a native tool" | A native tool (e.g. `EnterWorktree`) owns placement, branching, and cleanup. Bypassing it is the #1 mistake — it creates phantom state your harness can't see or manage. |
|
|
168
|
+
| "The worktree directory is surely ignored already" | Run `git check-ignore`. An unignored worktree directory commits the whole tree into the repo. |
|
|
169
|
+
| "Any directory name works" | Explicit instructions beat an existing project-local directory, which beats the `.worktrees/` default. |
|
|
170
|
+
| "The workspace is fresh — baseline tests can wait" | A dirty baseline makes every later failure ambiguous. Run the tests now; proceeding past failures is your human partner's call. |
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: verification-before-completion
|
|
3
|
+
description: Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
|
|
4
|
+
category: engineering-method
|
|
5
|
+
source: superpowers
|
|
6
|
+
date_added: "2026-09-25"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Verification Before Completion
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
**Core principle:** Evidence before claims, always.
|
|
14
|
+
|
|
15
|
+
**Violating the letter of this rule is violating the spirit of this rule.**
|
|
16
|
+
|
|
17
|
+
## The Iron Law
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
If you haven't run the verification command in this message, you cannot claim it passes.
|
|
24
|
+
|
|
25
|
+
## The Gate Function
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
BEFORE claiming any status or expressing satisfaction:
|
|
29
|
+
|
|
30
|
+
1. IDENTIFY: What command proves this claim?
|
|
31
|
+
2. RUN: Execute the FULL command (fresh, complete)
|
|
32
|
+
3. READ: Full output, check exit code, count failures
|
|
33
|
+
4. VERIFY: Does output confirm the claim?
|
|
34
|
+
- If NO: State actual status with evidence
|
|
35
|
+
- If YES: State claim WITH evidence
|
|
36
|
+
5. ONLY THEN: Make the claim
|
|
37
|
+
|
|
38
|
+
Skip any step = lying, not verifying
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Common Failures
|
|
42
|
+
|
|
43
|
+
| Claim | Requires | Not Sufficient |
|
|
44
|
+
|-------|----------|----------------|
|
|
45
|
+
| Tests pass | Test command output: 0 failures | Previous run, "should pass" |
|
|
46
|
+
| Linter clean | Linter output: 0 errors | Partial check, extrapolation |
|
|
47
|
+
| Build succeeds | Build command: exit 0 | Linter passing, logs look good |
|
|
48
|
+
| Bug fixed | Test original symptom: passes | Code changed, assumed fixed |
|
|
49
|
+
| Regression test works | Red-green cycle verified | Test passes once |
|
|
50
|
+
| Agent completed | VCS diff shows changes | Agent reports "success" |
|
|
51
|
+
| Requirements met | Line-by-line checklist | Tests passing |
|
|
52
|
+
|
|
53
|
+
## Red Flags - STOP
|
|
54
|
+
|
|
55
|
+
- Using "should", "probably", "seems to"
|
|
56
|
+
- Expressing satisfaction before verification ("Great!", "Perfect!", "Done!", etc.)
|
|
57
|
+
- About to commit/push/PR without verification
|
|
58
|
+
- Trusting agent success reports
|
|
59
|
+
- Relying on partial verification
|
|
60
|
+
- Thinking "just this once"
|
|
61
|
+
- Tired and wanting work over
|
|
62
|
+
- **ANY wording implying success without having run verification**
|
|
63
|
+
|
|
64
|
+
## Rationalization Prevention
|
|
65
|
+
|
|
66
|
+
| Excuse | Reality |
|
|
67
|
+
|--------|---------|
|
|
68
|
+
| "Should work now" | RUN the verification |
|
|
69
|
+
| "I'm confident" | Confidence ≠ evidence |
|
|
70
|
+
| "Just this once" | No exceptions |
|
|
71
|
+
| "Linter passed" | Linter ≠ compiler |
|
|
72
|
+
| "Agent said success" | Verify independently |
|
|
73
|
+
| "I'm tired" | Exhaustion ≠ excuse |
|
|
74
|
+
| "Partial check is enough" | Partial proves nothing |
|
|
75
|
+
| "Different words so rule doesn't apply" | Spirit over letter |
|
|
76
|
+
|
|
77
|
+
## Key Patterns
|
|
78
|
+
|
|
79
|
+
**Tests:**
|
|
80
|
+
```
|
|
81
|
+
✅ [Run test command] [See: 34/34 pass] "All tests pass"
|
|
82
|
+
❌ "Should pass now" / "Looks correct"
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**Regression tests (TDD Red-Green):**
|
|
86
|
+
```
|
|
87
|
+
✅ Write → Run (pass) → Revert fix → Run (MUST FAIL) → Restore → Run (pass)
|
|
88
|
+
❌ "I've written a regression test" (without red-green verification)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Build:**
|
|
92
|
+
```
|
|
93
|
+
✅ [Run build] [See: exit 0] "Build passes"
|
|
94
|
+
❌ "Linter passed" (linter doesn't check compilation)
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**Requirements:**
|
|
98
|
+
```
|
|
99
|
+
✅ Re-read plan → Create checklist → Verify each → Report gaps or completion
|
|
100
|
+
❌ "Tests pass, phase complete"
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**Agent delegation:**
|
|
104
|
+
```
|
|
105
|
+
✅ Agent reports success → Check VCS diff → Verify changes → Report actual state
|
|
106
|
+
❌ Trust agent report
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## When To Apply
|
|
110
|
+
|
|
111
|
+
**ALWAYS before:**
|
|
112
|
+
- ANY variation of success/completion claims
|
|
113
|
+
- ANY expression of satisfaction
|
|
114
|
+
- ANY positive statement about work state
|
|
115
|
+
- Committing, PR creation, task completion
|
|
116
|
+
- Moving to next task
|
|
117
|
+
- Delegating to agents
|
|
118
|
+
|
|
119
|
+
**Rule applies to:**
|
|
120
|
+
- Exact phrases
|
|
121
|
+
- Paraphrases and synonyms
|
|
122
|
+
- Implications of success
|
|
123
|
+
- ANY communication suggesting completion/correctness
|
|
@@ -1,29 +1,52 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: writing-plans
|
|
3
|
-
description:
|
|
4
|
-
category: engineering-method
|
|
3
|
+
description: Use when you have a spec or requirements for a multi-step task, before touching code
|
|
5
4
|
risk: critical
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
category: engineering-method
|
|
6
|
+
source: superpowers
|
|
7
|
+
date_added: "2026-09-25"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Writing Plans
|
|
11
11
|
|
|
12
12
|
## Overview
|
|
13
13
|
|
|
14
|
-
Write
|
|
15
|
-
|
|
16
|
-
Assume they are a skilled developer, but know almost nothing about our toolset or problem domain. Assume they don't know good test design very well.
|
|
14
|
+
Write implementation plans for an engineer who has not seen this codebase or this spec. Assume they write idiomatic code in the project's language once they know the exact interface and the exact test, and that they will make a reasonable choice wherever the plan leaves one open. What they cannot know is what you decided: which files, which names and signatures, which values from the spec, which tests prove each task. Document those. Give them the whole plan as bite-sized tasks. DRY. YAGNI. TDD. Frequent commits.
|
|
17
15
|
|
|
18
16
|
**Announce at start:** "I'm using the writing-plans skill to create the implementation plan."
|
|
19
17
|
|
|
20
|
-
**Context:**
|
|
18
|
+
**Context:** If working in an isolated worktree, it should have been created via the `using-git-worktrees` skill at execution time.
|
|
21
19
|
|
|
22
20
|
**Save plans to:** `docs/plans/YYYY-MM-DD-<feature-name>.md`
|
|
21
|
+
- (User preferences for plan location override this default)
|
|
22
|
+
|
|
23
|
+
## Scope Check
|
|
24
|
+
|
|
25
|
+
If the spec covers multiple independent subsystems, it should have been broken into sub-project specs during brainstorming. If it wasn't, suggest breaking this into separate plans — one per subsystem. Each plan should produce working, testable software on its own.
|
|
26
|
+
|
|
27
|
+
## File Structure
|
|
28
|
+
|
|
29
|
+
Before defining tasks, map out which files will be created or modified and what each one is responsible for. This is where decomposition decisions get locked in.
|
|
30
|
+
|
|
31
|
+
- Design units with clear boundaries and well-defined interfaces. Each file should have one clear responsibility.
|
|
32
|
+
- You reason best about code you can hold in context at once, and your edits are more reliable when files are focused. Prefer smaller, focused files over large ones that do too much.
|
|
33
|
+
- Files that change together should live together. Split by responsibility, not by technical layer.
|
|
34
|
+
- In existing codebases, follow established patterns. If the codebase uses large files, don't unilaterally restructure - but if a file you're modifying has grown unwieldy, including a split in the plan is reasonable.
|
|
23
35
|
|
|
24
|
-
|
|
36
|
+
This structure informs the task decomposition. Each task should produce self-contained changes that make sense independently.
|
|
25
37
|
|
|
26
|
-
|
|
38
|
+
## Task Right-Sizing
|
|
39
|
+
|
|
40
|
+
A task is the smallest unit that carries its own test cycle and is worth a
|
|
41
|
+
fresh reviewer's gate. When drawing task boundaries: fold setup,
|
|
42
|
+
configuration, scaffolding, and documentation steps into the task whose
|
|
43
|
+
deliverable needs them; split only where a reviewer could meaningfully
|
|
44
|
+
reject one task while approving its neighbor. Each task ends with an
|
|
45
|
+
independently testable deliverable.
|
|
46
|
+
|
|
47
|
+
## Step Granularity
|
|
48
|
+
|
|
49
|
+
**Each step is one action with a checkable result:**
|
|
27
50
|
- "Write the failing test" - step
|
|
28
51
|
- "Run it to make sure it fails" - step
|
|
29
52
|
- "Implement the minimal code to make the test pass" - step
|
|
@@ -37,7 +60,7 @@ Assume they are a skilled developer, but know almost nothing about our toolset o
|
|
|
37
60
|
```markdown
|
|
38
61
|
# [Feature Name] Implementation Plan
|
|
39
62
|
|
|
40
|
-
> **For
|
|
63
|
+
> **For agentic workers:** REQUIRED SUB-SKILL: Use subagent-driven-development (recommended) or executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
|
41
64
|
|
|
42
65
|
**Goal:** [One sentence describing what this builds]
|
|
43
66
|
|
|
@@ -45,12 +68,34 @@ Assume they are a skilled developer, but know almost nothing about our toolset o
|
|
|
45
68
|
|
|
46
69
|
**Tech Stack:** [Key technologies/libraries]
|
|
47
70
|
|
|
71
|
+
**Spec:** [path to the spec/design doc this plan implements — the plan
|
|
72
|
+
argues from the spec, so the spec travels with it; executors read both]
|
|
73
|
+
|
|
74
|
+
## Global Constraints
|
|
75
|
+
|
|
76
|
+
[The spec's project-wide requirements — version floors, dependency limits,
|
|
77
|
+
naming and copy rules, platform requirements — one line each, with exact
|
|
78
|
+
values copied verbatim from the spec. Every task's requirements implicitly
|
|
79
|
+
include this section.]
|
|
80
|
+
|
|
81
|
+
## Review Focus
|
|
82
|
+
|
|
83
|
+
[The five input classes or failure modes the spec implies but no task's
|
|
84
|
+
tests exercise that are most likely to bite a person using this software
|
|
85
|
+
— one line each, naming the input or condition and the behavior a
|
|
86
|
+
reasonable person would expect, most likely first. The spec is a vision
|
|
87
|
+
document: it says what the software must do, not everything it will
|
|
88
|
+
meet, and its silence on an input is not permission for that input to
|
|
89
|
+
break the program. Write the list here, once, with the spec in front of
|
|
90
|
+
you. Then, for each line, add the test that pins it to the task that
|
|
91
|
+
owns the code, in that task's own step style.]
|
|
92
|
+
|
|
48
93
|
---
|
|
49
94
|
```
|
|
50
95
|
|
|
51
96
|
## Task Structure
|
|
52
97
|
|
|
53
|
-
|
|
98
|
+
````markdown
|
|
54
99
|
### Task N: [Component Name]
|
|
55
100
|
|
|
56
101
|
**Files:**
|
|
@@ -58,7 +103,13 @@ Assume they are a skilled developer, but know almost nothing about our toolset o
|
|
|
58
103
|
- Modify: `exact/path/to/existing.py:123-145`
|
|
59
104
|
- Test: `tests/exact/path/to/test.py`
|
|
60
105
|
|
|
61
|
-
**
|
|
106
|
+
**Interfaces:**
|
|
107
|
+
- Consumes: [what this task uses from earlier tasks — exact signatures]
|
|
108
|
+
- Produces: [what later tasks rely on — exact function names, parameter
|
|
109
|
+
and return types. A task's implementer sees only their own task; this
|
|
110
|
+
block is how they learn the names and types neighboring tasks use.]
|
|
111
|
+
|
|
112
|
+
- [ ] **Step 1: Write the failing test**
|
|
62
113
|
|
|
63
114
|
```python
|
|
64
115
|
def test_specific_behavior():
|
|
@@ -66,63 +117,92 @@ def test_specific_behavior():
|
|
|
66
117
|
assert result == expected
|
|
67
118
|
```
|
|
68
119
|
|
|
69
|
-
**Step 2: Run test to verify it fails**
|
|
120
|
+
- [ ] **Step 2: Run test to verify it fails**
|
|
70
121
|
|
|
71
122
|
Run: `pytest tests/path/test.py::test_name -v`
|
|
72
123
|
Expected: FAIL with "function not defined"
|
|
73
124
|
|
|
74
|
-
**Step 3:
|
|
125
|
+
- [ ] **Step 3: Implement `function(input: InputType) -> ResultType` in `exact/path/to/file.py`**
|
|
75
126
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
```
|
|
127
|
+
One line on the approach when the signature and the test leave a choice
|
|
128
|
+
(which library call, which data structure); a code block only for an
|
|
129
|
+
algorithm they do not determine.
|
|
80
130
|
|
|
81
|
-
**Step 4: Run test to verify it passes**
|
|
131
|
+
- [ ] **Step 4: Run test to verify it passes**
|
|
82
132
|
|
|
83
133
|
Run: `pytest tests/path/test.py::test_name -v`
|
|
84
134
|
Expected: PASS
|
|
85
135
|
|
|
86
|
-
**Step 5: Commit**
|
|
136
|
+
- [ ] **Step 5: Commit**
|
|
87
137
|
|
|
88
138
|
```bash
|
|
89
139
|
git add tests/path/test.py src/path/file.py
|
|
90
140
|
git commit -m "feat: add specific feature"
|
|
91
141
|
```
|
|
92
|
-
|
|
142
|
+
````
|
|
143
|
+
|
|
144
|
+
## What a Step Contains
|
|
145
|
+
|
|
146
|
+
A step is done when the implementer can write exactly one reasonable thing
|
|
147
|
+
from it. That is the whole requirement: unambiguous, not complete. Each kind
|
|
148
|
+
of step carries what makes it unambiguous and nothing more:
|
|
149
|
+
|
|
150
|
+
- **A test step:** the test's name and its assertions, as code, with the
|
|
151
|
+
spec's exact values in them.
|
|
152
|
+
- **A code step:** the exact signature (name, parameters, return type), the
|
|
153
|
+
file it lives in, and the specific values the spec pins. The implementer
|
|
154
|
+
writes the body. A body appears only for an algorithm the signature and
|
|
155
|
+
tests do not determine, or for exact copy the spec fixes.
|
|
156
|
+
- **A verification step:** the command to run and the output that means it
|
|
157
|
+
passed.
|
|
158
|
+
- **A reference to another task:** that task's Interfaces block says what
|
|
159
|
+
to use; the plan does not repeat that task's code.
|
|
160
|
+
|
|
161
|
+
A plan is the set of decisions the implementer cannot make alone. A plan
|
|
162
|
+
longer than the code it describes has written the code instead. Lines that
|
|
163
|
+
decide nothing ("TBD", "handle edge cases", "add appropriate validation",
|
|
164
|
+
"write tests for the above", a type or function no task defines) are the
|
|
165
|
+
opposite failure, and the self-review catches both.
|
|
166
|
+
|
|
167
|
+
## Self-Review
|
|
168
|
+
|
|
169
|
+
After writing the complete plan, look at the spec with fresh eyes and check the plan against it. This is a checklist you run yourself — not a subagent dispatch.
|
|
170
|
+
|
|
171
|
+
**1. Spec coverage:** Skim each section/requirement in the spec. Can you point to a task that implements it? List any gaps.
|
|
172
|
+
|
|
173
|
+
**2. Step scan:** Every step must let the implementer write exactly one reasonable thing, and no step may carry more than that: a line that decides nothing is a gap, a function body the signature and tests already determine is a transcript. Fix both.
|
|
174
|
+
|
|
175
|
+
**3. Type consistency:** Do the types, method signatures, and property names you used in later tasks match what you defined in earlier tasks? A function called `clearLayers()` in Task 3 but `clearFullLayers()` in Task 7 is a bug.
|
|
176
|
+
|
|
177
|
+
**4. Review Focus:** For each input class or failure mode the spec implies, is there a task whose tests exercise it? The five uncovered ones most likely to bite a person go in the Review Focus section, and each line there gets its test added to the owning task. An empty section means you checked and found none, not that you skipped the check.
|
|
178
|
+
|
|
179
|
+
**5. Proportion:** Compare the plan's length to the spec's. A plan several times longer than the spec it implements is a transcript of the program, not a plan. If code blocks are most of the document, replace bodies with signatures, test names and assertions, and check that each step is still unambiguous.
|
|
93
180
|
|
|
94
|
-
|
|
95
|
-
- Exact file paths always
|
|
96
|
-
- Complete code in plan (not "add validation")
|
|
97
|
-
- Exact commands with expected output
|
|
98
|
-
- Reference relevant skills with @ syntax
|
|
99
|
-
- DRY, YAGNI, TDD, frequent commits
|
|
181
|
+
If you find issues, fix them inline. No need to re-review — just fix and move on. If you find a spec requirement with no task, add the task.
|
|
100
182
|
|
|
101
183
|
## Execution Handoff
|
|
102
184
|
|
|
103
|
-
After saving the plan,
|
|
185
|
+
After saving and self-reviewing the plan, you **MUST** open it in the Plan Canvas for the user to review. Do not ask them to read the markdown file in the terminal.
|
|
104
186
|
|
|
105
|
-
**
|
|
187
|
+
1. **Render Architecture:** If the plan contains complex flows, render them using `aos-archify` (see `archify` skill).
|
|
188
|
+
2. **Open Canvas:** Run `aos-plan-canvas open docs/plans/<filename>.md` (or `.html` if using archify).
|
|
189
|
+
3. **Await Feedback:** Run `aos-plan-canvas await docs/plans/<filename>.md` as a background task.
|
|
106
190
|
|
|
107
|
-
|
|
191
|
+
Tell the user:
|
|
192
|
+
**"Plan complete and saved! Ich habe den Plan im Canvas für dich geöffnet. Bitte schau ihn dir im Browser an und gib mir dort dein Feedback oder klicke auf Approve."**
|
|
108
193
|
|
|
109
|
-
|
|
194
|
+
*(If running in OpenCode, always explicitly print the Canvas URL in chat so the user can click it).*
|
|
110
195
|
|
|
111
|
-
|
|
196
|
+
Wait for the `approve` verdict from the Canvas before proceeding to execution.
|
|
112
197
|
|
|
113
|
-
**
|
|
114
|
-
- **REQUIRED SUB-SKILL:** Use superpowers:subagent-driven-development
|
|
115
|
-
- Stay in this session
|
|
116
|
-
- Fresh subagent per task + code review
|
|
198
|
+
**When the plan is approved, ask for the execution method (if not already supplied):**
|
|
117
199
|
|
|
118
|
-
**
|
|
119
|
-
-
|
|
120
|
-
- **
|
|
200
|
+
**"Welchen Ausführungsansatz sollen wir wählen?**
|
|
201
|
+
- **Subagent-driven** - Ein frischer Subagent für jede Aufgabe. (Am gründlichsten, aber teurer).
|
|
202
|
+
- **Native** - Ich implementiere alle Tasks selbst nacheinander in dieser Session. (Schneller, günstiger)."
|
|
121
203
|
|
|
122
|
-
|
|
123
|
-
|
|
204
|
+
**If Subagent-driven chosen:**
|
|
205
|
+
- **REQUIRED SUB-SKILL:** Use subagent-driven-development
|
|
124
206
|
|
|
125
|
-
|
|
126
|
-
-
|
|
127
|
-
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
|
|
128
|
-
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
|
|
207
|
+
**If Native chosen:**
|
|
208
|
+
- **REQUIRED SUB-SKILL:** Use executing-plans
|