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
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
FOO-1_AC-1FOO-1*AC-1MY_VAR_MY*VAR*_X_becomes*X*(emphasis) — breaks env var namesPREFIX__(double underscore)PREFIX\_\_<name>_id<name>\_id`^[a-z][a-z0-9:_-]{0,63}$``^[a-z]a-z0-9:*-]{0,63}$`Impact
awa checkreports errors (**prohibited,_AC-in FEAT files)Suggested mitigation
Option A: Document
.prettierignoreguidanceAdd a note to awa docs /
awa initoutput recommending users add.awa/to their.prettierignore(or equivalent for their formatter).Option B: Generate
.prettierignoreduringawa initHave
awa initcreate or append to.prettierignorewith.awa/if not already present.Option C: Both
Document it and generate it.
Environment