soturail 0.2.3 → 0.3.1

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.
Files changed (92) hide show
  1. package/README.md +58 -11
  2. package/dist/cli.js +7 -0
  3. package/dist/cli.js.map +1 -1
  4. package/dist/commands/bench.d.ts +1 -1
  5. package/dist/commands/bench.js +126 -2
  6. package/dist/commands/bench.js.map +1 -1
  7. package/dist/commands/context.d.ts +2 -0
  8. package/dist/commands/context.js +27 -0
  9. package/dist/commands/context.js.map +1 -0
  10. package/dist/commands/hooks.d.ts +3 -0
  11. package/dist/commands/hooks.js +45 -8
  12. package/dist/commands/hooks.js.map +1 -1
  13. package/dist/commands/init.js +220 -1
  14. package/dist/commands/init.js.map +1 -1
  15. package/dist/commands/mcp.d.ts +2 -0
  16. package/dist/commands/mcp.js +21 -0
  17. package/dist/commands/mcp.js.map +1 -0
  18. package/dist/commands/memory.d.ts +1 -0
  19. package/dist/commands/memory.js +2 -1
  20. package/dist/commands/memory.js.map +1 -1
  21. package/dist/commands/release.js +178 -7
  22. package/dist/commands/release.js.map +1 -1
  23. package/dist/commands/skills.d.ts +2 -0
  24. package/dist/commands/skills.js +43 -0
  25. package/dist/commands/skills.js.map +1 -0
  26. package/dist/core/config.d.ts +5 -0
  27. package/dist/core/config.js +12 -2
  28. package/dist/core/config.js.map +1 -1
  29. package/dist/core/context-pack.d.ts +13 -0
  30. package/dist/core/context-pack.js +102 -0
  31. package/dist/core/context-pack.js.map +1 -0
  32. package/dist/core/mcp-resources.d.ts +13 -0
  33. package/dist/core/mcp-resources.js +46 -0
  34. package/dist/core/mcp-resources.js.map +1 -0
  35. package/dist/core/mcp-server.d.ts +14 -0
  36. package/dist/core/mcp-server.js +81 -0
  37. package/dist/core/mcp-server.js.map +1 -0
  38. package/dist/core/mcp-tools.d.ts +7 -0
  39. package/dist/core/mcp-tools.js +73 -0
  40. package/dist/core/mcp-tools.js.map +1 -0
  41. package/dist/core/release-preflight.js +2 -0
  42. package/dist/core/release-preflight.js.map +1 -1
  43. package/dist/core/skill-exporter.d.ts +3 -0
  44. package/dist/core/skill-exporter.js +72 -0
  45. package/dist/core/skill-exporter.js.map +1 -0
  46. package/dist/core/skill-schema.d.ts +55 -0
  47. package/dist/core/skill-schema.js +91 -0
  48. package/dist/core/skill-schema.js.map +1 -0
  49. package/dist/core/skill-store.d.ts +4 -0
  50. package/dist/core/skill-store.js +139 -0
  51. package/dist/core/skill-store.js.map +1 -0
  52. package/dist/core/skill-validator.d.ts +12 -0
  53. package/dist/core/skill-validator.js +94 -0
  54. package/dist/core/skill-validator.js.map +1 -0
  55. package/dist/core/version.d.ts +1 -1
  56. package/dist/core/version.js +1 -1
  57. package/docs/benchmarking.md +6 -1
  58. package/docs/comparisons.md +35 -0
  59. package/docs/context-packs.md +39 -0
  60. package/docs/examples/skills/README.md +11 -0
  61. package/docs/first-real-workflow.md +60 -0
  62. package/docs/hooks/claude.md +6 -4
  63. package/docs/hooks/codex.md +4 -3
  64. package/docs/hooks/cursor.md +4 -3
  65. package/docs/hooks/gemini.md +4 -3
  66. package/docs/hooks/mcp.md +10 -0
  67. package/docs/hooks.md +18 -15
  68. package/docs/mcp.md +60 -0
  69. package/docs/release-checklist.md +3 -0
  70. package/docs/release-workflow.md +15 -22
  71. package/docs/security-model.md +6 -0
  72. package/docs/skill-rail.md +18 -20
  73. package/docs/usage.md +23 -0
  74. package/docs/windows.md +21 -1
  75. package/docs/workflow-rail.md +7 -1
  76. package/examples/README.md +22 -0
  77. package/examples/context-packs/README.md +17 -0
  78. package/examples/context-packs/generic-workflow.md +9 -0
  79. package/examples/hooks/README.md +11 -0
  80. package/examples/hooks/prompt-only-codex.md +7 -0
  81. package/examples/mcp/README.md +17 -0
  82. package/examples/mcp/initialize.json +1 -0
  83. package/examples/mcp/resources-list.json +1 -0
  84. package/examples/mcp/resources-read-repo-map.json +1 -0
  85. package/examples/mcp/tools-list.json +1 -0
  86. package/examples/skills/README.md +13 -0
  87. package/examples/skills/bug-triage-skill.yml +26 -0
  88. package/examples/skills/code-review-skill.yml +28 -0
  89. package/examples/skills/java-student-helper-skill.yml +25 -0
  90. package/examples/skills/php-web-reviewer-skill.yml +27 -0
  91. package/examples/skills/release-manager-skill.yml +26 -0
  92. package/package.json +8 -6
@@ -0,0 +1,39 @@
1
+ # Context Packs
2
+
3
+ Context packs are target-aware Markdown payloads for AI coding agents.
4
+
5
+ ```bash
6
+ soturail context pack --target claude
7
+ soturail context pack --target codex
8
+ soturail context pack --target gemini
9
+ soturail context pack --target cursor
10
+ soturail context pack --target generic
11
+ soturail context explain
12
+ soturail context doctor
13
+ ```
14
+
15
+ Generated files live in `.soturail/context/`.
16
+
17
+ Common generated files:
18
+
19
+ - `.soturail/context/claude-context.md`
20
+ - `.soturail/context/codex-context.md`
21
+ - `.soturail/context/gemini-context.md`
22
+ - `.soturail/context/cursor-context.md`
23
+ - `.soturail/context/generic-context.md`
24
+
25
+ Stable-cache order:
26
+
27
+ 1. Static SotuRail header.
28
+ 2. Governance files summary.
29
+ 3. Project config.
30
+ 4. Repo map summary.
31
+ 5. Approved rules.
32
+ 6. Approved specs.
33
+ 7. Approved memory.
34
+ 8. Skills summary.
35
+ 9. Dynamic footer with timestamps, current commit, raw IDs and recent command notes.
36
+
37
+ Dynamic data never appears before stable blocks.
38
+
39
+ Review a generated pack before pasting it into an agent. Dynamic footer data can include recent command status, raw IDs or branch details.
@@ -0,0 +1,11 @@
1
+ # Skill Examples
2
+
3
+ Generate local examples with:
4
+
5
+ ```bash
6
+ soturail skills init demo-skill
7
+ soturail skills validate
8
+ soturail skills export --target generic
9
+ ```
10
+
11
+ Generated skills live in `.soturail/skills/` and exports live in `.soturail/exports/skills/`.
@@ -0,0 +1,60 @@
1
+ # First Real Workflow
2
+
3
+ This guide starts from a clean folder and walks through the first useful SotuRail flow.
4
+
5
+ ## macOS, Linux, PowerShell
6
+
7
+ ```bash
8
+ mkdir my-soturail-test
9
+ cd my-soturail-test
10
+
11
+ soturail init
12
+ soturail index
13
+ soturail context pack --target generic
14
+ soturail skills init code-review
15
+ soturail skills validate
16
+ soturail skills export --target claude
17
+ soturail mcp doctor
18
+ soturail mcp manifest
19
+ soturail run node --version
20
+ soturail stats
21
+ ```
22
+
23
+ ## Windows CMD
24
+
25
+ ```bat
26
+ mkdir my-soturail-test
27
+ cd my-soturail-test
28
+ soturail init
29
+ soturail index
30
+ soturail context pack --target generic
31
+ soturail skills init code-review
32
+ soturail skills validate
33
+ soturail skills export --target claude
34
+ soturail mcp doctor
35
+ soturail mcp manifest
36
+ soturail run node --version
37
+ soturail stats
38
+ ```
39
+
40
+ Do not paste Markdown fence labels such as `bat` into CMD. Paste only the command lines.
41
+
42
+ ## What should happen?
43
+
44
+ - `.soturail/` is created without overwriting your files.
45
+ - `docs/` and `examples/` starter files are created.
46
+ - `.soturail/indexes/repo-map.json` and `tree.txt` are generated.
47
+ - `.soturail/context/generic-context.md` is generated.
48
+ - `.soturail/skills/code-review/` is created with a starter skill.
49
+ - `soturail skills validate` should pass for the generated skill.
50
+ - `.soturail/exports/skills/claude/` receives a reviewed export.
51
+ - `soturail mcp doctor` reports stdio support and no arbitrary shell execution.
52
+ - `soturail stats` reports local metrics.
53
+
54
+ Stats may be zero in a fresh folder until you run commands through:
55
+
56
+ ```bash
57
+ soturail run <command>
58
+ ```
59
+
60
+ Raw command output can contain secrets. Keep `.soturail/raw` local and review logs before sharing them.
@@ -1,11 +1,13 @@
1
1
  # Claude Hooks
2
2
 
3
- SotuRail v0.2.1 includes a conservative Claude Code hook template.
3
+ SotuRail v0.3.0 includes conservative Claude safe-hooks and MCP guidance.
4
4
 
5
5
  ```bash
6
- soturail hooks install claude --dry-run
7
- soturail hooks install claude
8
- soturail hooks uninstall claude
6
+ soturail hooks install --agent claude --mode safe-hooks --dry-run
7
+ soturail hooks install --agent claude --mode safe-hooks
8
+ soturail hooks install --agent claude --mode mcp
9
+ soturail hooks uninstall --agent claude
10
+ soturail hooks export --agent claude
9
11
  soturail hooks prompt-only claude
10
12
  ```
11
13
 
@@ -7,9 +7,10 @@ SotuRail does not assume private Codex host hook APIs. The fallback rules descri
7
7
  Useful commands:
8
8
 
9
9
  ```bash
10
- soturail hooks install codex --dry-run
11
- soturail hooks install codex
12
- soturail hooks uninstall codex
10
+ soturail hooks install --agent codex --mode prompt-only --dry-run
11
+ soturail hooks install --agent codex --mode prompt-only
12
+ soturail hooks uninstall --agent codex
13
+ soturail hooks export --agent codex
13
14
  soturail hooks prompt-only codex
14
15
  ```
15
16
 
@@ -7,9 +7,10 @@ Existing files are backed up before SotuRail adds its rules.
7
7
  Useful commands:
8
8
 
9
9
  ```bash
10
- soturail hooks install cursor --dry-run
11
- soturail hooks install cursor
12
- soturail hooks uninstall cursor
10
+ soturail hooks install --agent cursor --mode prompt-only --dry-run
11
+ soturail hooks install --agent cursor --mode prompt-only
12
+ soturail hooks uninstall --agent cursor
13
+ soturail hooks export --agent cursor
13
14
  soturail hooks prompt-only cursor
14
15
  ```
15
16
 
@@ -7,9 +7,10 @@ The generated rules keep repository scans, progressive file reads and raw log re
7
7
  Useful commands:
8
8
 
9
9
  ```bash
10
- soturail hooks install gemini --dry-run
11
- soturail hooks install gemini
12
- soturail hooks uninstall gemini
10
+ soturail hooks install --agent gemini --mode prompt-only --dry-run
11
+ soturail hooks install --agent gemini --mode prompt-only
12
+ soturail hooks uninstall --agent gemini
13
+ soturail hooks export --agent gemini
13
14
  soturail hooks prompt-only gemini
14
15
  ```
15
16
 
@@ -0,0 +1,10 @@
1
+ # MCP Hook Integration
2
+
3
+ Use MCP mode when an agent host supports reviewed local MCP server configuration.
4
+
5
+ ```bash
6
+ soturail hooks install --agent claude --mode mcp --dry-run
7
+ soturail mcp serve --transport stdio
8
+ ```
9
+
10
+ Review generated instructions before enabling. SotuRail's MCP server exposes read-only resources and safe tools; it does not expose arbitrary shell execution in v0.3.0.
package/docs/hooks.md CHANGED
@@ -1,26 +1,29 @@
1
1
  # Agent Hooks
2
2
 
3
- SotuRail hook support is cautious. Claude gets a conservative hook template first; Codex, Gemini and Cursor remain prompt-only fallbacks because host APIs are not all stable.
3
+ SotuRail hook support is cautious. Claude gets conservative safe-hooks and MCP guidance first; Codex, Gemini and Cursor use prompt-only fallbacks when stable native hook APIs are unavailable.
4
4
 
5
5
  ```bash
6
6
  soturail hooks list
7
7
  soturail hooks doctor
8
- soturail hooks install claude --dry-run
9
- soturail hooks install claude
10
- soturail hooks uninstall claude
11
- soturail hooks install all --dry-run
12
- soturail hooks prompt-only codex
8
+ soturail hooks install --agent claude --mode safe-hooks --dry-run
9
+ soturail hooks install --agent claude --mode mcp
10
+ soturail hooks install --agent codex --mode prompt-only
11
+ soturail hooks install --agent gemini --mode prompt-only
12
+ soturail hooks install --agent cursor --mode prompt-only
13
+ soturail hooks uninstall --agent claude
14
+ soturail hooks export --agent claude
15
+ soturail hooks export --agent codex
13
16
  ```
14
17
 
15
- Installers create backups before modifying existing files. If a host config location is uncertain, SotuRail generates prompt-only guidance instead of guessing.
18
+ Installers create backups before modifying existing files. Dry-run prints every file that would change. If a host config location is uncertain, SotuRail generates prompt-only guidance instead of guessing.
16
19
 
17
- Claude install writes `.claude/settings.json` and hook scripts under `.claude/hooks/`. Dry-run prints every file that would change.
20
+ Claude safe-hooks write `.claude/settings.json` and hook scripts under `.claude/hooks/`. The pre-tool hook blocks destructive command shapes and suggests `soturail run` for tests, builds and logs.
18
21
 
19
- Always review generated hooks before enabling them. SotuRail should never auto-install unreviewed third-party skills, hooks or scripts. Prompt-only fallback remains available for every host:
22
+ Always review generated hooks before enabling them. SotuRail should never auto-install unreviewed third-party skills, hooks or scripts.
20
23
 
21
- ```bash
22
- soturail hooks prompt-only claude
23
- soturail hooks prompt-only codex
24
- soturail hooks prompt-only gemini
25
- soturail hooks prompt-only cursor
26
- ```
24
+ `soturail hooks doctor` prints safe modes and next commands:
25
+
26
+ - Claude: `safe-hooks` and `mcp`.
27
+ - Codex, Gemini and Cursor: `prompt-only`.
28
+ - Start with `--dry-run`.
29
+ - Export guidance with `soturail hooks export --agent claude`.
package/docs/mcp.md ADDED
@@ -0,0 +1,60 @@
1
+ # MCP Server
2
+
3
+ SotuRail includes a local MCP-compatible server over stdio using JSON-RPC 2.0 style messages. It is designed for local context access, not remote execution.
4
+
5
+ ```bash
6
+ soturail mcp doctor
7
+ soturail mcp manifest
8
+ soturail mcp serve --transport stdio
9
+ ```
10
+
11
+ The server exposes read-only resources such as the repo map, tree, rules, approved memory, self report, latest benchmarks and roadmap. It also exposes safe tools for indexing, progressive reads, formatting, rule checks, skill listing, context pack generation and raw log expansion.
12
+
13
+ ## Copyable JSON-RPC Examples
14
+
15
+ Send one JSON object per line to `soturail mcp serve --transport stdio`.
16
+
17
+ Initialize:
18
+
19
+ ```json
20
+ {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"clientInfo":{"name":"manual-smoke","version":"0.1.0"}}}
21
+ ```
22
+
23
+ List resources:
24
+
25
+ ```json
26
+ {"jsonrpc":"2.0","id":2,"method":"resources/list"}
27
+ ```
28
+
29
+ Read the repo map:
30
+
31
+ ```json
32
+ {"jsonrpc":"2.0","id":3,"method":"resources/read","params":{"uri":"soturail://repo-map"}}
33
+ ```
34
+
35
+ List tools:
36
+
37
+ ```json
38
+ {"jsonrpc":"2.0","id":4,"method":"tools/list"}
39
+ ```
40
+
41
+ The same payloads are available under `examples/mcp/`.
42
+
43
+ ## Safe Tools
44
+
45
+ Default tools include:
46
+
47
+ - `soturail.index`
48
+ - `soturail.read`
49
+ - `soturail.format`
50
+ - `soturail.rules.check`
51
+ - `soturail.skills.list`
52
+ - `soturail.context.pack`
53
+ - `soturail.expand`
54
+
55
+ Security defaults:
56
+
57
+ - no arbitrary shell execution;
58
+ - no `soturail.run` MCP tool by default;
59
+ - raw log expansion redacts probable secrets unless `allow_raw=true`;
60
+ - provider cache hits are never invented.
@@ -9,6 +9,9 @@ Before publishing:
9
9
  - [ ] `npm test`
10
10
  - [ ] `npm audit --omit=dev`
11
11
  - [ ] `node dist/cli.js self all`
12
+ - [ ] `node dist/cli.js skills --help`
13
+ - [ ] `node dist/cli.js mcp --help`
14
+ - [ ] `node dist/cli.js context --help`
12
15
  - [ ] `npm pack --dry-run`
13
16
  - [ ] `npm run release:check`
14
17
  - [ ] `node dist/cli.js --version` matches `package.json`.
@@ -1,6 +1,6 @@
1
1
  # Release Workflow
2
2
 
3
- SotuRail releases should be repeatable and evidence-backed. The release helper lives at `scripts/release.mjs`.
3
+ SotuRail releases should be repeatable and evidence-backed. v0.3.0 exposes release helpers through `soturail release`.
4
4
 
5
5
  ## Check
6
6
 
@@ -18,27 +18,10 @@ The check also verifies:
18
18
  - `CHANGELOG.md` and `RELEASE_NOTES_vX.Y.Z.md` exist for the local version;
19
19
  - README install instructions and `LICENSE` exist.
20
20
 
21
- ## Prepare
22
-
23
- ```bash
24
- npm run release:prepare -- --version X.Y.Z
25
- ```
26
-
27
- Prepare mode:
28
-
29
- - validates the version argument;
30
- - updates `package.json`, `package-lock.json` and CLI version text;
31
- - updates `CHANGELOG.md`;
32
- - creates `RELEASE_NOTES_vX.Y.Z.md`;
33
- - runs validation;
34
- - commits `chore(release): prepare vX.Y.Z`;
35
- - pushes `main`;
36
- - never publishes to npm.
37
-
38
21
  ## Publish
39
22
 
40
23
  ```bash
41
- npm run release:publish -- --version X.Y.Z
24
+ npm run release:publish -- X.Y.Z
42
25
  ```
43
26
 
44
27
  Publish mode refuses to publish if build, tests, release preflight or runtime audit fail, if the git tree is dirty, or if the version already exists on npm.
@@ -54,17 +37,27 @@ If npm asks for 2FA during publish, use a fresh authenticator code:
54
37
 
55
38
  ```powershell
56
39
  $env:NPM_CONFIG_OTP="<code>"
57
- npm run release:publish -- --version X.Y.Z
40
+ npm run release:publish -- X.Y.Z
58
41
  Remove-Item Env:NPM_CONFIG_OTP
59
42
  ```
60
43
 
61
44
  ## Full
62
45
 
63
46
  ```bash
64
- npm run release:full -- --version X.Y.Z
47
+ npm run release:full -- X.Y.Z --publish-npm --github-release
48
+ ```
49
+
50
+ Full mode runs release gates, then publishes to npm only when `--publish-npm` is supplied, and creates or updates the GitHub release only when `--github-release` is supplied.
51
+
52
+ For explicit CLI usage:
53
+
54
+ ```bash
55
+ soturail release publish X.Y.Z
56
+ soturail release github X.Y.Z
57
+ soturail release full X.Y.Z --publish-npm --github-release
65
58
  ```
66
59
 
67
- Full mode runs prepare, publish and then creates or updates the GitHub release using `gh` when available. If the npm version already exists, full mode skips npm publish and only creates or updates the GitHub release.
60
+ Release commands also accept `--target-version X.Y.Z`. The older `--version X.Y.Z` form remains supported for npm scripts, but the positional form avoids confusion with the global `soturail --version` flag.
68
61
 
69
62
  Only create or update the GitHub release after npm publish succeeds and these checks pass:
70
63
 
@@ -27,6 +27,12 @@ This is intentionally verbose so accidental bypasses are unlikely.
27
27
 
28
28
  Raw command logs remain on disk so compressed summaries can always be audited.
29
29
 
30
+ Raw logs may contain secrets. Do not commit `.soturail/raw/`. MCP raw-log expansion redacts probable secrets by default unless `allow_raw=true` is explicitly passed.
31
+
32
+ ## MCP And Skills
33
+
34
+ The v0.3.0 MCP server does not expose arbitrary shell execution. Skill Rail exports are local files for human review; SotuRail does not auto-install unreviewed third-party skills.
35
+
30
36
  ## Limitations
31
37
 
32
38
  SotuRail does not isolate processes, prevent all shell tricks or replace OS permissions. Treat it as a policy and evidence layer.
@@ -1,28 +1,26 @@
1
1
  # Skill Rail
2
2
 
3
- Skill Rail is planned for v0.3.0. It is not implemented in v0.2.x.
4
-
5
- The goal is to turn approved SotuRail specs, rules and workflows into portable, reviewable agent skills without installing untrusted marketplace content automatically.
6
-
7
- Planned commands:
3
+ Skill Rail exports safe local agent skills without depending on external skill ecosystems.
8
4
 
9
5
  ```bash
10
- soturail skills init <name>
11
- soturail skills from-spec <spec-id>
12
- soturail skills from-rules <rules-file>
13
- soturail skills validate <path>
14
- soturail skills export claude|codex|gemini|cursor
6
+ soturail skills init demo-skill
7
+ soturail skills list
8
+ soturail skills validate
9
+ soturail skills export --target claude
10
+ soturail skills export --target codex
11
+ soturail skills export --target gemini
12
+ soturail skills export --target cursor
13
+ soturail skills export --target generic
14
+ soturail skills pack --format json
15
+ soturail skills pack --format markdown
15
16
  ```
16
17
 
17
- ## Security Requirements
18
+ Skills live in `.soturail/skills/<skill-id>/` with `skill.yml`, `SKILL.md`, examples and validators.
19
+
20
+ Validation checks required metadata, target names, duplicate IDs, deterministic content hashes, destructive shell patterns, prompt-injection style instructions and probable embedded secrets.
21
+
22
+ Exports are written to `.soturail/exports/skills/<target>/`. Review every generated file before enabling it in Claude, Codex, Gemini, Cursor or another host.
18
23
 
19
- - No automatic marketplace install.
20
- - Validate `SKILL.md` before use.
21
- - Scan for prompt injection.
22
- - Scan for destructive shell commands.
23
- - Scan for secret exfiltration language.
24
- - Scan for `curl`/`wget` pipe execution.
25
- - Warn about untrusted scripts.
26
- - Require human approval before enabling generated skills.
24
+ `soturail skills list` prints each skill ID, risk level, name, description, version, targets and local path. If there are no local skills, it prints the command to create one.
27
25
 
28
- Skill Rail should preserve SotuRail's local-first evidence model: generated skills must cite the spec, rule or workflow that produced them.
26
+ The generated starter skill includes safe workflow steps, a verification checklist, example input/output, target metadata and human approval requirements for destructive commands, remote writes and dependency installation.
package/docs/usage.md CHANGED
@@ -62,3 +62,26 @@ soturail rules check
62
62
  soturail native doctor
63
63
  soturail bench compare-engines
64
64
  ```
65
+
66
+ ## v0.3.0 Workflows
67
+
68
+ ```bash
69
+ soturail skills init demo-skill
70
+ soturail skills list
71
+ soturail skills validate
72
+ soturail skills export --target claude
73
+ soturail context pack --target claude
74
+ soturail context pack --target codex
75
+ soturail context pack --target gemini
76
+ soturail context pack --target cursor
77
+ soturail context pack --target generic
78
+ soturail mcp doctor
79
+ soturail mcp manifest
80
+ soturail mcp serve --transport stdio
81
+ soturail hooks install --agent claude --mode safe-hooks --dry-run
82
+ soturail release check
83
+ ```
84
+
85
+ MCP is local stdio JSON-RPC style transport and does not expose arbitrary shell execution in v0.3.0.
86
+
87
+ For a first clean-folder walkthrough, see [first-real-workflow.md](first-real-workflow.md).
package/docs/windows.md CHANGED
@@ -26,7 +26,7 @@ From a source checkout:
26
26
  npm run build
27
27
  npm pack --dry-run
28
28
  npm pack
29
- npm install -g .\soturail-0.2.3.tgz
29
+ npm install -g .\soturail-0.3.0.tgz
30
30
  soturail --version
31
31
  ```
32
32
 
@@ -71,6 +71,26 @@ node app.js
71
71
  npx soturail --help
72
72
  ```
73
73
 
74
+ ## MCP And Context Packs
75
+
76
+ PowerShell examples:
77
+
78
+ ```powershell
79
+ soturail mcp doctor
80
+ soturail mcp manifest
81
+ soturail context pack --target generic
82
+ ```
83
+
84
+ CMD examples:
85
+
86
+ ```bat
87
+ soturail mcp doctor
88
+ soturail mcp manifest
89
+ soturail context pack --target generic
90
+ ```
91
+
92
+ When testing `soturail mcp serve --transport stdio`, send one JSON object per line. See `examples\mcp\` for payloads.
93
+
74
94
  ## Safety
75
95
 
76
96
  SotuRail blocks destructive command shapes through `soturail run`, including `rm -rf`, `sudo`, `del /s`, downloaded script piping and automatic `git push`.
@@ -1,6 +1,6 @@
1
1
  # Workflow Rail
2
2
 
3
- Workflow Rail is planned for v0.4.0. It is not implemented in v0.2.x.
3
+ Workflow Rail is planned for v0.4.0. It is not implemented in v0.3.x.
4
4
 
5
5
  The goal is to describe repeatable engineering workflows as local, auditable artifacts that can later export into Skill Rail or an MCP server.
6
6
 
@@ -24,3 +24,9 @@ soturail workflow export skill
24
24
  - Require human approval before enabling generated workflows or exported skills.
25
25
 
26
26
  Workflow Rail should complement, not replace, the existing SotuRail rails: `soturail run`, raw log recovery, Knowledge-to-Rules, benchmarks, cache-normalized payloads and self-dogfooding reports.
27
+
28
+ ## Current Road
29
+
30
+ - v0.3.1: real usage polish, installed workflow examples and clean-folder smoke tests.
31
+ - v0.3.2: stronger reducers and deduplication.
32
+ - v0.4.0: real agent integrations and Workflow Rail.
@@ -0,0 +1,22 @@
1
+ # SotuRail Examples
2
+
3
+ These examples are small starting points for real local usage:
4
+
5
+ - `skills/`: reviewable Skill Rail YAML examples.
6
+ - `context-packs/`: context pack workflows.
7
+ - `mcp/`: JSON-RPC messages for the stdio MCP server.
8
+ - `hooks/`: prompt-only and hook guidance.
9
+
10
+ Run examples in a disposable folder first:
11
+
12
+ ```bash
13
+ soturail init
14
+ soturail index
15
+ soturail context pack --target generic
16
+ ```
17
+
18
+ Safety notes:
19
+
20
+ - Review generated files before enabling them in an agent.
21
+ - Do not paste raw logs into public issues without checking for secrets.
22
+ - MCP does not expose arbitrary shell execution by default.
@@ -0,0 +1,17 @@
1
+ # Context Pack Examples
2
+
3
+ Context packs are Markdown payloads with stable project context before dynamic session data.
4
+
5
+ ```bash
6
+ soturail init
7
+ soturail index
8
+ soturail context pack --target generic
9
+ ```
10
+
11
+ Generated files:
12
+
13
+ - `.soturail/context/claude-context.md`
14
+ - `.soturail/context/codex-context.md`
15
+ - `.soturail/context/gemini-context.md`
16
+ - `.soturail/context/cursor-context.md`
17
+ - `.soturail/context/generic-context.md`
@@ -0,0 +1,9 @@
1
+ # Generic Context Pack Workflow
2
+
3
+ ```bash
4
+ soturail init
5
+ soturail index
6
+ soturail context pack --target generic
7
+ ```
8
+
9
+ Open `.soturail/context/generic-context.md` and review it before sending it to an agent.
@@ -0,0 +1,11 @@
1
+ # Hook Examples
2
+
3
+ Start with dry-run:
4
+
5
+ ```bash
6
+ soturail hooks doctor
7
+ soturail hooks install --agent claude --mode safe-hooks --dry-run
8
+ soturail hooks install --agent codex --mode prompt-only --dry-run
9
+ ```
10
+
11
+ Review every generated file before enabling hooks.
@@ -0,0 +1,7 @@
1
+ # Prompt-only Codex Rules
2
+
3
+ - Use `soturail index` before large repository changes.
4
+ - Use `soturail read <file> --query "goal"` instead of reading giant files directly.
5
+ - Use `soturail run` for tests, builds and logs so raw output is recoverable.
6
+ - Use `soturail expand <raw_id>` only when the compressed summary lacks needed information.
7
+ - Never use `soturail run` for `git push`.
@@ -0,0 +1,17 @@
1
+ # MCP Examples
2
+
3
+ These files are one-message JSON-RPC examples for `soturail mcp serve --transport stdio`.
4
+
5
+ Run:
6
+
7
+ ```bash
8
+ soturail mcp serve --transport stdio
9
+ ```
10
+
11
+ Then paste one JSON object per line. The server responds with one JSON-RPC response per line.
12
+
13
+ Safety notes:
14
+
15
+ - MCP does not expose arbitrary shell execution by default.
16
+ - `soturail.run` is not listed as an MCP tool.
17
+ - Raw log expansion redacts probable secrets unless `allow_raw=true`.
@@ -0,0 +1 @@
1
+ {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"clientInfo":{"name":"manual-smoke","version":"0.1.0"}}}
@@ -0,0 +1 @@
1
+ {"jsonrpc":"2.0","id":2,"method":"resources/list"}
@@ -0,0 +1 @@
1
+ {"jsonrpc":"2.0","id":3,"method":"resources/read","params":{"uri":"soturail://repo-map"}}
@@ -0,0 +1 @@
1
+ {"jsonrpc":"2.0","id":4,"method":"tools/list"}
@@ -0,0 +1,13 @@
1
+ # Skill Examples
2
+
3
+ Use these YAML files as references for `soturail skills init <name>` output.
4
+
5
+ Recommended flow:
6
+
7
+ ```bash
8
+ soturail skills init code-review
9
+ soturail skills validate
10
+ soturail skills export --target claude
11
+ ```
12
+
13
+ The example YAML files are documentation templates. A real local skill also needs a matching `SKILL.md` and deterministic `content_hash`.