import type { DocPage } from '../types.js';

/**
 * Registry of documentation pages that kanban cards can reference.
 *
 * Mirrors the routes defined in `apps/docs/src/data/nav.ts` and
 * `apps/docs/src/App.tsx`. When a doc page is added/removed there, update this
 * list so the board's "add reference" picker and canonical links stay accurate.
 */
export const DOC_PAGES: DocPage[] = [
  { path: '/docs/overview', title: 'Overview', icon: '◈', blurb: 'Vision, pillars, core loop, onboarding flow.' },
  { path: '/docs/architecture', title: 'Architecture', icon: '⬡', blurb: 'System architecture, persistence model, audio.' },
  { path: '/docs/tech-stack', title: 'Tech Stack', icon: '⟐', blurb: 'Technology decisions and rationale.' },
  { path: '/docs/backend', title: 'Backend Model', icon: '⊞', blurb: 'Database tables, movement model, ER diagram.' },
  { path: '/docs/agents', title: 'Agent Lifecycle', icon: '⏣', blurb: 'Scheduled agent system and galaxy story agents.' },
  { path: '/docs/gameplay', title: 'Gameplay Loop', icon: '◉', blurb: 'Core loop, security, combat, missions, travel, events.' },
  { path: '/docs/ships', title: 'Ships & Fitting', icon: '◇', blurb: 'Ship classes, fitting, acquisition, AI crew.' },
  { path: '/docs/economy', title: 'Economy & Industry', icon: '⇄', blurb: 'Trade routes, refining, manufacturing, faucets/sinks.' },
  { path: '/docs/social', title: 'Progression & World', icon: '✧', blurb: 'XP & skills, chat, bounty, kill feed, corporations.' },
  { path: '/docs/ship-ai', title: 'Ship AI — Zora', icon: '◈', blurb: 'Zora companion AI, soul depth, module gating.' },
  { path: '/docs/roadmap', title: 'Roadmap', icon: '⊞', blurb: '16 phases, 2 eras, integration gates.' },
  { path: '/docs/kanban-board', title: 'Implementation Board', icon: '▦', blurb: 'This board — implementation status vs. design.' },
  { path: '/docs/risks', title: 'Risks & Questions', icon: '◬', blurb: 'Open risks and open questions.' },
  { path: '/docs/gap-analysis', title: 'Gap Analysis', icon: '□', blurb: 'Specs vs demos vs readiness.' },
  { path: '/docs/vertical-slice-evaluation', title: 'Slice Evaluation', icon: '▤', blurb: 'Alignment matrix, phase readiness.' },
  { path: '/docs/design-doc', title: 'Design Doc', icon: '▣', blurb: 'Original GDD reference.' },
];

/** Look up a page by its route path. */
export function findPage(path: string): DocPage | undefined {
  return DOC_PAGES.find((p) => p.path === path);
}
