# Raisd AI knowledge base — machine-readable index
# Any agent or doc generator should load this file first after AGENTS.md.
version: 1
updated: 2026-10-12
canonical_repo: raisd-campus/control-plane
canonical_path: docs/ai
decision:
  date: 2026-09-22
  source: Working Group CMS 2026 standup
  summary: Faid Zamin suggested a central AI knowledge base for backend, frontend, and architecture under control-plane docs.
notes:
  - 2026-09-23: Cyberjaya old CMS dump inventoried; CAP comparison at backend/cms-feature-comparison.md (SDD-14).
  - 2026-09-25: Cyberjaya E2E hub deepened (flows, ERD, DFD, integrations, three-campus comparison); satellite pages redirect to hub anchors.
  - 2026-09-23: SDD-15 nomenclature — CAP-* and M1–M5 anchors/cross-links (../sdd/15-nomenclature.md).
  - 2026-09-23: ICA Sierra Leone CMS dump inventoried (ems_sierraleone); docs/ai/backend/old-cms-sierra-leone.md + diagrams/old-cms-sierra-leone/.
  - 2026-09-25: Sierra Leone E2E hub deepened (flows, ERD, DFD, integrations, three-campus comparison) from ICA_SierraLeone package re-analysis.
  - 2026-09-24: LUCT Botswana CMS dump inventoried (cmsbotswana); docs/ai/backend/old-cms-botswana.md + diagrams/old-cms-botswana/.
  - 2026-09-25: Botswana DTEF scholarship → TEF.gov.bw sync analysed (functional + technical); backend/botswana-dtef-scholarship-sync.md + diagrams/old-cms-botswana/dtef-scholarship-sync.html.
  - 2026-09-23: Raisd CMS Student portal capabilities, screenshots, and use guides under diagrams/raisd-cms/.
  - 2026-09-24: Distributed CMS target (one product, country data planes, white-label/flags) — architecture/distributed-cms-target.md + diagrams/distributed-cms-architecture.html.
  - 2026-09-26: FSD Obsidian 3D knowledge graph (breakdown / walkthrough / click) — diagrams/old-cms/obsidian.html + fsd-knowledge.json; LUCT CMS campus submenus.
  - 2026-10-07: Obsidian 3D FSD for Eswatini + Cambodia — fsd-knowledge-eswatini.json / fsd-knowledge-cambodia.json; ?campus=eswatini|cambodia.
  - 2026-09-27: PoC Vercel + Neon deploy path (SPA + Portal API + free Postgres) — architecture/vercel-neon-poc.md; does not replace SDD-12.
  - 2026-09-27: Published HTML Primary nav + design-system subnav derive from docs/site-nav.yaml (build-dropdown-nav.py).
  - 2026-09-27: Portal API service split into raisd-campus/portal-api (history kept); openapi.yaml stays here. Added development plan, target deployment and PoC requirements under backend/.
  - 2026-10-01: Canonical record schema reviewed against LUCT reporting issues; proposed changes at backend/canonical-schema-luct-readiness.md. ERD generated columns now come from the Zod contract, not seed rows.
  - 2026-10-01: Schema v2 implemented (lifecycle, identifiers, access, finance corrections, audit_events, reporting views). Status updated in canonical-schema-luct-readiness.md §7; published ERD and PoC Neon notes refreshed.
  - 2026-10-01: Published pending confirmation agenda (CS-01–CS-13) at diagrams/canonical-schema-confirmations.html; linked from ERD, architecture status, SDD-10 Q29–Q36.
  - 2026-10-01: CS-01–CS-13 reframed — Schema v2 may proceed; campus-dependent answers become effective-dated policy (Live readiness). CS-12 Demo FKs deferred; CS-13 incremental report cutover. See canonical-schema-luct-readiness.md §0 / §6.
  - 2026-10-01: Schema v3 campus policy layer implemented (status mapping, academic-status / credit / CGPA / document / adjustment policies; university-default seeds; projections + SQL views). See canonical-schema-luct-readiness.md §0.1 / §7.
  - 2026-10-01: Campus policy surfaced in published ERD, Data Model Explorer, OpenAPI `/v1/meta.schemaVersion`, and db-admin IRREGULAR map.
  - 2026-10-01: "Architecture review confirmed Schema v3 good to proceed; CS-01–CS-11 = campus go-Live policy validation (Demo defaults not authoritative LUCT policy). Neon Demo reseeded to schema_version 3 (95 collections); physical verification checklist passed. Production Vercel portal-api redeployed — `/v1/meta` returns `schemaVersion: 3`."
  - 2026-10-01: LMS Q37 Option 1 — published lms-architecture.html + lms-features.html (F01–F37 × CAP) from Raisd sources; hub Moodle-like student map; no PPA comparison.
  - 2026-10-02: LMS logical database tables + ERD CMS/LMS/shared/proposed colour legend (erd.html §10); agent schema at backend/lms-schema.md.
  - 2026-10-02: db-admin ERD tab colours CMS / LMS / shared domains, domain filter, and LMS IRREGULAR stems (aligned with lms-schema.md).
  - 2026-10-02: Portal API LMS surface — OpenAPI tag `LMS`, `GET /v1/meta/lms` catalogue (callable Materials/assignment/lecturer-review + deferred CAP gaps); openapi 0.4.1.
  - 2026-10-03: Working Group weekly — Lesotho first pilot (supersedes Cyberjaya-first gate). architecture/lesotho-pilot.md + backend/old-cms-lesotho.md; SDD-00/01/02/03/09/10/14/15 updated; M4 = Lesotho pilot acceptance.
  - 2026-10-03: Lesotho newer-CMS screenshot pack analysed (WhatsApp); diagram hub docs/diagrams/old-cms-lesotho/; overview + lesotho-pilot.md emphasise sponsor/revenue/gov reasons from Read.ai.
  - 2026-10-04: Lesotho database gap (proxy) — backend/lesotho-db-gap.md + diagrams/old-cms-lesotho/#db-gap; UI→BW/CY→Schema until Vara old dump.
  - 2026-10-05: WhatsApp WG CMS 2026 re-probe — logical ERD + field matrix + gaps vs Schema v3 Demo in lesotho-db-gap.md; scale chips (~22.5k students, ~5.4k applicants).
  - 2026-10-05: Vara Lesotho CMS pack inventoried — campus2_lesotho 369 tables / 351 views / 51 procs / 6 fns; portal_student_*_lesotho + les_update_nmds; ~83% BW / ~81% CY table-name overlap; dump stays under raisd/_local/.
  - 2026-10-05: Lesotho CAP-53 / NMDS field pass — portal_student_*_lesotho (21/16/98/82/44 cols) + api_student_*/api_faculty_* SPs; NMDS = AssistProviderCode nmds + AssistStdAcc + b_assistbilling* (no TEF); lesotho-db-gap.md + old-cms-lesotho diagram chips.
  - 2026-10-05: Lesotho M4 gap analysis — schema × frontend × flows in lesotho-db-gap.md (SDD-11 CAP IDs; admissions/registration/NMDS/finance/graduation); CAP seed reconciled in old-cms-lesotho.md; diagram #gap-x.
  - 2026-10-05: Lesotho CAP-53 Phase R1 read-adapter mapping — backend/lesotho-cap53-read-adapter.md; sanitized _table/_view/_proc catalogs under diagrams/old-cms-lesotho/; portal-api plan Phase 5 Lesotho-first reads.
  - 2026-10-05: Lesotho CMS analysis WG briefing — docs/reports/lesotho-cms-analysis-2026-10-05/ (HTML/PDF + WhatsApp paste); diagram hub banner + Pages sync.
  - 2026-10-05: Eswatini CMS pack inventoried — campus2_eswatini 472 tables / 330 views / 53 procs / 3 fns / 70 triggers; portal_*_eswatini + legacy _swaziland; assist ssb/limkokwing; M5 reference; dump under raisd/_local/.
  - 2026-10-06: "LUCT Cyberjaya online registration captured — Process A applicant wizard (LKW PDF) + Process B enrolled Add/Drop/forms pack; Malaysia EMGS/NOC vs Lesotho NMDS/LGCSE called out. backend/luct-online-registration.md + materials/luct-online-registration/. Pages: diagrams/old-cms/online-registration.html."
  - 2026-10-06: Online registration FE gap analysis (all portals) — Required/Gap/Mismatch/Partial/Out/Met; backend/luct-online-registration-fe-gap.md + diagrams/old-cms/online-registration-gap.html.
  - 2026-10-08: Lesotho CMS vs Raisd Applicant portal flow analysis (standup 7 Oct) — backend/lesotho-cms-vs-applicant-portal.md + diagrams/old-cms-lesotho/cms-vs-applicant.html (12-row matrix, roles, M4 gaps).
  - 2026-10-08: Cambodia certificate QR — Registry → create_qrcode_api → QR redirect → Verification → GetStudentCertInfo; full pack inventory on diagrams/old-cms-cambodia/certificate-qr.html (685 KHM-PNH_ in dump; AES key-sync ops risk).
  - 2026-10-08: Refreshed Lesotho CMS vs Applicant after Faid campus/letters merge — Read.ai action/chapter capture, expectation matrix, Applicant backlog (hosted parity · LGCSE/LSL · type docs).
  - 2026-10-09: Standup 8 Oct follow-up — Applicant merge + QR (auto+manual) + fee/payment from CMS SPs; backend/applicant-qr-fee-mechanisms.md + diagrams/old-cms-lesotho/fee-payment-sps.html (currency matrix · cases C1–C10).
  - 2026-10-09: Campus finance profile + C1–C10 Faid checklist — backend/campus-finance-profile.md + diagrams/old-cms-lesotho/campus-finance-profile.html (proposed seeds; not Live).
  - 2026-10-09: Follow-up — reviewable contracts/campus-finance-profiles.yaml (C1–C10 + LS/SZ/KH); CAP-53 W1 online-enrolment write path (backend/lesotho-cap53-online-enrolment-write.md + cap53-online-enrolment.html).
  - 2026-10-10: Standup 9 Oct — dynamic fee-calculation proposal (backend/dynamic-fee-calculation.md + Pages); weekly progress pack docs/reports/weekly-progress-2026-10-10/.
  - 2026-10-10: Cross-campus fee amount suggestions from SP/DB/process — backend/cross-campus-fee-amount-suggestions.md + diagrams/old-cms/cross-campus-fee-amounts.html (LS/SZ/KH hardcodes).
  - 2026-10-10: Weekly reports hub on Pages — docs/reports/index.html + weekly/W01–W04 (18 Sep–10 Oct); primary nav Weekly reports.
  - 2026-10-11: Staff portal Demo shell — applicant/student status + payment verification (session store); docs/ai/frontend/staff-portal.md.
  - 2026-10-11: Demo keychain launcher — Open filled postMessage into student/applicant/staff sign-in; docs/ai/frontend/keychain.md.
  - 2026-10-10: Refresh W04 / weekly-progress-2026-10-10 through morning cut — hosted Demo API enablement, cross-campus fee amounts, Weekly reports hub.

entrypoints:
  agents: AGENTS.md
  humans: README.md
  generate_docs: process/generate-documentation.md
  product_baseline: ../sdd/README.md
  nomenclature: ../sdd/15-nomenclature.md
  capability_catalog: ../sdd/11-capability-catalog.md
  milestones: ../sdd/03-delivery-milestones.md

sibling_repos:
  - applicant-portal
  - student-portal
  - lecturer-portal
  - staff-portal
  - keychain
  - portal-api
  - design-system
  - portal-api-docs
  - db-admin

architecture:
  - path: architecture/overview.md
    topics: [adr-1, portals, portal-api, cms, lesotho, cyberjaya]
  - path: architecture/lesotho-pilot.md
    topics: [lesotho, pilot, m4, product-priority, migration, screenshots, eswatini]
    related:
      - backend/old-cms-lesotho.md
      - backend/lesotho-db-gap.md
  - path: architecture/distributed-cms-target.md
    topics: [distributed-db, multi-country, white-label, feature-flags, identity, m5, ideal-state, lesotho]
    pages: ../diagrams/distributed-cms-architecture.html
  - path: architecture/lms.md
    topics: [lms, learning, f01-f37, cap-44, base-44, materials, ppa-lms, research, moodle, schema, erd]
    pages:
      - ../diagrams/lms.html
      - ../diagrams/lms-architecture.html
      - ../diagrams/lms-features.html
      - ../diagrams/erd.html
    related: backend/lms-schema.md
    status: proposed
    note: Q37 Option 1 published; research posture only — not Live LMS. ERD §10 catalogues LMS tables with CMS colour legend.
  - path: architecture/repositories.md
    topics: [repo-map, local-paths, ownership]
  - path: architecture/deployment.md
    topics: [ultaHost, k3s, stages, hostnames]
  - path: architecture/vercel-neon-poc.md
    topics: [poc, vercel, neon, postgres, marketplace, student-portal, portal-api]

backend:
  - path: backend/portal-api.md
    topics: [openapi, auth, mock-bridge, cms-stub, repo-layout]
    openapi: ../../openapi.yaml
    code: https://github.com/raisd-campus/portal-api
    local_code: ../../../portal-api/
  - path: backend/portal-api-development-plan.md
    topics: [portal-api, plan, phases, cap-53, cap-01, persistence, identity, cms-adapter, m2, m3]
  - path: backend/portal-api-deployment.md
    topics: [portal-api, deployment, k3s, image, ghcr, probes, env, ci-cd, rollback, sdd-12]
  - path: backend/portal-api-poc-requirements.md
    topics: [portal-api, poc, vercel, neon, requirements, acceptance, sessions]
    related: architecture/vercel-neon-poc.md
  - path: backend/canonical-schema-luct-readiness.md
    topics: [canonical-schema, portal-records, erd, luct, study-period, credits, identifiers, rbac, finance, reporting, active-student, cap-53, m5, confirmations]
    status: partially-implemented
    contract: ../../../student-portal/src/contracts/portal-records.ts
    pages: ../diagrams/erd.html
    confirmations: ../diagrams/canonical-schema-confirmations.html
    note: Schema v3 campus policy layer done (Demo); CS-01–CS-11 = per-campus Live confirmation; CS-12 Demo FKs deferred; CS-13 incremental report migration. See §0 / §6 / §7.
  - path: backend/old-cms-lesotho.md
    topics: [existing-cms, lesotho, pilot, m4, inventory, screenshots, nmds, admissions, registry, lgcse, rbac]
    related:
      - architecture/lesotho-pilot.md
      - backend/lesotho-db-gap.md
    pages: ../diagrams/old-cms-lesotho/
    note: Newer CMS screenshots + old CMS campus2_lesotho structure (369/351/51/6) inventoried 5 Oct 2026; dump outside git; first pilot campus 3 Oct 2026.
  - path: backend/lesotho-db-gap.md
    topics: [lesotho, pilot, m4, database, gap, nmds, lgcse, schema, botswana, cyberjaya, cap-48, cap-53]
    related:
      - backend/old-cms-lesotho.md
      - backend/lesotho-cms-vs-applicant-portal.md
      - backend/lesotho-cap53-read-adapter.md
      - architecture/lesotho-pilot.md
      - backend/botswana-dtef-scholarship-sync.md
      - backend/canonical-schema-luct-readiness.md
    pages: ../diagrams/old-cms-lesotho/index.html#db-gap
    note: Measured campus2_lesotho structure + CAP-53/NMDS fields + schema×FE×flows M4 gap; dump outside git.
  - path: backend/lesotho-cms-vs-applicant-portal.md
    topics: [lesotho, pilot, m4, admissions, applicant-portal, lgcse, offer-letter, gap, standup]
    related:
      - backend/old-cms-lesotho.md
      - backend/lesotho-db-gap.md
      - frontend/applicant-portal.md
      - backend/luct-online-registration-fe-gap.md
      - backend/admissions-handoff.md
      - architecture/lesotho-pilot.md
      - backend/applicant-qr-fee-mechanisms.md
    pages: ../diagrams/old-cms-lesotho/cms-vs-applicant.html
    note: Standup 7 Oct / published 8 Oct — three-plane flow compare; refreshed same day with Read.ai expectations, Faid campus/letters status, Applicant backlog (hosted API · LGCSE/LSL · type matrices).
  - path: backend/applicant-qr-fee-mechanisms.md
    topics: [lesotho, applicant-portal, fee, payment, stored-procedure, qr, cambodia, standup, m4]
    related:
      - backend/lesotho-cms-vs-applicant-portal.md
      - backend/cambodia-qr-system.md
      - backend/lesotho-db-gap.md
      - frontend/applicant-portal.md
      - backend/portal-api.md
      - backend/campus-finance-profile.md
    pages: ../diagrams/old-cms-lesotho/fee-payment-sps.html
    note: Standup 8 Oct action closed 9 Oct — Applicant merge 9e007f2/532d6f0; QR auto+manual; fee planes + SP currency matrix + b_Update_Student cases C1–C10.
  - path: backend/campus-finance-profile.md
    topics: [lesotho, finance, fee, currency, profile, faid, standup, m4, modular]
    related:
      - backend/applicant-qr-fee-mechanisms.md
      - contracts/campus-finance-profiles.yaml
      - backend/lesotho-cap53-online-enrolment-write.md
      - backend/lesotho-db-gap.md
      - backend/lesotho-cms-vs-applicant-portal.md
      - frontend/applicant-portal.md
    pages: ../diagrams/old-cms-lesotho/campus-finance-profile.html
    note: Proposed campus_finance_profile seeds + C1–C10 Faid checklist (9 Oct). YAML SoT in contracts/. Not implemented in Portal API yet.
  - path: contracts/campus-finance-profiles.yaml
    topics: [lesotho, finance, fee, currency, profile, faid, config, c1-c10, contracts]
    related:
      - backend/campus-finance-profile.md
      - backend/applicant-qr-fee-mechanisms.md
      - backend/lesotho-cap53-online-enrolment-write.md
    pages: ../diagrams/old-cms-lesotho/campus-finance-profile.html
    note: Reviewable C1–C10 + campus fee/currency seeds for Faid Accept (proposed; not Live).
  - path: backend/lesotho-cap53-online-enrolment-write.md
    topics: [lesotho, cap-53, online-enrollment, payment, proof, w1, portal-api, standup]
    related:
      - backend/lesotho-cap53-read-adapter.md
      - backend/applicant-qr-fee-mechanisms.md
      - contracts/campus-finance-profiles.yaml
      - backend/portal-api-development-plan.md
    pages: ../diagrams/old-cms-lesotho/cap53-online-enrolment.html
    note: CAP-53 W1 target write path — sp_onlinenrollment_* + sp_payment_verification_insert (documented 9 Oct; not implemented).
  - path: backend/dynamic-fee-calculation.md
    topics: [lesotho, finance, fee, dynamic, configurable, profile, standup, m4]
    related:
      - backend/campus-finance-profile.md
      - contracts/campus-finance-profiles.yaml
      - backend/applicant-qr-fee-mechanisms.md
      - backend/cross-campus-fee-amount-suggestions.md
    pages: ../diagrams/old-cms-lesotho/dynamic-fee-calculation.html
    note: Standup 9 Oct — proposed configurable fee engine; Dexter validates C1–C10 before final config.
  - path: backend/cross-campus-fee-amount-suggestions.md
    topics: [finance, fee, amount, currency, lesotho, eswatini, cambodia, botswana, sierra-leone, hardcode, multi-campus]
    related:
      - contracts/campus-finance-profiles.yaml
      - backend/dynamic-fee-calculation.md
      - backend/applicant-qr-fee-mechanisms.md
      - backend/campus-finance-profile.md
    pages: ../diagrams/old-cms/cross-campus-fee-amounts.html
    note: Suggested amounts from b_Update_Student / payment SP dumps — LS M300+600/375 · SZ 2600/3600 · KH 150/250/220 (10 Oct).
  - path: backend/lesotho-cap53-read-adapter.md
    topics: [lesotho, cap-53, portal-api, adapter, m4, reads, portal-tables]
    related:
      - backend/lesotho-db-gap.md
      - backend/portal-api-development-plan.md
      - backend/portal-api.md
    pages: ../diagrams/old-cms-lesotho/
    note: Phase R1 read mapping portal_student_*_lesotho + api_student_* → Portal API get* methods.
  - path: backend/old-cms-eswatini.md
    topics: [existing-cms, eswatini, swaziland, campus2_eswatini, inventory, php-maker, m5, portal, ssb, cap-53, luct-cms]
    related:
      - architecture/lesotho-pilot.md
      - backend/old-cms-lesotho.md
      - backend/old-cms-botswana.md
      - backend/old-cms-cambodia.md
      - backend/old-cms-cyberjaya.md
    pages: ../diagrams/old-cms/index.html#eswatini
    note: LUCT CMS E2E hub — Vara pack 5 Oct 2026 — 472/330/53/3/70; portal_*_eswatini + legacy _swaziland; assist ssb; dump outside git; M5 after Lesotho.
  - path: backend/old-cms-cambodia.md
    topics: [existing-cms, cambodia, campus2_cambodia, inventory, php-maker, m5, portal, assist, cap-53, kh, luct-cms]
    related:
      - architecture/lesotho-pilot.md
      - backend/old-cms-lesotho.md
      - backend/old-cms-eswatini.md
      - backend/old-cms-botswana.md
      - backend/old-cms-cyberjaya.md
      - backend/cms-feature-comparison.md
      - backend/cambodia-qr-system.md
    pages: ../diagrams/old-cms/index.html#cambodia
    note: LUCT CMS E2E hub — Vara pack 7 Oct 2026 — 481/296/46/2/83; portal_*_cambodia + portalcambodia export; assist Limkokwing; dump outside git; M5 evidence.
  - path: backend/cambodia-qr-system.md
    topics: [cambodia, qr, verification, certificate, limkokwing, m5, registry, integrations]
    related:
      - backend/old-cms-cambodia.md
      - backend/lesotho-cms-vs-applicant-portal.md
      - backend/applicant-qr-fee-mechanisms.md
    pages: ../diagrams/old-cms-cambodia/certificate-qr.html
    note: Full Pages certificate-qr.html — CI4 QR SaaS + Verification + CMS call site + manual Cambodia↔Cyberjaya ops (9 Oct). Dump ~685 KHM-PNH_. Packs outside git.
  - path: backend/old-cms-cyberjaya.md
    topics: [existing-cms, cyberjaya, cmscbj, inventory, php-maker, e2e, erd, dfd, integrations, adr-1]
    pages: ../diagrams/old-cms/
  - path: backend/old-cms-sierra-leone.md
    topics: [existing-cms, sierra-leone, ems_sierraleone, inventory, php-maker, m5, e2e, erd, dfd, integrations]
    pages: ../diagrams/old-cms-sierra-leone/
  - path: backend/old-cms-botswana.md
    topics: [existing-cms, botswana, cmsbotswana, inventory, php-maker, m5, luct, erd, dfd]
    pages: ../diagrams/old-cms-botswana/
  - path: backend/botswana-dtef-scholarship-sync.md
    topics: [botswana, dtef, tef, scholarship, sponsorship, government-api, hal-json, m5, cap-48]
    pages: ../diagrams/old-cms-botswana/dtef-scholarship-sync.html
  - path: backend/luct-online-registration.md
    topics: [luct, cyberjaya, admissions, online-registration, cap-02, cap-03, cap-07, cap-10, emgs, government, forms, mkt003]
    related:
      - backend/luct-online-registration-fe-gap.md
      - frontend/applicant-portal.md
      - architecture/lesotho-pilot.md
      - backend/cms-feature-comparison.md
      - backend/lesotho-db-gap.md
    pages: ../diagrams/old-cms/online-registration.html
    note: Captured 6 Oct 2026 from LKW_Online_Registration.pdf + Student Portal Forms.zip; Cyberjaya Malaysia pack — not Lesotho Live policy.
  - path: backend/luct-online-registration-fe-gap.md
    topics: [gap, frontend, applicant, student, staff, lecturer, admissions, online-registration, mismatch, required]
    related:
      - backend/luct-online-registration.md
      - frontend/applicant-portal.md
      - backend/lesotho-db-gap.md
    pages: ../diagrams/old-cms/online-registration-gap.html
    note: 6 Oct 2026 — all portals vs Process A/B; filterable Pages matrix.
  - path: backend/cms-feature-comparison.md
    topics: [cap-mapping, gap-analysis, adr-1, old-vs-new, triggers, stored-procedures, batch]
    sdd: ../sdd/14-cms-feature-comparison.md
    pages: ../diagrams/old-cms/
  - path: backend/lms-schema.md
    topics: [lms, schema, erd, module-weeks, learning-items, assignments, quizzes, live-class, forums, proposed]
    pages: ../diagrams/erd.html
    related: architecture/lms.md
    status: proposed
    note: Logical LMS tables + CMS/LMS colour legend; proposed CAP-gap tables not in PortalRecordGraph.

diagrams:
  - path: ../diagrams/index.html
    topics: [overview, mermaid, executive-summary, migration]
  - path: ../diagrams/distributed-cms-architecture.html
    topics: [distributed-cms, multi-country, white-label, feature-flags, migration-journey, ideal-state]
  - path: ../diagrams/lms.html
    topics: [lms, learning, f01-f37, ppa-lms, research-posture, base-44, moodle]
  - path: ../diagrams/lms-architecture.html
    topics: [lms, architecture, portal-api, role-surfaces, file-store]
  - path: ../diagrams/lms-features.html
    topics: [lms, f01-f37, features, cap-matrix, research]
  - path: ../diagrams/migration.html
    topics: [milestones, m1-m5, hosting-stages]
  - path: ../diagrams/architecture.html
    topics: [acl, academic-model, sdd-adr]
  - path: ../diagrams/raisd-cms/index.html
    topics: [raisd-cms, student-portal, capabilities, screenshots, guides, erd, dfd]
    pages:
      - ../diagrams/raisd-cms/student-portal.html
      - ../diagrams/raisd-cms/student-portal-screenshots.html
      - ../diagrams/raisd-cms/student-portal-guide.html
      - ../diagrams/erd.html
      - ../diagrams/dfd.html
  - path: ../diagrams/old-cms/index.html
    topics: [legacy-cms, comparison, fsd, erd, flows, database, e2e, functional-flow, dfd, integrations, adr-1, obsidian]
    pages:
      - ../diagrams/old-cms/comparison.html
      - ../diagrams/old-cms/fsd.html
      - ../diagrams/old-cms/erd.html
      - ../diagrams/old-cms/flows.html
      - ../diagrams/old-cms/database.html
    extracts:
      - ../diagrams/old-cms/_trigger-summary.txt
      - ../diagrams/old-cms/_proc-catalog.txt
      - ../diagrams/old-cms/_func-catalog.txt
      - ../diagrams/old-cms/_table-catalog.txt
      - ../diagrams/old-cms/_view-catalog.txt
  - path: ../diagrams/old-cms-sierra-leone/index.html
    topics: [legacy-cms, sierra-leone, ems, inventory, database, e2e, functional-flow, erd, dfd, integrations]
    pages:
      - ../diagrams/old-cms-sierra-leone/database.html
    extracts:
      - ../diagrams/old-cms-sierra-leone/_trigger-summary.txt
      - ../diagrams/old-cms-sierra-leone/_proc-catalog.txt
      - ../diagrams/old-cms-sierra-leone/_table-catalog.txt
      - ../diagrams/old-cms-sierra-leone/_view-catalog.txt
  - path: ../diagrams/old-cms-botswana/index.html
    topics: [legacy-cms, botswana, luct, inventory, database, dtef, e2e, functional-flow, erd, dfd]
    pages:
      - ../diagrams/old-cms-botswana/database.html
      - ../diagrams/old-cms-botswana/dtef-scholarship-sync.html
    extracts:
      - ../diagrams/old-cms-botswana/_trigger-summary.txt
      - ../diagrams/old-cms-botswana/_proc-catalog.txt
      - ../diagrams/old-cms-botswana/_table-catalog.txt
      - ../diagrams/old-cms-botswana/_view-catalog.txt
  - path: ../diagrams/old-cms-lesotho/index.html
    topics: [lesotho, pilot, m4, screenshots, admissions, registry, nmds, lgcse, feature-analysis]
    pages:
      - ../diagrams/old-cms-lesotho/cms-vs-applicant.html
  - path: ../diagrams/old-cms-lesotho/cms-vs-applicant.html
    topics: [lesotho, pilot, m4, applicant-portal, admissions, gap, lgcse, offer-letter]
  - path: ../diagrams/old-cms/fsd-knowledge-lesotho.json
    topics: [lesotho, pilot, obsidian, fsd, graph, nmds, lgcse, m4]
    pages:
      - ../diagrams/old-cms/obsidian.html
  - path: ../diagrams/old-cms/fsd-knowledge-eswatini.json
    topics: [eswatini, obsidian, fsd, graph, ssb, limkokwing, m5]
    pages:
      - ../diagrams/old-cms/obsidian.html
  - path: ../diagrams/old-cms/fsd-knowledge-cambodia.json
    topics: [cambodia, obsidian, fsd, graph, limkokwing, portalcambodia, m5]
    pages:
      - ../diagrams/old-cms/obsidian.html

frontend:
  student-portal:
    agents: frontend/student-portal/AGENTS.md
    scope: frontend/student-portal/project-scope.md
    data_model: frontend/student-portal/data-model.md
    handoff: frontend/student-portal/handoff.md
    documents:
      - frontend/student-portal/design-system.md
      - frontend/student-portal/sidebar-behavior.md
      - frontend/student-portal/calendar.md
      - frontend/student-portal/academic-performance.md
      - frontend/student-portal/academic-modules.md
      - frontend/student-portal/announcements.md
      - frontend/student-portal/academic-timetable.md
      - frontend/student-portal/academic-study-plan.md
      - frontend/student-portal/academic-graduation.md
      - frontend/student-portal/academic-module-registration.md
      - frontend/student-portal/personal-profile.md
      - frontend/student-portal/profile-documents.md
      - frontend/student-portal/privacy-security.md
      - frontend/student-portal/online-forms.md
      - frontend/student-portal/university-policies.md
      - frontend/student-portal/resume-profile.md
      - frontend/student-portal/portfolio-profile.md
      - frontend/student-portal/finance.md
      - frontend/student-portal/immigration.md
      - frontend/student-portal/campus-services.md
      - frontend/student-portal/performance.md
      - frontend/student-portal/audits/2026-09-22-mobile-responsive-audit.md
    skill: skills/cms-student-portal-page/SKILL.md
  applicant-portal: frontend/applicant-portal.md
  lecturer-portal: frontend/lecturer-portal.md
  staff-portal: frontend/staff-portal.md
  keychain: frontend/keychain.md

design:
  - path: design/design-system.md
    topics: [tokens, components, dark-theme, summary-card]
  - path: design/component-library.md
    topics: [design-system, package, component-ownership, installation]

process:
  - path: process/generate-documentation.md
    topics: [sdd, pdf, openapi, knowledge-sync]
  - path: process/status-language.md
    topics: [demo, live, partial, placeholder]

rules:
  - path: rules/cms-student-portal.mdc
  - path: rules/portal-sidebar.mdc
  - path: rules/portal-api.mdc
    mirrored_to: raisd-campus/portal-api/.cursor/rules/portal-api.mdc

admissions_increment:
  - path: frontend/applicant-portal/mock-api.md
    topics: [applicant, mock-api, validation, tests]
  - path: backend/admissions-handoff.md
    topics: [admissions, profiles, schema-v4, deployment-prerequisite]
  - path: contracts/admissions.ts
    topics: [contract, admissions-handoff-v1, admissions-handoff-v2]
  - path: contracts/fixtures/admissions-handoff-v2.json
    topics: [contract-fixture, producer-consumer, issued-letters]
  - path: contracts/fixtures/browser-admissions-v2.json
    topics: [contract-fixture, browser-transfer, issued-letters]
  - path: contracts/fixtures/admissions-handoff-v1.json
    topics: [contract-fixture, producer-consumer]
  - path: frontend/student-portal/audits/2026-10-07-campus-letters-verification.md
    topics: [admissions, issued-letters, verification, mock-api]
  - path: frontend/student-portal/audits/2026-10-05-admissions-profile-verification.md
    topics: [admissions, verification, profile, mock-api]

  - path: contracts/demo-admissions.ts
    topics: [demo-catalogue, design-curriculum, intake-reference]
  - path: contracts/browser-admissions-transfer.ts
    topics: [dev-only, accepted-admissions, one-time-browser-transfer]

student_workflow_increment:
  - path: frontend/student-portal/student-workflows.md
    topics: [source-forms, registration-review, document-delivery, funding, transport-v3]
  - path: contracts/student-workflows.ts
    topics: [registration-request, source-forms, document-delivery]
  - path: contracts/admissions-evidence.ts
    topics: [owned-evidence, transport-v3]
  - path: frontend/student-portal/audits/2026-10-09-student-workflows-verification.md
    topics: [verification, source-forms, registration, documents, transport-v3]

  - path: frontend/student-portal/audits/2026-10-09-campus-main-publication.md
    topics: [publication, verification, reconciliation, main]

applicant_student_sync_audit:
  - path: backend/admissions-resources.md
    topics: [demo-files, original-bytes, continuation, local-postgres]
  - path: contracts/hosted-admissions.ts
    topics: [owned-evidence, chunk-upload, continuation-grant]
  - path: frontend/student-portal/audits/2026-10-12-cross-portal-sync-ui-audit.md
    topics: [ui-audit, shared-062, evidence-matrix, verification]
