SPA AI
Sakichi Principle Actuator AI — a GitHub-native developer agent that installs Jidoka halts for failure classes developers currently absorb through vigilance.
"A broken thread must stop the loom." — Sakichi Vision 1
"The loom serves the weaver, not the reverse." — Sakichi Vision 22
When a failure happens, the question is never who missed it but which loom was absent (Vision 92).
Status: Phase 1 — MVP skeleton (CLI; one loom: pre-commit-formatter). Launch target: Phase 5 completion.
What SPA AI does
SPA AI scans a git repository, finds missing Jidoka halts — places where a defect is only caught downstream by a human — and installs them as pull requests. Pre-commit hooks that should exist. Silent-failure patterns that should raise. Type stubs that should be added. Flaky tests that should be quarantined. CI steps that fail-open when they should fail-closed. SPA AI sees where the weaver is standing last-line-of-defense and builds the loom that should have halted instead.
What SPA AI is not
Not an AI assistant. Not a nag bot. Not a karma-scoring surveillance tool. Not a "write code faster" pitch. Not a replacement for the developer.
The doctrinal source
All of SPA AI traces to Toyoda Sakichi (1867–1930), inventor of the Type G automatic loom — the first machine to stop itself when a thread broke. The principle: the operator must not be the last line of defense against defects. See docs/sakichi_100_visions.md for the full lineage.
Install (v0.1, dev)
git clone https://github.com/aki1770-del/spa-ai.git
cd spa-ai
pip install -e ".[dev]"
Requires Python 3.11+. v0.1 has zero runtime dependencies — the first
two looms are deterministic detectors. The Anthropic SDK lands when
the first LLM-driven loom does, per docs/principles.md Principle 1
(Sekishō-idai — accumulate one stone at a time).
Run
Scan a git repo for missing looms:
spa-ai scan /path/to/some/repo
Generate the patch for a specific loom (dry-run by default):
spa-ai propose /path/to/some/repo --loom pre-commit-formatter
Write the patch to disk (the weaver still owns the merge — SPA AI proposes; the human commits and opens the PR):
spa-ai propose /path/to/some/repo --loom pre-commit-formatter --apply
If you have opted into the local telemetry harness (spa-ai scan --report-anonymous-usage), aggregate the local log to see your own
patterns:
spa-ai telemetry aggregate
spa-ai telemetry aggregate --driver-profile ageing-rural --format=json
Counts records by driver_profile, loom_id, and sakichi_vision_id.
Reads only ~/.spa-ai/usage_reports.jsonl (or
$SPA_AI_USAGE_REPORT_PATH); no network call.
There is intentionally no spa-ai alert or spa-ai issue-open
subcommand. Per docs/promises.md Promise 3, the loom is a pull
request, not an alert; if we cannot offer a PR, we do not speak.
Run the test suite
pytest
Releasing
Releases are published to PyPI automatically on tag push via OIDC Trusted Publishing — no API tokens are stored in the repository. The flow:
-
Bump
versioninpyproject.toml. -
Move the
## [Unreleased]section inCHANGELOG.mdto a new## [x.y.z] — YYYY-MM-DDsection; add a fresh empty## [Unreleased]. -
Commit and push to
main. CI (.github/workflows/ci.yml) runs. -
After CI is green on the release commit, tag and push the tag:
git tag v0.5.0 git push origin v0.5.0
-
The tag push triggers
.github/workflows/release.yml, which re-runs the test matrix, builds the sdist + wheel, and publishes to PyPI via OIDC.
One-time PyPI dashboard setup (maintainer)
Trusted Publishing requires a one-time pending-publisher entry on PyPI before the first OIDC publish can succeed. On https://pypi.org/manage/project/spa-ai/settings/publishing/:
- Owner:
aki1770-del - Repository name:
spa-ai - Workflow name:
release.yml - Environment name:
pypi
See https://docs.pypi.org/trusted-publishers/ for the canonical protocol reference.
Roadmap
| Phase | Focus | Steps |
|---|---|---|
| 0 | Identity lock | 1–10 (this commit) |
| 1 | MVP skeleton | 11–25 |
| 2 | Detection engine | 26–45 |
| 3 | Installation engine | 46–65 |
| 4 | Polish | 66–80 |
| 5 | Publishing | 81–95 |
| 6 | Community | 96–100 |
Full plan: docs/launch_plan.md.
License
TBD — to be set before Phase 1.
Metadata
Release files for spa-ai 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| spa_ai-0.5.0.tar.gz | 102.1 kB | With provenance | Details for spa_ai-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| spa_ai-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for spa_ai-0.5.0-py3-none-any.whl |
Total release size: 147.9 kB
Release files / spa_ai-0.5.0.tar.gz
| Download URL | spa_ai-0.5.0.tar.gz |
|---|---|
| Size | 102.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0d1762fd533d45d7117562fc9cf6745962c864efcf13c3d14303afbc96d1b4ba
|
|
BLAKE2b-256 checksum How to use checksums |
d5a55ab36ba0b6394093d8a488a0590e29fb304173c742fabb9c49402c8d4092
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 28, 2026.
Transparency logRelease files / spa_ai-0.5.0-py3-none-any.whl
| Download URL | spa_ai-0.5.0-py3-none-any.whl |
|---|---|
| Size | 45.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ba4e7805beaeecd8743ab39e00f0a963dc5b5068d8b88eb7a865a9ce07a9182
|
|
BLAKE2b-256 checksum How to use checksums |
04065faf91a5ffa4f5168613299fb3fe41f28e2961fa621831f7fb412f6017a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 28, 2026.
Transparency logSecurity for spa-ai 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for spa_ai-0.5.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.