@andresmassello/uscha 1.84.0 → 1.85.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.
package/README.md CHANGED
@@ -8,7 +8,7 @@ never what was claimed.
8
8
  > The tool executes · the method governs · evidence decides · the human approves.
9
9
 
10
10
  **[uscha.dev](https://uscha.dev)** — the method, the five rules, the skills, the library
11
- (essay, 2-day dev course, reference, paper).
11
+ (the diamond thesis, how-it-works diagrams, essay, 2-day dev course, reference, paper).
12
12
 
13
13
  ```bash
14
14
  npx --yes @andresmassello/uscha@latest install --target claude # Claude Code
@@ -40,12 +40,77 @@ 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.84.0** <!-- uscha:version --> · [uscha.dev](https://uscha.dev) ·
43
+ **Kit v1.85.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.062 measured (12 archetypes) — names, not yet semantics
86
+ ```
87
+
88
+ **What each arrow is, in the engine (kit 1.85.1, 51 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 models, 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.062**, 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.062 is the mean
101
+ *recoverability* of the asset from compiled code counting only static and behavioural
102
+ footing, with the behaviour dimension still `UNMEASURED` — it says the reverse organs anchor
103
+ **names, not yet semantics**, and it is published rather than smoothed. And `bench-r2` measured
104
+ that same-model reruns differ structurally about as much as different models do (aggregate
105
+ `NOISY`) — so one earlier variance narrative was **retracted**. Every claim above is a subcommand
106
+ you can run; every unmeasured part is labeled. That honesty is the method applied to itself.
107
+
108
+ → The full thesis, with before/after diagrams and the REAL vs VISION table:
109
+ **[uscha.dev/diamond](https://uscha.dev/diamond)** · the mechanism, in three diagrams:
110
+ **[uscha.dev/how](https://uscha.dev/how)**
111
+
112
+ ---
113
+
49
114
  ## The problem it solves
50
115
 
51
116
  An agent will tell you the tests pass. It will tell you the feature is done. It is often
@@ -68,7 +133,7 @@ and see which file, which test, and when.
68
133
  |---|---|
69
134
  | `/uscha-discovery` | Idea → spec package (CONTEXT, SPEC, ADRs, CONSTITUTION, ACCEPTANCE) |
70
135
  | `/uscha-adr-refine` | Known feature → ADR + ACCEPTANCE, by interrogating you first |
71
- | `/uscha-reverse-discovery` | Existing system → extracted facts (brownfield migrations) |
136
+ | `/uscha-reverse-discovery` | Existing system → facts + typed candidates in quarantine; never promoted without a human verdict (brownfield) |
72
137
  | `/uscha-characterize` | Capture a golden suite of current behavior before touching it |
73
138
  | `/uscha-devloop` | Plan → build → severity-gated QA loop → PR (stops at the merge) |
74
139
  | `/uscha-rubric` | Grade the non-testable (conventions, ergonomics) against a versioned rubric |
@@ -76,7 +141,7 @@ and see which file, which test, and when.
76
141
  | `/uscha-mirador` | Bird's-eye HTML dashboard: readiness, trail, acceptance, loops |
77
142
  | `/uscha-status` | One-line progress readout, in chat |
78
143
 
79
- **A measurement engine** (`qa_ledger.py`, 50 subcommands, Python stdlib) that ingests
144
+ **A measurement engine** (`qa_ledger.py`, 51 subcommands, Python stdlib) that ingests
80
145
  evidence from **11 language stacks** — maven, gradle, ant, python, node, go, rust, dotnet,
81
146
  cpp, swift, flutter — and computes a readiness score with hard caps and visible provenance.
82
147
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andresmassello/uscha",
3
- "version": "1.84.0",
3
+ "version": "1.85.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",