Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ jobs:
persist-credentials: false
- name: Verify the Docs consumer against AI
run: npm run mcp-contract:check -- --source=.canonical-ai/contracts/mcp-live-surface.json
- name: Check out the canonical university registry
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
repository: GapwiseHQ/gapwise
ref: main
path: .canonical-gapwise
sparse-checkout: universities.json
persist-credentials: false
- name: Validate docs content and types
run: npm run check
- name: Verify deployment security headers
Expand Down
2 changes: 1 addition & 1 deletion CAMPUS_DATA_OWNERSHIP.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Campus data ownership

Canonical public campus facts and geometry across all 11 supported Canadian universities (13 campus models) live in `GapwiseHQ/data`. University datasets live under their canonical identifiers (e.g. `universities/carleton`, `universities/queens`, etc.); UTM's reviewed entrance/routing dataset lives under `data/utm`, and UTSG and UTSC identities and geometry live in their respective campus directories.
Canonical public campus facts and geometry across all 13 supported Canadian universities (15 campus models) live in `GapwiseHQ/data`. University datasets live under their canonical identifiers (e.g. `universities/carleton`, `universities/ubc`, and `universities/waterloo`); UTM's reviewed entrance/routing dataset lives under `data/utm`, and UTSG and UTSC identities and geometry live in their respective campus directories.

`gapwise` consumes a validated build-time snapshot and remains authoritative for deterministic routing/gap-planning behavior, the public API/OpenAPI contract, SDK semantics, and product presentation. `docs` documents released contracts; it must not become an independent source of campus facts or product behavior.

Expand Down
8 changes: 4 additions & 4 deletions ECOSYSTEM.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

`docs` is the canonical public documentation surface for the seven-repository Gapwise product ecosystem. It describes released behavior and data owned elsewhere; it must not become an independent source of product semantics or campus facts.

All seven first-party product repositories are owned by the **Gapwise** GitHub organization (`GapwiseHQ`). Organization-wide community/default files live in `.github`. Andrew Muratov remains the creator and primary maintainer.
All first-party product repositories are owned by the **Gapwise** GitHub organization (`GapwiseHQ`). Organization-wide community/default files live in `.github`. Andrew Muratov remains the creator and primary maintainer.

## Owning repositories

Expand All @@ -12,15 +12,15 @@ All seven first-party product repositories are owned by the **Gapwise** GitHub o
| `GapwiseHQ/android` | native Android implementation, Android device integration, persistence adapters, and Android distribution behavior |
| `GapwiseHQ/ios` | native iOS implementation, Apple-platform integration, persistence adapters, and iOS distribution behavior |
| `GapwiseHQ/ai` | OAuth/MCP delegation, tool schemas, permissions, bounded mutations, AI compatibility evidence |
| `GapwiseHQ/data` | **canonical public campus facts and geometry across 11 supported universities (13 campus models)**, entrances, routing graph data, provenance, schemas, evidence, attribution, validation, and reuse |
| `GapwiseHQ/data` | **canonical public campus facts and geometry across 13 supported universities (15 campus models)**, entrances, routing graph data, provenance, schemas, evidence, attribution, validation, and reuse |
| `GapwiseHQ/docs` | released public developer documentation and documentation information architecture |
| `GapwiseHQ/status` | operational health and incident communication |

`gapwise` vendors a validated build-time mirror of `data/utm` from the `data` repository at `src/data/utm`. That local path preserves existing imports and deterministic deployment behavior; it is not a second campus-data authority and does not create a runtime dependency on `data.gapwise.ca` or GitHub.

## Product scope

Gapwise supports 11 Canadian universities across 13 campus models. The first-party public campus API, reviewed building/entrance and pedestrian route graph, places, and production data support multi-university discovery and campus models, with full deterministic routing available for supported institutions including UTM and Carleton. Documentation must preserve specific campus routing coverage instead of implying identical entrance/routing graph depth across all campuses.
Gapwise supports 13 Canadian universities across 15 campus models. The first-party public campus API, reviewed building/entrance and pedestrian route graph, places, and production data support multi-university discovery and campus models. Documentation must preserve specific campus provenance, entrance, and accessibility depth instead of implying identical evidence across all campuses.

## Current developer-platform state

Expand All @@ -43,7 +43,7 @@ TypeScript and Python are equal first-party SDKs. Documentation should provide c
## Documentation rules

1. OpenAPI + core implementation own public HTTP behavior and deterministic calculations.
2. `data` owns raw public campus facts across 11 supported universities, geometry, routing graph data, provenance, and evidence.
2. `data` owns raw public campus facts across 13 supported universities, geometry, routing graph data, provenance, and evidence.
3. SDK docs follow released package/source behavior and never invent methods or types.
4. Registry claims are evidence-based: reserved/configured is not the same as published.
5. Runtime claims are evidence-based: Node/Bun/Deno/browser support should reflect CI/release verification rather than assumptions.
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

This repository is the canonical public developer-documentation surface for **Gapwise**, a free and open-source multi-university timetable and campus-intelligence platform created and engineered by **Andrew Muratov**.

Gapwise currently supports **twelve universities across Canada**:
Gapwise currently supports **13 universities across 15 campus models in Canada**:

1. **University of Toronto** (`gapwise.ca`) — Mississauga, St. George, and Scarborough
2. **Carleton University** (`carleton.gapwise.ca`) — Ottawa campus
Expand All @@ -39,6 +39,7 @@ Gapwise currently supports **twelve universities across Canada**:
10. **University of Ottawa** (`uottawa.gapwise.ca`) — Downtown Ottawa campus
11. **Brock University** (`brock.gapwise.ca`) — St. Catharines campus
12. **University of British Columbia** (`ubc.gapwise.ca`) — Vancouver / Point Grey campus
13. **University of Waterloo** (`waterloo.gapwise.ca`) — Main campus

The documentation describes the multi-university architecture, public campus API, SDKs, data layers, and permissioned AI/MCP integration without presenting Gapwise as a single-institution product.

Expand Down Expand Up @@ -104,7 +105,7 @@ The public API exposes campus intelligence only. It does not expose student time
- `android` consumes those semantics for the native Android experience without creating a second product engine.
- `ios` consumes those semantics for the native iOS experience without creating a second product engine.
- `ai` is authoritative for the live MCP/OAuth tool, permission, delegation, and bounded-mutation behavior.
- `data` owns canonical public University of Toronto campus facts, geometry, provenance, evidence, schemas, and distribution.
- `data` owns canonical public multi-university campus facts, geometry, provenance, evidence, schemas, and distribution.
- `status` owns current operational monitoring and incident-communication state.
- `docs` describes released behavior and preserves uncertainty rather than turning unknown facts into confident claims.
- University-wide timetable support must not be documented as equivalent university-wide campus-routing coverage.
Expand All @@ -121,11 +122,11 @@ The public API exposes campus intelligence only. It does not expose student time
| **[`android`](https://github.com/GapwiseHQ/android)** | Native Kotlin + Jetpack Compose Android client | Android app |
| **[`ios`](https://github.com/GapwiseHQ/ios)** | Native Swift + SwiftUI iOS client | iOS app |
| **[`ai`](https://github.com/GapwiseHQ/ai)** | OAuth/MCP layer for explicitly delegated student context and bounded actions | [ai.gapwise.ca](https://ai.gapwise.ca) |
| **[`data`](https://github.com/GapwiseHQ/data)** | Canonical public University of Toronto campus data, provenance, schemas, validation, and distribution | [data.gapwise.ca](https://data.gapwise.ca) |
| **[`data`](https://github.com/GapwiseHQ/data)** | Canonical public multi-university campus data, provenance, schemas, validation, and distribution | [data.gapwise.ca](https://data.gapwise.ca) |
| **[`docs`](https://github.com/GapwiseHQ/docs)** | Canonical public developer documentation | [docs.gapwise.ca](https://docs.gapwise.ca) |
| **[`status`](https://github.com/GapwiseHQ/status)** | Independent service-health monitoring and incident communication | [status.gapwise.ca](https://status.gapwise.ca) |

These seven first-party product repositories form one ecosystem with deliberate separation of concerns, consistent links, trust boundaries, and source-of-truth ownership. Organization-wide GitHub defaults live separately in [`.github`](https://github.com/GapwiseHQ/.github).
These first-party product repositories form one ecosystem with deliberate separation of concerns, consistent links, trust boundaries, and source-of-truth ownership. Organization-wide GitHub defaults live separately in [`.github`](https://github.com/GapwiseHQ/.github).

---

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
"verify:brand": "node scripts/verify-brand.mjs",
"verify:mcp-contract": "node scripts/verify-mcp-contract.mjs",
"verify:privacy-governance": "node scripts/verify-privacy-governance.mjs",
"verify:universities": "node scripts/verify-university-coverage.mjs",
"audit:deployment-security": "node scripts/audit-deployment-security.mjs",
"seo:generate": "node scripts/generate-seo.mjs",
"build": "npm run verify:brand && npm run verify:mcp-contract && npm run verify:privacy-governance && npm run seo:generate && astro build",
"preview": "astro preview",
"check": "npm run verify:brand && npm run verify:mcp-contract && npm run verify:privacy-governance && npm run seo:generate && astro check",
"check": "npm run verify:brand && npm run verify:mcp-contract && npm run verify:privacy-governance && npm run verify:universities && npm run seo:generate && astro check",
"mcp-contract:sync": "node scripts/sync-mcp-contract.mjs --write",
"mcp-contract:check": "node scripts/sync-mcp-contract.mjs --check"
},
Expand Down
53 changes: 53 additions & 0 deletions scripts/verify-university-coverage.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { readFile } from "node:fs/promises";
import { existsSync } from "node:fs";

const sourceArg = process.argv.find((argument) => argument.startsWith("--source="));
const source =
sourceArg?.slice("--source=".length) ??
(existsSync(".canonical-gapwise/universities.json")
? ".canonical-gapwise/universities.json"
: "../gapwise/universities.json");
const manifest = JSON.parse(await readFile(source, "utf8"));
const universities = manifest.universities.filter((university) => university.status === "supported");
const universityCount = universities.length;
const campusCount = universities.reduce(
(count, university) => count + university.campuses.length,
0,
);

const requiredCountFiles = [
"README.md",
"CAMPUS_DATA_OWNERSHIP.md",
"ECOSYSTEM.md",
"src/content/docs/index.mdx",
"src/content/docs/quickstart.md",
"src/content/docs/api.md",
"src/content/docs/data/index.md",
];

for (const file of requiredCountFiles) {
const content = await readFile(file, "utf8");
if (!content.includes(String(universityCount)) || !content.includes(String(campusCount))) {
throw new Error(
`${file} must reflect the canonical ${universityCount}-university, ${campusCount}-campus registry`,
);
}
}

for (const file of [
"README.md",
"src/content/docs/guides/add-university.md",
"src/content/docs/platform/ecosystem.md",
"src/content/docs/platform/institutional-brief.md",
]) {
const content = await readFile(file, "utf8");
for (const university of universities) {
const canonicalHost = university.hosts[0];
const mustListName = !file.endsWith("platform/ecosystem.md");
if ((mustListName && !content.includes(university.name)) || !content.includes(canonicalHost)) {
throw new Error(`${file} is missing ${university.name} (${canonicalHost})`);
}
}
}

console.log(`Verified docs coverage for ${universityCount} universities and ${campusCount} campuses.`);
2 changes: 1 addition & 1 deletion src/content/docs/ai/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Gapwise AI & MCP
description: Connect AI clients to public campus intelligence across 11 supported universities and explicitly delegated Gapwise context without turning deterministic facts into model guesses.
description: Connect AI clients to public campus intelligence across 13 supported universities and explicitly delegated Gapwise context without turning deterministic facts into model guesses.
---

Gapwise AI is the **remote Model Context Protocol (MCP) integration boundary** between an AI client and Gapwise. It exposes stateless public campus intelligence plus narrowly permissioned private student context without giving a client unrestricted account access.
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: API overview
description: The public Gapwise campus intelligence API v1.
---

Gapwise exposes public campus primitives across 11 supported Canadian universities (and 13 campus models) over HTTPS. The canonical production base URL is `https://api.gapwise.ca/v1`. The API is intentionally unauthenticated and preserves provenance, verification state, and uncertainty instead of fabricating missing facts.
Gapwise exposes public campus primitives across 13 supported Canadian universities (and 15 campus models) over HTTPS. The canonical production base URL is `https://api.gapwise.ca/v1`. The API is intentionally unauthenticated and preserves provenance, verification state, and uncertainty instead of fabricating missing facts.

## Public API or AI & MCP?

Expand All @@ -23,7 +23,7 @@ The two surfaces are intentionally separate:
| Method | Endpoint | Purpose |
| --- | --- | --- |
| `GET` | `/v1` | API capabilities, versions, and privacy boundary |
| `GET` | `/v1/universities` | Discover all 11 supported universities, editions, and capabilities |
| `GET` | `/v1/universities` | Discover all 13 supported universities, editions, and capabilities |
| `GET` | `/v1/campuses` | Discover all 13 supported campus models and metadata |
| `GET` | `/v1/buildings` | Search and list canonical buildings for any supported university/campus |
| `GET` | `/v1/buildings/:building` | Resolve one building by code, exact name, or recognized alias |
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/api/buildings.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Buildings
description: Canonical building identity, discovery, pagination, and provenance across supported universities.
---

The v1 building resources expose stable Gapwise identities for recognized campus buildings across 11 supported universities. Identity/search coverage does not imply that every entrance, indoor path, floor, or accessibility detail has been surveyed.
The v1 building resources expose stable Gapwise identities for recognized campus buildings across 13 supported universities. Identity/search coverage does not imply that every entrance, indoor path, floor, or accessibility detail has been surveyed.

## List and search

Expand Down
8 changes: 4 additions & 4 deletions src/content/docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ The [Gapwise CLI](https://github.com/GapwiseHQ/cli) is an open-source command-li

## Install and maintain

Use Node.js **22 or newer**. The intended canonical npm identity is [`@gapwise/cli`](https://www.npmjs.com/package/@gapwise/cli). The initial npm publication is pending owner authentication; the public GitHub installation is available now:
Use Node.js **22 or newer**. Install the current verified [`@gapwise/cli` package from npm](https://www.npmjs.com/package/@gapwise/cli):

```sh
npm install -g github:GapwiseHQ/cli
npm install -g @gapwise/cli@0.2.1
gapwise --version
gapwise --help
```

Once the registry release is verified, install or upgrade with `npm install -g @gapwise/cli`. To upgrade the GitHub installation, rerun `npm install -g github:GapwiseHQ/cli`. Uninstall with `npm uninstall -g @gapwise/cli`. The [CLI repository](https://github.com/GapwiseHQ/cli) has the MIT license, tests, release workflow, and source history.
Upgrade with `npm install -g @gapwise/cli@latest`. Uninstall with `npm uninstall -g @gapwise/cli`. The [CLI repository](https://github.com/GapwiseHQ/cli) has the MIT license, tests, release workflow, and source history.

## Discover universities and campuses

Expand All @@ -26,7 +26,7 @@ gapwise campuses --university carleton
gapwise campuses --university york
```

Gapwise currently supports 12 universities and 14 campus models. Discovery shows canonical IDs, names, and routing availability. Public campus queries require `--university ID`; otherwise the API's historical U of T default could silently give the wrong edition's data. `--campus` selects one of that university's campus IDs; omitting it uses that university's default campus.
Gapwise currently supports 13 universities and 15 campus models. Discovery shows canonical IDs, names, and routing availability. Public campus queries require `--university ID`; otherwise the API's historical U of T default could silently give the wrong edition's data. `--campus` selects one of that university's campus IDs; omitting it uses that university's default campus.

## Query public campus facts

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/data/datasets.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Dataset catalog
description: Canonical campus datasets and raw artifacts published by Gapwise Data.
---

Gapwise Data publishes canonical campus datasets across 12 supported universities (14 campus models). Campus-wide models are maintained under `universities/<id>/campus.json` containing buildings, coordinates, and navigation metadata. In addition, the reviewed UTM subtree lives under `data/utm`, distributed as raw artifacts at `https://data.gapwise.ca/datasets/utm/latest/`. Additional university datasets (such as UBC Vancouver, Carleton, Queen's, Western, Ottawa, McMaster, Laurier, York, Guelph, Brock, UTSG, and UTSC) live in their own canonical directories.
Gapwise Data publishes canonical campus datasets across 13 supported universities (15 campus models). Campus-wide models are maintained under `universities/<id>/campus.json` containing buildings, coordinates, and navigation metadata. In addition, the reviewed UTM subtree lives under `data/utm`, distributed as raw artifacts at `https://data.gapwise.ca/datasets/utm/latest/`. Additional university datasets (such as UBC Vancouver, Carleton, Queen's, Western, Ottawa, McMaster, Laurier, York, Guelph, Brock, UTSG, and UTSC) live in their own canonical directories.

## Major surfaces

Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/data/distribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ Gapwise separates **canonical ownership**, **public distribution**, and **runtim
To discover available universities and campus models programmatically, use the public API discovery endpoints:

```bash
# Discover 11 supported universities
# Discover 13 supported universities
curl https://api.gapwise.ca/v1/universities

# Discover 13 campus models and metadata
# Discover 15 campus models and metadata
curl https://api.gapwise.ca/v1/campuses
```

Expand Down
Loading
Loading