Metadata-Version: 2.4
Name: accountable-surface-spec
Version: 0.1.0
Summary: Canonical accountable surface manifest schema and validation for the Structural Explainability ecosystem.
Project-URL: Homepage, https://github.com/structural-explainability/accountable-surface-spec
Project-URL: Repository, https://github.com/structural-explainability/accountable-surface-spec
Project-URL: Documentation, https://structural-explainability.github.io/accountable-surface-spec/
Project-URL: Issues, https://github.com/structural-explainability/accountable-surface-spec/issues
Project-URL: Changelog, https://github.com/structural-explainability/accountable-surface-spec/blob/main/CHANGELOG.md
Author-email: Structural Explainability <se@structural-explainability.org>
License: MIT License
        
        Copyright (c) 2026 Structural Explainability
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: accountable-surface-spec,schema,structural-explainability,toml,validation
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Typing :: Typed
Requires-Python: >=3.14
Provides-Extra: dev
Requires-Dist: build; extra == 'dev'
Requires-Dist: pre-commit; extra == 'dev'
Requires-Dist: pyright; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Requires-Dist: twine; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocstrings[python]; extra == 'docs'
Requires-Dist: zensical; extra == 'docs'
Description-Content-Type: text/markdown

# Accountable Surface Specification

[![PyPI](https://img.shields.io/pypi/v/accountable-surface-spec?logo=pypi&label=pypi)](https://pypi.org/project/accountable-surface-spec/)
[![Docs Site](https://img.shields.io/badge/docs-site-blue?logo=github)](https://structural-explainability.github.io/accountable-surface-spec/)
[![Repo](https://img.shields.io/badge/repo-GitHub-black?logo=github)](https://github.com/structural-explainability/accountable-surface-spec)
[![Python 3.14](https://img.shields.io/badge/python-3.14%2B-blue?logo=python)](./pyproject.toml)
[![License](https://img.shields.io/badge/license-MIT-yellow.svg)](./LICENSE)

[![CI](https://github.com/structural-explainability/accountable-surface-spec/actions/workflows/ci-python-zensical.yml/badge.svg?branch=main)](https://github.com/structural-explainability/accountable-surface-spec/actions/workflows/ci-python-zensical.yml)
[![Docs-Deploy](https://github.com/structural-explainability/accountable-surface-spec/actions/workflows/deploy-zensical.yml/badge.svg?branch=main)](https://github.com/structural-explainability/accountable-surface-spec/actions/workflows/deploy-zensical.yml)
[![Pre-Release](https://github.com/structural-explainability/accountable-surface-spec/actions/workflows/pre-release.yml/badge.svg?branch=main)](https://github.com/structural-explainability/accountable-surface-spec/actions/workflows/pre-release.yml)
[![Release](https://github.com/structural-explainability/accountable-surface-spec/actions/workflows/release-pypi.yml/badge.svg)](https://github.com/structural-explainability/accountable-surface-spec/actions/workflows/release-pypi.yml)
[![Links](https://github.com/structural-explainability/accountable-surface-spec/actions/workflows/links.yml/badge.svg?branch=main)](https://github.com/structural-explainability/accountable-surface-spec/actions/workflows/links.yml)
[![Dependabot](https://img.shields.io/badge/Dependabot-enabled-brightgreen.svg)](https://github.com/structural-explainability/accountable-surface-spec/security)

> Defines the portable manifest format for declaring
> authority-gated repository surfaces.

## Protected-surface thesis

A protected surface is one where the technical capability to change it is not
sufficient authority to change it.

Access control can grant the capability to perform an operation. It does not by
itself establish that the capability is sufficient authority to modify a
protected repository surface.

Accountable Surfaces records where capability is insufficient authority, and
binds each crossing of that gap to required human review, supporting evidence,
and permitted AI participation.

## Scope

This repository defines the structure and conformance rules for:

- `.accountability/surfaces.toml`
- protected surface declarations
- surface object and role structure
- review and evidence requirements
- AI authority limits
- manifest self-protection
- declared-vs-satisfied obligation checks
- enforcement mappings to existing external mechanisms

This repository is the source of truth for the accountable surface manifest
format. It does not define all vocabulary terms directly. Vocabulary terms are
defined in the accountable authority, surface, review, and evidence vocabulary
repositories.

## Core rule

Technical capability is not authority.

Repository surfaces that carry authority-bearing roles must be declared
explicitly, reviewed explicitly, evidenced explicitly, and enforced externally.

## Status

Draft v0.1.0.

The specification is intentionally repository-first.
It is validated first against concrete software and theory repositories
before any broader portability claim is considered.

## Related repositories

| Repository                         | Purpose                                                                             |
| ---------------------------------- | ----------------------------------------------------------------------------------- |
| `accountable-authority-vocabulary` | Permission, AI authority level, denial state, and revocation terms.                 |
| `accountable-surface-vocabulary`   | Surface object, surface role, downstream effect, and reserved lifecycle-gate terms. |
| `accountable-review-vocabulary`    | Review kind, review scope, reviewer authority, and review satisfaction terms.       |
| `accountable-evidence-vocabulary`  | Evidence, verification, attribution, and attestation terms.                         |

## Initial profiles

| Profile                        | Purpose                                                                                                                               |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
| `repository-protected-surface` | General repository profile for protected files, directories, commands, workflows, generated artifacts, and releases.                  |
| `lean-theory-repository`       | Profile for Lean theory repositories with public theorem surfaces, reference artifacts, generated contracts, and validation commands. |

## Validate .accountability in a Repository

```shell
uvx accountable-surface-spec validate --path .accountability/surfaces.toml --strict
```

## Developer Command Reference

Python tooling is used to verify internal consistency and generate artifacts.

<details>
<summary>Show command reference</summary>

### In a machine terminal

Open a machine terminal where you want the project:

```shell
git clone https://github.com/structural-explainability/accountable-surface-spec

cd accountable-surface-spec
code .
```

### In a VS Code terminal

```shell
uv self update
uv python pin 3.14
uv sync --extra dev --extra docs --upgrade

uvx pre-commit install

git add -A
uvx pre-commit run --all-files
# repeat if changes were made
uvx pre-commit run --all-files

# validate SE manifest
uvx se-manifest-schema validate-manifest --path SE_MANIFEST.toml --strict

# validate accountable surface manifests
uv run accountable-surface-spec validate
uv run accountable-surface-spec validate --path .accountability/surfaces.toml --strict

uv run accountable-surface-spec check-examples

uv run accountable-surface-spec export-schema --check

# do chores
uv run python -m pyright
uv run python -m pytest
uv run python -m zensical build

# save progress
git add -A
git commit -m "update"
git push -u origin main
```

</details>

## Authority Manifest

[.accountability/surfaces.toml](./.accountability/surfaces.toml)

## Citation

[CITATION.cff](./CITATION.cff)

## License

[MIT](./LICENSE)

## Repository Manifest

[SE_MANIFEST.toml](./SE_MANIFEST.toml)
