Repository navigation
feat: adopt OKF page-level title, generated, and status keys - #14
Merged
Merged
Conversation
Pages now carry OKF v0.2's own page-level keys instead of near-equivalents:
- title is required in the template; the index already used it.
- generated { by, at } replaces updated. at must be an ISO 8601 datetime
with an explicit offset (SPEC §5); by is required within generated
(§5.2). Contested-age and created-ordering checks read generated.at,
falling back to a legacy updated date for non-OKF trees.
- status is validated against OKF's draft|stable|deprecated wherever a
page carries it (§5.4), and a new supersedes_field knob requires pages
named in another page's supersedes to be deprecated.
The parser gains one-level mappings (inline { k: v } and indented k: v
under a bare key); braced scalars that are not k: v pairs stay strings.
parse_okf_datetime normalizes Z, fractions and +HHMM offsets so Python
3.9 and 3.11+ agree.
The test bundles' colliding status fields become component_status,
module_status and adr_status; membership rules name their status_field
and are validated at configure(). ADR checks fall back to a legacy status.
4 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Aligns page frontmatter with OKF v0.2's page-level keys, ahead of the real-data install (so nothing live needs migrating):
title: required in the template; the index uses it, falling back to the prettified filename for configs that don't require it.generated: { by, at }replacesupdated(SPEC §5.2).atmust be an ISO 8601 datetime with an explicit offset, per the post-v0.2 timestamp rule;byfollows the §7 actor convention (claude-code/<model-id>,human:<id>). Contested-age and created-ordering checks readgenerated.at, with a legacyupdatedfallback for non-OKF trees (mirroring §13.1'stimestampfallback).status: validated against OKF'sdraft | stable | deprecatedwherever present (§5.4). Newsupersedes_fieldknob: a page named in another page'ssupersedesmust bestatus: deprecated, making the forward banner machine-readable.sources: shape unchanged (already OKF); install CLAUDE.md now documents the optionalid/title/authorper-entry keys.Engine: new
wikilint/okf_fields.py(check_okf_fields,check_supersedes); parser supports one-level mappings, inline and block;parse_okf_datetimenormalizesZ, fraction lengths and+HHMMso Python 3.9 matches 3.11+. Test bundles rename their collidingstatusfields (component_status,module_status,adr_status); membership rules gainstatus_fieldand are validated atconfigure(); ADR checks fall back to a legacystatus.taxonomy.mdis unchanged: the page field is already OKF'stags, and the file (tag vocabulary plus type glossary) has no OKF counterpart.Test plan
tests/test_okf_fields.py(parser mappings, datetime forms, required keys, generated shape, status values, supersedes rule, contested age incl. legacy fallback, index title/date) written red firstpython3 -m unittest discover -s tests: 141 tests OK on Python 3.9.6cd wiki && python3 lint.py check: 0 errors)status: deprecated; date-onlygenerated.aterrors; inline and blockgeneratedboth parse; index shows authored titles; fixed state commits