AGENT SKILL

deliberate

Use before any substantial work — a spec, adversarial review by independent critics, then a compiled plan with tracked obligations. Turns 'let's build X' into a falsifiable spec that survived criticism.

License 许可
Apache-2.0
所属仓库
harmoniqs/amicode
最近更新
2026-11-12
Stars
★ 7
Forks
2

01 前言 Front Matter

name
deliberate
agents
[ "researcher", "experimenter", "engineer" ]
surface
public
scenarios
[ "spec-underspecified-must-block", "spec-adequate-must-pass" ]
description
Use before any substantial work — a spec, adversarial review by independent critics, then a compiled plan with tracked obligations. Turns 'let's build X' into a falsifiable spec that survived criticism.
project_contract
{ "tags": [ "deliberation" ], "folders": [ "config/specs" ], "note_types": [ "spec", "plan", "spec-review" ] }

03 SKILL.md 正文

Deliberate: spec → adversarial review → compiled plan

Most wasted work is not badly executed. It is well-executed work on a goal nobody made falsifiable, using a budget nobody bounded, against a baseline nobody looked up.

This skill is three artifacts and two gates:

  spec  ──▶ amico spec review ──▶ amico plan compile ──▶ tracked obligations
   │            (critics)              (budget gate)
   │
   └─ falsifiable acceptance, a bounded budget, a named baseline

Usage

/deliberate — start a spec. /deliberate review <path> — review one you already have.

Instructions

Step 0 — check what is available

command -v amico >/dev/null && amico spec review --help >/dev/null 2>&1 && echo tooling || echo manual

tooling — run the loop below with the real verbs. manual — you still do every step, by hand, using the checklists here. The value is in the discipline, and the tooling only makes it cheap and recorded. Never skip the review because the binary is missing; say that it was done by hand, which is a weaker claim and should read as one.

Step 1 — write the spec

One dialogue rule: ask one question at a time. A wall of questions gets a wall of shallow answers.

Write to <project>/config/specs/spec-<YYYYMMDD-HHMMSS>-<slug>.md:

---
type: spec
schema_version: "1"
spec_id: spec-20260728-093846-cz-gate-on-two-atoms   # IMMUTABLE once written
task_type: experiment-sim        # see the table below
acceptance:
  - F_free >= 0.999              # metric · comparator · threshold. NOT prose.
  - wall_s <= 600
invariants:
  - the pulse stays within device drive bounds     # prose is FINE here
budget: { max_solves: 8, tier: free, device: none }  # launch-shaped work only
baseline: { value: 0.968, source: "published blockade-π protocol" }
---

acceptance is machine-checked, and this is the one thing people get wrong

Every entry must match:

<metric_name> <comparator> <number>
  • comparators: <= >= == < >
  • the metric may be dotted (outcome.fidelity), the number may be scientific (1e-4) or a percentage (100%)
✅ ❌ why the ❌ fails
F_free >= 0.999 high fidelity no threshold — nothing can ever fail it
leakage <= 1e-4 minimal leakage "minimal" is a feeling
wall_s <= 600 runs reasonably fast unfalsifiable
n_iters == 3 converges to what?

If a criterion genuinely cannot be a number, it is an invariant, not an acceptance criterion. invariants takes prose on purpose — some things really are qualitative, and forcing a fake number on them is worse than admitting it.

task_type decides which checks apply

task_type launch-shaped? needs budget
experiment-sim, experiment-hw, author-script yes required
implement-slice, plan, review, insight, triage, bookkeeping, converse no forbidden

Launch-shaped means it spends compute. Do not mislabel to dodge the budget: the compiler refuses a non-launch-shaped spec that compiles to a solve-bearing step, because the mislabelling would silently switch off two blocking checks on work that spends real money.

baseline is required for launch-shaped work, and "none" is a legal answer

baseline: { value: 0.968, source: "published blockade-π protocol" }
# or, honestly:
baseline: { none_because: "first attempt at this gate on this geometry" }

A number with no source is refused. So is silence. none_because is always available — the point is that "we never checked" cannot pass as "there is no baseline".

Step 2 — review it adversarially

amico spec review <spec-path> --json          # add --offline to skip the critics

Two tiers, and the first one is free.

Tier 1 is mechanical: schema, falsifiable acceptance, budget legality, baseline presence, precedent, provenance. Deterministic, no model call, and it blocks — so a spec with prose acceptance never reaches a paid critic. Fixing tier-1 findings costs nothing but attention.

Tier 2 is judgment: independent critics, one lens each, each seeing only the spec file and no conversation history. One lens each rather than N identical reviewers, because perspective-diverse critique catches failure modes redundancy cannot.

What critics may and may not do. A critic can mark a finding blocking only for contradiction — two lines of your spec that cannot both be true, both quoted. Everything else is advisory, however severe. This is enforced in code, not requested.

That is not critics being toothless; it moves their teeth downstream. Every advisory becomes an obligation, and a plan cannot be completed while one is open. Critics shape the work and gate finishing, never starting.

verdict exit what it means
approved 0 tier 1 clean, critics ran and agreed
approved-mechanical 0 tier 1 clean, no critic was ever available — say so out loud
degraded 0 a critic was available and failed (timeout, unparseable)
blocking 65 revise and re-run; round goes up
exhausted 66 three rounds of blocking — stop and get a human

approved-mechanical and degraded both exit 0. They are not the same as approved, and reporting either as "reviewed" is the specific dishonesty this vocabulary exists to prevent.

Round budget is 3. If you are still blocking at round 3, the spec is not the problem — the understanding is.

Amendments to approved specs are first-class specs

An amendment gets the same review budget as the original: three lenses, round budget 3, before it lands in the spec's record. The documented failure mode (two same-day incidents, 2026-08-22) is the cheap-talk amendment — drafted as summary prose from conversation momentum, it contradicted the frozen contracts it amended (enumerated lists, tier memberships, invariants, criteria preconditions, cross-spec pointers) six and nine times respectively, caught only by post-hoc review.

Rules:

  • Before drafting: re-read the parent spec's frontmatter invariants, every D-decision, the Measurement Protocol, and all prior amendments — line by line. Draft from the spec text, not from the conversation.
  • An amendment that edits any enumerated list, tier membership, invariant, criterion precondition, or cross-spec obligation must be checked against the exact text it edits, and against every sibling amendment for cross-conflicts.
  • Run this skill's Step 2 loop on the amendment itself before recording it.
  • A same-day revision note records that a review happened; it is not a substitute for the review.

Step 3 — compile the plan

amico plan compile <spec-path> --json

The planner turns the spec into ordered steps. Each step declares model, task_type, gates, needs, and permissions.device when it touches hardware. model and task_type are required: the compiler sums solve-bearing steps against budget.max_solves and joins device demands against budget.device, and a step that omits them would make that check silently pass.

A below-frontier step with no gate is refused. Cheap unverified work is how a plan reports progress it did not make.

Compile refuses, before writing anything, if:

  • the plan needs more solves than the budget authorises (it names the margin)
  • the plan demands more device access than the budget authorises — or the budget does not mention device at all, because an omitted bound is not permission
  • the latest review was blocking (--allow-unreviewed does not override this)
  • the spec was never reviewed, or only mechanically, and you did not pass --allow-unreviewed

It also tells you what it could not check: tier and max_size_class are properties of a resolved solve, which does not exist yet, so they are refused later at launch. "Compiled" does not mean "fully budget-checked", and the output says which.

Compiled plans are not hand-editable. An approved warrant is bound to plan_hash = sha256(canonicalJson({goal, steps})); editing the file detaches the two silently. Change the spec and --recompile.

Step 4 — work the plan

amico plan status                                  # derived, not self-reported
amico plan advisory <id> --state fixed
amico plan advisory <id> --state waived --reason "out of scope for this slice"
amico plan advisory <id> --state obsolete

Step state is derived from gate verdicts. There is no command to set it. Not as a policy — there is no write path. An agent cannot mark a step passed without a gate having agreed, which is the same barrier that protects every fidelity claim in the system.

Advisories are movable, because closing one is genuine judgment rather than a fact a gate established. waived requires a reason, so waive-spam is visible in the record instead of silent.

plan state:  active → complete | stalled

complete ⟺ every step passed or skipped   AND   every advisory closed
stalled  ⟸ a step's gates were exhausted, or the replan budget ran out

Both conjuncts matter. Without the second, "all done" would mean "the gates passed and we ignored every critic".

Spec-design checks critics keep finding

These came up repeatedly in one research campaign's critic rounds (the qpilc open-problems campaign, 2026-10). Each would have produced a wrong or pre-determined result. Run them yourself before the critics do:

  • Pre-evaluate every trigger at the spec's own predicted effect size, in both directions. Ask "can this condition fire?" and "can it fail to fire?" A bias trigger on a statistic that grows as √N, set at 3, fired by construction at the spec's own predicted shift. A sign-of-median trigger with |median| ≪ the per-seed SD is a coin flip. A materiality bar on the wrong statistic (a unitary distance, rather than the fidelity-ranking error the loop actually uses) nearly read "moot" where the loop-relevant quantity read "material". A trigger built never to fire is as uninformative as one built always to fire.
  • Close every inaction route. For each outcome, ask whether doing nothing (an always-reject gate, a never-firing gate, a near-zero step) can reach it. Do-nothing scored "regularization confirms" on a draw-free quality metric, a never-firing gate scored "safe", and a Euclidean motion floor admitted a placebo whose steps were J-invisible. Put a floor on benefit (a minimum median effect, not just a sign count) and match placebos in the measurement row space, not in Euclidean norm.
  • Measure harness floors before pinning tolerances. Weld, unitarity and identity tolerances must cite a measured dry-run floor of the exact code path, scaled with depth or steps where the error accumulates. Critics' estimates were wrong by 10–30× three times; each cost a pre-data amendment.
  • Review the physics of every cited construction. "[CITED] verbatim, hash-pinned" is provenance, not physics. For any truncated or extended Hilbert space, tabulate every operator element linking computational to non-computational levels and state its physical origin. Assert the symmetries the physical operator obeys: number conservation, total spin, ±1 readout spectra, time reversal. Run the factorization test: if the extra levels couple identically to every computational state, the channel must vanish. Treat any probe or log prose that names a modelling choice as the mechanism ("valley-agnostic", "effective", "truncated") as a blocking question.
  • Put every verdict-moving choice in acceptance. The review tool's design hash covers acceptance and budget only, so thresholds, grids, operator choices and the reading rule placed in prose invariants are unhashed. Paste constants under a weld tolerance at full precision with their file:row source, never rounded by hand.
  • Make the outcome partition exhaustive and disjoint, and don't let a tie hand the label to one side. If "X out-tracks Y" and "X ties Y" can both hold, the partition is broken. If the label rests on a precedence tie-break, report the robust ordering and the knife-edge seeds beside it.

When to skip this

Genuinely trivial and reversible work — a typo, a comment, a one-line config change with an obvious right answer. The test is not size, it is whether you could be wrong in a way that costs something. A three-line change to a fidelity threshold deserves a spec. A five-hundred-line mechanical rename does not.

The failure this prevents

The recurring defect in this codebase's own history has one shape: a check that reads a field its schema does not carry. A counter keyed on a forbidden field, so a bound authorised unlimited spend while reading as enforced. A derivation reading fields its branch forbade, so a state was unreachable while the completion rule admitted it. A comparison whose two sides spoke different vocabularies.

Every one shipped through a spec that sounded right, and every one was caught by an independent critic reading only the artifact. When your spec asserts a cross-module check, ask what the values on both sides actually are — and whether the spec ever says.

Related

  • config/specs/ — where specs and plans live in a Research Project
  • break-into-subissues, implement-issue — the issue-tracker path, once a plan exists
  • verification — what a gate is and how to choose one

04 同仓库更多 Skills