c454a3af10
* feat(skill): replace skill-pack with per-harness conditional compiler
skillbuild compiles the skill tree into per-target harness builds:
- <!-- skill:if omp,!claude --> blocks include text only for matching
targets; name-list conditions only, no else/nesting, fail-loud on
unknown targets and unpaired/nested directives
- fence-aware: directive-looking lines inside code fences are literal
- layout is the filesystem; tree root configured in skillproj.toml
- post-build assertion: zero directive residue, SKILL.md frontmatter
name check
Migration to the new model:
- docs/skill/ becomes the self-contained source root (SKILL.md,
references/, generated api/stdlib/core/guides now under
references/docs/; SDK_OVERVIEW/LICENSE/inspect are ordinary tree
files)
- auto_docs_gen output redirected into the tree (docs/api ->
docs/skill/references/docs/api, likewise stdlib)
- skills/simplecadapi/ is now the compiled omp target output;
dist/generic/simplecadapi the generic target
- dropped skill-pack entry point (plus dangling evolve/make-export
entries and their orphaned test), release workflow builds via
skillbuild + tar; README updated
First real conditional block: harness reading paths in SKILL.md
(skill:// mount on omp vs disk-relative on generic).
Verified: 59 tests pass (skillbuild 31, auto_docs_gen 19, persistence
regression 9); both targets build; outputs residue-clean; full suite
collects (1376 tests).
* refactor(tools): auto_docs_gen moves out of the installed package
tools/ scripts are repo-checkout dev scripts, not packaged CLIs:
- auto_docs_gen.py now lives in tools/ beside the other generators;
auto_tools/ package removed entirely
- path resolution simplifies: repo root = parent of tools/, fail-loud
if pyproject.toml missing; site-packages/cwd fallback branches were
dead code once the script stopped shipping in the wheel
- auto-docs-gen console script dropped from [project.scripts];
release.yml and README invoke python tools/auto_docs_gen.py
- MANIFEST.in stale src/auto_tools include removed; CadQuery-free
runtime scan no longer needs the auto_tools filter
- run_examples.py retired (user removal): README example-runner text
updated to direct examples/ scripts; dangling runner-contract test
(runpy.run_path into the deleted script) removed
Verified: 53 tests pass (auto_docs_gen + skill_build + ocp runtime
scan) and test_example_model_contract passes; regeneration from
tools/ is byte-identical (zero docs drift).
* refactor(skill): strip harness and build-tool content from the skill tree
The skill is plain harness-neutral content again:
- SKILL.md 'Reading skill files' section removed (the omp skill://
mount block and its !omp complement were the only conditional
blocks; the tree compiles identically for every target now)
- references/README.md: build-tool meta removed ('per-harness
conditional compilation', skillbuild packaging/validation claims —
link validation was never implemented, so the claim was false)
- live test now asserts the tree stays harness-neutral (zero blocks)
- skillproj.toml targets aligned with the user's output table
(omp -> skills/simplecadapi-omp, opencode -> skills/simplecadapi-opencode;
leftover 'generic' entry had no output and failed the build)
- compiled outputs are regenerable artifacts: skills/simplecadapi/
untracked from git, skills/simplecadapi-*/ gitignored, release.yml
and README build via skillbuild and tar the omp output directly
(bsdtar has no --transform; inner dir keeps its suffixed name)
Verified: 49 tests pass; both targets build 372 files with zero
conditional blocks; no omp/conditional/directive residue in the tree
or outputs.
* chore(docs): drop stale architecture review and design notes
102 lines
3.0 KiB
YAML
102 lines
3.0 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag:
|
|
description: Existing v-prefixed tag to release
|
|
required: true
|
|
type: string
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: release-${{ github.ref_name }}
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
release:
|
|
name: Test, build, and release
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
permissions:
|
|
contents: write
|
|
env:
|
|
RELEASE_TAG: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref_name }}
|
|
|
|
steps:
|
|
- name: Check out tagged revision
|
|
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
|
|
with:
|
|
ref: ${{ env.RELEASE_TAG }}
|
|
fetch-depth: 0
|
|
|
|
- name: Install uv and Python
|
|
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
|
with:
|
|
python-version: "3.12"
|
|
enable-cache: true
|
|
cache-python: true
|
|
|
|
- name: Validate tag and project version
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
if [[ ! "$RELEASE_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+([ab]|rc)?[0-9]*$ ]]; then
|
|
echo "Invalid release tag: $RELEASE_TAG" >&2
|
|
exit 1
|
|
fi
|
|
project_version="$(uv run --python 3.12 --no-project python - <<'PY'
|
|
import tomllib
|
|
with open('pyproject.toml', 'rb') as file:
|
|
print(tomllib.load(file)['project']['version'])
|
|
PY
|
|
)"
|
|
if [[ "$RELEASE_TAG" != "v$project_version" ]]; then
|
|
echo "Tag $RELEASE_TAG does not match pyproject version $project_version" >&2
|
|
exit 1
|
|
fi
|
|
|
|
- name: Install locked dependencies
|
|
run: uv sync --locked --group dev --extra collision
|
|
- name: Install headless rendering support
|
|
run: sudo apt-get update && sudo apt-get install --yes xvfb
|
|
|
|
|
|
- name: Compile package
|
|
run: uv run python -m compileall -q src/simplecadapi
|
|
|
|
- name: Run tests
|
|
run: xvfb-run --auto-servernum uv run pytest test tests -q
|
|
|
|
- name: Build wheel and source distribution
|
|
run: uv build
|
|
|
|
- name: Verify distributions
|
|
run: uv run twine check dist/*
|
|
- name: Build and verify Agent Skill archive
|
|
run: |
|
|
uv run python tools/auto_docs_gen.py --quiet
|
|
uv run python tools/skillbuild.py --target omp
|
|
uv run pytest test/test_skill_build.py -q
|
|
tar -C skills -czf skills/simplecadapi.tar.gz simplecadapi-omp
|
|
|
|
|
|
- name: Create GitHub release
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: |
|
|
release_flags=()
|
|
if [[ "$RELEASE_TAG" =~ (a|b|rc)[0-9]+$ ]]; then
|
|
release_flags+=(--prerelease --latest=false)
|
|
fi
|
|
gh release create "$RELEASE_TAG" dist/* skills/simplecadapi.tar.gz \
|
|
--verify-tag \
|
|
--generate-notes \
|
|
--title "$RELEASE_TAG" \
|
|
"${release_flags[@]}"
|