New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@piotr-oles/pi-yagni

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@piotr-oles/pi-yagni

Pi Agent extension: inject YAGNI discipline — build the minimum that works, reuse before writing, no speculative code

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
7
133.33%
Maintainers
1
Weekly downloads
 
Created
Source

pi-yagni

A pi coding agent extension that injects YAGNI ("You Aren't Gonna Need It") discipline into the agent — build the minimum that works, reuse before writing, no speculative code.

Install

pi install npm:@piotr-oles/pi-yagni

Usage

No configuration. Enabled whenever installed. Uninstall to disable.

How it works

Injects a YAGNI instruction block into the system prompt at session start. The block gives the agent a decision ladder — stop at the first rung that holds — before writing any code:

  • Does this need to be built at all?
  • Does it already exist in this codebase? Reuse it.
  • Does the standard library do this?
  • Does a native platform feature cover it?
  • Does an already-installed dependency solve it?
  • Can this be one line?
  • Only then: write the minimum code that works.

Plus rules against speculative generality, premature abstraction, and unrequested error handling / caching / logging.

This extension is very lite on context — adds only a few lines of text to the system prompt.

Development

pnpm install
pnpm test
pnpm typecheck
pnpm check

To test changes manually, pass the source entry point directly to pi:

pi -e packages/pi-yagni/src/index.ts

Keywords

pi-package

FAQs

Package last updated on 22 Jul 2026

Related posts