# KIP Interfaces — Functional Specification v0.1.46

**Basis:** v0.1.46 development source. This is a functional contract; descriptions not independently exercised remain **NOT VERIFIED**. Historical continuity baselines are not current authority.

## F-01 — Browse managed websites and documents
**Actor:** Visitor or signed-in user. **Input:** Website selection or documentation link. **Behavior:** The home page presents managed websites and a Documentation section. Selecting an HTML document opens its browser rendition; each HTML document provides a Back to Documents link. **Output:** Selected site operations page or document. **Failure:** Missing documents produce ordinary HTTP errors; documentation links must resolve in a packaged release.

## F-02 — Authenticate and authorize operations
**Actors:** Visitor, normal user, administrator. **Behavior:** Public viewing and privileged administration are distinct. Protected operations require a valid session and the appropriate role. The server must enforce access rather than relying on hidden UI controls. **Failure:** Unauthorized operations must not change state. Specific permission matrices require verification against deployed configuration.

## F-03 — Register and maintain clients
**Actor:** Administrator. **Input:** Client identity, site root and source settings. **Behavior:** Administration permits inspection and editing of registered clients, website-root creation, and GitHub verification. Client renames migrate GitHub assignments; deletion clears assignments. **Output:** Updated client record and status. **Failure:** Do not use destructive lifecycle operations against production clients for testing.

## F-04 — Configure GitHub access
**Actor:** Administrator. **Prerequisites:** Registered client, a named development credential, repository enrollment and client assignment. **Behavior:** Named Credentials configures authentication; Repositories enrolls a repository for a credential; Client Assignments grants operations such as Read to a client. These objects must be configured separately. **Output:** Permissioned repository access. **Failure:** Missing enrollment or Read permission must not grant access.

## F-05 — Verify GitHub authorization and synchronization
**Actor:** Administrator. **Behavior:** GitHub Verify checks whether an assigned credential can access the configured repository. Authorization and deployed-file synchronization are different states; authorized access alone cannot be reported as synchronized. **Output:** Distinct access and synchronization status. **Failure:** Missing site root, repository or assignment must produce a meaningful state.

## F-06 — Read GitHub through the AI API
**Actor:** Authorized API client. **Input:** Bearer token and GET query. **Behavior:** `repositories` lists allowed repositories; `branches` lists branches; `head` returns a branch SHA; `file` resolves a ref and returns base64 content; `compare` compares refs. **Output:** JSON with operation-specific fields. **Failure:** Invalid request, missing token, insufficient access and upstream failure produce structured errors. **Constraint:** No API write operation exists in this release. See [API Reference](AI-API-Reference.html).

## F-07 — Update KIP Interfaces
**Actor:** Administrator. **Input:** A complete, uniquely versioned release ZIP. **Behavior:** Self-update validates package lineage and hands installation to the separately installed updater. A bundled updater is not automatically installed as the live external updater. **Output:** Installer status or an actionable failure. **Constraint:** A same-version package with different bytes must not silently replace an existing release.

## F-08 — Recover a retained previous installation
**Actor:** Administrator. **Prerequisites:** Independently deployed recovery-capable external updater, retained previous installation and separate persistent-data backup. **Behavior:** Administrator selects a retained version; recovery verifies staged content, activates the chosen installation and records results. **Failure:** A failed recovery is a critical incident requiring inspection, not blind retries. **Live implementation status:** NOT VERIFIED; archived-ZIP restoration is not supported by the documented interface.

## F-09 — Documentation access
**Actor:** Reader. **Behavior:** Each documentation topic provides Markdown, HTML and DOCX where designated. HTML pages provide visible navigation back to the home Documentation section. Cross-document references are hyperlinks rather than undifferentiated inline text. **Output:** Readable, navigable documents.

## Functional boundaries
GitHub write/commit API, automated unit testing and fully verified disaster recovery are not established in the supplied baseline. Requirements and test outcomes are maintained separately in the release and verification documents.

## Historical release notes and development appendices

Earlier checkpoint descriptions are retained in the versioned `Release-Notes-v0.1.41.md` through `Release-Notes-v0.1.44.md` and historical continuity records. They do not describe current v0.1.46 behavior.
