Decision Ladder
Ponytail-inspired YAGNI enforcement for botte-secrete. Before writing ANY code, climb this ladder. Each rung that passes saves the cost of every rung above it.
The Ladder
- stdlib — Is this already in Python's standard library? (os, pathlib, json, re, ast, sqlite3, http, etc.)
- regex_oneliner — Can a regex, string method, or one-liner do it? No function needed.
- existing_module — Does an existing botte skill already handle this? Reuse > rebuild.
- new_code — No simpler alternative exists. Write the minimal implementation.
Usage
from skills.decision_ladder.ladder import climb, audit_task_list
# Single task
result = climb("extract function names from a Python file")
# → LadderResult(rung="stdlib", solution="ast module (ast.parse/walk)", saved_lines=15)
# Audit a task list
report = audit_task_list([
"parse JSON config",
"design auth middleware",
"count word frequency in text",
"strip HTML tags from string",
"implement custom OR-Tools solver",
])
# → avoidable_pct: 80%, lines_saved: 85
Integration
Add to workflow-check as a pre-code hook. See hook.py.
Metrics
Tracks:
- % of tasks that could be avoided (stdlib, regex, existing module)
- Estimated lines saved per task
- Confidence score per suggestion
1---2name: decision-ladder3description: Ponytail-inspired YAGNI enforcement — climb the decision ladder before writing any code. stdlib → regex → existing module → new code.4---56# Decision Ladder78Ponytail-inspired YAGNI enforcement for botte-secrete. Before writing ANY code, climb this ladder. Each rung that passes saves the cost of every rung above it.910## The Ladder11121. **stdlib** — Is this already in Python's standard library? (os, pathlib, json, re, ast, sqlite3, http, etc.)132. **regex_oneliner** — Can a regex, string method, or one-liner do it? No function needed.143. **existing_module** — Does an existing botte skill already handle this? Reuse > rebuild.154. **new_code** — No simpler alternative exists. Write the minimal implementation.1617## Usage1819```python20from skills.decision_ladder.ladder import climb, audit_task_list2122# Single task23result = climb("extract function names from a Python file")24# → LadderResult(rung="stdlib", solution="ast module (ast.parse/walk)", saved_lines=15)2526# Audit a task list27report = audit_task_list([28 "parse JSON config",29 "design auth middleware",30 "count word frequency in text",31 "strip HTML tags from string",32 "implement custom OR-Tools solver",33])34# → avoidable_pct: 80%, lines_saved: 8535```3637## Integration3839Add to workflow-check as a pre-code hook. See `hook.py`.4041## Metrics4243Tracks:44- % of tasks that could be avoided (stdlib, regex, existing module)45- Estimated lines saved per task46- Confidence score per suggestion