Repository navigation
RFC-0041 / ADR-0043: Typed custom fields per collection (accepted) - #93
Merged
Merged
Conversation
Stage 2 of #71, from RFC-0040's sketch: nine closed field types on Site.collections.<key>.fields, values in ContentEntry.fields, one eval-free checker for store, API and MCP, requiredToPublish, per-field localization, and explicit snapshotted operations for rename, type change, localization change and removal. The schema diff was checked with pnpm gen (TypeScript and Rust) and reverted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
Halil accepted RFC-0041 with every open question decided as recommended. ADR-0043 records the decision. AGENTS.md rule 2 and the contract-change skill now allow a domain discriminator other than `kind` (field definitions use `type`). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
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.
Stage 2 of #71, written from RFC-0040's "Stage 2 (sketch)". Status: Draft, open for discussion; nothing is implemented.
Key decisions
Site.collections.<key>.fields, 1–30 definitions in nine types: text, richText, number, boolean, date, datetime ({at, timeZone}, RFC-0008), url, image (an asset id of the same site), select. NoschemaVersionbump.ContentEntry.fields, up to 256 KB per entry.@cloudhal/core-ts/fields, built onvalidateProps(ADR-0030), checks values for the store, API and MCP. It also emits a JSON Schema that OpenAI and Anthropic strict modes both accept.requiredToPublishis checked at review and publish, likerequired_term; drafts save freely.collections, from size measurements. ACollectionnode kind is the fallback.rename_field,change_field_type,set_field_localizedandremove_fieldare explicit operations, each with a dry run, a snapshot and approval, applied in guarded batches.list_collectionsreturns field schemas andcreate_entry/update_entrycheck fields in precheck. There are four new tools and no new scopes.resolveFields,EntryFields.astro), so old themes keep working.Schema check: the diff was applied with fixtures.
pnpm gen(TS + Rust) and the fixture tests passed, then it was reverted. One finding: Rust writes0as0.0, so the Rust core will need canonical number output (RFC 8785) before it writes nodes.The 10 open questions, with recommended defaults, are at the end of the RFC.
🤖 Generated with Claude Code