@andresmassello/uscha 2.5.0 → 2.6.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.
Files changed (29) hide show
  1. package/README.md +3 -3
  2. package/package.json +1 -1
  3. package/uscha-kit/.claude/skills/uscha-adr-refine/SKILL.md +1 -1
  4. package/uscha-kit/.claude/skills/uscha-characterize/SKILL.md +1 -1
  5. package/uscha-kit/.claude/skills/uscha-devloop/SKILL.md +35 -1
  6. package/uscha-kit/.claude/skills/uscha-devloop/qa_ledger.py +452 -22
  7. package/uscha-kit/.claude/skills/uscha-discovery/SKILL.md +1 -1
  8. package/uscha-kit/.claude/skills/uscha-mirador/SKILL.md +1 -1
  9. package/uscha-kit/.claude/skills/uscha-reverse-discovery/SKILL.md +1 -1
  10. package/uscha-kit/.claude/skills/uscha-rubric/SKILL.md +1 -1
  11. package/uscha-kit/.claude/skills/uscha-status/SKILL.md +1 -1
  12. package/uscha-kit/.claude/skills/uscha-sysdoc/SKILL.md +1 -1
  13. package/uscha-kit/.claude-plugin/plugin.json +2 -2
  14. package/uscha-kit/.codex-plugin/plugin.json +1 -1
  15. package/uscha-kit/README.md +34 -3
  16. package/uscha-kit/VERSION +1 -1
  17. package/uscha-kit/WORKBENCH.md +1 -1
  18. package/uscha-kit/skills/uscha-adr-refine/SKILL.md +1 -1
  19. package/uscha-kit/skills/uscha-characterize/SKILL.md +1 -1
  20. package/uscha-kit/skills/uscha-devloop/SKILL.md +35 -1
  21. package/uscha-kit/skills/uscha-devloop/qa_ledger.py +452 -22
  22. package/uscha-kit/skills/uscha-discovery/SKILL.md +1 -1
  23. package/uscha-kit/skills/uscha-mirador/SKILL.md +1 -1
  24. package/uscha-kit/skills/uscha-reverse-discovery/SKILL.md +1 -1
  25. package/uscha-kit/skills/uscha-rubric/SKILL.md +1 -1
  26. package/uscha-kit/skills/uscha-status/SKILL.md +1 -1
  27. package/uscha-kit/skills/uscha-sysdoc/SKILL.md +1 -1
  28. package/uscha-kit/templates/CONSTITUTION.md +14 -0
  29. package/uscha-kit/uscha.config.json +2 -1
@@ -22,7 +22,7 @@ switch between at any time:
22
22
  coverage, known deferred issues.
23
23
 
24
24
  <!-- uscha:orientation-block:begin -->
25
- <!-- uscha kit: 2.5.0 -- generated region: edit tools/skill-blocks/, then run `python tools/gen-skill-blocks.py` (never this block by hand) -->
25
+ <!-- uscha kit: 2.6.0 -- generated region: edit tools/skill-blocks/, then run `python tools/gen-skill-blocks.py` (never this block by hand) -->
26
26
 
27
27
  ## First contact (show ONCE, then never again)
28
28
 
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
3
3
  "name": "uscha",
4
- "version": "2.5.0",
4
+ "version": "2.6.0",
5
5
  "displayName": "Uscha",
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, 56 subcommands + universal installer + npm/npx router). Facts block, guesses advise; the human approves.",
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, 57 subcommands + universal installer + npm/npx router). Facts block, guesses advise; the human approves.",
7
7
  "author": {
8
8
  "name": "Andres Massello",
9
9
  "url": "https://github.com/andresmassello"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uscha",
3
- "version": "2.5.0",
3
+ "version": "2.6.0",
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:** v2.5.0 <!-- uscha:version --> · **[uscha.dev](https://uscha.dev)**
3
+ **Kit version:** v2.6.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`,
@@ -171,6 +171,34 @@ engine's default and `true` on presets **C, D and E**:
171
171
  Nothing is graded. The engine can see that a `## Rollback` heading exists; whether the procedure
172
172
  under it is correct is yours.
173
173
 
174
+ ## QA-tool readiness — `qa-tools-check` (ADR-051)
175
+
176
+ Phase 3 runs QA tools the kit ORCHESTRATES but does not ship (`qa_tools_order`, default
177
+ `code-review → judgment-day → improve`). Nothing used to check they were installed — a loop could
178
+ converge trusting a tool that never ran. Now each tool is RESOLVED to a source:
179
+
180
+ ```bash
181
+ python3 $QL qa-tools-check --repo <name> [--json] # exit 1 when a tool is MISSING
182
+ ```
183
+
184
+ | Source | What it means |
185
+ |---|---|
186
+ | `project-skill` / `global-skill` | `./.claude/skills/<name>/SKILL.md`, or `<root>/<name>/SKILL.md` under any agent skills root the installer knows — `~/.claude/skills` (or `$CLAUDE_CONFIG_DIR/skills`), Codex `~/plugins/uscha/skills`, pi `~/.agents/skills`, cursor, copilot, gemini, cline (path + sha256 + the root that hit reported) |
187
+ | `plugin` | an installed **and enabled** plugin provides it (skill or command), bare or `<plugin>:<name>` |
188
+ | `builtin-assumed` | the name is a harness built-in (`code-review`) — assumed, reported honestly as *not measured*, never a false clean and never a block |
189
+ | `declared-external` | you listed it in `defaults.qa_tools_external` (a human declaration, never profile-owned; precedence is per key: a LIVE `uscha.config.json` that declares it — an explicit `[]` included, which withdraws it — wins over the ledger's frozen copy, so declaring it after `init` needs no re-init, while a live file that omits it leaves the frozen declaration standing — origin `live-config` / `frozen` / `default`, the same in `doctor`; a live value of the wrong shape is refused by name) |
190
+ | `MISSING` | none of the above |
191
+
192
+ Only **MISSING** blocks, under **every** profile: a `missing` tool persists `gate:qa-tools` as a
193
+ BLOCKER — readiness capped ≤ 65, convergence blocked, and `phase --require pr-ready` refuses
194
+ **naming** the tool. "A declared tool is not installed" is a fact, not an opinion, so there is no
195
+ profile knob; `qa-tools` is a FACT kind written only by `qa-tools-check` — there is no
196
+ `log-gate --kind qa-tools` door (refused, exit 2), because the engine measures this fact itself.
197
+ With no `qa_tools_order` declared there is nothing to resolve — UNMEASURED, never a pass.
198
+ `log-step` stamps every step with its tool's resolved source; a MISSING step is recorded
199
+ `unverified` and cannot satisfy convergence — and stays so after you install the tool: re-log it.
200
+ Ledgers written before 2.6.0 carry no provenance and load unchanged.
201
+
174
202
  ## Evidence origin (ADR-007) - green, but green at *what*?
175
203
 
176
204
  Freshness compares file mtimes, so the ledger could say "tests green" without being able to
@@ -553,7 +581,10 @@ python3 ~/.claude/skills/uscha-devloop/qa_ledger.py doctor --json
553
581
  ```
554
582
 
555
583
  `origin` is `override` (you declared it), `profile <X>` (the preset supplied it), or
556
- `default` (the engine's own value). An override that supersedes a profile is reported as
584
+ `default` (the engine's own value). The one exception is `qa_tools_external` (ADR-051): it is
585
+ never profile-owned, so its origin is `live-config` (the live `uscha.config.json` declares
586
+ it), `frozen` (only the ledger's frozen copy does) or `default` (declared nowhere) — or it is absent
587
+ from `effective`, with a warn naming why, when the live value cannot be resolved. An override that supersedes a profile is reported as
557
588
  information, not an error — declaring a knob by hand is how a preset is bent. Nothing is
558
589
  written back into your config: a knob nobody declared stays absent, which is what lets the
559
590
  engine keep telling a requirement apart from a default. With no profile and no
@@ -876,7 +907,7 @@ python3 $QL readiness
876
907
 
877
908
  ## Ledger subcommands
878
909
 
879
- `bench - bench-curate - bench-r2 - bench-roundtrip - bootstrap-oracle - bootstrap-variance - check-coverage - check-terminado - cleanroom - compile-ingest - compile-validate - converged - corpus-run - curate - curation-check - dashboard - discover - doctor - escalate - execution-policy - facts - fastpath-eval - fidelity - flag-blocker - gate-check - golden-coverage - golden-diff - ingest-gate - init - ir-extract - ir-render - lang-compare - log-gate - log-step - operability - oscillation - phase - pit-check - production-finding - promote - readiness - rebuild - regression-check - resolve-escalation - roundtrip - rubric-ingest - simplicity-check - smoke-ingest - snapshot - spec-change-request - spec-check - spec-doubt - spec-drift - summary - top - waste-check` - the exact current `qa_ledger.py` parser surface (56 subcommands, derived from `SYSTEM-FACTS.json`, itself introspected from `build_parser()`); each supports `--help`.
910
+ `bench - bench-curate - bench-r2 - bench-roundtrip - bootstrap-oracle - bootstrap-variance - check-coverage - check-terminado - cleanroom - compile-ingest - compile-validate - converged - corpus-run - curate - curation-check - dashboard - discover - doctor - escalate - execution-policy - facts - fastpath-eval - fidelity - flag-blocker - gate-check - golden-coverage - golden-diff - ingest-gate - init - ir-extract - ir-render - lang-compare - log-gate - log-step - operability - oscillation - phase - pit-check - production-finding - promote - qa-tools-check - readiness - rebuild - regression-check - resolve-escalation - roundtrip - rubric-ingest - simplicity-check - smoke-ingest - snapshot - spec-change-request - spec-check - spec-doubt - spec-drift - summary - top - waste-check` - the exact current `qa_ledger.py` parser surface (57 subcommands, derived from `SYSTEM-FACTS.json`, itself introspected from `build_parser()`); each supports `--help`.
880
911
 
881
912
  `gate-check --repo R` SCOPES the diff to `repos[R].path` (2.2.0): in a monorepo one `git diff`
882
913
  carries every repo's hunks, and a sibling's findings are neither this repo's report nor this
package/uscha-kit/VERSION CHANGED
@@ -1 +1 @@
1
- uscha-kit 2.5.0
1
+ uscha-kit 2.6.0
@@ -18,7 +18,7 @@ los linters del static gate, drivers) es el *adapter* del proyecto y vive en el
18
18
  | **Python 3.8+** | corre `qa_ledger.py` (stdlib pura, sin dependencias) | `python3` en PATH |
19
19
  | **git** | versionado | 2.x, con `user.name`/`user.email` |
20
20
  | **gh** (GitHub CLI) | crear repo / abrir PR | opcional pero recomendado |
21
- | **skills del kit (8)** | `uscha-discovery`, `uscha-adr-refine`, `uscha-devloop`, `uscha-sysdoc`, `uscha-reverse-discovery`, `uscha-characterize`, `uscha-rubric`, `uscha-mirador` | instalados por `npx` en Codex y/o Claude Code |
21
+ | **skills del kit (9)** | `uscha-discovery`, `uscha-adr-refine`, `uscha-devloop`, `uscha-sysdoc`, `uscha-reverse-discovery`, `uscha-characterize`, `uscha-rubric`, `uscha-mirador`, `uscha-status` | instalados por `npx` en Codex y/o Claude Code |
22
22
  | **skills de QA** | `code-review`, `judgment-day`, `improve` | tus skills globales (el dev-loop los **orquesta**, no los trae) |
23
23
 
24
24
  ---
@@ -19,7 +19,7 @@ phases. **You are NOT a generator. You are an interrogator that distills.** The
19
19
  is in the questions, not in agreeing.
20
20
 
21
21
  <!-- uscha:orientation-block:begin -->
22
- <!-- uscha kit: 2.5.0 -- generated region: edit tools/skill-blocks/, then run `python tools/gen-skill-blocks.py` (never this block by hand) -->
22
+ <!-- uscha kit: 2.6.0 -- generated region: edit tools/skill-blocks/, then run `python tools/gen-skill-blocks.py` (never this block by hand) -->
23
23
 
24
24
  ## First contact (show ONCE, then never again)
25
25
 
@@ -19,7 +19,7 @@ what the code DOES, mechanically, by running it — never what it should do.** Y
19
19
  the capture harness; you may NOT create, rename, or edit any `.approved` file.
20
20
 
21
21
  <!-- uscha:orientation-block:begin -->
22
- <!-- uscha kit: 2.5.0 -- generated region: edit tools/skill-blocks/, then run `python tools/gen-skill-blocks.py` (never this block by hand) -->
22
+ <!-- uscha kit: 2.6.0 -- generated region: edit tools/skill-blocks/, then run `python tools/gen-skill-blocks.py` (never this block by hand) -->
23
23
 
24
24
  ## First contact (show ONCE, then never again)
25
25
 
@@ -27,7 +27,7 @@ artifacts; these can block) and **self-reported** agent counts (log-step — nar
27
27
  recorded for the retrospective; a measured red always overrides a narrated green).
28
28
 
29
29
  <!-- uscha:orientation-block:begin -->
30
- <!-- uscha kit: 2.5.0 -- generated region: edit tools/skill-blocks/, then run `python tools/gen-skill-blocks.py` (never this block by hand) -->
30
+ <!-- uscha kit: 2.6.0 -- generated region: edit tools/skill-blocks/, then run `python tools/gen-skill-blocks.py` (never this block by hand) -->
31
31
 
32
32
  ## First contact (show ONCE, then never again)
33
33
 
@@ -207,6 +207,34 @@ install `hooks/block-approved-writes.py` as a `PreToolUse` hook in
207
207
  `settings.json`, and add `*.approved.* binary` to `.gitattributes` (ships in
208
208
  `templates/.gitattributes`) so line endings can't lie in the byte-compare.
209
209
 
210
+ ### QA-tool pre-flight (ADR-051; run BEFORE Phase 0a)
211
+
212
+ Phase 3 runs QA tools the kit ORCHESTRATES but does not ship (`qa_tools_order`). Before any
213
+ planning, verify they are actually installed — the devloop never assumed this before, and a loop
214
+ must not converge trusting a QA tool that never ran:
215
+
216
+ ```bash
217
+ python3 $QL qa-tools-check --repo <REPO>
218
+ ```
219
+
220
+ Every tool resolves to a source — a project skill, a global skill under ANY agent root the
221
+ installer knows (`~/.claude/skills` or `$CLAUDE_CONFIG_DIR/skills`, Codex `~/plugins/uscha/skills`,
222
+ pi `~/.agents/skills`, cursor, copilot, gemini, cline — the row names the root that hit), an
223
+ installed+enabled plugin, a harness built-in (`code-review`, assumed and reported honestly as
224
+ *not measured*), a tool you declared in `defaults.qa_tools_external`, or **MISSING**. A MISSING
225
+ tool exits 1 and persists `gate:qa-tools` (readiness cap ≤ 65, convergence blocked,
226
+ `phase --require pr-ready` refuses naming it). If a tool is MISSING, **STOP** and tell the human
227
+ the named tool: install it, enable the plugin that provides it, or declare it in
228
+ `defaults.qa_tools_external` of the project's `uscha.config.json` if it is harness-provided, then
229
+ re-run `qa-tools-check`. A LIVE config that declares this one key wins over the ledger's frozen
230
+ copy (it is a fact about the machine, not a run parameter), so no re-init is needed; a live
231
+ config that omits it leaves the frozen declaration standing, an explicit `[]` withdraws it, and
232
+ a value that is not a list of unique nonempty strings is refused by name; `doctor` and the
233
+ check print the same value and origin (`live-config` / `frozen` / `default`). The gate is written
234
+ ONLY by `qa-tools-check` — `log-gate --kind qa-tools` does not exist. A step logged while its
235
+ tool was MISSING stays `unverified` after the tool is installed: re-log it. With no
236
+ `qa_tools_order` declared the check reports UNMEASURED and persists nothing.
237
+
210
238
  ## Phase 0a — Fast-path check (ADR-003; run FIRST, before planning ceremony)
211
239
 
212
240
  If `defaults.fast_path` exists in config, run the measured classifier before demanding a
@@ -389,6 +417,12 @@ config, so `qa_tools_order` is often absent there and resolves from `defaults.ri
389
417
  project on **profile A runs `code-review` only** — do NOT invoke judgment-day or improve there,
390
418
  and convergence must not wait for them.
391
419
 
420
+ These tools are **resolved, not assumed** (ADR-051): the QA-tool pre-flight already proved each
421
+ one is a project/global skill, an installed+enabled plugin, a harness built-in, or
422
+ declared-external — and `log-step` stamps every step with its tool's resolved `source`. A step
423
+ whose tool is MISSING is recorded `unverified` and cannot satisfy convergence, so this loop never
424
+ closes on a QA pass from a tool that is not installed.
425
+
392
426
  After **each** tool pass:
393
427
 
394
428
  1. Apply only fixes at/above the severity gate. Send the rest to `ISSUES-DEFERRED.md`.