$schema: "@gobing-ai/spur/schemas/rule-file.schema.json"
# TSDoc-on-exports — enforced by Spur's post-check gate.
# Absorbed from ts-libs/.spur/rules/quality/tsdoc-exports.yaml.
#
# Rationale: exported symbols in production source (apps/**/src, packages/**/src)
# are public integration points that warrant doc comments. The post-check gate
# keeps those boundaries documented.
#
# Scope tightened from the evaluator's default (**/*.ts) to production source
# only (src-scoped includes make tests unreachable). Excluded: schema/,
# migrations/db (implementation internals — DDL/journals/adapter wiring, not
# public API surface; verified load-bearing: 6 doc violations when stripped).
include:
  - "apps/**/src/**/*.ts"
  - "packages/**/src/**/*.ts"
exclude:
  - "**/schema/**"   # drizzle DDL definitions — not public API surface
  - "**/migrations.ts"
  - "**/db.ts"
rules:
  - id: every-export-has-tsdoc
    description: >
      Exported declarations must have a preceding doc comment (JSDoc `/** */` or line `//`).
    severity: error
    enabled: true
    evaluator:
      type: tsdoc-export
