Skip to content

T-VK8L-pr-classify-port

Status: closed/done · Impact: medium · Complexity: medium

classify_pr.ts is a deterministic verdict capability — a fixed enum (CLEAN/NEEDS-RESPONSE/CONFLICTS/CI-FAILED/MERGED/CLOSED/ERROR) over gh payloads with a --mock-state test seam — living in a skill directory. By the S-0001 nature test it is born in lib. Promote it to services/pr/ops/classify.ts; the per-PR cursor is the op’s own dedupe ledger and travels with it.

LocationRole today
plugin/skills/pr-check/classify_pr.tsverdict classifier + cursor read/write under .sdlc/pr-cursors/
plugin/skills/pr-check/tests/classify_pr.test.tsimports ../classify_pr.ts by relative path (breaks on move)
plugin/skills/pr-check/SKILL.mdinvokes the script; orchestrate dispatches on the verdict

services/pr/ops/classify.ts (hidden pr noun); cursor path and semantics unchanged; --mock-state fixture seam preserved; tests spawn cli/sdlc.ts pr classify per the CLI-spawn mandate so the golden survives the move.

  1. Golden-snapshot verdicts + cursor side effects across the mock-state fixtures (each verdict class, plus the second-call no-new-comments case).
  2. Port the classifier core; gh via ctx.gh; cursor I/O unchanged.
  3. Rewrite the test suite to spawn the CLI with --mock-state fixtures.
  4. Verify orchestrate’s verdict-line contract byte-matches.
LocationKindChange
plugin/lib/services/pr/ops/classify.tsnewthe op (classifier + cursor)
plugin/skills/pr-check/classify_pr.tsmodifythins to forwarder until deletion
plugin/skills/pr-check/tests/classify_pr.test.tsmodifyspawn cli/sdlc.ts pr classify
  • AC-1: verdict golden parity across all mock-state fixtures via sdlc pr classify --mock-state <fixture>.
  • AC-2: cursor semantics identical — second call on the same state reports no new comments; cursor file location unchanged.
  • AC-3: pr noun hidden from default --help, dispatches when addressed.
  • AC-4: pr-check skill behavior unchanged pre-codemod; full bun test green.
  • pr-check / orchestrate prose (T-QL5F-skill-prose-codemod).
  • Verdict enum or classification heuristics changes.
  • Future pr respond / pr close-out verbs (the hidden noun leaves room).
  • Flagged borderline in planning; promoted by the S-0001 nature test during the adversarial redesign (the —mock-state seam shows it was already built to run off-process).

T-NV49-op-path-substrate


← Back to Tasks