@xaccefy/sweep

Lazy senior dev mode for the Pi agent harness. The best code is the code you never wrote.

Packages

Package details

extensionskill

Install @xaccefy/sweep from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@xaccefy/sweep
Package
@xaccefy/sweep
Version
0.1.4
Published
Aug 16, 2026
Downloads
423/mo · 325/wk
Author
xaccefy
License
MIT
Types
extension, skill
Size
76 KB
Dependencies
0 dependencies · 0 peers
Pi manifest JSON
{
  "extensions": [
    "./pi-extension/index.js"
  ],
  "skills": [
    "./skills"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

Sweep

Lazy senior-dev mode for your AI coding agent. It climbs the ladder — does it need to exist, is it already here, does the stdlib do it, is there a native feature, an installed dep, can it be one line — and only then writes the minimum that works.

This fork is built for Pi.

Fork of ponytail. Sweep is a direct fork, restructured as a Pi-first skill extension and trimmed for personal use. What changed from upstream:

  • Pi-only. Every non-Pi harness integration was removed — Claude, Codex, Copilot, Cursor, Windsurf, Cline, Kiro, Qoder, OpenCode, Gemini, Devin, Hermes, OpenClaw, the MCP server, and all their config/command/hook files.
  • Renamed ponytailsweep throughout (commands, skills, hooks, package, docs).
  • No branding in your code. The ponytail: comment marker is replaced by a natural shortcut: marker, and /sweep-debt harvests those. The agent no longer stamps a tool name into your edits.
  • No assets. Logos, sponsor, waitlist banners, and chart images were dropped; this README is text-only.
  • Repointed to this fork (x4cc3/sweep) and emoji stripped.

Before / after

You ask for a date picker. Your agent installs flatpickr, writes a wrapper component, adds a stylesheet, and opens a timezone debate.

With sweep:

<input type="date">

How it works

Before writing code, the agent stops at the first rung that holds:

1. Does this need to exist?   → no: skip it (YAGNI)
2. Already in this codebase?  → reuse it, don't rewrite
3. Stdlib does it?            → use it
4. Native platform feature?   → use it
5. Installed dependency?      → use it
6. One line?                  → one line
7. Only then: the minimum that works

The ladder runs after the problem is understood, not instead of it: read the code it touches and trace the real flow before picking a rung. Lazy about the solution, never about reading.

Lazy, not negligent: trust-boundary validation, data-loss handling, security, and accessibility are never on the chopping block.

Install

Pi (recommended):

pi install git:github.com/x4cc3/sweep

Or from npm:

npm install @xaccefy/sweep

Active every session, with a handful of commands (see below). /sweep ultra for when the codebase has wronged you personally. The current level shows in the status bar. Turning sweep off — or back on — is saved and survives fresh Pi sessions; changing the intensity while it is already on applies to the current session only. Set or override the level for every new session with SWEEP_DEFAULT_MODE (lite/full/ultra/off) or a defaultMode field in ~/.config/sweep/config.json (%APPDATA%\sweep\config.json on Windows). The environment variable wins over saved configuration. Default is full.

Other harnesses

This fork is Pi-only — every non-Pi integration was deliberately stripped (see the fork note above). If you want sweep on another agent (Claude Code, Codex, Cursor, …), open an issue or a PR rather than forking the old harness code back in. A clean, self-contained adapter for one harness is welcome; a pile of half-maintained stubs is not.

Commands

Command What it does
/sweep [lite | full | ultra | off] Set the intensity for this session, or turn sweep off. off (and turning it back on) is saved; a level change while it is already on is not. No argument activates the configured default (full if it is off).
/sweep status Report the current level and effective default.
/sweep default <lite | full | ultra | off> Change the saved default without changing the current session.
/sweep-review Review the current diff for over-engineering, hands back a delete-list.
/sweep-audit Audit the whole repo for over-engineering, not just the diff.
/sweep-debt Harvest shortcut: comments into a tracked ledger of deferred work.
/sweep-gain Show the measured impact scoreboard (less code, less cost, more speed).
/sweep-help Quick reference for the commands above.

Marking shortcuts

When sweep takes a deliberate shortcut with a known ceiling — a global lock, an O(n²) scan, a naive heuristic — it leaves a shortcut: comment naming the ceiling and the upgrade path. Normal or trivial code gets no comment. /sweep-debt collects those into a ledger so a deferral can't quietly become permanent.

Measured, not claimed

The technique is benchmarked upstream against a no-skill baseline — method and per-task tables live in the parent project, ponytail. This fork ships the skill, the Pi extension, and a small seven-probe behavior benchmark. The full agentic harness and published result tables remain upstream.

Development

npm test runs the offline benchmark-grader and Pi-extension tests.

npm run benchmark runs the opt-in baseline-vs-Sweep behavior benchmark with Promptfoo. It requires Node.js 22.22 or newer plus ANTHROPIC_API_KEY, and it incurs API usage; the offline grader tests run through npm test and require neither network nor a key.

License

MIT.