# API Integration Law

**Status: proposed project covenant - not enacted law.**

The purpose of this covenant is to prevent optional technology from becoming a gatekeeper to human rights, public knowledge, or the ability to ask for help.

## Article 1 - Human-readable primacy

The complete canonical framework MUST remain readable as static HTML without JavaScript, an account, database, remote model, API, subscription, or network connection.

## Article 2 - Accessibility before integration

Every public interface MUST use semantic HTML and keyboard-operable controls and SHOULD target WCAG 2.2 AA. Applicable legal obligations, which may specify WCAG 2.1 AA, remain a separate floor. Native elements are preferred over ARIA reconstruction. Human-readable alternatives MUST exist for machine-only formats.

## Article 3 - Governance envelope

Every API operation MUST declare:

- schema version;
- public, private, or restricted data class;
- specific human-readable purpose;
- authority or consent basis;
- minimal retention period and deletion path;
- accessibility profile;
- human override and review route;
- provenance identifiers;
- trace identifier;
- endpoint class.

Undeclared data is treated as private and denied.

## Article 4 - Failure behavior

Public explanatory content MAY fall back to a local deterministic function. Private or restricted data MUST fail closed and MUST NOT be silently redirected to an unapproved third party. API failure MUST NOT remove access to the static document.

## Article 5 - No automated creation of legal or clinical status

No API, score, model, vote, or classifier may independently create criminal intent, guilt, dangerousness, diagnosis, confinement, citation, loss of benefits, or life-affecting status. An automated system may organize evidence and identify missing safeguards; accountable humans using applicable law must make consequential determinations.

## Article 6 - Open interfaces and replaceable adapters

The reference contract uses OpenAPI 3.2, JSON Schema 2020-12, HTTP semantics, RFC 9457 problem details, W3C trace context, and provenance records. Health integration is optional through an authorized FHIR R5 adapter. No vendor-specific service is required to read or run the local matrix.

## Article 7 - Privacy and data minimization

Private information remains under the person’s authority unless another lawful basis clearly applies. Collection does not create ownership. Sale, advertising, brokerage, covert profiling, unrelated monetization, or undeclared training is outside the project contract.

## Article 8 - Integrity and crypto agility

Releases use canonical records, SHA-256 hashes, and detached signatures. Cryptography proves integrity, not truth. Algorithms and key sizes must be replaceable as standards and risks evolve. Private signing keys never belong in HTML, source control, logs, or public archives.

## Article 9 - Debugging without exposure

Bug reports include capability tests, error states, trace IDs, and redacted event logs. Tokens and fields matching secret, authorization, password, or credential patterns are removed. Debugging cannot become surveillance.

## Article 10 - Right to pause, correct, and appeal

A person affected by a technology-supported process must have a meaningful route to pause, clarify, correct, obtain accessible explanation, provide context, and request human review before avoidable irreversible consequences.
