Part of #6065.
Problem
The review.fields key list (linkedIssue | relatedWork | reviewLoad | validationEvidence | openPrQueue | contributorContext | gateResult | improvementSignal) is hand-copied in 7 places: the real source (REVIEW_FIELD_KEYS, packages/loopover-engine/src/focus-manifest.ts:485), .loopover.yml.example, config/examples/loopover.full.yml, .loopover.yml (this repo's own live config), src/config/loopover-repo-focus-manifest.ts (bundled fallback), CONTRIBUTING.md, and a hardcoded array in test/unit/signals-coverage.test.ts.
5 of the 7 are guarded by existing sync tests. 2 are NOT guarded at all -- CONTRIBUTING.md and the signals-coverage.test.ts array -- and CONTRIBUTING.md's copy is already stale (missing improvementSignal).
Proposed fix
- Add
scripts/gen-review-fields-doc.mjs, mirroring the existing scripts/gen-cf-typegen.mjs / scripts/write-ui-openapi.ts generate+--check pattern already used in this repo (see npm run cf-typegen / cf-typegen:check, npm run ui:openapi / ui:openapi:check).
- Generate the "Keys: ..." doc-comment line (and ideally the CONTRIBUTING.md prose list) FROM the single
REVIEW_FIELD_KEYS TS constant, not by hand.
- Add a
review-fields-doc:check step wired into npm run test:ci (same pattern as the other :check scripts already chained there).
- Fix test/unit/signals-coverage.test.ts to import
REVIEW_FIELD_KEYS directly instead of a separately hardcoded array.
- Fix CONTRIBUTING.md's stale list (missing
improvementSignal) as part of the same PR.
Files
- scripts/gen-review-fields-doc.mjs (new)
- package.json (new script entries + test:ci wiring)
- .loopover.yml.example, config/examples/loopover.full.yml, .loopover.yml, src/config/loopover-repo-focus-manifest.ts, CONTRIBUTING.md (regenerated, not hand-edited, once the script exists)
- test/unit/signals-coverage.test.ts
Part of #6065.
Problem
The
review.fieldskey list (linkedIssue | relatedWork | reviewLoad | validationEvidence | openPrQueue | contributorContext | gateResult | improvementSignal) is hand-copied in 7 places: the real source (REVIEW_FIELD_KEYS, packages/loopover-engine/src/focus-manifest.ts:485), .loopover.yml.example, config/examples/loopover.full.yml, .loopover.yml (this repo's own live config), src/config/loopover-repo-focus-manifest.ts (bundled fallback), CONTRIBUTING.md, and a hardcoded array in test/unit/signals-coverage.test.ts.5 of the 7 are guarded by existing sync tests. 2 are NOT guarded at all -- CONTRIBUTING.md and the signals-coverage.test.ts array -- and CONTRIBUTING.md's copy is already stale (missing
improvementSignal).Proposed fix
scripts/gen-review-fields-doc.mjs, mirroring the existingscripts/gen-cf-typegen.mjs/scripts/write-ui-openapi.tsgenerate+--checkpattern already used in this repo (seenpm run cf-typegen/cf-typegen:check,npm run ui:openapi/ui:openapi:check).REVIEW_FIELD_KEYSTS constant, not by hand.review-fields-doc:checkstep wired intonpm run test:ci(same pattern as the other:checkscripts already chained there).REVIEW_FIELD_KEYSdirectly instead of a separately hardcoded array.improvementSignal) as part of the same PR.Files