Metadata-Version: 2.4
Name: compliance-flag
Version: 0.1.0
Summary: Python CLI for flagging potential SEC Marketing Rule issues in authorized public URLs and local files.
Project-URL: Homepage, https://github.com/quillmark-open-source/compliance-flag
Project-URL: Issues, https://github.com/quillmark-open-source/compliance-flag/issues
Project-URL: Source, https://github.com/quillmark-open-source/compliance-flag
Author: Quillmark LLC
Maintainer: Quillmark LLC
License-Expression: Apache-2.0
License-File: LICENSE
License-File: NOTICE
Keywords: cli,compliance,investment-advisers,marketing-rule,sec
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Office/Business :: Financial
Classifier: Topic :: Text Processing :: Markup :: HTML
Requires-Python: >=3.10
Requires-Dist: anthropic>=0.66.0
Requires-Dist: beautifulsoup4>=4.12.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: jsonschema>=4.22.0
Provides-Extra: dev
Requires-Dist: build>=1.2.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.8.0; extra == 'dev'
Requires-Dist: tiktoken>=0.7.0; extra == 'dev'
Description-Content-Type: text/markdown

# Compliance Flag

[![CI](https://github.com/quillmark-open-source/compliance-flag/actions/workflows/ci.yml/badge.svg)](https://github.com/quillmark-open-source/compliance-flag/actions/workflows/ci.yml)
[![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-3776ab.svg)](pyproject.toml)
[![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
[![Ruff](https://img.shields.io/badge/ruff-enabled-46a146.svg)](https://docs.astral.sh/ruff/)
[![Status: alpha](https://img.shields.io/badge/status-alpha-orange.svg)](ROADMAP.md)

Compliance Flag is a Python CLI for creating reviewer-ready reports on public URLs and local content files a team is authorized to review.

It helps teams capture source material, compare RIA marketing content with bundled regulatory sources, and prepare structured reports for qualified compliance, legal, or supervisory review.

**Project Links:** [Documentation](docs/index.md) | [Usage](docs/usage.md) | [Roadmap](ROADMAP.md) | [Changelog](CHANGELOG.md) | [Contributing](CONTRIBUTING.md) | [Security](SECURITY.md)

## Status

Compliance Flag is moving from alpha to beta. The current package scaffold includes:

- `compliance-flag scan --file` for local `.html`, `.htm`, `.md`, and `.txt` files
- experimental `compliance-flag scan --url` support that captures page content before analysis
- structured JSON reports validated against a bundled schema
- HTML report rendering
- saved raw source files and source metadata alongside each report
- bundled prompt, schema, and regulatory source assets migrated from the alpha scanner

## Install For Development

```bash
python -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[dev]"
```

Set an Anthropic API key before running scans:

```bash
export ANTHROPIC_API_KEY="..."
```

## Usage

Scan a local file:

```bash
compliance-flag scan --file tests/fixtures/example-blog-post.html
```

Scan an authorized public URL:

```bash
compliance-flag scan --url https://example.com
```

Write output to a specific directory:

```bash
compliance-flag scan --file page.html --out reports/example
```

Each scan writes:

- a JSON report
- an HTML report
- a raw captured source file, such as `.source.html`
- a source metadata file, `.source-meta.json`

## Intended Use

Compliance Flag is a review-support tool. It is not a compliance approval system, legal reviewer, or substitute for qualified professional judgment.

Only use Compliance Flag on websites, files, pages, or other content that you own, control, administer, or have explicit permission to assess. Do not run URL scans against third-party websites without authorization.

The initial project focus is SEC Rule 275.206(4)-1, Investment adviser marketing. Related SEC sources may be used as supporting context where appropriate.

## Development

```bash
pytest
ruff check .
python -m build
```

## Maintainer

Compliance Flag is a [Quillmark Open Source](https://github.com/quillmark-open-source) project maintained by [Quillmark LLC](https://quillmark.ai/).

## License

Apache-2.0. See [LICENSE](LICENSE).

## Disclaimer

See [DISCLAIMER.md](DISCLAIMER.md).
