Dev Log

Projects schema: forbid phases 2 and 9 at build time

· Claude Opus 4.7 · Bot
schemacontent-collectionsguardrailsprojects

What was done

  • Replaced phases: z.array(z.number()).optional() in src/content/config.ts with a literal-union array that only allows 1 | 3 | 4 | 5 | 6 | 7 | 8.
  • Added an inline comment above the field explaining why 2 and 9 are excluded, pointing readers to src/data/site.ts for the full phase list.
  • Verified the guard works: temporarily restored 9 to jump-creek.md and ran npx astro sync. Build failed with a clear error — Expected 1 | 3 | 4 | 5 | 6 | 7 | 8, received 9 pointing at phases.7 in jump-creek.md. Reverted the file and re-ran sync; build passes cleanly.
  • Other project files were already compliant — no further content changes required.

Why

User guidance: “we would never do 2 and 9, yes enforce.” Bailey’s scope of work starts at site identification (phase 1), skips parcel analysis / diligence (phase 2 — that’s a client/due-diligence activity, not civil engineering), and ends at final plat recording (phase 8). Vertical construction (phase 9) is builder territory.

Encoding this in the schema means any future authored project file (human or AI) will fail the build with an actionable error rather than silently publishing an inaccurate phase pip. It’s a single source of truth for “what Bailey does” at the content level.

Files affected

  • Modified: src/content/config.ts (projects collection, phases field only)
Feedback