{"id":"development-roadmap","relativePath":"development-roadmap.md","title":"Meta Museum Development Roadmap","markdown":"# Meta Museum Development Roadmap\n\nMeta Museum is a public-facing Linked Art web app by Sun & Rain Works. It helps visitors, students, researchers, editors, and AI agents explore museum collection data from sources such as Getty and The Met without losing provenance, rights, citations, uncertainty, or source context.\n\nMeta Wiki Art is the connected MediaWiki instance that AI agents use for drafting, editing, citation management, review workflows, and publishing reviewed art history content generated from Linked Art data sources. Meta Museum is the public experience and data workbench; Meta Wiki Art is the governed publishing layer.\n\n## Product Thesis\n\nMuseums publish rich open collection data, but it is hard for most people to browse, compare, cite, and transform into reliable educational or research content. Meta Museum should make that data legible for humans and structured enough for AI agents to use safely.\n\nThe product succeeds when a visitor can understand an artwork, a student can learn from it, a researcher can trace the source data, an editor can prepare a reviewed page, and an AI agent can generate useful drafts without inventing facts.\n\n## Product Separation\n\n- Meta Museum is the public website, discovery interface, and data workbench.\n- Linked Art JSON-LD and normalized provider records are the source-of-truth data layer.\n- PostgreSQL/JSONB should hold application state, imported records, drafts, rights decisions, and audit events.\n- A graph store should hold entity relationships, provenance paths, authority links, and pattern-discovery structures.\n- Meta Wiki Art is the MediaWiki publishing layer for reviewed narrative pages, citations, edits, discussion, and revision history.\n- AI agents may draft and update Meta Wiki Art pages, but public edits must pass rights checks, citation checks, validation, and human approval gates.\n\n## Audience Paths\n\n| Audience | Primary Need | Product Path |\n| --- | --- | --- |\n| Public visitor | Explore artworks visually and understand basic context | Home, Artwork Gallery, Artwork Detail |\n| Student | Learn art history concepts through guided context | Student Mode, timelines, glossary, source notes |\n| Researcher | Inspect provenance, metadata, source records, and uncertainty | Scholarly Detail, Linked Art Inspector, Graph Explorer |\n| Editor | Prepare reviewed pages and citations | Record Workspace, Rights Review, Meta Wiki Art Drafts |\n| AI agent | Read normalized data, run validations, draft content, monitor updates | Agent APIs, job queues, validation reports, dry-run publishing |\n| Maintainer | Operate ingestion, monitoring, quality, and deployments | Admin/ops views, logs, CI, automated tests |\n\n## Information Architecture\n\n### Public Site\n\n- Home: search-first entry, source highlights, featured works, project explanation.\n- Explore: image-first gallery with source, rights, culture/period/medium, and import state filters.\n- Artwork Detail: public summary, image, maker, date, medium, location, rights, source links.\n- Stories: curated paths across themes, people, places, periods, and movements.\n- Compare: side-by-side artworks, metadata, timelines, and provenance.\n- About Data: clear explanation of Linked Art, sources, rights, and attribution.\n\n### Research Workspace\n\n- Records: imported normalized records and raw JSON.\n- Linked Art Inspector: JSON-LD conformance, endpoint routing, HAL/discovery checks.\n- Graph Explorer: people, places, objects, concepts, events, provenance, and source links.\n- Pattern Discovery: unknown makers, uncertain dates, shared concepts, source gaps.\n- Rights Review: image/text licenses, attribution, allowed reuse, publication warnings.\n\n### Agent + Publishing Workspace\n\n- Agents: run, inspect, and audit agent workflows.\n- Jobs: ingestion, pattern scan, source refresh, draft generation, page update checks.\n- Meta Wiki Art Drafts: wiki markup dry-runs, citations, rights templates, approval state.\n- Issue Monitor: Linked Art GitHub issue inventory and standards follow-up.\n\n## Current Prototype\n\nThe local app runs at `http://localhost:4173` and includes:\n\n- Public Meta Museum home screen.\n- Getty + Met artwork explorer with image cards and detail panels.\n- Getty REST, IIIF, ActivityStream, and SPARQL integration.\n- Met departments, search, object fetch, and Open Access image integration.\n- Linked Art-style import for Getty and Met records.\n- Rights and attribution checks for agent-safe reuse.\n- Phase 1 shared structure contracts for names, identifiers, statements, time spans, dimensions, digital links, entity summaries, and activity summaries.\n- SourceRecord validation now checks primary/display names, structured statements, production timespans, and activity-centric object modeling.\n- Linked Art JSON-LD inspect/import workflow.\n- GitHub issue inventory for `linked-art/linked.art`.\n- Pattern scan, agent run, and content-generation stubs.\n- Roadmap API at `/api/roadmap`.\n\n## Product Principles\n\n- Source data first: generated content must trace back to records, URLs, rights, and citations.\n- Scope by use case: every data-modeling or UI addition must serve a real visitor, student, researcher, editor, or agent path.\n- Progressive disclosure: public pages stay readable; scholarly and agent/debug layers remain available.\n- Human approval for publication: agents can draft, suggest, and maintain, but not silently publish public pages.\n- Rights-aware by default: images and text must carry reuse status and attribution.\n- Linked Art compatibility: use activity-based CIDOC-CRM/Linked Art patterns for production, provenance, acquisition, exhibition, statements, time spans, and uncertainty.\n- JSON-LD first: imported source snapshots, normalized records, validation reports, and exports must preserve Linked Open Data semantics.\n- Web-native APIs: public Linked Art-compatible data should be reachable through stable HTTPS GET resources, HAL links, ActivityStreams paging, and HTML `describedby` discovery where applicable.\n- Multi-source normalization: Getty, The Met, and future providers map into one internal shape without hiding provider-specific fields.\n- Accessibility and pedagogy: the product must work for non-technical visitors, students, keyboard users, and screen readers.\n\n## Architecture Decision: Next.js Timing\n\nRecommendation: keep developing forward in the current Node/vanilla prototype until the data contracts, validation pipeline, persistence model, and first-class entity pages are stable. Do not create a parallel `web/` app yet.\n\nNext.js is still the likely production frontend, but it should be an extraction target rather than the next immediate task. Migrating now would spend effort recreating screens while the hard parts are still the Linked Art entity model, graph traversal, rights handling, validation, source snapshots, and provider normalization. The current app is useful as a low-friction lab for those decisions.\n\nMigration triggers:\n\n- The core contracts for Artwork, SourceRecord, RightsReport, Citation, WikiDraft, AgentTask, ImportJob, and first-class graph entities are stable.\n- Public routes are proven in the prototype: home, explore, artwork detail, people, places, concepts, activities/provenance, sets, stories, compare, and about data.\n- PostgreSQL/JSONB and the first graph projection exist, with migration and seed workflows.\n- Auth, role gates, and editor/admin workflows have a real storage layer to protect.\n- The Next.js migration can be done route by route against existing API contracts rather than by rewriting data behavior inside React components.\n\n## Target Architecture\n\n| Layer | Target | Current | Next Step |\n| --- | --- | --- | --- |\n| Frontend | Next.js, TypeScript, accessible design system | Static HTML/CSS/JS | Keep the prototype through contract and graph hardening; later migrate route by route. |\n| API Gateway | Provider adapters, auth, rate limits, cache | Node HTTP server | Split `server.js` into route modules and contracts before changing frameworks. |\n| Provider Adapters | Getty, Met, Linked Art, Wikidata/AAT/ULAN | Getty + Met + Linked Art prototype | Add normalized provider interface and cache policy. |\n| Linked Art Entity API | GET endpoints for physical objects, digital objects, people, groups, places, concepts, activities, sets, textual works, and visual works | Artwork-oriented prototype endpoints | Add first-class entity contracts and HAL search/referrer links. |\n| Validation | Official Linked Art JSON Schema, PyLD, SHACL, and friendly heuristic checks | Heuristic checks | Add formal validation reports. |\n| Persistence | PostgreSQL JSONB + graph store | Local JSON files | Add schema, migrations, seed data, and import jobs. |\n| Search | Faceted metadata + semantic/vector search | Client filtering + provider search | Add indexed search over imported records. |\n| Graph | Neo4j/Stardog or RDF store | Simple node list | Add event/provenance graph queries. |\n| Agents | Tool registry, queues, memory, evals, approvals | Local stubs | Add durable jobs, audit logs, and tool contracts. |\n| Meta Wiki Art | MediaWiki API, draft namespace, templates | Planned | Build dry-run wiki markup endpoint first. |\n| Observability | Logs, metrics, source sync reports, test dashboards | Minimal local logs | Add health checks and CI reports. |\n\n## Design System Direction\n\n- Visual tone: modern, calm, museum-quality, readable, not dashboard-heavy on public pages.\n- Palette: white base with black text, controlled orange/yellow/green/blue accents from Sun & Rain Works.\n- Layout: public pages should lead with artwork imagery and concise context; research tools can be denser.\n- Navigation: separate public discovery from research/admin/agent tools.\n- Components: ArtworkCard, ArtworkDetail, SourceBadge, RightsBadge, CitationBlock, LinkedDate, ProvenanceStepper, AgentTaskCard, WikiDraftPreview.\n- Accessibility: keyboard navigation, visible focus, text alternatives, semantic headings, responsive layouts, and color contrast checks.\n\n## Engineering Standards\n\n- Keep provider-specific logic in adapters and normalize into one internal artwork/record model.\n- Treat imported records as immutable source snapshots; store transformations and generated content separately.\n- Model maker, owner, location, exhibition, acquisition, and provenance relationships through activities/events rather than direct string shortcuts.\n- Preserve `id`, `type`, `_label`, `identified_by`, `classified_as`, `equivalent`, `part_of`, activity, timespan, statement language, IIIF, rights, and source fields during import and export.\n- Use opaque URIs in code; do not infer entity type, provider, or semantics from URI string structure when structured fields are available.\n- Use `equivalent` for authority reconciliation to Wikidata, Getty AAT/ULAN, and other identifiers; do not collapse records into `owl:sameAs`-style identity.\n- Add tests around rights analysis, provider normalization, Linked Art inspection, and wiki draft generation.\n- Prefer typed contracts before adding new UI: request/response schema, validation shape, error shape.\n- Use defensive network behavior: provider timeouts, retry limits, cache, and graceful fallbacks.\n- Never publish generated content without source citations, rights status, and review state.\n- Validate public JSON-LD against official Linked Art schemas before treating an endpoint as production-ready.\n- Keep graph relationship labels mapped through the local relationship registry so public UI copy and machine-readable predicate keys stay aligned.\n- Run `/api/best-practices` before closing each roadmap phase and convert high-priority gaps into roadmap tasks.\n\n## Quality Gates\n\nBefore a feature is considered done:\n\n- It has a clear user path and empty/error/loading states.\n- It preserves source URL, provider, rights, attribution, and import timestamp.\n- It preserves Linked Art semantics and does not flatten first-class actors, places, concepts, digital objects, visual works, or activities into untraceable display strings.\n- Public JSON-LD responses include stable identifiers, Linked Art context, HAL links where useful, and schema-validation status.\n- It has at least one automated test for risky data transformation.\n- It is keyboard usable and does not depend on color alone.\n- It has a documented API or component contract if agents or other views use it.\n- It has a rollback-safe storage or migration plan if it writes data.\n\n## Phased Plan\n\n### Phase 0: Prototype Hardening and Public UX, Weeks 1-2\n\nStatus: completed.\n\nDeliverables:\n\n- Refined public Home and Explore flows.\n- Clear information architecture separating public, research, agent, and wiki layers.\n- Provider-aware Getty and Met source integrations.\n- Rights-aware display policy.\n- Roadmap and quality bar documented.\n\nCompletion audit:\n\n- Public Home, Explore, and Artwork Detail surfaces exist in the current app.\n- IA separates public discovery, research tools, agent/publishing work, and roadmap views.\n- Getty and Met integrations are split into adapter modules and covered by adapter tests.\n- Rights status, attribution, source URLs, warnings, and import state are preserved in public artwork DTOs.\n- The roadmap and quality bar are available in both `docs/development-roadmap.md` and `/api/roadmap`.\n- A living best-practices audit is available at `/api/best-practices`.\n\n### Phase 1: Data Contracts and Validation, Weeks 3-5\n\nStatus: completed.\n\nDeliverables:\n\n- Normalized Artwork, SourceRecord, RightsReport, Citation, AgentTask, WikiDraft, ImportJob, EntitySummary, ActivitySummary, Name, Identifier, TimeSpan, Dimension, Statement, and DigitalLink contracts.\n- Formal JSON-LD/Linked Art validation reports using official schemas where possible, plus friendly heuristic warnings.\n- Provider adapter modules for Getty and Met.\n- Initial tests for normalization, rights analysis, and imports.\n- First pass at required/recommended/listed metadata tiers, including primary names and AAT-oriented classifications.\n\nCompleted:\n\n- Added reusable Linked Art shared structures in `src/contracts/shared-structures.js`.\n- Added SourceRecord validation for primary/display names, structured statements, production timespans, arrays, rights fields, dimensions, equivalents, and activity-centric HumanMadeObject records.\n- Added Citation, WikiDraft, AgentTask, and richer ImportJob contracts for agent and publishing workflows.\n- Added a provider adapter descriptor and cache policy contract before adding more providers.\n- Added a representative hand-authored Linked Art fixture for validation tests.\n- Added local Linked Art schema-profile validation reports and required/recommended/listed metadata-tier reports.\n- Added contract, adapter-interface, validation-report, normalization, and rights tests; local suite now covers 37 tests.\n\nNotes:\n\n- Full official JSON Schema execution is intentionally deferred until dependency management is introduced. Current validation is dependency-free, points to the official Linked Art schema documentation, and keeps friendly heuristic warnings for users and agents.\n- Phase 2 should now build public routes/components on top of these contracts rather than introducing a parallel Next.js app.\n\n### Phase 2: Public Artwork Pages and Search, Weeks 6-8\n\nStatus: in progress.\n\nDeliverables:\n\n- Public artwork detail routes.\n- Faceted browse by source, maker, date, place, material, classification, rights, image availability, and first-class linked entities.\n- Source and citation components.\n- UI logic for primary names, alternative names, identifiers, physical objects versus digital images/IIIF services, and click-through graph pivots.\n- Responsive and accessibility QA pass.\n\nCompleted in this slice:\n\n- Public `/artwork/:id` detail resolution now supports imported records and live Getty/Met candidate records.\n- Artwork DTOs now carry primary names, alternative names, identifiers, linked entities, digital objects, and citation summaries.\n- Explorer API responses now include tested facet buckets for makers, date bands, places, materials, classifications, and sources.\n- Explorer UI now exposes facet controls for maker, date, place, material, and type in addition to source, text, rights, import, and image filters.\n- Artwork detail pages now distinguish the physical object from digital objects and expose graph-pivot entities for people, places, concepts, materials, owners, and equivalents.\n- Public `/entity/:id` routes now expose first-class entity profiles for people, places, concepts, materials, groups, activities, digital objects, sets, and source records found in imported Linked Art records.\n- Entity profiles show relationship context, related artworks, names, identifiers, classifications, and equivalence links.\n- Entity and artwork graph pivots now carry friendly labels plus stable predicate keys from a relationship registry.\n- `/api/best-practices` audits the current records and roadmap against Linked Art design, API, JSON-LD, pipeline, UI, relationship, shared-structure, and QA standards.\n\nNext actions:\n\n- Extract SourceBadge, RightsBadge, CitationBlock, LinkedDate, ArtworkCard, and ProvenanceStepper into reusable frontend component patterns within the vanilla app.\n- Add keyboard/focus QA for gallery cards, filters, detail navigation, and provenance/entity lists.\n- Expand entity profiles from imported-record graph extraction into provider-backed live lookup where available.\n- Address `/api/best-practices` P0/P1 recommendations as recurring quality work.\n- Add compare/story routes once the detail and entity surfaces are stable.\n\n### Phase 3: Research and Graph Tools, Weeks 9-11\n\nDeliverables:\n\n- Dynamic Graph Explorer with event/provenance paths.\n- Pattern Discovery workspace.\n- Authority reconciliation with Getty AAT/ULAN and Wikidata.\n- Export to JSON-LD, CSV, and citation formats.\n- First-class profile pages for people, groups, places, concepts, activities, digital objects, visual works, textual works, and sets.\n- Part-to-whole traversal for physical, spatial, linguistic, conceptual, and collection relationships.\n\n### Phase 4: Agent Workflows and Meta Wiki Art Drafting, Weeks 12-15\n\nDeliverables:\n\n- Durable agent job queue.\n- Wiki draft generation dry-run endpoint.\n- Citation and rights templates for Meta Wiki Art.\n- Human approval workflow before publishing.\n- Audit trail for prompts, sources, transformations, and edits.\n\n### Phase 5: Production Architecture and Publishing, Weeks 16-20\n\nDeliverables:\n\n- Route-by-route Next.js migration or equivalent production frontend, only after contracts and persistence are stable.\n- PostgreSQL/graph persistence.\n- MediaWiki integration with draft namespace and bot credentials.\n- CI/CD, tests, monitoring, and source refresh jobs.\n- Public beta release checklist.\n\n## Immediate Build Queue\n\n| Priority | Work | Agent Instruction |\n| --- | --- | --- |\n| Done | Define normalized data contracts | Artwork, SourceRecord, RightsReport, Citation, WikiDraft, AgentTask, ImportJob, and shared Linked Art structures are implemented. |\n| Done | Add Linked Art shared structures | Reusable Name, Identifier, Statement, TimeSpan, Dimension, DigitalLink, EntitySummary, and ActivitySummary contracts are implemented and tested. |\n| Done | Add Phase 1 validation reports | Local schema-profile reports and required/recommended/listed metadata-tier checks are implemented and tested. |\n| Done | Define provider adapter interface | Provider descriptor and cache policy contracts are implemented and tested. |\n| P0 | Refine public IA and navigation | Separate public discovery from research/admin/agent tools and define page-level routes for Phase 2 screens. |\n| Done | Add public artwork detail page | Detail routes now support imported and live candidate records with image, maker, date, source, rights, citation, digital object, and graph-pivot panels. |\n| P0 | Define Meta Wiki Art publishing contract | Specify namespaces, citation templates, rights templates, generated-content audit notes, and approval gates. |\n| P1 | Add provider adapter modules | Split Getty and Met fetching/normalization into maintainable service modules. |\n| P1 | Add tests for normalization and rights | Cover Getty image rights, Getty text rights, Met public-domain handling, and import mapping. |\n| Done | Add Linked Art schema validation | Dependency-free schema-profile validation and metadata-tier reporting are wired into inspect/import reports. |\n| P1 | Draft design system components | Extract reusable frontend component patterns for ArtworkCard, RightsBadge, SourceBadge, CitationBlock, LinkedDate, and ProvenanceStepper. |\n\n## Open Architecture Decisions\n\n- Whether the production API gateway should be Node-first, FastAPI-first, or hybrid.\n- Whether graph storage should be RDF-native, Neo4j, or PostgreSQL plus RDF export.\n- Which MediaWiki extensions are required for citations, semantic metadata, and agent audit trails.\n- Whether generated wiki drafts should be stored as wiki markup, structured JSON, or both.\n- How much source-provider raw JSON should be exposed publicly versus reserved for research/debug views.\n","sections":[{"level":2,"heading":"Product Thesis","anchor":"product-thesis"},{"level":2,"heading":"Product Separation","anchor":"product-separation"},{"level":2,"heading":"Audience Paths","anchor":"audience-paths"},{"level":2,"heading":"Information Architecture","anchor":"information-architecture"},{"level":3,"heading":"Public Site","anchor":"public-site"},{"level":3,"heading":"Research Workspace","anchor":"research-workspace"},{"level":3,"heading":"Agent + Publishing Workspace","anchor":"agent-publishing-workspace"},{"level":2,"heading":"Current Prototype","anchor":"current-prototype"},{"level":2,"heading":"Product Principles","anchor":"product-principles"},{"level":2,"heading":"Architecture Decision: Next.js Timing","anchor":"architecture-decision-next-js-timing"},{"level":2,"heading":"Target Architecture","anchor":"target-architecture"},{"level":2,"heading":"Design System Direction","anchor":"design-system-direction"},{"level":2,"heading":"Engineering Standards","anchor":"engineering-standards"},{"level":2,"heading":"Quality Gates","anchor":"quality-gates"},{"level":2,"heading":"Phased Plan","anchor":"phased-plan"},{"level":3,"heading":"Phase 0: Prototype Hardening and Public UX, Weeks 1-2","anchor":"phase-0-prototype-hardening-and-public-ux-weeks-1-2"},{"level":3,"heading":"Phase 1: Data Contracts and Validation, Weeks 3-5","anchor":"phase-1-data-contracts-and-validation-weeks-3-5"},{"level":3,"heading":"Phase 2: Public Artwork Pages and Search, Weeks 6-8","anchor":"phase-2-public-artwork-pages-and-search-weeks-6-8"},{"level":3,"heading":"Phase 3: Research and Graph Tools, Weeks 9-11","anchor":"phase-3-research-and-graph-tools-weeks-9-11"},{"level":3,"heading":"Phase 4: Agent Workflows and Meta Wiki Art Drafting, Weeks 12-15","anchor":"phase-4-agent-workflows-and-meta-wiki-art-drafting-weeks-12-15"},{"level":3,"heading":"Phase 5: Production Architecture and Publishing, Weeks 16-20","anchor":"phase-5-production-architecture-and-publishing-weeks-16-20"},{"level":2,"heading":"Immediate Build Queue","anchor":"immediate-build-queue"},{"level":2,"heading":"Open Architecture Decisions","anchor":"open-architecture-decisions"}],"html":"<h1 id=\"meta-museum-development-roadmap\">Meta Museum Development Roadmap</h1>\n<p>Meta Museum is a public-facing Linked Art web app by Sun &amp; Rain Works. It helps visitors, students, researchers, editors, and AI agents explore museum collection data from sources such as Getty and The Met without losing provenance, rights, citations, uncertainty, or source context.</p>\n<p>Meta Wiki Art is the connected MediaWiki instance that AI agents use for drafting, editing, citation management, review workflows, and publishing reviewed art history content generated from Linked Art data sources. Meta Museum is the public experience and data workbench; Meta Wiki Art is the governed publishing layer.</p>\n<h2 id=\"product-thesis\">Product Thesis</h2>\n<p>Museums publish rich open collection data, but it is hard for most people to browse, compare, cite, and transform into reliable educational or research content. Meta Museum should make that data legible for humans and structured enough for AI agents to use safely.</p>\n<p>The product succeeds when a visitor can understand an artwork, a student can learn from it, a researcher can trace the source data, an editor can prepare a reviewed page, and an AI agent can generate useful drafts without inventing facts.</p>\n<h2 id=\"product-separation\">Product Separation</h2>\n<ul><li>Meta Museum is the public website, discovery interface, and data workbench.</li><li>Linked Art JSON-LD and normalized provider records are the source-of-truth data layer.</li><li>PostgreSQL/JSONB should hold application state, imported records, drafts, rights decisions, and audit events.</li><li>A graph store should hold entity relationships, provenance paths, authority links, and pattern-discovery structures.</li><li>Meta Wiki Art is the MediaWiki publishing layer for reviewed narrative pages, citations, edits, discussion, and revision history.</li><li>AI agents may draft and update Meta Wiki Art pages, but public edits must pass rights checks, citation checks, validation, and human approval gates.</li></ul>\n<h2 id=\"audience-paths\">Audience Paths</h2>\n<p>| Audience | Primary Need | Product Path |</p>\n<p>| --- | --- | --- |</p>\n<p>| Public visitor | Explore artworks visually and understand basic context | Home, Artwork Gallery, Artwork Detail |</p>\n<p>| Student | Learn art history concepts through guided context | Student Mode, timelines, glossary, source notes |</p>\n<p>| Researcher | Inspect provenance, metadata, source records, and uncertainty | Scholarly Detail, Linked Art Inspector, Graph Explorer |</p>\n<p>| Editor | Prepare reviewed pages and citations | Record Workspace, Rights Review, Meta Wiki Art Drafts |</p>\n<p>| AI agent | Read normalized data, run validations, draft content, monitor updates | Agent APIs, job queues, validation reports, dry-run publishing |</p>\n<p>| Maintainer | Operate ingestion, monitoring, quality, and deployments | Admin/ops views, logs, CI, automated tests |</p>\n<h2 id=\"information-architecture\">Information Architecture</h2>\n<h3 id=\"public-site\">Public Site</h3>\n<ul><li>Home: search-first entry, source highlights, featured works, project explanation.</li><li>Explore: image-first gallery with source, rights, culture/period/medium, and import state filters.</li><li>Artwork Detail: public summary, image, maker, date, medium, location, rights, source links.</li><li>Stories: curated paths across themes, people, places, periods, and movements.</li><li>Compare: side-by-side artworks, metadata, timelines, and provenance.</li><li>About Data: clear explanation of Linked Art, sources, rights, and attribution.</li></ul>\n<h3 id=\"research-workspace\">Research Workspace</h3>\n<ul><li>Records: imported normalized records and raw JSON.</li><li>Linked Art Inspector: JSON-LD conformance, endpoint routing, HAL/discovery checks.</li><li>Graph Explorer: people, places, objects, concepts, events, provenance, and source links.</li><li>Pattern Discovery: unknown makers, uncertain dates, shared concepts, source gaps.</li><li>Rights Review: image/text licenses, attribution, allowed reuse, publication warnings.</li></ul>\n<h3 id=\"agent-publishing-workspace\">Agent + Publishing Workspace</h3>\n<ul><li>Agents: run, inspect, and audit agent workflows.</li><li>Jobs: ingestion, pattern scan, source refresh, draft generation, page update checks.</li><li>Meta Wiki Art Drafts: wiki markup dry-runs, citations, rights templates, approval state.</li><li>Issue Monitor: Linked Art GitHub issue inventory and standards follow-up.</li></ul>\n<h2 id=\"current-prototype\">Current Prototype</h2>\n<p>The local app runs at `http://localhost:4173` and includes:</p>\n<ul><li>Public Meta Museum home screen.</li><li>Getty + Met artwork explorer with image cards and detail panels.</li><li>Getty REST, IIIF, ActivityStream, and SPARQL integration.</li><li>Met departments, search, object fetch, and Open Access image integration.</li><li>Linked Art-style import for Getty and Met records.</li><li>Rights and attribution checks for agent-safe reuse.</li><li>Phase 1 shared structure contracts for names, identifiers, statements, time spans, dimensions, digital links, entity summaries, and activity summaries.</li><li>SourceRecord validation now checks primary/display names, structured statements, production timespans, and activity-centric object modeling.</li><li>Linked Art JSON-LD inspect/import workflow.</li><li>GitHub issue inventory for `linked-art/linked.art`.</li><li>Pattern scan, agent run, and content-generation stubs.</li><li>Roadmap API at `/api/roadmap`.</li></ul>\n<h2 id=\"product-principles\">Product Principles</h2>\n<ul><li>Source data first: generated content must trace back to records, URLs, rights, and citations.</li><li>Scope by use case: every data-modeling or UI addition must serve a real visitor, student, researcher, editor, or agent path.</li><li>Progressive disclosure: public pages stay readable; scholarly and agent/debug layers remain available.</li><li>Human approval for publication: agents can draft, suggest, and maintain, but not silently publish public pages.</li><li>Rights-aware by default: images and text must carry reuse status and attribution.</li><li>Linked Art compatibility: use activity-based CIDOC-CRM/Linked Art patterns for production, provenance, acquisition, exhibition, statements, time spans, and uncertainty.</li><li>JSON-LD first: imported source snapshots, normalized records, validation reports, and exports must preserve Linked Open Data semantics.</li><li>Web-native APIs: public Linked Art-compatible data should be reachable through stable HTTPS GET resources, HAL links, ActivityStreams paging, and HTML `describedby` discovery where applicable.</li><li>Multi-source normalization: Getty, The Met, and future providers map into one internal shape without hiding provider-specific fields.</li><li>Accessibility and pedagogy: the product must work for non-technical visitors, students, keyboard users, and screen readers.</li></ul>\n<h2 id=\"architecture-decision-next-js-timing\">Architecture Decision: Next.js Timing</h2>\n<p>Recommendation: keep developing forward in the current Node/vanilla prototype until the data contracts, validation pipeline, persistence model, and first-class entity pages are stable. Do not create a parallel `web/` app yet.</p>\n<p>Next.js is still the likely production frontend, but it should be an extraction target rather than the next immediate task. Migrating now would spend effort recreating screens while the hard parts are still the Linked Art entity model, graph traversal, rights handling, validation, source snapshots, and provider normalization. The current app is useful as a low-friction lab for those decisions.</p>\n<p>Migration triggers:</p>\n<ul><li>The core contracts for Artwork, SourceRecord, RightsReport, Citation, WikiDraft, AgentTask, ImportJob, and first-class graph entities are stable.</li><li>Public routes are proven in the prototype: home, explore, artwork detail, people, places, concepts, activities/provenance, sets, stories, compare, and about data.</li><li>PostgreSQL/JSONB and the first graph projection exist, with migration and seed workflows.</li><li>Auth, role gates, and editor/admin workflows have a real storage layer to protect.</li><li>The Next.js migration can be done route by route against existing API contracts rather than by rewriting data behavior inside React components.</li></ul>\n<h2 id=\"target-architecture\">Target Architecture</h2>\n<p>| Layer | Target | Current | Next Step |</p>\n<p>| --- | --- | --- | --- |</p>\n<p>| Frontend | Next.js, TypeScript, accessible design system | Static HTML/CSS/JS | Keep the prototype through contract and graph hardening; later migrate route by route. |</p>\n<p>| API Gateway | Provider adapters, auth, rate limits, cache | Node HTTP server | Split `server.js` into route modules and contracts before changing frameworks. |</p>\n<p>| Provider Adapters | Getty, Met, Linked Art, Wikidata/AAT/ULAN | Getty + Met + Linked Art prototype | Add normalized provider interface and cache policy. |</p>\n<p>| Linked Art Entity API | GET endpoints for physical objects, digital objects, people, groups, places, concepts, activities, sets, textual works, and visual works | Artwork-oriented prototype endpoints | Add first-class entity contracts and HAL search/referrer links. |</p>\n<p>| Validation | Official Linked Art JSON Schema, PyLD, SHACL, and friendly heuristic checks | Heuristic checks | Add formal validation reports. |</p>\n<p>| Persistence | PostgreSQL JSONB + graph store | Local JSON files | Add schema, migrations, seed data, and import jobs. |</p>\n<p>| Search | Faceted metadata + semantic/vector search | Client filtering + provider search | Add indexed search over imported records. |</p>\n<p>| Graph | Neo4j/Stardog or RDF store | Simple node list | Add event/provenance graph queries. |</p>\n<p>| Agents | Tool registry, queues, memory, evals, approvals | Local stubs | Add durable jobs, audit logs, and tool contracts. |</p>\n<p>| Meta Wiki Art | MediaWiki API, draft namespace, templates | Planned | Build dry-run wiki markup endpoint first. |</p>\n<p>| Observability | Logs, metrics, source sync reports, test dashboards | Minimal local logs | Add health checks and CI reports. |</p>\n<h2 id=\"design-system-direction\">Design System Direction</h2>\n<ul><li>Visual tone: modern, calm, museum-quality, readable, not dashboard-heavy on public pages.</li><li>Palette: white base with black text, controlled orange/yellow/green/blue accents from Sun &amp; Rain Works.</li><li>Layout: public pages should lead with artwork imagery and concise context; research tools can be denser.</li><li>Navigation: separate public discovery from research/admin/agent tools.</li><li>Components: ArtworkCard, ArtworkDetail, SourceBadge, RightsBadge, CitationBlock, LinkedDate, ProvenanceStepper, AgentTaskCard, WikiDraftPreview.</li><li>Accessibility: keyboard navigation, visible focus, text alternatives, semantic headings, responsive layouts, and color contrast checks.</li></ul>\n<h2 id=\"engineering-standards\">Engineering Standards</h2>\n<ul><li>Keep provider-specific logic in adapters and normalize into one internal artwork/record model.</li><li>Treat imported records as immutable source snapshots; store transformations and generated content separately.</li><li>Model maker, owner, location, exhibition, acquisition, and provenance relationships through activities/events rather than direct string shortcuts.</li><li>Preserve `id`, `type`, `_label`, `identified_by`, `classified_as`, `equivalent`, `part_of`, activity, timespan, statement language, IIIF, rights, and source fields during import and export.</li><li>Use opaque URIs in code; do not infer entity type, provider, or semantics from URI string structure when structured fields are available.</li><li>Use `equivalent` for authority reconciliation to Wikidata, Getty AAT/ULAN, and other identifiers; do not collapse records into `owl:sameAs`-style identity.</li><li>Add tests around rights analysis, provider normalization, Linked Art inspection, and wiki draft generation.</li><li>Prefer typed contracts before adding new UI: request/response schema, validation shape, error shape.</li><li>Use defensive network behavior: provider timeouts, retry limits, cache, and graceful fallbacks.</li><li>Never publish generated content without source citations, rights status, and review state.</li><li>Validate public JSON-LD against official Linked Art schemas before treating an endpoint as production-ready.</li><li>Keep graph relationship labels mapped through the local relationship registry so public UI copy and machine-readable predicate keys stay aligned.</li><li>Run `/api/best-practices` before closing each roadmap phase and convert high-priority gaps into roadmap tasks.</li></ul>\n<h2 id=\"quality-gates\">Quality Gates</h2>\n<p>Before a feature is considered done:</p>\n<ul><li>It has a clear user path and empty/error/loading states.</li><li>It preserves source URL, provider, rights, attribution, and import timestamp.</li><li>It preserves Linked Art semantics and does not flatten first-class actors, places, concepts, digital objects, visual works, or activities into untraceable display strings.</li><li>Public JSON-LD responses include stable identifiers, Linked Art context, HAL links where useful, and schema-validation status.</li><li>It has at least one automated test for risky data transformation.</li><li>It is keyboard usable and does not depend on color alone.</li><li>It has a documented API or component contract if agents or other views use it.</li><li>It has a rollback-safe storage or migration plan if it writes data.</li></ul>\n<h2 id=\"phased-plan\">Phased Plan</h2>\n<h3 id=\"phase-0-prototype-hardening-and-public-ux-weeks-1-2\">Phase 0: Prototype Hardening and Public UX, Weeks 1-2</h3>\n<p>Status: completed.</p>\n<p>Deliverables:</p>\n<ul><li>Refined public Home and Explore flows.</li><li>Clear information architecture separating public, research, agent, and wiki layers.</li><li>Provider-aware Getty and Met source integrations.</li><li>Rights-aware display policy.</li><li>Roadmap and quality bar documented.</li></ul>\n<p>Completion audit:</p>\n<ul><li>Public Home, Explore, and Artwork Detail surfaces exist in the current app.</li><li>IA separates public discovery, research tools, agent/publishing work, and roadmap views.</li><li>Getty and Met integrations are split into adapter modules and covered by adapter tests.</li><li>Rights status, attribution, source URLs, warnings, and import state are preserved in public artwork DTOs.</li><li>The roadmap and quality bar are available in both `docs/development-roadmap.md` and `/api/roadmap`.</li><li>A living best-practices audit is available at `/api/best-practices`.</li></ul>\n<h3 id=\"phase-1-data-contracts-and-validation-weeks-3-5\">Phase 1: Data Contracts and Validation, Weeks 3-5</h3>\n<p>Status: completed.</p>\n<p>Deliverables:</p>\n<ul><li>Normalized Artwork, SourceRecord, RightsReport, Citation, AgentTask, WikiDraft, ImportJob, EntitySummary, ActivitySummary, Name, Identifier, TimeSpan, Dimension, Statement, and DigitalLink contracts.</li><li>Formal JSON-LD/Linked Art validation reports using official schemas where possible, plus friendly heuristic warnings.</li><li>Provider adapter modules for Getty and Met.</li><li>Initial tests for normalization, rights analysis, and imports.</li><li>First pass at required/recommended/listed metadata tiers, including primary names and AAT-oriented classifications.</li></ul>\n<p>Completed:</p>\n<ul><li>Added reusable Linked Art shared structures in `src/contracts/shared-structures.js`.</li><li>Added SourceRecord validation for primary/display names, structured statements, production timespans, arrays, rights fields, dimensions, equivalents, and activity-centric HumanMadeObject records.</li><li>Added Citation, WikiDraft, AgentTask, and richer ImportJob contracts for agent and publishing workflows.</li><li>Added a provider adapter descriptor and cache policy contract before adding more providers.</li><li>Added a representative hand-authored Linked Art fixture for validation tests.</li><li>Added local Linked Art schema-profile validation reports and required/recommended/listed metadata-tier reports.</li><li>Added contract, adapter-interface, validation-report, normalization, and rights tests; local suite now covers 37 tests.</li></ul>\n<p>Notes:</p>\n<ul><li>Full official JSON Schema execution is intentionally deferred until dependency management is introduced. Current validation is dependency-free, points to the official Linked Art schema documentation, and keeps friendly heuristic warnings for users and agents.</li><li>Phase 2 should now build public routes/components on top of these contracts rather than introducing a parallel Next.js app.</li></ul>\n<h3 id=\"phase-2-public-artwork-pages-and-search-weeks-6-8\">Phase 2: Public Artwork Pages and Search, Weeks 6-8</h3>\n<p>Status: in progress.</p>\n<p>Deliverables:</p>\n<ul><li>Public artwork detail routes.</li><li>Faceted browse by source, maker, date, place, material, classification, rights, image availability, and first-class linked entities.</li><li>Source and citation components.</li><li>UI logic for primary names, alternative names, identifiers, physical objects versus digital images/IIIF services, and click-through graph pivots.</li><li>Responsive and accessibility QA pass.</li></ul>\n<p>Completed in this slice:</p>\n<ul><li>Public `/artwork/:id` detail resolution now supports imported records and live Getty/Met candidate records.</li><li>Artwork DTOs now carry primary names, alternative names, identifiers, linked entities, digital objects, and citation summaries.</li><li>Explorer API responses now include tested facet buckets for makers, date bands, places, materials, classifications, and sources.</li><li>Explorer UI now exposes facet controls for maker, date, place, material, and type in addition to source, text, rights, import, and image filters.</li><li>Artwork detail pages now distinguish the physical object from digital objects and expose graph-pivot entities for people, places, concepts, materials, owners, and equivalents.</li><li>Public `/entity/:id` routes now expose first-class entity profiles for people, places, concepts, materials, groups, activities, digital objects, sets, and source records found in imported Linked Art records.</li><li>Entity profiles show relationship context, related artworks, names, identifiers, classifications, and equivalence links.</li><li>Entity and artwork graph pivots now carry friendly labels plus stable predicate keys from a relationship registry.</li><li>`/api/best-practices` audits the current records and roadmap against Linked Art design, API, JSON-LD, pipeline, UI, relationship, shared-structure, and QA standards.</li></ul>\n<p>Next actions:</p>\n<ul><li>Extract SourceBadge, RightsBadge, CitationBlock, LinkedDate, ArtworkCard, and ProvenanceStepper into reusable frontend component patterns within the vanilla app.</li><li>Add keyboard/focus QA for gallery cards, filters, detail navigation, and provenance/entity lists.</li><li>Expand entity profiles from imported-record graph extraction into provider-backed live lookup where available.</li><li>Address `/api/best-practices` P0/P1 recommendations as recurring quality work.</li><li>Add compare/story routes once the detail and entity surfaces are stable.</li></ul>\n<h3 id=\"phase-3-research-and-graph-tools-weeks-9-11\">Phase 3: Research and Graph Tools, Weeks 9-11</h3>\n<p>Deliverables:</p>\n<ul><li>Dynamic Graph Explorer with event/provenance paths.</li><li>Pattern Discovery workspace.</li><li>Authority reconciliation with Getty AAT/ULAN and Wikidata.</li><li>Export to JSON-LD, CSV, and citation formats.</li><li>First-class profile pages for people, groups, places, concepts, activities, digital objects, visual works, textual works, and sets.</li><li>Part-to-whole traversal for physical, spatial, linguistic, conceptual, and collection relationships.</li></ul>\n<h3 id=\"phase-4-agent-workflows-and-meta-wiki-art-drafting-weeks-12-15\">Phase 4: Agent Workflows and Meta Wiki Art Drafting, Weeks 12-15</h3>\n<p>Deliverables:</p>\n<ul><li>Durable agent job queue.</li><li>Wiki draft generation dry-run endpoint.</li><li>Citation and rights templates for Meta Wiki Art.</li><li>Human approval workflow before publishing.</li><li>Audit trail for prompts, sources, transformations, and edits.</li></ul>\n<h3 id=\"phase-5-production-architecture-and-publishing-weeks-16-20\">Phase 5: Production Architecture and Publishing, Weeks 16-20</h3>\n<p>Deliverables:</p>\n<ul><li>Route-by-route Next.js migration or equivalent production frontend, only after contracts and persistence are stable.</li><li>PostgreSQL/graph persistence.</li><li>MediaWiki integration with draft namespace and bot credentials.</li><li>CI/CD, tests, monitoring, and source refresh jobs.</li><li>Public beta release checklist.</li></ul>\n<h2 id=\"immediate-build-queue\">Immediate Build Queue</h2>\n<p>| Priority | Work | Agent Instruction |</p>\n<p>| --- | --- | --- |</p>\n<p>| Done | Define normalized data contracts | Artwork, SourceRecord, RightsReport, Citation, WikiDraft, AgentTask, ImportJob, and shared Linked Art structures are implemented. |</p>\n<p>| Done | Add Linked Art shared structures | Reusable Name, Identifier, Statement, TimeSpan, Dimension, DigitalLink, EntitySummary, and ActivitySummary contracts are implemented and tested. |</p>\n<p>| Done | Add Phase 1 validation reports | Local schema-profile reports and required/recommended/listed metadata-tier checks are implemented and tested. |</p>\n<p>| Done | Define provider adapter interface | Provider descriptor and cache policy contracts are implemented and tested. |</p>\n<p>| P0 | Refine public IA and navigation | Separate public discovery from research/admin/agent tools and define page-level routes for Phase 2 screens. |</p>\n<p>| Done | Add public artwork detail page | Detail routes now support imported and live candidate records with image, maker, date, source, rights, citation, digital object, and graph-pivot panels. |</p>\n<p>| P0 | Define Meta Wiki Art publishing contract | Specify namespaces, citation templates, rights templates, generated-content audit notes, and approval gates. |</p>\n<p>| P1 | Add provider adapter modules | Split Getty and Met fetching/normalization into maintainable service modules. |</p>\n<p>| P1 | Add tests for normalization and rights | Cover Getty image rights, Getty text rights, Met public-domain handling, and import mapping. |</p>\n<p>| Done | Add Linked Art schema validation | Dependency-free schema-profile validation and metadata-tier reporting are wired into inspect/import reports. |</p>\n<p>| P1 | Draft design system components | Extract reusable frontend component patterns for ArtworkCard, RightsBadge, SourceBadge, CitationBlock, LinkedDate, and ProvenanceStepper. |</p>\n<h2 id=\"open-architecture-decisions\">Open Architecture Decisions</h2>\n<ul><li>Whether the production API gateway should be Node-first, FastAPI-first, or hybrid.</li><li>Whether graph storage should be RDF-native, Neo4j, or PostgreSQL plus RDF export.</li><li>Which MediaWiki extensions are required for citations, semantic metadata, and agent audit trails.</li><li>Whether generated wiki drafts should be stored as wiki markup, structured JSON, or both.</li><li>How much source-provider raw JSON should be exposed publicly versus reserved for research/debug views.</li></ul>","updatedAt":"2018-10-20T01:46:40.000Z","checksum":"624a8a089d72f60a4a6cb38fba3388d48e12570d2b89582ca608d8f32d000676","checksumPrefix":"624a8a089d72","anchorCount":23,"lineCount":293,"rawUrl":"/api/docs/content?path=development-roadmap.md","htmlUrl":"/docs?doc=development-roadmap.md","apiUrl":"/api/docs/content?path=development-roadmap.md"}