Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
8528498
docs(specs): rename spec files from 07 to 09 prefix
ryderstorm Nov 21, 2025
19d3a94
feat: update package name from slash-command-manager to slash-man
ryderstorm Nov 21, 2025
2eafb73
feat: update user-facing documentation to use slash-man
ryderstorm Nov 21, 2025
ca16b20
feat: verify GitHub workflows and configuration files
ryderstorm Nov 21, 2025
df64459
feat: verify package builds and tests pass after rename
ryderstorm Nov 21, 2025
064a953
fix(rename): update remaining references to complete package rename
ryderstorm Nov 21, 2025
d6b06d8
docs(specs): add validation report for package rename to slash-man
ryderstorm Nov 21, 2025
1c6f159
chore: delete obsolete files
ryderstorm Nov 21, 2025
8a15de6
docs(specs): add PyPI publishing specification and tasks
ryderstorm Nov 21, 2025
b6d328f
feat: add build documentation to README.md
ryderstorm Nov 21, 2025
5e4230f
docs: mark task 1.0 as complete
ryderstorm Nov 21, 2025
cb9c654
feat: create PyPI publishing GitHub Actions workflow
ryderstorm Nov 21, 2025
75453af
docs: mark task 2.0 as complete
ryderstorm Nov 21, 2025
99f6eb6
feat: update package metadata in pyproject.toml for PyPI publishing
ryderstorm Nov 21, 2025
1a551a3
feat: add dev release job to CI workflow for Test PyPI publishing
ryderstorm Nov 21, 2025
846a3de
fix: use version_toml instead of version_variables for pyproject.toml
ryderstorm Nov 21, 2025
082128a
fix: ensure uv.lock is updated when version changes
ryderstorm Nov 21, 2025
a2b0b07
refactor: simplify release workflow now that build_command handles uv…
ryderstorm Nov 21, 2025
94b6d9c
fix(ci): remove --system flag from uv pip install in dev-release job
ryderstorm Nov 21, 2025
eb4d340
fix(ci): checkout PR branch instead of detached HEAD in dev-release job
ryderstorm Nov 21, 2025
71af490
fix(ci): use repository-url instead of deprecated pypi-url parameter
ryderstorm Nov 21, 2025
3f53fd7
ci: testing config
ryderstorm Nov 21, 2025
296db23
fix(ci): improve dev-release version generation and verification
ryderstorm Nov 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,84 @@ jobs:

- name: Run integration tests
run: docker run --rm --entrypoint="" slash-man-test sh -c "cd /app && uv run pytest tests/integration/ -v -m integration"

dev-release:
name: Dev Release (Test PyPI)
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' && vars.RUN_DEV_RELEASE_JOBS == 'true' }}
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
fetch-tags: true

- name: Install uv (with cache)
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: |
**/pyproject.toml
**/uv.lock

- name: Install Python
run: uv python install 3.12

- name: Sync dependencies (frozen)
run: uv sync --all-groups --extra dev --frozen

- name: Install python-semantic-release
run: uv pip install "python-semantic-release>=10.0.0,<11.0.0"

- name: Generate dev version
id: dev-version
run: |
VERSION=$(uv run semantic-release -c .releaserc.toml version --as-prerelease --prerelease-token dev --build-metadata $(git rev-parse --short HEAD) --no-changelog --no-vcs-release --no-commit --no-tag --print)
echo "Generated version: $VERSION"
echo "version=$VERSION" >> $GITHUB_OUTPUT


- name: Verify version was generated
run: |
VERSION="${{ steps.dev-version.outputs.version }}"
SHA_SHORT="${{ github.sha }}"
SHA_SHORT="${SHA_SHORT:0:7}"
if [[ ! "$VERSION" =~ dev ]] || [[ ! "$VERSION" =~ $SHA_SHORT ]]; then
echo "❌ Version verification failed: $VERSION"
echo "Expected version to contain 'dev' and SHA prefix '$SHA_SHORT'"
exit 1
fi
echo "✅ Version verified: $VERSION"

- name: Verify uv.lock and pyproject.toml were updated
run: |
if ! git diff --exit-code uv.lock pyproject.toml; then
echo "❌ uv.lock and pyproject.toml were not updated"
exit 1
fi
echo "✅ uv.lock and pyproject.toml were updated"
Comment on lines +264 to +270
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Critical: Inverted git diff logic will cause dev-release to fail when files ARE updated.

The condition if ! git diff --exit-code uv.lock pyproject.toml evaluates to true when files DIFFER (i.e., were updated), but the error message indicates the opposite intent. This will fail the job when the version update succeeds.

git diff --exit-code returns 0 for no changes and 1 for changes. Remove the ! negation:

-      - name: Verify uv.lock and pyproject.toml were updated
+      - name: Verify uv.lock and pyproject.toml are unchanged by dev version
         run: |
-          if ! git diff --exit-code uv.lock pyproject.toml; then
-            echo "❌ uv.lock and pyproject.toml were not updated"
+          if git diff --exit-code uv.lock pyproject.toml; then
+            echo "❌ uv.lock and pyproject.toml were unexpectedly modified"
             exit 1
           fi
-          echo "✅ uv.lock and pyproject.toml were updated"
+          echo "✅ uv.lock and pyproject.toml are unchanged"

(Alternatively, if the intent is to verify the files WERE updated, use git diff HEAD to check against the previous commit rather than the working tree.)

🤖 Prompt for AI Agents
.github/workflows/ci.yml around lines 264 to 270: the current check inverts the
git-diff logic by using `if ! git diff --exit-code uv.lock pyproject.toml`,
which causes the job to fail when the files have changed; remove the leading
negation so the condition reads `if git diff --exit-code ...` to fail when there
are differences, or if the goal is to verify that the files were updated
relative to the previous commit, change the check to compare against HEAD (e.g.,
`git diff --exit-code HEAD -- uv.lock pyproject.toml`); update the error/success
messages accordingly.


- name: Build package
run: uv run python -m build --wheel --sdist

- name: Verify build artifacts
run: |
echo "Build artifacts:"
ls -lh dist/
if [ -z "$(ls -A dist/*.whl 2>/dev/null)" ] || [ -z "$(ls -A dist/*.tar.gz 2>/dev/null)" ]; then
echo "❌ Build artifacts missing!"
exit 1
fi
echo "✅ Build artifacts verified"

- name: Publish to Test PyPI
uses: pypa/gh-action-pypi-publish@v1.13.0
with:
verbose: true
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
packages-dir: dist/
71 changes: 71 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Publish to PyPI

on:
release:
types: [published]

permissions:
id-token: write
contents: write

jobs:
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- name: Install uv (with cache)
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: |
**/pyproject.toml
**/uv.lock

- name: Install Python
run: uv python install 3.12

- name: Sync dependencies (frozen)
run: uv sync --all-groups --extra dev --frozen

- name: Install build package
run: uv pip install --system build

- name: Build package
run: uv run python -m build --wheel --sdist

- name: Verify build artifacts
run: |
echo "Build artifacts:"
ls -lh dist/
if [ -z "$(ls -A dist/*.whl 2>/dev/null)" ] || [ -z "$(ls -A dist/*.tar.gz 2>/dev/null)" ]; then
echo "❌ Build artifacts missing!"
exit 1
fi
echo "✅ Build artifacts verified"

- name: Publish to Test PyPI
uses: pypa/gh-action-pypi-publish@v1.13.0
with:
pypi-url: https://test.pypi.org/legacy/
packages-dir: dist/

- name: Publish to Production PyPI
uses: pypa/gh-action-pypi-publish@v1.13.0
with:
packages-dir: dist/

- name: Upload release assets
uses: softprops/action-gh-release@v2
with:
files: |
dist/*.whl
dist/*.tar.gz
44 changes: 14 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,38 +68,22 @@ jobs:
**/pyproject.toml
**/uv.lock

- name: Update uv.lock and build package
- name: Verify uv.lock is up to date
run: |
set -euo pipefail
# Update lock file to ensure it's in sync with current dependencies
uv lock
# Stage uv.lock so semantic-release can commit it as an asset
# Note: semantic-release will automatically commit:
# - pyproject.toml (version update via version_variables)
# - CHANGELOG.md (generated via changelog.default_templates)
# - uv.lock (listed in assets, so we stage it here)
git add uv.lock
# Only rebuild if uv.lock changed (CI already verified build works)
if ! git diff --cached --quiet uv.lock; then
echo "⚠️ uv.lock was updated, verifying build still works..."
if ! uv run python -m build --wheel --sdist; then
echo "❌ Package build failed after uv.lock update!"
echo ""
echo "The build step failed after updating uv.lock, which means"
echo "semantic-release cannot proceed."
echo ""
echo "Common causes:"
echo " - Dependency version conflicts in updated lock file"
echo " - Build hooks failing (check hatch_build.py)"
echo " - Missing required files (e.g., server.py)"
echo ""
echo "Check the build output above for specific errors."
exit 1
fi
echo "✅ Package built successfully with updated uv.lock"
else
echo "✅ uv.lock unchanged, skipping build (already verified in CI)"
fi
# Verify lock file is in sync with current dependencies (before version change)
# This ensures dependencies are current before semantic-release updates the version
uv lock --check || {
echo "❌ uv.lock is out of sync with pyproject.toml"
echo "Run 'uv lock' locally and commit the updated uv.lock file"
exit 1
}
echo "✅ uv.lock is up to date"
# Note: semantic-release will automatically:
# 1. Update pyproject.toml version (via version_toml)
# 2. Run build_command which updates uv.lock with new version (via uv lock --upgrade-package)
# 3. Stage uv.lock (via build_command)
# 4. Commit pyproject.toml, CHANGELOG.md, and uv.lock together

- name: Install python-semantic-release
run: uv pip install --system "python-semantic-release>=10.0.0,<11.0.0"
Expand Down
15 changes: 13 additions & 2 deletions .releaserc.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,20 @@ tag_format = "v{version}"
# Allow 0.x.x versions (required for pre-1.0.0 releases)
allow_zero_version = true
# Update the version field in pyproject.toml
version_variables = ["pyproject.toml:project.version"]
# Use version_toml (not version_variables) for TOML files
version_toml = ["pyproject.toml:project.version"]
# Generate changelog and commit version bumps
# Ensure uv.lock stays in sync with version changes and is committed
# pyproject.toml is automatically committed when updated via version_toml
# build_command runs after version is updated in pyproject.toml to refresh uv.lock
build_command = """
uv lock --upgrade-package "$PACKAGE_NAME"
git add uv.lock
"""
assets = ["uv.lock"]
# Note: build_command removed - handle build steps in workflow if needed

# Commit message for release commits - includes [skip ci] to prevent CI from running
commit_message = "chore(release): {version} [skip ci]\n\nAutomatically generated by python-semantic-release"

[semantic_release.changelog]
# Generate CHANGELOG.md in Markdown
Expand All @@ -17,6 +26,8 @@ default_templates = { changelog_file = "CHANGELOG.md", output_format = "md" }
[semantic_release.branches]
# Release from the main branch
main = { match = "main" }
# Allow prereleases from feature branches (for dev-release job testing)
dev = { match = "^(feat|fix|perf)/.+", prerelease = true, prerelease_token = "dev" }

[semantic_release.remote]
# Use GitHub token from environment variable
Expand Down
42 changes: 39 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,13 @@ Build the Docker image and run it interactively:

```bash
# Build the Docker image
docker build -t slash-command-manager .
docker build -t slash-man .

# Run interactively with shell access
docker run -it --rm slash-command-manager bash
docker run -it --rm slash-man bash

# Or run directly with the CLI
docker run -it --rm slash-command-manager slash-man generate --list-agents
docker run -it --rm slash-man slash-man generate --list-agents
```

### Running Tests
Expand All @@ -282,6 +282,42 @@ uv run python -m build
pip install dist/*.whl
```

## Building the Package

The package can be built using the `python -m build` command, which creates distribution files for publishing to PyPI. The build process uses the `pyproject.toml` configuration file to determine package metadata and structure.

### Build Process

To build the package, run:

```bash
python -m build
```

This command creates both a wheel (`.whl`) and source distribution (`.tar.gz`) file in the `dist/` directory. The wheel file is the preferred distribution format for most users, while the source distribution provides the raw source code for users who need to build from source.

### Manual Publishing

To manually publish the built package to PyPI, use `twine`:

```bash
# Install twine if not already installed
pip install twine

# Upload to Test PyPI (for testing)
twine upload --repository testpypi dist/*

# Upload to Production PyPI
twine upload dist/*
```

**Note:** Manual publishing requires PyPI credentials. You can use either:

- An API token (recommended): Create one in your PyPI account settings
- Username and password: Your PyPI account credentials

For Test PyPI, use the `--repository testpypi` flag. For Production PyPI, omit the flag.

## SDD Workflow Integration

This package was extracted from the [SDD Workflow](https://github.com/liatrio-labs/spec-driven-workflow) repository to enable independent versioning and release cycles.
Expand Down
88 changes: 0 additions & 88 deletions RELEASE_NOTES_v1.0.0.md

This file was deleted.

Loading
Loading