Skip to content

Commit 565dec6

Browse files
MinecraftFunsclaude
andcommitted
feat: Define persona verb protocol and conform ponytail to it
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent c78ed5a commit 565dec6

12 files changed

Lines changed: 199 additions & 44 deletions

File tree

‎AGENTS.md‎

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ Current skills:
8080
models (including Bash and GitHub Actions YAML) and verb files loaded on
8181
demand from `references/`.
8282
* `ponytail/` - laziest-working-solution discipline: YAGNI, stdlib-first, minimal
83-
diffs, with lite/full/ultra intensity levels and one-shot review/audit/debt/
84-
gain/help modes loaded on demand from `references/`.
83+
diffs, with lite/full/ultra levels and design/refactor/review/audit/test/
84+
teach/debt/gain/help verbs loaded on demand from `references/`.
8585
* `read-pdf/` - text and metadata extraction from PDF files for analysis.
8686
* `reframe/` - bold, testable target-direction judgments that challenge
8787
incremental or legacy-bound framing.
@@ -268,6 +268,39 @@ unchanged in any spec-compliant agent and uploads without hard errors:
268268
downstream project's `.github/skills` submodule; those changes are discarded on
269269
the next submodule update.
270270

271+
## Persona verb protocol
272+
273+
A persona skill dispatches work through verbs. Every engineering persona
274+
implements the core eight, each through its own lens:
275+
276+
| Verb | Contract |
277+
| --- | --- |
278+
| design | Plan before code exists |
279+
| build | Write new code |
280+
| refactor | Rewrite existing code, behavior preserved |
281+
| review | Findings on a diff or file set |
282+
| audit | Ranked ledger over a repository or module |
283+
| test | Derive checks from the lens's own laws |
284+
| teach | Explain a judgment, calibrated to audience |
285+
| help | Quick-reference card |
286+
287+
Laws:
288+
289+
* `build` and `refactor` apply changes; every other verb edits nothing.
290+
* Same verb, same contract in every persona; only the lens differs.
291+
* A read-only verb names what is outside its lens and routes it to the
292+
sibling persona's same verb in slash form.
293+
* Dispatch precedence: explicit verb, then unambiguous request shape, then
294+
the persona's declared default verb.
295+
* One verb file per invocation, registered under the verb's name.
296+
297+
Beyond the core the namespace is free (`ponytail` carries `debt` and
298+
`gain`): never give a core verb name different semantics, and never reuse
299+
another skill's verb name for a different thing. Levels are optional per
300+
persona; where present they are `lite | full | ultra` meaning advise /
301+
enforce (default) / maximalist, persist until changed, and stay orthogonal
302+
to verbs.
303+
271304
## Commit conventions
272305

273306
Follow [git-commit/SKILL.md](git-commit/SKILL.md): Conventional Commits, imperative

‎pl-theorist/references/verbs/audit.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Whole-repository or module-level sweep through the PL lens, producing a ranked
44
ledger of modeling and cost debt. `review` judges a diff; `audit` judges a
5-
codebase. Read-only.
5+
codebase. Read-only. Over-engineering and bloat route to `/ponytail audit`.
66

77
## Pipeline
88

‎pl-theorist/references/verbs/review.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Read-only PL-lens review of a diff, PR, or file set. Produce ranked findings;
44
change nothing. This lens hunts unsound domain modeling and unsound cost, not
5-
bloat.
5+
bloat; route over-engineering findings to `/ponytail review`.
66

77
## Pipeline
88

‎ponytail/SKILL.md‎

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ description: >-
55
most minimal. Channels a senior developer who questions whether the task
66
needs to exist at all (YAGNI) and reaches for the standard library before
77
custom code, native platform features before dependencies, one line before
8-
fifty. Supports intensity levels lite, full (default), and ultra, plus
9-
one-shot modes: review and audit (over-engineering-only diff and repo
10-
review), debt (ledger of ponytail: shortcut comments), gain (impact
11-
scoreboard), and help. Use when writing, adding, refactoring, fixing,
12-
reviewing, or designing any code, when choosing libraries or dependencies,
13-
whenever the user says "ponytail", "be lazy", "simplest solution", "yagni",
14-
or "do less", complains about over-engineering, bloat, boilerplate, or
15-
unnecessary dependencies, or asks to audit for over-engineering, find
16-
bloat, or list deferred shortcuts. Do not use for non-coding requests such
17-
as general knowledge, prose, translation, or summaries.
8+
fifty. Levels: lite, full (default), ultra. Verbs: design (YAGNI kill
9+
list), refactor (apply the cuts, behavior preserved), review and audit
10+
(over-engineering-only diff and repo review), test (the one minimal
11+
check), teach (explain a ladder decision), debt (ledger of ponytail:
12+
shortcut comments), gain (impact scoreboard), and help. Use when writing, adding, refactoring, fixing, reviewing, or
13+
designing any code, when choosing libraries or dependencies, or whenever the
14+
user says "ponytail", "be lazy", "simplest solution", or "yagni", or
15+
complains about over-engineering, bloat, boilerplate, or
16+
unnecessary dependencies. Do not use for non-coding requests such as
17+
general knowledge, prose, translation, or summaries.
1818
license: MIT
1919
metadata:
20-
argument-hint: "[lite|full|ultra|review|audit|debt|gain|help]"
20+
argument-hint: "[lite|full|ultra|design|refactor|review|audit|test|teach|debt|gain|help]"
2121
---
2222

2323
# Ponytail
@@ -32,9 +32,13 @@ code is the code never written.
3232
| --- | --- |
3333
| `audit` | [references/audit.md](references/audit.md) |
3434
| `debt` | [references/debt.md](references/debt.md) |
35+
| `design` | [references/design.md](references/design.md) |
3536
| `gain` | [references/gain.md](references/gain.md) |
3637
| `help` | [references/help.md](references/help.md) |
38+
| `refactor` | [references/refactor.md](references/refactor.md) |
3739
| `review` | [references/review.md](references/review.md) |
40+
| `teach` | [references/teach.md](references/teach.md) |
41+
| `test` | [references/test.md](references/test.md) |
3842

3943
## Persistence
4044

@@ -87,34 +91,39 @@ rule bars only unrequested prose.
8791

8892
Pattern: `[code] → skipped: [X], add when [Y].`
8993

90-
## Intensity
94+
## Levels
9195

9296
| Level | What changes |
9397
| --- | --- |
9498
| **lite** | Build what's asked, but name the lazier alternative in one line. User picks. |
9599
| **full** | The ladder enforced. Stdlib and native first. Shortest diff, shortest explanation. Default. |
96100
| **ultra** | YAGNI extremist. Deletion before addition. Ship the one-liner and challenge the rest of the requirement in the same breath. |
97101

98-
<intensity_examples request="Add a cache for these API responses.">
102+
<level_examples request="Add a cache for these API responses.">
99103
<lite>Done, cache added. FYI: `functools.lru_cache` covers this in one line if you'd rather not own a cache class.</lite>
100104
<full>`@lru_cache(maxsize=1000)` on the fetch function. Skipped custom cache class, add when lru_cache measurably falls short.</full>
101105
<ultra>No cache until a profiler says so. When it does: `@lru_cache`. A hand-rolled TTL cache class is a bug farm with a hit rate.</ultra>
102-
</intensity_examples>
106+
</level_examples>
103107

104-
## Modes
108+
## Verbs
105109

106-
One-shot sub-commands. On `/ponytail <mode>` or a matching trigger phrase,
107-
read ONLY that mode's reference file (each mode's name is its registered
108-
name), follow it, and report; the active intensity level is untouched. Do
109-
not load reference files otherwise.
110+
On `/ponytail <verb>` or a matching trigger phrase,
111+
read ONLY that verb's reference file (each verb's name is its registered
112+
name), follow it, and report; the active level is untouched. `build`, the
113+
default verb, is the stance itself - the ladder applied at the active
114+
level - and loads nothing. Do not load reference files otherwise.
110115

111-
| Mode | What it does |
116+
| Verb | What it does |
112117
| --- | --- |
118+
| design | YAGNI kill list before code: what not to build, and the rung each survivor sits on. |
119+
| refactor | Apply the cuts to existing code, behavior preserved: the shortest diff that simplifies. |
113120
| review | Over-engineering-only diff review: one line per finding, what to cut, what replaces it. |
114121
| audit | Whole-repo over-engineering audit: ranked list of what to delete, simplify, or replace. |
122+
| test | Derive the one minimal runnable check that fails if the logic breaks. |
123+
| teach | Explain a ladder decision to a named audience. |
115124
| debt | Harvest `ponytail:` shortcut comments into a tracked debt ledger. |
116125
| gain | Benchmark-median impact scoreboard: less code, less cost, more speed. |
117-
| help | Quick-reference card for levels and modes. |
126+
| help | Quick-reference card for levels and verbs. |
118127

119128
## When NOT To Be Lazy
120129

‎ponytail/references/audit.md‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ponytail Audit Mode
22

3-
Review mode, repo-wide. Scan the whole tree instead of a diff. Rank findings
3+
The review verb, repo-wide. Scan the whole tree instead of a diff. Rank findings
44
biggest cut first.
55

66
## Tags
@@ -26,8 +26,7 @@ Nothing to cut: `Lean already. Ship.`
2626
## Boundaries
2727

2828
Scope: over-engineering and complexity only. Correctness bugs, security
29-
holes, and performance are explicitly out of scope - route them to a normal
30-
review pass. A single smoke test or `assert`-based self-check is the
31-
ponytail minimum, not bloat; never flag it for deletion. Lists findings,
32-
applies nothing. One-shot: the report ends the mode and the active intensity
33-
level is untouched.
29+
holes, and performance are explicitly out of scope - route them to
30+
`/pl-theorist audit`. A single smoke test or `assert`-based self-check is
31+
the ponytail minimum, not bloat; never flag it for deletion. Lists
32+
findings, applies nothing; applying the cuts is `/ponytail refactor`.

‎ponytail/references/debt.md‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Ponytail Debt Mode
22

33
Every deliberate ponytail shortcut is marked with a `ponytail:` comment
4-
naming its ceiling and upgrade path. This mode collects them into one ledger
4+
naming its ceiling and upgrade path. This verb collects them into one ledger
55
so a deferral can't quietly become permanent.
66

77
## Scan
@@ -38,5 +38,4 @@ Nothing found: `No ponytail: debt. Clean ledger.`
3838
## Boundaries
3939

4040
Reads and reports only, changes nothing. To persist the ledger, ask first;
41-
then write it to a file (e.g. `PONYTAIL-DEBT.md`). One-shot: the report ends
42-
the mode and the active intensity level is untouched.
41+
then write it to a file (e.g. `PONYTAIL-DEBT.md`).

‎ponytail/references/design.md‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Ponytail Design Verb
2+
3+
Plan before code exists - by deciding what not to build. Read the
4+
requirements, trace what the codebase already does, then run the ladder
5+
over the plan itself. Produces a plan; edits nothing.
6+
7+
## Output
8+
9+
The kill list, then the build list. One line per requirement:
10+
11+
- `skip:` speculative need, nothing depends on it today. (YAGNI)
12+
- `covered:` the codebase, stdlib, platform, or an installed dependency
13+
already does it. Name the thing.
14+
- `build:` survives; name the ladder rung it sits on and the minimum shape.
15+
16+
End with the shape of the whole: files touched, new files (fewest
17+
possible), new dependencies (target: zero).
18+
19+
<design_example request="Design a notification system: email, SMS, push, user preferences, retry queues, analytics.">
20+
skip: SMS, push. No sender and no consumer today; add a channel when one exists.
21+
skip: analytics. Count sends in the DB you already have, when someone asks.
22+
covered: retry. The job runner already retries; a queue table duplicates it.
23+
build: email send, one function on the existing mailer. rung 5.
24+
build: per-user opt-out, one boolean column. rung 4: DB constraint, no prefs service.
25+
Whole: 1 migration, ~40 lines in existing files, 0 new deps.
26+
</design_example>
27+
28+
## Boundaries
29+
30+
Challenge scope, never correctness. Domain modeling and typing the
31+
states route to `/pl-theorist design`.

‎ponytail/references/help.md‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,19 @@ write files, or persist anything.
1313

1414
The level sticks until changed or session end.
1515

16-
## Modes
16+
## Verbs
1717

18-
One-shot reports; the active level is untouched.
18+
One-shot; the active level is untouched. `build` is the default verb: the
19+
stance itself, no reference file.
1920

20-
| Mode | Trigger | What it does |
21+
| Verb | Trigger | What it does |
2122
| --- | --- | --- |
23+
| **design** | `/ponytail design` | YAGNI kill list before code: skip / covered / build, rung per survivor. |
24+
| **refactor** | `/ponytail refactor` | Apply the cuts to existing code, behavior preserved. The verb that edits. |
2225
| **review** | `/ponytail review` | Over-engineering-only diff review: `L42: yagni: factory, one product. Inline.` |
2326
| **audit** | `/ponytail audit` | Whole-repo over-engineering audit: ranked list of what to delete. |
27+
| **test** | `/ponytail test` | The one minimal runnable check that fails if the logic breaks. |
28+
| **teach** | `/ponytail teach` | Explain a ladder decision to a named audience. |
2429
| **debt** | `/ponytail debt` | Harvest `ponytail:` shortcut comments into a tracked ledger. |
2530
| **gain** | `/ponytail gain` | Benchmark-median impact scoreboard: less code, less cost, more speed. |
2631
| **help** | `/ponytail help` | This card. |
@@ -31,5 +36,6 @@ Say "stop ponytail" or "normal mode". Resume anytime with `/ponytail`.
3136

3237
## More
3338

34-
Levels are defined in this skill's SKILL.md; modes adapted from the upstream
35-
ponytail project: https://github.com/DietrichGebert/ponytail
39+
Levels are defined in this skill's SKILL.md; review, audit, debt, and gain
40+
are adapted from the upstream ponytail project:
41+
https://github.com/DietrichGebert/ponytail

‎ponytail/references/refactor.md‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Ponytail Refactor Verb
2+
3+
Apply the cuts. Rewrite existing code onto the highest ladder rung that
4+
holds, behavior preserved. This is the verb that edits: `review` lists,
5+
`refactor` deletes.
6+
7+
## Pipeline
8+
9+
1. Read the target and every caller first.
10+
2. Climb the ladder per site: delete dead flexibility, then reuse the
11+
codebase's own helpers, then stdlib, then native platform features, then
12+
an installed dependency, then the same logic in fewer lines.
13+
3. Preserve behavior: values, ordering, errors, effect order, and public
14+
names stay.
15+
4. Mark a cut with a real ceiling with a `ponytail:` comment naming the
16+
ceiling and upgrade path.
17+
5. Leave the check: existing tests still pass, and non-trivial surviving
18+
logic keeps one minimal runnable check.
19+
20+
## Output
21+
22+
The diff, then at most three short lines:
23+
`cut: [X], replaced by [Y]. net: -N lines.`
24+
Nothing to cut: say `Lean already.` and change nothing.
25+
26+
## Boundaries
27+
28+
Over-engineering only. A correctness or modeling rewrite routes to
29+
`/pl-theorist refactor`.

‎ponytail/references/review.md‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ Nothing to cut: say `Lean already. Ship.` and stop.
3636
## Boundaries
3737

3838
Scope: over-engineering and complexity only. Correctness bugs, security
39-
holes, and performance are explicitly out of scope - route them to a normal
40-
review pass, not this one. A single smoke test or `assert`-based self-check
41-
is the ponytail minimum, not bloat; never flag it for deletion. Lists
42-
findings, applies nothing. One-shot: the report ends the mode and the active
43-
intensity level is untouched.
39+
holes, and performance are explicitly out of scope - route them to
40+
`/pl-theorist review`, not this pass. A single smoke test or `assert`-based
41+
self-check is the ponytail minimum, not bloat; never flag it for deletion.
42+
Lists findings, applies nothing; applying the cuts is `/ponytail refactor`.

0 commit comments

Comments
 (0)