Skip to content

[tech-debt] format:check does not cover files outside workspace packages (.pair/**, scripts/**, root-level JSON) #414

Description

@rucka

Story Statement

As a contributor trusting pnpm format:check
I want the formatting check to cover the files that live outside workspace packages
So that "the gate checks formatting" means the whole repo, not only apps/* and packages/*

Epic Context

Parent Epic: repo tooling / quality gates (no epic — standalone tech debt)
Status: Todo
Priority: P2 (Could-Have)

Problem

format:check = pnpm prettier:check && pnpm mdlint:check, and:

  • prettier:check is turbo prettier:checkturbo <task> only runs tasks in workspace members (apps/*, packages/*, tools/*). Files at the repo root and in non-workspace dirs are never prettier-checked: root package.json, turbo.json, .jscpd.json, .claude/**/*.json, scripts/**.
  • mdlint:check adds markdownlint-check.sh '*.md' — a non-recursive root glob. So root README.md/CLAUDE.md/DEVELOPMENT.md are linted, but .pair/**/*.md (adoption + knowledge base), qa/**, docs/** and scripts/workflows/release/README.md are not.

Pre-existing (write mode had the same blind spot), but #394 made check coverage the whole value of the gate: the adoption/KB markdown edited by nearly every story in this repo is not covered by the check that is supposed to keep formatting out of unrelated diffs.

Likely In Scope

  • Extend the root prettier:check/prettier:fix and mdlint:check/mdlint:fix scripts to cover non-workspace paths (root-level files, scripts/, .pair/, qa/, docs/) — check and fix must stay symmetric by construction
  • Absorb the resulting one-time formatting sweep as its own commit (expect a large diff on .pair/**)
  • Keep the .gitignore delegation working from the repo root cwd

Likely Out of Scope

  • CI enforcement of format:check (see the companion story)
  • Any write-mode formatter in the gate (banned — ADL 2026-07-31 + pnpm gate:composition)
  • Changing markdownlint rules

Acceptance Criteria (draft)

  • An unformatted .pair/**/*.md (or root-level JSON/TS) fails pnpm format:check
  • pnpm format fixes exactly what pnpm format:check reports (same file set)
  • Gitignored/generated trees stay excluded (no push blocked by generated output)

Notes

Filed from the independent review of PR #412, where it was raised twice as a Question and answered as "worth its own story". Sizing risk: the one-time sweep over .pair/** is the bulk of the work, not the script change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debtTracked technical debt (living backlog, R7.2 — never blocks a PR)user storyWork item representing a user story

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions