Skip to content

Hook coverage: extend verify-refs-guard.sh to outgoing/ and circulation drafts #14

Description

@Yoojin-nam

Scope

~/.claude/hooks/verify-refs-guard.sh currently triggers on:

  • */submission/*/manuscript/*.docx
  • */submission/*/manuscript/*.md
  • */revision/R[0-9]*/*circulation*.docx

Senior-mentor reply drafts and pre-submission "outgoing" drafts skip the hook entirely. KKM/LHC/LWJ circulation packages have been observed to leave outgoing/ without a citation audit.

Proposed change

Add additional patterns, warn-only at first:

  • */8_Review_Comments/*/outgoing/*.{docx,md}
  • */outgoing/*.{docx,md} (project-level)
  • */circulation/*.docx (already covered for revision/R*/, but generalize)

Enforce mode (MEDSCI_VERIFY_REFS_MODE=enforce) only when SSOT.yaml + qc/migration_complete both exist, identical to the existing Phase 1C gate. Keep MEDSCI_VERIFY_REFS_BYPASS=1 escape valve.

Why warn-only

Outgoing drafts may need rapid iteration; full network verification on every save would harm interactivity. Warn-only surfaces missing audits without blocking the writer, and the eventual enforce gate lands only after a project explicitly opts in.

Acceptance

  • Pattern coverage updated with regression test under hook test directory (if exists)
  • README/docs updated to list the new patterns
  • Default mode for new patterns is warn-only

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    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