Back to skills
SKILL.md
ai-native-garden
ASecurityDaily leanness + mechanical harness for any codebase. Activate on EVERY coding task (writing, fixing, refactoring, reviewing) to write minimal complete diffs, reuse existing primitives first, add tiered proof tests (T0/T1/T2), and close with a 1-line honest footer. Activate on audits, architecture hardening, or recurring bugs to detect Paper Linters, trace real CI call graphs, enforce L1-L3 blocking gates, and ratchet legacy debt down to zero. 中英通用:日常极简高复用编码 + 代码库体检、门禁硬化与存量债棘轮治理,一站式必备工程底座。
- 2 stars
- 0 votes
- 0 copies
- 0 views
- Added December 1, 2026
Works with
Security analysis
100/100Pro scans all 18 files and shows the line behind each finding
npx -y skills add luvio-arlan/ai-native-garden --agent claude-codeAre you the author of ai-native-garden?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/luvio-arlan-ai-native-garden)---
name: ai-native-garden
description: >-
Daily leanness + mechanical harness for any codebase. Activate on EVERY coding task
(writing, fixing, refactoring, reviewing) to write minimal complete diffs, reuse existing
primitives first, add tiered proof tests (T0/T1/T2), and close with a 1-line honest footer.
Activate on audits, architecture hardening, or recurring bugs to detect Paper Linters,
trace real CI call graphs, enforce L1-L3 blocking gates, and ratchet legacy debt down to zero.
中英通用:日常极简高复用编码 + 代码库体检、门禁硬化与存量债棘轮治理,一站式必备工程底座。
license: MIT
compatibility: Zero-dep Python 3.8+ built-in; auto-accelerates with optional native Rust binary `garden-audit`.
metadata:
author: luvio-arlan
version: "4.0.0"
---
# ai-native-garden
> **Less code, harder gates. Your codebase is the prompt.**
> One shear, two materials: **trim code daily**; on the 2nd recurrence, **compile the rule into a gate** and lock legacy debt in a shrinking ratchet.
> Closed loop: **`Trim → Prove → Gate → Freeze`**.
## 1. Auto-Derived 5-State Machine (No Subjective Dials)
Derive the active mode from repository facts and task scope — never invent subjective intensity switches:
| State | Auto-Trigger (Repo Facts / Request) | Blast Radius | Mandatory Output & Exit Gate |
| :--- | :--- | :--- | :--- |
| **`drive`** | Default on coding/fixing tasks when `AGENTS.md` + blocking gate exist | ≤ 1 slice; reuse before writing | Minimal complete diff + `T0`–`T2` proof + 1-line footer |
| **`review`** | User asks to review diff / PR / commit | Read-only + ranked fixes | Machine `--diff` facts + caller trace + `#NNN` cards |
| **`audit`** | Repo lacks baseline/gate, or user asks to audit | Read-only | 5×20 score (`L1`–`L5`), CI call-graph, limiting repair |
| **`transform`** | User asks to harden/garden repo, or 2nd defect recurrence | 1 workspace/slice per PR on large repos | 6-Phase protocol + Negative-Control red proof |
| **`quiet`** | User explicitly opts out for this turn only | Current turn only (never persisted) | Normal reply; returns to derived state next turn |
## 2. Daily Trim Discipline & The Four Uncuttables
Start every session by reading the deterministic brief (`garden-audit --brief` or `python3 "<skill-dir>/scripts/audit-slop.py" "<repo>" --brief`). Before editing, grep all callers of what you touch and fix root causes once in shared code. Answer three questions in order and stop at the first yes:
1. **Must it exist?** Drop unrequested options, abstractions, wrappers, helpers, and speculative config. Deletion beats addition.
2. **Already in this repo?** Reuse existing helpers, components, and safe primitives listed in `--brief`.
3. **Stdlib / platform / installed dep?** Prefer native platform or installed deps over new code or new packages.
**Smallest complete diff wins — for code, tests, AND gates alike**: never write a 100-line guard script or 60-line test file when wiring an existing tool, a 5–15 line AST check, or 1–3 sharp assertions proves the exact invariant.
**Four Uncuttables (Mechanical Gates, Never Prose Promises):**
1. **Trust-boundary validation** (L1 single entry + `T2` negative-control).
2. **Data-loss protection** (L3 expand-only migrations + transaction/error preservation).
3. **Security** (L2 secret/dangerous-API guards; zero swallowed errors or weak auth).
4. **Accessibility & semantic tokens** (L2 semantic CSS tokens, paired light/dark contrast, zero magic values).
## 3. Tiered Proof (`T0 / T1 / T2`) & Rule Escalation
Prove every non-trivial change at the **lowest tier that catches breakage** (1 focused test or assertion for `T0`, never bloated test matrices); escalate automatically on triggers:
| Tier | When Required | Verification Bar |
| :--- | :--- | :--- |
| **`T0`** | Any new branch, loop, parser, bug fix, or script | 1 focused test or assertion covering the edge case |
| **`T1`** | Touches persistence, wire/API schema, or shared primitive | Cross-boundary Golden Parity / DTO drift check |
| **`T2`** | Touches concurrency, security, hot path, 4 Uncuttables, or new gate | `-race` / property / budget / Negative-Control red test |
**Conflict Resolution (Law & YAGNI):**
- **YAGNI guards entry; Deep Modules guard shape**: Only build a new L1 wrapper on **≥ 2nd recurrence** or **Four Uncuttables**.
- **Structured Shortcuts**: Mark deliberate limits with single-line `// garden:shortcut: ceiling=<limit>, trigger=<upgrade>` (exempt from 5% prose comment cap; tracked by `--debt` and blocked if `trigger` is missing).
- **Inverted Trust Pyramid**: `L1` API/DAG boundary (impossible to write) → `L2` Static/AST + Error-Driven fix hint (impossible to compile) → `L3` Shared blocking gate (impossible to pass) → `L4` Root `AGENTS.md` ≤ 60s (delete prose once enforced).
## 4. Scale-Aware 6-Phase Transform Protocol
| Repo Profile | Rollout | Baseline & Ratchet | Gate Scope |
| :--- | :--- | :--- | :--- |
| **Small / Greenfield** (`≤ 1` workspace, `< 50k LOC`) | End-to-end 6 phases | Optional; retire to `{}` | Full suite local & CI |
| **Large / Monorepo** (`> 1` workspace or `≥ 50k LOC`) | Multi-PR, **1 slice/PR** | **Mandatory** `--write-baseline` first | Same entry: `--affected` PR / `--full` main |
1. **Survey**: Run `audit-slop.py "<repo>" --format md` + `--write-baseline .garden-baseline.json` (mandatory on large repos).
2. **Triage**: Rank `limiting capability → Law → L1→L4 → ROI`; never mix refactors with behavior changes (`Tidy First`).
3. **Unify**: Single shared blocking gate (`scripts/verify.sh`); wire or delete Paper Linters; zero `continue-on-error` / skips.
4. **Harden**: Encode L1–L2 guards with Error-Driven messages (`Why / What / Where`); prove each new guard **red** on a deliberate violation, then revert.
5. **Prove**: Add `T1`/`T2` parity, concurrency/property, and isolated E2E tests for the active slice; capture revision-matched evidence.
6. **Prune**: Delete enforced `AGENTS.md` prose, shrink ratchets, verify `audit-slop.py --baseline .garden-baseline.json --check` (`new = 0`, `worsened = 0`).
## 5. Honest Footer & Progressive Disclosure
End every coding reply with one line (omitting `Proof` = unverified):
`Trim: <reused/skipped> | Proof: <T0/T1/T2 + command> | Risk: <known limit or none> | Unchecked: <skipped checks or none>`
Load under `<skill-dir>/references/` strictly on demand:
- Daily trim ladder, caller-first bug fixes, shortcuts, honest footer → [references/daily-driver.md](./references/daily-driver.md)
- Six Laws, Error-Driven diagnostics, ratchet retirement, `AGENTS.md` diet → [references/playbook.md](./references/playbook.md)
- Monorepos, affected-only CI, blast-radius & multi-PR rollout → [references/large-repos.md](./references/large-repos.md)
- Deep Modules, TigerStyle bounds, budgets, semantic tokens → [references/architecture-and-performance.md](./references/architecture-and-performance.md)
- 5×20 Readiness rubric, L1–L5 proof gates, `--brief`/`--diff`/`--debt`/`--evidence` → [references/readiness-rubric.md](./references/readiness-rubric.md)
- Satellite skills: `skills/garden-review` (PR/diff `#NNN`) · `skills/garden-audit` (full audit) · `skills/garden-transform` (6-phase)
- Stack adapters: [go-vue](./references/stacks/go-vue.md) · [typescript-react](./references/stacks/typescript-react.md) · [python](./references/stacks/python.md) · [rust](./references/stacks/rust.md)
Files in this skill
- AGENTS.md
- README.zh-CN.md
- SKILL.md
- assets/garden-loop-en.svg
- assets/garden-loop-zh.svg
- assets/trust-pyramid-en.svg
- assets/trust-pyramid-zh.svg
- install.sh
- references/architecture-and-performance.md
- references/large-repos.md
- references/playbook.md
- references/readiness-rubric.md
- rust/.gitignore
- rust/Cargo.lock
- rust/Cargo.toml
- scripts/audit-slop.py
- scripts/verify.sh
- tests/test_archguard.py
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.