Skip to content

Rename Codex to CDX (writer, code symbols, docs) - #47

Merged
gvonnessi merged 1 commit into
mainfrom
rename/codex-to-cdx
Jun 17, 2026
Merged

gvonnessi merged 1 commit into
mainfrom
rename/codex-to-cdx

Conversation

@gvonnessi

Copy link
Copy Markdown
Collaborator

Tracks the upstream Codex → CDX ("Content-addressed Document eXchange") spec rename (spec PR merged). Makes cdx-pandoc fully consistent with the new name.

Functional / on-the-wire identifiers

  • Manifest spec-version key "codex" → "cdx" in emitted JSON.
  • MIME type application/vnd.codex+json → application/vnd.cdx+json.
  • Extension IDs codex.{academic,semantic,...} → cdx.<same> (e.g. cdx.academic, cdx.semantic).

Writer file rename

  • git mv codex.lua → cdx.lua (the Pandoc custom writer). The invocation changes: pandoc ... -t codex.lua is now pandoc ... -t cdx.lua.
  • Updated every reference: Makefile (WRITER := cdx.lua, .manifest.cdx), README/CONTRIBUTING usage examples, and scripts/pandoc-to-cdx.sh (CODEX_WRITER → CDX_WRITER plus the writer path string).
  • This matches the existing cdx-reader.lua naming convention.

Code symbols

  • Internal Lua identifiers renamed: CODEX_VERSION → CDX_VERSION, codex_field/codex_name → cdx_*, and codex-referencing comments throughout lib/.

Docs / prose

  • Brand Codex → CDX in README, CHANGELOG, CONTRIBUTING, SECURITY, and the LICENSE copyright holder lines ("CDX Document Format Contributors").

Tests

  • Golden baselines under tests/expected/ updated to the new key / MIME / extension IDs so golden and round-trip tests pass.

Preserved

  • The upstream spec repo path token codex-file-format-spec is intentionally left unchanged (it is still named that). A re-grep confirms it is the only remaining codex token in the tree.

Verification (local, macOS)

Installed pandoc 3.10, lua 5.4.8, luacheck 1.2.0, jq 1.7.1 and ran:

  • make lint — 0 warnings / 0 errors
  • make test — all unit suites + JSON output pass
  • make test-golden — all golden tests pass
  • make test-reader — all round-trip tests OK
  • make validate — structure OK
  • make test-all — passes (exit 0)
  • make test-cdx — full .cdx packaging pipeline OK; generated manifest.json contains "cdx": "0.1"

Tracks the upstream Codex -> CDX ("Content-addressed Document eXchange")
spec rename (spec PR merged). Makes cdx-pandoc fully consistent with the
new name.

Functional / on-the-wire changes:
- Manifest spec-version key "codex" -> "cdx" in emitted JSON
- MIME type application/vnd.codex+json -> application/vnd.cdx+json
- Extension IDs codex.{academic,semantic,...} -> cdx.<same>

Writer file rename:
- git mv codex.lua -> cdx.lua (the Pandoc custom writer); the invocation
  is now `pandoc ... -t cdx.lua`. Updated all references in Makefile
  (WRITER := cdx.lua), README/CONTRIBUTING usage examples, and
  scripts/pandoc-to-cdx.sh (CODEX_WRITER -> CDX_WRITER and the writer
  path string). Matches the existing cdx-reader.lua naming convention.

Code symbols & docs:
- Internal Lua identifiers (CODEX_VERSION -> CDX_VERSION, codex_field/
  codex_name -> cdx_*, comments referencing "Codex") updated
- Brand in prose/docs/comments Codex -> CDX (README, CHANGELOG,
  CONTRIBUTING, SECURITY, LICENSE copyright lines)
- Golden baselines under tests/expected/ updated to the new key/MIME/
  extension IDs so golden + round-trip tests pass

Preserved: the upstream spec repo path token codex-file-format-spec.
@gvonnessi
gvonnessi merged commit dca38c1 into main Jun 17, 2026
2 checks passed
@gvonnessi
gvonnessi deleted the rename/codex-to-cdx branch June 17, 2026 15:52
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.

1 participant