Skip to content
SprecherEast
Issue 609

process: enforce the guard rails with checks, not prose

Back to our plan
Done
ciprocesstoolingpriority: highneeds grooming

Problem

In plain words: summary of the owner's feedback (2026-11-03, Claude Code session, text): he thought many rules had already been agreed, so that shortcuts, code duplication, raw tags and similar are not allowed and are non-negotiable, and he wants hard rules covering all of it, with bypassing or skipping any of them also forbidden and non-negotiable. In #574 the rules were prose, nothing stopped an agent skipping the self-review, raw <a> tags passed lint, duplicated constants passed CI, and violations were accepted as "minor".

Proposed fix

Make each rule mechanical, not advisory:

  • Lint: ban raw <a> and <details> outside the UI kit (extend eslint.ui-kit.config.mjs); require the shared Link.
  • Duplication: add a required CI check (jscpd) that fails on copy-pasted code; layout offsets live in one shared constant (lint or test catches literals).
  • Self-review in the PR: a required "Self-review" section in the PR template listing each guideline checked and the result; PR Policy fails when it is missing or empty.
  • Reviewer: in pr-review, any guideline violation (raw tag, duplication, magic number, skipped step) is a Blocker, never "Minor", and can't be accepted as a follow-up.
  • AGENTS.md: state that these guard rails are non-negotiable and that "keep going" or "merge without waiting" never permits skipping a step; on a conflict, stop and ask.

Native first: ESLint's no-restricted-syntax and the existing ui-kit config; jscpd is MIT and widely used (verify downloads and last publish before adding, per the security guideline).

Acceptance criteria

  • Not done: A PR with a raw <a> outside the kit fails ESLint.
  • Not done: A PR with copy-pasted blocks fails the duplication check.
  • Not done: A PR without a filled "Self-review" section fails PR Policy.
  • Not done: pr-review and AGENTS.md say violations are Blockers and the rules are non-negotiable.
  • Not done: The existing code passes (fix or baseline noted on this issue).

Area

ci, tooling

Priority

high


Generated by Claude Code, opens in a new tab

See it on GitHub, opens in a new tab