@andresmassello/uscha 1.85.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.85.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 |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andresmassello/uscha",
3
- "version": "1.85.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",
@@ -8231,8 +8231,15 @@ def cmd_readiness(args):
8231
8231
  # hacia adelante (no backfillea). El dashboard lo consume, nunca escribe.
8232
8232
  if getattr(args, "record", False):
8233
8233
  now = _now()
8234
+ # issue #1 (field note 001, limitation 1): persist the CAUSES per entry, not only the
8235
+ # score -- both facts are already computed above; nothing is re-derived. Additive keys:
8236
+ # every existing reader uses .get("at")/.get("score"). None/0 mean "no cap"/"none
8237
+ # discarded", stated rather than absent.
8234
8238
  ledger.setdefault("readiness_history", []).append(
8235
- {"at": now, "score": round(final, 1)})
8239
+ {"at": now, "score": round(final, 1),
8240
+ "cap_applied": ({"reason": cap_reason, "key": cap_key} if cap_reason else None),
8241
+ "stale_discarded": {"count": len(stale_reports),
8242
+ "reports": list(stale_reports)[:8]}})
8236
8243
  # kit 1.46.1: persist a compact MEASURED summary so the statusline (uscha_progress.py)
8237
8244
  # shows MEASURED acceptance -- the same truth this readiness computed -- instead of
8238
8245
  # counting checkboxes (narrated). Write-once/read-many: the fast Stop hook reads this
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
3
3
  "name": "uscha",
4
- "version": "1.85.0",
4
+ "version": "1.85.1",
5
5
  "displayName": "Uscha",
6
6
  "description": "Spec-driven development for LLM coding agents: 9 skills (discovery, adr-refine, reverse-discovery, characterize, devloop, sysdoc, rubric, mirador, status) + a stdlib measurement engine (qa_ledger.py, 51 subcommands + universal installer + npm/npx router). Facts block, guesses advise; the human approves.",
7
7
  "author": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uscha",
3
- "version": "1.85.0",
3
+ "version": "1.85.1",
4
4
  "description": "Uscha spec-driven development methodology for coding agents. Includes npm/npx router.",
5
5
  "author": {
6
6
  "name": "Andres Massello",
@@ -1,6 +1,6 @@
1
1
  # uscha-kit
2
2
 
3
- **Kit version:** v1.85.0 <!-- uscha:version --> · **[uscha.dev](https://uscha.dev)**
3
+ **Kit version:** v1.85.1 <!-- uscha:version --> · **[uscha.dev](https://uscha.dev)**
4
4
 
5
5
  Spec-driven orchestrator + multi-repo QA for Claude Code, with a deterministic ledger.
6
6
  **Nine skills** (`uscha-discovery`, `uscha-adr-refine`, `uscha-devloop`, `uscha-sysdoc`, `uscha-reverse-discovery`,
package/uscha-kit/VERSION CHANGED
@@ -1 +1 @@
1
- uscha-kit 1.85.0
1
+ uscha-kit 1.85.1
@@ -8231,8 +8231,15 @@ def cmd_readiness(args):
8231
8231
  # hacia adelante (no backfillea). El dashboard lo consume, nunca escribe.
8232
8232
  if getattr(args, "record", False):
8233
8233
  now = _now()
8234
+ # issue #1 (field note 001, limitation 1): persist the CAUSES per entry, not only the
8235
+ # score -- both facts are already computed above; nothing is re-derived. Additive keys:
8236
+ # every existing reader uses .get("at")/.get("score"). None/0 mean "no cap"/"none
8237
+ # discarded", stated rather than absent.
8234
8238
  ledger.setdefault("readiness_history", []).append(
8235
- {"at": now, "score": round(final, 1)})
8239
+ {"at": now, "score": round(final, 1),
8240
+ "cap_applied": ({"reason": cap_reason, "key": cap_key} if cap_reason else None),
8241
+ "stale_discarded": {"count": len(stale_reports),
8242
+ "reports": list(stale_reports)[:8]}})
8236
8243
  # kit 1.46.1: persist a compact MEASURED summary so the statusline (uscha_progress.py)
8237
8244
  # shows MEASURED acceptance -- the same truth this readiness computed -- instead of
8238
8245
  # counting checkboxes (narrated). Write-once/read-many: the fast Stop hook reads this
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.85.0",
2
+ "version": "1.85.1",
3
3
  "project": null,
4
4
  "defaults": {
5
5
  "coverage_threshold": 60,