Metadata-Version: 2.5
Name: agora-framework
Version: 0.4.0
Summary: Language-, LLM-, and process-agnostic lifecycle governance for human and agentic teams
Author: Agora contributors
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
              (an example is provided in the Appendix below).
        
              "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 conspicuously 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 2026 Agora contributors
        
           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
Keywords: agents,governance,lifecycle,orchestration,workflow
Classifier: Development Status :: 3 - Alpha
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
Requires-Python: >=3.11
Requires-Dist: cryptography>=43
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == 'dev'
Requires-Dist: pytest>=8.3; extra == 'dev'
Requires-Dist: ruff>=0.11; extra == 'dev'
Description-Content-Type: text/markdown

# Agora

<p align="center">
  <img src="agora-logo.png" alt="Agora logo" width="760">
</p>

<p align="center">
  <strong>Agents, Governance, Orchestration, Roles & Artifacts</strong>
</p>

<p align="center">
  <a href="https://pypi.org/project/agora-framework/"><img src="https://img.shields.io/pypi/v/agora-framework.svg" alt="PyPI version"></a>
  <a href="https://pypi.org/project/agora-framework/"><img src="https://img.shields.io/pypi/pyversions/agora-framework.svg" alt="Supported Python versions"></a>
  <a href="https://github.com/fabianaguero/agora/actions/workflows/ci.yml"><img src="https://github.com/fabianaguero/agora/actions/workflows/ci.yml/badge.svg" alt="CI status"></a>
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-blue.svg" alt="Apache 2.0 license"></a>
</p>

Agora is a local, Markdown-first, Git-native framework for governing software delivery across
humans, AI agents, services, and swarms. It materializes the roles, lifecycle rules, permissions,
evidence, and durable work records that a team chooses for each project.

Agora is independent of the project's programming language, LLM provider, agent environment, and
development process. Its Python CLI coordinates the protocol; it does not introduce an LLM SDK or
runtime into the governed codebase.

## Project status

Agora is an **alpha (`0.x`) framework that is ready for controlled pilots**. The published CLI can
initialize and adopt repositories, execute complete governed workflows, authenticate actors,
coordinate recursive swarms, run reviewed external tools, and validate its durable state.

| Area | Current maturity |
| --- | --- |
| Core lifecycle | Implemented, exercised end to end, and covered by automated tests |
| Bundled workflows | Spec-Driven, Scrum, and Kanban Method Packs |
| Actor forms | Human, AI, service, automation, and recursively composed swarm |
| Integrations | Provider-neutral Tool Packs plus reviewed native CLI adapters |
| Persistence | Human-readable Markdown in the filesystem, designed for Git review |
| Compatibility | Explicit project migrations and `agora upgrade` support |
| Stability | Alpha: CLI and Markdown contracts may still evolve before `1.0` |

Use Agora now for evaluation and controlled team adoption. Before production use, review the
selected Method Pack, actor permissions, execution environment, external adapters, and recovery
policy for your organization.

## Why Agora

- **One governance model for every participant.** A role can be held by a human, an AI, a service,
  or a swarm without changing the lifecycle contract.
- **Process is configuration.** Method Packs define roles, states, transitions, gates, evidence,
  and work-in-progress rules; Scrum and Kanban are examples, not hard-coded behavior.
- **The LLM remains replaceable.** Codex, Claude, local models, and custom runners consume the same
  portable commands without provider dependencies in the core.
- **Work survives the session.** Decisions, handoffs, approvals, signatures, artifacts, Tool Runs,
  and usage records remain inspectable in `.agora/` and Git.
- **External tools stay governed.** Provider-neutral capabilities are translated by reviewed,
  bounded adapters that prefer an installed native CLI.

Agora complements issue trackers, source hosts, CI/CD systems, documentation platforms, and cloud
providers. It is not a project-management UI, an agent runtime, or a replacement for those systems.

## Architecture

```mermaid
flowchart LR
    H[Human] --> CLI[Agora CLI]
    A[AI agent] --> CLI
    S[Swarm] --> CLI

    CLI --> P[Project protocol<br/>.agora/]
    P --> M[Method Packs]
    P --> T[Tool Packs]
    P --> R[Durable records<br/>work, evidence, actions]

    T --> C[Reviewed native CLI adapters]
    C --> E[GitHub, GitLab, Jira,<br/>Confluence, CI/CD, cloud]

    G[Git] <--> P
```

Configuration is resolved predictably:

```text
Agora defaults < ~/.agora < project .agora < swarm configuration
```

## Install

Agora requires Python 3.11 or newer. Install the published CLI with
[`uv`](https://docs.astral.sh/uv/):

```bash
uv tool install agora-framework
agora self-test
```

To work from this repository:

```bash
uv sync --extra dev
uv run agora self-test
```

`self-test` runs the role conformance harness in temporary workspaces. It exercises every bundled
method with human, AI, and swarm role holders without changing the current project.

See [Installation and customization](docs/guides/installation-and-customization.md) for user-level
configuration, upgrades, editable installs, and team rollout options.

## Guided setup

The recommended first experience is an interactive review of runtime, model, Method Pack, starter
team, actor security, Git branch, and persistence scope:

```bash
cd my-project
agora setup
```

For an existing Git repository, `agora adopt` runs the read-only preflight before showing or
applying the plan. Both wizards collect one decision at a time and write nothing before final
confirmation. See the [guided setup guide](docs/guides/guided-setup.md).

Create and advance daily work without assembling long commands:

```bash
agora work start
agora continue
agora work finish
```

`work start` selects a ready swarm and compatible assigned actor, collects acceptance criteria one
at a time, and writes only after review. `continue` previews one bounded action. At a human boundary
it lets the role holder act directly, use a capability-compatible AI executor without surrendering
the role, or create a formal handoff when responsibility truly changes. `work finish` reviews
criteria, artifacts, evidence, Git policy, and approvals before recording explicit acceptance and
the Method Pack completion transition. The declarative commands remain the stable automation
surface.

## Start a governed project

### Adopt an existing repository

Run the read-only adoption preflight, then create the governed feature branch and workspace:

```bash
cd existing-service
agora adopt --check --id payment-idempotency --base main
agora quickstart \
  --id payment-idempotency \
  --base main \
  --objective "Deliver payment idempotency"
```

The preflight checks repository state, branch safety, runtime availability, reserved identities,
existing Agora state, and ignore rules. Quickstart is transactional: if a later step fails, Agora
rolls back the branch and state it created.

The executable [existing-codebase pilot](samples/existing-codebase-feature/README.md) demonstrates
this path without requiring an LLM account or network service.

### Start in a new repository

```bash
mkdir my-project
cd my-project
git init
agora quickstart --objective "Ship the first increment"
```

Quickstart initializes the protocol, registers a human and an AI actor, creates a swarm, assigns the
roles required by the active Method Pack, and writes the selected environment adapter.

Add `--secure` to generate an external Ed25519 keypair for each quickstart actor and require signed
authentication:

```bash
agora quickstart --objective "Ship the first increment" --secure
```

Private keys remain outside Agora. Only public identity, rotation or revocation history, and signed
verification evidence become durable protocol records.

## What Agora creates

Agora installs operational Markdown rather than a hidden database:

```text
<project>/
├── .agora/
│   ├── project.md              # Effective project configuration
│   ├── constitution.md         # Project principles and restrictions
│   ├── PROTOCOL.md             # Collaboration protocol
│   ├── STANDARDS.md            # Cross-actor engineering standards
│   ├── PACKS.lock.md           # Deterministic pack composition
│   ├── methods/                # Roles, transitions, gates, and policy
│   ├── actors/                 # Actor identity and public-key history
│   ├── swarms/                 # Work state and usage ledgers
│   ├── actions/                # Prepared and applied mutations
│   ├── artifacts/              # Governed artifact references
│   ├── sessions/               # Resolved execution context
│   └── tool-runs/              # External invocation requests and results
└── .agents/ or .claude/        # Environment-specific command projection
```

The repository ships the sources for these files under [`packs/`](packs/). Actor, swarm, action,
work, evidence, and Tool Run records are created dynamically as work progresses. The
[artifact location reference](docs/reference/artifact-locations.md) maps distribution sources to
their materialized project paths.

## Choose a workflow

The active Method Pack defines the lifecycle, not the CLI core.

| Bundled method | Best fit | Governs |
| --- | --- | --- |
| `spec-driven` | Feature work that needs explicit intent before implementation | Clarification, specification, planning, implementation, validation |
| `scrum` | Time-boxed delivery with accountable product and facilitation roles | Backlog, sprint flow, review, acceptance, increment evidence |
| `kanban` | Continuous pull-based delivery | Queue policy, WIP limits, review, service acceptance |

Teams can author and install a custom Method Pack for another process without changing Agora's
kernel. Start with the [Method Pack reference](docs/reference/method-packs.md) and the
[custom lifecycle sample](samples/custom-lifecycle/README.md).

## Choose an agent environment

```bash
agora configure --integration codex
agora configure --integration claude
agora configure --integration generic --provider internal --model reviewed-model
```

| Integration | Execution model |
| --- | --- |
| `codex` | Materializes portable commands for the installed Codex CLI |
| `claude` | Materializes the same protocol for the installed Claude CLI |
| `generic` | Uses an explicit structured runner supplied at launch time by the team |

The configured model and provider are project or user choices. Agora governs the resulting work;
it does not embed provider credentials or an LLM client in its core. See
[LLM environments](docs/guides/llm-environments.md). Generic sessions accept the runner explicitly,
for example `agora run --runner "company-agent run" --launch`.

## Run the daily loop

```mermaid
sequenceDiagram
    participant O as Role holder
    participant A as Agora
    participant F as Filesystem and Git
    participant X as External runtime or tool

    O->>A: Inspect next authorized action
    A->>F: Resolve method, role, work, and evidence
    A-->>O: Return bounded action and context
    O->>X: Perform or launch governed work
    X-->>A: Submit result and evidence
    A->>F: Validate and persist transition
    O->>F: Review and commit durable records
```

Use the guided controller for one reviewed action at a time. The explicit controller remains
available for bounded automation:

```bash
agora continue
agora work finish
agora next
agora run --until-blocked --max-steps 10
agora inbox
agora validate
git status --short
```

Every lifecycle mutation is checked against the active Method Pack at the time it is applied. In
authenticated projects, mutations use prepared `ACTION.md` intents whose signatures bind the actor,
operation, work preconditions, and materialized session context.

The [operational loop guide](docs/guides/operational-loop.md) covers stopping, resuming, human
handoffs, and durable failure recovery.

## Ecosystem integrations

Agora separates stable capabilities from provider-specific translation:

- Provider-neutral Tool Packs cover repositories, code review, work management, CI/CD, releases,
  repository governance, security scanning, documentation, cloud infrastructure, observability,
  and portfolio management.
- Reviewed CLI adapters currently cover the GitHub and GitLab delivery ecosystems, Jira,
  Confluence, Terraform, and read-only AWS and Google Cloud inventory.
- Native CLIs are preferred when they are installed, version-compatible, and non-interactive. MCP
  remains an explicit alternative transport rather than an implicit dependency.

```mermaid
flowchart TD
    W[Governed work] --> P[Provider-neutral operation]
    P --> A[Reviewed adapter]
    A --> V{CLI version and<br/>capability valid?}
    V -- no --> B[Block with durable reason]
    V -- yes --> Q[Prepared structured command]
    Q --> R[Bounded external runner]
    R --> E[Redacted result and evidence]
    E --> D[Durable Tool Run]
```

Adapter commands are structured and shell-free, contain no credentials, and have explicit timeout
and captured-output limits. Write or destructive capabilities such as merge, deployment, release
publication, infrastructure apply, and incident resolution remain opt-in and policy-controlled.

See the [GitHub ecosystem guide](docs/guides/github-ecosystem.md),
[CLI-first adapter guide](docs/guides/cli-first-adapters.md), and
[Tool Pack reference](docs/reference/tool-packs.md).

## Security model

Agora enforces governance at the protocol boundary while leaving operating-system isolation and
credential custody to the execution environment:

- Actor private keys and provider credentials are never stored by Agora.
- Public-key rotation and revocation history remain auditable.
- Authenticated changes are prepared, signed externally, verified, and revalidated before apply.
- Tool permissions are bounded by actor capability, role, Method Pack policy, evidence, and explicit
  approvals.
- Tool Sync is read-only and explicit; Agora performs no background reconciliation.
- Containers or external runners provide filesystem, network, syscall, and resource isolation.

Read [Actor authentication](docs/guides/actor-authentication.md),
[Signed lifecycle actions](docs/guides/signed-lifecycle-actions.md), and
[Execution boundaries](docs/guides/execution-boundaries.md) before enabling authenticated or
write-capable integrations.

## Verify Agora

Run the installed role harness:

```bash
agora self-test
```

Run the repository's complete verification pipeline:

```bash
uv sync --extra dev
uv run python scripts/verify_all.py
```

The verifier formats and lints Python, runs unit and failure-path tests, validates documentation
links and packaging, exercises the role harness, discovers and runs every executable sample, and
builds the distribution. CI repeats the supported Python-version matrix and the complete verifier.

For focused commands and expected output, see [Complete verification](docs/guides/verification.md)
and [Role conformance test harness](docs/guides/self-test.md).

## Current boundaries

Agora deliberately does not claim that governance files alone make arbitrary agent output safe or
correct. Teams remain responsible for reviewing their Method Packs, custom runners, external tool
authority, product evidence, and infrastructure isolation.

During the alpha series:

- CLI and Markdown schemas may change with explicit migrations.
- Custom Method and Tool Packs need organization-specific conformance and failure-path tests.
- Provider behavior outside a reviewed adapter's exact operation subset is unsupported.
- Production authorization should use organization-managed identities and keys, not quickstart
  credentials.
- External systems remain sources of operational state; Agora persists their verified references
  and evidence rather than silently mirroring them.

## Documentation

Start with:

- [Visual adoption guide](docs/adoption.md)
- [Quickstart guide](docs/guides/quickstart.md)
- [Getting started](docs/getting-started.md)
- [Installation and customization](docs/guides/installation-and-customization.md)

Understand the model:

- [Architecture](docs/architecture.md)
- [Domain model](docs/domain-model.md)
- [Documentation and artifact locations](docs/reference/artifact-locations.md)
- [Full documentation index](docs/README.md)

Operate and extend it:

- [Operations and validation](docs/guides/operations-and-validation.md)
- [Project upgrades](docs/guides/project-upgrades.md)
- [Method Pack reference](docs/reference/method-packs.md)
- [Tool Pack reference](docs/reference/tool-packs.md)
- [Pack registries and trust](docs/guides/pack-registries.md)

Executable scenarios live under [`samples/`](samples/). They are part of the verification suite and
show the protocol working without requiring live provider credentials.

## Development

```bash
uv sync --extra dev
uv run python scripts/verify_all.py
```

Contributions must preserve Agora's language, model, provider, and process independence; keep the
protocol Markdown-first; and use Conventional Commits. See [CONTRIBUTING.md](CONTRIBUTING.md).

## License

Agora is licensed under the [Apache License 2.0](LICENSE).
