sin-code-bundle 0.9.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sin_code_bundle-0.9.2/LICENSE +21 -0
- sin_code_bundle-0.9.2/PKG-INFO +470 -0
- sin_code_bundle-0.9.2/README.md +428 -0
- sin_code_bundle-0.9.2/pyproject.toml +103 -0
- sin_code_bundle-0.9.2/setup.cfg +4 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/__init__.py +6 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/agents_md.py +245 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/ast_edit.py +323 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/bench.py +506 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/budget.py +51 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/cache.py +131 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/checkpoint.py +230 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/cli.py +1943 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/codocs.py +328 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/dap_bridge.py +135 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/data/codocs/SKILL.md +280 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/gitnexus.py +368 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/hashline.py +216 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/hooks.py +249 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/immortal_commit.py +288 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/interceptor.py +119 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/lsp_backend.py +303 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/lsp_bootstrap.py +85 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/markitdown.py +254 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/mcp_config.py +455 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/mcp_server.py +963 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/memory.py +208 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/merge_safety.py +313 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/orchestration_worktrees.py +102 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/policy.py +224 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/preflight.py +152 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/programming_workflow.py +541 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/rtk.py +154 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/safety.py +52 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/session_warmup.py +247 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/skills.py +188 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/symbol_resolve.py +166 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/tools/__init__.py +4 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/tools/pypi_setup.py +289 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle/vfs.py +264 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle.egg-info/PKG-INFO +470 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle.egg-info/SOURCES.txt +63 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle.egg-info/dependency_links.txt +1 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle.egg-info/entry_points.txt +4 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle.egg-info/requires.txt +28 -0
- sin_code_bundle-0.9.2/src/sin_code_bundle.egg-info/top_level.txt +1 -0
- sin_code_bundle-0.9.2/tests/test_agent_integration.py +185 -0
- sin_code_bundle-0.9.2/tests/test_bench.py +138 -0
- sin_code_bundle-0.9.2/tests/test_budget.py +44 -0
- sin_code_bundle-0.9.2/tests/test_bundle.py +17 -0
- sin_code_bundle-0.9.2/tests/test_codocs.py +91 -0
- sin_code_bundle-0.9.2/tests/test_consistency.py +80 -0
- sin_code_bundle-0.9.2/tests/test_gitnexus.py +193 -0
- sin_code_bundle-0.9.2/tests/test_hooks.py +165 -0
- sin_code_bundle-0.9.2/tests/test_lsp_backend.py +94 -0
- sin_code_bundle-0.9.2/tests/test_markitdown.py +121 -0
- sin_code_bundle-0.9.2/tests/test_mcp_integration.py +109 -0
- sin_code_bundle-0.9.2/tests/test_memory.py +125 -0
- sin_code_bundle-0.9.2/tests/test_policy.py +87 -0
- sin_code_bundle-0.9.2/tests/test_pypi_setup.py +467 -0
- sin_code_bundle-0.9.2/tests/test_rtk.py +108 -0
- sin_code_bundle-0.9.2/tests/test_security_audit_bundle.py +206 -0
- sin_code_bundle-0.9.2/tests/test_serve.py +437 -0
- sin_code_bundle-0.9.2/tests/test_skills.py +86 -0
- sin_code_bundle-0.9.2/tests/test_v2_features.py +148 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 OpenSIN-Code
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sin-code-bundle
|
|
3
|
+
Version: 0.9.2
|
|
4
|
+
Summary: Structural intelligence for AI coding agents: impact analysis, semantic diff, architectural-debt breaker, and an independent verification Oracle β over MCP.
|
|
5
|
+
Author: OpenSIN-Code
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/OpenSIN-Code/SIN-Code-Bundle
|
|
8
|
+
Project-URL: Issues, https://github.com/OpenSIN-Code/SIN-Code-Bundle/issues
|
|
9
|
+
Keywords: mcp,ai-agents,coding-agent,opencode,codex,lsp,swe-bench
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
16
|
+
Requires-Python: >=3.11
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
Requires-Dist: typer>=0.12
|
|
20
|
+
Requires-Dist: pyyaml>=6.0
|
|
21
|
+
Provides-Extra: lsp
|
|
22
|
+
Requires-Dist: multilspy>=0.0.10; extra == "lsp"
|
|
23
|
+
Requires-Dist: tree-sitter>=0.23; extra == "lsp"
|
|
24
|
+
Requires-Dist: tree-sitter-python>=0.23; extra == "lsp"
|
|
25
|
+
Requires-Dist: tree-sitter-javascript>=0.23; extra == "lsp"
|
|
26
|
+
Requires-Dist: tree-sitter-typescript>=0.23; extra == "lsp"
|
|
27
|
+
Requires-Dist: tree-sitter-go>=0.23; extra == "lsp"
|
|
28
|
+
Provides-Extra: bench
|
|
29
|
+
Requires-Dist: datasets>=2.19; extra == "bench"
|
|
30
|
+
Provides-Extra: mcp
|
|
31
|
+
Requires-Dist: mcp[cli]>=1.2; extra == "mcp"
|
|
32
|
+
Provides-Extra: otel
|
|
33
|
+
Requires-Dist: opentelemetry-sdk>=1.25; extra == "otel"
|
|
34
|
+
Requires-Dist: opentelemetry-exporter-otlp>=1.25; extra == "otel"
|
|
35
|
+
Provides-Extra: dev
|
|
36
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
37
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
|
|
38
|
+
Requires-Dist: ruff>=0.5; extra == "dev"
|
|
39
|
+
Provides-Extra: all
|
|
40
|
+
Requires-Dist: sin-code-bundle[bench,dev,lsp,mcp,otel]; extra == "all"
|
|
41
|
+
Dynamic: license-file
|
|
42
|
+
|
|
43
|
+
# π§ SIN-Code Bundle
|
|
44
|
+
|
|
45
|
+
[](https://www.python.org/)
|
|
46
|
+
[](./LICENSE)
|
|
47
|
+
[-brightgreen)](#)
|
|
48
|
+
[](#)
|
|
49
|
+
|
|
50
|
+
**The universal semantic backend for AI coding agents.**
|
|
51
|
+
|
|
52
|
+
One CLI (`sin`) and one unified MCP server (`sin-serve` / `sin serve`) that
|
|
53
|
+
orchestrate **8 Python subsystems, 7 Go tools, and 5 external bridges** β giving
|
|
54
|
+
AI agents the signals they actually lack: structural knowledge, semantic diffs,
|
|
55
|
+
correctness proofs, ephemeral test environments, debt guardrails, and
|
|
56
|
+
persistent memory.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## β‘ Why SIN-Code? (The Anti-Dreck Promise)
|
|
61
|
+
|
|
62
|
+
Most coding agents operate blind β fragile string replacements, blind bash
|
|
63
|
+
execution, no memory between sessions. SIN-Code replaces native agent tools
|
|
64
|
+
with semantically aware, verifiable alternatives.
|
|
65
|
+
|
|
66
|
+
| The Old Way (Dreck) | The SIN-Code Way |
|
|
67
|
+
|---|---|
|
|
68
|
+
| β Fragile `str_replace` (whitespace errors, stale files) | β
`sin_edit`: Hashline-anchored, content-hash verified patching (line-shift resilient) |
|
|
69
|
+
| β Blind `read` (dumps 2000 lines of context) | β
`sin_read`: Deep structural analysis OR semantic URIs (`sckg://module/auth/neighbors`) β size-safe with summarize mode |
|
|
70
|
+
| β Dangerous `bash` (secret leaks, infinite loops) | β
`sin_bash`: Secret-redaction + strict timeouts + structured JSON (safety_check, retry_info) |
|
|
71
|
+
| β Stateless amnesia (forgets user prefs every session) | β
`recall_tool`/`remember_tool`: Persistent 4-tier memory (SQLite+FTS5) via [sin-brain](https://github.com/OpenSIN-Code/SIN-Brain) |
|
|
72
|
+
| β Architectural drift (agents spaghetti-fy the code) | β
`sin_check_architecture`: Pre-flight ADW rule enforcement β blocks hardcoded secrets, eval/exec, frontend-DB imports |
|
|
73
|
+
| β Sequential exploration (one slow task at a time) | β
`sin_create_worktree`: Isolated git worktrees for parallel agent tasks without conflicts |
|
|
74
|
+
| β Static analysis only (no runtime insight) | β
`sin_runtime_trace`: DAP debug session attachment (debugpy/dlv/node) |
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## π Quickstart (2-5 minutes)
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
git clone https://github.com/OpenSIN-Code/SIN-Code-Bundle.git
|
|
82
|
+
cd SIN-Code-Bundle
|
|
83
|
+
bash install.sh # Bootstraps 7 Go tools + Python bundle + MCP config + 5 external bridges
|
|
84
|
+
sin status # Show what's installed
|
|
85
|
+
sin bootstrap /path/to/your/repo # Initialize graphs, baselines, ledgers
|
|
86
|
+
sin-serve # Start the unified MCP server (or: sin serve)
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Pair commands (symmetric to `install.sh`):
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
bash uninstall.sh # Remove everything bash install.sh installed
|
|
93
|
+
bash update.sh # Update in-place without full reinstall
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Flags: `--help`, `--dry-run`, `--verbose`, `--force`, `--skip-go`, `--skip-external`, `--with-externals`
|
|
97
|
+
|
|
98
|
+
`--with-externals` upgrades the install from "check only" to actually
|
|
99
|
+
auto-installing the external bridges: GitNexus (npm), MarkItDown (pipx/pip),
|
|
100
|
+
RTK (brew), and Simone-MCP (npm in `~/dev/Simone-MCP`). Without this flag,
|
|
101
|
+
those tools are only verified/registered β the user must run `sin xxx setup`
|
|
102
|
+
manually for each one.
|
|
103
|
+
|
|
104
|
+
Environment overrides:
|
|
105
|
+
```bash
|
|
106
|
+
SIN_CODE_BIN_DIR=~/custom-bin SIN_CODE_REPOS_DIR=~/my-repos bash install.sh
|
|
107
|
+
SIN_CODE_BIN_DIR=~/custom-bin bash install.sh --with-externals
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Publishing to PyPI (one-time setup)
|
|
111
|
+
|
|
112
|
+
The `release.yml` workflow uses **PyPI Trusted Publishing** (no API tokens, no
|
|
113
|
+
manual uploads). To enable it for the first time, the maintainer must
|
|
114
|
+
register the publisher once.
|
|
115
|
+
|
|
116
|
+
**Recommended (non-interactive, API token):**
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
# 1. Generate a PyPI API token at https://pypi.org/manage/account/token/
|
|
120
|
+
# (scope: "Entire account" works, or scope to a single project)
|
|
121
|
+
# 2. Run:
|
|
122
|
+
export PYPI_API_TOKEN="pypi-..."
|
|
123
|
+
python -m sin_code_bundle.tools.pypi_setup --api-token "$PYPI_API_TOKEN"
|
|
124
|
+
# 3. Check your email, click the magic link PyPI sent
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
This is the **1-click** path: no TTY, no prompts, no 2FA dance. It works in
|
|
128
|
+
CI scripts, agents, and headless servers. See
|
|
129
|
+
[`pypi_setup.doc.md`](./src/sin_code_bundle/tools/pypi_setup.doc.md) for
|
|
130
|
+
the full failure-mode table and security notes.
|
|
131
|
+
|
|
132
|
+
**Legacy fallback (interactive username + password):**
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
bash tools/setup_pypi_publisher.sh
|
|
136
|
+
# Follow the prompts, check email, click the magic link
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Kept for maintainers who do not have a PyPI API token. Does not work in
|
|
140
|
+
CI / non-TTY environments.
|
|
141
|
+
|
|
142
|
+
After this one-time setup, every `git tag v0.X.Y && git push origin v0.X.Y`
|
|
143
|
+
triggers:
|
|
144
|
+
|
|
145
|
+
1. Build sdist + wheel
|
|
146
|
+
2. Verify install in a clean venv
|
|
147
|
+
3. Publish to PyPI via Trusted Publisher (tokenless OIDC)
|
|
148
|
+
4. Attach assets to GitHub Release
|
|
149
|
+
|
|
150
|
+
**Manual fallback:** <https://pypi.org/manage/account/publishing/> β Add pending publisher:
|
|
151
|
+
|
|
152
|
+
- Project: `sin-code-bundle` (PEP 503 normalised)
|
|
153
|
+
- Owner: `OpenSIN-Code`
|
|
154
|
+
- Repo: `SIN-Code-Bundle`
|
|
155
|
+
- Workflow filename: `release.yml`
|
|
156
|
+
- Environment name: `pypi`
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## π οΈ Agent Usage Example
|
|
161
|
+
|
|
162
|
+
Instead of guessing file structures, agents query the Semantic Codebase
|
|
163
|
+
Knowledge Graph (SCKG) directly via stable URI schemes:
|
|
164
|
+
|
|
165
|
+
```json
|
|
166
|
+
// Agent tool call
|
|
167
|
+
{
|
|
168
|
+
"name": "sin_read",
|
|
169
|
+
"arguments": {
|
|
170
|
+
"path": "sckg://module/auth-service/dependencies",
|
|
171
|
+
"summarize": true
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
The VFS resolver translates this into a structured JSON response of exact
|
|
177
|
+
module dependencies β saving hundreds of tokens and preventing hallucination.
|
|
178
|
+
|
|
179
|
+
To disable native opencode tools and force SIN-Code usage, add to
|
|
180
|
+
`~/.config/opencode/opencode.json`:
|
|
181
|
+
|
|
182
|
+
```json
|
|
183
|
+
{
|
|
184
|
+
"tools": {
|
|
185
|
+
"read": false, "write": false, "edit": false, "bash": false,
|
|
186
|
+
"search": false, "find": false, "grep": false, "glob": false,
|
|
187
|
+
"list": false, "webfetch": false, "task": false
|
|
188
|
+
},
|
|
189
|
+
"mcp": {
|
|
190
|
+
"sin-code-bundle": {
|
|
191
|
+
"type": "local",
|
|
192
|
+
"command": ["sin", "serve"],
|
|
193
|
+
"enabled": true
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## π¦ Unified MCP Tool Inventory (37 Tools)
|
|
202
|
+
|
|
203
|
+
When `sin-serve` is running, agents get **37 tools**. Native opencode tools
|
|
204
|
+
should be **disabled** to enforce SIN-Code usage.
|
|
205
|
+
|
|
206
|
+
### Core File Operations (5) β Replace native read/write/edit/bash/search
|
|
207
|
+
|
|
208
|
+
| Tool | Replaces | What it does | Why better than native |
|
|
209
|
+
|---|---|---|---|
|
|
210
|
+
| `sin_read` | `read` | URI-aware file read with size-safety + summarize mode | Native dumps 10MB+ into context; sin_read truncates + supports `sckg://`, `poc://`, `ibd://`, `adw://`, `efsm://`, `oracle://`, `conflict://` URIs |
|
|
211
|
+
| `sin_write` | `write` | Atomic write + syntax pre-validation (.py/.ts/.js/.go) + auto-backup | Native creates half-written files on crash; sin_write is atomic + compiles before writing |
|
|
212
|
+
| `sin_edit` | `edit` | Hashline-anchored semantic patches (content-hash, not line numbers) | Native edit breaks on reformat/race; sin_edit survives line shifts |
|
|
213
|
+
| `sin_bash` | `bash` | Safe shell exec via Go `execute` binary | Native leaks secrets; sin_bash redacts tokens/keys + enforces timeout |
|
|
214
|
+
| `sin_search` | `search`/`find`/`grep`/`glob` | Scout (Go) + Python-regex fallback | Native has 4 separate tools; sin_search unifies all 4 with semantic mode |
|
|
215
|
+
|
|
216
|
+
### Virtual Filesystem β URI Schemes (2)
|
|
217
|
+
|
|
218
|
+
| Tool | What it does |
|
|
219
|
+
|---|---|
|
|
220
|
+
| `sin_vfs_resolve` | Resolve `sckg://`, `poc://`, `ibd://`, `adw://`, `efsm://`, `oracle://`, `conflict://` URIs to structured content |
|
|
221
|
+
| `sin_vfs_schemes` | List all available URI schemes |
|
|
222
|
+
|
|
223
|
+
### Code Structure β AST + Hashline (2)
|
|
224
|
+
|
|
225
|
+
| Tool | What it does |
|
|
226
|
+
|---|---|
|
|
227
|
+
| `sin_ast_edit` | Tree-sitter AST-based edit with POC verification (falls back to hashline) |
|
|
228
|
+
| `sin_hashline_validate` | Validate a previously-created hashline patch can still be applied |
|
|
229
|
+
|
|
230
|
+
### Architectural Enforcement (1)
|
|
231
|
+
|
|
232
|
+
| Tool | What it does |
|
|
233
|
+
|---|---|
|
|
234
|
+
| `sin_check_architecture` | Pre-flight ADW rule check β blocks hardcoded secrets, eval/exec, frontend-DB imports |
|
|
235
|
+
|
|
236
|
+
### Consolidation Tools (3) β v0.7.0 β Replace 3-4 separate calls with 1
|
|
237
|
+
|
|
238
|
+
| Tool | Replaces | What it does |
|
|
239
|
+
|---|---|---|
|
|
240
|
+
| `sin_preflight` | `sin_check_architecture` + `sin_bash("sin codocs check")` + `sin_bash("git status")` + `sin_bash("pytest --collect-only")` | Pre-flight safety gate: policy + docs + git + tests in 1 call. Returns `{allowed, policy_ok, docs_ok, git_clean, tests_status, estimated_risk}` |
|
|
241
|
+
| `sin_symbol_resolve` | `gitnexus_query` + `gitnexus_context` + `gitnexus_impact` + `gitnexus_detect_changes` | Unified code archaeology for a symbol. Fans out to 4 gitnexus primitives + optional sin-context-bridge. Returns unified graph view with `sources_queried` list |
|
|
242
|
+
| `sin_checkpoint` | `rollback_snapshot` + `sin_bash("sin codocs check")` + `sin_bash("git status")` + `sin_search("X", type="usage")` + `sin_bash("pytest --collect-only")` | Pre-refactor checkpoint: recoverable snapshot + state report in 1 call. Idempotent on `name`. Returns `{snapshot_id, docs_broken, git_clean, usages_found, tests_status, tests_collected}` |
|
|
243
|
+
|
|
244
|
+
### Runtime Debugging β DAP (2)
|
|
245
|
+
|
|
246
|
+
| Tool | What it does |
|
|
247
|
+
|---|---|
|
|
248
|
+
| `sin_runtime_trace` | Start a DAP debug session for a function (debugpy for Python, dlv for Go, node --inspect for Node) |
|
|
249
|
+
| `sin_stop_trace` | Stop an active DAP session |
|
|
250
|
+
|
|
251
|
+
### Parallel Task Execution (2)
|
|
252
|
+
|
|
253
|
+
| Tool | What it does |
|
|
254
|
+
|---|---|
|
|
255
|
+
| `sin_create_worktree` | Create an isolated git worktree for parallel agent tasks |
|
|
256
|
+
| `sin_cleanup_worktree` | Clean up worktree (optionally merge back to main) |
|
|
257
|
+
|
|
258
|
+
### Subsystem Tools (10) β Require subsystem packages via `pip install -e ".[all]"`
|
|
259
|
+
|
|
260
|
+
| Tool | Subsystem | What it does |
|
|
261
|
+
|---|---|---|
|
|
262
|
+
| `impact` | sin_code_sckg | Blast-radius impact analysis for a symbol |
|
|
263
|
+
| `semantic_diff` | sin_code_ibd | Semantic intent diff between two files |
|
|
264
|
+
| `semantic_review` | sin_code_ibd | Intent + risk score in one call |
|
|
265
|
+
| `architectural_debt` | sin_code_adw | Current architectural debt score (god modules, circular imports, hot paths without tests) |
|
|
266
|
+
| `verify_tests` | sin_code_oracle | Verify agent-generated code (security/perf/correctness β OWASP Top 10, CWE Top 25) |
|
|
267
|
+
| `prove` | sin_code_poc | Generate and verify proofs of correctness (Hoare-style pre/post-conditions) |
|
|
268
|
+
| `mock_env` | sin_code_efsm | Manage ephemeral full-stack mock environment (Postgres + Redis + API server in 10s) |
|
|
269
|
+
| `orchestrate` | sin_code_orchestration | Submit a task to the multi-agent orchestrator (dependency-graph aware) |
|
|
270
|
+
| `task_status` | sin_code_orchestration | Get status of an orchestrated task |
|
|
271
|
+
| `review` | sin_code_review_interface | SOTA review on a single file (diff + debt + tests + style) |
|
|
272
|
+
|
|
273
|
+
### Memory Tools (5) β Require `sin-brain` via `pip install -e ".[memory]"`
|
|
274
|
+
|
|
275
|
+
| Tool | What it does |
|
|
276
|
+
|---|---|
|
|
277
|
+
| `recall_tool` | Search memory tiers (recall/archival/graph) β 4-tier SQLite+FTS5 storage |
|
|
278
|
+
| `remember_tool` | Persist a memory (decision/convention/fix/pitfall/preference) |
|
|
279
|
+
| `forget_tool` | Delete a memory entry by id |
|
|
280
|
+
| `pin_tool` | Pin a memory entry (never evicted) |
|
|
281
|
+
| `link_evidence_tool` | Attach a subsystem verdict to a memory |
|
|
282
|
+
|
|
283
|
+
### External Bridges (5)
|
|
284
|
+
|
|
285
|
+
| Tool | Source | What it does |
|
|
286
|
+
|---|---|---|
|
|
287
|
+
| `gitnexus_context` | GitNexus (PolyForm-Noncommercial) | Structural graph context for a symbol |
|
|
288
|
+
| `gitnexus_impact` | GitNexus | Blast-radius impact via graph (auto-indexes) |
|
|
289
|
+
| `gitnexus_ai_context` | GitNexus | Task-scoped, graph-aware context bundle |
|
|
290
|
+
| `markitdown_convert` | MarkItDown (MIT) | Convert PDF/DOCX/PPTX/XLSX/image β Markdown |
|
|
291
|
+
| `codocs_check` | codocs (built-in) | Find broken co-located `.doc.md` references |
|
|
292
|
+
|
|
293
|
+
**Total: 34 tools** = 5 core + 2 VFS + 2 AST + 1 arch + 2 runtime + 2 worktree + 10 subsystem + 5 memory + 5 external
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## π Bridged External Tools (Never Vendored)
|
|
298
|
+
|
|
299
|
+
To keep the bundle MIT-licensed and lightweight, these upstream tools are
|
|
300
|
+
**bridged** (installed and updated independently, never vendored):
|
|
301
|
+
|
|
302
|
+
| Tool | Purpose | License | Setup |
|
|
303
|
+
|---|---|---|---|
|
|
304
|
+
| **[GitNexus](https://github.com/abhigyanpatwari/GitNexus)** | Upstream code knowledge graph | PolyForm-Noncommercial | `sin gitnexus setup` |
|
|
305
|
+
| **[Simone-MCP](https://github.com/OpenSIN-Code/Simone)** | Advanced code intelligence + LSP | Varies | Auto-detected during `sin bootstrap` |
|
|
306
|
+
| **[MarkItDown](https://github.com/microsoft/markitdown)** | Document β Markdown converter | MIT | `sin markitdown setup` |
|
|
307
|
+
| **[RTK](https://github.com/rtk-ai/rtk)** | Token-saving shell proxy (60-90% reduction) | Apache-2.0 | `sin rtk setup` |
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## π§© Companion Skills (Separate MCP Servers)
|
|
312
|
+
|
|
313
|
+
The Bundle exposes 37 tools via `sin serve`. Several **companion skills** ship
|
|
314
|
+
as *separate* MCP servers β they are not part of the bundle core, but
|
|
315
|
+
register cleanly alongside it in any opencode / Claude Code / Cursor config.
|
|
316
|
+
|
|
317
|
+
| Companion | Tools | Install | Run |
|
|
318
|
+
|---|---|---|---|
|
|
319
|
+
| **[sin-context-bridge](https://github.com/OpenSIN-Code/SIN-Code-Bundle)** | 2 tools β unified context across SCKG + sin-brain + GitNexus + local SQLite | `pip install sin-code-bundle[all]` | `sin-context-bridge serve` |
|
|
320
|
+
| **[sin-honcho-rollback](https://github.com/OpenSIN-Code/sin-honcho-rollback)** | 4 MCP tools + CLI β snapshot, rollback, audit log for sin-brain memory | `pip install sin-honcho-rollback` | `sin-honcho-rollback serve` |
|
|
321
|
+
| **[symfony-lens](https://github.com/OpenSIN-Code/SIN-Code-Symfony-Lens)** | 8 tools β Symfony-specific static analysis (services, routes, entities, Twig, migrations, PHPStan) | `pip install sin-code-symfony-lens` | `python -m symfony_lens.server` |
|
|
322
|
+
|
|
323
|
+
### Wire them into opencode
|
|
324
|
+
|
|
325
|
+
```jsonc
|
|
326
|
+
{
|
|
327
|
+
"mcp": {
|
|
328
|
+
"sin-code-bundle": { "type": "local", "command": ["sin", "serve"] },
|
|
329
|
+
"sin-context-bridge": { "type": "local", "command": ["sin-context-bridge", "serve"] },
|
|
330
|
+
"sin-honcho-rollback": { "type": "local", "command": ["sin-honcho-rollback", "serve"] },
|
|
331
|
+
"symfony-lens": { "type": "local", "command": ["symfony-lens"] }
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
All three companions follow the Bundle's graceful-degradation contract: if
|
|
337
|
+
the server isn't running, the consumer falls back to local-only behaviour
|
|
338
|
+
without crashing.
|
|
339
|
+
|
|
340
|
+
---
|
|
341
|
+
|
|
342
|
+
## π‘οΈ Graceful Degradation
|
|
343
|
+
|
|
344
|
+
Every subsystem is an **optional** dependency. If a subsystem is missing, the
|
|
345
|
+
MCP server detects it and gracefully falls back. The bundle never crashes on
|
|
346
|
+
a missing optional dep.
|
|
347
|
+
|
|
348
|
+
```bash
|
|
349
|
+
pip install -e ".[all]" # All 8 Python subsystems + sin-brain + LSP
|
|
350
|
+
pip install -e ".[memory]" # Just sin-brain (memory tools)
|
|
351
|
+
pip install -e ".[lsp]" # tree-sitter + 4 parsers (Python <3.14 only)
|
|
352
|
+
pip install -e "." # Minimal β uses graceful fallbacks
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
Check what's installed:
|
|
356
|
+
```bash
|
|
357
|
+
sin status
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
---
|
|
361
|
+
|
|
362
|
+
## ποΈ Architecture
|
|
363
|
+
|
|
364
|
+
```
|
|
365
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
366
|
+
β sin-serve MCP server (stdio) β
|
|
367
|
+
β 34 tools exposed (5 core + 2 VFS + 2 AST + 1 arch + β
|
|
368
|
+
β 2 runtime + 2 worktree + 10 subsystem + 5 memory + β
|
|
369
|
+
β 5 external bridges) β
|
|
370
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
371
|
+
β
|
|
372
|
+
ββββββββββββββββββββΌβββββββββββββββββββ
|
|
373
|
+
β β β
|
|
374
|
+
βΌ βΌ βΌ
|
|
375
|
+
ββββββββββββββ ββββββββββββββββ ββββββββββββββββββββ
|
|
376
|
+
β 7 Go tools β β 8 Python β β 5 External β
|
|
377
|
+
β (grasp, β β subsystems β β bridges β
|
|
378
|
+
β scout, β β (sckg, ibd, β β (GitNexus, β
|
|
379
|
+
β discover, β β poc, efsm, β β Simone-MCP, β
|
|
380
|
+
β execute, β β adw, oracle,β β MarkItDown, β
|
|
381
|
+
β map, β β orchestrationβ β RTK, codocs) β
|
|
382
|
+
β harvest, β β review- β β β
|
|
383
|
+
β orchestrate)β β interface) β β β
|
|
384
|
+
ββββββββββββββ ββββββββββββββββ ββββββββββββββββββββ
|
|
385
|
+
β
|
|
386
|
+
βΌ
|
|
387
|
+
ββββββββββββββββ
|
|
388
|
+
β sin-brain β
|
|
389
|
+
β (SQLite+FTS5 β
|
|
390
|
+
β memory) β
|
|
391
|
+
ββββββββββββββββ
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
---
|
|
395
|
+
|
|
396
|
+
## π§° CLI Commands
|
|
397
|
+
|
|
398
|
+
| Command | Description |
|
|
399
|
+
|---|---|
|
|
400
|
+
| `sin status` | Show which subsystems are installed/available |
|
|
401
|
+
| `sin bootstrap [repo]` | Initialize available subsystems (graph, baselines, ledger) |
|
|
402
|
+
| `sin review <a> <b>` | Semantic review of a change (IBD) |
|
|
403
|
+
| `sin verify <module> <fn>` | Proof-of-correctness for a function (POC) |
|
|
404
|
+
| `sin debt [root]` | Architectural debt overview (ADW) |
|
|
405
|
+
| `sin preflight [root]` | Ensure GitNexus graph context is fresh before agents code |
|
|
406
|
+
| `sin gitnexus setup` | Wire GitNexus MCP into OpenCode / Codex / Hermes |
|
|
407
|
+
| `sin gitnexus index\|status\|doctor\|context\|impact\|ai-context` | GitNexus graph operations |
|
|
408
|
+
| `sin markitdown setup\|doctor\|convert` | Wire/convert via MarkItDown (doc β Markdown) |
|
|
409
|
+
| `sin rtk setup\|doctor\|gain` | Wire RTK token-saving proxy into agents |
|
|
410
|
+
| `sin codocs check [root]` | Validate co-located `.doc.md` references (built-in) |
|
|
411
|
+
| `sin codocs list [root]` | List all CoDocs references and whether they resolve |
|
|
412
|
+
| `sin codocs install-skill` | Install the CoDocs agent skill (Hermes / OpenCode) |
|
|
413
|
+
| `sin sin-code run <tool> [args]` | Run a SIN-Code Go tool (discover, execute, map, grasp, scout, harvest, orchestrate) |
|
|
414
|
+
| `sin sin-code agents-md` | Generate AGENTS.md with SIN-Code Tool Suite rules |
|
|
415
|
+
| `sin serve` | Unified MCP server across available subsystems |
|
|
416
|
+
|
|
417
|
+
---
|
|
418
|
+
|
|
419
|
+
## 𦫠SIN-Code Go Tools (v2)
|
|
420
|
+
|
|
421
|
+
The next-generation SIN-Code tools are Go binaries that replace OpenCode's
|
|
422
|
+
built-in tools (auto-installed by `install.sh`):
|
|
423
|
+
|
|
424
|
+
| Tool | Purpose | Version |
|
|
425
|
+
|---|---|---|
|
|
426
|
+
| `discover` | File discovery with pattern matching, relevance scoring, dependency mapping | v0.2.5 |
|
|
427
|
+
| `execute` | Safe command execution with secret redaction, timeout, error analysis | v0.2.4 |
|
|
428
|
+
| `map` | Architecture analysis with module mapping, entry points, hot paths | v0.2.5 |
|
|
429
|
+
| `grasp` | Single-file deep analysis with structure, dependencies, context | v0.2.4 |
|
|
430
|
+
| `scout` | Code search with regex, semantic, symbol, usage modes | v0.1.5 |
|
|
431
|
+
| `harvest` | URL/API fetching with caching, structure extraction, auth management | v0.1.4 |
|
|
432
|
+
| `orchestrate` | Task management with dependencies, parallel execution, rollback | v0.1.6 |
|
|
433
|
+
|
|
434
|
+
Install manually:
|
|
435
|
+
```bash
|
|
436
|
+
go install github.com/OpenSIN-Code/SIN-Code-Discover-Tool/cmd/discover@latest
|
|
437
|
+
go install github.com/OpenSIN-Code/SIN-Code-Execute-Tool/cmd/execute@latest
|
|
438
|
+
go install github.com/OpenSIN-Code/SIN-Code-Map-Tool/cmd/map@latest
|
|
439
|
+
go install github.com/OpenSIN-Code/SIN-Code-Grasp-Tool/cmd/grasp@latest
|
|
440
|
+
go install github.com/OpenSIN-Code/SIN-Code-Scout-Tool/cmd/scout@latest
|
|
441
|
+
go install github.com/OpenSIN-Code/SIN-Code-Harvest-Tool/cmd/harvest@latest
|
|
442
|
+
go install github.com/OpenSIN-Code/SIN-Code-Orchestrate-Tool/cmd/orchestrate@latest
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
---
|
|
446
|
+
|
|
447
|
+
## π Documentation
|
|
448
|
+
|
|
449
|
+
- [INSTALL.md](./INSTALL.md) β Detailed installation and troubleshooting
|
|
450
|
+
- [CHANGELOG.md](./CHANGELOG.md) β Version history
|
|
451
|
+
- [docs/USAGE.md](./docs/USAGE.md) β Deep dive into CLI + MCP tool usage
|
|
452
|
+
- [docs/CONFIGURATION.md](./docs/CONFIGURATION.md) β Configuration reference
|
|
453
|
+
- [docs/EXTERNAL_TOOLS.md](./docs/EXTERNAL_TOOLS.md) β Full compatibility matrix
|
|
454
|
+
- [docs/GITNEXUS.md](./docs/GITNEXUS.md) β How to wire the mandatory graph context
|
|
455
|
+
- [docs/CODOCS.md](./docs/CODOCS.md) β Co-located `.doc.md` standard
|
|
456
|
+
- [docs/adr/](./docs/adr/) β Architecture Decision Records
|
|
457
|
+
- [CONTRIBUTING.md](./CONTRIBUTING.md) β How to contribute
|
|
458
|
+
|
|
459
|
+
---
|
|
460
|
+
|
|
461
|
+
## π€ License
|
|
462
|
+
|
|
463
|
+
MIT β see [LICENSE](./LICENSE).
|
|
464
|
+
|
|
465
|
+
Bridged tools retain their original licenses:
|
|
466
|
+
- GitNexus: PolyForm-Noncommercial
|
|
467
|
+
- MarkItDown: MIT
|
|
468
|
+
- RTK: Apache-2.0
|
|
469
|
+
|
|
470
|
+
Part of the [SIN-Code](https://github.com/OpenSIN-Code) agent-engineering stack.
|