Parent: #415
Summary
Define and implement the first portable CodeNib artifact: a deterministic, serverless Wiki export that the packaged frontend can read from GitHub Pages or any static host.
This milestone establishes the compatibility boundary used later by the GitHub Action and artifact-backed MCP work. It must not add provider credentials, local absolute paths, or a hidden live-API dependency.
Scope
Export contract
Add a versioned export manifest with:
- repository slug and canonical origin when available;
- indexed commit and source fingerprint;
- CodeNib/export schema versions;
- builder profile and per-view capabilities;
- source-location convention;
- generation mode, model identity, prompt/policy version, and grounding summary;
- relative paths plus integrity digests for exported payloads.
Export API-shaped JSON for repository metadata, Wiki tree, Wiki pages, and page dependency graphs. Dynamic operations such as chat and edge-label generation are explicitly unavailable in static mode. Source citations link to the canonical repository at the indexed commit; no machine-absolute source path is published.
Frontend adapter
Teach the packaged frontend to select a static data source through runtime configuration, preserve a configurable Pages base path, and render unavailable dynamic capabilities deliberately rather than issuing failing API calls.
CLI
Provide one documented command that consumes an existing compatible manifest and writes an export directory. The command is deterministic for the same repository state and generation cache. It fails on commit/fingerprint mismatch.
Safety
- Reject output paths outside the export root.
- Redact or reject absolute build-machine paths.
- Scan serialized runtime configuration and payloads for known credential sources.
- Never serialize API keys, bearer headers, Action tokens, or provider options containing secrets.
- Keep the target repository clean.
Non-goals
- Browser-side model inference.
- Anonymous query-time semantic Ask.
- A hosted CodeNib backend.
- Action workflow implementation; that follows after this contract is stable.
- Copying the full repository into the Pages artifact.
Acceptance Criteria
Proposed Ownership
- Export schema/writer:
codenib/web/
- CLI surface:
codenib/cli.py
- Static data adapter and base-path routing:
web/
- Contract tests:
test/web/
Verification Order
- schema and writer unit tests;
- CLI export smoke on the fixture repository;
- frontend unit/build checks;
- static-server Playwright smoke at root and nested base paths.
Effort
effort/large
Parent: #415
Summary
Define and implement the first portable CodeNib artifact: a deterministic, serverless Wiki export that the packaged frontend can read from GitHub Pages or any static host.
This milestone establishes the compatibility boundary used later by the GitHub Action and artifact-backed MCP work. It must not add provider credentials, local absolute paths, or a hidden live-API dependency.
Scope
Export contract
Add a versioned export manifest with:
Export API-shaped JSON for repository metadata, Wiki tree, Wiki pages, and page dependency graphs. Dynamic operations such as chat and edge-label generation are explicitly unavailable in static mode. Source citations link to the canonical repository at the indexed commit; no machine-absolute source path is published.
Frontend adapter
Teach the packaged frontend to select a static data source through runtime configuration, preserve a configurable Pages base path, and render unavailable dynamic capabilities deliberately rather than issuing failing API calls.
CLI
Provide one documented command that consumes an existing compatible manifest and writes an export directory. The command is deterministic for the same repository state and generation cache. It fails on commit/fingerprint mismatch.
Safety
Non-goals
Acceptance Criteria
/and a repository Pages prefix.Proposed Ownership
codenib/web/codenib/cli.pyweb/test/web/Verification Order
Effort
effort/large