feat(i18n): per-entity content, per-group UI, page manifests (spec-v4-data-organization)

- split content.json -> content/{profile,skills,experience,projects}.json and
  ui.json -> 14 feature-group files (vi+en); index.ts merges both trees and
  asserts the merge against the group lists; merged CONTENT verified
  byte-identical against pre-split baseline dumps
- src/data/pages/*.json: 8 per-route manifests + pages.ts loader +
  PageId/PageManifestClaim/PageManifest types; validate.ts rules 1-4 (unknown
  entity, unknown ui group, unresolvable field path, orphan text field,
  missing manifest) - all five rejects verified by a throwaway harness
- draft.ts: data-driven registry of the 12 writable documents (4 structure +
  8 text); describeField() names the per-entity file; smoke-draft fixtures
  follow the new registry (8/8)
- EditBar: 'appears on' page annotations computed from the manifests
- remove JsonPanel.tsx + panel labels (inline-editing task 8); docs: AGENTS.md
  Data Layer / Live Edit Mode / Component Structure, v4 spec progress tables
This commit is contained in:
dong.nguyen committed 2026-10-23 10:55:29 +07:00
1 parent dad5f3edd7
commit 939260e4fb
69 files changed
+1816 -1596

No files matched your search

+36
View File
@@ -44,3 +44,39 @@ export type PhilosophyId =
| 'measure-impact'
| 'keep-learning'
| 'business-domain-knowledge-is-a-key-of-success';
// Page manifests (spec-v4-data-organization §5): one per route plus the
// synthetic resume consumer. A manifest claims which joined records a page
// reads — provenance for EditBar grouping and the orphan-field rule.
export type PageId =
| 'home'
| 'about'
| 'experience'
| 'projects'
| 'project-detail'
| 'contact'
| 'philosophy';
export type ManifestId = PageId | 'resume';
// Entity ids join the structure document, the text documents, and the
// manifest claims (§3 table).
export type ContentEntityId = 'profile' | 'skillGroups' | 'experiences' | 'projects';
export type PageManifestClaim = {
entity: ContentEntityId;
// Paths into the joined records; "*" claims the whole entity. Record-level
// fields are named record-relative ("summary"); "sections.*" claims every
// sub-field of the sections record.
fields: string[];
};
export type PageManifest = {
id: ManifestId;
// null for the synthetic resume consumer — it has no route.
route: string | null;
content: PageManifestClaim[];
// Page-owned UI groups only; component-owned groups are never repeated
// (§4 ownership table).
ui: string[];
};