Metadata-Version: 2.4
Name: sit-toolkit
Version: 0.23.0
Summary: Git-native CLI for versioning AI Skill packages: prompts, schemas, golden tests, and release artifacts.
Author-email: OpenRaiser <xuxinglong00423@163.com>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/OpenRaiser/Sit
Project-URL: Documentation, https://github.com/OpenRaiser/Sit#readme
Project-URL: Repository, https://github.com/OpenRaiser/Sit
Project-URL: Issues, https://github.com/OpenRaiser/Sit/issues
Keywords: ai,skills,prompt-engineering,version-control,cli,llm
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Version Control :: Git
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: PyYAML<7,>=5.4
Requires-Dist: jsonschema<5,>=4.0
Provides-Extra: dev
Requires-Dist: pytest<9,>=7.0; extra == "dev"
Requires-Dist: ruff<1,>=0.8.0; extra == "dev"
Requires-Dist: mypy<2,>=1.10; extra == "dev"
Requires-Dist: types-PyYAML<7,>=6.0; extra == "dev"
Requires-Dist: build<2,>=1.0; extra == "dev"
Requires-Dist: twine<7,>=4.0; extra == "dev"
Provides-Extra: binary
Requires-Dist: pyinstaller<7,>=6.0; extra == "binary"
Provides-Extra: mcp
Requires-Dist: mcp<2,>=1.0; extra == "mcp"
Dynamic: license-file

# sit

[English](README.md) | [中文](README_zh.md)

**Git-native versioning for AI Skill packages.**

`sit` puts prompts, schemas, golden tests, and release artifacts under semantic version control. It knows what changed, classifies risk, and gates your commits and releases.

```bash
pip install sit-toolkit
```

## The problem

When you version a prompt or schema with plain Git, you get `+13 -2` lines. You don't know if it's a typo fix or a breaking behavior change. `sit` does.

```
$ sit diff v0.3.0..v0.4.0

Skill Diff
Baseline: paper-webpage-builder@0.3.0
Current: paper-webpage-builder@0.4.0
Risk: review-required
Suggested version bump: minor

[prompt]
  - PROMPT changed SKILL.md (+13 -2; headings: Core Rule, Workflow)

[script]
  - SCRIPT changed scripts/scan_paper.py (review required)

[reference]
  - REFERENCE changed references/design_principles.md (+27 -3)
```

## Quick start

```bash
# New package
sit init my-skill && cd my-skill

# Existing project
sit standardize .

# Validate, test, review
sit install-hooks .
sit validate . && sit test .
sit diff HEAD~1..HEAD
sit review HEAD~1..HEAD
sit pr-summary HEAD~1..HEAD

# Release
sit release minor . --bundle
```

## Commands

**Lifecycle:** `sit init`, `sit standardize`, `sit onboard`, `sit doctor`

**Quality:** `sit validate`, `sit test`, `sit test --run`, `sit deps check`

**Diff & Review:** `sit diff`, `sit review`, `sit pr-summary`, `sit report`, `sit ci-summary`

**Release & Safety:** `sit install-hooks`, `sit commit`, `sit release`, `sit undo`

**Git passthrough:** `sit add`, `sit push`, `sit pull`, `sit branch`, `sit checkout`, `sit log`

## Agent integration

`sit` exposes its capabilities for AI agents via three interfaces:

| Interface | Usage |
|---|---|
| **Auto-discovery** | `sit onboard --agent` — one-command setup for Codex, Claude Code, Cursor, etc. |
| **Python SDK** | `from sit.sdk import Sit` — direct API calls |
| **MCP Server** | `pip install 'sit-toolkit[mcp]'` — 12 tools over stdio |
| **LLM Tool-Use** | `from sit.tool_use import get_tools_openai` — OpenAI & Anthropic schemas |

<details>
<summary>Agent auto-discovery</summary>

```bash
# Add agent config to an existing skill package
sit onboard --agent ./my-skill

# Or combine with full onboarding
sit onboard --agent ./legacy-project
```

This generates `.mcp.json` (MCP server config) and `AGENTS.md` (agent rules).
Codex reads `AGENTS.md` and will run the sit loop after Skill changes:
`git status --short`, `sit validate`, `sit test`, and `sit diff HEAD..WORKTREE`
for uncommitted working-tree review. Claude Code, Cursor, and other MCP-aware
editors can also discover the `sit` MCP server through `.mcp.json`. Restart your
editor after running if it needs to reload project instructions or MCP config.
</details>

<details>
<summary>Python SDK example</summary>

```python
from sit.sdk import Sit

s = Sit("./my-skill-package")
s.info()            # package metadata
s.validate()        # structure checks
s.test()            # golden tests
s.diff("./old")     # semantic diff
s.pr_summary("./old")  # PR summary
s.report(compare="./old")  # full report
```
</details>

<details>
<summary>MCP Server config</summary>

```bash
pip install 'sit-toolkit[mcp]'
sit-mcp-server
```

```json
{
  "mcpServers": {
    "sit": { "command": "sit-mcp-server" }
  }
}
```
</details>

<details>
<summary>LLM Tool-Use schema</summary>

```python
from sit.tool_use import get_tools_openai, get_tools_anthropic

tools = get_tools_openai()      # OpenAI format
tools = get_tools_anthropic()   # Anthropic format
```
</details>

## CI integration

`sit init` generates a GitHub Actions workflow that validates, tests, and posts a semantic summary to your PR:

```yaml
- run: sit validate "$SIT_PACKAGE_DIR"
- run: sit test "$SIT_PACKAGE_DIR"
- run: sit test "$SIT_PACKAGE_DIR" --run
- run: sit ci-summary "$SIT_PACKAGE_DIR" --compare origin/main..HEAD >> "$GITHUB_STEP_SUMMARY"
```

## License

Apache-2.0. See [LICENSE](LICENSE).
