---
name: ponytail
description: >-
  Lazy-senior-dev code style — the simplest thing that actually works. Seven-rung ladder from YAGNI down to minimal new code; deliberate shortcuts carry a marked ceiling and upgrade path; never collapses constitution-mandated abstractions. Use on any coding task and any library choice. Adapted from DietrichGebert/ponytail (MIT).
title: ponytail
canonical_url: https://skilld.dev/gh/doxuta/ai-factory-kit/ponytail
last_updated: 2026-11-12T06:31:13.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> If the user asked to install this Skill, run `npx skilld install doxuta/ai-factory-kit/ponytail`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/ponytail`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/doxuta/ai-factory-kit/ponytail) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/ponytail`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/ponytail --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/ponytail --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

<!-- WHO READS ME: an agent about to write, refactor, or review code. I POINT TO:
     ../../../constitution/constitution-template.md (Article VII — my boundary) ·
     ../caveman/SKILL.md (my pair — I compress code, it compresses talk) ·
     ../plan-and-tdd/SKILL.md (the loop I run inside). -->

# Ponytail — the best code is code never written

Lazy means efficient, not careless. The ladder runs AFTER understanding the problem: read the
task and the code it touches, trace the real flow end-to-end, then climb. The smallest diff in
the wrong place is not lazy — it is a second bug.

## The ladder — stop at the first rung that holds

1. **Does this need to exist at all?** Speculative need = skip it, say so in one line. (YAGNI)
2. **Already in this codebase?** Reuse the helper/pattern three files away — look before
   writing; re-implementing the neighbor is the most common slop.
3. **Stdlib does it?** Use it.
4. **Native platform covers it?** [EXAMPLE: `<input type="date">` over a date-picker library,
   CSS over JS, a database constraint over app-level validation.]
5. **Already-installed dependency solves it?** Use it. Never add a dep for what a few lines do.
6. **One line?** One line.
7. **Only then**: the minimum new code that works.

Two rungs both hold → take the higher one and move on. Two stdlib options the same size →
take the edge-case-correct one: lazy means less code, not the flimsier algorithm.

## Rules

- No unrequested abstractions: no interface with one implementation, no factory for one
  product, no config knob for a value that never changes.
- Deletion over addition. Boring over clever (clever = what someone decodes at 3am). Fewest
  files; shortest working diff wins.
- **Bug fix = root cause.** Grep every caller of the function you touch; one guard in the
  shared function beats a guard in each caller — and patching only the reported path leaves
  the sibling callers broken.
- **Mark deliberate shortcuts** with the project's marker comment — `shortcut:` per the
  [constitution template](../../../constitution/constitution-template.md); upstream uses
  `ponytail:`; pick ONE per project so it stays greppable — carrying the ceiling and the
  upgrade path. [EXAMPLE: `// shortcut: O(n) scan — add an index past ~10k rows`.]

## BOUNDARY — the constitution outranks laziness

Some abstractions are mandated, not optional: the layer separation, the data-isolation
filters, the metadata indirection, the migration discipline — whatever the project's
constitution Articles I–III name. **Those are not over-engineering, and ponytail never
collapses them for brevity.** Measured on a production repo: the tempting collapses (inline
the query "to skip a layer", hardcode the dynamic field "to save an indirection", drop the
isolation filter "for a cleaner query") are each a constitution violation, not a
simplification. Ponytail operates INSIDE a layer — don't bloat a service, don't add a dep the
installed one covers, don't rewrite the existing helper — never ACROSS the boundaries the
constitution draws. When laziness and the constitution conflict, **the constitution wins**:
[constitution-template Article VII](../../../constitution/constitution-template.md) encodes
exactly this rule.

## Never lazy about

Understanding the problem · input validation at trust boundaries · error handling that
prevents data loss · security and isolation · accessibility · anything explicitly requested ·
one runnable check for any non-trivial logic (TDD stays — ponytail kills surplus fixtures,
not tests).

Off: "stop ponytail" / "normal mode".
