Metadata-Version: 2.4
Name: specfact-cli
Version: 0.22.0
Summary: Brownfield-first CLI: Reverse engineer legacy Python → specs → enforced contracts. Automate legacy code documentation and prevent modernization regressions.
Project-URL: Homepage, https://github.com/nold-ai/specfact-cli
Project-URL: Repository, https://github.com/nold-ai/specfact-cli.git
Project-URL: Documentation, https://github.com/nold-ai/specfact-cli#readme
Project-URL: Issues, https://github.com/nold-ai/specfact-cli/issues
Project-URL: Trademarks, https://github.com/nold-ai/specfact-cli/blob/main/TRADEMARKS.md
Author-email: "NOLD AI (Owner: Dominikus Nold)" <hello@noldai.com>
License:                                  Apache License
                                   Version 2.0, January 2004
                                http://www.apache.org/licenses/
        
           TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
        
           1. Definitions.
        
              "License" shall mean the terms and conditions for use, reproduction,
              and distribution as defined by Sections 1 through 9 of this document.
        
              "Licensor" shall mean the copyright owner or entity authorized by
              the copyright owner that is granting the License.
        
              "Legal Entity" shall mean the union of the acting entity and all
              other entities that control, are controlled by, or are under common
              control with that entity. For the purposes of this definition,
              "control" means (i) the power, direct or indirect, to cause the
              direction or management of such entity, whether by contract or
              otherwise, or (ii) ownership of fifty percent (50%) or more of the
              outstanding shares, or (iii) beneficial ownership of such entity.
        
              "You" (or "Your") shall mean an individual or Legal Entity
              exercising permissions granted by this License.
        
              "Source" form shall mean the preferred form for making modifications,
              including but not limited to software source code, documentation
              source, and configuration files.
        
              "Object" form shall mean any form resulting from mechanical
              transformation or translation of a Source form, including but
              not limited to compiled object code, generated documentation,
              and conversions to other media types.
        
              "Work" shall mean the work of authorship, whether in Source or
              Object form, made available under the License, as indicated by a
              copyright notice that is included in or attached to the work
              (which shall not include Communications that are clearly marked or
              otherwise designated in writing by the copyright owner as "Not a Work").
        
              "Derivative Works" shall mean any work, whether in Source or Object
              form, that is based on (or derived from) the Work and for which the
              editorial revisions, annotations, elaborations, or other modifications
              represent, as a whole, an original work of authorship. For the purposes
              of this License, Derivative Works shall not include works that remain
              separable from, or merely link (or bind by name) to the interfaces of,
              the Work and Derivative Works thereof.
        
              "Contribution" shall mean any work of authorship, including
              the original version of the Work and any modifications or additions
              to that Work or Derivative Works thereof, that is intentionally
              submitted to Licensor for inclusion in the Work by the copyright owner
              or by an individual or Legal Entity authorized to submit on behalf of
              the copyright owner. For the purposes of this definition, "submitted"
              means any form of electronic, verbal, or written communication sent
              to the Licensor or its representatives, including but not limited to
              communication on electronic mailing lists, source code control systems,
              and issue tracking systems that are managed by, or on behalf of, the
              Licensor for the purpose of discussing and improving the Work, but
              excluding communication that is clearly marked or otherwise designated
              in writing by the copyright owner as "Not a Contribution".
        
              "Contributor" shall mean Licensor and any individual or Legal Entity
              on behalf of whom a Contribution has been received by Licensor and
              subsequently incorporated within the Work.
        
           2. Grant of Copyright License. Subject to the terms and conditions of
              this License, each Contributor hereby grants to You a perpetual,
              worldwide, non-exclusive, no-charge, royalty-free, irrevocable
              copyright license to reproduce, prepare Derivative Works of,
              publicly display, publicly perform, sublicense, and distribute the
              Work and such Derivative Works in Source or Object form.
        
           3. Grant of Patent License. Subject to the terms and conditions of
              this License, each Contributor hereby grants to You a perpetual,
              worldwide, non-exclusive, no-charge, royalty-free, irrevocable
              (except as stated in this section) patent license to make, have made,
              use, offer to sell, sell, import, and otherwise transfer the Work,
              where such license applies only to those patent claims licensable
              by such Contributor that are necessarily infringed by their
              Contribution(s) alone or by combination of their Contribution(s)
              with the Work to which such Contribution(s) was submitted. If You
              institute patent litigation against any entity (including a
              cross-claim or counterclaim in a lawsuit) alleging that the Work
              or a Contribution incorporated within the Work constitutes direct
              or contributory patent infringement, then any patent licenses
              granted to You under this License for that Work shall terminate
              as of the date such litigation is filed.
        
           4. Redistribution. You may reproduce and distribute copies of the
              Work or Derivative Works thereof in any medium, with or without
              modifications, and in Source or Object form, provided that You
              meet the following conditions:
        
              (a) You must give any other recipients of the Work or
                  Derivative Works a copy of this License; and
        
              (b) You must cause any modified files to carry prominent notices
                  stating that You changed the files; and
        
              (c) You must retain, in the Source form of any Derivative Works
                  that You distribute, all copyright, patent, trademark, and
                  attribution notices from the Source form of the Work,
                  excluding those notices that do not pertain to any part of
                  the Derivative Works; and
        
              (d) If the Work includes a "NOTICE" text file as part of its
                  distribution, then any Derivative Works that You distribute must
                  include a readable copy of the attribution notices contained
                  within such NOTICE file, excluding those notices that do not
                  pertain to any part of the Derivative Works, in at least one
                  of the following places: within a NOTICE text file distributed
                  as part of the Derivative Works; within the Source form or
                  documentation, if provided along with the Derivative Works; or,
                  within a display generated by the Derivative Works, if and
                  wherever such third-party notices normally appear. The contents
                  of the NOTICE file are for informational purposes only and
                  do not modify the License. You may add Your own attribution
                  notices within Derivative Works that You distribute, alongside
                  or as an addendum to the NOTICE text from the Work, provided
                  that such additional attribution notices cannot be construed
                  as modifying the License.
        
              You may add Your own copyright statement to Your modifications and
              may provide additional or different license terms and conditions
              for use, reproduction, or distribution of Your modifications, or
              for any such Derivative Works as a whole, provided Your use,
              reproduction, and distribution of the Work otherwise complies with
              the conditions stated in this License.
        
           5. Submission of Contributions. Unless You explicitly state otherwise,
              any Contribution intentionally submitted for inclusion in the Work
              by You to the Licensor shall be under the terms and conditions of
              this License, without any additional terms or conditions.
              Notwithstanding the above, nothing herein shall supersede or modify
              the terms of any separate license agreement you may have executed
              with Licensor regarding such Contributions.
        
           6. Trademarks. This License does not grant permission to use the trade
              names, trademarks, service marks, or product names of the Licensor,
              except as required for reasonable and customary use in describing the
              origin of the Work and reproducing the content of the NOTICE file.
        
           7. Disclaimer of Warranty. Unless required by applicable law or
              agreed to in writing, Licensor provides the Work (and each
              Contributor provides its Contributions) on an "AS IS" BASIS,
              WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
              implied, including, without limitation, any warranties or conditions
              of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
              PARTICULAR PURPOSE. You are solely responsible for determining the
              appropriateness of using or redistributing the Work and assume any
              risks associated with Your exercise of permissions under this License.
        
           8. Limitation of Liability. In no event and under no legal theory,
              whether in tort (including negligence), contract, or otherwise,
              unless required by applicable law (such as deliberate and grossly
              negligent acts) or agreed to in writing, shall any Contributor be
              liable to You for damages, including any direct, indirect, special,
              incidental, or consequential damages of any character arising as a
              result of this License or out of the use or inability to use the
              Work (including but not limited to damages for loss of goodwill,
              work stoppage, computer failure or malfunction, or any and all
              other commercial damages or losses), even if such Contributor
              has been advised of the possibility of such damages.
        
           9. Accepting Warranty or Additional Liability. While redistributing
              the Work or Derivative Works thereof, You may choose to offer,
              and charge a fee for, acceptance of support, warranty, indemnity,
              or other liability obligations and/or rights consistent with this
              License. However, in accepting such obligations, You may act only
              on Your own behalf and on Your sole responsibility, not on behalf
              of any other Contributor, and only if You agree to indemnify,
              defend, and hold each Contributor harmless for any liability
              incurred by, or claims asserted against, such Contributor by reason
              of your accepting any such warranty or additional liability.
        
           END OF TERMS AND CONDITIONS
        
           APPENDIX: How to apply the Apache License to your work.
        
              To apply the Apache License to your work, attach the following
              boilerplate notice, with the fields enclosed by brackets "[]"
              replaced with your own identifying information. (Don't include
              the brackets!)  The text should be enclosed in the appropriate
              comment syntax for the file format. We also recommend that a
              file or class name and description of purpose be included on the
              same "printed page" as the copyright notice for easier
              identification within third-party archives.
        
           Copyright 2025 Nold AI (Owner: Dominikus Nold)
        
           Licensed under the Apache License, Version 2.0 (the "License");
           you may not use this file except in compliance with the License.
           You may obtain a copy of the License at
        
               http://www.apache.org/licenses/LICENSE-2.0
        
           Unless required by applicable law or agreed to in writing, software
           distributed under the License is distributed on an "AS IS" BASIS,
           WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
           See the License for the specific language governing permissions and
           limitations under the License.
License-File: LICENSE.md
Keywords: async,beartype,brownfield,cli,code-documentation,code-to-spec,contract-driven-development,contracts,crosshair,icontract,legacy-code,modernization,property-based-testing,quality-gates,refactoring,reverse-engineering,spec-first,specfact,state-machine,tdd,technical-debt
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.11
Requires-Dist: beartype>=0.22.4
Requires-Dist: crosshair-tool>=0.0.97
Requires-Dist: gitpython>=3.1.45
Requires-Dist: graphviz>=0.20.1
Requires-Dist: hypothesis>=6.142.4
Requires-Dist: icontract>=2.7.1
Requires-Dist: jinja2>=3.1.6
Requires-Dist: jsonschema>=4.23.0
Requires-Dist: networkx>=3.4.2
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.27.0
Requires-Dist: opentelemetry-sdk>=1.27.0
Requires-Dist: pydantic>=2.12.3
Requires-Dist: python-dotenv>=1.2.1
Requires-Dist: pyyaml>=6.0.3
Requires-Dist: rich<13.6.0,>=13.5.2
Requires-Dist: ruamel-yaml>=0.18.16
Requires-Dist: ruff>=0.14.2
Requires-Dist: typer>=0.20.0
Requires-Dist: typing-extensions>=4.15.0
Requires-Dist: watchdog>=6.0.0
Provides-Extra: dev
Requires-Dist: basedpyright>=1.32.1; extra == 'dev'
Requires-Dist: bearer>=3.1.0; extra == 'dev'
Requires-Dist: beartype>=0.22.4; extra == 'dev'
Requires-Dist: crosshair-tool>=0.0.97; extra == 'dev'
Requires-Dist: graphviz>=0.20.1; extra == 'dev'
Requires-Dist: hypothesis>=6.142.4; extra == 'dev'
Requires-Dist: icontract>=2.7.1; extra == 'dev'
Requires-Dist: isort>=7.0.0; extra == 'dev'
Requires-Dist: pip-tools>=7.5.1; extra == 'dev'
Requires-Dist: pyan3>=1.2.0; extra == 'dev'
Requires-Dist: pylint>=4.0.2; extra == 'dev'
Requires-Dist: pytest-asyncio>=1.2.0; extra == 'dev'
Requires-Dist: pytest-cov>=7.0.0; extra == 'dev'
Requires-Dist: pytest-mock>=3.15.1; extra == 'dev'
Requires-Dist: pytest-xdist>=3.8.0; extra == 'dev'
Requires-Dist: pytest>=8.4.2; extra == 'dev'
Requires-Dist: ruff>=0.14.2; extra == 'dev'
Requires-Dist: semgrep>=1.144.0; extra == 'dev'
Requires-Dist: tomlkit>=0.13.3; extra == 'dev'
Requires-Dist: types-pyyaml>=6.0.12.20250516; extra == 'dev'
Provides-Extra: enhanced-analysis
Requires-Dist: bearer>=3.1.0; extra == 'enhanced-analysis'
Requires-Dist: graphviz>=0.20.1; extra == 'enhanced-analysis'
Requires-Dist: pyan3>=1.2.0; extra == 'enhanced-analysis'
Requires-Dist: syft>=0.9.5; extra == 'enhanced-analysis'
Provides-Extra: scanning
Requires-Dist: semgrep>=1.144.0; extra == 'scanning'
Description-Content-Type: text/markdown

# SpecFact CLI

> **Brownfield-first legacy code modernization with runtime contract enforcement.**  
> Analyze existing Python code → Extract specs → Find gaps → Enforce contracts → Prevent regressions

**No API keys required. Works offline. Zero vendor lock-in.**

[![PyPI version](https://img.shields.io/pypi/v/specfact-cli.svg)](https://pypi.org/project/specfact-cli/)
[![Python versions](https://img.shields.io/pypi/pyversions/specfact-cli.svg)](https://pypi.org/project/specfact-cli/)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE.md)
[![Status](https://img.shields.io/badge/status-beta-orange.svg)](https://github.com/nold-ai/specfact-cli)

<div align="center">

**[🌐 Website](https://noldai.com)** • **[📚 Documentation](https://nold-ai.github.io/specfact-cli)** • **[💬 Support](mailto:hello@noldai.com)**

</div>

---

## What is SpecFact?

**SpecFact CLI analyzes your existing Python code** to automatically extract specifications, find missing tests and contracts, and enforce them to prevent bugs during modernization.

**Perfect for:** Teams modernizing legacy Python systems who can't afford production bugs during migration.

### Why SpecFact?

AI coding assistants are powerful but unpredictable when requirements live in chat history. SpecFact adds a **brownfield-first analysis workflow** that understands existing code, extracts specs automatically, and enforces them as runtime contracts, giving you deterministic, reviewable outputs.

**Key outcomes:**

* **Understand legacy code** in minutes, not weeks (automatic spec extraction)
* **Find gaps** in tests, contracts, and documentation automatically
* **Prevent regressions** with runtime contract enforcement during modernization
* **Works with the tools you already use**: VS Code, Cursor, GitHub Actions, pre-commit hooks
* **No API keys required** - Works completely offline

## How SpecFact Compares (at a glance)

**New to spec-driven development?** Here's how SpecFact compares to other tools:

| Tool | Best For | SpecFact's Focus |
|------|----------|------------------|
| **GitHub Spec-Kit** | Greenfield specs, multi-language, interactive authoring | **Brownfield analysis**, runtime enforcement, formal verification |
| **OpenSpec** | Specification anchoring, change tracking, cross-repo workflows | **Code analysis**, contract enforcement, DevOps integration |
| **Traditional Testing** | Manual test writing, code review | **Automated gap detection**, contract-first validation, CI/CD gates |

**Key Differentiators:**

* ✅ **Brownfield-first** - Reverse engineers existing code (primary use case)
* ✅ **Runtime enforcement** - Contracts prevent regressions automatically
* ✅ **Formal verification** - CrossHair symbolic execution (not just LLM suggestions)
* ✅ **Team collaboration** - Role-based workflows for agile/scrum teams
* ✅ **Works offline** - No API keys, no cloud, zero vendor lock-in

**Compared to spec-kit & OpenSpec**: Those shine for brand-new features (0→1) and change tracking. SpecFact also excels when modernizing existing behavior (1→n), especially when you need runtime safety nets.

👉 **[See detailed comparison guide](docs/guides/speckit-comparison.md)** - Understand when to use SpecFact, Spec-Kit, OpenSpec, or all together

### The Problem It Solves

* ❌ **Legacy code** with no documentation or outdated specs
* ❌ **Missing tests** and contracts that should exist
* ❌ **Regressions** introduced during refactoring/modernization
* ❌ **No safety net** to catch bugs before production

### The Solution

SpecFact CLI:

1. **Analyzes** your existing code → Extracts specs automatically
2. **Finds gaps** → Missing tests, contracts, documentation
3. **Enforces contracts** → Prevents regressions with runtime validation
4. **Integrates** → Works with VS Code, Cursor, GitHub Actions, pre-commit hooks

**Works offline. No account required. Zero vendor lock-in.**

### How It Works

SpecFact follows a simple workflow that analyzes existing code and enforces contracts to prevent regressions:

```
┌────────────────────┐
│ Analyze Legacy     │
│ Code               │
└────────┬───────────┘
         │ extract specs automatically
         ▼
┌────────────────────┐
│ Find Gaps          │
│ (tests, contracts) │◀──── feedback loop ──────┐
└────────┬───────────┘                          │
         │ add contracts                        │
         ▼                                      │
┌────────────────────┐                          │
│ Enforce Contracts  │──────────────────────────┘
│ (runtime validation)│
└────────┬───────────┘
         │ modernize safely
         ▼
┌────────────────────┐
│ Prevent Regressions│
│ (safety net)       │
└────────────────────┘

1. Analyze your existing code to extract specs automatically
2. Find gaps in tests, contracts, and documentation
3. Add contracts to critical paths for runtime enforcement
4. Modernize safely knowing contracts will catch regressions
```

```mermaid
graph TB
    subgraph "Your Legacy Code"
        LC[Legacy Python Code<br/>No docs, no tests]
    end
    
    subgraph "SpecFact Analysis"
        A1[import from-code<br/>Extract specs]
        A2[Find Gaps<br/>Missing tests & contracts]
        A3[Generate Plan Bundle<br/>Features & Stories]
    end
    
    subgraph "Contract Enforcement"
        E1[Add Contracts<br/>Runtime validation]
        E2[Enforce SDD<br/>Quality gates]
        E3[CI/CD Integration<br/>Block bad code]
    end
    
    subgraph "Team Collaboration"
        T1[Export by Role<br/>PO, Architect, Dev]
        T2[Markdown Workflows<br/>No YAML editing]
        T3[Sync to DevOps<br/>GitHub, Linear, Jira]
    end
    
    subgraph "Safety Net"
        S1[Prevent Regressions<br/>Catch bugs early]
        S2[Modernize Safely<br/>Refactor with confidence]
    end
    
    LC -->|Step 1| A1
    A1 --> A2
    A2 --> A3
    A3 -->|Step 2| E1
    E1 --> E2
    E2 --> E3
    E3 -->|Step 3| S1
    S1 --> S2
    
    A3 -->|Optional| T1
    T1 --> T2
    T2 --> T3
    
    style LC fill:#ef4444,stroke:#dc2626,stroke-width:2px,color:#fff
    style A1 fill:#f97316,stroke:#c2410c,stroke-width:2px,color:#fff
    style A2 fill:#f97316,stroke:#c2410c,stroke-width:2px,color:#fff
    style A3 fill:#f97316,stroke:#c2410c,stroke-width:2px,color:#fff
    style E1 fill:#3b82f6,stroke:#1e40af,stroke-width:2px,color:#fff
    style E2 fill:#3b82f6,stroke:#1e40af,stroke-width:2px,color:#fff
    style E3 fill:#3b82f6,stroke:#1e40af,stroke-width:2px,color:#fff
    style T1 fill:#10b981,stroke:#047857,stroke-width:2px,color:#fff
    style T2 fill:#10b981,stroke:#047857,stroke-width:2px,color:#fff
    style T3 fill:#10b981,stroke:#047857,stroke-width:2px,color:#fff
    style S1 fill:#8b5cf6,stroke:#6d28d9,stroke-width:2px,color:#fff
    style S2 fill:#8b5cf6,stroke:#6d28d9,stroke-width:2px,color:#fff
```

### Typical Workflow

```mermaid
sequenceDiagram
    participant Dev as Developer
    participant SF as SpecFact CLI
    participant Code as Legacy Code
    participant CI as CI/CD
    
    Note over Dev,CI: Step 1: Analyze Legacy Code
    Dev->>SF: specfact import from-code my-project
    SF->>Code: Analyze Python files
    Code-->>SF: Extract features & stories
    SF-->>Dev: Plan bundle created
    
    Note over Dev,CI: Step 2: Find & Fix Gaps
    Dev->>SF: specfact analyze gaps my-project
    SF-->>Dev: Missing tests & contracts found
    Dev->>Dev: Add tests & contracts
    
    Note over Dev,CI: Step 3: Enforce Contracts
    Dev->>SF: specfact enforce sdd my-project
    SF->>SF: Validate contracts
    SF-->>Dev: Quality gates configured
    
    Note over Dev,CI: Step 4: Modernize Safely
    Dev->>Code: Refactor code
    Code->>CI: Push changes
    CI->>SF: Run contract validation
    SF-->>CI: ✅ Pass or ❌ Block
    
    alt Contracts Pass
        CI-->>Dev: ✅ Merge allowed
    else Contracts Fail
        CI-->>Dev: ❌ Merge blocked
        Dev->>Code: Fix violations
    end
```

---

## 🚀 Quick Start

### Install (10 seconds)

```bash
# Zero-install (recommended - no setup needed)
uvx specfact-cli@latest

# Or install globally
pip install -U specfact-cli
```

### Your First Command (< 60 seconds)

**Analyze your existing code:**

```bash
# Analyze legacy codebase (most common use case)
specfact import from-code my-project --repo .

# Or start a new project
specfact plan init my-project --interactive
```

**That's it!** SpecFact will:

* Extract features and stories from your code
* Find missing tests and contracts
* Generate a plan bundle you can enforce

👉 **[Getting Started Guide](docs/getting-started/README.md)** - Complete walkthrough with examples

---

## Key Features

### 🔍 Code Analysis

* **Reverse engineer** legacy code into documented specs
* **Find gaps** in tests, contracts, and documentation
* **Works with** any Python project (no special setup required)

### 🛡️ Contract Enforcement

* **Prevent regressions** with runtime contract validation
* **CI/CD integration** - Block bad code from merging
* **Works offline** - No cloud required

### 👥 Team Collaboration

* **Role-based workflows** - Product Owners, Architects, Developers work in parallel
* **Markdown-based** - No YAML editing required
* **Agile/scrum ready** - DoR checklists, story points, dependencies

### 🔌 Integrations

* **VS Code, Cursor** - Catch bugs before you commit
* **GitHub Actions** - Automated quality gates
* **AI IDEs** - Generate prompts for fixing gaps
* **DevOps tools** - Sync with GitHub Issues, Linear, Jira

---

## Common Use Cases

### 1. Modernizing Legacy Code ⭐ **Most Common**

**Problem:** Existing codebase with no specs or outdated documentation

```bash
# Step 1: Analyze your code
specfact import from-code my-project --repo .

# Step 2: Review what was found
specfact plan review my-project

# Step 3: Enforce contracts to prevent regressions
specfact enforce sdd my-project
```

👉 **[Brownfield Modernization Guide](docs/guides/brownfield-engineer.md)** - Complete walkthrough

### 2. Working with a Team

**Problem:** Need team collaboration with role-based workflows

```bash
# Product Owner: Export backlog
specfact project export --bundle my-project --persona product-owner

# Architect: Export technical design
specfact project export --bundle my-project --persona architect

# Developer: Export implementation tasks
specfact project export --bundle my-project --persona developer
```

👉 **[Agile/Scrum Workflows Guide](docs/guides/agile-scrum-workflows.md)** - Team collaboration guide

### 3. Using AI IDEs (Cursor, Copilot, Claude)

**Problem:** Want AI to fix gaps, but need validation

```bash
# Step 1: Find gaps
specfact analyze gaps --bundle my-project

# Step 2: Generate AI prompt
specfact generate fix-prompt GAP-001 --bundle my-project

# Step 3: Copy to AI IDE → AI fixes → Validate
specfact enforce sdd --bundle my-project
```

👉 **[AI IDE Integration](docs/guides/ide-integration.md)** - Setup guide

---

## See It In Action

We ran SpecFact CLI **on itself** to prove it works:

* ⚡ Analyzed 32 legacy Python files → Found **32 features** and **81 stories** in **3 seconds**
* 🚫 Set enforcement → **Blocked 2 HIGH violations** automatically
* 📊 Compared plans → Found **24 deviations** in **5 seconds**

**Total time**: < 10 seconds | **Result**: Found real bugs and inconsistencies

👉 **[Read the complete example](docs/examples/dogfooding-specfact-cli.md)** - See actual commands and outputs

---

## Documentation

### 🎯 Find Your Path

**New to SpecFact?**

1. **[Getting Started](docs/getting-started/README.md)** - Install and first commands
2. **[Tutorial: Using SpecFact with OpenSpec or Spec-Kit](docs/getting-started/tutorial-openspec-speckit.md)** ⭐ **NEW** - Complete beginner-friendly tutorial
3. **[Modernizing Legacy Code?](docs/guides/brownfield-engineer.md)** ⭐ - Complete guide
4. **[Use Cases](docs/guides/use-cases.md)** - Common scenarios
5. **[Command Reference](docs/reference/commands.md)** - All commands

**Working with a Team?**

* **[Agile/Scrum Workflows](docs/guides/agile-scrum-workflows.md)** ⭐ - Persona-based collaboration
* **[Project Commands](docs/reference/commands.md#project---project-bundle-management)** - Export/import workflows

**Want Integrations?**

* **[IDE Integration](docs/guides/ide-integration.md)** - VS Code, Cursor setup
* **[Integration Showcases](docs/examples/integration-showcases/)** - Real bugs fixed
* **[GitHub Actions](docs/guides/use-cases.md#use-case-4-cicd-integration)** - CI/CD setup

**Advanced Topics**

* **[Architecture](docs/reference/architecture.md)** - How it works
* **[Schema Versioning](docs/reference/schema-versioning.md)** - Bundle schemas
* **[Testing Guide](docs/technical/testing.md)** - Development setup

👉 **[Full Documentation Index](docs/README.md)** - Browse all documentation

---

## Version 0.22.0

**Latest release** introduces bridge adapter architecture refactoring and OpenSpec integration.

**What's New:**

* ✅ **Bridge Adapter Architecture** - Plugin-based adapter registry pattern for extensible tool integration
* ✅ **OpenSpec Adapter** - Read-only sync from OpenSpec to SpecFact (v0.22.0+)
* ✅ **SpecKitAdapter** - Refactored Spec-Kit integration using adapter pattern
* ✅ **Command Updates** - Constitution commands moved to `specfact sdd constitution`
* ✅ **Breaking Changes** - Removed `specfact bridge` command group, `implement`, and `generate tasks` commands

👉 **[Changelog](CHANGELOG.md)** - Complete release history

---

## Why SpecFact?

### Works with Your Existing Tools

* ✅ **No new platform** - Pure CLI, works offline
* ✅ **No account required** - Fully local, zero vendor lock-in
* ✅ **Integrates everywhere** - VS Code, Cursor, GitHub Actions, pre-commit hooks

### Built for Real Teams

* ✅ **Role-based workflows** - Product Owners, Architects, Developers work in parallel
* ✅ **Markdown-based** - No YAML editing, human-readable conflicts
* ✅ **Agile/scrum ready** - DoR checklists, story points, sprint planning

### Proven Results

* ✅ **Catches real bugs** - See [Integration Showcases](docs/examples/integration-showcases/)
* ✅ **Prevents regressions** - Runtime contract enforcement
* ✅ **Works on legacy code** - Analyzed itself successfully

---

## Contributing

We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

```bash
git clone https://github.com/nold-ai/specfact-cli.git
cd specfact-cli
pip install -e ".[dev]"
hatch run contract-test-full
```

---

## License

**Apache License 2.0** - Open source and enterprise-friendly

* ✅ Free to use for any purpose (commercial or non-commercial)
* ✅ Modify and distribute as needed
* ✅ Enterprise-friendly with explicit patent grant

[Full license](LICENSE.md)

---

## Support

* 💬 **Questions?** [GitHub Discussions](https://github.com/nold-ai/specfact-cli/discussions)
* 🐛 **Found a bug?** [GitHub Issues](https://github.com/nold-ai/specfact-cli/issues)
* 📧 **Need help?** [hello@noldai.com](mailto:hello@noldai.com)
* 🌐 **Learn more:** [noldai.com](https://noldai.com)

---

<div align="center">

**Built with ❤️ by [NOLD AI](https://noldai.com)**

Copyright © 2025-2026 Nold AI (Owner: Dominikus Nold)

**Trademarks**: NOLD AI (NOLDAI) is a registered trademark (wordmark) at the European Union Intellectual Property Office (EUIPO). All other trademarks mentioned in this project are the property of their respective owners. See [TRADEMARKS.md](TRADEMARKS.md) for more information.

</div>
