Skip to content

Add film, song, book, and other creative-work records - #14

Open
monapdx wants to merge 2 commits into
mainfrom
feat/creative-work-records
Open

monapdx wants to merge 2 commits into
mainfrom
feat/creative-work-records

Conversation

@monapdx

@monapdx monapdx commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Description

MML can now describe creative works using film, song, album, book, series, episode, game, and podcast. Each record requires one nonempty title and accepts optional fields appropriate to its type, including repeated genres and credits.

film
title
The Menu
director
Mark Mylod
release-year
2022
genre
dark-comedy
genre
horror
/film

Compiles to:

<film>
  <title>The Menu</title>
  <director>Mark Mylod</director>
  <release-year>2022</release-year>
  <genre>dark-comedy</genre>
  <genre>horror</genre>
</film>

Different work types automatically become sibling entries. A record closer can finish its final scalar field, so /film works without a preceding /genre. Inside a song, album is a text field; use /song before starting an independent album record.

Validate nonempty scalar fields, field/type compatibility, singleton fields, four-digit years, series year ordering, and episode numbering. Preserve existing ebook metadata, event dates, and timeline behavior. book describes a work; ebook still holds its actual content for export.

Update the tag registry (95 canonical tags), specification, dependency reference, README, generated schema index, and published documentation. Add a Load Film Example button and preview styles. Regenerating the documentation also exposed stale local links; fix those references so the link check passes.

Related Issue(s)

Closes #13

Type of Change

  • New feature
  • New tag / schema
  • Documentation update
  • Breaking change: newly reserved tag names are now markup when used alone on a line; quote literal values matching reserved names.

Validation

  • npm test: 77 passed, 0 failed (62 existing tests plus 15 new regression tests).
  • npm run check:examples: 5 examples checked, 0 issues, including the documented film example and deliberately invalid input.
  • npm run check:links: 0 issues.
  • npm run build:schema-index and documentation HTML generation completed.
  • git diff --check: passed.
  • Full maintenance still reports 45 pre-existing tag/shorthand/synonym inconsistencies and 3 pre-existing references to the missing export-blank directory. Both counts match the clean main baseline; these unrelated issues are outside this change.
  • A Playwright visual check could not run because no browser executable is installed in this environment. Preview CSS has not been visually verified.

Checklist

  • Read CONTRIBUTING.
  • Follow existing module conventions and semantic compilation behavior.
  • Include valid and invalid parser/validator tests.
  • Update relevant documentation and published HTML.
  • All parser tests pass locally.
  • Use a conventional commit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T05:37:00.169667Z 36e866c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 36e866cb05

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread export/src/validator.js
Comment on lines +222 to +223
const workOnlyFields = ["director", "artist", "creator", "release-year", "genre", "season-number", "episode-number"];
if (workOnlyFields.includes(node.name) && !WORK_FIELD_PARENTS[node.name].includes(parentName)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate parent contexts for shared work fields

When an unsupported field is shared with ebook metadata, the parser moves it outside the work record, and this check excludes it from parent validation. For example, film\ntitle "Movie"\nauthor "Person" returns valid: true and emits an orphan <author> after the film; the same happens with publisher on a song. Consequently, field/type compatibility checks silently accept these invalid records and detach their data. Validate shared fields against their combined metadata/work parent sets as well, so fields relocated by parser boundary inference cannot bypass validation.

Useful? React with 👍 / 👎.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add structured creative-work tags and descriptive fields

1 participant