@andresmassello/uscha 1.81.0 → 1.83.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 +30 -11
- 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-curate-cases.json +1 -1
- package/uscha-kit/reports/junit/.sched-cases.json +1 -0
- package/uscha-kit/skills/uscha-devloop/qa_ledger.py +30 -11
- package/uscha-kit/templates/scripts/uscha_progress.py +2 -1
- 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.83.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.83.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",
|
|
@@ -5582,19 +5582,20 @@ def _bench_entry(entry_dir, name, fidelity=False, curation=None):
|
|
|
5582
5582
|
node_ids_f = {nd["id"] for nd in ir_graph.get("nodes") or []}
|
|
5583
5583
|
covered_f = set()
|
|
5584
5584
|
units_f, traced_f = set(), set()
|
|
5585
|
+
# `c` was already parsed above for this same COMPILATION.json; reaching this
|
|
5586
|
+
# block requires `unit` to be set, which only happens after that parse
|
|
5587
|
+
# succeeded -- so `c` is guaranteed defined here, no need to re-open/re-parse.
|
|
5585
5588
|
try:
|
|
5586
|
-
|
|
5587
|
-
c2 = json.load(fh2)
|
|
5588
|
-
for e2 in c2.get("trace_manifest") or []:
|
|
5589
|
+
for e2 in c.get("trace_manifest") or []:
|
|
5589
5590
|
traced_f.add(e2.get("unit"))
|
|
5590
5591
|
for nid in e2.get("implements") or []:
|
|
5591
5592
|
if nid in node_ids_f:
|
|
5592
5593
|
covered_f.add(nid)
|
|
5593
5594
|
for sec in ("source", "tests"):
|
|
5594
|
-
for u2 in
|
|
5595
|
+
for u2 in c.get(sec) or []:
|
|
5595
5596
|
if u2.get("unit"):
|
|
5596
5597
|
units_f.add(u2["unit"])
|
|
5597
|
-
except
|
|
5598
|
+
except AttributeError:
|
|
5598
5599
|
pass
|
|
5599
5600
|
sobs, _uns = _extract_static_py(cd, [unit])
|
|
5600
5601
|
fn_names, cls_names = [], []
|
|
@@ -5975,7 +5976,7 @@ def cmd_lang_compare(args):
|
|
|
5975
5976
|
"""Compare a FREE-prose arm and a CONTROLLED (EARS+STE) arm of the same canonical package
|
|
5976
5977
|
(ADR-019). The two arms MUST share one withheld oracle -- a differing oracle is a mechanical
|
|
5977
5978
|
refusal, because the whole comparison rests on the arms targeting the same behaviour. Emits
|
|
5978
|
-
the per-arm metrics, the delta, and a COMPUTED verdict (REDUCED / NO EFFECT / WORSE); a null
|
|
5979
|
+
the per-arm metrics, the delta, and a COMPUTED verdict (REDUCED / IMPROVED / MIXED / NO EFFECT / WORSE); a null
|
|
5979
5980
|
is a first-class result. Consults no model."""
|
|
5980
5981
|
hf, hc = _oracle_hash(args.free), _oracle_hash(args.controlled)
|
|
5981
5982
|
if hf is None or hc is None:
|
|
@@ -5998,15 +5999,22 @@ def cmd_lang_compare(args):
|
|
|
5998
5999
|
d_green = ctrl["greens"] - free["greens"]
|
|
5999
6000
|
pf, pc = free["mean_passrate"], ctrl["mean_passrate"]
|
|
6000
6001
|
d_pass = (pc - pf) if (pf is not None and pc is not None) else None
|
|
6001
|
-
# Verdict is BEHAVIOUR-FIRST
|
|
6002
|
-
#
|
|
6002
|
+
# Verdict is BEHAVIOUR-FIRST in BOTH directions. The M4 lesson: lower variance toward a
|
|
6003
|
+
# WORSE answer is not a win (MIXED). Its mirror, the ADR-025 scheduler lesson: higher
|
|
6004
|
+
# variance toward a BETTER answer is not a loss (IMPROVED) -- two compilers converging on
|
|
6005
|
+
# the SAME bug reads as low variance, and a rewrite that separates them raises variance
|
|
6006
|
+
# while fixing behaviour. A regression is a lost all-green OR a mean pass-rate drop beyond
|
|
6007
|
+
# the pass-rate margin; an improvement is the exact mirror. ADR-019 + ADR-026.
|
|
6003
6008
|
variance_reduced = d_var is not None and d_var <= -_LANG_MARGIN
|
|
6004
6009
|
variance_worse = d_var is not None and d_var >= _LANG_MARGIN
|
|
6005
6010
|
regressed = (d_green < 0) or (d_pass is not None and d_pass <= -_LANG_PR_MARGIN)
|
|
6011
|
+
improved = (d_green > 0) or (d_pass is not None and d_pass >= _LANG_PR_MARGIN)
|
|
6006
6012
|
if variance_reduced and regressed:
|
|
6007
6013
|
verdict = "MIXED" # variance down but behaviour regressed
|
|
6008
6014
|
elif variance_reduced:
|
|
6009
|
-
verdict = "REDUCED" # variance down, behaviour held
|
|
6015
|
+
verdict = "REDUCED" # variance down, behaviour held or better
|
|
6016
|
+
elif improved and not regressed:
|
|
6017
|
+
verdict = "IMPROVED" # behaviour up, variance not down
|
|
6010
6018
|
elif variance_worse or regressed:
|
|
6011
6019
|
verdict = "WORSE"
|
|
6012
6020
|
else:
|
|
@@ -6015,6 +6023,7 @@ def cmd_lang_compare(args):
|
|
|
6015
6023
|
"unresolved_intent_count": round(d_ui, 3), "oracle_green": d_green,
|
|
6016
6024
|
"mean_passrate": round(d_pass, 4) if d_pass is not None else None}
|
|
6017
6025
|
report = {"free": free, "controlled": ctrl, "delta": delta, "verdict": verdict,
|
|
6026
|
+
"regressed": regressed, "improved": improved,
|
|
6018
6027
|
"margin": _LANG_MARGIN, "passrate_margin": _LANG_PR_MARGIN, "oracle_shared": True}
|
|
6019
6028
|
if args.out:
|
|
6020
6029
|
with open(args.out, "w", encoding="utf-8", newline="\n") as fh:
|
|
@@ -6077,7 +6086,15 @@ def _render_lang_md(r):
|
|
|
6077
6086
|
"the delta here. A null result, reported as a null — not a failure.",
|
|
6078
6087
|
"WORSE": "Controlled authoring increased variance, or regressed behaviour (lost an "
|
|
6079
6088
|
"all-green or dropped mean pass-rate) beyond the margins — reported "
|
|
6080
|
-
"honestly."
|
|
6089
|
+
"honestly.",
|
|
6090
|
+
"IMPROVED": "Controlled authoring IMPROVED behaviour (gained an all-green or raised "
|
|
6091
|
+
"mean pass-rate beyond the %.2f margin) while inter-compiler variance "
|
|
6092
|
+
"did not fall. Behaviour won; variance did not — check whether the free "
|
|
6093
|
+
"arm's low variance was convergence on a shared reading (right or "
|
|
6094
|
+
"wrong): two compilers resolving the same ambiguity the same way read "
|
|
6095
|
+
"as agreement, and a rewrite that separates them raises variance "
|
|
6096
|
+
"while moving behaviour."
|
|
6097
|
+
% r.get("passrate_margin", 0.02)}[r["verdict"]],
|
|
6081
6098
|
"", "*The oracle is byte-identical across both arms, so behaviour is held fixed; "
|
|
6082
6099
|
"the only variable is the authoring discipline. The judgement of \"same semantic "
|
|
6083
6100
|
"content\" between the two canonical packages is human — a stated limitation.*", ""]
|
|
@@ -10217,7 +10234,9 @@ def build_parser():
|
|
|
10217
10234
|
pbc.add_argument("--bench", required=True,
|
|
10218
10235
|
help="the bench directory (the store lives at its root)")
|
|
10219
10236
|
pbc.add_argument("--entry", required=True, help="the archetype entry")
|
|
10220
|
-
pbc.add_argument("--dir",
|
|
10237
|
+
pbc.add_argument("--dir", "--compilation", dest="dir", required=True,
|
|
10238
|
+
help="the compilation dir (e.g. c-opus); --compilation is an alias "
|
|
10239
|
+
"(bench --dir means the bench root -- a copy-paste hazard)")
|
|
10221
10240
|
pbc.add_argument("--obs", default=None, help="a single OBS id from --list")
|
|
10222
10241
|
pbc.add_argument("--verdict", default=None, choices=_BENCH_CURATION_VERDICTS)
|
|
10223
10242
|
pbc.add_argument("--note", default=None)
|
|
@@ -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.83.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, 49 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.83.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.83.0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"AC-BC-01": true, "AC-BC-02": true, "AC-BC-03": true}
|
|
1
|
+
{"AC-BC-04": true, "AC-BC-01": true, "AC-BC-02": true, "AC-BC-03": true}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"AC-SH-01": true, "AC-SH-02": true, "AC-SH-03": true, "AC-LI-01": true, "AC-LI-02": true, "AC-LI-03": true}
|
|
@@ -5582,19 +5582,20 @@ def _bench_entry(entry_dir, name, fidelity=False, curation=None):
|
|
|
5582
5582
|
node_ids_f = {nd["id"] for nd in ir_graph.get("nodes") or []}
|
|
5583
5583
|
covered_f = set()
|
|
5584
5584
|
units_f, traced_f = set(), set()
|
|
5585
|
+
# `c` was already parsed above for this same COMPILATION.json; reaching this
|
|
5586
|
+
# block requires `unit` to be set, which only happens after that parse
|
|
5587
|
+
# succeeded -- so `c` is guaranteed defined here, no need to re-open/re-parse.
|
|
5585
5588
|
try:
|
|
5586
|
-
|
|
5587
|
-
c2 = json.load(fh2)
|
|
5588
|
-
for e2 in c2.get("trace_manifest") or []:
|
|
5589
|
+
for e2 in c.get("trace_manifest") or []:
|
|
5589
5590
|
traced_f.add(e2.get("unit"))
|
|
5590
5591
|
for nid in e2.get("implements") or []:
|
|
5591
5592
|
if nid in node_ids_f:
|
|
5592
5593
|
covered_f.add(nid)
|
|
5593
5594
|
for sec in ("source", "tests"):
|
|
5594
|
-
for u2 in
|
|
5595
|
+
for u2 in c.get(sec) or []:
|
|
5595
5596
|
if u2.get("unit"):
|
|
5596
5597
|
units_f.add(u2["unit"])
|
|
5597
|
-
except
|
|
5598
|
+
except AttributeError:
|
|
5598
5599
|
pass
|
|
5599
5600
|
sobs, _uns = _extract_static_py(cd, [unit])
|
|
5600
5601
|
fn_names, cls_names = [], []
|
|
@@ -5975,7 +5976,7 @@ def cmd_lang_compare(args):
|
|
|
5975
5976
|
"""Compare a FREE-prose arm and a CONTROLLED (EARS+STE) arm of the same canonical package
|
|
5976
5977
|
(ADR-019). The two arms MUST share one withheld oracle -- a differing oracle is a mechanical
|
|
5977
5978
|
refusal, because the whole comparison rests on the arms targeting the same behaviour. Emits
|
|
5978
|
-
the per-arm metrics, the delta, and a COMPUTED verdict (REDUCED / NO EFFECT / WORSE); a null
|
|
5979
|
+
the per-arm metrics, the delta, and a COMPUTED verdict (REDUCED / IMPROVED / MIXED / NO EFFECT / WORSE); a null
|
|
5979
5980
|
is a first-class result. Consults no model."""
|
|
5980
5981
|
hf, hc = _oracle_hash(args.free), _oracle_hash(args.controlled)
|
|
5981
5982
|
if hf is None or hc is None:
|
|
@@ -5998,15 +5999,22 @@ def cmd_lang_compare(args):
|
|
|
5998
5999
|
d_green = ctrl["greens"] - free["greens"]
|
|
5999
6000
|
pf, pc = free["mean_passrate"], ctrl["mean_passrate"]
|
|
6000
6001
|
d_pass = (pc - pf) if (pf is not None and pc is not None) else None
|
|
6001
|
-
# Verdict is BEHAVIOUR-FIRST
|
|
6002
|
-
#
|
|
6002
|
+
# Verdict is BEHAVIOUR-FIRST in BOTH directions. The M4 lesson: lower variance toward a
|
|
6003
|
+
# WORSE answer is not a win (MIXED). Its mirror, the ADR-025 scheduler lesson: higher
|
|
6004
|
+
# variance toward a BETTER answer is not a loss (IMPROVED) -- two compilers converging on
|
|
6005
|
+
# the SAME bug reads as low variance, and a rewrite that separates them raises variance
|
|
6006
|
+
# while fixing behaviour. A regression is a lost all-green OR a mean pass-rate drop beyond
|
|
6007
|
+
# the pass-rate margin; an improvement is the exact mirror. ADR-019 + ADR-026.
|
|
6003
6008
|
variance_reduced = d_var is not None and d_var <= -_LANG_MARGIN
|
|
6004
6009
|
variance_worse = d_var is not None and d_var >= _LANG_MARGIN
|
|
6005
6010
|
regressed = (d_green < 0) or (d_pass is not None and d_pass <= -_LANG_PR_MARGIN)
|
|
6011
|
+
improved = (d_green > 0) or (d_pass is not None and d_pass >= _LANG_PR_MARGIN)
|
|
6006
6012
|
if variance_reduced and regressed:
|
|
6007
6013
|
verdict = "MIXED" # variance down but behaviour regressed
|
|
6008
6014
|
elif variance_reduced:
|
|
6009
|
-
verdict = "REDUCED" # variance down, behaviour held
|
|
6015
|
+
verdict = "REDUCED" # variance down, behaviour held or better
|
|
6016
|
+
elif improved and not regressed:
|
|
6017
|
+
verdict = "IMPROVED" # behaviour up, variance not down
|
|
6010
6018
|
elif variance_worse or regressed:
|
|
6011
6019
|
verdict = "WORSE"
|
|
6012
6020
|
else:
|
|
@@ -6015,6 +6023,7 @@ def cmd_lang_compare(args):
|
|
|
6015
6023
|
"unresolved_intent_count": round(d_ui, 3), "oracle_green": d_green,
|
|
6016
6024
|
"mean_passrate": round(d_pass, 4) if d_pass is not None else None}
|
|
6017
6025
|
report = {"free": free, "controlled": ctrl, "delta": delta, "verdict": verdict,
|
|
6026
|
+
"regressed": regressed, "improved": improved,
|
|
6018
6027
|
"margin": _LANG_MARGIN, "passrate_margin": _LANG_PR_MARGIN, "oracle_shared": True}
|
|
6019
6028
|
if args.out:
|
|
6020
6029
|
with open(args.out, "w", encoding="utf-8", newline="\n") as fh:
|
|
@@ -6077,7 +6086,15 @@ def _render_lang_md(r):
|
|
|
6077
6086
|
"the delta here. A null result, reported as a null — not a failure.",
|
|
6078
6087
|
"WORSE": "Controlled authoring increased variance, or regressed behaviour (lost an "
|
|
6079
6088
|
"all-green or dropped mean pass-rate) beyond the margins — reported "
|
|
6080
|
-
"honestly."
|
|
6089
|
+
"honestly.",
|
|
6090
|
+
"IMPROVED": "Controlled authoring IMPROVED behaviour (gained an all-green or raised "
|
|
6091
|
+
"mean pass-rate beyond the %.2f margin) while inter-compiler variance "
|
|
6092
|
+
"did not fall. Behaviour won; variance did not — check whether the free "
|
|
6093
|
+
"arm's low variance was convergence on a shared reading (right or "
|
|
6094
|
+
"wrong): two compilers resolving the same ambiguity the same way read "
|
|
6095
|
+
"as agreement, and a rewrite that separates them raises variance "
|
|
6096
|
+
"while moving behaviour."
|
|
6097
|
+
% r.get("passrate_margin", 0.02)}[r["verdict"]],
|
|
6081
6098
|
"", "*The oracle is byte-identical across both arms, so behaviour is held fixed; "
|
|
6082
6099
|
"the only variable is the authoring discipline. The judgement of \"same semantic "
|
|
6083
6100
|
"content\" between the two canonical packages is human — a stated limitation.*", ""]
|
|
@@ -10217,7 +10234,9 @@ def build_parser():
|
|
|
10217
10234
|
pbc.add_argument("--bench", required=True,
|
|
10218
10235
|
help="the bench directory (the store lives at its root)")
|
|
10219
10236
|
pbc.add_argument("--entry", required=True, help="the archetype entry")
|
|
10220
|
-
pbc.add_argument("--dir",
|
|
10237
|
+
pbc.add_argument("--dir", "--compilation", dest="dir", required=True,
|
|
10238
|
+
help="the compilation dir (e.g. c-opus); --compilation is an alias "
|
|
10239
|
+
"(bench --dir means the bench root -- a copy-paste hazard)")
|
|
10221
10240
|
pbc.add_argument("--obs", default=None, help="a single OBS id from --list")
|
|
10222
10241
|
pbc.add_argument("--verdict", default=None, choices=_BENCH_CURATION_VERDICTS)
|
|
10223
10242
|
pbc.add_argument("--note", default=None)
|
|
@@ -152,7 +152,8 @@ def main():
|
|
|
152
152
|
repo = _statusline_repo(cfg)
|
|
153
153
|
if not repo:
|
|
154
154
|
return
|
|
155
|
-
state = {"
|
|
155
|
+
state = {"schema": "uscha/progress@1",
|
|
156
|
+
"label": repo.get("label") or str(repo.get("name", "uscha")).upper(),
|
|
156
157
|
"pct": None, "done": None, "total": None, "tests": None, "coverage": None,
|
|
157
158
|
"next": None, "phase": None, "loops": None, "stalled": None,
|
|
158
159
|
"acceptance_source": None, "measured_at": None, "score": None, "band": None,
|