diff --git a/app/docs/admin-guide/page.tsx b/app/docs/admin-guide/page.tsx index 6e66777..8938f07 100644 --- a/app/docs/admin-guide/page.tsx +++ b/app/docs/admin-guide/page.tsx @@ -4,7 +4,7 @@ export default function AdminGuideDocsPage() { return (

Application Lifecycle

-

Applications progress through these states:

+

+ The canonical lifecycle is the two-layer taxonomy in{" "} + + ADR 0001 + + : an operational ladder of eleven states plus the tracked{" "} + meta-state, rolling up into six public stages. Each state has a + measurable verification rule enforced by{" "} + npm run verify:portfolio in CI. +

+ +

+ STATUS_OPTIONS in{" "} + app/admin/registry/[id]/page.tsx still offers the legacy + submission states (in-development, staging,{" "} + retired) and the pre-ADR-0001 capitalised union + (Planned, Prototype, Piloting,{" "} + Production, Tracked, Archived). + None of those are members of the current taxonomy. +

+

+ applications.status is plain TEXT with no + CHECK constraint, so such a value writes successfully, and{" "} + publicStageFromStatus() buckets anything unrecognised as{" "} + Exploring so the UI never crashes. The practical effect: + setting a status here can silently misfile a project on{" "} + /portfolio.{" "} + npm run verify:portfolio will not catch it — the verifier + reads lib/portfolio.ts, not the database. +

+

+ Until that list is fixed, prefer editing{" "} + lib/portfolio.ts and re-seeding over changing a + status here. Tracked as a follow-up to the July 2026 documentation + audit. +

+
+

Registry Detail Page

Each registry entry (/admin/registry/[id]) has an editable form for: @@ -128,6 +171,37 @@ export default function AdminGuideDocsPage() { This is useful for existing applications that predate the platform.

+

Where the admin surfaces sit now

+

+ /admin/* is transitional. The source-of-truth + boundary has moved since these pages were built: +

+ +

+ Submissions review — the dashboard, notes, similarity, and promote — + remains the live workflow here, and is what this page is for. ClickUp + write-side (new submissions creating ClickUp tasks) is still future + work; when it lands, /admin/submissions retires. +

+

Notes System

Notes are simple text entries attached to submissions. Each note has an author name and diff --git a/app/docs/api-reference/page.tsx b/app/docs/api-reference/page.tsx index e36ce39..09ede9f 100644 --- a/app/docs/api-reference/page.tsx +++ b/app/docs/api-reference/page.tsx @@ -59,7 +59,7 @@ export default function ApiReferenceDocsPage() { return (

Returns 503 if MINDROUTER_API_KEY is not configured.

+ + + +

+ Returns {`{ response, citations[], toolCalls[], iterations, truncated, salvagedToolCalls }`}. + Citations are assembled from the tools' own canonical URLs, never authored by the model. +

+

+ Rate limited per IP hash: 60/hour public, 600/hour internal. Over the + limit returns 429 with Retry-After, + X-RateLimit-Limit, and X-RateLimit-Remaining. + Returns 503 with unconfigured: true when + MINDROUTER_API_KEY is unset. +

+

+ A MindRouter outage returns 200, not 500 — the body + carries a friendly fallback message and fallback: true so + the chat widget degrades instead of erroring. Every call is logged to{" "} + agent_queries. +

+
+ + +

Similarity

+
+ + +

+ Distinct from /api/submissions/[id]/similarity, which + persists matches after a real submission. This runs at threshold + 0.2 rather than 0.3 — deliberately over-notifying and + letting the submitter judge. +

+
+
+ +

Operations

+
+ +

+ Lives under /internal so the Basic-auth proxy covers it. + Used by the “Sync now” button and by the host cron: +

+
{`curl -s -u "$BASIC_AUTH_USER:$BASIC_AUTH_PASS" -X POST \\
+  https://aispeg.insight.uidaho.edu/internal/sync`}
+

+ Returns the run summary on success. 503 if + CLICKUP_API_TOKEN is unset; 409 if a sync is already + in flight — a run takes 30–60s of sequential ClickUp calls and + overlapping runs would double-write. +

+
+ + + This page drifted badly once already (issue #94): it documented the + registry and submissions endpoints while missing the site assistant, the + similarity preview, and the sync trigger entirely. If you add a route + under app/api/, add it here in the same PR. +
); } diff --git a/app/docs/architecture/page.tsx b/app/docs/architecture/page.tsx index 77e1edf..5d1ab2a 100644 --- a/app/docs/architecture/page.tsx +++ b/app/docs/architecture/page.tsx @@ -19,35 +19,50 @@ export default function ArchitectureDocsPage() {

Component Diagram

{`
-┌─────────────────────────────────────────────────────────────┐
-│                        Browser                              │
-│  ┌──────────────┐  ┌──────────────┐  ┌──────────────────┐  │
-│  │ Builder Guide │  │ Admin Pages  │  │ AI Chat Panel    │  │
-│  │ (Wizard)      │  │ (Dashboard)  │  │ (MindRouter)     │  │
-│  └──────┬───────┘  └──────┬───────┘  └────────┬─────────┘  │
-└─────────┼──────────────────┼──────────────────┼─────────────┘
-          │                  │                  │
-          ▼                  ▼                  ▼
-┌─────────────────────────────────────────────────────────────┐
-│                   Next.js API Routes                        │
-│  /api/submissions  /api/registry  /api/ai/analyze-idea      │
-│  /api/.../notes    /api/.../similarity  /api/ai/refine      │
-│  /api/.../promote                                           │
-└────────────┬───────────────────────────────┬────────────────┘
-             │                               │
-             ▼                               ▼
-┌────────────────────────┐    ┌──────────────────────────────┐
-│     PostgreSQL 16      │    │   MindRouter (On-Prem LLM)   │
-│  ┌──────────────────┐  │    │  OpenAI-compatible API        │
-│  │ submissions      │  │    │  qwen3.6-27b model            │
-│  │ submission_details│  │    │  https://mindrouter.uidaho.edu│
-│  │ submission_notes  │  │    └──────────────────────────────┘
-│  │ applications     │  │
-│  │ similarity_matches│  │
-│  └──────────────────┘  │
-└────────────────────────┘
+┌──────────────────────────────────────────────────────────────────┐
+│                            Browser                               │
+│ ┌───────────┐ ┌──────────┐ ┌───────────┐ ┌──────┐ ┌───────────┐ │
+│ │ Portfolio │ │ Builder  │ │ Site      │ │Admin │ │ Internal  │ │
+│ │ + Pipeline│ │ Guide    │ │ Assistant │ │Pages │ │ (ops only)│ │
+│ └─────┬─────┘ └────┬─────┘ └─────┬─────┘ └──┬───┘ └─────┬─────┘ │
+└───────┼────────────┼─────────────┼──────────┼───────────┼────────┘
+        │            │             │          │           │
+        ▼            ▼             ▼          ▼           ▼
+┌──────────────────────────────────────────────────────────────────┐
+│                       Next.js (App Router)                       │
+│  Server components read lib/* directly — most pages make no API  │
+│  call at all. Route handlers exist for mutations and the agent:  │
+│                                                                  │
+│  /api/submissions  /api/registry   /api/ai/analyze-idea          │
+│  /api/.../notes    /api/.../promote  /api/ai/refine              │
+│  /api/.../similarity  /api/similarity/preview                    │
+│  /api/ask (agent loop)         /internal/sync (ClickUp trigger)  │
+└───┬────────────────────┬───────────────────┬─────────────────────┘
+    │                    │                   │
+    ▼                    ▼                   ▼
+┌─────────────────┐ ┌──────────────────┐ ┌──────────────────────┐
+│  PostgreSQL 16  │ │ MindRouter (LLM) │ │  External / vendored │
+│ submissions     │ │ OpenAI-compatible│ │ ClickUp  (pull-only) │
+│ submission_*    │ │ qwen3.6-27b      │ │ GitHub Issues        │
+│ applications    │ │ mindrouter       │ │ vendor/data-         │
+│ blockers        │ │   .uidaho.edu    │ │   governance (submod)│
+│ similarity_*    │ └──────────────────┘ │ vendor/strategic-plan│
+│ clickup_*       │                      └──────────────────────┘
+│ tech_request*   │      Typed TS modules (lib/*) are the source
+│ roi_claims      │      of truth for taxonomies and narrative —
+│ agent_queries   │      generated catalogs come from the
+│ schema_migrations│     submodules at build time.
+└─────────────────┘
       `}
+ + Most of this site never touches its own API. Pages are server + components that import lib/* and query Postgres directly. + The route handlers above exist for mutations (the wizard, the admin + surfaces), for the agent loop, and for the sync trigger — not as a + data-access layer for the UI. + +

Database Schema

submissions

@@ -93,8 +108,6 @@ department TEXT github_repo TEXT -- e.g. "ui-insight/my-app" url TEXT -- Production URL tier INTEGER -- 1-4 -status TEXT -- idea | approved | in-development | - -- staging | production | retired proposed_deployment_environment TEXT -- OIT-hosted/Azure/OCI/on-prem, IIDS, -- external, not-applicable, or TBD @@ -113,8 +126,52 @@ output_types TEXT[] submission_id UUID FK → submissions -- Provenance link created_at TIMESTAMPTZ updated_at TIMESTAMPTZ -- Auto-updated via trigger + +-- Portfolio identity (Migration 005). lib/portfolio.ts is the typed +-- shadow and seed source; lib/work.ts is the runtime read path. +slug TEXT -- Stable public identifier +tagline TEXT +home_units TEXT[] -- Whose work depends on this +operational_owners JSONB -- [{name, title}] — rendered publicly +build_participants TEXT[] -- Who actually built it +visibility_tier TEXT -- public | embargoed | internal +clickup_task_id TEXT -- Reverse pointer (ADR 0004) + +-- Lifecycle taxonomy (Migration 007, ADR 0001). No CHECK constraint — +-- the typed union in lib/portfolio.ts is the source of truth, and +-- npm run verify:portfolio enforces the per-status evidence rules. +status TEXT -- 12 values: idea | scoping | approved | + -- building | prototype | piloting | + -- production | maintained | paused | + -- sunsetting | archived | tracked +iids_sponsor TEXT +feature_complete BOOLEAN +live_url_is_staging BOOLEAN +pilot_cohort JSONB -- {size, scope, namedUsers[]} +production_scope TEXT -- home-unit | institution-wide | external +support_contact TEXT +sunset_date DATE +replaced_by TEXT +tracking_only BOOLEAN + +-- Strategic-plan alignment (Migration 008, ADR 0002) +strategic_plan_alignment TEXT[] -- Priority codes, e.g. {A.1, D.3} + +-- ClickUp-synced narrative (Migration 011, ADR 0004) +status_summary TEXT +status_summary_at TIMESTAMPTZ +status_summary_source TEXT `} + + status, visibility_tier, and the alignment + codes are all validated by typed TypeScript modules and by{" "} + npm run verify:portfolio in CI, not by the database. That + is deliberate — adding a lifecycle state should be a code change with a + governance record (an ADR amendment plus a vocabulary registration), + not a migration. See ADR 0001. + +

similarity_matches

Pre-computed overlap scores between submissions and registry applications.

{`
@@ -137,6 +194,93 @@ content          TEXT
 created_at       TIMESTAMPTZ
       `}
+

blockers

+

+ The friction ledger — what is stalling a project, and who is named. One + row per active blocker, categorised against the 14-category taxonomy in{" "} + lib/work.ts. +

+
{`
+id               UUID PRIMARY KEY
+application_id   UUID FK → applications ON DELETE CASCADE
+category         TEXT           -- oit-review | unit-engagement |
+                                -- legal-embargo | funding | ...14 total
+named_party      TEXT           -- e.g. 'OIT', 'Unit X'
+since            DATE           -- Drives the public day counter
+public_text      TEXT           -- Safe for /portfolio
+internal_text    TEXT           -- No surface reads this as of 2026-07-27
+severity         TEXT           -- low | medium | high
+resolved_at      DATE
+      `}
+ +

clickup_projects · clickup_status_updates · clickup_requests · clickup_sync_runs

+

+ Projection tables for the read-only ClickUp ingestion (ADR 0004, + Migrations 010–011). These carry no foreign keys to{" "} + applications — the seed script truncates that table with + CASCADE, which would silently wipe synced data. Synced rows key on + ClickUp ids and join to portfolio slugs at read time via{" "} + lib/clickup-map.ts, so seed and sync are order-independent + and each is individually idempotent. +

+

+ clickup_sync_runs records freshness so a surface can say + how stale it is rather than implying it is live. +

+ +

tech_requests + tech_request_events, tech_request_links, tech_request_project_links, roi_claims

+

+ The Unified Technology Request registry (ADR 0005 Phase 1, Migration + 018). One tech_requests row per request regardless of + origin (tdx | clickup |{" "} + site-submission | direct), with an append-only + event trail, a request↔request and request↔project link graph, and an + ROI claims ledger. Backs /portfolio/pipeline, the single + all-origin request queue. +

+

+ Project links use application_slug as a soft key rather + than a foreign key, for the same re-seed reason as the ClickUp tables. +

+ +

agent_queries

+

+ Observability for the site assistant (ADR 0007, Migration 009). Every{" "} + POST /api/ask is recorded — message, response, tools + called, citation count, iterations, truncation, latency, outcome, HTTP + status, model. Reviewable at /internal/agent-log. +

+
{`
+id               BIGSERIAL PRIMARY KEY
+created_at       TIMESTAMPTZ
+ip_hash          TEXT           -- SHA-256 of ':'.
+                                -- Never the raw IP — no PII at rest.
+audience         TEXT           -- CHECK (public | internal)
+message          TEXT
+response         TEXT           -- Null if the request errored early
+tool_calls       TEXT[]         -- Names, in call order
+citation_count   INTEGER
+iterations       INTEGER
+truncated        BOOLEAN
+latency_ms       INTEGER
+outcome          TEXT           -- ok | mindrouter_error | tool_error |
+                                -- rate_limited | bad_request |
+                                -- unconfigured | internal_error
+http_status      INTEGER
+model            TEXT
+error_message    TEXT
+      `}
+ +

schema_migrations

+

+ Applied-migration ledger written by scripts/migrate.ts, + which is the only thing that applies migrations. Piping a{" "} + .sql file straight into psql changes the + schema without recording it here, and the runner will later try to + apply it again and fail — individual migration files are not reliably + idempotent. Idempotency lives in the runner. +

+

Indexes

Array columns on the applications table use GIN indexes @@ -199,31 +343,66 @@ auth_level 5% Exact match

  • Admin redirected to the new registry entry
  • +

    Assistant Flow

    +
      +
    1. User asks a question in the floating chat widget
    2. +
    3. Client POSTs to /api/ask; rate limit checked per IP hash
    4. +
    5. + The agent loop (lib/agent/loop.ts) calls MindRouter with + the message plus 25 read-only tool definitions +
    6. +
    7. + Tools execute against site data and return a payload plus a{" "} + canonicalUrl; the loop accumulates those as citations +
    8. +
    9. + The model composes an answer, or refuses if no tool returned relevant + data — see ADR 0007's strict-citation policy +
    10. +
    11. The turn is logged to agent_queries
    12. +
    +

    Project Structure

    +

    + Abbreviated — see CLAUDE.md for the annotated tree, which + is kept current as the normative reference. +

    {`
     app/
    -  layout.tsx              # Root layout with Sidebar
    -  page.tsx                # Landing — four-card steering page
    +  layout.tsx              # Root layout: Sidebar + site-assistant widget
    +  page.tsx                # Landing — three-lane steering page
       portfolio/              # Projects inventory
    +    pipeline/             # Unified all-origin request queue (ADR 0005)
       builder-guide/          # Submit-a-Project assessment
    +  intake/[token]/         # Submitter-visible status page
    +  coordination/           # PROCESS surfaces (ADR 0006)
    +  standards/              # REFERENCE surfaces
    +    data-model/           # Data Governance Explorer
    +    strategic-plan/       # Strategic Plan Alignment Explorer + map
       reports/                # Reports surface
    -  standards/              # Standards ledger
    -  ai4ra-ecosystem/        # AI4RA partnership reference
    -  admin/
    -    submissions/          # Submission list + detail
    -    registry/             # App registry list + detail + new
    -  api/
    -    submissions/          # CRUD + notes + similarity + promote
    -    registry/             # CRUD
    -    ai/                   # analyze-idea + refine (MindRouter)
    +  about/, ai4ra-ecosystem/
    +  internal/               # Ops only — sync trigger, agent log
    +  admin/                  # Submissions + registry admin
    +  api/                    # See the API Reference page
       docs/                   # Documentation pages (you are here)
     components/
       Sidebar.tsx             # Navigation sidebar
    +  SectionSubNav.tsx       # Shared sub-nav for Standards + Coordination
       PortfolioCard.tsx       # Project card
    +  PortfolioFilters.tsx    # Two-tier stage / status filter
    +  ProjectDetail.tsx       # Project detail composition
    +  ChatWidget.tsx          # Site assistant (ADR 0007)
       IssueCard.tsx           # GitHub issue card
       DocPage.tsx             # Documentation layout components
     lib/
    -  portfolio.ts            # Projects inventory (typed)
    +  portfolio.ts            # Projects inventory + lifecycle (typed)
    +  work.ts                 # Postgres read path for /portfolio
    +  utr.ts, requests.ts     # Request registry (ADR 0005)
    +  clickup*.ts             # ClickUp ingestion (ADR 0004)
    +  agent/                  # Site assistant — tools, loop, logging
    +  governance/             # UDM catalog modules (generated + curated)
    +  strategic-plan/         # Pillars + priorities (generated + curated)
    +  surveys/                # Operational Excellence survey
       standards-watch.ts      # Standards ledger entries
       builder-guide-data.ts   # Quiz steps, scoring, tiers
       similarity.ts           # Similarity detection engine
    diff --git a/db/seed_applications.sql b/db/seed_applications.sql
    deleted file mode 100644
    index 838ea5d..0000000
    --- a/db/seed_applications.sql
    +++ /dev/null
    @@ -1,594 +0,0 @@
    --- Seed: Populate application registry with current portfolio
    --- Run with: psql "$DATABASE_URL" -f db/seed_applications.sql
    -
    -BEGIN;
    -
    --- Clear existing applications (idempotent re-seed)
    -DELETE FROM similarity_matches;
    -DELETE FROM applications;
    -
    --- ═══════════════════════════════════════════════════════════════
    --- PRODUCTION APPLICATIONS
    --- ═══════════════════════════════════════════════════════════════
    -
    -INSERT INTO applications (name, description, owner_name, owner_email, department, url, tier, status, sensitivity, complexity, userbase, auth_level, integrations, data_sources, university_systems, output_types)
    -VALUES (
    -  'OpenERA',
    -  'Open-source electronic research administration system. Flagship pre-award proposal management platform with 9-step wizard, IACUC/IRB/IBC protocol workflows, NSF budget builder, Excel import/export, RFA AI extraction, compliance tracking, and multi-level approval workflow.',
    -  'Barrie Robison',
    -  NULL,
    -  'Office of Research and Economic Development',
    -  'https://openera.insight.uidaho.edu',
    -  1,
    -  'production',
    -  ARRAY['internal', 'sensitive'],
    -  'high',
    -  'campus-wide',
    -  'role-based',
    -  ARRAY['Banner', 'NSF', 'Claude API'],
    -  ARRAY['PostgreSQL', 'Excel imports'],
    -  ARRAY['Banner', 'VERAS'],
    -  ARRAY['proposals', 'budgets', 'compliance reports', 'Excel exports']
    -);
    -
    -INSERT INTO applications (name, description, owner_name, owner_email, department, url, tier, status, sensitivity, complexity, userbase, auth_level, integrations, data_sources, university_systems, output_types)
    -VALUES (
    -  'VERASUnlimited',
    -  'Open-source pre-award proposal management system for research administration, developed as part of the NSF GRANTED project. Features 9-step proposal wizard, NSF budget builder, F&A Sankey diagram, RFA AI extraction, compliance tracking, approval workflow, 27 document types, and personnel review matrix.',
    -  'Barrie Robison',
    -  NULL,
    -  'Office of Research and Economic Development',
    -  NULL,
    -  1,
    -  'production',
    -  ARRAY['internal', 'sensitive'],
    -  'high',
    -  'multi-institution',
    -  'role-based',
    -  ARRAY['NSF', 'Claude API'],
    -  ARRAY['PostgreSQL'],
    -  ARRAY[]::TEXT[],
    -  ARRAY['proposals', 'budgets', 'compliance reports']
    -);
    -
    -INSERT INTO applications (name, description, owner_name, owner_email, department, url, tier, status, sensitivity, complexity, userbase, auth_level, integrations, data_sources, university_systems, output_types)
    -VALUES (
    -  'The Daily Register (UCMDailyRegister-App)',
    -  'AI-assisted newsletter production pipeline for UCM team. Produces The Daily Register and My UI newsletters with style rule injection into LLM prompts, newsletter editing pipeline, and structured JSON response generation.',
    -  'Barrie Robison',
    -  NULL,
    -  'University Communications and Marketing',
    -  'https://ucmnews.insight.uidaho.edu',
    -  2,
    -  'production',
    -  ARRAY['internal'],
    -  'medium',
    -  'department',
    -  'role-based',
    -  ARRAY['Claude API', 'OpenAI API'],
    -  ARRAY['PostgreSQL', 'news feeds'],
    -  ARRAY[]::TEXT[],
    -  ARRAY['newsletters', 'HTML content']
    -);
    -
    -INSERT INTO applications (name, description, owner_name, owner_email, department, url, tier, status, sensitivity, complexity, userbase, auth_level, integrations, data_sources, university_systems, output_types)
    -VALUES (
    -  'GPSA Graduate Symposium',
    -  'Judge scoring system for GPSA Graduate Student Symposium. Supports poster and art presentation scoring with judge scoring interface, auto-tallying, admin dashboard for ranked results, and dual-auth (admin + 6-char judge codes).',
    -  'Barrie Robison',
    -  NULL,
    -  'Graduate and Professional Student Association',
    -  NULL,
    -  3,
    -  'production',
    -  ARRAY['internal'],
    -  'low',
    -  'event-specific',
    -  'code-based',
    -  ARRAY[]::TEXT[],
    -  ARRAY['SQLite'],
    -  ARRAY[]::TEXT[],
    -  ARRAY['scores', 'rankings']
    -);
    -
    -INSERT INTO applications (name, description, owner_name, owner_email, department, url, tier, status, sensitivity, complexity, userbase, auth_level, integrations, data_sources, university_systems, output_types)
    -VALUES (
    -  'AISPEG',
    -  'Interactive collaborative hub for the AI Strategic Planning & Evaluation Group at University of Idaho. Dashboard with metrics, strategic principles, lessons learned, agent playbook, projects table, knowledge base, roadmap, and application registry.',
    -  'Barrie Robison',
    -  NULL,
    -  'Office of Research and Economic Development',
    -  'https://aispeg.insight.uidaho.edu',
    -  2,
    -  'production',
    -  ARRAY['public'],
    -  'medium',
    -  'campus-wide',
    -  'none',
    -  ARRAY['Claude API'],
    -  ARRAY['PostgreSQL'],
    -  ARRAY[]::TEXT[],
    -  ARRAY['dashboards', 'reports']
    -);
    -
    -INSERT INTO applications (name, description, owner_name, owner_email, department, url, tier, status, sensitivity, complexity, userbase, auth_level, integrations, data_sources, university_systems, output_types)
    -VALUES (
    -  'ProcessMapping',
    -  'Full-stack process intelligence application for mapping Research Administration processes. Produces structured process maps and Vandalizer-compatible workflows with interactive process exploration and transcript ingestion.',
    -  'Barrie Robison',
    -  NULL,
    -  'Office of Research and Economic Development',
    -  'https://processmapping.insight.uidaho.edu',
    -  2,
    -  'production',
    -  ARRAY['internal'],
    -  'medium',
    -  'department',
    -  'none',
    -  ARRAY['Claude API'],
    -  ARRAY['JSON files'],
    -  ARRAY[]::TEXT[],
    -  ARRAY['process maps', 'workflow definitions']
    -);
    -
    -INSERT INTO applications (name, description, owner_name, owner_email, department, url, tier, status, sensitivity, complexity, userbase, auth_level, integrations, data_sources, university_systems, output_types)
    -VALUES (
    -  'VMDashboard',
    -  'Monitoring dashboard for Docker-deployed projects on openera.insight.uidaho.edu. Monitors health status and logs for all Insight applications via internal Docker collector for socket access.',
    -  'Barrie Robison',
    -  NULL,
    -  'Office of Research and Economic Development',
    -  NULL,
    -  2,
    -  'production',
    -  ARRAY['internal'],
    -  'medium',
    -  'admin-only',
    -  'none',
    -  ARRAY['Docker API'],
    -  ARRAY[]::TEXT[],
    -  ARRAY[]::TEXT[],
    -  ARRAY['dashboards', 'logs']
    -);
    -
    -INSERT INTO applications (name, description, owner_name, owner_email, department, url, tier, status, sensitivity, complexity, userbase, auth_level, integrations, data_sources, university_systems, output_types)
    -VALUES (
    -  'InvoiceReconciler',
    -  'Open-source invoice reconciliation tool for matching invoices to transaction reports. 3-step wizard with smart column detection, two-pass matching algorithm (exact + fuzzy), configurable tolerances, and Excel/CSV export.',
    -  'Barrie Robison',
    -  NULL,
    -  'Office of Research and Economic Development',
    -  NULL,
    -  3,
    -  'production',
    -  ARRAY['internal', 'sensitive'],
    -  'medium',
    -  'department',
    -  'none',
    -  ARRAY[]::TEXT[],
    -  ARRAY['CSV', 'Excel', 'PDF'],
    -  ARRAY[]::TEXT[],
    -  ARRAY['reconciliation reports', 'Excel exports']
    -);
    -
    -INSERT INTO applications (name, description, owner_name, owner_email, department, url, tier, status, sensitivity, complexity, userbase, auth_level, integrations, data_sources, university_systems, output_types)
    -VALUES (
    -  'RFD CAREER Club Dashboard',
    -  'Cohort progress tracking dashboard for RFD CAREER Club using workbook data. Features cohort dashboard, participant tracking, admin session model, workbook import/reload, and shared editing.',
    -  'Barrie Robison',
    -  NULL,
    -  'Office of Research and Economic Development',
    -  NULL,
    -  3,
    -  'production',
    -  ARRAY['internal'],
    -  'low',
    -  'program-specific',
    -  'role-based',
    -  ARRAY[]::TEXT[],
    -  ARRAY['Excel workbooks'],
    -  ARRAY[]::TEXT[],
    -  ARRAY['dashboards', 'progress reports']
    -);
    -
    --- ═══════════════════════════════════════════════════════════════
    --- IN-DEVELOPMENT APPLICATIONS
    --- ═══════════════════════════════════════════════════════════════
    -
    -INSERT INTO applications (name, description, owner_name, owner_email, department, url, tier, status, sensitivity, complexity, userbase, auth_level, integrations, data_sources, university_systems, output_types)
    -VALUES (
    -  'AuditDashboard',
    -  'Track audit observations from SBOE internal audit reports, monitor corrective actions, and manage responsible party assignments. Features PDF upload with AI extraction pipeline (OCR + LLM) and human review interface.',
    -  'Barrie Robison',
    -  NULL,
    -  'Office of Research and Economic Development',
    -  NULL,
    -  2,
    -  'in-development',
    -  ARRAY['internal', 'sensitive'],
    -  'high',
    -  'admin-only',
    -  'role-based',
    -  ARRAY['Claude API'],
    -  ARRAY['PostgreSQL', 'PDF uploads'],
    -  ARRAY['SBOE audit system'],
    -  ARRAY['dashboards', 'corrective action reports']
    -);
    -
    -INSERT INTO applications (name, description, owner_name, owner_email, department, url, tier, status, sensitivity, complexity, userbase, auth_level, integrations, data_sources, university_systems, output_types)
    -VALUES (
    -  'ExecOrd (EO Compliance Tracker)',
    -  'Web application for tracking Executive Order compliance across deployed applications. Integrated with shared PostgreSQL infrastructure.',
    -  'Barrie Robison',
    -  NULL,
    -  'Office of Research and Economic Development',
    -  NULL,
    -  2,
    -  'in-development',
    -  ARRAY['internal'],
    -  'medium',
    -  'admin-only',
    -  'role-based',
    -  ARRAY[]::TEXT[],
    -  ARRAY['PostgreSQL'],
    -  ARRAY[]::TEXT[],
    -  ARRAY['compliance reports', 'dashboards']
    -);
    -
    -INSERT INTO applications (name, description, owner_name, owner_email, department, url, tier, status, sensitivity, complexity, userbase, auth_level, integrations, data_sources, university_systems, output_types)
    -VALUES (
    -  'INfamis (FAMIS Replacement)',
    -  'Modern replacement for legacy FAMIS system. Facilities management and asset tracking application built on the standard template scaffold.',
    -  'Barrie Robison',
    -  NULL,
    -  'Facilities Management',
    -  NULL,
    -  2,
    -  'in-development',
    -  ARRAY['internal'],
    -  'medium',
    -  'department',
    -  'role-based',
    -  ARRAY[]::TEXT[],
    -  ARRAY['PostgreSQL'],
    -  ARRAY['FAMIS (legacy)'],
    -  ARRAY['asset reports', 'work orders']
    -);
    -
    -INSERT INTO applications (name, description, owner_name, owner_email, department, url, tier, status, sensitivity, complexity, userbase, auth_level, integrations, data_sources, university_systems, output_types)
    -VALUES (
    -  'Bank Reconciliation',
    -  'Bank statement and ledger upload/reconciliation workflow. Features column mapping, fuzzy transaction matching, configurable tolerances, and Excel/CSV export.',
    -  'Barrie Robison',
    -  NULL,
    -  'Office of Research and Economic Development',
    -  NULL,
    -  3,
    -  'in-development',
    -  ARRAY['internal', 'sensitive'],
    -  'medium',
    -  'department',
    -  'none',
    -  ARRAY[]::TEXT[],
    -  ARRAY['CSV', 'Excel', 'bank statements'],
    -  ARRAY[]::TEXT[],
    -  ARRAY['reconciliation reports', 'Excel exports']
    -);
    -
    -INSERT INTO applications (name, description, owner_name, owner_email, department, url, tier, status, sensitivity, complexity, userbase, auth_level, integrations, data_sources, university_systems, output_types)
    -VALUES (
    -  'NCBA Interviews Dashboard',
    -  'Interactive dashboard for analyzing 126+ semi-structured stakeholder interviews for the National Cattlemen''s Beef Association. Features interview data model, thematic analysis support, and 3-era historical framing (Pioneer/Transition/Future).',
    -  'Barrie Robison',
    -  NULL,
    -  'College of Agricultural and Life Sciences',
    -  NULL,
    -  3,
    -  'in-development',
    -  ARRAY['internal'],
    -  'medium',
    -  'research-team',
    -  'role-based',
    -  ARRAY[]::TEXT[],
    -  ARRAY['SQLite', 'interview transcripts'],
    -  ARRAY[]::TEXT[],
    -  ARRAY['dashboards', 'thematic analysis']
    -);
    -
    -INSERT INTO applications (name, description, owner_name, owner_email, department, url, tier, status, sensitivity, complexity, userbase, auth_level, integrations, data_sources, university_systems, output_types)
    -VALUES (
    -  'SEM Experiential Learning',
    -  'Strategic experiential learning application built on the standard template scaffold.',
    -  'Barrie Robison',
    -  NULL,
    -  'Strategic Enrollment Management',
    -  NULL,
    -  3,
    -  'in-development',
    -  ARRAY['internal'],
    -  'low',
    -  'department',
    -  'role-based',
    -  ARRAY[]::TEXT[],
    -  ARRAY['PostgreSQL'],
    -  ARRAY[]::TEXT[],
    -  ARRAY['dashboards']
    -);
    -
    --- ═══════════════════════════════════════════════════════════════
    --- PLANNING / IDEA STAGE
    --- ═══════════════════════════════════════════════════════════════
    -
    -INSERT INTO applications (name, description, owner_name, owner_email, department, url, tier, status, sensitivity, complexity, userbase, auth_level, integrations, data_sources, university_systems, output_types)
    -VALUES (
    -  'ERAMigration',
    -  'Migration planning from legacy VERAS/Banner system to OpenERA using the Unified Data Model. Field mappings, UDM schema inventory, gap analysis, ETL planning, and validation scripts.',
    -  'Barrie Robison',
    -  NULL,
    -  'Office of Research and Economic Development',
    -  NULL,
    -  1,
    -  'idea',
    -  ARRAY['internal', 'sensitive'],
    -  'high',
    -  'campus-wide',
    -  'none',
    -  ARRAY['Banner', 'VERAS'],
    -  ARRAY['Banner exports', 'VERAS data'],
    -  ARRAY['Banner', 'VERAS'],
    -  ARRAY['migration scripts', 'validation reports']
    -);
    -
    -INSERT INTO applications (name, description, owner_name, owner_email, department, url, tier, status, sensitivity, complexity, userbase, auth_level, integrations, data_sources, university_systems, output_types)
    -VALUES (
    -  'LakehouseIntegration',
    -  'Data lakehouse modernization project for aligning institutional data architecture. Status tracking, Huron alignment analysis, and consortium strategic rationale.',
    -  'Barrie Robison',
    -  NULL,
    -  'Office of Research and Economic Development',
    -  NULL,
    -  2,
    -  'idea',
    -  ARRAY['internal'],
    -  'high',
    -  'campus-wide',
    -  'none',
    -  ARRAY['Huron'],
    -  ARRAY[]::TEXT[],
    -  ARRAY[]::TEXT[],
    -  ARRAY['strategic plans', 'alignment reports']
    -);
    -
    --- ═══════════════════════════════════════════════════════════════
    --- INFRASTRUCTURE / SUPPORTING SERVICES
    --- ═══════════════════════════════════════════════════════════════
    -
    -INSERT INTO applications (name, description, owner_name, owner_email, department, url, tier, status, sensitivity, complexity, userbase, auth_level, integrations, data_sources, university_systems, output_types)
    -VALUES (
    -  'insight-db (Shared PostgreSQL)',
    -  'Single PostgreSQL 16 container shared across all UI Insight applications. Pre-configured databases for OpenERA, UCM, Audit Dashboard, ProcessMapping, ExecOrd. Uses 10.x.x.x subnet with idempotent bootstrap SQL.',
    -  'Barrie Robison',
    -  NULL,
    -  'Office of Research and Economic Development',
    -  NULL,
    -  1,
    -  'production',
    -  ARRAY['internal', 'sensitive'],
    -  'medium',
    -  'infrastructure',
    -  'none',
    -  ARRAY['Docker'],
    -  ARRAY['PostgreSQL'],
    -  ARRAY[]::TEXT[],
    -  ARRAY['database services']
    -);
    -
    -INSERT INTO applications (name, description, owner_name, owner_email, department, url, tier, status, sensitivity, complexity, userbase, auth_level, integrations, data_sources, university_systems, output_types)
    -VALUES (
    -  'Data Governance Repository',
    -  'Institutional data governance documentation repository. Catalogs applications, defines naming conventions (UDM), AllowedValues pattern, and governance drift checks using MkDocs Material and Python validation scripts.',
    -  'Barrie Robison',
    -  NULL,
    -  'Office of Research and Economic Development',
    -  NULL,
    -  2,
    -  'production',
    -  ARRAY['public'],
    -  'low',
    -  'campus-wide',
    -  'none',
    -  ARRAY[]::TEXT[],
    -  ARRAY[]::TEXT[],
    -  ARRAY[]::TEXT[],
    -  ARRAY['documentation', 'validation reports']
    -);
    -
    -INSERT INTO applications (name, description, owner_name, owner_email, department, url, tier, status, sensitivity, complexity, userbase, auth_level, integrations, data_sources, university_systems, output_types)
    -VALUES (
    -  'TEMPLATE-app',
    -  'Production-ready reference template for university business applications. Complete documentation standards, CLAUDE.md guidance, security frameworks, and CI/CD setup. Used as scaffold for multiple projects.',
    -  'Barrie Robison',
    -  NULL,
    -  'Office of Research and Economic Development',
    -  NULL,
    -  3,
    -  'production',
    -  ARRAY['public'],
    -  'low',
    -  'developers',
    -  'none',
    -  ARRAY[]::TEXT[],
    -  ARRAY[]::TEXT[],
    -  ARRAY[]::TEXT[],
    -  ARRAY['project scaffolds']
    -);
    -
    --- ═══════════════════════════════════════════════════════════════
    --- RESEARCH / ANALYSIS TOOLS
    --- ═══════════════════════════════════════════════════════════════
    -
    -INSERT INTO applications (name, description, owner_name, owner_email, department, url, tier, status, sensitivity, complexity, userbase, auth_level, integrations, data_sources, university_systems, output_types)
    -VALUES (
    -  'RAGBot Evaluation Tool',
    -  'RAG (Retrieval Augmented Generation) evaluation tool for testing and benchmarking RAG architectures.',
    -  'Barrie Robison',
    -  NULL,
    -  'Office of Research and Economic Development',
    -  NULL,
    -  4,
    -  'in-development',
    -  ARRAY['internal'],
    -  'medium',
    -  'research-team',
    -  'none',
    -  ARRAY['Claude API'],
    -  ARRAY[]::TEXT[],
    -  ARRAY[]::TEXT[],
    -  ARRAY['evaluation reports']
    -);
    -
    -INSERT INTO applications (name, description, owner_name, owner_email, department, url, tier, status, sensitivity, complexity, userbase, auth_level, integrations, data_sources, university_systems, output_types)
    -VALUES (
    -  'AI4RA Open Source Site',
    -  'AI for Research Administration open-source initiative website and materials.',
    -  'Barrie Robison',
    -  NULL,
    -  'Office of Research and Economic Development',
    -  NULL,
    -  3,
    -  'in-development',
    -  ARRAY['public'],
    -  'low',
    -  'multi-institution',
    -  'none',
    -  ARRAY[]::TEXT[],
    -  ARRAY[]::TEXT[],
    -  ARRAY[]::TEXT[],
    -  ARRAY['website', 'documentation']
    -);
    -
    -INSERT INTO applications (name, description, owner_name, owner_email, department, url, tier, status, sensitivity, complexity, userbase, auth_level, integrations, data_sources, university_systems, output_types)
    -VALUES (
    -  'GBRC Website',
    -  'Georgia Beef Research Consortium website and supporting checkbox application.',
    -  'Barrie Robison',
    -  NULL,
    -  'College of Agricultural and Life Sciences',
    -  NULL,
    -  4,
    -  'in-development',
    -  ARRAY['public'],
    -  'low',
    -  'external',
    -  'none',
    -  ARRAY[]::TEXT[],
    -  ARRAY[]::TEXT[],
    -  ARRAY[]::TEXT[],
    -  ARRAY['website']
    -);
    -
    -INSERT INTO applications (name, description, owner_name, owner_email, department, url, tier, status, sensitivity, complexity, userbase, auth_level, integrations, data_sources, university_systems, output_types)
    -VALUES (
    -  'SyntheticPersonas',
    -  'Synthetic persona generation tool for testing, demos, and user research simulations.',
    -  'Barrie Robison',
    -  NULL,
    -  'Office of Research and Economic Development',
    -  NULL,
    -  4,
    -  'idea',
    -  ARRAY['internal'],
    -  'low',
    -  'research-team',
    -  'none',
    -  ARRAY['Claude API'],
    -  ARRAY[]::TEXT[],
    -  ARRAY[]::TEXT[],
    -  ARRAY['persona profiles']
    -);
    -
    --- ═══════════════════════════════════════════════════════════════
    --- DOCUMENT / DATA PROJECTS (non-app, but tracked)
    --- ═══════════════════════════════════════════════════════════════
    -
    -INSERT INTO applications (name, description, owner_name, owner_email, department, url, tier, status, sensitivity, complexity, userbase, auth_level, integrations, data_sources, university_systems, output_types)
    -VALUES (
    -  'ReconcileMJ (Manual Journal Workbench)',
    -  'Manual journal entry reconciliation workbench with HTML interface for matching and reviewing journal entries.',
    -  'Barrie Robison',
    -  NULL,
    -  'Office of Research and Economic Development',
    -  NULL,
    -  4,
    -  'production',
    -  ARRAY['internal', 'sensitive'],
    -  'low',
    -  'department',
    -  'none',
    -  ARRAY[]::TEXT[],
    -  ARRAY['spreadsheets'],
    -  ARRAY[]::TEXT[],
    -  ARRAY['reconciliation reports']
    -);
    -
    -INSERT INTO applications (name, description, owner_name, owner_email, department, url, tier, status, sensitivity, complexity, userbase, auth_level, integrations, data_sources, university_systems, output_types)
    -VALUES (
    -  'EIS Data Fetcher',
    -  'Python script for fetching Idaho EIS (Education Information System) data.',
    -  'Barrie Robison',
    -  NULL,
    -  'Office of Research and Economic Development',
    -  NULL,
    -  4,
    -  'production',
    -  ARRAY['internal'],
    -  'low',
    -  'admin-only',
    -  'none',
    -  ARRAY['Idaho EIS'],
    -  ARRAY['EIS API'],
    -  ARRAY[]::TEXT[],
    -  ARRAY['data exports']
    -);
    -
    -INSERT INTO applications (name, description, owner_name, owner_email, department, url, tier, status, sensitivity, complexity, userbase, auth_level, integrations, data_sources, university_systems, output_types)
    -VALUES (
    -  'COGS Formatting (Dissertation Templates)',
    -  'Dissertation formatting and LaTeX template project for College of Graduate Studies.',
    -  'Barrie Robison',
    -  NULL,
    -  'College of Graduate Studies',
    -  NULL,
    -  4,
    -  'production',
    -  ARRAY['public'],
    -  'low',
    -  'students',
    -  'none',
    -  ARRAY[]::TEXT[],
    -  ARRAY[]::TEXT[],
    -  ARRAY[]::TEXT[],
    -  ARRAY['LaTeX templates', 'formatting guides']
    -);
    -
    -INSERT INTO applications (name, description, owner_name, owner_email, department, url, tier, status, sensitivity, complexity, userbase, auth_level, integrations, data_sources, university_systems, output_types)
    -VALUES (
    -  'REACH Workshop 2026',
    -  'REACH 2026 workshop materials on "AI4RA: The Intersection Between AI and Data". Static HTML with Reveal.js slides, workshop objectives, and learning materials.',
    -  'Barrie Robison',
    -  NULL,
    -  'Office of Research and Economic Development',
    -  NULL,
    -  4,
    -  'production',
    -  ARRAY['public'],
    -  'low',
    -  'multi-institution',
    -  'none',
    -  ARRAY[]::TEXT[],
    -  ARRAY[]::TEXT[],
    -  ARRAY[]::TEXT[],
    -  ARRAY['presentations', 'workshop materials']
    -);
    -
    -COMMIT;