Having no schema is also a schema. The appeal of front matter on a static site is the freedom for every file to be shaped differently — right up to the moment some field becomes mandatory, at which point that freedom turns into debt.

This is what actually happened in this repository.

1. The Real Scope of "Adding a Field"

The scope in my head was: add one category: athlentic line per article file. File count × one line. Mechanical.

Here is what the commit actually touched.

Touched Why ────────────────────────────────────────────────────────────── eleventy.config.mjs POST_CATEGORIES constant per-category collections (languages × categories = 4) category presence/validity guard ko/en category agreement guard posts.11tydata.js (ko/en) permalink rules for list pages 3-way split: post / all / category _data/i18n.js copy for the category list pages ko·en × 2 categories × ~10 fields _data/staticPages.js 2 new list pages × locale, in sitemap _includes/layouts/post-list.njk category navigation athlentic-index.njk / dev-index.njk new list templates (ko/en = 4 files) article files one category line each

That last line is a small part of the whole. The cost of a new field lives in the pages the field creates, not in the file count. Splitting into categories means creating two new URLs, and a new URL demands a title, description, keywords, structured data and a sitemap entry — per locale.

A field that creates no pages is a different animal.

Something like sitemapPriority, which only alters an attribute of an existing page, can ship with a default and be done. A field like category that derives new pages means designing those pages end to end. Making that distinction before you start changes the estimate substantially.

2. Guard First, or Data First?

There are three orderings for introducing a required field.

Order Upside Risk ────────────────────────────────────────────────────────────────── guard first → backfill omissions surface the guard commit immediately ships a broken build backfill first → guard later every intermediate new files keep state is green leaking until the guard both in one commit atomic the commit gets too large to review

This repository chose the third. Guard and data landed together, and at that commit the repository was fully consistent. It didn't prevent the problem.

3. What Actually Happened

The category commit landed on 2026-08-16. The 11 articles that existed at that moment got their category line and the build passed.

On 2026-08-31, fifteen days later, one more commit was needed.

fix: add missing article categories (KO/EN) 48 files changed, 48 insertions(+)

Twenty-four articles had arrived with no category. How did they get past the guard? They didn't. The guard never got to look at them.

time → 08-16 category guard lands on develop (11 articles handled) │ ├── branch A (forked 08-06) — writing 8 articles ├── branch B (forked 08-13) — writing 8 articles └── branch C (forked 08-13) — revision work None of those branches has the guard in eleventy.config.mjs. npm run build passes on every one of them. None of their new articles has a category. 08-31 branches converge on develop → the guard sees 24 articles for the first time

This is the real failure mode of introducing a required field. The guard is code, and code lives on a branch. If a branch forked before the guard, the guard does not exist inside that branch. Files created there keep accumulating in ignorance of the new rule.

The longer the gap, the bigger the pile. Fifteen days bought 24 articles — writing future-dated articles ahead of publication gives branches long lifetimes, which is exactly why it hit this repository hard.

4. What Should Have Happened

The guard commit had one more job in it — counting the branches in flight.

git branch -r --no-merged origin/develop

If that comes back non-empty, every branch listed is ignorant of the new rule. Two options follow.

Approach Cost Fits when ────────────────────────────────────────────────────────────── merge the guard commit into one merge per branch few branches, every live branch now conflict surface short-lived land the guard as a warning, two deploys many branches or promote it to a failure managing the grace long-lived ones after a grace period window

The second is the general answer. Instead of failing the build on a missing field, print the list and pass. Branches merge in, each sees its own warning, and once the list is empty the guard gets promoted to a hard failure.

This repository just fixed all 48 files in one pass fifteen days later, because one line per file is cheap. When the fix is cheap, building the grace mechanism costs more than the problem — the difference is whether you make that judgment in advance or discover it.

5. The Guard Had to Define "Article"

Here's the part nobody plans for. src/en/posts/ does not contain only articles.

src/en/posts/ progressive-overload-guide.njk article → needs category index.njk all-posts list → no category athlentic-index.njk category list → no category dev-index.njk category list → no category posts.11tydata.js directory data → not a target

Write the guard as "every .njk in this directory must have a category" and four list templates fail it. Give a list page category: athlentic to satisfy it and the build passes while the list page adds itself to its own category collection. It gets quietly strange.

What was needed was a mechanical definition of "article." What it settled on was the presence of a slug field.

isPost: /^slug:\s*\S+\s*$/m.test(raw)

slug already existed to build permalinks. Articles have it; list pages don't. A field making exactly that distinction was already in the codebase — posts.11tydata.js computes permalinks off precisely the same test.

The guard's definition and the runtime's definition must be the same one.

If the guard splits articles from lists by slug while the permalink logic splits them some other way, then the first file where those two disagree passes the guard and ships at the wrong URL. Before inventing a new test, look for code that already makes the same distinction.

6. Should the Field Have a Default?

This is the tempting option. One line of category: "athlentic" in posts.11tydata.js and the entire backfill disappears, because directory data is inherited by every article.

It doesn't have one. Three reasons.

With a default Consequence ────────────────────────────────────────────────────────────── new articles build fine with an article nobody classified and an no category at all article deliberately set to athlentic become indistinguishable an article the default is wrong write a dev article, forget the field, for slides into the wrong list and it appears in the training list — nothing fails the ko/en agreement guard dies both sides receive the same default, so they always agree; the check stops meaning anything

The third one decided it. A default doesn't make the check pass — it removes the check. The most frequent mistake is writing category: dev in one language and forgetting the other. With a default, the forgotten side silently becomes athlentic and the guard says nothing.

Letting the build enforce the rules only works while an omission shows up as a failure. A default converts an omission into a success.

7. The Procedure for Next Time

Written down for the next required field.

1. Does this field create pages? yes → design i18n copy, sitemap entries and list templates per locale no → it only alters attributes of existing pages. Far cheaper 2. Write the mechanical definition of "files that must have this field" First look for code that already makes the same distinction 3. Count in-flight branches: git branch -r --no-merged origin/develop empty → guard and data in one commit non-empty → land it as a warning with a stated grace window, or merge the guard into each branch first 4. Do not give it a default The guard only means something while omission reads as failure 5. If there's a symmetry axis (like ko/en), check agreement too A presence check alone won't stop the two sides holding different values 6. Have the guard collect every violation before throwing Stop at the first one and you'll build 48 times to find 48 files

Point 6 earned its place. The guard in this repository gathers every violator and throws once.

Article category missing or unknown. (one of: athlentic, dev) agent-context-budget: ko=null ancient-greek-halteres: ko=null app-deep-link-fallback: ko=null ...

One list meant 24 articles could be handled in a single pass. A throw on the first violation would have meant fixing and rebuilding 24 times.

8. Common Questions

Why not add the field from the start?

Before you need it you can't know what it should be. At 11 articles there were no categories to draw, and the need only appeared once development writing and training writing started interleaving. A field added preemptively is usually the wrong field — carrying an unused field tends to cost more than retrofitting one later.

Can't a script insert them in bulk?

If the value is mechanically derivable, yes. category isn't — a human has to decide. You can usually tell from a title which of 24 articles is dev and which is athlentic, but committing on "usually" means paying later to find the misfiled ones. Script the insertion point, decide the value by hand is the workable compromise.

Why a category instead of tags?

Tags are many-to-many; a category is one-to-many. Let an article belong to two categories and the ko/en agreement check becomes a set comparison, plus you have to decide what a list page does when the same article qualifies twice. No article here needs that yet, so it stayed a single value. If it becomes necessary, that's another retrofit — cheaper now that the procedure exists.

What happened to the URLs of published articles?

Nothing. A category creates list pages; it doesn't enter an article's permalink. That was deliberate — put the category in the URL and every reclassification later needs a redirect. Classification is a value that can change, so it stays out of the URL.

What does adding a new category require today?

Four places — POST_CATEGORIES in eleventy.config.mjs, posts/{category}-index.njk for ko and en, the copy in _data/i18n.js, and the sitemap entries in _data/staticPages.js. That list is written into the rules file. By the standard of what belongs in a rules file, it qualifies precisely because the build won't catch it for you.

Has the warning mode actually been used here?

Not yet. What's written above is the procedure derived from this incident, not validated experience. The next required field is where it gets tested, and if the result differs the procedure gets corrected.

9. Takeaways

  • The cost of a field is the pages it derives, not the files it touches.
  • A guard is code that lives on a branch. Inside a branch that forked earlier, the guard does not exist.
  • Count the in-flight branches in the guard commit. Non-empty means warning mode or a pre-emptive merge.
  • You must define which files need the field. Look for code that already draws the same line.
  • A default removes the check rather than satisfying it — symmetry checks especially.
  • Collect every violation before throwing. Otherwise you rebuild once per fix.

One late field splitting into two commits fifteen days apart wasn't a design error. It was not thinking about where the guard lives. Move a rule into code and the rule has to be deployed like code.