Skip to content

Prettier mangles markdown spec files — recommend .prettierignore for .awa/ #33

@six5536

Description

@six5536

Problem

Prettier (running as a VS Code formatter or pre-commit hook) silently mangles .awa/specs/, .awa/tasks/, and .awa/plans/ markdown files. The damage breaks traceability IDs, environment variable names, and inline regex patterns — all of which are structurally significant to awa.

Mangling patterns observed

Original After Prettier Effect
FOO-1_AC-1 FOO-1*AC-1 Underscore before uppercase becomes italic marker — breaks AC ID
MY_VAR_ MY*VAR* Consecutive _X_ becomes *X* (emphasis) — breaks env var names
PREFIX__ (double underscore) PREFIX\_\_ Backslash-escapes inserted
<name>_id <name>\_id Backslash-escape before underscore
`^[a-z][a-z0-9:_-]{0,63}$` `^[a-z]a-z0-9:*-]{0,63}$` Brackets and underscores eaten inside backtick-fenced regex

Impact

  • awa check reports errors (** prohibited, _AC- in FEAT files)
  • Traceability chain breaks (mangled AC IDs no longer match REQ / DESIGN / TASK)
  • Silent corruption — Prettier exits 0, no warnings

Suggested mitigation

Option A: Document .prettierignore guidance

Add a note to awa docs / awa init output recommending users add .awa/ to their .prettierignore (or equivalent for their formatter).

Option B: Generate .prettierignore during awa init

Have awa init create or append to .prettierignore with .awa/ if not already present.

Option C: Both

Document it and generate it.

Environment

  • awa CLI version: latest (npm @ncoderz/awa)
  • Prettier: VS Code extension (default markdown formatter)
  • OS: macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions