Skip to content

feat(pr-convention-policy): record Refs: and negated-closer rules in policy.json #647

Closed

Description

@kyle-sexton

Problem

claude-code-plugins#4636 changed the hook validator pr-linkage-validator.sh to recognize non-closing references (Refs: lines, the NON_CLOSING_ERE declaration) and negated closers (for example "does not close #N"). components/pr-convention-policy/policy.json has no field for either rule: its body object carries only closingKeywords, noIssueMarkers and requiredSections.

lockstep-drift.mjs was updated in #634 to parse the new validator shape, but it only checks CLOSING_ERE and NO_ISSUE_ERE against the policy. The Refs: and negated-closer behavior therefore lives in the hook alone, with no canonical record in the policy and no drift check against the ci-workflows pr-contract composite.

Proposal

  • Add policy fields for non-closing reference markers and negated-closer handling (bump schemaVersion if the schema requires it).
  • Extend lockstep-drift.mjs to extract NON_CLOSING_ERE (and any negation pattern) and assert it matches the new fields.
  • Confirm whether the pr-contract composite in ci-workflows implements the same rules; if not, decide whether it should, or record the hook as intentionally stricter.

Acceptance

  • policy.json names both rules.
  • npm run test:pr-convention-lockstep fails when the hook's NON_CLOSING_ERE drifts from the policy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions