configs-all 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/settings.local.json +3 -0
- package/CLAUDE.md +94 -0
- package/README.md +424 -0
- package/TERMINAL_SHORTCUTS.md +96 -0
- package/WINDOWS_COMPATIBILITY.md +85 -0
- package/WINDOWS_MCP_SETUP.md +133 -0
- package/apps/RectangleConfig.plist +0 -0
- package/apps/Synergy +84 -0
- package/apps/iStat Menus Settings.ismp7 +0 -0
- package/claude/CLAUDE.md +228 -0
- package/claude/commands/changelog.md +36 -0
- package/claude/commands/commit.md +29 -0
- package/claude/commands/context.md +112 -0
- package/claude/commands/dash.md +37 -0
- package/claude/commands/deploy-check.md +37 -0
- package/claude/commands/deps.md +26 -0
- package/claude/commands/duplo.md +56 -0
- package/claude/commands/explain.md +43 -0
- package/claude/commands/fix-and-test.md +46 -0
- package/claude/commands/game-debug.md +66 -0
- package/claude/commands/games.md +53 -0
- package/claude/commands/go.md +147 -0
- package/claude/commands/guard.md +102 -0
- package/claude/commands/handoff.md +66 -0
- package/claude/commands/incident.md +144 -0
- package/claude/commands/init.md +78 -0
- package/claude/commands/k8s-debug.md +31 -0
- package/claude/commands/lint.md +27 -0
- package/claude/commands/merge-all.md +115 -0
- package/claude/commands/merge.md +129 -0
- package/claude/commands/mikpc.md +54 -0
- package/claude/commands/morning.md +72 -0
- package/claude/commands/partymode.md +105 -0
- package/claude/commands/plans.md +88 -0
- package/claude/commands/pr.md +41 -0
- package/claude/commands/prep.md +132 -0
- package/claude/commands/push-sync.md +82 -0
- package/claude/commands/push.md +34 -0
- package/claude/commands/research.md +73 -0
- package/claude/commands/retro.md +95 -0
- package/claude/commands/review-pr.md +96 -0
- package/claude/commands/review.md +41 -0
- package/claude/commands/scaffold-agent.md +45 -0
- package/claude/commands/setup.md +92 -0
- package/claude/commands/ship-prod.md +97 -0
- package/claude/commands/ship.md +82 -0
- package/claude/commands/simplify.md +42 -0
- package/claude/commands/spike.md +110 -0
- package/claude/commands/status.md +37 -0
- package/claude/commands/sync.md +72 -0
- package/claude/commands/test.md +29 -0
- package/claude/commands/triage.md +72 -0
- package/claude/desktop/claude_desktop_config.json +9 -0
- package/claude/hooks.json +15 -0
- package/claude/mcp-servers.duplo.json +8 -0
- package/claude/mcp-servers.json +62 -0
- package/claude/scripts/psdebug.ps1 +7 -0
- package/claude/settings.json +38 -0
- package/claude/settings.local.json +4 -0
- package/claude/statusline-command.sh +94 -0
- package/claude/templates/CLAUDE-k8s-devops.md +58 -0
- package/claude/templates/CLAUDE-python-agent.md +47 -0
- package/claude/templates/CLAUDE-typescript-frontend.md +50 -0
- package/docker/ai-stack/docker-compose.yml +76 -0
- package/docker/ai-stack/searxng/limiter.toml +3 -0
- package/docker/ai-stack/searxng/settings.yml +39 -0
- package/docker/cli/config.json.template +15 -0
- package/docker/cli/daemon.json +9 -0
- package/docker/cli/features.json +3 -0
- package/docker/mcp/catalog.json +9 -0
- package/docker/mcp/catalogs/docker-mcp.yaml +15107 -0
- package/docker/mcp/config.yaml +0 -0
- package/docker/mcp/registry.yaml +37 -0
- package/docker/mcp/tools.yaml +0 -0
- package/docs/context/.gitkeep +0 -0
- package/docs/context/2026-03-02-configs.md +142 -0
- package/docs/handoff/.gitkeep +0 -0
- package/docs/incidents/.gitkeep +0 -0
- package/docs/plans/2026-02-28-autonomous-command-suite-design.md +250 -0
- package/docs/plans/2026-02-28-autonomous-command-suite.md +682 -0
- package/docs/plans/2026-03-01-ai-stack-split-architecture.md +72 -0
- package/docs/plans/2026-03-02-ai-stack-expansion.md +33 -0
- package/docs/plans/2026-03-02-merge-commands-design.md +58 -0
- package/docs/plans/2026-03-02-merge-commands.md +354 -0
- package/docs/research/.gitkeep +0 -0
- package/docs/research/2026-03-02-configs-repo-architecture.md +152 -0
- package/docs/retros/.gitkeep +0 -0
- package/docs/retros/2026-03-01-ai-stack-split-architecture.md +38 -0
- package/docs/spikes/.gitkeep +0 -0
- package/gh/config.yml +16 -0
- package/gh/hosts.yml +5 -0
- package/gh/main.json +103 -0
- package/ghostty/config +90 -0
- package/git/config/base.gitconfig +46 -0
- package/git/config/chiefmikey.gitconfig +11 -0
- package/git/config/personal.gitconfig +10 -0
- package/git/config/work.gitconfig +14 -0
- package/ide/cursor/extensions.txt +111 -0
- package/ide/cursor/keybindings.json +307 -0
- package/ide/cursor/mcp.json +92 -0
- package/ide/cursor/settings.json +544 -0
- package/ide/vscode/extensions.txt +120 -0
- package/ide/vscode/insiders/extensions.txt +119 -0
- package/ide/vscode/insiders/keybindings.json +294 -0
- package/ide/vscode/insiders/settings.json +518 -0
- package/ide/vscode/keybindings.json +294 -0
- package/ide/vscode/settings.json +526 -0
- package/ide/vscode/vscode/extensions.txt +43 -0
- package/iterm/Mikey Pro.json +951 -0
- package/iterm/com.googlecode.iterm2.plist +5549 -0
- package/iterm/font/MesloLGS NF Bold Italic.ttf +0 -0
- package/iterm/font/MesloLGS NF Bold.ttf +0 -0
- package/iterm/font/MesloLGS NF Italic.ttf +0 -0
- package/iterm/font/MesloLGS NF Regular.ttf +0 -0
- package/package.json +15 -0
- package/scripts/ai/deploy-ai-stack.sh +119 -0
- package/scripts/ai/fix-ai-proxy.service +12 -0
- package/scripts/ai/fix-ai-proxy.sh +25 -0
- package/scripts/brew/search/brew-search-results.sh +19 -0
- package/scripts/brew/search/brew-search.sh +34 -0
- package/scripts/brew/upgrade/brew-upgrade-autoupdate.sh +5 -0
- package/scripts/brew/upgrade/brew-upgrade-full-auto.sh +89 -0
- package/scripts/brew/upgrade/brew-upgrade-full.sh +159 -0
- package/scripts/docker/cleanup/docker-cleanup-manage.sh +163 -0
- package/scripts/docker/cleanup/docker-cleanup.cron +12 -0
- package/scripts/docker/cleanup/docker-cleanup.sh +280 -0
- package/scripts/docker/install/README.md +23 -0
- package/scripts/docker/install/docker-al2.sh +7 -0
- package/scripts/docker/install/docker-compose-al2.sh +15 -0
- package/scripts/gh/auth/auth.sh +12 -0
- package/scripts/gh/config/gh-config.sh +3 -0
- package/scripts/gh/gist/gh-gist-create.sh +29 -0
- package/scripts/gh/gist/gh-gist-delete.sh +1 -0
- package/scripts/gh/gist/gh-gist-edit.sh +8 -0
- package/scripts/gh/gpg-key/gh-gpg-key-add.sh +3 -0
- package/scripts/gh/install/install.sh +7 -0
- package/scripts/gh/label/gh-label-clone.sh +0 -0
- package/scripts/gh/label/gh-label-create.sh +0 -0
- package/scripts/gh/label/gh-label-delete.sh +0 -0
- package/scripts/gh/label/gh-label-edit.sh +0 -0
- package/scripts/gh/label/gh-label-list.sh +0 -0
- package/scripts/gh/secret/gh-secret-delete.sh +24 -0
- package/scripts/gh/secret/gh-secret-set.sh +70 -0
- package/scripts/gh/ssh-key/gh-ssh-key-add.sh +8 -0
- package/scripts/git/add/git-add.sh +3 -0
- package/scripts/git/auth/README.md +11 -0
- package/scripts/git/auth/https.sh +20 -0
- package/scripts/git/auth/ssh-mac.sh +41 -0
- package/scripts/git/branch-delete/git-branch-delete.sh +16 -0
- package/scripts/git/checkout/git-checkout-stash.sh +32 -0
- package/scripts/git/temp/git-temp-pull.sh +6 -0
- package/scripts/git/temp/git-temp-push.sh +5 -0
- package/scripts/install/fresh.zsh +34 -0
- package/scripts/install/full-install.zsh +193 -0
- package/scripts/linux/codedeploy/README.md +19 -0
- package/scripts/linux/codedeploy/linux-codedeploy-al2.sh +13 -0
- package/scripts/linux/codedeploy/linux-codedeploy-index.sh +16 -0
- package/scripts/linux/codedeploy/linux-codedeploy-ubuntu.sh +14 -0
- package/scripts/linux/coredns/README.md +17 -0
- package/scripts/linux/coredns/linux-coredns-al2.sh +29 -0
- package/scripts/linux/wifi/01-netconf.yaml +21 -0
- package/scripts/linux/wifi/wifi-ubuntu.sh +17 -0
- package/scripts/mac/dock-sort/mac-dock-sort.sh +87 -0
- package/scripts/mac/dropbox-ignore/mac-dropbox-ignore.sh +12 -0
- package/scripts/mac/sudo-askpass/mac-sudo-askpass.sh +50 -0
- package/scripts/mac/sudo-askpass/setup-sudo-password.sh +49 -0
- package/scripts/mac/upgrade/mac-upgrade.sh +21 -0
- package/scripts/mac/vpn/mac-vpn.sh +4 -0
- package/scripts/mcp/aws-mcp-wrapper.ps1 +97 -0
- package/scripts/mcp/aws-mcp-wrapper.sh +53 -0
- package/scripts/mcp/duplo-mcp-wrapper.sh +31 -0
- package/scripts/mcp/filesystem-mcp-wrapper.ps1 +43 -0
- package/scripts/mcp/filesystem-mcp-wrapper.sh +34 -0
- package/scripts/mcp/git-mcp-wrapper.ps1 +42 -0
- package/scripts/mcp/git-mcp-wrapper.sh +33 -0
- package/scripts/mcp/github-mcp-wrapper.ps1 +43 -0
- package/scripts/mcp/github-mcp-wrapper.sh +19 -0
- package/scripts/mcp/kubernetes-mcp-wrapper.ps1 +22 -0
- package/scripts/mcp/kubernetes-mcp-wrapper.sh +16 -0
- package/scripts/mcp/mcp-launcher.ps1 +56 -0
- package/scripts/mcp/mcp-launcher.sh +71 -0
- package/scripts/mcp/mongodb-mcp-wrapper.ps1 +26 -0
- package/scripts/mcp/mongodb-mcp-wrapper.sh +17 -0
- package/scripts/mcp/notion-mcp-wrapper.ps1 +23 -0
- package/scripts/mcp/notion-mcp-wrapper.sh +14 -0
- package/scripts/mcp/postgres-mcp-wrapper.ps1 +23 -0
- package/scripts/mcp/postgres-mcp-wrapper.sh +16 -0
- package/scripts/npm/ncu/npm-ncu.sh +24 -0
- package/scripts/npm/upgrade/npm-upgrade.sh +51 -0
- package/scripts/qmk/build_reviung41.sh +28 -0
- package/scripts/qmk/sync_unicorne.sh +44 -0
- package/scripts/sync/README.md +64 -0
- package/scripts/sync/config-common.zsh +882 -0
- package/scripts/sync/pull-configs.ps1 +33 -0
- package/scripts/sync/pull-configs.zsh +278 -0
- package/scripts/sync/push-configs.ps1 +91 -0
- package/scripts/sync/push-configs.zsh +384 -0
- package/shell/alias/alias-d.zsh +333 -0
- package/shell/alias/alias.zsh +36 -0
- package/shell/alias/categories/development.zsh +157 -0
- package/shell/alias/categories/environment.zsh +13 -0
- package/shell/alias/categories/git.zsh +40 -0
- package/shell/alias/categories/github-functions.zsh +459 -0
- package/shell/alias/categories/network.zsh +46 -0
- package/shell/alias/categories/path.zsh +46 -0
- package/shell/alias/categories/system.zsh +78 -0
- package/shell/alias/categories/wolfe-server.zsh +11 -0
- package/shell/powershell/Microsoft.PowerShell_profile.ps1 +208 -0
- package/shell/zsh/.p10k.zsh +1832 -0
- package/shell/zsh/.zshrc +87 -0
- package/shell/zsh/config/completion.zsh +31 -0
- package/shell/zsh/config/functions.zsh +31 -0
- package/shell/zsh/config/keybindings.zsh +13 -0
- package/shell/zsh/config/options.zsh +56 -0
- package/shell/zsh/config/plugins.zsh +83 -0
- package/shell/zsh/config/variables.zsh +191 -0
- package/shell/zsh/powerlevel10k.zsh-theme +83 -0
- package/shell/zsh/zsh-autosuggestions.zsh +871 -0
- package/ssh/config +46 -0
- package/ssh/config.duplo +21 -0
- package/ssh/config.mikpc +35 -0
- package/ssh/personal_signing.pub +1 -0
- package/templates/.envrc.example +34 -0
- package/templates/.envrc.quickstart +17 -0
- package/wezterm/wezterm.lua +249 -0
- package/wsl/.wslconfig +3 -0
- package/wsl/wsl.conf +18 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
## Merge PR — Review, Fix & Merge
|
|
2
|
+
|
|
3
|
+
Autonomously review a PR, fix any issues found, and merge it. Combines deep code review with autonomous fix capability. Will not merge until 100% confident the PR is clean.
|
|
4
|
+
|
|
5
|
+
### Input
|
|
6
|
+
$ARGUMENTS - PR number, URL, or branch name. If omitted, finds PR for current branch, or the most recent open PR in the repo.
|
|
7
|
+
|
|
8
|
+
### Instructions
|
|
9
|
+
|
|
10
|
+
**Before delegating, gather project context:**
|
|
11
|
+
1. Read `docs/context/` for the most recent context snapshot — extract Architecture, Conventions, Testing, and Gotchas sections
|
|
12
|
+
2. Read the project CLAUDE.md if it exists — extract Conventions and Common Mistakes sections
|
|
13
|
+
3. Read `docs/incidents/` for recent incidents — are any related to the files being changed?
|
|
14
|
+
4. Read `docs/spikes/` for recent spikes — is this PR implementing a spiked approach?
|
|
15
|
+
|
|
16
|
+
**Then delegate this task to a subagent using the Agent tool with `model: "sonnet"` and `subagent_type: "general-purpose"`.** Pass the full prompt below (with context injected) to the subagent and relay its result.
|
|
17
|
+
|
|
18
|
+
### Subagent prompt
|
|
19
|
+
|
|
20
|
+
You are an autonomous PR reviewer and fixer. Your job is to review PR `$ARGUMENTS`, fix any issues you find, and merge it — but ONLY when you are 100% confident it is clean.
|
|
21
|
+
|
|
22
|
+
**Project Context:**
|
|
23
|
+
[Inject Architecture, Conventions, Testing, Gotchas from docs/context if available]
|
|
24
|
+
[Inject Conventions, Common Mistakes from project CLAUDE.md if available]
|
|
25
|
+
[Inject any related incidents or spikes if relevant]
|
|
26
|
+
If no project context is available, review against general best practices and note that project context was unavailable.
|
|
27
|
+
|
|
28
|
+
#### Phase 1: Load the PR
|
|
29
|
+
|
|
30
|
+
1. **Resolve the PR:**
|
|
31
|
+
- If `$ARGUMENTS` is a number or URL, use it directly
|
|
32
|
+
- If `$ARGUMENTS` is a branch name: `gh pr list --head $ARGUMENTS --json number --jq '.[0].number'`
|
|
33
|
+
- If `$ARGUMENTS` is empty:
|
|
34
|
+
- Try current branch: `gh pr list --head $(git branch --show-current) --json number --jq '.[0].number'`
|
|
35
|
+
- If no result: latest open PR: `gh pr list --state open --limit 1 --json number --jq '.[0].number'`
|
|
36
|
+
- If no PR found, stop: "No open PR found. Create one first with `/pr`."
|
|
37
|
+
|
|
38
|
+
2. **Fetch PR details:**
|
|
39
|
+
```bash
|
|
40
|
+
gh pr view $PR_NUMBER --json title,body,author,baseRefName,headRefName,additions,deletions,commits,reviewDecision
|
|
41
|
+
gh pr diff $PR_NUMBER
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
#### Phase 2: Review and Fix Loop (max 3 iterations)
|
|
45
|
+
|
|
46
|
+
For each iteration:
|
|
47
|
+
|
|
48
|
+
3. **Deep review** — read all changed files in full context (not just the diff):
|
|
49
|
+
- Read each modified file completely
|
|
50
|
+
- Check how changed functions/classes are used elsewhere
|
|
51
|
+
- Check if tests exist for the changed code
|
|
52
|
+
|
|
53
|
+
4. **Review every change for:**
|
|
54
|
+
- **Correctness:** Logic errors, off-by-one, null/undefined, race conditions
|
|
55
|
+
- **Security:** Hardcoded secrets, injection vulnerabilities, XSS, OWASP top 10
|
|
56
|
+
- **Types:** Missing types, incorrect types, unsafe `any` (TypeScript)
|
|
57
|
+
- **Error handling:** Unhandled rejections, missing try/catch, bare exceptions
|
|
58
|
+
- **Project conventions:** Does the code follow established patterns? (Use project context)
|
|
59
|
+
- **Testing:** Are new features tested? Edge cases covered?
|
|
60
|
+
- **Performance:** N+1 queries, unnecessary re-renders, unbounded loops
|
|
61
|
+
- **Breaking changes:** API contracts, migrations, backwards compatibility
|
|
62
|
+
|
|
63
|
+
5. **Check for anti-patterns:**
|
|
64
|
+
- Files that shouldn't be committed (`.env`, `node_modules`, build artifacts)
|
|
65
|
+
- Tests that test implementation instead of behavior
|
|
66
|
+
- Missing or inadequate PR description
|
|
67
|
+
|
|
68
|
+
6. **If issues found — fix them:**
|
|
69
|
+
- Check out the PR branch: `gh pr checkout $PR_NUMBER`
|
|
70
|
+
- Fix all identified issues in the code
|
|
71
|
+
- Run the test suite to verify fixes don't break anything
|
|
72
|
+
- Run linter to verify code style
|
|
73
|
+
- Stage and commit fixes:
|
|
74
|
+
```bash
|
|
75
|
+
git add <fixed files>
|
|
76
|
+
git commit -m "fix: address review feedback — <brief description>"
|
|
77
|
+
```
|
|
78
|
+
- Push to the PR branch: `git push`
|
|
79
|
+
- **Loop back to step 3** for re-review (track iteration count)
|
|
80
|
+
|
|
81
|
+
7. **If no issues found — proceed to Phase 3**
|
|
82
|
+
|
|
83
|
+
#### Phase 3: Pre-Merge Verification
|
|
84
|
+
|
|
85
|
+
8. **Run all checks in parallel:**
|
|
86
|
+
- `gh pr checks $PR_NUMBER` — all CI checks must be passing (wait up to 5 minutes for in-progress checks)
|
|
87
|
+
- Run full test suite locally — all must pass
|
|
88
|
+
- Run linter — zero errors
|
|
89
|
+
- Run build if applicable — must succeed
|
|
90
|
+
|
|
91
|
+
9. **Confidence gate:**
|
|
92
|
+
- If ANY concern remains: **stop and report**. Do NOT merge.
|
|
93
|
+
- Only proceed if 100% confident this is merge-ready.
|
|
94
|
+
- Document what was checked and what gives confidence.
|
|
95
|
+
|
|
96
|
+
10. **Check for merge blockers:**
|
|
97
|
+
- `gh pr view $PR_NUMBER --json reviewDecision,mergeStateStatus`
|
|
98
|
+
- If branch protection requires reviews from others, report: "This PR requires human review approval before it can be merged."
|
|
99
|
+
- If merge is blocked for any other reason, report the blocker and stop.
|
|
100
|
+
|
|
101
|
+
#### Phase 4: Merge
|
|
102
|
+
|
|
103
|
+
11. **Merge the PR:**
|
|
104
|
+
```bash
|
|
105
|
+
gh pr merge $PR_NUMBER --merge --delete-branch
|
|
106
|
+
```
|
|
107
|
+
- Verify: `gh pr view $PR_NUMBER --json state --jq '.state'` should return "MERGED"
|
|
108
|
+
|
|
109
|
+
12. **Report:**
|
|
110
|
+
```
|
|
111
|
+
## Merge Report
|
|
112
|
+
- **PR:** #<number> — <title>
|
|
113
|
+
- **URL:** <pr_url>
|
|
114
|
+
- **Review iterations:** <count> (0 = clean on first review)
|
|
115
|
+
- **Fixes applied:** <list of fix commits, or "None">
|
|
116
|
+
- **CI checks:** all passing
|
|
117
|
+
- **Merge method:** merge (full history preserved)
|
|
118
|
+
- **Branch:** <branch> deleted
|
|
119
|
+
- **Status:** Successfully merged
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Critical Rules
|
|
123
|
+
|
|
124
|
+
- **NEVER merge with failing CI checks.**
|
|
125
|
+
- **NEVER skip the deep review.** Read every changed file in full.
|
|
126
|
+
- **NEVER proceed past the confidence gate with concerns.**
|
|
127
|
+
- **Max 3 fix iterations.** If still not clean after 3 rounds, stop and report remaining issues.
|
|
128
|
+
- **If in doubt, stop and report.** A delayed merge is always better than merging bad code.
|
|
129
|
+
- **NEVER use --squash or --rebase.** Always use --merge to preserve full git history.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
## Remote Work on mikpc (Windows PC via WSL)
|
|
2
|
+
|
|
3
|
+
Execute tasks on mikpc remotely over SSH from the current machine.
|
|
4
|
+
|
|
5
|
+
### Input
|
|
6
|
+
$ARGUMENTS - what to do on the PC (e.g., "install htop", "check disk space", "update configs", "run claude doctor")
|
|
7
|
+
|
|
8
|
+
### Connection
|
|
9
|
+
- **SSH host**: `mikpc` (Tailscale: 100.89.204.71) or `mikpc-local` (LAN: 192.168.0.5)
|
|
10
|
+
- **User**: `wolfe`
|
|
11
|
+
- **Environment**: WSL2 Ubuntu 24.04, zsh, Node.js 22
|
|
12
|
+
- **Shell**: Commands run via `ssh mikpc "<command>"` land in bash by default. For zsh features, prefix with `zsh -lc '...'`
|
|
13
|
+
|
|
14
|
+
### Key Paths on PC
|
|
15
|
+
- **Home**: `/home/wolfe`
|
|
16
|
+
- **Dropbox**: `~/Dropbox` (symlink to `/mnt/c/Users/wolfe/Dropbox`)
|
|
17
|
+
- **Configs repo**: `~/Dropbox/mikpc/dev/configs`
|
|
18
|
+
- **Claude config**: `~/.claude/`
|
|
19
|
+
- **SSH keys**: `~/.ssh/id_ed25519` (native WSL key, not 1Password)
|
|
20
|
+
|
|
21
|
+
### Environment Notes
|
|
22
|
+
- Git is configured with `user.name=chiefmikey`, SSH signing is disabled (uses native key)
|
|
23
|
+
- Passwordless sudo is configured for wolfe
|
|
24
|
+
- NTFS-mounted paths (under `/mnt/c/`) have uid/gid 1001 mapped
|
|
25
|
+
- Config backups route to `~/.config/config-backups` (not NTFS Dropbox path)
|
|
26
|
+
- Claude Code v2.1.58+ with superpowers plugin installed
|
|
27
|
+
|
|
28
|
+
### Config Sync
|
|
29
|
+
The PC has its own git clone of the configs repo at `~/Dropbox/mikpc/dev/configs`. Dropbox sync is unreliable, so always sync via git:
|
|
30
|
+
1. **Before PC work**: Commit and push any local changes from this machine first
|
|
31
|
+
2. **Pull on PC**: `ssh mikpc "cd ~/Dropbox/mikpc/dev/configs && git pull origin main"`
|
|
32
|
+
3. **Deploy**: `ssh mikpc "cd ~/Dropbox/mikpc/dev/configs && zsh scripts/sync/push-configs.zsh"`
|
|
33
|
+
4. **Push Claude commands manually** if push-configs exits early: `ssh mikpc 'bash -c "cp ~/Dropbox/mikpc/dev/configs/claude/commands/*.md ~/.claude/commands/"'`
|
|
34
|
+
|
|
35
|
+
Always sync configs at the start of a session if any config files have been modified locally.
|
|
36
|
+
|
|
37
|
+
### Execution Rules
|
|
38
|
+
1. Use `ssh mikpc` for all commands. Fall back to `ssh mikpc-local` only if Tailscale is unreachable.
|
|
39
|
+
2. For multi-command workflows, chain with `&&` or use a heredoc:
|
|
40
|
+
```
|
|
41
|
+
ssh mikpc bash -s <<'REMOTE'
|
|
42
|
+
command1
|
|
43
|
+
command2
|
|
44
|
+
REMOTE
|
|
45
|
+
```
|
|
46
|
+
3. For interactive tools (like running claude), warn the user that SSH pseudo-terminal allocation may be needed (`ssh -t mikpc`).
|
|
47
|
+
4. Always show command output to the user so they can see what happened.
|
|
48
|
+
5. Do the work - don't just explain what to do. Execute the commands remotely.
|
|
49
|
+
|
|
50
|
+
### Steps
|
|
51
|
+
1. If config files were changed locally, commit and push first, then pull and push-configs on PC
|
|
52
|
+
2. Parse what the user wants done on the PC from $ARGUMENTS
|
|
53
|
+
3. Connect via SSH and execute the task
|
|
54
|
+
4. Report results
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
## Daily Briefing
|
|
2
|
+
|
|
3
|
+
**IMPORTANT: Immediately delegate this entire task to a subagent using the Agent tool with `model: "sonnet"` and `subagent_type: "general-purpose"`.** Do not perform operations yourself. Pass the full prompt below to the subagent and relay its result.
|
|
4
|
+
|
|
5
|
+
### Subagent prompt
|
|
6
|
+
|
|
7
|
+
You are generating a morning briefing — a complete situational awareness snapshot so the user knows exactly what needs attention today. Run all independent checks in parallel.
|
|
8
|
+
|
|
9
|
+
1. **Git state across the current repo:**
|
|
10
|
+
- `git status` — any uncommitted work?
|
|
11
|
+
- `git log --oneline -15 --since="yesterday"` — what changed since yesterday?
|
|
12
|
+
- `git branch -a --sort=-committerdate | head -10` — active branches
|
|
13
|
+
- `git stash list` — any stashed work?
|
|
14
|
+
|
|
15
|
+
2. **Documentation state:**
|
|
16
|
+
- Check `docs/handoff/` — read the most recent handoff doc (this is the #1 priority for context)
|
|
17
|
+
- Check `docs/plans/` — any plans with `_Status: IN PROGRESS_` or `_Status: PENDING_`?
|
|
18
|
+
- Check `docs/spikes/` — any spikes `_Status: IN PROGRESS_`? Any recent completed spikes with action items?
|
|
19
|
+
- Check `docs/incidents/` — any incidents `_Status: ACTIVE_` or `_Status: MITIGATED_`? These are P1 priority.
|
|
20
|
+
- Check `docs/context/` — when was context last updated? Is it stale?
|
|
21
|
+
- Check `docs/research/` — any Open Questions from recent research?
|
|
22
|
+
|
|
23
|
+
3. **GitHub state** (if `gh` CLI is available):
|
|
24
|
+
- `gh pr list --author @me` — your open PRs and their CI status
|
|
25
|
+
- `gh pr list --search "review-requested:@me"` — PRs waiting for your review
|
|
26
|
+
- `gh issue list --assignee @me --limit 10` — issues assigned to you
|
|
27
|
+
- Check CI status on open PRs: `gh pr checks` for each
|
|
28
|
+
|
|
29
|
+
4. **Code health:**
|
|
30
|
+
- Check if tests pass (run the test command from project CLAUDE.md or docs/context if available — but use a timeout, don't block on slow suites)
|
|
31
|
+
- Check for lint errors (quick lint check)
|
|
32
|
+
- Check for build errors (quick build check)
|
|
33
|
+
|
|
34
|
+
5. **Format the briefing:**
|
|
35
|
+
|
|
36
|
+
```markdown
|
|
37
|
+
# Morning Briefing — YYYY-MM-DD
|
|
38
|
+
|
|
39
|
+
## Handoff from Last Session
|
|
40
|
+
[Summary from docs/handoff/ if exists — what was being worked on, what's next]
|
|
41
|
+
|
|
42
|
+
## Active Incidents
|
|
43
|
+
[Any ACTIVE or MITIGATED incidents — these are top priority]
|
|
44
|
+
|
|
45
|
+
## Pending Plans
|
|
46
|
+
[List any IN PROGRESS or PENDING plans with step counts and progress]
|
|
47
|
+
|
|
48
|
+
## In-Progress Spikes
|
|
49
|
+
[Any spikes still under investigation]
|
|
50
|
+
|
|
51
|
+
## Open PRs
|
|
52
|
+
[Your PRs with CI status — which need attention?]
|
|
53
|
+
|
|
54
|
+
## Review Requests
|
|
55
|
+
[PRs waiting for your review]
|
|
56
|
+
|
|
57
|
+
## Issues
|
|
58
|
+
[Assigned issues, prioritized]
|
|
59
|
+
|
|
60
|
+
## Code Health
|
|
61
|
+
- Tests: [passing/failing/not run]
|
|
62
|
+
- Lint: [clean/errors]
|
|
63
|
+
- Build: [passing/failing]
|
|
64
|
+
|
|
65
|
+
## Recommended Priority
|
|
66
|
+
Based on all of the above, here's what I'd tackle first:
|
|
67
|
+
1. [Most important — with reasoning]
|
|
68
|
+
2. [Second priority]
|
|
69
|
+
3. [Third priority]
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
6. Keep it concise — this is a 60-second read, not a report. Flag what needs attention, skip what's fine.
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
## Full Autopilot — Prep and Execute
|
|
2
|
+
|
|
3
|
+
The complete autonomous pipeline. Researches the codebase, builds context, creates an implementation plan, gets one approval, then executes to 100% verified completion.
|
|
4
|
+
|
|
5
|
+
Give it a task and walk away. Come back to done. Or give it nothing — it will determine the highest priority task and do that.
|
|
6
|
+
|
|
7
|
+
### Input
|
|
8
|
+
$ARGUMENTS - optional task description (e.g., "add dark mode support", "refactor authentication to use JWT"). If omitted, autonomously determines the next highest priority task.
|
|
9
|
+
|
|
10
|
+
### Instructions
|
|
11
|
+
|
|
12
|
+
#### Phase 0: Project CLAUDE.md Setup
|
|
13
|
+
|
|
14
|
+
0. **Ensure the project has a CLAUDE.md** (same as `/init` Phase 1):
|
|
15
|
+
|
|
16
|
+
a. **Check for existing CLAUDE.md** in the project root.
|
|
17
|
+
|
|
18
|
+
b. **If none exists — generate fresh:**
|
|
19
|
+
- Detect tech stack, project structure, commands, conventions, testing setup
|
|
20
|
+
- Write `./CLAUDE.md` with real values — no placeholders, no generic content
|
|
21
|
+
- Sections: Project Overview, Tech Stack, Architecture, Commands, Conventions, Common Mistakes, Testing
|
|
22
|
+
- Keep it under 80 lines. Don't duplicate global `~/CLAUDE.md` instructions.
|
|
23
|
+
|
|
24
|
+
c. **If one exists — validate and fortify:**
|
|
25
|
+
- Detect the current tech stack, project structure, commands, and conventions
|
|
26
|
+
- Compare each section against current codebase reality
|
|
27
|
+
- Fix stale information, add missing sections, strengthen weak sections
|
|
28
|
+
- Preserve user-added content and customizations — never destructively rewrite
|
|
29
|
+
|
|
30
|
+
#### Phase 1: Preparation
|
|
31
|
+
|
|
32
|
+
1. **Run the full `/prep` pipeline:**
|
|
33
|
+
|
|
34
|
+
a. **Research** — deep codebase exploration scoped to the task:
|
|
35
|
+
- Read ALL existing `docs/research/`, `docs/context/`, `docs/plans/`, `docs/spikes/`, `docs/incidents/`, `docs/handoff/`, and project CLAUDE.md
|
|
36
|
+
- Verify findings against actual code (never trust docs blindly — check git log since doc dates, verify key claims)
|
|
37
|
+
- If docs are stale, update them immediately
|
|
38
|
+
- Write/update `docs/research/YYYY-MM-DD-<topic>.md`
|
|
39
|
+
|
|
40
|
+
b. **Context** — validate and update the repo knowledge snapshot:
|
|
41
|
+
- Read existing context docs, verify against current state
|
|
42
|
+
- Update stale sections, add task-specific context
|
|
43
|
+
- Write/update `docs/context/YYYY-MM-DD-<repo-name>.md`
|
|
44
|
+
|
|
45
|
+
c. **Plan** — generate implementation plan with all decisions documented:
|
|
46
|
+
- **If no task was provided — determine the next priority:**
|
|
47
|
+
- Check `docs/incidents/` for active incidents (`_Status: ACTIVE_` or `_Status: MITIGATED_`) — these are P1, handle first
|
|
48
|
+
- Check `docs/plans/` for incomplete plans (`_Status: IN PROGRESS_`) — resume where you left off
|
|
49
|
+
- Check `docs/spikes/` for in-progress spikes (`_Status: IN PROGRESS_`) — finish what was started
|
|
50
|
+
- Check `docs/plans/` for pending plans (`_Status: PENDING_`) — execute the oldest one
|
|
51
|
+
- Check `docs/handoff/` for the most recent handoff — what was the next recommended task?
|
|
52
|
+
- Check for open TODOs, FIXMEs, or `// TODO` comments in the codebase
|
|
53
|
+
- Check git log for recent patterns — what's actively being worked on?
|
|
54
|
+
- Check for failing tests, lint errors, or build issues
|
|
55
|
+
- Check for open GitHub issues if `gh` CLI is available: `gh issue list --limit 10`
|
|
56
|
+
- Check `docs/research/` for Open Questions that could be addressed
|
|
57
|
+
- Check `docs/spikes/` for completed spikes with pending Next Steps
|
|
58
|
+
- Evaluate: what is the highest-impact task that would move this project forward?
|
|
59
|
+
- Choose one task, state what you chose and why, then proceed
|
|
60
|
+
- **If a task was provided,** use it directly
|
|
61
|
+
- Full benefit of freshly verified research + context
|
|
62
|
+
- All decisions autonomous with documented rationale
|
|
63
|
+
- Write `docs/plans/YYYY-MM-DD-<task-slug>.md` with:
|
|
64
|
+
- `_Status: PENDING_`, `_LastCompletedStep: 0_`, `_TotalSteps: N_`
|
|
65
|
+
- Steps, Verification Plan, Risks, Execution Journal (empty)
|
|
66
|
+
- Each step: 2-5 minutes, exact file paths, complete code, verify commands
|
|
67
|
+
|
|
68
|
+
#### Phase 2: Execution (NO CHECKPOINT — full autopilot means no stopping)
|
|
69
|
+
|
|
70
|
+
2. **Execute the plan using the `/go` process:**
|
|
71
|
+
|
|
72
|
+
a. Mark plan `_Status: IN PROGRESS_`
|
|
73
|
+
|
|
74
|
+
b. For each step (respecting `_LastCompletedStep_` for resume):
|
|
75
|
+
- Dispatch implementer subagent with step details + full context
|
|
76
|
+
- If Execution Journal has prior failures for this step, include that context
|
|
77
|
+
- Dispatch spec compliance reviewer — does implementation match plan?
|
|
78
|
+
- Dispatch code quality reviewer — patterns, architecture, conventions
|
|
79
|
+
- Fix any issues before moving to next step
|
|
80
|
+
- Verify independently — run the step's verify command
|
|
81
|
+
- Update `_LastCompletedStep_` and append to Execution Journal after each step
|
|
82
|
+
|
|
83
|
+
3. **Full verification after all steps:**
|
|
84
|
+
- Complete test suite (all must pass)
|
|
85
|
+
- Linter/formatter (zero errors)
|
|
86
|
+
- Build (must succeed)
|
|
87
|
+
- Browser testing if frontend (playwright/chrome MCP)
|
|
88
|
+
- API testing if backend
|
|
89
|
+
- Infrastructure dry-run if DevOps
|
|
90
|
+
- All edge cases and manual checks from the Verification Plan
|
|
91
|
+
|
|
92
|
+
If ANY verification fails: diagnose, fix, re-verify. Never skip.
|
|
93
|
+
|
|
94
|
+
4. **Update artifacts:**
|
|
95
|
+
- Update `docs/context/` if architecture changed
|
|
96
|
+
- Mark plan `_Status: COMPLETED_`, add `_Completed: YYYY-MM-DD_` and `_Summary_`
|
|
97
|
+
- Commit all changes with conventional commit messages
|
|
98
|
+
|
|
99
|
+
5. **Run `/retro`** — capture learnings from the entire process:
|
|
100
|
+
- What worked, what didn't, what was surprising across all phases
|
|
101
|
+
- Auto-update CLAUDE.md, docs/context/, and MEMORY.md with learnings
|
|
102
|
+
- Write retro to `docs/retros/YYYY-MM-DD-<task-slug>.md`
|
|
103
|
+
- This closes the feedback loop so future agents benefit
|
|
104
|
+
|
|
105
|
+
6. **Report:** Full summary of what was researched, decided, planned, implemented, verified, and learned. Include all verification evidence and retro highlights.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
## Implementation Plan Generator
|
|
2
|
+
|
|
3
|
+
Generate a detailed, step-by-step implementation plan based on existing research, context, and codebase understanding. All architectural and implementation decisions are made autonomously with documented rationale.
|
|
4
|
+
|
|
5
|
+
**Do NOT delegate this command to a subagent.** This is an orchestration command — Opus runs it directly.
|
|
6
|
+
|
|
7
|
+
### Input
|
|
8
|
+
$ARGUMENTS - task description (e.g., "add webhook support to billing", "refactor sync for 5th machine"). If omitted, autonomously determine the highest priority task.
|
|
9
|
+
|
|
10
|
+
### Instructions
|
|
11
|
+
|
|
12
|
+
1. **Read and verify existing documentation:**
|
|
13
|
+
- Read the project CLAUDE.md if it exists
|
|
14
|
+
- Read ALL files in `docs/context/` — this is your primary knowledge source
|
|
15
|
+
- Read ALL files in `docs/research/` — supplementary understanding
|
|
16
|
+
- Read ALL files in `docs/plans/` — check for existing or related plans
|
|
17
|
+
- Read ALL files in `docs/spikes/` — leverage settled decisions, don't re-investigate
|
|
18
|
+
- Read ALL files in `docs/incidents/` — learn from past failures, avoid repeating them
|
|
19
|
+
- **Staleness check:** For each doc, check its date against recent git history. If relevant files have changed significantly since the doc was written, note which claims need re-verification during code exploration (step 3). Never blindly trust documented claims — verify against actual code for the area you're planning.
|
|
20
|
+
|
|
21
|
+
2. **If no task was provided — determine the next priority:**
|
|
22
|
+
- Check `docs/incidents/` for active incidents (`_Status: ACTIVE_` or `_Status: MITIGATED_`) — P1 priority
|
|
23
|
+
- Check `docs/plans/` for incomplete plans (no `Status: COMPLETED` marker) — continue where you left off
|
|
24
|
+
- Check `docs/spikes/` for in-progress spikes — finish investigations before starting new work
|
|
25
|
+
- Check for open TODOs, FIXMEs, or `// TODO` comments in the codebase
|
|
26
|
+
- Check git log for recent patterns — what's actively being worked on?
|
|
27
|
+
- Check for failing tests, lint errors, or build issues
|
|
28
|
+
- Check for open GitHub issues if `gh` CLI is available: `gh issue list --limit 10`
|
|
29
|
+
- Check `docs/research/` for Open Questions that could be addressed
|
|
30
|
+
- Check `docs/spikes/` for completed spikes with pending Next Steps
|
|
31
|
+
- Evaluate: what is the highest-impact task that would move this project forward?
|
|
32
|
+
- Choose one task, state what you chose and why, then proceed as if it was provided as input
|
|
33
|
+
|
|
34
|
+
3. **Targeted code exploration** for the specific area the task touches:
|
|
35
|
+
- Read function bodies, not just signatures
|
|
36
|
+
- Follow imports to understand real dependencies
|
|
37
|
+
- Check existing tests for the area being changed
|
|
38
|
+
- Look at recent git history on key files for "why" context
|
|
39
|
+
- Use parallel Explore subagents for independent areas
|
|
40
|
+
|
|
41
|
+
4. **Make all decisions autonomously.** Choose libraries, patterns, file structure, naming, error handling — and document WHY for each non-obvious choice. Use current best practices and standards. Do not ask — decide and document.
|
|
42
|
+
|
|
43
|
+
5. **Write the plan** to `docs/plans/YYYY-MM-DD-<task-slug>.md`:
|
|
44
|
+
|
|
45
|
+
```markdown
|
|
46
|
+
# Plan: <Task>
|
|
47
|
+
_Date: YYYY-MM-DD_
|
|
48
|
+
_Status: PENDING_
|
|
49
|
+
_LastCompletedStep: 0_
|
|
50
|
+
_TotalSteps: N_
|
|
51
|
+
_Context: docs/context/<file>.md_
|
|
52
|
+
_Research: docs/research/<file>.md (if applicable)_
|
|
53
|
+
|
|
54
|
+
## Goal
|
|
55
|
+
What this plan accomplishes in 1-2 sentences.
|
|
56
|
+
|
|
57
|
+
## Decisions & Rationale
|
|
58
|
+
Every non-obvious choice made, with reasoning. (Libraries, patterns, file structure, naming, error handling, approach.)
|
|
59
|
+
|
|
60
|
+
## Steps
|
|
61
|
+
|
|
62
|
+
### Step 1: [Title]
|
|
63
|
+
- **File:** `exact/path/to/file`
|
|
64
|
+
- **What:** Specific change description with enough detail for an agent with zero context
|
|
65
|
+
- **Why:** Reasoning if non-obvious
|
|
66
|
+
- **Code:** Complete code to write (not "add validation" — show the actual code)
|
|
67
|
+
- **Verify:** Exact command to confirm this step worked and expected output
|
|
68
|
+
|
|
69
|
+
### Step 2: ...
|
|
70
|
+
|
|
71
|
+
## Verification Plan
|
|
72
|
+
- [ ] Tests to run (unit, e2e, integration — exact commands)
|
|
73
|
+
- [ ] Lint/build commands (exact commands)
|
|
74
|
+
- [ ] Manual checks (browser, API, CLI — exact steps)
|
|
75
|
+
- [ ] Edge cases to validate
|
|
76
|
+
|
|
77
|
+
## Risks
|
|
78
|
+
Known risks and mitigation for each.
|
|
79
|
+
|
|
80
|
+
## Execution Journal
|
|
81
|
+
_Populated by `/go` during execution. Do not fill in manually._
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
6. **Plan granularity:** Each step should be 2-5 minutes of work. One action per step. If a step has substeps, break it into multiple steps.
|
|
85
|
+
|
|
86
|
+
7. **Do NOT execute anything.** This command produces plans only.
|
|
87
|
+
|
|
88
|
+
8. Report the file path and a brief summary of the plan (goal, number of steps, key decisions made).
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
## Commit, Push & Create PR
|
|
2
|
+
|
|
3
|
+
**IMPORTANT: Immediately delegate this entire task to a subagent using the Agent tool with `model: "sonnet"` and `subagent_type: "general-purpose"`.** Do not perform any git operations yourself. Pass the full prompt below to the subagent and relay its result.
|
|
4
|
+
|
|
5
|
+
### Subagent prompt
|
|
6
|
+
|
|
7
|
+
You are performing the full commit-to-PR flow. Follow these steps exactly:
|
|
8
|
+
|
|
9
|
+
1. Run in parallel:
|
|
10
|
+
- `git status --short` to see all changes
|
|
11
|
+
- `git diff` and `git diff --staged` to see what changed
|
|
12
|
+
- `git log --oneline -10` to match commit message style
|
|
13
|
+
- `git branch --show-current` to get the current branch
|
|
14
|
+
|
|
15
|
+
2. If on `main` or `master`, create a feature branch first:
|
|
16
|
+
- Infer a branch name from the changes (e.g., `feat/add-commit-commands`)
|
|
17
|
+
- Run `git checkout -b <branch>`
|
|
18
|
+
|
|
19
|
+
3. Review the changes:
|
|
20
|
+
- Never stage files that look like secrets (.env, credentials, tokens, keys)
|
|
21
|
+
- If there are no changes to commit, say so and stop
|
|
22
|
+
|
|
23
|
+
4. Stage the appropriate files:
|
|
24
|
+
- If all changes are related, stage them all with specific file paths (not `git add -A`)
|
|
25
|
+
- If changes span unrelated concerns, stage only the coherent set and note what was left out
|
|
26
|
+
|
|
27
|
+
5. Write a conventional commit message:
|
|
28
|
+
- Use the project's commit style from git log (feat:, fix:, chore:, refactor:, docs:, test:)
|
|
29
|
+
- Summarize the "why" not the "what" — 1-2 sentences max
|
|
30
|
+
- Use a HEREDOC: `git commit -m "$(cat <<'EOF' ... EOF)"`
|
|
31
|
+
|
|
32
|
+
6. Push to remote:
|
|
33
|
+
- Use `git push -u origin <branch>` to ensure tracking is set
|
|
34
|
+
- Never force push
|
|
35
|
+
|
|
36
|
+
7. Create a PR using `gh pr create`:
|
|
37
|
+
- Clear title under 70 chars
|
|
38
|
+
- Body with `## Summary` (bullet points) and `## Test Plan` (verification steps)
|
|
39
|
+
- Use a HEREDOC for the body to preserve formatting
|
|
40
|
+
|
|
41
|
+
8. Report: the commit hash, branch name, and PR URL
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
## Full Preparation Pipeline
|
|
2
|
+
|
|
3
|
+
Orchestrate deep research, context validation, and implementation planning in a single session. This replaces built-in plan mode with unrestricted tool access and persistent documentation artifacts.
|
|
4
|
+
|
|
5
|
+
The goal is to set Claude up for maximum autonomous execution — thorough understanding, verified context, and a concrete plan with all decisions made and documented.
|
|
6
|
+
|
|
7
|
+
**Do NOT delegate this command to a subagent.** This is an orchestration command — Opus runs it directly.
|
|
8
|
+
|
|
9
|
+
### Input
|
|
10
|
+
$ARGUMENTS - task description (e.g., "add webhook support to billing", "refactor the sync system")
|
|
11
|
+
|
|
12
|
+
### Instructions
|
|
13
|
+
|
|
14
|
+
Execute these three phases in order, carrying all context forward between phases.
|
|
15
|
+
|
|
16
|
+
#### Phase 1: Research
|
|
17
|
+
|
|
18
|
+
1. **Read ALL existing documentation first:**
|
|
19
|
+
- Project CLAUDE.md
|
|
20
|
+
- ALL files in `docs/research/`
|
|
21
|
+
- ALL files in `docs/context/`
|
|
22
|
+
- ALL files in `docs/plans/` (for awareness of past/in-progress work)
|
|
23
|
+
- ALL files in `docs/spikes/` (for settled decisions — don't re-investigate)
|
|
24
|
+
- ALL files in `docs/incidents/` (for past failures and their fixes)
|
|
25
|
+
- MEMORY.md if accessible
|
|
26
|
+
|
|
27
|
+
2. **Deep codebase exploration** scoped to the task, using parallel Explore subagents:
|
|
28
|
+
- Trace data flow end-to-end for the area being changed
|
|
29
|
+
- Read function bodies, not just signatures
|
|
30
|
+
- Follow imports to understand real dependencies
|
|
31
|
+
- Check tests to understand intended behavior and edge cases
|
|
32
|
+
- Look at recent git history on key files for "why" context
|
|
33
|
+
|
|
34
|
+
3. **Verify ALL findings against actual code — this is non-negotiable.** The value of this system depends on docs being accurate.
|
|
35
|
+
- Never trust documentation blindly. If a research doc says X but the code shows Y, the code is truth.
|
|
36
|
+
- Check git log since each doc's date — have relevant files changed?
|
|
37
|
+
- Run commands to verify documented build/test/lint instructions still work
|
|
38
|
+
- Every claim carried forward must be verified against current reality, not copied from a previous doc
|
|
39
|
+
- If a doc is stale, update it immediately as part of this phase
|
|
40
|
+
|
|
41
|
+
4. **Write or update** `docs/research/YYYY-MM-DD-<topic>.md` with findings. If an existing research doc covers this area, update it rather than creating a duplicate. Use the same format as `/research`:
|
|
42
|
+
|
|
43
|
+
```markdown
|
|
44
|
+
# Research: <Topic>
|
|
45
|
+
_Date: YYYY-MM-DD_
|
|
46
|
+
|
|
47
|
+
## Overview
|
|
48
|
+
## Architecture
|
|
49
|
+
## Data Flow
|
|
50
|
+
## Patterns & Conventions
|
|
51
|
+
## Dependencies
|
|
52
|
+
## Gotchas
|
|
53
|
+
## Open Questions
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
#### Phase 2: Context
|
|
57
|
+
|
|
58
|
+
5. **Validate and update the repo context snapshot.** If `docs/context/` has an existing context doc:
|
|
59
|
+
- Read it fully
|
|
60
|
+
- Verify key claims against current repo state
|
|
61
|
+
- Update any stale sections
|
|
62
|
+
- Add task-specific context from Phase 1 that future agents will need
|
|
63
|
+
|
|
64
|
+
If no context doc exists, create one following the `/context` format:
|
|
65
|
+
|
|
66
|
+
```markdown
|
|
67
|
+
# Context: <Repo Name>
|
|
68
|
+
_Last updated: YYYY-MM-DD_
|
|
69
|
+
_Machine: <hostname>_
|
|
70
|
+
_Platform: <macOS/Linux/WSL>_
|
|
71
|
+
|
|
72
|
+
## Overview
|
|
73
|
+
## Tech Stack
|
|
74
|
+
## Project Structure
|
|
75
|
+
## Architecture
|
|
76
|
+
## Development Workflow
|
|
77
|
+
## Testing
|
|
78
|
+
## Dependencies
|
|
79
|
+
## Environment
|
|
80
|
+
## Recent Trajectory
|
|
81
|
+
## Gotchas
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
#### Phase 3: Plan
|
|
85
|
+
|
|
86
|
+
6. **Generate the implementation plan** with the full benefit of freshly verified research and context. Make all architectural and implementation decisions autonomously. Document rationale for every non-obvious choice.
|
|
87
|
+
|
|
88
|
+
7. **Write** `docs/plans/YYYY-MM-DD-<task-slug>.md`:
|
|
89
|
+
|
|
90
|
+
```markdown
|
|
91
|
+
# Plan: <Task>
|
|
92
|
+
_Date: YYYY-MM-DD_
|
|
93
|
+
_Status: PENDING_
|
|
94
|
+
_LastCompletedStep: 0_
|
|
95
|
+
_TotalSteps: N_
|
|
96
|
+
_Context: docs/context/<file>.md_
|
|
97
|
+
_Research: docs/research/<file>.md_
|
|
98
|
+
|
|
99
|
+
## Goal
|
|
100
|
+
What this plan accomplishes in 1-2 sentences.
|
|
101
|
+
|
|
102
|
+
## Decisions & Rationale
|
|
103
|
+
Every non-obvious choice, with reasoning.
|
|
104
|
+
|
|
105
|
+
## Steps
|
|
106
|
+
### Step 1: [Title]
|
|
107
|
+
- **File:** `exact/path/to/file`
|
|
108
|
+
- **What:** Specific change description
|
|
109
|
+
- **Why:** Reasoning if non-obvious
|
|
110
|
+
- **Code:** Complete code to write
|
|
111
|
+
- **Verify:** Exact command and expected output
|
|
112
|
+
|
|
113
|
+
## Verification Plan
|
|
114
|
+
- [ ] Tests, lint, build, manual checks — exact commands
|
|
115
|
+
|
|
116
|
+
## Risks
|
|
117
|
+
Known risks and mitigation.
|
|
118
|
+
|
|
119
|
+
## Execution Journal
|
|
120
|
+
_Populated by `/go` during execution. Do not fill in manually._
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Each step: 2-5 minutes, one action, concrete enough for a zero-context subagent.
|
|
124
|
+
|
|
125
|
+
#### Report
|
|
126
|
+
|
|
127
|
+
8. **Output all three file paths** and a summary:
|
|
128
|
+
- Research: what was learned or updated
|
|
129
|
+
- Context: what was captured or changed
|
|
130
|
+
- Plan: goal, number of steps, key decisions
|
|
131
|
+
|
|
132
|
+
The plan is now ready for `/go` to execute.
|