A general-purpose AI system intelligence layer for discovering, understanding, auditing, researching, designing, improving, and verifying software systems — ordinary repositories, packages, services, Agents, Agent Skills, MCP servers, and multi-repository ecosystems.
This is not a video-production tool. The AI Video Production OS project
is planned as a reference target used to validate the architecture, not a
source of core assumptions (see docs/design/ARCHITECTURE_DECISIONS.md,
ADR-001).
OBSERVE → UNDERSTAND → ANALYZE → RESEARCH → AUDIT → DESIGN
→ RECOMMEND → PROPOSE → EXECUTE WITH APPROVAL → VERIFY
- Evidence-first. Every finding, recommendation, and proposal traces back
to
Evidencewith an explicit confidence level (verified,high,medium,low,unknown). An inferred relationship is never presented as a verified fact. - Deterministic before semantic. Parsers, filesystem inspection, git metadata, and static analysis produce facts; LLM reasoning interprets evidence and proposes hypotheses, it does not manufacture facts.
- Read-only by default. Discovery, analysis, and research never write to
a target. Local writes (branch/commit) and remote writes (pushing that
branch, opening a Draft PR) each require their own explicit
Approvalrecord — approving one never authorizes the other; merge, close, delete, force-push, visibility, credential, and deployment operations are never triggered automatically (seedocs/design/docs/08-governance.md).
Pre-alpha, but functional. Discovery (local paths and, read-only,
GitHub repositories), deterministic analysis, the Relationship graph,
external research, the recommendation/proposal engines, Component Update
Intelligence, human-approved local and remote execution (branch/commit,
and pushing it as a Draft PR), the static HTML report, and the
interactive Dashboard are all implemented and covered by tests — see
docs/design/docs/16-roadmap.md for the full roadmap and
Commands below for what si can do today. Not yet
implemented: a plugin loader for external Skills/Agents (the capability
registry is a static Python dict), and package-registry/Capability-Contract
adapters beyond PyPI/npm/crates.io/Go/Maven (Gradle, RubyGems).
Read-only unless noted. Every <target> below except si execute's
(which writes a local branch/commit, so it only makes sense against a
real local checkout) accepts a local path or a GitHub repository
(owner/repo, or a https://github.com/... URL — shallow-cloned
read-only into a temp directory first):
| Command | What it does |
|---|---|
si inspect <target> |
Repository/Skill/Agent (.claude/agents/*.md)/CI/doc inventory |
si diagnose <target> |
Discovery + deterministic analysis → Findings; --field instead audits every skill of an ecosystem for field readiness (below) |
si report <target> |
Static, offline-viewable HTML report |
si dashboard <target> |
Interactive "System Intelligence Console" (see below) |
si schema |
Export JSON Schema files for the canonical snapshot format (no target) |
si diff <from> <to> |
Diff two canonical snapshot directories |
si research <query> |
Search for existing solutions — --provider github (default) or --provider mcp-registry (network) |
si check-updates <target> |
Component Update Intelligence: current vs. available state for pypi/npm/cargo/go/maven dependencies (network); --check-vulnerabilities also looks up known vulnerabilities (OSV.dev) for each resolved version; --plan-out DIR writes a ready-to-run ChangePlan for a pypi/npm/go exact-pin bump or a Cargo.toml simple-string-form one, no hand-written JSON needed |
si improve <target> |
Findings → ranked Recommendations |
si propose <problem> |
Adopt/integrate/create decision → a Proposal; --target-kind skill|agent|mcp_server|... shapes test/documentation guidance and the declared interface to that kind; --target <path> --handoff-out FILE exports a self-contained packet (Proposal + the ChangePlan file schema) for a human or an external implementer (e.g. Claude Code) to turn into an executable plan — SI itself never authors that diff |
si plan <intent-or-text> |
Preview which capabilities a request would run |
si execute <plan> <target> |
Apply a local ChangePlan (dry-run unless --approve); --push --repo owner/repo also pushes and opens a Draft PR, gated by its own separate Approval |
si verify <command> |
Run a test command and record pass/fail |
si watch <target> |
Drift since the last si watch run for this target, via a self-managed --state-dir history (no daemon — repeat it yourself, or from cron/CI) |
si roadmap-drift <ecosystem.json> |
Every repository's ECOSYSTEM_ROADMAP.md steps against its merged pull requests, from local checkouts (--checkouts, --pulls) or --github (network); a table, or a deterministic JSON report (--json, --out) |
si contract-check <ecosystem.json> |
Every component's saved Capability Contract (--contracts DIR) against the OS contract schema (--contract-schema, e.g. Velisa's registry/ copy); exit 1 when one breaks it, minus --baseline known violations; a table, or a deterministic JSON report (--json, --out) |
si layer-check <ecosystem.json> |
Dependency direction: every call a saved contract declares (--contracts DIR, its dependencies[] naming another component) against the components' layer and the layer order and exceptions of --layering FILE; exit 1 on a same-layer or upward call that is not an exception, or a component with no known layer (--report-only: exit 0); a table, or a deterministic JSON report (--json, --out) |
si contract-diff OLD NEW |
Contract diff: every difference between two contracts of one component (or --base-ref REF [--head-ref REF] --path contract/contract.json in a git repository) as breaking, additive or info, the whole as none / additive / breaking, and the release bump it needs (before 1.0: minor / patch; from 1.0: major / minor); exit 0 (--fail-on-breaking: 1 on breaking); a table, or a deterministic JSON report (--json, --out) |
si doctor, si version |
Environment check, installed version |
si --read-only <command> (or SI_READ_ONLY=1) is audit mode: discovery,
analysis, research and reporting run as usual, while si improve, si propose, si execute, si verify and si check-updates --propose/--plan-out
are refused before they start (exit 1, the reason on stderr). An automated
audit sets it so nothing it runs can change, plan changes to, or run a
command in the repositories it reads (ADR-013).
si execute/si verify/si research/si propose/si check-updates all
accept --record <snapshot-dir> to attach their result to an existing
canonical snapshot so a later si dashboard can show it.
si diagnose/si report/si dashboard/si watch also validate Capability
Contracts (a component's machine-readable <tool> contract --json output)
when given one: --contract-file FILE (saved output, read only),
--contract-command 'ingest contract --json' (run only because you named
it: no shell, stdin closed, --contract-timeout, a minimal environment
without your tokens, an empty temporary working directory), or the target's
own .si/contracts.json ({"contracts": [{"path": "contract.json"}]};
paths inside the target only, never commands). Each contract is checked
against --contract-schema (default: the bundled AI Video Production OS
capability contract schema) and every problem is a capability_contract_*
finding naming the JSON Pointer of the offending value (ADR-011). With no
such source there are zero contract findings.
Every provides entry of a contract that validates becomes a Capability,
so a contract can satisfy .si/requirements.json.
The same four commands also audit an ownership map, the document that
gives each job to one component (the AI Video Production OS
ecosystem.json: {"components": [{"repo": "publish-skill", "owns": ["配信先アップロード"]}]}): --ownership-map FILE, or the target's own
.si/ownership.json (an ownership document itself, plus "maps": [{"path": "ecosystem.json"}] inside the target). Files only, never commands. A job
owned by two components is an ownership_overlap; a job owned by one
component while another's contract provides a capability bound to it
("job_capabilities": {"配信プラットフォーム仕様": ["ffmpeg-skill.export"]})
is an ownership_provider_overlap; a job only planned components own,
or a bound job nobody owns, is an ownership_unowned_job (ADR-012).
si roadmap-drift audits an ecosystem's roadmaps, not one target: for every
components[].repo of an ownership map such as the OS ecosystem.json, it
reads that repository's ECOSYSTEM_ROADMAP.md (numbered checkbox steps,
one pull request each) and reports (a) a ticked step that links no pull
request, (b) an unticked step whose pull request merged (one the step links,
or one whose title names it, docs: pull requests aside; a step that says
it is still open, e.g. Partly done, is a note, not drift) and, as a
candidate only, one its SKILL.md/CHANGELOG already describes as shipped,
and (c) a step naming another repository's step that does not exist
(qc-skill step 9). Each finding names the repository, the step and the
evidence: file and line, PR number and URL, and the text matched. Offline:
si roadmap-drift ecosystem.json --checkouts ~/src --pulls ./pulls # <dir>/<repo>/..., <pulls>/<repo>.json
si roadmap-drift ecosystem.json --github --json --out drift.json # network, GITHUB_TOKEN when set--pulls holds one saved pull-request list per repository (gh api 'repos/OWNER/REPO/pulls?state=closed&per_page=100' --paginate > pulls/REPO.json);
without it a local run skips the merged-pull-request checks and says so.
The only file written is the --out report (an existing file at that path
is replaced, --read-only or not); a path inside --checkouts is refused,
so no checkout is ever written to (ADR-015).
si diagnose --field is the field-readiness audit, one row per skill of
an ownership map such as the OS ecosystem.json: resume after a stop,
progress events, error classes, long-file tests, hardware encoder use,
alpha output and loudness output. Each cell is yes, no or unknown
with its evidence (the file, the contract key or CI line, the text
matched), read from two places only: the skill's saved Capability
Contract (--contracts DIR, <repo>.json: its <tool> contract --json
output; never run) and its CI config (.github/workflows: job ids, step
names, run commands). What neither states is unknown, never no, and
so is anything they state both ways (ADR-016):
si diagnose --field --ownership-map ecosystem.json --checkouts ~/src --contracts ./contracts
si diagnose --field --ownership-map ecosystem.json --github --contracts ./contracts --json--out DIR writes DIR/field-readiness.json (refused inside --checkouts).
si contract-check is the OS contract-shape check that Velisa CI runs:
every *.json file under --contracts (a skill's saved contract --json
output, or the copies the agent pins) is matched to a component of
ecosystem.json, by its file name (<repo>.json) or by the identity it
gives itself (skill_id, id, skill.id, skill.package, exactly or
with -skill added), and validated against the schema. A file that is
not JSON always exits 1; a schema violation exits 1 unless --baseline
lists it for that component ({"known_violations": [{"repo": "qc-skill", "pointer": "/dependencies", "reason": "..."}]}, a pointer covering
everything below it); an entry that matches nothing is reported as stale. A component with no saved contract is listed, not
failed. The report says whether the bundled schema copy still matches the
one given (ADR-017). si diagnose --field --contracts reads the same kind
of directory.
si contract-check ecosystem.json --contracts ./contracts \
--contract-schema registry/capability_contract.schema.json --baseline known.jsonsi layer-check is the OS dependency-direction check that Velisa CI runs
(ADR-018). Each component of ecosystem.json has a layer; the layering
file gives the layers from the lowest and the calls allowed against them,
each with its reason. A dependencies[] entry that names another component
(by skill_id or id, of kind skill, app or none; matched as
si contract-check matches a file) is a call. A call to a lower layer
passes; one within the same layer or upward fails unless it is listed, and
so does a contract file that cannot be read; an exception that excuses
nothing is reported as stale. Packages, binaries,
model weights and schema entries (data contracts) are not calls.
si layer-check ecosystem.json --contracts ./contracts --layering registry/layering.json \
--report-only{"layers": ["engine", "skill", "app", "orchestrator", "governance"],
"exceptions": [{"from": "thumbnail-skill", "to": "qc-skill", "reason": "..."}]}si contract-diff says whether a change to a component's contract is safe
for the components that rely on it (ADR-019). A key, operation, enum value
or entry added, a field no longer required, or a guarantee strengthened is
additive; anything removed, a type or value changed, a field newly required,
an ordered argument list changed or a guarantee weakened is breaking;
descriptions, the release version and lifecycle promotion are information.
The bump follows the old release version: before 1.0, breaking is minor and
additive patch; from 1.0, breaking is major and additive minor. Velisa runs
it on pull requests, report-only.
si contract-diff --base-ref origin/main --path contract/contract.json --jsonsi diagnose/si report/si dashboard also check for a .si/requirements.json
declaring capabilities the target requires by name ({"capabilities": [{"name": "pdf export"}]}) — opt-in only; a target with no such file gets
zero capability_gap findings, never an inferred one.
si dashboard renders 14 sections (Overview, Findings, Updates,
Recommendations, Proposals, Executions, Components, Capabilities,
Dependencies, Architecture Decisions, Changes, Research, Evidence,
Settings/Governance) from one or more snapshots as a single
dependency-free HTML file — --compare-with <snapshot-dir> populates
Changes, --check-updates populates Updates. Nothing it renders can
merge, delete, force-push, or write to a remote.
si design is registered as an explicit placeholder (si --help
documents it; running it fails clearly rather than silently doing
nothing) — it is not implemented yet.
The architectural source of truth lives under docs/design/:
docs/design/DESIGN_PLAN.md— index and design principledocs/design/ARCHITECTURE_DECISIONS.md— ADRsdocs/design/IMPLEMENTATION_BACKLOG.md— backlog by epicdocs/design/docs/— product vision, requirements, architecture, domain model, analysis/research/improvement engines, governance, visualization, plugin/Skill system, GitHub integration, storage, CLI/UX, security, testing, roadmap, reference workflows, extension points, open questions, and definition of done.
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
si doctor # environment sanity check
si version
si --help # lists the full planned command surface;
# commands not yet implemented say so explicitlyPoint it at any repository — your own, or a local clone — no configuration
required beyond the install above. Run these from inside that repository
(the examples below all target it as .):
cd your-repo
si diagnose . # read-only: discovery + findings, nothing written
si report . --out ./si-out # same, plus a static HTML report at ./si-out/report.html
si check-updates . --plan-out ./si-plans # network: pypi/npm/cargo/go/maven dependency freshness;
# writes a ready-to-run ChangePlan for any exact-pin bump foundA generated ChangePlan needs its own permission level (CREATE_BRANCH_OR_ DRAFT_PR), above the default ceiling — si execute --approve alone is
denied without a matching Approval record. target in the approval must
match the <target> you pass to si execute exactly (as a literal
string, not a resolved path) — keep both as .:
cat > approval.json <<'EOF'
{"actor": "human:you", "scope": "repository", "action": "create_local_branch_and_commit",
"target": ".", "permission_level": 4}
EOF
si execute ./si-plans/<file>.json . --approve --approval-file approval.jsonThis only ever creates a local branch and commit — nothing above touches a
remote. Pushing that branch and opening a Draft PR is a separate step,
si execute ... --push --repo owner/repo, gated by its own separate
Approval — see Safety.
si research, si propose --research-query, and si execute --push all
call the GitHub API. Without a token they still work, but as unauthenticated
requests capped at 60/hour by GitHub — easy to hit during normal use.
si execute --push requires a token outright (to actually push a branch
and open a Draft PR).
export GITHUB_TOKEN=ghp_... # a fine-grained PAT; public-repo read access is enough
# for research/propose. execute --push additionally
# pushes a branch and opens a PR, so it needs
# "Contents: write" and "Pull requests: write"
# on the target repo.Only ever set this as an environment variable — no si command accepts a
token as a CLI argument, so it never ends up in shell history or a process
list (ps). This is a deliberate, load-bearing design choice, not an
oversight: keep it that way in any change that touches token handling.
ruff check src tests
ruff format --check src tests
mypy src
pytest
bandit -c pyproject.toml -r src
pip-auditSee CONTRIBUTING.md for the ground rules (evidence-first,
read-only by default, deterministic-first, no video-production assumptions in
core) before adding a new module.
CI runs the tests on Linux, macOS and Windows with Python 3.11 and 3.12;
text I/O always names its encoding, and snapshots are written with LF line
endings and /-separated paths on every OS (ADR-014).
System Intelligence never merges a PR, closes a PR, deletes a branch or
repository, force-pushes, changes repository visibility, rotates
credentials, deploys, or publishes a release automatically. See
SECURITY.md and docs/design/docs/08-governance.md.