Metadata-Version: 2.4
Name: claimseal
Version: 0.1.0rc2
Summary: Evidence-governed RFP and security questionnaire automation.
Author: Mohammad Atashi
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/TensorScholar/claimseal
Project-URL: Issues, https://github.com/TensorScholar/claimseal/issues
Keywords: rfp,security-questionnaire,rag,presales,compliance
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: openpyxl<4,>=3.1
Requires-Dist: pydantic<3,>=2.10
Requires-Dist: pypdf<7,>=5
Requires-Dist: python-docx<2,>=1.1
Requires-Dist: PyYAML<7,>=6
Requires-Dist: rich<16,>=13
Requires-Dist: typer<1,>=0.16
Provides-Extra: github
Requires-Dist: httpx<1,>=0.27; extra == "github"
Provides-Extra: web
Requires-Dist: fastapi<1,>=0.115; extra == "web"
Requires-Dist: python-multipart<1,>=0.0.20; extra == "web"
Requires-Dist: uvicorn<1,>=0.34; extra == "web"
Provides-Extra: dev
Requires-Dist: coverage<8,>=7.6; extra == "dev"
Requires-Dist: httpx<1,>=0.27; extra == "dev"
Requires-Dist: mypy<2,>=1.14; extra == "dev"
Requires-Dist: pip-audit<3,>=2.8; extra == "dev"
Requires-Dist: pytest<10,>=8.3; extra == "dev"
Requires-Dist: pytest-cov<8,>=6; extra == "dev"
Requires-Dist: ruff<1,>=0.12; extra == "dev"
Requires-Dist: types-openpyxl<4,>=3.1; extra == "dev"
Provides-Extra: release
Requires-Dist: build<2,>=1.2; extra == "release"
Requires-Dist: twine<7,>=6; extra == "release"
Dynamic: license-file

# ClaimSeal

[![CI](https://github.com/TensorScholar/claimseal/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/TensorScholar/claimseal/actions/workflows/ci.yml)

**Evidence-governed RFP and security-questionnaire automation.**

ClaimSeal converts questionnaires into evidence-backed, reviewable claims instead of treating answer generation as an unconstrained text-completion problem.

```text
safe document import -> question extraction -> approved evidence retrieval
-> evidence-only draft -> policy gates -> human review -> safe export
-> source-change impact scan -> governed revalidation -> fresh review when required
```

> No evidence, no external claim.

ClaimSeal `0.1.0rc2` is a hardened engineering release candidate for demonstration and external review. It is **not a production-ready hosted service**.

## Why ClaimSeal

RFP and security-questionnaire workflows fail when generated answers cannot be traced to approved evidence or when sensitive claims bypass review. ClaimSeal makes those controls explicit:

- approved, versioned, applicability-bounded and freshness-aware evidence sources;
- deterministic evidence-only drafting by default;
- mandatory review for sensitive, conflicting, source-changed or otherwise reviewable claims;
- hard blocking for stale or unsupported claims until valid evidence exists;
- fail-closed export with source-file overwrite protection;
- safe XLSX, DOCX, CSV, JSON, Markdown and text-extractable PDF handling;
- source-change impact analysis plus identity-preserving claim revalidation with review invalidation;
- one narrow, commit-pinned GitHub exact-file evidence source;
- hash-chained audit events and governance metrics derived from current persisted state.

No API key is required for the default local workflow.

## Quick start

```bash
python -m venv .venv
source .venv/bin/activate
python -m pip install -e '.[web]'
claimseal demo
```

For development:

```bash
python -m pip install -e '.[dev,web]'
ruff format --check .
ruff check .
mypy src/claimseal
pytest --cov=claimseal --cov-branch
```

CI validates the supported Python 3.11, 3.12 and 3.13 matrix.

## GitHub evidence source

Install the optional connector and provide its credential only through the environment:

```bash
python -m pip install -e '.[github]'
export CLAIMSEAL_GITHUB_TOKEN='...'
claimseal ingest-github-source \
  --database claimseal.db \
  --identifier security-policy \
  --title 'Security policy' \
  --owner security \
  --repository acme/security-policies \
  --path docs/SECURITY.md \
  --ref main \
  --approved
```

The connector resolves the supplied ref to an immutable commit SHA and then reads the exact file at that commit. It does not search repositories, follow redirects, perform writes, persist the token, or inherit ambient HTTP proxy configuration. Without `--approved`, the source remains unavailable to default evidence retrieval.

See [GitHub evidence source](docs/integrations/github.md) for its authorization and validation boundary.

## Supported formats

| Format | Import | Export behavior |
| --- | --- | --- |
| XLSX | Yes | Writes answers to worksheet locations; formula-like output is neutralized |
| DOCX | Yes | Writes back to recorded paragraph/table locations |
| CSV | Yes | Writes to adjacent columns with formula neutralization |
| JSON | Yes | Structured questionnaire and claim-ledger output |
| Markdown | Yes | Questions are extracted from lines ending in `?` |
| PDF | Text-extractable only | Source PDF is not mutated; output is a JSON claim ledger |

Macro-enabled or malformed Office containers are rejected before parser libraries receive them. See [format support](docs/formats.md) for the exact boundary.

## Safety model

Export is fail closed. Drafts marked `review_required` or `conflict` need a successful human review bound to the exact current draft/evidence snapshot. `stale` evidence cannot be repaired by approval: the source must be refreshed and the affected claim revalidated. `unanswerable` drafts have no approved evidence and cannot be promoted to an external claim.

When current source state invalidates a claim snapshot, `impact-scan` identifies the dependency and `revalidate` replaces only the affected draft while preserving its answer identity and historical review record. A previous approval remains historical but is not transferable to the new digest. Source-changed claims that would otherwise auto-answer are deliberately forced through fresh review before release.

ClaimSeal also rejects attempts to overwrite the imported source questionnaire and commits completed exports with an atomic create-if-absent operation. Evidence reuse is blocked when either source content or source provenance metadata has drifted since retrieval.

See [revalidation and governance metrics](docs/revalidation-and-metrics.md), the [security model](docs/security-model.md), and [limitations](docs/limitations.md) before exposing any adapter or API beyond a local evaluation environment.

## Architecture

ClaimSeal is a modular monolith with hexagonal boundaries. Domain and application logic remain independent of document libraries, SQLite, FastAPI and other adapter dependencies.

See [architecture](docs/architecture.md) and [ADR 0001](docs/adr/0001-modular-monolith.md).

## Documentation

- [Architecture and integration contracts](docs/architecture.md)
- [v0.1 compatibility contract](docs/compatibility.md)
- [Source-change revalidation and governance metrics](docs/revalidation-and-metrics.md)
- [GitHub evidence source](docs/integrations/github.md)
- [Supported document formats](docs/formats.md)
- [Security model and risk register](docs/security-model.md)
- [Known limitations](docs/limitations.md)
- [Roadmap and success metrics](docs/roadmap.md)
- [0.1.0rc2 validation record](docs/audits/0.1.0rc2.md)
- [Security reporting policy](SECURITY.md)
- [Contributing and release discipline](CONTRIBUTING.md)
- [Changelog](CHANGELOG.md)

## Release boundary

Included in `0.1.0rc2`: safe import and extraction, evidence registry and retrieval, deterministic drafting, applicability/review gates, conflict/staleness handling, safe export, source-content and source-provenance impact scanning, governed claim revalidation, questionnaire-local governance metrics, SQLite/in-memory storage, audit verification, CLI, one optional commit-pinned GitHub exact-file evidence connector, optional local-only API, tests and release automation.

Not included: OCR, broad enterprise connector coverage, repository discovery/search, browser extensions, autonomous legal approval, hosted multi-tenancy, authentication/authorization, production DLP/retention controls, or a production-readiness claim.

## License

Apache License 2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE).
