Metadata-Version: 2.4
Name: coreason_scribe
Version: 0.1.0
Summary: coreason-scribe
License: # The Prosperity Public License 3.0.0
         
         Contributor: CoReason, Inc.
         
         Source Code: https://github.com/CoReason-AI/coreason_scribe
         
         ## Purpose
         
         This license allows you to use and share this software for noncommercial purposes for free and to try this software for commercial purposes for thirty days.
         
         ## Agreement
         
         In order to receive this license, you have to agree to its rules.  Those rules are both obligations under that agreement and conditions to your license.  Don't do anything with this software that triggers a rule you can't or won't follow.
         
         ## Notices
         
         Make sure everyone who gets a copy of any part of this software from you, with or without changes, also gets the text of this license and the contributor and source code lines above.
         
         ## Commercial Trial
         
         Limit your use of this software for commercial purposes to a thirty-day trial period.  If you use this software for work, your company gets one trial period for all personnel, not one trial per person.
         
         ## Contributions Back
         
         Developing feedback, changes, or additions that you contribute back to the contributor on the terms of a standardized public software license such as [the Blue Oak Model License 1.0.0](https://blueoakcouncil.org/license/1.0.0), [the Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0.html), [the MIT license](https://spdx.org/licenses/MIT.html), or [the two-clause BSD license](https://spdx.org/licenses/BSD-2-Clause.html) doesn't count as use for a commercial purpose.
         
         ## Personal Uses
         
         Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, doesn't count as use for a commercial purpose.
         
         ## Noncommercial Organizations
         
         Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution doesn't count as use for a commercial purpose regardless of the source of funding or obligations resulting from the funding.
         
         ## Defense
         
         Don't make any legal claim against anyone accusing this software, with or without changes, alone or with other technology, of infringing any patent.
         
         ## Copyright
         
         The contributor licenses you to do everything with this software that would otherwise infringe their copyright in it.
         
         ## Patent
         
         The contributor licenses you to do everything with this software that would otherwise infringe any patents they can license or become able to license.
         
         ## Reliability
         
         The contributor can't revoke this license.
         
         ## Excuse
         
         You're excused for unknowingly breaking [Notices](#notices) if you take all practical steps to comply within thirty days of learning you broke the rule.
         
         ## No Liability
         
         ***As far as the law allows, this software comes as is, without any warranty or condition, and the contributor won't be liable to anyone for any damages related to this software or this license, under any kind of legal claim.***
License-File: LICENSE
License-File: NOTICE
Author: Gowtham A Rao
Author-email: gowtham.rao@coreason.ai
Requires-Python: >=3.11
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Requires-Dist: gitpython (>=3.1.46,<4.0.0)
Requires-Dist: jinja2 (>=3.1.6,<4.0.0)
Requires-Dist: loguru (>=0.7.2,<0.8.0)
Requires-Dist: pydantic (>=2.12.5,<3.0.0)
Requires-Dist: pyyaml (>=6.0.3,<7.0.0)
Requires-Dist: types-pyyaml (>=6.0.12.20250915,<7.0.0.0)
Requires-Dist: weasyprint (>=67.0,<68.0)
Project-URL: Documentation, https://github.com/CoReason-AI/coreason_scribe
Project-URL: Homepage, https://github.com/CoReason-AI/coreason_scribe
Project-URL: Repository, https://github.com/CoReason-AI/coreason_scribe
Description-Content-Type: text/markdown

# coreason-scribe

**The "Compliance Officer in a Box" | Unified GxP Documentation Engine**

[![CI/CD](https://github.com/CoReason-AI/coreason_scribe/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/CoReason-AI/coreason_scribe/actions/workflows/ci-cd.yml)
[![codecov](https://codecov.io/gh/CoReason-AI/coreason_scribe/graph/badge.svg)](https://codecov.io/gh/CoReason-AI/coreason_scribe)
[![Python](https://img.shields.io/badge/python-3.12+-blue.svg)](https://www.python.org/downloads/)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
[![License](https://img.shields.io/badge/License-Proprietary-red.svg)](LICENSE)

## Executive Summary

`coreason-scribe` is the GxP documentation automation engine for the CoReason ecosystem. It addresses the "Validation Gap" where documentation inevitably drifts from code.

By treating **Documentation as Code**, `coreason-scribe` parses your agent's logic, uses AI to generate human-readable summaries (System Design Specifications), enforces Risk-Based Traceability (Requirements ↔ Tests), and facilitates a rigorous **"Draft-Review-Sign"** workflow. It ensures that no release is published without a cryptographically signed artifact proving it meets all requirements.

## Core Philosophy: "Code is Truth. AI Drafts. Humans Ratify. Diffs Reveal Risk."

1.  **AI as the Drafter:** Scans Python AST and generates plain-English business logic summaries.
2.  **Risk-Based Traceability:** Enforces 100% test coverage for High Risk features.
3.  **Semantic Delta:** Surfaces logical drift between versions, not just line-by-line diffs.
4.  **21 CFR Part 11 Signatures:** Requires cryptographic signatures for release certification.

## Getting Started

### Prerequisites

- Python 3.12+
- Poetry

### Installation

```bash
poetry install
```

### Basic Usage

Generate a draft SDS from your source code:

```bash
poetry run python -m coreason_scribe.main draft \
  --source ./src \
  --output ./build \
  --version "0.1.0"
```

Run a compliance check (CI/CD Gate):

```bash
poetry run python -m coreason_scribe.main check \
  --agent-yaml ./agent.yaml \
  --assay-report ./assay_report.json
```

For detailed instructions, see the [Usage Guide](docs/usage.md).

## Documentation

- [Usage Guide](docs/usage.md)
- [Product Requirements Document](docs/product_requirements.md)

## Development

This project follows a strict iterative, atomic, test-driven development protocol.

- **Linting:** `poetry run pre-commit run --all-files`
- **Testing:** `poetry run pytest`

