Skip to main content

SPA AI — install Jidoka halts as PRs. A broken thread must stop the loom.

Project description

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

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spa_ai-0.4.0.tar.gz (82.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spa_ai-0.4.0-py3-none-any.whl (35.6 kB view details)

Uploaded Python 3

File details

Details for the file spa_ai-0.4.0.tar.gz.

File metadata

  • Download URL: spa_ai-0.4.0.tar.gz
  • Upload date:
  • Size: 82.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for spa_ai-0.4.0.tar.gz
Algorithm Hash digest
SHA256 cc9ac8badc4e1d0f58b7b2bb93cf2808f66c3e31f66bdda1d984949a0c3603c8
MD5 4592e81e133a6077cc271cbd0c4858c2
BLAKE2b-256 bf05a75d2bfce81e1d50e3e16a56a1acefc8776c2cd96e4c3a4f17901f1af614

See more details on using hashes here.

File details

Details for the file spa_ai-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: spa_ai-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 35.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for spa_ai-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4291e16c55458f69750aed8fb741a5642d20ad05d557dc4e19483485d1dc94dc
MD5 c2a2b9ba88e5cd7d2bd634b750454e82
BLAKE2b-256 ded9b00c8333d35878827e3fc8f9f29989720b3f01c35b7a391d8407ae487047

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page