@andresmassello/uscha 1.96.0 → 1.98.1

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.
Files changed (28) hide show
  1. package/README.md +72 -70
  2. package/package.json +1 -1
  3. package/uscha-kit/.claude/skills/uscha-adr-refine/SKILL.md +2 -0
  4. package/uscha-kit/.claude/skills/uscha-characterize/SKILL.md +2 -0
  5. package/uscha-kit/.claude/skills/uscha-devloop/SKILL.md +2 -0
  6. package/uscha-kit/.claude/skills/uscha-devloop/qa_ledger.py +285 -31
  7. package/uscha-kit/.claude/skills/uscha-discovery/SKILL.md +2 -0
  8. package/uscha-kit/.claude/skills/uscha-mirador/SKILL.md +2 -0
  9. package/uscha-kit/.claude/skills/uscha-reverse-discovery/SKILL.md +2 -0
  10. package/uscha-kit/.claude/skills/uscha-rubric/SKILL.md +2 -0
  11. package/uscha-kit/.claude/skills/uscha-status/SKILL.md +2 -0
  12. package/uscha-kit/.claude/skills/uscha-sysdoc/SKILL.md +2 -0
  13. package/uscha-kit/.claude-plugin/plugin.json +1 -1
  14. package/uscha-kit/.codex-plugin/plugin.json +1 -1
  15. package/uscha-kit/README.md +1 -1
  16. package/uscha-kit/VERSION +1 -1
  17. package/uscha-kit/skills/uscha-adr-refine/SKILL.md +2 -0
  18. package/uscha-kit/skills/uscha-characterize/SKILL.md +2 -0
  19. package/uscha-kit/skills/uscha-devloop/SKILL.md +2 -0
  20. package/uscha-kit/skills/uscha-devloop/qa_ledger.py +285 -31
  21. package/uscha-kit/skills/uscha-discovery/SKILL.md +2 -0
  22. package/uscha-kit/skills/uscha-mirador/SKILL.md +2 -0
  23. package/uscha-kit/skills/uscha-reverse-discovery/SKILL.md +2 -0
  24. package/uscha-kit/skills/uscha-rubric/SKILL.md +2 -0
  25. package/uscha-kit/skills/uscha-status/SKILL.md +2 -0
  26. package/uscha-kit/skills/uscha-sysdoc/SKILL.md +2 -0
  27. package/uscha-kit/templates/CONSTITUTION.md +1 -1
  28. package/uscha-kit/uscha.config.json +1 -1
package/README.md CHANGED
@@ -40,81 +40,12 @@ Requires **Python 3.8+** on the machine (the engine is Python stdlib — no pip
40
40
  runtime dependencies). The npm package is a thin router; the canonical installer is
41
41
  `uscha-kit/install-uscha.py`.
42
42
 
43
- **Kit v1.96.0** <!-- uscha:version --> · [uscha.dev](https://uscha.dev) ·
43
+ **Kit v1.98.1** <!-- uscha:version --> · [uscha.dev](https://uscha.dev) ·
44
44
  [changelog](https://github.com/andresmassello/uscha/blob/main/uscha-kit/CHANGELOG.md)
45
45
  (the per-release changelogs live in the repo, not in the npm tarball)
46
46
 
47
47
  ---
48
48
 
49
- ## The diamond — specs are the source code, end to end
50
-
51
- Uscha closes a cycle most spec-driven tools only walk halfway. The **spec package plus its
52
- behavior ledger** is the canonical asset of a system; the code is a regenerable build artifact.
53
- An LLM compiles the package into code under a validated contract; reverse discovery decompiles
54
- existing code back into *curated* specs — passing, mandatorily, through the one step no
55
- automatic tool can perform: a human verdict.
56
-
57
- ```
58
- THE ASSET (solid) ── it appreciates with every model generation
59
- ┌───────────────────────────────────────────────────────────────┐
60
- │ SPEC PACKAGE + BEHAVIOR LEDGER + IR │
61
- │ SPEC · ADRs · ACCEPTANCE · CONSTITUTION │
62
- │ verdicts: preserve · fix · undefined │
63
- └──────────────┬─────────────────────────────▲──────────────────┘
64
- │ │
65
- FORWARD │ │ REVERSE
66
- the LLM compiles │ │ reverse discovery
67
- ▼ │
68
- ┌─────────────────────────────────────┐ ┌─────────┴─────────────────────┐
69
- │ compile-validate — output contract, │ │ CURATION · the human gate │
70
- │ mechanical only, model-blind │ │ candidate ─▶ verdict ─▶ ledger │
71
- │ withheld ORACLE — authored BEFORE │ │ no verdict → PR blocked, │
72
- │ compiling, never in the prompt │ │ the candidate is NAMED │
73
- └─────────────────┬───────────────────┘ └─────────▲─────────────────────┘
74
- │ │
75
- ▼ │
76
- ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐ ┌─────────────┴─────────────────────┐
77
- CODE (dashed) — build artifact, │ discover · golden capture │
78
- regenerable, disposable ───▶│ candidates: typed evidence │
79
- └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ │ + confidence │
80
- └───────────────────────────────────┘
81
- ▲ also enters here: any LEGACY
82
- system (= 100% drift)
83
-
84
- round trip · bench-roundtrip — how much of the asset the reverse organs re-anchor
85
- from the compiled code: 0.828 measured (12 archetypes) — names AND behaviour
86
- ```
87
-
88
- **What each arrow is, in the engine (kit 1.96.0, 53 subcommands, all measured):**
89
-
90
- | Leg | Subcommands | What it establishes |
91
- |---|---|---|
92
- | Asset → typed graph | `ir-extract`, `ir-render` | the whole package becomes one canonical IR (M2, ADR-015) — deterministic, `UNTYPED` is a measurement not an error |
93
- | Forward, the compiler | `compile-validate`, `compile-ingest` | any model produces code; the engine validates the output contract and never compiles (M3, ADR-016) |
94
- | Forward, is it the *same* system? | `bootstrap-oracle`, `bootstrap-variance`, `bench` | a withheld oracle judges blind compilations — **12 archetypes, 9 PASS · 3 PARTIAL**, three Claude-family models (Haiku · Sonnet · Opus — one vendor; cross-vendor not yet measured), JS included (M4/M5, ADR-017/018/028/029) |
95
- | Reverse, facts | `discover`, `golden-diff` (+ the `/uscha-characterize` skill) | system map + mechanically captured golden; typed candidate observations with evidence class (M1, ADR-013) |
96
- | Reverse, the human gate | `curate`, `promote`, `curation-check`, `bench-curate` | one verdict per candidate, append-only ledger verified against git; unjudged → `pr-ready` blocked naming it (ADR-009/010, INV-CURATION-01) |
97
- | Fidelity, honestly | `fidelity`, `roundtrip`, `bench-roundtrip`, `bench-r2` | per-compiler fidelity vector, id-level round trip, recoverability **0.828**, and the **noise floor** under every variance claim (ADR-014/022/027/030) |
98
-
99
- **Read the numbers the way the repo does.** 9 of 12 archetypes regenerate to the same system
100
- under an oracle the compilers never saw — that is the closed loop working. 0.828 is the mean
101
- *recoverability* of the asset from compiled code counting only static and behavioural
102
- footing. It read **0.062** until 1.90.0, with the behaviour dimension `UNMEASURED`, because no
103
- oracle case carried an AC tag — a named absence, not a zero. The 12 bench oracles are now
104
- curated per case (`ORACLE-TAGS-CURATED.json`, human-authored; payloads and expectations
105
- untouched), so the dimension is measured and the number says the reverse organs anchor **names
106
- and behaviour**. Both numbers are published rather than smoothed, and what moved between them
107
- was the tagging, not the code under test. And `bench-r2` measured
108
- that same-model reruns differ structurally about as much as different models do (aggregate
109
- `NOISY`) — so one earlier variance narrative was **retracted**. Every claim above is a subcommand
110
- you can run; every unmeasured part is labeled. That honesty is the method applied to itself.
111
-
112
- → The full thesis, with before/after diagrams and the REAL vs VISION table:
113
- **[uscha.dev/diamond](https://uscha.dev/diamond)** · the mechanism, in three diagrams:
114
- **[uscha.dev/how](https://uscha.dev/how)**
115
-
116
- ---
117
-
118
49
  ## The problem it solves
119
50
 
120
51
  An agent will tell you the tests pass. It will tell you the feature is done. It is often
@@ -202,6 +133,75 @@ else `doctor` reports `advisory` rather than implying a guard it cannot see.
202
133
  - **Model-agnostic.** The engine never reads tokens, model names or vendor telemetry. Any
203
134
  model-reported number enters through an adapter, never the engine.
204
135
 
136
+ ## The diamond — specs are the source code, end to end
137
+
138
+ Uscha closes a cycle most spec-driven tools only walk halfway. The **spec package plus its
139
+ behavior ledger** is the canonical asset of a system; the code is a regenerable build artifact.
140
+ An LLM compiles the package into code under a validated contract; reverse discovery decompiles
141
+ existing code back into *curated* specs — passing, mandatorily, through the one step no
142
+ automatic tool can perform: a human verdict.
143
+
144
+ ```
145
+ THE ASSET (solid) ── it appreciates with every model generation
146
+ ┌───────────────────────────────────────────────────────────────┐
147
+ │ SPEC PACKAGE + BEHAVIOR LEDGER + IR │
148
+ │ SPEC · ADRs · ACCEPTANCE · CONSTITUTION │
149
+ │ verdicts: preserve · fix · undefined │
150
+ └──────────────┬─────────────────────────────▲──────────────────┘
151
+ │ │
152
+ FORWARD │ │ REVERSE
153
+ the LLM compiles │ │ reverse discovery
154
+ ▼ │
155
+ ┌─────────────────────────────────────┐ ┌─────────┴─────────────────────┐
156
+ │ compile-validate — output contract, │ │ CURATION · the human gate │
157
+ │ mechanical only, model-blind │ │ candidate ─▶ verdict ─▶ ledger │
158
+ │ withheld ORACLE — authored BEFORE │ │ no verdict → PR blocked, │
159
+ │ compiling, never in the prompt │ │ the candidate is NAMED │
160
+ └─────────────────┬───────────────────┘ └─────────▲─────────────────────┘
161
+ │ │
162
+ ▼ │
163
+ ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐ ┌─────────────┴─────────────────────┐
164
+ CODE (dashed) — build artifact, │ discover · golden capture │
165
+ regenerable, disposable ───▶│ candidates: typed evidence │
166
+ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ │ + confidence │
167
+ └───────────────────────────────────┘
168
+ ▲ also enters here: any LEGACY
169
+ system (= 100% drift)
170
+
171
+ round trip · bench-roundtrip — how much of the asset the reverse organs re-anchor
172
+ from the compiled code: 0.828 measured (12 archetypes) — names AND behaviour
173
+ ```
174
+
175
+ **What each arrow is, in the engine (kit 1.96.0, 53 subcommands, all measured):**
176
+
177
+ | Leg | Subcommands | What it establishes |
178
+ |---|---|---|
179
+ | Asset → typed graph | `ir-extract`, `ir-render` | the whole package becomes one canonical IR (M2, ADR-015) — deterministic, `UNTYPED` is a measurement not an error |
180
+ | Forward, the compiler | `compile-validate`, `compile-ingest` | any model produces code; the engine validates the output contract and never compiles (M3, ADR-016) |
181
+ | Forward, is it the *same* system? | `bootstrap-oracle`, `bootstrap-variance`, `bench` | a withheld oracle judges blind compilations — **12 archetypes, 9 PASS · 3 PARTIAL**, three Claude-family models (Haiku · Sonnet · Opus — one vendor; cross-vendor not yet measured), JS included (M4/M5, ADR-017/018/028/029) |
182
+ | Reverse, facts | `discover`, `golden-diff` (+ the `/uscha-characterize` skill) | system map + mechanically captured golden; typed candidate observations with evidence class (M1, ADR-013) |
183
+ | Reverse, the human gate | `curate`, `promote`, `curation-check`, `bench-curate` | one verdict per candidate, append-only ledger verified against git; unjudged → `pr-ready` blocked naming it (ADR-009/010, INV-CURATION-01) |
184
+ | Fidelity, honestly | `fidelity`, `roundtrip`, `bench-roundtrip`, `bench-r2` | per-compiler fidelity vector, id-level round trip, recoverability **0.828**, and the **noise floor** under every variance claim (ADR-014/022/027/030) |
185
+
186
+ **Read the numbers the way the repo does.** 9 of 12 archetypes regenerate to the same system
187
+ under an oracle the compilers never saw — that is the closed loop working. 0.828 is the mean
188
+ *recoverability* of the asset from compiled code counting only static and behavioural
189
+ footing. It read **0.062** until 1.90.0, with the behaviour dimension `UNMEASURED`, because no
190
+ oracle case carried an AC tag — a named absence, not a zero. The 12 bench oracles are now
191
+ curated per case (`ORACLE-TAGS-CURATED.json`, human-authored; payloads and expectations
192
+ untouched), so the dimension is measured and the number says the reverse organs anchor **names
193
+ and behaviour**. Both numbers are published rather than smoothed, and what moved between them
194
+ was the tagging, not the code under test. And `bench-r2` measured
195
+ that same-model reruns differ structurally about as much as different models do (aggregate
196
+ `NOISY`) — so one earlier variance narrative was **retracted**. Every claim above is a subcommand
197
+ you can run; every unmeasured part is labeled. That honesty is the method applied to itself.
198
+
199
+ → The full thesis, with before/after diagrams and the REAL vs VISION vs REJECTED table:
200
+ **[uscha.dev/diamond](https://uscha.dev/diamond)** · the mechanism, in three diagrams:
201
+ **[uscha.dev/how](https://uscha.dev/how)**
202
+
203
+ ---
204
+
205
205
  ## Documentation
206
206
 
207
207
  - **[`uscha-kit/INSTALL.md`](uscha-kit/INSTALL.md)** — full install guide (npm, git, plugin)
@@ -209,6 +209,8 @@ else `doctor` reports `advisory` rather than implying a guard it cannot see.
209
209
  subcommand, the readiness KPI, the simplicity and rebuild gates
210
210
  - **[`docs/`](docs/)** — the long deck, the operator's playbook, a skills reference and a
211
211
  one-pager (ES + EN)
212
+ - **[`docs/adr/INDEX.md`](docs/adr/INDEX.md)** — every architecture decision, grouped by who
213
+ needs it, with a five-ADR reading order for a newcomer
212
214
  - **[`docs/paper/`](docs/paper/)** — the method written up as a paper
213
215
 
214
216
  Each release ships a `uscha-kit/CHANGELOG-X.Y.Z.md` explaining what changed and why.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andresmassello/uscha",
3
- "version": "1.96.0",
3
+ "version": "1.98.1",
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
  "author": {
6
6
  "name": "Andres Massello",
@@ -18,6 +18,7 @@ You convert a rough idea into a development-ready specification. You do this in
18
18
  phases. **You are NOT a generator. You are an interrogator that distills.** The value
19
19
  is in the questions, not in agreeing.
20
20
 
21
+ <!-- uscha:orientation-block:begin -->
21
22
  ## First contact (show ONCE, then never again)
22
23
 
23
24
  **Only when this project has no uscha artifacts yet** -- no `QA-LEDGER.json`, no `SPEC.md` or
@@ -85,6 +86,7 @@ and say exactly what unblocks it.
85
86
 
86
87
  Keep the CONTENT in the conversation's language, but keep the labels (`CLOSED`, `Produced`,
87
88
  `Blocks`, `Next`, `Run`) verbatim — they are the method's vocabulary and the smoke checks them.
89
+ <!-- uscha:orientation-block:end -->
88
90
 
89
91
  ## Non-negotiable principles
90
92
 
@@ -18,6 +18,7 @@ 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
+ <!-- uscha:orientation-block:begin -->
21
22
  ## First contact (show ONCE, then never again)
22
23
 
23
24
  **Only when this project has no uscha artifacts yet** -- no `QA-LEDGER.json`, no `SPEC.md` or
@@ -85,6 +86,7 @@ and say exactly what unblocks it.
85
86
 
86
87
  Keep the CONTENT in the conversation's language, but keep the labels (`CLOSED`, `Produced`,
87
88
  `Blocks`, `Next`, `Run`) verbatim — they are the method's vocabulary and the smoke checks them.
89
+ <!-- uscha:orientation-block:end -->
88
90
 
89
91
  ## Inputs
90
92
 
@@ -26,6 +26,7 @@ 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
+ <!-- uscha:orientation-block:begin -->
29
30
  ## First contact (show ONCE, then never again)
30
31
 
31
32
  **Only when this project has no uscha artifacts yet** -- no `QA-LEDGER.json`, no `SPEC.md` or
@@ -93,6 +94,7 @@ and say exactly what unblocks it.
93
94
 
94
95
  Keep the CONTENT in the conversation's language, but keep the labels (`CLOSED`, `Produced`,
95
96
  `Blocks`, `Next`, `Run`) verbatim — they are the method's vocabulary and the smoke checks them.
97
+ <!-- uscha:orientation-block:end -->
96
98
 
97
99
  ## Non-negotiable principles
98
100