@complexthings/superpowers-agent 10.0.3 → 11.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/.agents/superpowers-agent +17 -222
- package/.github/copilot-instructions.md +0 -9
- package/AGENTS.md +19 -140
- package/README.md +79 -507
- package/package.json +1 -7
- package/.agents/docs/SUPERPOWERS.md +0 -37
- package/.agents/skills/.gitkeep +0 -0
- package/.agents/skills/claude-handoff/SKILL.md +0 -18
- package/.agents/skills/code-review/SKILL.md +0 -89
- package/.agents/skills/codebase-design/DEEPENING.md +0 -37
- package/.agents/skills/codebase-design/DESIGN-IT-TWICE.md +0 -44
- package/.agents/skills/codebase-design/SKILL.md +0 -114
- package/.agents/skills/design-an-interface/SKILL.md +0 -94
- package/.agents/skills/diagnosing-bugs/SKILL.md +0 -134
- package/.agents/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +0 -41
- package/.agents/skills/domain-modeling/ADR-FORMAT.md +0 -47
- package/.agents/skills/domain-modeling/CONTEXT-FORMAT.md +0 -60
- package/.agents/skills/domain-modeling/SKILL.md +0 -74
- package/.agents/skills/fable-mode/SKILL.md +0 -95
- package/.agents/skills/git-guardrails-claude-code/SKILL.md +0 -95
- package/.agents/skills/git-guardrails-claude-code/scripts/block-dangerous-git.sh +0 -25
- package/.agents/skills/grill-me/SKILL.md +0 -7
- package/.agents/skills/grill-with-docs/SKILL.md +0 -7
- package/.agents/skills/grilling/SKILL.md +0 -14
- package/.agents/skills/handoff/SKILL.md +0 -16
- package/.agents/skills/i-have-adhd/SKILL.md +0 -120
- package/.agents/skills/implement/SKILL.md +0 -11
- package/.agents/skills/improve-codebase-architecture/HTML-REPORT.md +0 -123
- package/.agents/skills/improve-codebase-architecture/SKILL.md +0 -66
- package/.agents/skills/loop-me/SKILL.md +0 -32
- package/.agents/skills/prototype/LOGIC.md +0 -79
- package/.agents/skills/prototype/SKILL.md +0 -30
- package/.agents/skills/prototype/UI.md +0 -112
- package/.agents/skills/qa/SKILL.md +0 -130
- package/.agents/skills/request-refactor-plan/SKILL.md +0 -68
- package/.agents/skills/research/SKILL.md +0 -12
- package/.agents/skills/resolving-merge-conflicts/SKILL.md +0 -14
- package/.agents/skills/scaffold-exercises/SKILL.md +0 -106
- package/.agents/skills/setup-matt-pocock-skills/SKILL.md +0 -127
- package/.agents/skills/setup-matt-pocock-skills/domain.md +0 -51
- package/.agents/skills/setup-matt-pocock-skills/issue-tracker-github.md +0 -45
- package/.agents/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +0 -46
- package/.agents/skills/setup-matt-pocock-skills/issue-tracker-local.md +0 -30
- package/.agents/skills/setup-matt-pocock-skills/triage-labels.md +0 -15
- package/.agents/skills/skill-creator/LICENSE.txt +0 -202
- package/.agents/skills/skill-creator/SKILL.md +0 -485
- package/.agents/skills/skill-creator/agents/analyzer.md +0 -274
- package/.agents/skills/skill-creator/agents/comparator.md +0 -202
- package/.agents/skills/skill-creator/agents/grader.md +0 -223
- package/.agents/skills/skill-creator/assets/eval_review.html +0 -146
- package/.agents/skills/skill-creator/eval-viewer/generate_review.py +0 -471
- package/.agents/skills/skill-creator/eval-viewer/viewer.html +0 -1325
- package/.agents/skills/skill-creator/references/schemas.md +0 -430
- package/.agents/skills/skill-creator/scripts/__init__.py +0 -0
- package/.agents/skills/skill-creator/scripts/__pycache__/__init__.cpython-314.pyc +0 -0
- package/.agents/skills/skill-creator/scripts/__pycache__/run_eval.cpython-314.pyc +0 -0
- package/.agents/skills/skill-creator/scripts/__pycache__/utils.cpython-314.pyc +0 -0
- package/.agents/skills/skill-creator/scripts/aggregate_benchmark.py +0 -401
- package/.agents/skills/skill-creator/scripts/generate_report.py +0 -326
- package/.agents/skills/skill-creator/scripts/improve_description.py +0 -247
- package/.agents/skills/skill-creator/scripts/package_skill.py +0 -136
- package/.agents/skills/skill-creator/scripts/quick_validate.py +0 -103
- package/.agents/skills/skill-creator/scripts/run_eval.py +0 -310
- package/.agents/skills/skill-creator/scripts/run_loop.py +0 -328
- package/.agents/skills/skill-creator/scripts/utils.py +0 -47
- package/.agents/skills/tdd/SKILL.md +0 -36
- package/.agents/skills/tdd/mocking.md +0 -59
- package/.agents/skills/tdd/tests.md +0 -77
- package/.agents/skills/teach/GLOSSARY-FORMAT.md +0 -35
- package/.agents/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
- package/.agents/skills/teach/MISSION-FORMAT.md +0 -31
- package/.agents/skills/teach/RESOURCES-FORMAT.md +0 -32
- package/.agents/skills/teach/SKILL.md +0 -140
- package/.agents/skills/to-spec/SKILL.md +0 -75
- package/.agents/skills/to-tickets/SKILL.md +0 -114
- package/.agents/skills/triage/AGENT-BRIEF.md +0 -207
- package/.agents/skills/triage/OUT-OF-SCOPE.md +0 -105
- package/.agents/skills/triage/SKILL.md +0 -112
- package/.agents/skills/ubiquitous-language/SKILL.md +0 -93
- package/.agents/skills/wayfinder/SKILL.md +0 -127
- package/.agents/skills/writing-great-skills/GLOSSARY.md +0 -201
- package/.agents/skills/writing-great-skills/SKILL.md +0 -83
- package/.agents/templates/AGENTS.md.template +0 -27
- package/.agents/templates/SUPERPOWERS.md.template +0 -37
- package/skills/collaboration/brainstorming/SKILL.md +0 -66
- package/skills/collaboration/brainstorming/skill.json +0 -9
- package/skills/collaboration/leveraging-cli-tools/SKILL.md +0 -110
- package/skills/collaboration/leveraging-cli-tools/references/copilot-instructions.md +0 -30
- package/skills/collaboration/leveraging-cli-tools/scripts/setup-ponytail.sh +0 -185
- package/skills/collaboration/leveraging-cli-tools/scripts/setup-rtk.sh +0 -217
- package/skills/collaboration/leveraging-cli-tools/skill.json +0 -9
- package/skills/meta/create-skill-json/SKILL.md +0 -370
- package/skills/meta/create-skill-json/skill.json +0 -9
- package/skills/meta/create-skill-json/test-scenarios.md +0 -29
- package/skills/setup-skills/SKILL.md +0 -54
- package/skills/setup-skills/skill.json +0 -8
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
## 🎯 SKILLS
|
|
2
|
-
|
|
3
|
-
[superpowers-agent Docs](.agents/docs/SUPERPOWERS.md)
|
|
4
|
-
|
|
5
|
-
- Skills encode proven techniques that prevent mistakes.
|
|
6
|
-
- Not using them means repeating solved problems and missing edge cases.
|
|
7
|
-
- If a skill exists for your task, you MUST use it.
|
|
8
|
-
- **Before starting any task**, check for relevant skills, use your native skill tool to do so.
|
|
9
|
-
- Review skill descriptions/frontmatter to identify relevant ones.
|
|
10
|
-
— when a skill references a tool you don't have, substitute your equivalent.
|
|
11
|
-
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## Version Check
|
|
15
|
-
|
|
16
|
-
Once per day, check for updates:
|
|
17
|
-
1. **CURRENT_VERSION** — run any `superpowers-agent` command, extract `X.Y.Z` from `^^SAV:X.Y.Z^^` in the output.
|
|
18
|
-
2. **NPM_LATEST_VERSION** — run `npm view @complexthings/superpowers-agent version`.
|
|
19
|
-
3. Compare by semver, not string order (`9.10.0` > `9.9.0`). If newer, tell the user — don't run these yourself:
|
|
20
|
-
> Your superpowers-agent has updates (`CURRENT_VERSION` → `NPM_LATEST_VERSION`). Run:
|
|
21
|
-
> ```sh
|
|
22
|
-
> npm install -g @complexthings/superpowers-agent
|
|
23
|
-
> superpowers-agent bootstrap && superpowers-agent setup-skills
|
|
24
|
-
> ```
|
|
25
|
-
Match, or a lookup fails → stay silent.
|
|
26
|
-
|
|
27
|
-
---
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# SUPERPOWERS Reference Guide
|
|
2
|
-
|
|
3
|
-
You are an autonomous agent with access to the `superpowers-agent` system.
|
|
4
|
-
|
|
5
|
-
> Loaded at conversation start. `AGENTS.md` is the primary reference; this guide is the detailed supplement.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Installation
|
|
10
|
-
|
|
11
|
-
If `superpowers-agent` is not available, install it: `npm install -g @complexthings/superpowers-agent`
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## Version Check
|
|
16
|
-
|
|
17
|
-
Once per day, check for updates:
|
|
18
|
-
1. **CURRENT_VERSION** — run `superpowers-agent version`, extract `X.Y.Z` from the output.
|
|
19
|
-
2. **NPM_LATEST_VERSION** — run `npm view @complexthings/superpowers-agent version`.
|
|
20
|
-
3. Compare by semver, not string order (`9.10.0` > `9.9.0`). If newer, tell the user — don't run these yourself:
|
|
21
|
-
> Your superpowers-agent has updates (`CURRENT_VERSION` → `NPM_LATEST_VERSION`). Run:
|
|
22
|
-
> ```sh
|
|
23
|
-
> npm install -g @complexthings/superpowers-agent
|
|
24
|
-
> superpowers-agent bootstrap && superpowers-agent setup-skills
|
|
25
|
-
> ```
|
|
26
|
-
Match, or a lookup fails → stay silent.
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
## Skill Loading Rules
|
|
31
|
-
|
|
32
|
-
- Load skills **JIT only** — never preload to "understand" them.
|
|
33
|
-
- Follow skill instructions **exactly as written** — no skimming, no shortcuts.
|
|
34
|
-
- If a skill has a checklist, create a todo for **each item** — no mental tracking.
|
|
35
|
-
- Simple tasks benefit from skills as much as complex ones.
|
|
36
|
-
|
|
37
|
-
**Skill priority (highest to lowest):** Project → Personal → Superpowers
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: brainstorming
|
|
3
|
-
description: "DEPRECATED — redirects to the grilling skill. Fires before any creative work — creating features, building components, adding functionality, or modifying behavior — to tell the user brainstorming is retired, offer to install grilling, and hand the same context to a grilling session."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Brainstorming (deprecated)
|
|
7
|
-
|
|
8
|
-
This skill is deprecated. It no longer explores requirements itself — it redirects to Matt Pocock's `grilling` skill, which does the same job better by interviewing the user one decision at a time.
|
|
9
|
-
|
|
10
|
-
Run these steps in order. The user's original request (the context that triggered this skill) is what you hand to `grilling` at the end — keep it.
|
|
11
|
-
|
|
12
|
-
## 1. Tell the user it's deprecated
|
|
13
|
-
|
|
14
|
-
Say, in your own words: the `brainstorming` skill is deprecated and they should use `grilling` instead.
|
|
15
|
-
|
|
16
|
-
## 2. Offer to install grilling
|
|
17
|
-
|
|
18
|
-
Using your question-asking tool (`askUserQuestion`, `ask_user_question`, `AskUserQuestion`, `question`, or equivalent), ask whether they want the `grilling` skill installed now.
|
|
19
|
-
|
|
20
|
-
If they decline, skip to step 5 and run the grilling interview yourself using the instructions in this file's spirit — but grilling works best installed, so recommend it.
|
|
21
|
-
|
|
22
|
-
## 3. Check whether grilling is already installed
|
|
23
|
-
|
|
24
|
-
Look for an existing `grilling/SKILL.md` in the project and in these system locations:
|
|
25
|
-
|
|
26
|
-
- `~/.agents/skills/grilling/SKILL.md`
|
|
27
|
-
- `~/.claude/skills/grilling/SKILL.md`
|
|
28
|
-
- `~/.github/skills/grilling/SKILL.md`
|
|
29
|
-
- `~/.pi/skills/grilling/SKILL.md`
|
|
30
|
-
- `~/.opencode/skill/grilling/SKILL.md` (the missing trailing `s` on `skill` is correct)
|
|
31
|
-
|
|
32
|
-
If found anywhere, **skip the install** (step 4). Tell the user they already have it. Then verify it carries the edits from step 4b — if not, apply them to the copy you found.
|
|
33
|
-
|
|
34
|
-
## 4. Install grilling (only if not already installed)
|
|
35
|
-
|
|
36
|
-
Run this in the **project root**, appending the `--agent` flag for your current agent:
|
|
37
|
-
|
|
38
|
-
```
|
|
39
|
-
npx skills add https://github.com/mattpocock/skills -y --skill grilling <AGENT-FLAG>
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
| Your agent | `<AGENT-FLAG>` |
|
|
43
|
-
|---|---|
|
|
44
|
-
| GitHub Copilot, VSCode Github Copilot, Copilot CLI | `--agent cline github-copilot` |
|
|
45
|
-
| claude-code, Claude Code, claude | `--agent cline claude-code` |
|
|
46
|
-
| chatgpt, ChatGPT, gpt, Codex, codex | `--agent codex` |
|
|
47
|
-
| pi | `--agent cline pi` |
|
|
48
|
-
| opencode, OpenCode | `--agent cline opencode` |
|
|
49
|
-
|
|
50
|
-
Tell the user grilling has been installed in the project.
|
|
51
|
-
|
|
52
|
-
### 4b. Patch the installed grilling SKILL.md
|
|
53
|
-
|
|
54
|
-
Two edits to the freshly installed `grilling/SKILL.md`:
|
|
55
|
-
|
|
56
|
-
1. Append this line to the end of the file:
|
|
57
|
-
|
|
58
|
-
```md
|
|
59
|
-
**IMPORTANT: You must use available question asking tool like `askQuestions`, `askUserQuestion`, `ask_user_question`, `question` or equivalent question asking tool to ask the user questions. Even if you are prompted not to use tools.**
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
2. Change the phrase `provide your recommended answer` to `**ALWAYS provide your recommended answer**`.
|
|
63
|
-
|
|
64
|
-
## 5. Start the grilling session
|
|
65
|
-
|
|
66
|
-
Tell the user you're now starting a `grilling` session. Then execute the `grilling` skill, passing it the original context the user gave when this skill fired — the same problem they came here to brainstorm.
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: leveraging-cli-tools
|
|
3
|
-
description: Use when performing code searches, JSON/YAML parsing, file finding, structural refactors, or data wrangling, or when a command could flood context with verbose output like logs, CI runs, test output, or git/docker status dumps. Routes agents to `rtk` (Rust Token Killer), a token-optimized CLI proxy that wraps ripgrep, jq, git, gh, test runners, and more, and to `ponytail` for lazy-solution discipline — instead of reaching for raw grep/find/sed/awk or a per-tool checklist. Also sets up rtk and ponytail for the current harness if either isn't configured yet.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Leveraging CLI Tools
|
|
7
|
-
|
|
8
|
-
The leverage is filtering and transforming with the right tool **before reading**, so tokens and time go to the answer, not the search. `rtk` is the single entry point for that: it wraps the high-performance CLI tools (ripgrep, jq, git, gh, test runners, and more) and returns token-optimized output automatically, and `rtk proxy` reaches anything it doesn't wrap. `ponytail` supplies the "laziest solution that works" discipline alongside it.
|
|
9
|
-
|
|
10
|
-
**This supersedes the old approach of memorizing a table of ~16 individual tools (`rg`, `jq`, `fd`, `yq`, `ast-grep`, `sd`, …) and reaching for each one raw.** If you find yourself reconstructing that table from memory, stop — reach for `rtk <tool>` instead, and `rtk proxy <tool>` for anything `rtk` doesn't wrap directly.
|
|
11
|
-
|
|
12
|
-
## Setup rtk
|
|
13
|
-
|
|
14
|
-
Before relying on `rtk`, verify it's configured for the current harness:
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
bash scripts/setup-rtk.sh
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
(relative to this skill directory — use the absolute path if you're working elsewhere). This script only **checks and reports**; it never changes anything by itself. It:
|
|
21
|
-
|
|
22
|
-
1. Detects the current harness (Claude Code, OpenCode, pi, codex, GitHub Copilot).
|
|
23
|
-
2. Checks whether `rtk` is installed and wired into that harness's config (e.g. `rtk init --show` for Claude Code; the harness-specific config file for others).
|
|
24
|
-
3. If everything is already `[ok]`, does nothing further — you're set, move on.
|
|
25
|
-
4. If something's missing, prints the exact command(s) it would run to fix it (e.g. `rtk init --auto-patch`, `rtk init -g --auto-patch`, `rtk init -g --opencode`, `rtk init --codex`).
|
|
26
|
-
|
|
27
|
-
Anything the script reports missing is a **global or repo-config change** — never run the fix command on your own initiative. Surface the report and the exact command(s) to the user and get their confirmation first (see "Ask before you act" below). If the fix touches Claude Code's own config, tell the user to restart Claude Code afterward so the new config is picked up.
|
|
28
|
-
|
|
29
|
-
## Setup ponytail
|
|
30
|
-
|
|
31
|
-
Same check → report → confirm pattern, for the `ponytail` discipline skill:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
bash scripts/setup-ponytail.sh
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
It checks that `ponytail` is installed for the current harness (marketplace/plugin/package presence) and that `~/.config/ponytail/config.json` exists. If the config is missing, it offers to create it with `defaultMode: full` — it only ever creates an absent file, it never edits or overwrites one that already exists. Confirm the offered command with the user, same as rtk setup, before it runs.
|
|
38
|
-
|
|
39
|
-
On GitHub Copilot, also check whether this repo's `.github/copilot-instructions.md` already carries the rtk + ponytail instructions. If not, `references/copilot-instructions.md` (bundled with this skill) is the source of truth to append — offer that too, and confirm before writing.
|
|
40
|
-
|
|
41
|
-
### Ask before you act
|
|
42
|
-
|
|
43
|
-
Any setup step that touches global or machine state — installing a package, writing outside this task's working files, editing a config in `$HOME` — gets surfaced and confirmed, never run silently. Ask with whichever question tool your harness exposes: `askUserQuestion`, `ask_user_question`, `askQuestions`, or `question`. Same rule elsewhere in this skill: when you're unsure whether a change is welcome, ask instead of guessing.
|
|
44
|
-
|
|
45
|
-
## Use rtk with discipline
|
|
46
|
-
|
|
47
|
-
Picking `rtk` is only half of it. The other half is using it with discipline — the same habits that used to be spread across a dozen raw tools, now aimed at `rtk`'s subcommands.
|
|
48
|
-
|
|
49
|
-
**1 — Reach for `rtk <tool>` for the data's shape, not a raw tool from muscle memory.** Code/text search → `rtk rg`, JSON → `rtk jq`, git/gh → `rtk git` / `rtk gh`, verbose command output (tests, CI, builds) → the matching `rtk` wrapper (`rtk cargo test`, `rtk playwright test`, `rtk jest`, …). The reflex to resist is reaching for `grep`/`sed`/`awk` on structured data, or a raw tool `rtk` already wraps — both throw away the reduction `rtk` gives you for free.
|
|
50
|
-
|
|
51
|
-
**Prefer `rtk rg` over `rtk grep`.** They cover the same ground, but `rtk rg` runs ripgrep underneath and is faster and more efficient — use it as the default for code/text search.
|
|
52
|
-
|
|
53
|
-
**This includes interpreters and runners you'd otherwise call bare.** Run scripts through `rtk` too — `rtk python script.py`, `rtk python -c '...'` (and likewise `rtk node …`) — so their output stays inside the same token-optimized, usage-tracked invocation instead of dropping to raw `python3`/`node`.
|
|
54
|
-
|
|
55
|
-
**2 — Ask for less: use the flag or selector that returns the answer's _shape_.** The biggest single win is never pulling raw output into context. Match the request to the question:
|
|
56
|
-
|
|
57
|
-
| Question | Command | Returns |
|
|
58
|
-
|----------|---------|---------|
|
|
59
|
-
| Which files match? | `rtk rg -l` | paths only, no lines |
|
|
60
|
-
| How many files? | `rtk rg -l \| wc -l` | a file count, not a line count |
|
|
61
|
-
| How many hits? | `rtk rg -c` (lines/file) / `rtk rg --count-matches` (matches/file) | counts only |
|
|
62
|
-
| Just the matched bit? | `rtk rg -o` | the substring, not the whole line |
|
|
63
|
-
| Enough to judge a hit? | `rtk rg -A/-B/-C N`, `rtk rg -m N` (cap per file) | bounded context |
|
|
64
|
-
| Only certain fields? | `rtk jq -r '.a, .b'` | projected values, not the whole doc |
|
|
65
|
-
| Which files, by dir? | `rtk find <pattern>` | paths grouped by directory |
|
|
66
|
-
| Only the errors? | `rtk err <cmd>` | filtered stderr/error lines |
|
|
67
|
-
|
|
68
|
-
Shape output at the selector; never pull the whole thing into context and filter it by eye.
|
|
69
|
-
|
|
70
|
-
**3 — Compose so only the answer comes back.** Do the counting, dedup, and projection *in the pipeline*, not by reading raw output and reasoning over it. One pass keeps every intermediate result out of context:
|
|
71
|
-
```bash
|
|
72
|
-
rtk rg -l '"error"' logs/ --type json | xargs rtk jq -r 'select(.level=="error") | .code' | sort -u
|
|
73
|
-
```
|
|
74
|
-
When a task needs several tool calls plus processing, write **one** pipeline that does it all and returns only the result — the intermediate data never touches your context.
|
|
75
|
-
|
|
76
|
-
**4 — When `rtk` has no wrapper for a tool, use `rtk proxy <cmd>` instead of the raw command.** `rtk proxy` runs anything raw while keeping it inside the same invocation pattern — e.g. `rtk proxy ast-grep --pattern '...' --lang ts`, `rtk proxy yq '.services' docker-compose.yml`, `rtk proxy sd 'old' 'new' file.ts`. Reach for `rtk <tool>` first; fall back to `rtk proxy <tool>` only when `rtk` doesn't wrap it.
|
|
77
|
-
|
|
78
|
-
**5 — Read the output critically — it's a claim, not a fact.** A zero or suspiciously low result is the one to distrust: `rtk rg` respects `.gitignore`/`.ignore` by default, so a real match in `node_modules/`, `dist/`, or a dotfile is silently absent. Before concluding "no matches," re-run with `--no-ignore` (or `-u`/`-uu`/`--hidden`) — then decide whether those ignored hits (vendored deps, build output, generated mirrors) actually belong in the answer; surfacing them is the check, keeping them is a judgment call. Mind case (`-i`) and word boundaries (`-w`) so you neither miss a hit nor over-match a common word.
|
|
79
|
-
|
|
80
|
-
In Claude Code the `Grep` and `Glob` tools are themselves built on ripgrep — prefer them for in-context searches, and reach for `rtk` on the command line when you need piping, transforms, rewrites, or output reduction.
|
|
81
|
-
|
|
82
|
-
## Red flags
|
|
83
|
-
|
|
84
|
-
- Parsing JSON/YAML with `awk`/`sed`/`grep` instead of `rtk jq` / `rtk proxy yq`.
|
|
85
|
-
- Reading files before filtering them with `rtk rg`.
|
|
86
|
-
- Reaching for `rtk grep` by habit when `rtk rg` covers the same ground faster.
|
|
87
|
-
- Running a tool raw (`ast-grep`, `yq`, `sd`, …) when `rtk proxy <tool>` would give the same result inside the standard invocation pattern.
|
|
88
|
-
- Running an interpreter raw (`python3`, `node`, …) when `rtk python` / `rtk node` would keep it inside rtk's optimized invocation.
|
|
89
|
-
- Piping a command's full output into context to eyeball it, when `-l`/`-c`/`-o` or a `rtk jq` projection would return just the answer.
|
|
90
|
-
- Concluding "no matches" from a default `rtk rg` run without re-checking `--no-ignore`/`--hidden` — the hit may be sitting in an ignored directory.
|
|
91
|
-
- Hand-rolling `curl` against the GitHub API instead of `rtk gh`.
|
|
92
|
-
- Reconstructing the old 16-tool table from memory instead of reaching for `rtk`.
|
|
93
|
-
- Running a setup fix (`rtk init --auto-patch`, creating `~/.config/ponytail/config.json`, etc.) without confirming with the user first.
|
|
94
|
-
|
|
95
|
-
## Common rationalizations
|
|
96
|
-
|
|
97
|
-
| Excuse | Reality |
|
|
98
|
-
|--------|---------|
|
|
99
|
-
| "grep works fine" | On a big tree it's 10-50x slower and floods context with noise `rtk rg` would have filtered out. |
|
|
100
|
-
| "I don't know if rtk is set up" | `bash scripts/setup-rtk.sh` answers it in one check; fixing it pays back across the whole session. |
|
|
101
|
-
| "Not worth the setup" | One confirmed fix = a speedup on every future task, not just this one. |
|
|
102
|
-
| "The test/CI output is just long, I'll scroll it" | `rtk`'s wrappers (`rtk cargo test`, `rtk playwright test`, …) cut that noise automatically — scrolling raw output throws that away. |
|
|
103
|
-
| "This tool isn't in rtk's table, I'll just run it raw" | `rtk proxy <tool>` runs it inside the same pattern — no need to drop back to the bare command. |
|
|
104
|
-
| "User didn't ask for optimization" | Faster, lower-noise completion *is* better completion. |
|
|
105
|
-
|
|
106
|
-
## When NOT to use
|
|
107
|
-
|
|
108
|
-
- The user declined an rtk/ponytail setup fix — note it once, then fall back to the raw tool and move on.
|
|
109
|
-
- A teaching context where the standard tool is the point.
|
|
110
|
-
- Output you already shaped with a selector — don't add another reduction pass for its own sake.
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# Ponytail, lazy senior dev mode
|
|
2
|
-
|
|
3
|
-
You are a lazy senior developer. Lazy means efficient, not careless. The best code is the code never written.
|
|
4
|
-
|
|
5
|
-
Before writing any code, stop at the first rung that holds:
|
|
6
|
-
|
|
7
|
-
1. Does this need to be built at all? (YAGNI)
|
|
8
|
-
2. Does it already exist in this codebase? Reuse the helper, util, or pattern that's already here, don't re-write it.
|
|
9
|
-
3. Does the standard library already do this? Use it.
|
|
10
|
-
4. Does a native platform feature cover it? Use it.
|
|
11
|
-
5. Does an already-installed dependency solve it? Use it.
|
|
12
|
-
6. Can this be one line? Make it one line.
|
|
13
|
-
7. Only then: write the minimum code that works.
|
|
14
|
-
|
|
15
|
-
The ladder runs after you understand the problem, not instead of it: read the task and the code it touches, trace the real flow end to end, then climb.
|
|
16
|
-
|
|
17
|
-
Bug fix = root cause, not symptom: a report names a symptom. Grep every caller of the function you touch and fix the shared function once — one guard there is a smaller diff than one per caller, and patching only the path the ticket names leaves a sibling caller still broken.
|
|
18
|
-
|
|
19
|
-
Rules:
|
|
20
|
-
|
|
21
|
-
- No abstractions that weren't explicitly requested.
|
|
22
|
-
- No new dependency if it can be avoided.
|
|
23
|
-
- No boilerplate nobody asked for.
|
|
24
|
-
- Deletion over addition. Boring over clever. Fewest files possible.
|
|
25
|
-
- Shortest working diff wins, but only once you understand the problem. The smallest change in the wrong place isn't lazy, it's a second bug.
|
|
26
|
-
- Question complex requests: "Do you actually need X, or does Y cover it?"
|
|
27
|
-
- Pick the edge-case-correct option when two stdlib approaches are the same size, lazy means less code, not the flimsier algorithm.
|
|
28
|
-
- Mark deliberate simplifications that cut a real corner with a known ceiling (global lock, O(n²) scan, naive heuristic) with a `ponytail:` comment naming the ceiling and upgrade path.
|
|
29
|
-
|
|
30
|
-
Not lazy about: understanding the problem (read it fully and trace the real flow before picking a rung, a small diff you don't understand is just laziness dressed up as efficiency), input validation at trust boundaries, error handling that prevents data loss, security, accessibility, the calibration real hardware needs (the platform is never the spec ideal, a clock drifts, a sensor reads off), anything explicitly requested. Lazy code without its check is unfinished: non-trivial logic leaves ONE runnable check behind, the smallest thing that fails if the logic breaks (an assert-based demo/self-check or one small test file; no frameworks, no fixtures). Trivial one-liners need no test.
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# setup-ponytail.sh — verify (and optionally install) the ponytail plugin for
|
|
3
|
-
# whichever agent harness is currently running this script.
|
|
4
|
-
#
|
|
5
|
-
# Contract (same as setup-rtk.sh):
|
|
6
|
-
# - Default (no flags): CHECK + REPORT ONLY. Detects the current harness,
|
|
7
|
-
# prints what's installed/missing and the exact command(s) that WOULD
|
|
8
|
-
# run. Changes nothing on disk or in any plugin registry.
|
|
9
|
-
# - `--apply`: actually runs the planned install commands / writes the
|
|
10
|
-
# planned files.
|
|
11
|
-
# - Idempotent, create-if-absent only. Never overwrites an existing file
|
|
12
|
-
# (in particular ~/.config/ponytail/config.json is left untouched once
|
|
13
|
-
# it exists).
|
|
14
|
-
#
|
|
15
|
-
# Usage:
|
|
16
|
-
# scripts/setup-ponytail.sh # check only, changes nothing
|
|
17
|
-
# scripts/setup-ponytail.sh --apply # apply the plan reported above
|
|
18
|
-
|
|
19
|
-
set -euo pipefail
|
|
20
|
-
|
|
21
|
-
APPLY=0
|
|
22
|
-
[[ "${1:-}" == "--apply" ]] && APPLY=1
|
|
23
|
-
|
|
24
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
25
|
-
COPILOT_ASSET="$SCRIPT_DIR/../references/copilot-instructions.md"
|
|
26
|
-
GAPS=0
|
|
27
|
-
|
|
28
|
-
ok() { printf ' [ok] %s\n' "$*"; }
|
|
29
|
-
gap() { printf ' [MISSING] %s\n' "$*"; GAPS=$((GAPS + 1)); }
|
|
30
|
-
plan() { printf ' would run: %s\n' "$*"; }
|
|
31
|
-
|
|
32
|
-
# --- detect harness ---------------------------------------------------------
|
|
33
|
-
# Lazy heuristic: env vars first (cheapest, most specific), config dir
|
|
34
|
-
# presence as fallback. Claude Code is checked first since it sets an
|
|
35
|
-
# unambiguous env var even when other harnesses' dirs also exist.
|
|
36
|
-
harness=""
|
|
37
|
-
if [[ -n "${CLAUDECODE:-}" || -n "${CLAUDE_CODE_ENTRYPOINT:-}" ]]; then
|
|
38
|
-
harness="claude"
|
|
39
|
-
elif [[ -n "${CODEX_HOME:-}" || -d "$HOME/.codex" ]]; then
|
|
40
|
-
harness="codex"
|
|
41
|
-
elif [[ -n "${GITHUB_COPILOT_CLI:-}" || -d "$HOME/.copilot" ]]; then
|
|
42
|
-
harness="copilot"
|
|
43
|
-
elif [[ -n "${OPENCODE_MODEL:-}" || -d "$HOME/.config/opencode" ]]; then
|
|
44
|
-
harness="opencode"
|
|
45
|
-
elif [[ -d "$HOME/.pi" ]]; then
|
|
46
|
-
harness="pi"
|
|
47
|
-
fi
|
|
48
|
-
|
|
49
|
-
if [[ -z "$harness" ]]; then
|
|
50
|
-
echo "Could not detect a known agent harness (Claude Code, OpenCode, pi, codex, Copilot). Nothing to check."
|
|
51
|
-
exit 0
|
|
52
|
-
fi
|
|
53
|
-
|
|
54
|
-
echo "Detected harness: $harness"
|
|
55
|
-
echo
|
|
56
|
-
|
|
57
|
-
case "$harness" in
|
|
58
|
-
claude)
|
|
59
|
-
dir="$HOME/.claude/plugins/marketplaces/ponytail"
|
|
60
|
-
if [[ -d "$dir" ]]; then
|
|
61
|
-
ok "ponytail marketplace present ($dir)"
|
|
62
|
-
else
|
|
63
|
-
gap "ponytail marketplace not found ($dir)"
|
|
64
|
-
plan "claude plugin marketplace add DietrichGebert/ponytail && claude plugin install ponytail@ponytail"
|
|
65
|
-
if [[ $APPLY -eq 1 ]]; then
|
|
66
|
-
claude plugin marketplace add DietrichGebert/ponytail
|
|
67
|
-
claude plugin install ponytail@ponytail
|
|
68
|
-
echo " -> installed. Run /reload-plugins in Claude Code to pick it up."
|
|
69
|
-
fi
|
|
70
|
-
fi
|
|
71
|
-
;;
|
|
72
|
-
|
|
73
|
-
opencode)
|
|
74
|
-
cfg="$HOME/.config/opencode/opencode.json"
|
|
75
|
-
if [[ -f "$cfg" ]] && grep -q '@dietrichgebert/ponytail' "$cfg"; then
|
|
76
|
-
ok "ponytail listed in $cfg"
|
|
77
|
-
else
|
|
78
|
-
gap "ponytail not listed in $cfg"
|
|
79
|
-
plan "add \"@dietrichgebert/ponytail\" to the \"plugins\" array in $cfg"
|
|
80
|
-
if [[ $APPLY -eq 1 ]]; then
|
|
81
|
-
if command -v jq >/dev/null 2>&1 && [[ -f "$cfg" ]]; then
|
|
82
|
-
tmp="$(mktemp)"
|
|
83
|
-
jq '.plugins = ((.plugins // []) + ["@dietrichgebert/ponytail"] | unique)' "$cfg" > "$tmp" && mv "$tmp" "$cfg"
|
|
84
|
-
elif command -v jq >/dev/null 2>&1; then
|
|
85
|
-
mkdir -p "$(dirname "$cfg")"
|
|
86
|
-
printf '{"plugins":["@dietrichgebert/ponytail"]}\n' > "$cfg"
|
|
87
|
-
else
|
|
88
|
-
echo " -> jq not found; edit $cfg manually and add \"@dietrichgebert/ponytail\" to \"plugins\"." >&2
|
|
89
|
-
fi
|
|
90
|
-
echo " -> restart opencode."
|
|
91
|
-
fi
|
|
92
|
-
fi
|
|
93
|
-
;;
|
|
94
|
-
|
|
95
|
-
pi)
|
|
96
|
-
cfg="$HOME/.pi/agent/settings.json"
|
|
97
|
-
if [[ -f "$cfg" ]] && grep -q 'git:github.com/DietrichGebert/ponytail' "$cfg"; then
|
|
98
|
-
ok "ponytail listed in $cfg"
|
|
99
|
-
else
|
|
100
|
-
gap "ponytail not listed in $cfg"
|
|
101
|
-
plan "pi install git:github.com/DietrichGebert/ponytail"
|
|
102
|
-
if [[ $APPLY -eq 1 ]]; then
|
|
103
|
-
pi install git:github.com/DietrichGebert/ponytail
|
|
104
|
-
echo " -> restart pi."
|
|
105
|
-
fi
|
|
106
|
-
fi
|
|
107
|
-
;;
|
|
108
|
-
|
|
109
|
-
codex)
|
|
110
|
-
dir="$HOME/.codex/plugins/cache/ponytail"
|
|
111
|
-
if [[ -d "$dir" ]]; then
|
|
112
|
-
ok "ponytail plugin cache present ($dir)"
|
|
113
|
-
else
|
|
114
|
-
gap "ponytail plugin cache not found ($dir)"
|
|
115
|
-
plan "codex plugin marketplace add DietrichGebert/ponytail && codex plugin add ponytail@ponytail"
|
|
116
|
-
if [[ $APPLY -eq 1 ]]; then
|
|
117
|
-
codex plugin marketplace add DietrichGebert/ponytail
|
|
118
|
-
codex plugin add ponytail@ponytail
|
|
119
|
-
echo " -> restart codex."
|
|
120
|
-
fi
|
|
121
|
-
fi
|
|
122
|
-
;;
|
|
123
|
-
|
|
124
|
-
copilot)
|
|
125
|
-
dir="$HOME/.copilot/installed-plugins/ponytail"
|
|
126
|
-
if [[ -d "$dir" ]]; then
|
|
127
|
-
ok "ponytail plugin present ($dir)"
|
|
128
|
-
else
|
|
129
|
-
gap "ponytail plugin not found ($dir)"
|
|
130
|
-
plan "copilot plugin marketplace add DietrichGebert/ponytail && copilot plugin install ponytail@ponytail"
|
|
131
|
-
if [[ $APPLY -eq 1 ]]; then
|
|
132
|
-
copilot plugin marketplace add DietrichGebert/ponytail
|
|
133
|
-
copilot plugin install ponytail@ponytail
|
|
134
|
-
echo " -> restart copilot."
|
|
135
|
-
fi
|
|
136
|
-
fi
|
|
137
|
-
|
|
138
|
-
repo_asset="./.github/copilot-instructions.md"
|
|
139
|
-
if [[ -f "$repo_asset" ]] && grep -q 'Ponytail, lazy senior dev mode' "$repo_asset"; then
|
|
140
|
-
ok "$repo_asset already has ponytail instructions"
|
|
141
|
-
elif [[ -f "$repo_asset" ]]; then
|
|
142
|
-
gap "$repo_asset exists but lacks ponytail instructions"
|
|
143
|
-
plan "append $COPILOT_ASSET to $repo_asset"
|
|
144
|
-
if [[ $APPLY -eq 1 ]]; then
|
|
145
|
-
{ echo; cat "$COPILOT_ASSET"; } >> "$repo_asset"
|
|
146
|
-
fi
|
|
147
|
-
else
|
|
148
|
-
gap "$repo_asset not found"
|
|
149
|
-
plan "create $repo_asset from $COPILOT_ASSET"
|
|
150
|
-
if [[ $APPLY -eq 1 ]]; then
|
|
151
|
-
mkdir -p "$(dirname "$repo_asset")"
|
|
152
|
-
cp "$COPILOT_ASSET" "$repo_asset"
|
|
153
|
-
fi
|
|
154
|
-
fi
|
|
155
|
-
;;
|
|
156
|
-
esac
|
|
157
|
-
|
|
158
|
-
# --- all harnesses: global ponytail config, create-if-absent only ----------
|
|
159
|
-
if [[ -n "${APPDATA:-}" ]]; then
|
|
160
|
-
ponytail_cfg="$APPDATA/ponytail/config.json"
|
|
161
|
-
else
|
|
162
|
-
ponytail_cfg="$HOME/.config/ponytail/config.json"
|
|
163
|
-
fi
|
|
164
|
-
|
|
165
|
-
echo
|
|
166
|
-
if [[ -f "$ponytail_cfg" ]]; then
|
|
167
|
-
ok "$ponytail_cfg already exists (left untouched)"
|
|
168
|
-
else
|
|
169
|
-
gap "$ponytail_cfg not found"
|
|
170
|
-
plan "create $ponytail_cfg with {\"defaultMode\":\"full\"}"
|
|
171
|
-
if [[ $APPLY -eq 1 ]]; then
|
|
172
|
-
mkdir -p "$(dirname "$ponytail_cfg")"
|
|
173
|
-
printf '{"defaultMode":"full"}\n' > "$ponytail_cfg"
|
|
174
|
-
echo " -> created $ponytail_cfg"
|
|
175
|
-
fi
|
|
176
|
-
fi
|
|
177
|
-
|
|
178
|
-
echo
|
|
179
|
-
if [[ $GAPS -eq 0 ]]; then
|
|
180
|
-
echo "All ponytail checks passed for harness: $harness."
|
|
181
|
-
elif [[ $APPLY -eq 1 ]]; then
|
|
182
|
-
echo "Applied plan for $GAPS gap(s)."
|
|
183
|
-
else
|
|
184
|
-
echo "$GAPS gap(s) found. Re-run with --apply to fix."
|
|
185
|
-
fi
|