T-FNUT-quality-noun-ports
Status: closed/done · Impact: medium · Complexity: large
The quality trio are standalone scripts; task-work Step 7 gates on
run_quality_checks --log (stderr routing, distinct exit), and
find-quality-checks probes via the detector. Port them as the quality
noun — run, detect, and the depth-3 baseline {capture, diff, prune}
group — preserving the text contracts callers parse.
| Location | Role today |
|---|---|
plugin/scripts/run_quality_checks.ts | runs sdlc.yaml quality_checks:; --line/--log text modes; FAIL lines to stderr; gating exit |
plugin/scripts/detect_quality_runners.ts | probes the project for test/quality runners; JSON for the find-quality-checks skill |
plugin/scripts/quality_baseline.ts | capture/diff/prune baselines behind mode flags |
Proposed
Section titled “Proposed”services/quality/ops/run.ts, ops/detect.ts, and
ops/baseline/{capture,diff,prune}.ts — five leaves, all visible; each
baseline mode a real op with its own zod contract (resolved design
question b). Under the D-H7FS §4 output contract, run is a
streaming op (per-check lines as they complete, deterministic
terminal summary): its descriptor declares streaming, its text
projection reproduces --line/--log including stderr-on-FAIL and exit
semantics, and --output json buffers to the terminal result object.
detect and the baseline leaves are sync (json-default for detect; text
where the legacy contract says so). Config read through lib/config.
Approach
Section titled “Approach”- Golden-snapshot
run --line,run --log(pass + fail),detect, and a baseline capture→diff→prune round-trip. - Port
runas a streaming op with its text projection; parity against goldens; verify--output jsonemits the buffered terminal object. - Port
detect(JSON output unchanged). - Split
baselineinto the three depth-3 leaves; map the old mode flags 1:1. - CLI-spawned parity tests for all five;
sdlc quality --helpsnapshot.
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
plugin/lib/services/quality/ops/run.ts | new | streaming run op + text projection |
plugin/lib/services/quality/ops/detect.ts | new | detect op |
plugin/lib/services/quality/ops/baseline/capture.ts | new | depth-3 leaf |
plugin/lib/services/quality/ops/baseline/diff.ts | new | depth-3 leaf |
plugin/lib/services/quality/ops/baseline/prune.ts | new | depth-3 leaf |
plugin/scripts/run_quality_checks.ts | modify | thins to forwarder until T-QL5F-skill-prose-codemod/T-YBKU-shim-deletion-guard |
plugin/scripts/detect_quality_runners.ts | modify | same |
plugin/scripts/quality_baseline.ts | modify | same |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1:
sdlc quality run --logbyte-matches the golden on pass and fail, including stderr routing and exit code. - AC-2:
sdlc quality detectJSON matches the golden. - AC-3: baseline capture → diff → prune round-trips on a tmp project; each leaf has its own
input/output schema visible via
--json. - AC-4:
sdlc quality --helplists run, detect, and the baseline group; all five leaves dispatch.
Out of scope
Section titled “Out of scope”- Caller codemod (T-QL5F-skill-prose-codemod).
- New quality-check kinds or detector heuristics.
- The find-quality-checks skill beyond what the codemod later touches.
Dependencies
Section titled “Dependencies”- T-NV49-op-path-substrate — depth-3 walk descent + render hook.
- Soft: T-KO35-config-sdlc-yaml — config loaded via lib/config.
Discovery context
Section titled “Discovery context”- docs/plans/op-substrate-full-sweep.md §1a; resolved design question (b) — baseline as depth-3
leaves; refutation finding that
run’s text modes are load-bearing for task-work Step 7.