What it is. The human brings the idea, constraints, and reference material; the skill brings the shape: it questions until there is a shared shape for the system and writes the documents as it goes — it does not ask the human to design the system for it.
When. "discovery", "model this from an idea", "I only have the idea;
I do not know how yet." When NOT to use it: a clearly shaped feature → uscha-adr-refine;
an existing system to migrate → uscha-reverse-discovery.
Non-negotiable principles
- One question at a time, each with a recommended answer. The inversion that makes discovery work: the skill proposes (entities, endpoints, architecture, a default); the human confirms or corrects. Never a list of 20 questions.
- Explore before asking. If a reference document, the codebase, or a
CONTEXT.md/docs/adr/answers the question, read it first. - Propose the shape. Core entities, the operations surface, and 2–3 architecture options with trade-offs; walk the design tree one branch at a time.
- Question, do not agree. Look for contradictions, vague terms, and missing failure modes. A discovery where the skill agreed with everything has failed.
- Lazy, inline files. Create a file only when there is something real to write; update it when the decision crystallizes — never batch them at the end.
Questioning agenda (in order; skip what the references already answer)
- Purpose / value / why now — what work it eliminates and the cost of not doing it.
- Domain model — the skill proposes core entities and relationships.
- Operations surface / API — endpoints, contracts, idempotency, status codes.
- Major decisions (→ ADR) — 2–3 options with trade-offs and a recommended default.
- Behavior and messy cases — the happy path and THEN failures, retries, partial states, concurrency, and what must NOT happen.
- Inviolable constraints (→ CONSTITUTION.md) — one invariant per line, mapping to a CWE where applicable; they feed the severity gate, and a violation is a BLOCKER, never a trade-off.
- Out of scope — explicit boundaries with forward references.
- Acceptance / DoD — concrete, checkable criteria + metrics.
- Quality bar (→ config, 1.17.0) — "what quality level is ENOUGH and what is negotiable?" What is declared goes in
uscha.config.jsonand reads as requirement (config); what is not declared remains the kit default (opinion) and is labelled that way. Declaring it means committing the config. - Risks and dependencies — for each HIGH-uncertainty risk (1.19.0): "does this warrant a time-boxed spike?" The spike runs on a
spike/*branch, and its only legitimate output is an ADR with lessons learned —phase --require pr-readyrejects that branch, in the spirit of INV-GOLDEN-01.
Artifacts (lazy, as they crystallize)
| File | Contents |
|---|---|
| CONTEXT.md | Domain glossary — only terms meaningful to experts, decoupled from implementation. |
| CONSTITUTION.md | Invariants that no ADR/SPEC may violate; the layer ABOVE the ADRs. |
| DOMAIN-MODEL.md | Proposed and approved entities — the model, not the vocabulary. |
| SPEC.md | Objective/value, risk, scope/out-of-scope, behavior, inputs/outputs/errors, acceptance, test plan, operations, rollback. |
| docs/adr/ADR-NNN-*.md | One per durable decision, with an Implementation Plan and Verification (checkboxes) — the ADR as an executable spec. |
| ACCEPTANCE.md | DoD as checkboxes with a stable, traceable ID (- [ ] AC-01 — cuando X entonces Y, sequential, never reused). Downstream, a criterion closes only when it is MEASURED with a passing test case carrying its tag. |
| RISKS.md | Residual risks, assumptions, and points requiring human approval. |
| HANDOFF.md | What to read before coding + hard "do not do" rules + required evidence. |
Write an ADR only if ALL THREE apply: hard to reverse · surprising without context · a real trade-off. Everything else is noise that buries the important ones.
It ends when there is a shared shape: entities, operations, and major decisions made (or recorded as explicit assumptions); every failure mode has defined behavior; out-of-scope is explicit; and the DoD is checkable. The skill declares this, finalizes the package, and delivers the handoff — which instructs the implementer to summarize behavior, flag ambiguities, and propose a files+tests plan BEFORE touching code, and to not edit the SPEC to make the implementation look correct.