Skip to content

feat(loop): builders follow a reuse-first ladder ported from ponytail, and the critic walks it - #231

Merged
Ardnived merged 5 commits into
mainfrom
claude/ponytail-ladder
Oct 31, 2026
Merged

Ardnived merged 5 commits into
mainfrom
claude/ponytail-ladder

Conversation

@Ardnived

Copy link
Copy Markdown
Contributor

Summary

  • The code-writing handlers now follow a reuse-first ladder ported from ponytail, and read the profile's values before they build.
  • review-pr walks the same ladder for each new piece. shortcut: becomes a protected comment marker, and hygiene looks for duplicate helpers.

Failure prevented: the profile's top two values ("every layer must pay rent", then built-in → library → own code) reached only the critic. implement-ticket, address-review and fix-ci had no reuse-first rule. So bloat was built first and then reviewed out, one critic pass per PR. SahajAtlasWeb#243 and #247 passed that pass clean on every thread, and the reviewer still asked why the diff needed so many helpers.

Change outline

Who reads the ladder

  implement-ticket  step 7   + ladder.md, + profile "Values, ranked"
  address-review    Adopt    + ladder.md, + profile "Values, ranked"
  fix-ci            step 3   + ladder.md (for its bug-fix rule)
  review-pr         lens 1   + for each new piece: repo path / platform API / installed package, named, or no finding

The floor, split by role

  builder (ladder.md)  never remove: trust-boundary validation, data-loss handling, security, a11y, anything asked for
                       never add:    unasked machinery against an unmeasured harm (rate limit, cache, dedupe, retry, redaction)
  critic (review-pr)   the profile: the ladder check raises no test, scale or speed point

The shortcut: marker

+ comment-protect.json   K6 "shortcut marker"  \bshortcut:   KEEP: may be reworded, the limit and trigger survive
+ comment-lint.mjs       PROTECTED … |\bshortcut:
+ docs/code-comments.md  rule bullet, and the protect list

Test results

  • Lean gate: ✓ claude plugin validate ./workflow --strict, plus node --test workflow/lib/*.test.mjs 97/97, with a new K6 fixture. comment-lint.mjs --selftest passes with a new sparing case.
  • rule-delta.mjs --base origin/main workflow/skills: 89 → 90 directives. Added: "Never remove". No directive disappeared.
  • Security review (trigger pattern matches): done by hand, not with /security-review. There is no frontmatter or allowed-tools change and no new script. The one new regex is an alternation (\bshortcut:) with no backtracking.

Notes for reviewer

  • One PR, five commits, one behaviour each. Each commit reverts on its own: the ladder, the critic check, the marker, hygiene, and the version bump. They ship together by choice. The cost: if review findings drop, we can't tell whether the builders got leaner or the critic got quieter.
  • Follow-up after merge: one PR each in SahajCloud, WeMeditateWeb, SahajAtlasWeb and SahajAtlasWordpress, adding the shortcut: lines to the copies' canonical block. comment-rule-sync.mjs compares the copies with each other, so all four move together.
  • Judgement calls worth checking:
    • Builders read the profile's Values, ranked (about 95 lines per build) instead of a copy of it, so improve-loop keeps refining a single file.
    • fix-ci gets the ladder only.
    • The ladder drops ponytail's levels, its reply footer, its comment advice and its "one small test". implement-ticket step 9 already demands a test that fails first for every changed behaviour.
  • How to judge it: improve-loop grades this PR. Over the next weeks, watch simplicity and reuse threads per PR (critic's and yours), address-review rounds per PR, and lines added per ticket.
Detail
  • Source: skills/ponytail/SKILL.md in DietrichGebert/ponytail at 96608e0 (v5.3.3), MIT. The licence sits beside the copy as ladder.LICENSE, and the README credits it.
  • Ported, not installed: a cloud session loads no plugin from any settings file (cloud environments: what carries over). why.md#a-skill-can-name-a-plugin-no-routine-has recorded ListPlugins coming back empty in 31 routine sessions. Maintainers run the plugin itself locally.
  • Rejected:
    • Reading upstream at a pinned commit at run time. A third-party file would steer a session with push access to five repos, and the conflicting rules could only be overridden, not removed.
    • A claude.ai account skill. It sits outside git, is unpinned, and reaches every session.
    • Porting ponytail-review whole. Its test, scale and speed categories are areas the profile forbids. Its four-part findings overflow the reviewBody and reviewReply budgets. It would also repeat finalize-pr's /simplify + /code-review pass.
    • Vendoring ponytail-map.js. It's more code to maintain, and SahajCloud overflows its 2,000-character budget.
  • The benchmark: ponytail's −53% was measured in empty folders with CLAUDE.md loading off. Against these repos' rules and profile, expect a smaller effect.

🤖 Generated with Claude Code

Ardnived and others added 5 commits October 31, 2026 09:29
The reviewer profile's first two values — every layer pays rent, built-in
before library before own code — reached only review-pr. implement-ticket,
address-review and fix-ci wrote with no reuse-first rule, so bloat was built
and then reviewed out, once per PR, and SahajAtlasWeb#243/#247 show the critic
passing it clean while the reviewer still asked about the aggregate.

ladder.md is ponytail's core prompt (MIT, at 96608e0), trimmed to the rungs
and the floor. A routine loads no plugin, so it is ported like
change-outline.md rather than installed. implement-ticket and address-review
also read the profile's Values, ranked before building; fix-ci takes the ladder
alone, for its bug-fix rule.

The floor is split by role: builders never remove trust-boundary validation,
data-loss handling, security or accessibility, and never add machinery against
an unmeasured harm. The critic's side follows in the next commit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
review-pr's simplicity lens asked whether the diff was bigger than the
ticket, but never named what made a new piece unnecessary. The profile's
"every layer must pay rent" findings arrive as the reviewer's questions
instead: "isn't there already a withRetry?", "any Vike plugin for this?".

The critic now asks, for each file, function, type or dependency the diff
adds, whether the repo, the platform or an installed package already does
it, and files only an answer it can name. A named shortcut: is a decision.
The check raises no test, scale or speed point, because the profile says
the reviewer never does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The ladder, and ponytail in maintainers' local sessions, mark an accepted
limit as `shortcut: <the limit>, <when to upgrade>`, and /ponytail-debt
lists them. Nothing protected that marker: a Saturday comment sweep could
collapse it, and comment-lint would flag one that happened to contain a
banned phrasing such as "as requested".

K6 in comment-protect.json keeps the limit and the trigger through any sweep
(reworded is fine), comment-lint skips the line as it skips a ⚠, and the
canonical rule names it beside the other protected comments. The four
product-repo copies of the rule's canonical block follow in one PR each.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The simplicity angle looked for indirection, unused options and renaming
wrappers, but not for the duplicates ponytail's audit lists: two helpers
doing one job, and near-copies that must change together. The profile asks
the same question in review ("isn't there already a withRetry function?",
WeMeditateWeb#107); this lets Saturday find the ones already merged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant