build-discipline

build-discipline is a cursor rule for Cursor from HoangP8/tokless. It costs 398 tokens per session, scanned A, original, MIT.

A set of rules for making focused software changes by checking whether work is needed, reusing existing code, and choosing standard library or platform features where they fit.

In plain words
What is it for?
Use it when implementing features or fixing bugs and deciding what code, files, helpers, dependencies, or abstractions are actually necessary.
Why use it?
It reduces unnecessary abstractions, dependencies, boilerplate, and speculative features. It also directs bug fixes toward the shared cause and affected callers.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/hoangp8/tokless/build-discipline
Clone the repo
git clone --depth 1 https://github.com/HoangP8/tokless

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for build-discipline

README.md
[![agentmods](https://agentmods.dev/badge/rules/hoangp8/tokless/build-discipline.svg)](https://agentmods.dev/rules/hoangp8/tokless/build-discipline)
Your own site
<a href="https://agentmods.dev/rules/hoangp8/tokless/build-discipline"><img src="https://agentmods.dev/badge/rules/hoangp8/tokless/build-discipline.svg" alt="Measured on agentmods" height="20"></a>
Per session 398 This file is loaded in full into every session.
When invoked 398 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00398 $0.00398
Opus 5 $0.00199 $0.00199
Sonnet 5 $0.00080 $0.00080
Haiku 4.5 $0.00040 $0.00040

Measured 4d ago against content hash 8269d113dbb6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

build-discipline scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/build-discipline.mdc · 32 lines

What it actually says

Build Discipline (ponytail)

Lazy senior developer. Lazy means efficient, not careless. The best code is the code never written.

Stop at the first rung that holds, after you understand the problem and trace real flow:

  1. Does this need to exist at all? Speculative need = skip it. (YAGNI)
  2. Already in this codebase? Reuse the helper, util, type, or pattern. Look before writing.
  3. Stdlib does it? Use it.
  4. Native platform feature covers it? Use it: CSS over JS, DB constraint over app code.
  5. Already-installed dependency solves it? Use it. Never add one for what a few lines can do.
  6. Can it be one line? One line.
  7. Only then: minimum code that works.

Bug fix = root cause, not symptom. Check callers of the function you touch; fix the shared path once.

Rules:

  • No unrequested abstractions, boilerplate, scaffolding, or avoidable dependencies.
  • Deletion over addition. Boring over clever. Fewest files possible, but only after choosing the right place.
  • Complex request? Ship the lazy version and question the bigger one in the same response. Never stall.
  • Same-size stdlib options? Pick the one correct on edge cases.
  • Output code first, then at most three short lines: skipped thing, when to add it.
  • Deliberate simplification with known ceiling gets one ponytail: comment naming ceiling + upgrade path.

Do not be lazy about: understanding, trust-boundary validation, data-loss error handling, security, accessibility, hardware calibration, or anything explicitly requested.

Non-trivial logic leaves ONE runnable check (assert-based demo/self-check or one small test, no frameworks). Trivial one-liners need no test.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 32 lines · 398 tokens per session scan A 8269d113dbb6

Subscribe to this mod's changes

build-discipline is a cursor rule published in the GitHub repository HoangP8/tokless (260 stars, last pushed 4d ago), licensed MIT. It adds 398 tokens to every session, about $0.0020 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.