@andresmassello/uscha 1.51.3 → 1.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -6
- package/package.json +1 -1
- package/uscha-kit/.claude/skills/uscha-adr-refine/SKILL.md +231 -161
- package/uscha-kit/.claude/skills/uscha-characterize/SKILL.md +68 -0
- package/uscha-kit/.claude/skills/uscha-devloop/SKILL.md +68 -0
- package/uscha-kit/.claude/skills/uscha-discovery/SKILL.md +231 -161
- package/uscha-kit/.claude/skills/uscha-mirador/SKILL.md +192 -168
- package/uscha-kit/.claude/skills/uscha-reverse-discovery/SKILL.md +72 -0
- package/uscha-kit/.claude/skills/uscha-rubric/SKILL.md +147 -79
- package/uscha-kit/.claude/skills/uscha-status/SKILL.md +24 -0
- package/uscha-kit/.claude/skills/uscha-sysdoc/SKILL.md +156 -88
- package/uscha-kit/.claude-plugin/plugin.json +1 -1
- package/uscha-kit/.codex-plugin/plugin.json +1 -1
- package/uscha-kit/README.md +1 -1
- package/uscha-kit/VERSION +1 -1
- package/uscha-kit/install-uscha.py +68 -40
- package/uscha-kit/skills/uscha-adr-refine/SKILL.md +231 -161
- package/uscha-kit/skills/uscha-characterize/SKILL.md +68 -0
- package/uscha-kit/skills/uscha-devloop/SKILL.md +68 -0
- package/uscha-kit/skills/uscha-discovery/SKILL.md +231 -161
- package/uscha-kit/skills/uscha-mirador/SKILL.md +192 -168
- package/uscha-kit/skills/uscha-reverse-discovery/SKILL.md +72 -0
- package/uscha-kit/skills/uscha-rubric/SKILL.md +147 -79
- package/uscha-kit/skills/uscha-status/SKILL.md +24 -0
- package/uscha-kit/skills/uscha-sysdoc/SKILL.md +156 -88
- package/uscha-kit/uscha.config.json +1 -1
package/README.md
CHANGED
|
@@ -11,12 +11,26 @@ never what was claimed.
|
|
|
11
11
|
(essay, 2-day dev course, reference, paper).
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
npx --yes @andresmassello/uscha@latest install --target claude
|
|
15
|
-
npx --yes @andresmassello/uscha@latest
|
|
14
|
+
npx --yes @andresmassello/uscha@latest install --target claude # Claude Code
|
|
15
|
+
npx --yes @andresmassello/uscha@latest install --target codex # Codex
|
|
16
|
+
npx --yes @andresmassello/uscha@latest install --target cursor # Cursor
|
|
17
|
+
npx --yes @andresmassello/uscha@latest install --target copilot # VS Code / GitHub Copilot
|
|
18
|
+
npx --yes @andresmassello/uscha@latest install --target gemini # Gemini CLI
|
|
19
|
+
npx --yes @andresmassello/uscha@latest install --target cline # Cline
|
|
20
|
+
npx --yes @andresmassello/uscha@latest install --target pi # pi (Earendil)
|
|
21
|
+
npx --yes @andresmassello/uscha@latest install --target all # every target at once
|
|
22
|
+
|
|
23
|
+
npx --yes @andresmassello/uscha@latest doctor --target all
|
|
16
24
|
```
|
|
17
25
|
|
|
18
|
-
|
|
19
|
-
|
|
26
|
+
The nine skills implement the **Agent Skills** standard, so the last five targets are the same
|
|
27
|
+
skills placed under each agent's own documented root. Honest scope: only Claude Code and Codex
|
|
28
|
+
have been exercised against a real agent — for the rest, that they load is a *documented
|
|
29
|
+
expectation, not a measurement*. What is measured is that the files land where each agent
|
|
30
|
+
documents reading them and that `doctor` reads them back. INV-GOLDEN-01 is mechanically
|
|
31
|
+
enforced only on Claude Code (a blocking PreToolUse hook); everywhere else `doctor` reports it
|
|
32
|
+
as `advisory` rather than implying a guard it cannot see.
|
|
33
|
+
(`both` stays a legacy alias for codex+claude.) Then, in your project:
|
|
20
34
|
|
|
21
35
|
```bash
|
|
22
36
|
npx --yes @andresmassello/uscha@latest init
|
|
@@ -26,8 +40,8 @@ Requires **Python 3.8+** on the machine (the engine is Python stdlib — no pip
|
|
|
26
40
|
runtime dependencies). The npm package is a thin router; the canonical installer is
|
|
27
41
|
`uscha-kit/install-uscha.py`.
|
|
28
42
|
|
|
29
|
-
**Kit v1.
|
|
30
|
-
[changelog](https://github.com/andresmassello/uscha/blob/main/uscha-kit/CHANGELOG-1.
|
|
43
|
+
**Kit v1.54.0** <!-- uscha:version --> · [uscha.dev](https://uscha.dev) ·
|
|
44
|
+
[changelog](https://github.com/andresmassello/uscha/blob/main/uscha-kit/CHANGELOG-1.54.0.md)
|
|
31
45
|
(the per-release changelogs live in the repo, not in the npm tarball)
|
|
32
46
|
|
|
33
47
|
---
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andresmassello/uscha",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.54.0",
|
|
4
4
|
"description": "Spec-driven development for LLM coding agents: 9 skills + a stdlib evidence engine. Facts block, guesses advise; the human approves.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"uscha": "bin/uscha.js",
|
|
@@ -1,161 +1,231 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: uscha-adr-refine
|
|
3
|
-
description: >
|
|
4
|
-
Turn a rough idea into a development-ready ADR set + ACCEPTANCE.md by INTERROGATING
|
|
5
|
-
before generating. Runs a structured Socratic interview (problem, implicit decisions,
|
|
6
|
-
behavior incl. failure modes, inviolable constraints, out-of-scope, Definition of
|
|
7
|
-
Done, dependencies), refuses to emit artifacts until the gaps are closed, then
|
|
8
|
-
distills the conversation into docs/adr/ADR-NNN.md files and an ACCEPTANCE.md. The
|
|
9
|
-
front-half counterpart to dev-loop. Invoke for "refine the ADR", "let's spec this
|
|
10
|
-
before coding", "ayudame a definir esto antes de desarrollar".
|
|
11
|
-
allowed-tools: Read, Write, Glob, Grep
|
|
12
|
-
disable-model-invocation: false
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
# adr-refine — interview, then distill
|
|
16
|
-
|
|
17
|
-
You convert a rough idea into a development-ready specification. You do this in two
|
|
18
|
-
phases. **You are NOT a generator. You are an interrogator that distills.** The value
|
|
19
|
-
is in the questions, not in agreeing.
|
|
20
|
-
|
|
21
|
-
##
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
ADR
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
`
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
1
|
+
---
|
|
2
|
+
name: uscha-adr-refine
|
|
3
|
+
description: >
|
|
4
|
+
Turn a rough idea into a development-ready ADR set + ACCEPTANCE.md by INTERROGATING
|
|
5
|
+
before generating. Runs a structured Socratic interview (problem, implicit decisions,
|
|
6
|
+
behavior incl. failure modes, inviolable constraints, out-of-scope, Definition of
|
|
7
|
+
Done, dependencies), refuses to emit artifacts until the gaps are closed, then
|
|
8
|
+
distills the conversation into docs/adr/ADR-NNN.md files and an ACCEPTANCE.md. The
|
|
9
|
+
front-half counterpart to dev-loop. Invoke for "refine the ADR", "let's spec this
|
|
10
|
+
before coding", "ayudame a definir esto antes de desarrollar".
|
|
11
|
+
allowed-tools: Read, Write, Glob, Grep
|
|
12
|
+
disable-model-invocation: false
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# adr-refine — interview, then distill
|
|
16
|
+
|
|
17
|
+
You convert a rough idea into a development-ready specification. You do this in two
|
|
18
|
+
phases. **You are NOT a generator. You are an interrogator that distills.** The value
|
|
19
|
+
is in the questions, not in agreeing.
|
|
20
|
+
|
|
21
|
+
## First contact (show ONCE, then never again)
|
|
22
|
+
|
|
23
|
+
**Only when this project has no uscha artifacts yet** -- no `QA-LEDGER.json`, no `SPEC.md` or
|
|
24
|
+
`ACCEPTANCE.md`, no `docs/adr/` -- open with this block, then start working. If any of those
|
|
25
|
+
exist, the operator already knows the method: skip it entirely and go straight to the
|
|
26
|
+
breadcrumb. Repeating it every run would be exactly the ceremony the method forbids.
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
[uscha · adr-refine · START]
|
|
30
|
+
Method: you bring the idea, the method builds the rest. Facts block, guesses advise;
|
|
31
|
+
nothing closes on a checkbox, and the human approves the merge.
|
|
32
|
+
Here: a precision interview on a feature whose shape you already know. I refuse to emit until the gaps close.
|
|
33
|
+
Output: docs/adr/ADR-NNN.md · ACCEPTANCE.md
|
|
34
|
+
Next: `/uscha-devloop` builds against the ADR + ACCEPTANCE.
|
|
35
|
+
Stop: say so at any point -- whatever is already written stays.
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Bilingual by construction.** The labels (`START`, `Method`, `Here`, `Output`, `Next`,
|
|
39
|
+
`Stop`) stay VERBATIM in English -- they are the method's vocabulary and the smoke suite checks
|
|
40
|
+
for them mechanically, which is only possible if they never move. The wording after each label
|
|
41
|
+
is the canonical English; **render it in the operator's language**. If they are writing to you
|
|
42
|
+
in Spanish, the whole block reads in Spanish under English labels. Do not translate the labels,
|
|
43
|
+
do not leave the content in English when they are not writing in English.
|
|
44
|
+
|
|
45
|
+
Unlike the close block, `Next` here MAY name the nominal route: on a first run there is no
|
|
46
|
+
measured state to derive from yet, so the nominal path is the honest answer. From the close
|
|
47
|
+
block onward, derived state wins.
|
|
48
|
+
|
|
49
|
+
## Orientation markers (non-negotiable)
|
|
50
|
+
|
|
51
|
+
The operator must never have to ask "where am I?" or "what happens now?". Two markers, always.
|
|
52
|
+
They are navigation, not ceremony: one line per turn, one block at the end.
|
|
53
|
+
|
|
54
|
+
**Open every turn with a breadcrumb**, then the content:
|
|
55
|
+
|
|
56
|
+
`[uscha · adr-refine · <step> → <target>]`
|
|
57
|
+
|
|
58
|
+
- `<step>` — `Q<n>` for a question, `pass <n>` for a loop iteration, `step <n>` otherwise.
|
|
59
|
+
Count what has actually happened. **Never write a denominator** (`Q4/12`): this phase
|
|
60
|
+
converges, its length is not known in advance, and an invented total is exactly the kind of
|
|
61
|
+
narrated number the method forbids. **When the ledger already measures the count** (the QA
|
|
62
|
+
loop's `loop_count`), use the measured number — never keep a parallel tally of your own.
|
|
63
|
+
- `<target>` — the artifact this turn feeds (`SPEC`, `ADR-003`, `ACCEPTANCE`, `LEDGER`,
|
|
64
|
+
`RECEIVED`, ...). Drop `→ <target>` only when the turn genuinely feeds none.
|
|
65
|
+
|
|
66
|
+
**Close with the close block ONCE, when the skill finishes** — not on every turn. Ending
|
|
67
|
+
without it is a defect, even when the phase converged cleanly:
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
[uscha · adr-refine · CLOSED]
|
|
71
|
+
Produced: <files actually written, or "nothing">
|
|
72
|
+
Blocks: <what stands between here and the next phase, or "nothing">
|
|
73
|
+
Next: <the next action, and why it is that one>
|
|
74
|
+
Run: <the exact command or skill to invoke>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
This is **not** the implementation handoff some skills also emit: that one is a prompt for
|
|
78
|
+
whoever implements next, this one is navigation for the human operator, and both can appear.
|
|
79
|
+
|
|
80
|
+
`Blocks` and `Next` are **derived from the state you just produced** — never copied from a
|
|
81
|
+
fixed route, **including any `Flow:` line in this file**. Those lines are the nominal path;
|
|
82
|
+
open ADR experiments, an unclosed spike, an unapproved golden or a red gate all change what
|
|
83
|
+
genuinely comes next, and the derived answer wins. If the next phase cannot start yet, name it
|
|
84
|
+
and say exactly what unblocks it.
|
|
85
|
+
|
|
86
|
+
Keep the CONTENT in the conversation's language, but keep the labels (`CLOSED`, `Produced`,
|
|
87
|
+
`Blocks`, `Next`, `Run`) verbatim — they are the method's vocabulary and the smoke checks them.
|
|
88
|
+
|
|
89
|
+
## Non-negotiable principles
|
|
90
|
+
|
|
91
|
+
1. **Interrogate, don't agree.** Your job in Phase A is to surface what the human left
|
|
92
|
+
implicit and to find the holes — not to validate. A refinement where you agreed with
|
|
93
|
+
everything failed.
|
|
94
|
+
2. **Converge, don't run out of questions.** The interview ends on an objective
|
|
95
|
+
criterion (below), not when the human seems tired or you run out of ideas. This
|
|
96
|
+
mirrors dev-loop's "converge, don't chase zero" — the same discipline at the front.
|
|
97
|
+
3. **Do not emit artifacts until convergence.** No ADR, no ACCEPTANCE.md until every
|
|
98
|
+
exit condition is met. If asked to "just write it" early, name the open gaps first.
|
|
99
|
+
4. **One topic at a time.** Never dump 20 questions. Walk the agenda below, a focused
|
|
100
|
+
batch at a time, and reflect back what you heard before moving on.
|
|
101
|
+
5. **Record deferrals as explicit assumptions.** If the human says "you decide" on a
|
|
102
|
+
consequential decision, push back once with the trade-off; if they still defer,
|
|
103
|
+
record it as an explicit assumption in the ADR, never as a silent default.
|
|
104
|
+
|
|
105
|
+
## Phase A — The interview (agenda)
|
|
106
|
+
|
|
107
|
+
Start from the human's initial context. Work the agenda in order; skip a topic only if
|
|
108
|
+
it's already fully answered. Keep a running list of OPEN GAPS and resolved decisions.
|
|
109
|
+
|
|
110
|
+
1. **Problem and why now.** What job does this remove? What does it cost to NOT do
|
|
111
|
+
it (money, time, risk)? If "why now" has no answer, the priority is suspect.
|
|
112
|
+
2. **Implicit decisions.** Surface the choices the request assumed: sync vs async,
|
|
113
|
+
storage, protocol, idempotency, transactional boundaries, who owns state. For each,
|
|
114
|
+
force an explicit decision and at least one considered alternative.
|
|
115
|
+
3. **Behavior.** Happy path first, then the DIRTY cases: provider/timeout failures,
|
|
116
|
+
retries and backoff, 4xx vs 5xx, concurrency, partial/terminal states, what must NOT
|
|
117
|
+
happen. A feature without its failure behavior is half-specified.
|
|
118
|
+
4. **Inviolable constraints (→ `CONSTITUTION.md`).** Domain + security + operation
|
|
119
|
+
rules that cannot be broken (money to the cent, numbering without gaps, never cross
|
|
120
|
+
environments/credentials, secrets never logged, auth/authz, data retention). Write/extend
|
|
121
|
+
`CONSTITUTION.md` (one invariant per line, CWE ref where it maps); these feed the
|
|
122
|
+
dev-loop severity gate and a breach is a BLOCKER. **An ADR may never contradict the
|
|
123
|
+
CONSTITUTION** — if a decision would, it's escalated, not recorded.
|
|
124
|
+
5. **Out of scope.** Explicit boundaries, with forward references ("X goes to a later
|
|
125
|
+
spec"). What you exclude is as important as what you include.
|
|
126
|
+
6. **Definition of Done + how we measure success.** Concrete, checkable acceptance criteria
|
|
127
|
+
(tests green, documented, metrics published, runbook) AND success metrics (p95,
|
|
128
|
+
cost ceiling, zero orphaned records). Each item must be verifiable, not a feeling.
|
|
129
|
+
7. **Dependencies.** Which other specs/systems/credentials this needs to exist first.
|
|
130
|
+
|
|
131
|
+
After each batch, reflect: "Decided: … / Still open: …". Move on only when the
|
|
132
|
+
current topic is closed.
|
|
133
|
+
|
|
134
|
+
## Convergence — exit conditions (ALL must hold)
|
|
135
|
+
|
|
136
|
+
- Every decision has a rationale and at least one considered alternative.
|
|
137
|
+
- Every failure mode named has a defined behavior.
|
|
138
|
+
- Out-of-scope is explicit.
|
|
139
|
+
- The Definition of Done exists and every item is checkable.
|
|
140
|
+
- No OPEN GAP you raised remains unresolved (resolved = decided OR recorded as an
|
|
141
|
+
explicit assumption).
|
|
142
|
+
|
|
143
|
+
State plainly when you've converged ("Closed: every decision has a rationale, the failures
|
|
144
|
+
have behavior, the scope has a boundary and the DoD is verifiable.") before Phase B.
|
|
145
|
+
|
|
146
|
+
## Phase B — Distill the artifacts
|
|
147
|
+
|
|
148
|
+
Only after convergence. Produce (and, if any new project-wide invariant surfaced in
|
|
149
|
+
step 4, append it to **`CONSTITUTION.md`** — never let an inviolable rule slip into an
|
|
150
|
+
ADR where it could later be "traded away"):
|
|
151
|
+
|
|
152
|
+
1. **One ADR per decision worth recording** at `docs/adr/ADR-NNN-<slug>.md`, format:
|
|
153
|
+
|
|
154
|
+
```markdown
|
|
155
|
+
# ADR-NNN: <title of the decision>
|
|
156
|
+
## Status: Accepted
|
|
157
|
+
<!-- Use Status: Experiment only for a bounded hypothesis with feedback/review criteria. -->
|
|
158
|
+
## Context
|
|
159
|
+
<the problem + the considered options: A) … B) … C) …>
|
|
160
|
+
## Decision
|
|
161
|
+
<the chosen option>
|
|
162
|
+
## Reasons
|
|
163
|
+
- <why, point by point>
|
|
164
|
+
## Consequences
|
|
165
|
+
+ <the good>
|
|
166
|
+
- <the cost / what it forces on us>
|
|
167
|
+
<!-- If Status: Experiment, also include:
|
|
168
|
+
## Hypothesis
|
|
169
|
+
## Feedback Signal
|
|
170
|
+
## Review By: YYYY-MM-DD (or ## Review Trigger)
|
|
171
|
+
## Promote Criteria
|
|
172
|
+
## Rollback / Supersede Criteria
|
|
173
|
+
-->
|
|
174
|
+
## Implementation Plan
|
|
175
|
+
- Affected paths: <files/dirs>
|
|
176
|
+
- Patterns: <pattern to follow>
|
|
177
|
+
- Tests: <which tests prove the decision>
|
|
178
|
+
## Verification
|
|
179
|
+
- [ ] <criterion checkable by an agent>
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Number ADRs continuing from the highest existing one in `docs/adr/` (glob first).
|
|
183
|
+
Negative decisions count: "what we are NOT going to use and why" is a valid ADR.
|
|
184
|
+
Experimental decisions count only when they are explicit hypotheses with feedback signal,
|
|
185
|
+
review date/trigger, promote criteria and rollback/supersede criteria. Do not use
|
|
186
|
+
`Status: Experiment` as a polite way to avoid deciding.
|
|
187
|
+
|
|
188
|
+
2. **`ACCEPTANCE.md`** at the repo root (or the path in `uscha.config.json` →
|
|
189
|
+
`defaults.acceptance_file`). This is the file dev-loop's readiness measures — it MUST
|
|
190
|
+
exist and be checkable:
|
|
191
|
+
|
|
192
|
+
```markdown
|
|
193
|
+
# Acceptance — <feature>
|
|
194
|
+
## Definition of Done
|
|
195
|
+
- [ ] AC-01 — <verifiable criterion>
|
|
196
|
+
- [ ] AC-02 — <verifiable criterion>
|
|
197
|
+
## How we measure success
|
|
198
|
+
- <objective metric: p95, cost, zero orphans, …>
|
|
199
|
+
## Out of scope
|
|
200
|
+
- <boundary> → <future spec>
|
|
201
|
+
## Recorded decisions
|
|
202
|
+
- ADR-NNN — <title>
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
**Where to write:** with file tools available (Claude Code), write the files to disk.
|
|
206
|
+
In a chat-only context, print each file in a fenced block, clearly labeled with its
|
|
207
|
+
target path, ready to paste — and remind the human these go to `docs/adr/` and the repo
|
|
208
|
+
root before running dev-loop.
|
|
209
|
+
|
|
210
|
+
**Tracked-markdown protocol:** if any target `.md` already exists and is tracked, ask
|
|
211
|
+
for its current version before overwriting — never silently replace.
|
|
212
|
+
|
|
213
|
+
## Handoff to dev-loop
|
|
214
|
+
|
|
215
|
+
Close with the handoff prompt so the build phase starts by planning, not improvising:
|
|
216
|
+
|
|
217
|
+
> "Read the ADR set and ACCEPTANCE.md. Before touching code: 1) summarize the plan of
|
|
218
|
+
> files to create/modify, 2) confirm which decisions were left implicit, 3)
|
|
219
|
+
> show me the first test you would write."
|
|
220
|
+
|
|
221
|
+
Two-command flow end to end: `/uscha-adr-refine` → (ADR set + ACCEPTANCE.md) → `/uscha-devloop`.
|
|
222
|
+
|
|
223
|
+
That route is the **nominal** one, not the answer: the `Next:`/`Run:` you emit in the close block are DERIVED from the state you actually produced, and override it whenever an open experiment, an unclosed spike, an unapproved golden or a red gate stands in between.
|
|
224
|
+
|
|
225
|
+
## Anti-patterns (do not do)
|
|
226
|
+
|
|
227
|
+
- Generate an ADR from a one-line request without interviewing.
|
|
228
|
+
- Accept "do it however you want" on a consequential decision without recording the
|
|
229
|
+
assumption.
|
|
230
|
+
- Write an ACCEPTANCE item that isn't objectively checkable ("that it works well").
|
|
231
|
+
- Emit artifacts before the convergence conditions are met.
|
|
@@ -18,6 +18,74 @@ return, you encode the same partial understanding that loses logic silently. **Y
|
|
|
18
18
|
what the code DOES, mechanically, by running it — never what it should do.** You may write
|
|
19
19
|
the capture harness; you may NOT create, rename, or edit any `.approved` file.
|
|
20
20
|
|
|
21
|
+
## First contact (show ONCE, then never again)
|
|
22
|
+
|
|
23
|
+
**Only when this project has no uscha artifacts yet** -- no `QA-LEDGER.json`, no `SPEC.md` or
|
|
24
|
+
`ACCEPTANCE.md`, no `docs/adr/` -- open with this block, then start working. If any of those
|
|
25
|
+
exist, the operator already knows the method: skip it entirely and go straight to the
|
|
26
|
+
breadcrumb. Repeating it every run would be exactly the ceremony the method forbids.
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
[uscha · characterize · START]
|
|
30
|
+
Method: you bring the idea, the method builds the rest. Facts block, guesses advise;
|
|
31
|
+
nothing closes on a checkbox, and the human approves the merge.
|
|
32
|
+
Here: I run the ORIGINAL code against real inputs and freeze what it does today.
|
|
33
|
+
Output: tests/golden/*.received -- and I STOP: a HUMAN approves the .approved, never me
|
|
34
|
+
Next: you approve the goldens, then `/uscha-devloop` migrates against them.
|
|
35
|
+
Stop: say so at any point -- whatever is already written stays.
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Bilingual by construction.** The labels (`START`, `Method`, `Here`, `Output`, `Next`,
|
|
39
|
+
`Stop`) stay VERBATIM in English -- they are the method's vocabulary and the smoke suite checks
|
|
40
|
+
for them mechanically, which is only possible if they never move. The wording after each label
|
|
41
|
+
is the canonical English; **render it in the operator's language**. If they are writing to you
|
|
42
|
+
in Spanish, the whole block reads in Spanish under English labels. Do not translate the labels,
|
|
43
|
+
do not leave the content in English when they are not writing in English.
|
|
44
|
+
|
|
45
|
+
Unlike the close block, `Next` here MAY name the nominal route: on a first run there is no
|
|
46
|
+
measured state to derive from yet, so the nominal path is the honest answer. From the close
|
|
47
|
+
block onward, derived state wins.
|
|
48
|
+
|
|
49
|
+
## Orientation markers (non-negotiable)
|
|
50
|
+
|
|
51
|
+
The operator must never have to ask "where am I?" or "what happens now?". Two markers, always.
|
|
52
|
+
They are navigation, not ceremony: one line per turn, one block at the end.
|
|
53
|
+
|
|
54
|
+
**Open every turn with a breadcrumb**, then the content:
|
|
55
|
+
|
|
56
|
+
`[uscha · characterize · <step> → <target>]`
|
|
57
|
+
|
|
58
|
+
- `<step>` — `Q<n>` for a question, `pass <n>` for a loop iteration, `step <n>` otherwise.
|
|
59
|
+
Count what has actually happened. **Never write a denominator** (`Q4/12`): this phase
|
|
60
|
+
converges, its length is not known in advance, and an invented total is exactly the kind of
|
|
61
|
+
narrated number the method forbids. **When the ledger already measures the count** (the QA
|
|
62
|
+
loop's `loop_count`), use the measured number — never keep a parallel tally of your own.
|
|
63
|
+
- `<target>` — the artifact this turn feeds (`SPEC`, `ADR-003`, `ACCEPTANCE`, `LEDGER`,
|
|
64
|
+
`RECEIVED`, ...). Drop `→ <target>` only when the turn genuinely feeds none.
|
|
65
|
+
|
|
66
|
+
**Close with the close block ONCE, when the skill finishes** — not on every turn. Ending
|
|
67
|
+
without it is a defect, even when the phase converged cleanly:
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
[uscha · characterize · CLOSED]
|
|
71
|
+
Produced: <files actually written, or "nothing">
|
|
72
|
+
Blocks: <what stands between here and the next phase, or "nothing">
|
|
73
|
+
Next: <the next action, and why it is that one>
|
|
74
|
+
Run: <the exact command or skill to invoke>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
This is **not** the implementation handoff some skills also emit: that one is a prompt for
|
|
78
|
+
whoever implements next, this one is navigation for the human operator, and both can appear.
|
|
79
|
+
|
|
80
|
+
`Blocks` and `Next` are **derived from the state you just produced** — never copied from a
|
|
81
|
+
fixed route, **including any `Flow:` line in this file**. Those lines are the nominal path;
|
|
82
|
+
open ADR experiments, an unclosed spike, an unapproved golden or a red gate all change what
|
|
83
|
+
genuinely comes next, and the derived answer wins. If the next phase cannot start yet, name it
|
|
84
|
+
and say exactly what unblocks it.
|
|
85
|
+
|
|
86
|
+
Keep the CONTENT in the conversation's language, but keep the labels (`CLOSED`, `Produced`,
|
|
87
|
+
`Blocks`, `Next`, `Run`) verbatim — they are the method's vocabulary and the smoke checks them.
|
|
88
|
+
|
|
21
89
|
## Inputs
|
|
22
90
|
|
|
23
91
|
- **Target module** + a **corpus source**: a path to input fixtures, or a reference to
|
|
@@ -26,6 +26,74 @@ two tiers: **measured** records (snapshots, ingest-gate, log-gate — parsed fro
|
|
|
26
26
|
artifacts; these can block) and **self-reported** agent counts (log-step — narration
|
|
27
27
|
recorded for the retrospective; a measured red always overrides a narrated green).
|
|
28
28
|
|
|
29
|
+
## First contact (show ONCE, then never again)
|
|
30
|
+
|
|
31
|
+
**Only when this project has no uscha artifacts yet** -- no `QA-LEDGER.json`, no `SPEC.md` or
|
|
32
|
+
`ACCEPTANCE.md`, no `docs/adr/` -- open with this block, then start working. If any of those
|
|
33
|
+
exist, the operator already knows the method: skip it entirely and go straight to the
|
|
34
|
+
breadcrumb. Repeating it every run would be exactly the ceremony the method forbids.
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
[uscha · devloop · START]
|
|
38
|
+
Method: you bring the idea, the method builds the rest. Facts block, guesses advise;
|
|
39
|
+
nothing closes on a checkbox, and the human approves the merge.
|
|
40
|
+
Here: plan → build → a severity-gated QA loop that converges instead of chasing zero → PR.
|
|
41
|
+
Output: code, tests, and QA-LEDGER.json (every gate recorded with its evidence)
|
|
42
|
+
Next: the human gate: review the PR and decide the merge. I stop there.
|
|
43
|
+
Stop: say so at any point -- whatever is already written stays.
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Bilingual by construction.** The labels (`START`, `Method`, `Here`, `Output`, `Next`,
|
|
47
|
+
`Stop`) stay VERBATIM in English -- they are the method's vocabulary and the smoke suite checks
|
|
48
|
+
for them mechanically, which is only possible if they never move. The wording after each label
|
|
49
|
+
is the canonical English; **render it in the operator's language**. If they are writing to you
|
|
50
|
+
in Spanish, the whole block reads in Spanish under English labels. Do not translate the labels,
|
|
51
|
+
do not leave the content in English when they are not writing in English.
|
|
52
|
+
|
|
53
|
+
Unlike the close block, `Next` here MAY name the nominal route: on a first run there is no
|
|
54
|
+
measured state to derive from yet, so the nominal path is the honest answer. From the close
|
|
55
|
+
block onward, derived state wins.
|
|
56
|
+
|
|
57
|
+
## Orientation markers (non-negotiable)
|
|
58
|
+
|
|
59
|
+
The operator must never have to ask "where am I?" or "what happens now?". Two markers, always.
|
|
60
|
+
They are navigation, not ceremony: one line per turn, one block at the end.
|
|
61
|
+
|
|
62
|
+
**Open every turn with a breadcrumb**, then the content:
|
|
63
|
+
|
|
64
|
+
`[uscha · devloop · <step> → <target>]`
|
|
65
|
+
|
|
66
|
+
- `<step>` — `Q<n>` for a question, `pass <n>` for a loop iteration, `step <n>` otherwise.
|
|
67
|
+
Count what has actually happened. **Never write a denominator** (`Q4/12`): this phase
|
|
68
|
+
converges, its length is not known in advance, and an invented total is exactly the kind of
|
|
69
|
+
narrated number the method forbids. **When the ledger already measures the count** (the QA
|
|
70
|
+
loop's `loop_count`), use the measured number — never keep a parallel tally of your own.
|
|
71
|
+
- `<target>` — the artifact this turn feeds (`SPEC`, `ADR-003`, `ACCEPTANCE`, `LEDGER`,
|
|
72
|
+
`RECEIVED`, ...). Drop `→ <target>` only when the turn genuinely feeds none.
|
|
73
|
+
|
|
74
|
+
**Close with the close block ONCE, when the skill finishes** — not on every turn. Ending
|
|
75
|
+
without it is a defect, even when the phase converged cleanly:
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
[uscha · devloop · CLOSED]
|
|
79
|
+
Produced: <files actually written, or "nothing">
|
|
80
|
+
Blocks: <what stands between here and the next phase, or "nothing">
|
|
81
|
+
Next: <the next action, and why it is that one>
|
|
82
|
+
Run: <the exact command or skill to invoke>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
This is **not** the implementation handoff some skills also emit: that one is a prompt for
|
|
86
|
+
whoever implements next, this one is navigation for the human operator, and both can appear.
|
|
87
|
+
|
|
88
|
+
`Blocks` and `Next` are **derived from the state you just produced** — never copied from a
|
|
89
|
+
fixed route, **including any `Flow:` line in this file**. Those lines are the nominal path;
|
|
90
|
+
open ADR experiments, an unclosed spike, an unapproved golden or a red gate all change what
|
|
91
|
+
genuinely comes next, and the derived answer wins. If the next phase cannot start yet, name it
|
|
92
|
+
and say exactly what unblocks it.
|
|
93
|
+
|
|
94
|
+
Keep the CONTENT in the conversation's language, but keep the labels (`CLOSED`, `Produced`,
|
|
95
|
+
`Blocks`, `Next`, `Run`) verbatim — they are the method's vocabulary and the smoke checks them.
|
|
96
|
+
|
|
29
97
|
## Non-negotiable principles
|
|
30
98
|
|
|
31
99
|
1. **Converge, don't chase zero.** Block only on findings at or above the severity
|