Skip to content

Commit bd4c2ba

Browse files
frankbriaTest User
andauthored
feat(packaging): publishable codeframe-ai 0.9.0 + PyPI release workflow (#626)
Makes CodeFRAME installable via `uv tool install codeframe-ai` and adds tag-triggered PyPI publishing. Closes the in-repo half of #613; PyPI trusted-publishing setup, the first tag/publish, and the PEP 541 claim remain maintainer actions (documented in the release workflow + PR). Packaging - Fix incomplete wheel: setuptools shipped only the top-level package (2 files), so an installed `cf` crashed on import. Switch to packages.find (all 24 subpackages) + package-data for templates/. - Verified: clean-venv install of the wheel yields a working `cf --help`. - Rename distribution to `codeframe-ai` (`codeframe` is taken on PyPI); keep both `cf` and `codeframe` entry points. - Correct license metadata MIT -> AGPL-3.0 to match LICENSE. - Bump 0.1.0 -> 0.9.0; Development Status -> 4 - Beta; add py3.13. - Remove stray committed coverage artifact (database.py,cover). - Regenerate uv.lock for the rename (also locks already-declared httpx). Release automation - .github/workflows/release.yml: tag (v*) -> uv build -> PyPI trusted publishing (OIDC, no tokens) -> GitHub Release. All actions SHA-pinned. Build job smoke-tests the wheel before publish; tag/version are checked. Docs - CHANGELOG.md (Keep a Changelog), 0.9.0 entry. - README: install via uv tool/uvx/pipx (source install collapsed for contributors); status badge -> beta + PyPI badge; beta stability note. Co-authored-by: Test User <test@example.com>
1 parent fb570bb commit bd4c2ba

6 files changed

Lines changed: 183 additions & 440 deletions

File tree

.github/workflows/release.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: Release
2+
3+
# Publishes codeframe-ai to PyPI and creates a GitHub Release when a version
4+
# tag (vX.Y.Z) is pushed. Uses PyPI Trusted Publishing (OIDC) — no API tokens.
5+
#
6+
# One-time setup required on PyPI before the first tag:
7+
# pypi.org -> project "codeframe-ai" -> Publishing -> add a Trusted Publisher
8+
# with owner=frankbria, repo=codeframe, workflow=release.yml, environment=pypi.
9+
# Until that pending publisher exists, the publish-pypi job will fail by design.
10+
11+
on:
12+
push:
13+
tags:
14+
- "v*"
15+
workflow_dispatch:
16+
17+
permissions:
18+
contents: read
19+
20+
jobs:
21+
build:
22+
name: Build sdist + wheel
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
27+
28+
- name: Set up uv
29+
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
30+
with:
31+
python-version: "3.11"
32+
33+
- name: Verify tag matches package version
34+
if: startsWith(github.ref, 'refs/tags/v')
35+
run: |
36+
TAG="${GITHUB_REF_NAME#v}"
37+
VER="$(grep -m1 '^version = ' pyproject.toml | sed 's/.*"\(.*\)".*/\1/')"
38+
echo "tag=$TAG pyproject=$VER"
39+
if [ "$TAG" != "$VER" ]; then
40+
echo "::error::Tag v$TAG does not match pyproject version $VER"
41+
exit 1
42+
fi
43+
44+
- name: Build
45+
run: uv build
46+
47+
- name: Smoke-test the built wheel installs a working cf
48+
run: |
49+
uv venv /tmp/verify
50+
uv pip install --python /tmp/verify dist/*.whl
51+
/tmp/verify/bin/cf --help
52+
53+
- name: Upload distributions
54+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
55+
with:
56+
name: dist
57+
path: dist/
58+
if-no-files-found: error
59+
60+
publish-pypi:
61+
name: Publish to PyPI
62+
needs: build
63+
runs-on: ubuntu-latest
64+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
65+
environment:
66+
name: pypi
67+
url: https://pypi.org/p/codeframe-ai
68+
permissions:
69+
id-token: write # required for Trusted Publishing
70+
steps:
71+
- name: Download distributions
72+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
73+
with:
74+
name: dist
75+
path: dist/
76+
77+
- name: Publish to PyPI
78+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1
79+
80+
github-release:
81+
name: GitHub Release
82+
needs: publish-pypi
83+
runs-on: ubuntu-latest
84+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
85+
permissions:
86+
contents: write
87+
steps:
88+
- name: Download distributions
89+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
90+
with:
91+
name: dist
92+
path: dist/
93+
94+
- name: Create GitHub Release
95+
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2
96+
with:
97+
files: dist/*
98+
generate_release_notes: true
99+
prerelease: ${{ contains(github.ref_name, 'a') || contains(github.ref_name, 'b') || contains(github.ref_name, 'rc') }}

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Changelog
2+
3+
All notable changes to CodeFRAME are documented here.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project aims to follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
## [0.9.0] - 2026-06-12
11+
12+
First public beta and the first release published to PyPI as
13+
[`codeframe-ai`](https://pypi.org/project/codeframe-ai/). The `codeframe` name
14+
on PyPI is taken by an unrelated package; a [PEP 541](https://peps.python.org/pep-0541/)
15+
name claim is being pursued in parallel. The CLI entry point remains `cf`.
16+
17+
### Added
18+
- **PyPI distribution.** Install with `uv tool install codeframe-ai`, `uvx codeframe-ai`, or `pipx install codeframe-ai`. Both `cf` and `codeframe` console scripts are provided.
19+
- **Release automation.** Tag-triggered workflow builds with `uv build` and publishes to PyPI via [trusted publishing](https://docs.pypi.org/trusted-publishers/) (OIDC, no long-lived tokens). All actions are SHA-pinned.
20+
- **Launch documentation.** `SECURITY.md` (private vulnerability reporting), `LICENSING.md` (plain-language AGPL-3.0 + commercial path), beta issue templates, and a refreshed `CONTRIBUTING.md`.
21+
- This `CHANGELOG.md`.
22+
23+
### Fixed
24+
- **Packaging was incomplete.** The wheel previously shipped only the top-level `codeframe` package (2 files), so an installed `cf` failed on import. Builds now include all subpackages and the `templates/` runtime data via setuptools auto-discovery.
25+
- **Incorrect license metadata.** Package metadata declared MIT; the project is and always has been AGPL-3.0. Metadata now matches the `LICENSE` file.
26+
27+
### Changed
28+
- Version bumped from a placeholder `0.1.0` to an honest beta `0.9.0`; development status classifier moved to `4 - Beta`.
29+
- README installation section now leads with `uv tool install` instead of git-clone; status badge updated to **beta** with a stability statement.
30+
31+
[Unreleased]: https://github.com/frankbria/codeframe/compare/v0.9.0...HEAD
32+
[0.9.0]: https://github.com/frankbria/codeframe/releases/tag/v0.9.0

README.md

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
# CodeFRAME
44

5-
![Status](https://img.shields.io/badge/status-v2%20Active%20Development-blue)
5+
![Status](https://img.shields.io/badge/status-beta-orange)
6+
[![PyPI](https://img.shields.io/pypi/v/codeframe-ai)](https://pypi.org/project/codeframe-ai/)
67
![License](https://img.shields.io/badge/license-AGPL--3.0-blue)
78
![Python](https://img.shields.io/badge/python-3.11%2B-blue)
89
[![CI](https://github.com/frankbria/codeframe/actions/workflows/test.yml/badge.svg)](https://github.com/frankbria/codeframe/actions/workflows/test.yml)
@@ -72,17 +73,39 @@ THE CLOSED LOOP
7273

7374
---
7475

76+
> [!NOTE]
77+
> **CodeFRAME is in public beta (`0.9.0`).** The vision and the Golden Path CLI
78+
> (`cf init/prd/tasks/work/proof/pr`) and v2 API are stable enough to build on;
79+
> the web UI and anything marked "in progress" in
80+
> [`docs/PRODUCT_ROADMAP.md`](docs/PRODUCT_ROADMAP.md) are still moving, and
81+
> on-disk `.codeframe/` formats may change between betas. Expect rough edges and
82+
> [tell us about them](https://github.com/frankbria/codeframe/issues/new/choose).
83+
7584
## Quick Start
7685

7786
**Step 1 — Install**
7887

88+
```bash
89+
uv tool install codeframe-ai # installs the `cf` command globally
90+
cf --help # smoke test — should print the command tree
91+
```
92+
93+
No `uv`? `pipx install codeframe-ai` works too, or run without installing via
94+
`uvx codeframe-ai --help`. (The PyPI package is `codeframe-ai`; the command is `cf`.)
95+
96+
<details>
97+
<summary>Install from source (for contributors)</summary>
98+
7999
```bash
80100
git clone https://github.com/frankbria/codeframe.git && cd codeframe
81101
curl -LsSf https://astral.sh/uv/install.sh | sh
82102
uv venv && source .venv/bin/activate && uv sync
83-
uv run cf --help # smoke test — should print the command tree
103+
uv run cf --help
84104
```
85105

106+
When working from source, prefix the commands below with `uv run`.
107+
</details>
108+
86109
**Step 2 — Set your API key**
87110

88111
```bash
@@ -92,23 +115,23 @@ export ANTHROPIC_API_KEY="sk-ant-..." # get yours at https://console.anthropic
92115
**Step 3 — Initialize your project**
93116

94117
```bash
95-
uv run cf init /path/to/your/project --detect
118+
cf init /path/to/your/project --detect
96119
```
97120

98121
**Step 4 — Think: generate a PRD and tasks**
99122

100123
```bash
101-
uv run cf prd generate # AI-guided Socratic requirements discovery
102-
uv run cf tasks generate # Decompose PRD into atomic tasks with dependencies
103-
uv run cf tasks list # Review what was generated
124+
cf prd generate # AI-guided Socratic requirements discovery
125+
cf tasks generate # Decompose PRD into atomic tasks with dependencies
126+
cf tasks list # Review what was generated
104127
```
105128

106129
**Step 5 — Build, Prove, and Ship**
107130

108131
```bash
109-
uv run cf work batch run --all-ready # Execute all READY tasks (delegates to agent)
110-
uv run cf proof run # Run PROOF9 quality gates
111-
uv run cf pr create # Open a PR with proof report attached
132+
cf work batch run --all-ready # Execute all READY tasks (delegates to agent)
133+
cf proof run # Run PROOF9 quality gates
134+
cf pr create # Open a PR with proof report attached
112135
```
113136

114137
That is the entire workflow. Everything else is optional.

0 commit comments

Comments
 (0)