Skip to content

Common Validation Errors

archcore validate checks every document in .archcore/ for correct naming, structure, and frontmatter. This page explains each error you might see and how to fix it.

What you see: The file doesn’t match the slug.type.md pattern.

Why it happens: Slugs must be lowercase alphanumeric with hyphens only. The filename must follow the exact format slug.type.md — no extra dots, no spaces, no underscores.

Examples of invalid names:

FilenameProblem
My Decision.adr.mdSpaces and uppercase
jwt_strategy.adr.mdUnderscores
UsePostgres.adr.mdUppercase letters
api.v2.migration.adr.mdExtra dots in the slug

Fix: Rename the file to use a valid slug:

Terminal window
# Wrong
mv ".archcore/My Decision.adr.md" ".archcore/my-decision.adr.md"
# Wrong
mv ".archcore/jwt_strategy.adr.md" ".archcore/jwt-strategy.adr.md"

Slugs must match the pattern ^[a-z0-9]+(-[a-z0-9]+)*$. See Document Format for the full spec.

What you see: The type portion of the filename isn’t recognized.

Why it happens: The type (the middle part of slug.type.md) must be one of the 18 valid types. Anything else is rejected.

Valid types:

adr, rfc, rule, guide, spec, doc, prd, idea, plan, task-type, cpat,
mrd, brd, urd, brs, strs, syrs, srs

Common mistakes:

FilenameProblemFix
auth.decision.mddecision is not a typeRename to auth.adr.md
setup.tutorial.mdtutorial is not a typeRename to setup.guide.md
api-spec.reference.mdreference is not a typeRename to api-spec.spec.md or api-spec.doc.md

Fix: Rename the file using one of the 18 valid types. See Document Types for guidance on choosing the right type.

What you see: The document is missing YAML frontmatter, or the frontmatter is missing required fields.

Why it happens: Every Archcore document requires YAML frontmatter with both title and status fields. If either is missing, the document fails validation.

Fix: Add the required frontmatter at the top of the file:

---
title: Use PostgreSQL as Primary Database
status: draft
---
Your document content here...

Both fields are required:

FieldTypeRequired values
titlestringAny non-empty string
statusstringdraft, accepted, or rejected

What you see: The status field contains an unrecognized value.

Why it happens: Status must be exactly one of three values. No other values are allowed — not active, not approved, not archived.

Valid values:

StatusMeaning
draftWork in progress (default for new documents)
acceptedFinalized or approved
rejectedSuperseded, abandoned, or declined

Fix: Update the frontmatter to use a valid status:

---
title: API Rate Limiting
status: accepted
---

What you see: A relation points to a document that no longer exists on disk.

Why it happens: You deleted or renamed a document, but the relation referencing it still exists in .sync-state.json. The relation’s target path no longer matches any file.

Fix: Run validate with the --fix flag:

Terminal window
archcore validate --fix

This automatically removes orphaned relations from the manifest and saves the updated .sync-state.json. No manual editing needed.

What you see: The frontmatter can’t be parsed as valid YAML.

Why it happens: The YAML between the --- delimiters has a syntax error. Common causes:

  • Missing closing --- — the frontmatter block needs both an opening and closing delimiter
  • Tabs instead of spaces — YAML requires spaces for indentation, not tabs
  • Unquoted special characters — colons, brackets, or other YAML-significant characters in values need quoting

Examples:

# Wrong: missing closing ---
---
title: My Document
status: draft
Content starts here without closing the frontmatter...
# Wrong: unquoted colon in title
---
title: Decision: Use PostgreSQL
status: draft
---
# Correct: quote the value
---
title: "Decision: Use PostgreSQL"
status: draft
---

Fix: Correct the YAML syntax. If you’re unsure what’s wrong, start with a minimal frontmatter block and add fields back one at a time:

---
title: Your Title Here
status: draft
---

archcore validate --fix automates what it can:

  • Removes orphaned relations from .sync-state.json
  • Saves the cleaned manifest

It does not auto-fix:

  • Invalid filenames (you need to rename files manually)
  • Missing or invalid frontmatter (you need to edit the file)
  • Unknown document types (you need to rename the file)
  • Invalid YAML syntax (you need to fix the markup)

For a full project health check beyond validation, run:

Terminal window
archcore doctor

This adds checks for settings.json, MCP configuration, and server reachability on top of the standard validation. See CLI Commands for details.