@andresmassello/uscha 1.78.0 → 1.79.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 +1 -1
- package/package.json +1 -1
- package/uscha-kit/.claude/skills/uscha-devloop/qa_ledger.py +58 -4
- 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/reports/junit/.bench-cases.json +1 -1
- package/uscha-kit/skills/uscha-devloop/qa_ledger.py +58 -4
- package/uscha-kit/uscha.config.json +1 -1
package/README.md
CHANGED
|
@@ -40,7 +40,7 @@ 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.
|
|
43
|
+
**Kit v1.79.0** <!-- 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
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andresmassello/uscha",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.79.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
|
"author": {
|
|
6
6
|
"name": "Andres Massello",
|
|
@@ -5489,7 +5489,7 @@ def _bench_oracle_all(impl_path, cases):
|
|
|
5489
5489
|
"failing": [r["name"] for r in results if not r["ok"]]}
|
|
5490
5490
|
|
|
5491
5491
|
|
|
5492
|
-
def _bench_entry(entry_dir, name):
|
|
5492
|
+
def _bench_entry(entry_dir, name, fidelity=False):
|
|
5493
5493
|
"""Run compile-validate + the withheld oracle + variance over ONE bench entry and compute
|
|
5494
5494
|
its verdict. Reuses the M3/M4 organs unchanged; consults no model. A PASS is >=3 oracle-green
|
|
5495
5495
|
compilations that genuinely differ; PARTIAL is core identity with the divergence isolated;
|
|
@@ -5525,8 +5525,49 @@ def _bench_entry(entry_dir, name):
|
|
|
5525
5525
|
impl = os.path.join(cd, unit.replace("/", os.sep)) if unit else None
|
|
5526
5526
|
ores = (_bench_oracle_all(impl, cases) if impl and os.path.isfile(impl)
|
|
5527
5527
|
else {"passed": 0, "total": len(cases), "green": False, "failing": ["<no impl>"]})
|
|
5528
|
-
|
|
5529
|
-
|
|
5528
|
+
comp_rec = {"dir": d, "model": model, "impl": impl,
|
|
5529
|
+
"compile_valid": not errors, "oracle": ores}
|
|
5530
|
+
if fidelity and impl and os.path.isfile(impl) and unit:
|
|
5531
|
+
# the per-compiler fidelity descriptor (ADR-022): the M1 static extractor applied
|
|
5532
|
+
# to the compiled artifact -- reverse discovery per compiler. Advisory by
|
|
5533
|
+
# construction; curation_closure is UNMEASURED (no human curates fixture code --
|
|
5534
|
+
# absence named, never faked).
|
|
5535
|
+
node_ids_f = {nd["id"] for nd in ir_graph.get("nodes") or []}
|
|
5536
|
+
covered_f = set()
|
|
5537
|
+
units_f, traced_f = set(), set()
|
|
5538
|
+
try:
|
|
5539
|
+
with open(cj, encoding="utf-8-sig") as fh2:
|
|
5540
|
+
c2 = json.load(fh2)
|
|
5541
|
+
for e2 in c2.get("trace_manifest") or []:
|
|
5542
|
+
traced_f.add(e2.get("unit"))
|
|
5543
|
+
for nid in e2.get("implements") or []:
|
|
5544
|
+
if nid in node_ids_f:
|
|
5545
|
+
covered_f.add(nid)
|
|
5546
|
+
for sec in ("source", "tests"):
|
|
5547
|
+
for u2 in c2.get(sec) or []:
|
|
5548
|
+
if u2.get("unit"):
|
|
5549
|
+
units_f.add(u2["unit"])
|
|
5550
|
+
except (OSError, ValueError, AttributeError):
|
|
5551
|
+
pass
|
|
5552
|
+
sobs, _uns = _extract_static_py(cd, [unit])
|
|
5553
|
+
fn_names, cls_names = [], []
|
|
5554
|
+
for o2 in sobs:
|
|
5555
|
+
m2 = re.search(r"defines function (\w+)", o2.get("statement", ""))
|
|
5556
|
+
if m2:
|
|
5557
|
+
fn_names.append(m2.group(1))
|
|
5558
|
+
m2 = re.search(r"defines class (\w+)", o2.get("statement", ""))
|
|
5559
|
+
if m2:
|
|
5560
|
+
cls_names.append(m2.group(1))
|
|
5561
|
+
unex = sorted(u for u in units_f if u not in traced_f)
|
|
5562
|
+
comp_rec["fidelity"] = {
|
|
5563
|
+
"trace_coverage": round(len(covered_f) / max(len(node_ids_f), 1), 3),
|
|
5564
|
+
"static_surface": {"functions": len(fn_names), "classes": len(cls_names),
|
|
5565
|
+
"names": sorted(fn_names + cls_names)},
|
|
5566
|
+
"oracle_passrate": (round(ores["passed"] / ores["total"], 3)
|
|
5567
|
+
if ores["total"] else None),
|
|
5568
|
+
"unexplained_share": round(len(unex) / max(len(units_f), 1), 3),
|
|
5569
|
+
"curation_closure": "UNMEASURED"}
|
|
5570
|
+
rec["compilations"].append(comp_rec)
|
|
5530
5571
|
impls = rec["compilations"]
|
|
5531
5572
|
impl_paths = [i["impl"] for i in impls if i["impl"] and os.path.isfile(i["impl"])]
|
|
5532
5573
|
if len(impl_paths) >= 2:
|
|
@@ -5616,6 +5657,17 @@ def _render_bench_md(table, anon, recs):
|
|
|
5616
5657
|
lines.append("- discrimination stub: %d/%d (%s)" % (
|
|
5617
5658
|
dsc["stub_passed"], dsc["total"],
|
|
5618
5659
|
"NON-DISCRIMINATING" if dsc["stub_green"] else "oracle rejects the stub"))
|
|
5660
|
+
for i in r["compilations"]:
|
|
5661
|
+
fd = i.get("fidelity")
|
|
5662
|
+
if fd:
|
|
5663
|
+
lines.append("- fidelity `%s` (%s): trace %.2f · surface %d fn / %d cls · "
|
|
5664
|
+
"oracle %s · unexplained %.2f · curation %s" % (
|
|
5665
|
+
i["dir"], anon.get(i["model"], i["model"] or "?"),
|
|
5666
|
+
fd["trace_coverage"], fd["static_surface"]["functions"],
|
|
5667
|
+
fd["static_surface"]["classes"],
|
|
5668
|
+
("%.3f" % fd["oracle_passrate"])
|
|
5669
|
+
if fd["oracle_passrate"] is not None else "n/a",
|
|
5670
|
+
fd["unexplained_share"], fd["curation_closure"]))
|
|
5619
5671
|
lines.append("")
|
|
5620
5672
|
return "\n".join(lines)
|
|
5621
5673
|
|
|
@@ -5630,7 +5682,7 @@ def cmd_bench(args):
|
|
|
5630
5682
|
print("[qa_ledger] bench: no entries under %s (an entry is a subdir with %s)"
|
|
5631
5683
|
% (args.dir, IR_FILE), file=sys.stderr)
|
|
5632
5684
|
sys.exit(2)
|
|
5633
|
-
recs = [_bench_entry(os.path.join(args.dir, e), e) for e in entries]
|
|
5685
|
+
recs = [_bench_entry(os.path.join(args.dir, e), e, fidelity=getattr(args, "fidelity", False)) for e in entries]
|
|
5634
5686
|
models = sorted({i["model"] for r in recs for i in r["compilations"] if i.get("model")})
|
|
5635
5687
|
anon = {m: "M%d" % (k + 1) for k, m in enumerate(models)}
|
|
5636
5688
|
table = []
|
|
@@ -9982,6 +10034,8 @@ def build_parser():
|
|
|
9982
10034
|
pbn.add_argument("--dir", required=True,
|
|
9983
10035
|
help="the bench directory; each subdir with an IR.json is an entry")
|
|
9984
10036
|
pbn.add_argument("--out", default=None, help="write DIAMOND-BENCH.md here")
|
|
10037
|
+
pbn.add_argument("--fidelity", action="store_true",
|
|
10038
|
+
help="append the per-compiler fidelity descriptor (ADR-022): the M1 static extractor over each compiled source; advisory, never changes a verdict")
|
|
9985
10039
|
pbn.add_argument("--json", action="store_true")
|
|
9986
10040
|
pbn.set_defaults(func=cmd_bench)
|
|
9987
10041
|
|
|
@@ -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.
|
|
4
|
+
"version": "1.79.0",
|
|
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, 48 subcommands + universal installer + npm/npx router). Facts block, guesses advise; the human approves.",
|
|
7
7
|
"author": {
|
package/uscha-kit/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# uscha-kit
|
|
2
2
|
|
|
3
|
-
**Kit version:** v1.
|
|
3
|
+
**Kit version:** v1.79.0 <!-- 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.
|
|
1
|
+
uscha-kit 1.79.0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"AC-DB-01": true, "AC-DB-02": true, "AC-DB-03": true, "AC-DB-05": true, "AC-DB-04": true, "AC-DB-06": true, "AC-BG-01": true, "AC-BG-02": true, "AC-BG-03": true, "AC-BG-04": true, "AC-BG-05": true}
|
|
1
|
+
{"AC-DB-01": true, "AC-DB-02": true, "AC-DB-03": true, "AC-DB-05": true, "AC-DB-04": true, "AC-DB-06": true, "AC-BG-01": true, "AC-BG-02": true, "AC-BG-03": true, "AC-BG-04": true, "AC-BG-05": true, "AC-FC-01": true, "AC-FC-02": true, "AC-FC-03": true}
|
|
@@ -5489,7 +5489,7 @@ def _bench_oracle_all(impl_path, cases):
|
|
|
5489
5489
|
"failing": [r["name"] for r in results if not r["ok"]]}
|
|
5490
5490
|
|
|
5491
5491
|
|
|
5492
|
-
def _bench_entry(entry_dir, name):
|
|
5492
|
+
def _bench_entry(entry_dir, name, fidelity=False):
|
|
5493
5493
|
"""Run compile-validate + the withheld oracle + variance over ONE bench entry and compute
|
|
5494
5494
|
its verdict. Reuses the M3/M4 organs unchanged; consults no model. A PASS is >=3 oracle-green
|
|
5495
5495
|
compilations that genuinely differ; PARTIAL is core identity with the divergence isolated;
|
|
@@ -5525,8 +5525,49 @@ def _bench_entry(entry_dir, name):
|
|
|
5525
5525
|
impl = os.path.join(cd, unit.replace("/", os.sep)) if unit else None
|
|
5526
5526
|
ores = (_bench_oracle_all(impl, cases) if impl and os.path.isfile(impl)
|
|
5527
5527
|
else {"passed": 0, "total": len(cases), "green": False, "failing": ["<no impl>"]})
|
|
5528
|
-
|
|
5529
|
-
|
|
5528
|
+
comp_rec = {"dir": d, "model": model, "impl": impl,
|
|
5529
|
+
"compile_valid": not errors, "oracle": ores}
|
|
5530
|
+
if fidelity and impl and os.path.isfile(impl) and unit:
|
|
5531
|
+
# the per-compiler fidelity descriptor (ADR-022): the M1 static extractor applied
|
|
5532
|
+
# to the compiled artifact -- reverse discovery per compiler. Advisory by
|
|
5533
|
+
# construction; curation_closure is UNMEASURED (no human curates fixture code --
|
|
5534
|
+
# absence named, never faked).
|
|
5535
|
+
node_ids_f = {nd["id"] for nd in ir_graph.get("nodes") or []}
|
|
5536
|
+
covered_f = set()
|
|
5537
|
+
units_f, traced_f = set(), set()
|
|
5538
|
+
try:
|
|
5539
|
+
with open(cj, encoding="utf-8-sig") as fh2:
|
|
5540
|
+
c2 = json.load(fh2)
|
|
5541
|
+
for e2 in c2.get("trace_manifest") or []:
|
|
5542
|
+
traced_f.add(e2.get("unit"))
|
|
5543
|
+
for nid in e2.get("implements") or []:
|
|
5544
|
+
if nid in node_ids_f:
|
|
5545
|
+
covered_f.add(nid)
|
|
5546
|
+
for sec in ("source", "tests"):
|
|
5547
|
+
for u2 in c2.get(sec) or []:
|
|
5548
|
+
if u2.get("unit"):
|
|
5549
|
+
units_f.add(u2["unit"])
|
|
5550
|
+
except (OSError, ValueError, AttributeError):
|
|
5551
|
+
pass
|
|
5552
|
+
sobs, _uns = _extract_static_py(cd, [unit])
|
|
5553
|
+
fn_names, cls_names = [], []
|
|
5554
|
+
for o2 in sobs:
|
|
5555
|
+
m2 = re.search(r"defines function (\w+)", o2.get("statement", ""))
|
|
5556
|
+
if m2:
|
|
5557
|
+
fn_names.append(m2.group(1))
|
|
5558
|
+
m2 = re.search(r"defines class (\w+)", o2.get("statement", ""))
|
|
5559
|
+
if m2:
|
|
5560
|
+
cls_names.append(m2.group(1))
|
|
5561
|
+
unex = sorted(u for u in units_f if u not in traced_f)
|
|
5562
|
+
comp_rec["fidelity"] = {
|
|
5563
|
+
"trace_coverage": round(len(covered_f) / max(len(node_ids_f), 1), 3),
|
|
5564
|
+
"static_surface": {"functions": len(fn_names), "classes": len(cls_names),
|
|
5565
|
+
"names": sorted(fn_names + cls_names)},
|
|
5566
|
+
"oracle_passrate": (round(ores["passed"] / ores["total"], 3)
|
|
5567
|
+
if ores["total"] else None),
|
|
5568
|
+
"unexplained_share": round(len(unex) / max(len(units_f), 1), 3),
|
|
5569
|
+
"curation_closure": "UNMEASURED"}
|
|
5570
|
+
rec["compilations"].append(comp_rec)
|
|
5530
5571
|
impls = rec["compilations"]
|
|
5531
5572
|
impl_paths = [i["impl"] for i in impls if i["impl"] and os.path.isfile(i["impl"])]
|
|
5532
5573
|
if len(impl_paths) >= 2:
|
|
@@ -5616,6 +5657,17 @@ def _render_bench_md(table, anon, recs):
|
|
|
5616
5657
|
lines.append("- discrimination stub: %d/%d (%s)" % (
|
|
5617
5658
|
dsc["stub_passed"], dsc["total"],
|
|
5618
5659
|
"NON-DISCRIMINATING" if dsc["stub_green"] else "oracle rejects the stub"))
|
|
5660
|
+
for i in r["compilations"]:
|
|
5661
|
+
fd = i.get("fidelity")
|
|
5662
|
+
if fd:
|
|
5663
|
+
lines.append("- fidelity `%s` (%s): trace %.2f · surface %d fn / %d cls · "
|
|
5664
|
+
"oracle %s · unexplained %.2f · curation %s" % (
|
|
5665
|
+
i["dir"], anon.get(i["model"], i["model"] or "?"),
|
|
5666
|
+
fd["trace_coverage"], fd["static_surface"]["functions"],
|
|
5667
|
+
fd["static_surface"]["classes"],
|
|
5668
|
+
("%.3f" % fd["oracle_passrate"])
|
|
5669
|
+
if fd["oracle_passrate"] is not None else "n/a",
|
|
5670
|
+
fd["unexplained_share"], fd["curation_closure"]))
|
|
5619
5671
|
lines.append("")
|
|
5620
5672
|
return "\n".join(lines)
|
|
5621
5673
|
|
|
@@ -5630,7 +5682,7 @@ def cmd_bench(args):
|
|
|
5630
5682
|
print("[qa_ledger] bench: no entries under %s (an entry is a subdir with %s)"
|
|
5631
5683
|
% (args.dir, IR_FILE), file=sys.stderr)
|
|
5632
5684
|
sys.exit(2)
|
|
5633
|
-
recs = [_bench_entry(os.path.join(args.dir, e), e) for e in entries]
|
|
5685
|
+
recs = [_bench_entry(os.path.join(args.dir, e), e, fidelity=getattr(args, "fidelity", False)) for e in entries]
|
|
5634
5686
|
models = sorted({i["model"] for r in recs for i in r["compilations"] if i.get("model")})
|
|
5635
5687
|
anon = {m: "M%d" % (k + 1) for k, m in enumerate(models)}
|
|
5636
5688
|
table = []
|
|
@@ -9982,6 +10034,8 @@ def build_parser():
|
|
|
9982
10034
|
pbn.add_argument("--dir", required=True,
|
|
9983
10035
|
help="the bench directory; each subdir with an IR.json is an entry")
|
|
9984
10036
|
pbn.add_argument("--out", default=None, help="write DIAMOND-BENCH.md here")
|
|
10037
|
+
pbn.add_argument("--fidelity", action="store_true",
|
|
10038
|
+
help="append the per-compiler fidelity descriptor (ADR-022): the M1 static extractor over each compiled source; advisory, never changes a verdict")
|
|
9985
10039
|
pbn.add_argument("--json", action="store_true")
|
|
9986
10040
|
pbn.set_defaults(func=cmd_bench)
|
|
9987
10041
|
|