raga-cli 0.8.0 → 0.10.0
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.
- package/CHANGELOG.md +29 -0
- package/README.md +33 -5
- package/bundled-skills/README.md +2 -2
- package/bundled-skills/bundle.json +75 -9
- package/bundled-skills/docs/guide/01-setup.md +1 -1
- package/bundled-skills/skills/bend/SKILL.md +58 -0
- package/bundled-skills/skills/bend/bend_tool.py +144 -0
- package/bundled-skills/skills/peak/SKILL.md +2 -2
- package/bundled-skills/skills/peak/references/peak-setup/SKILL.md +1 -1
- package/bundled-skills/skills/peak/references/raga-runtime/SKILL.md +20 -6
- package/bundled-skills/skills/peak/references/raga-runtime/raga_runtime.py +24 -6
- package/bundled-skills/skills/raga-artifacts/SKILL.md +117 -0
- package/bundled-skills/skills/raga-artifacts/artifact.mjs +259 -0
- package/bundled-skills/skills/raga-artifacts/artifact_tool.py +55 -0
- package/bundled-skills/skills/raga-artifacts/diagrams.md +641 -0
- package/bundled-skills/skills/raga-artifacts/templates/doc.html +124 -0
- package/bundled-skills/skills/raga-artifacts/templates/slides.html +138 -0
- package/dist/bundle/chunks/agent-attach-ZCS2QGIU.js +9 -0
- package/dist/bundle/chunks/anthropic.js +1 -8
- package/dist/bundle/chunks/chunk-4OPO7UJ6.js +4 -0
- package/dist/bundle/chunks/{chunk-IOPE2TJ4.js → chunk-A4342OQJ.js} +16 -16
- package/dist/bundle/chunks/{chunk-YMZUNB25.js → chunk-ABE5B2U7.js} +1 -1
- package/dist/bundle/chunks/{chunk-P2QCWBFM.js → chunk-D2SEW6VC.js} +1 -1
- package/dist/bundle/chunks/chunk-FTQDEUXY.js +242 -0
- package/dist/bundle/chunks/chunk-HRI5E2Y3.js +2 -0
- package/dist/bundle/chunks/{chunk-UDT647VB.js → chunk-JNHUOSVT.js} +2 -9
- package/dist/bundle/chunks/chunk-K22YTJFL.js +3 -0
- package/dist/bundle/chunks/chunk-MXJNFS34.js +47 -0
- package/dist/bundle/chunks/{chunk-J22MF7YW.js → chunk-NXGZMUQX.js} +3 -48
- package/dist/bundle/chunks/{chunk-3EGDWOKT.js → chunk-NYFFOHME.js} +1 -1
- package/dist/bundle/chunks/chunk-P2EB6CEF.js +6 -0
- package/dist/bundle/chunks/{chunk-KNY3PXQI.js → chunk-SK25JXS4.js} +1 -1
- package/dist/bundle/chunks/chunk-VEV3PRRP.js +1358 -0
- package/dist/bundle/chunks/chunk-XBBS7V4D.js +2 -0
- package/dist/bundle/chunks/{cli-4P6FVVLT.js → cli-XZ774I3U.js} +1 -1
- package/dist/bundle/chunks/{easter-egg-3d-65VIC4G2.js → easter-egg-3d-XWC5XWQO.js} +1 -1
- package/dist/bundle/chunks/{execute-3H5WKMA3.js → execute-7BWE4ZV3.js} +1 -1
- package/dist/bundle/chunks/openai-chatgpt.js +1 -8
- package/dist/bundle/chunks/openai-codex.js +1 -8
- package/dist/bundle/chunks/openrouter.js +1 -8
- package/dist/bundle/chunks/radius.js +1 -8
- package/dist/bundle/chunks/runtime-K76CFDG5.js +2 -0
- package/dist/bundle/chunks/virtual-modules-YAFG26WW.js +2 -0
- package/dist/bundle/cli-runtime.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/raga-runtime.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/docs/cli.md +8 -0
- package/docs/compaction.md +26 -0
- package/docs/sdk.md +2 -1
- package/docs/settings.md +1 -0
- package/package.json +1 -1
- package/python/raga_rlm/__init__.py +30 -6
- package/python/raga_rlm/mlx_models.py +265 -0
- package/schemas/keybindings.schema.json +84 -0
- package/schemas/settings.schema.json +74 -1
- package/schemas/theme.schema.json +2 -2
- package/dist/bundle/chunks/chunk-AI2NMHE7.js +0 -1567
- package/dist/bundle/chunks/chunk-C4IJNE7U.js +0 -2
- package/dist/bundle/chunks/chunk-RFPFZTK2.js +0 -7
- package/dist/bundle/chunks/chunk-RP2WKNT7.js +0 -4
- package/dist/bundle/chunks/runtime-435R6IKY.js +0 -2
- package/dist/bundle/chunks/virtual-modules-U3JBUDP7.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,32 @@
|
|
|
1
|
+
## [0.10.0](https://github.com/mr-jones123/raga/compare/raga-v0.9.0...raga-v0.10.0) (2026-11-01)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* assign models to subagent roles with /agent-setup ([937ae97](https://github.com/mr-jones123/raga/commit/937ae97887bae82215579de3966d23886d8e8d15))
|
|
6
|
+
* open subagents as named sessions from /agents in the TUI or Rex panes ([8cba5d3](https://github.com/mr-jones123/raga/commit/8cba5d360d3f9c9ee0d5fd76652ae53c41f04b21))
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **artifacts:** keep headless Chrome away from the macOS login keychain ([2c65a35](https://github.com/mr-jones123/raga/commit/2c65a3562a0354cbb20618aac4ddedf919ff08c0))
|
|
11
|
+
* keep Raga updates and user-facing guidance on Raga ([8ff9209](https://github.com/mr-jones123/raga/commit/8ff9209ed94681e1c254a496515dd561e7b58590))
|
|
12
|
+
* pick role models in a full-screen list inside /agent-setup ([df1e642](https://github.com/mr-jones123/raga/commit/df1e64234b170472d18c286140d472717699d916))
|
|
13
|
+
* return partial child work when the turn budget is exhausted ([0383bc1](https://github.com/mr-jones123/raga/commit/0383bc1485b8b039d0d5b9628b8ecc12d680a426))
|
|
14
|
+
|
|
15
|
+
## [0.9.0](https://github.com/mr-jones123/raga/compare/raga-v0.8.0...raga-v0.9.0) (2026-10-31)
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* add archive compaction strategy that drops context without a summarization call ([3b682ee](https://github.com/mr-jones123/raga/commit/3b682ee878320ce897f136b8661f3b0178c9df1d))
|
|
20
|
+
* add bend and raga-artifacts skills and run peak in ordinary sessions ([4fb5df2](https://github.com/mr-jones123/raga/commit/4fb5df2d32583b6d03f77d5e62c37a219978fcc7))
|
|
21
|
+
* add managed local models and CI releases ([53a7325](https://github.com/mr-jones123/raga/commit/53a73254eeceba1298c98823c275fff8331bb0b8))
|
|
22
|
+
* store instance memory in SQLite with selectable memory backends ([6c4997b](https://github.com/mr-jones123/raga/commit/6c4997be478c430c27ad378fa4d87bafc12f2444))
|
|
23
|
+
* **tui:** add /diff dashboard for categorized git review ([03cb062](https://github.com/mr-jones123/raga/commit/03cb062df23b6591d33902f7d1bb815976dc4049))
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* publish CLI updates to npm through trusted publishing ([f236785](https://github.com/mr-jones123/raga/commit/f2367854e11a26576324116194ec299403cc2e6a))
|
|
28
|
+
* **schemas:** regenerate keybindings schema for /diff bindings ([6ce96c7](https://github.com/mr-jones123/raga/commit/6ce96c73b6a742857be37e4bb79a83edb566106e))
|
|
29
|
+
|
|
1
30
|
# Changelog
|
|
2
31
|
|
|
3
32
|
Generated by scripts/raga-release.mjs from conventional commits. Do not edit by hand.
|
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ The RLM runtime works end to end. The adaptive layer, which lets the harness rew
|
|
|
27
27
|
| Goal and metric loop (`--goal`, `--gate`, `--metric`) | Not started |
|
|
28
28
|
| Native engineering skills (pstack, no-mistakes) | Not started |
|
|
29
29
|
|
|
30
|
-
The packages
|
|
30
|
+
User-facing commands and messages use Raga branding. The SDK packages retain their upstream names (`@earendil-works/pi-*`); imports, extension APIs, and protocol identifiers are not renamed. The `raga` command keeps its own user directory, `~/.raga/agent`, for logins, settings, sessions, skills, extensions, and packages. Set `RAGA_CODING_AGENT_DIR` to move it. It does not read `~/.pi/agent` or the shared `~/.agents/skills` folder, so an existing pi setup does not carry over. The `pi` command still uses `~/.pi/agent`.
|
|
31
31
|
|
|
32
32
|
## Run it
|
|
33
33
|
|
|
@@ -38,7 +38,20 @@ npm install -g raga-cli
|
|
|
38
38
|
raga
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
### Update
|
|
42
|
+
|
|
43
|
+
Exit raga, then run:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
raga update
|
|
47
|
+
raga --version
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
This installs the latest published `raga-cli` release without deleting your settings or sessions. Restart raga afterward. If an older version cannot update itself, run `npm install -g raga-cli@latest`. See [docs/UPDATING.md](docs/UPDATING.md) for other update targets, source checkouts, and troubleshooting.
|
|
51
|
+
|
|
52
|
+
### Run from source
|
|
53
|
+
|
|
54
|
+
To run from source instead:
|
|
42
55
|
|
|
43
56
|
```bash
|
|
44
57
|
git clone https://github.com/mr-jones123/raga.git
|
|
@@ -65,6 +78,18 @@ On the first `--rlm` run, raga creates a Python 3.11 environment with `uv` at `~
|
|
|
65
78
|
|
|
66
79
|
Without `--rlm`, raga behaves like pi, with `read`, `bash`, `edit`, and `write` as model tools.
|
|
67
80
|
|
|
81
|
+
## Local models
|
|
82
|
+
|
|
83
|
+
On macOS and Linux, `/local-models` searches Hugging Face, asks before downloading missing weights, and starts models locally. The first recommendation is the official LFM3-1.7B GGUF Q4_K_M build through llama.cpp. The same command detects MLX models automatically on Apple Silicon; no separate backend command is needed. See [docs/LOCAL-MODELS.md](docs/LOCAL-MODELS.md) for setup, cache behavior, and limits.
|
|
84
|
+
|
|
85
|
+
## Review changes
|
|
86
|
+
|
|
87
|
+
`/diff` opens a read-only Git review dashboard. Browse changes by category (tests, modules, GitHub workflows, documentation, dependencies, configuration), inspect staged or working-tree changes, or pick a commit from history. Open a file to scroll its diff, and toggle to its full contents without leaving raga. See [docs/DIFF.md](docs/DIFF.md) for controls.
|
|
88
|
+
|
|
89
|
+
## Subagents
|
|
90
|
+
|
|
91
|
+
Each `rlm_query` child is its own named Raga session with its own Python kernel. Run `/agents` to see them in a dashboard (name, state, model, tokens, cost, turns) and open one to read its cells or steer it. Optionally, Rex shows one pane per subagent. Run `/agent-setup` to choose which model each workflow role (such as `arena runners` or `bug-fix`) uses. See [docs/AGENTS.md](docs/AGENTS.md).
|
|
92
|
+
|
|
68
93
|
## What the model does in RLM mode
|
|
69
94
|
|
|
70
95
|
The kernel already exists when the model's first turn starts. Each `python` call runs a cell, and variables stay defined for the whole session. The model sees at most `rlm.outputLimit` characters of each cell's output. The full output stays in `cells`.
|
|
@@ -111,9 +136,12 @@ print(counts.most_common(5))
|
|
|
111
136
|
|---|---|
|
|
112
137
|
| [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) | How the pi base works and where raga's layers attach. |
|
|
113
138
|
| [docs/RLM.md](docs/RLM.md) | The RLM runtime reference. |
|
|
139
|
+
| [docs/AGENTS.md](docs/AGENTS.md) | Subagent sessions, the `/agents` dashboard, and Rex panes. |
|
|
114
140
|
| [docs/PROGRESS.md](docs/PROGRESS.md) | Milestones, status, and decisions. |
|
|
115
141
|
| [docs/BENCHMARKS.md](docs/BENCHMARKS.md) | Benchmark tasks and results. |
|
|
116
|
-
| [docs/
|
|
142
|
+
| [docs/LOCAL-MODELS.md](docs/LOCAL-MODELS.md) | Search, download, and run local Hugging Face models with llama.cpp or MLX. |
|
|
143
|
+
| [docs/UPDATING.md](docs/UPDATING.md) | Install and update the CLI, extensions, and model catalogs. |
|
|
144
|
+
| [docs/RELEASING.md](docs/RELEASING.md) | Automatic npm publishing, versioning, and merging upstream pi. |
|
|
117
145
|
| [packages/coding-agent/docs/](packages/coding-agent/docs/) | Pi's own docs, which still apply to everything raga inherits. |
|
|
118
146
|
|
|
119
147
|
## Development
|
|
@@ -123,10 +151,10 @@ npm run check # Lint, format, and type check
|
|
|
123
151
|
./test.sh # Tests without API keys
|
|
124
152
|
uv run --no-project --with pytest --with dill \
|
|
125
153
|
pytest packages/coding-agent/python/tests -q # Python kernel tests
|
|
126
|
-
node scripts/raga-release.mjs
|
|
154
|
+
node scripts/raga-release.mjs version # Version from raga release tags
|
|
127
155
|
```
|
|
128
156
|
|
|
129
|
-
Commit headers follow Conventional Commits
|
|
157
|
+
Commit headers follow Conventional Commits. Semantic-release generates `CHANGELOG.md`, version tags, and GitHub Releases after CI passes on `main`. See [docs/RELEASING.md](docs/RELEASING.md). [AGENTS.md](AGENTS.md) has the rules for humans and agents.
|
|
130
158
|
|
|
131
159
|
## Credits
|
|
132
160
|
|
package/bundled-skills/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
New instances copy this pack into their first accepted revision. Each session reads its pinned copy. Updating package assets does not rewrite an existing instance.
|
|
4
4
|
|
|
5
|
-
The pack installs
|
|
5
|
+
The pack installs three skills. raga-artifacts makes slides and documents with Pele diagrams and exports them as HTML and PDF. bend turns rules the user states into Bend laws and proofs and checks them with the bend CLI. peak is the engineering workflow. Its 62 references hold 55 portable pstack workflows, four companion workflows, the native create-skill and raga-runtime adapters, and the managed no-mistakes workflow. It excludes make-bot-ui and editor-only services. The original public no-mistakes text stays unchanged under skills/peak/references/no-mistakes/upstream.
|
|
6
6
|
|
|
7
|
-
Read [peak](skills/peak/SKILL.md) to pick a reference. Read [the native runtime](skills/peak/references/raga-runtime/SKILL.md) for the Python API. Read [the workflow guide](docs/guide/README.md) for the reference map.
|
|
7
|
+
Read [peak](skills/peak/SKILL.md) to pick a reference. Read [the native runtime](skills/peak/references/raga-runtime/SKILL.md) for the Python API. Read [the workflow guide](docs/guide/README.md) for the reference map. In instance sessions, workers return supervisor-owned workspace changes rather than Git commits. Ordinary sessions keep code changes in the parent session and use read-only children. Skill changes go through candidate_read, candidate_write, and candidate_commit. Promotion remains a trusted operator operation.
|
|
8
8
|
|
|
9
9
|
## Sources and regeneration
|
|
10
10
|
|
|
@@ -23,10 +23,20 @@
|
|
|
23
23
|
}
|
|
24
24
|
],
|
|
25
25
|
"skills": [
|
|
26
|
+
{
|
|
27
|
+
"name": "bend",
|
|
28
|
+
"path": "skills/bend/SKILL.md",
|
|
29
|
+
"source": "raga"
|
|
30
|
+
},
|
|
26
31
|
{
|
|
27
32
|
"name": "peak",
|
|
28
33
|
"path": "skills/peak/SKILL.md",
|
|
29
34
|
"source": "pstack"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "raga-artifacts",
|
|
38
|
+
"path": "skills/raga-artifacts/SKILL.md",
|
|
39
|
+
"source": "raga"
|
|
30
40
|
}
|
|
31
41
|
],
|
|
32
42
|
"files": [
|
|
@@ -95,7 +105,7 @@
|
|
|
95
105
|
},
|
|
96
106
|
{
|
|
97
107
|
"path": "docs/guide/01-setup.md",
|
|
98
|
-
"sha256": "
|
|
108
|
+
"sha256": "dc1bf7425558e5bb5a8d464f55b6dea40825aab1821fd6493cd44682bb2e1f94",
|
|
99
109
|
"source": "pstack/docs/guide/01-setup.md",
|
|
100
110
|
"sourceSha256": "384655bdecc713122ca69a485723c58462002a1d512415e94e48597d0dce2fa5",
|
|
101
111
|
"adaptation": "raga native setup guide"
|
|
@@ -242,11 +252,25 @@
|
|
|
242
252
|
},
|
|
243
253
|
{
|
|
244
254
|
"path": "README.md",
|
|
245
|
-
"sha256": "
|
|
255
|
+
"sha256": "f58c9364c2f5a4b25f589ae4bbef0557f2d7fc60a16d87fd087cee3b13013154",
|
|
246
256
|
"source": "raga bundle maintenance guide",
|
|
247
|
-
"sourceSha256": "
|
|
257
|
+
"sourceSha256": "f58c9364c2f5a4b25f589ae4bbef0557f2d7fc60a16d87fd087cee3b13013154",
|
|
248
258
|
"adaptation": "raga bundle maintenance guide"
|
|
249
259
|
},
|
|
260
|
+
{
|
|
261
|
+
"path": "skills/bend/bend_tool.py",
|
|
262
|
+
"sha256": "cee21f9e40c1d95702f09bd635db3046683f95c3d78f18bd1e68e30e192ed968",
|
|
263
|
+
"source": "raga native adaptation",
|
|
264
|
+
"sourceSha256": "cee21f9e40c1d95702f09bd635db3046683f95c3d78f18bd1e68e30e192ed968",
|
|
265
|
+
"adaptation": "raga native adaptation"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"path": "skills/bend/SKILL.md",
|
|
269
|
+
"sha256": "89001ac986846444f277ab806c5f92f994924569e418f3da327d61c94b028d2e",
|
|
270
|
+
"source": "raga native adaptation",
|
|
271
|
+
"sourceSha256": "89001ac986846444f277ab806c5f92f994924569e418f3da327d61c94b028d2e",
|
|
272
|
+
"adaptation": "raga native adaptation"
|
|
273
|
+
},
|
|
250
274
|
{
|
|
251
275
|
"path": "skills/peak/playbooks/authoring-a-skill.md",
|
|
252
276
|
"sha256": "4b9b7de20a9456bb17c8646e92b6591408ad68567fe33ed16f3cb6f1b07f40bf",
|
|
@@ -655,7 +679,7 @@
|
|
|
655
679
|
},
|
|
656
680
|
{
|
|
657
681
|
"path": "skills/peak/references/peak-setup/SKILL.md",
|
|
658
|
-
"sha256": "
|
|
682
|
+
"sha256": "5015abcbbb917dd931b131ec107c8b27b1264990db3f556967446b6c61b2445b",
|
|
659
683
|
"source": "pstack/skills/setup-pstack/SKILL.md",
|
|
660
684
|
"sourceSha256": "b45512f6ca5e96e81681984683b7472bfe892581da3a89a73cca4159438f29ed",
|
|
661
685
|
"adaptation": "raga execution adaptation of skills/peak/references/peak-setup/SKILL.md"
|
|
@@ -858,16 +882,16 @@
|
|
|
858
882
|
},
|
|
859
883
|
{
|
|
860
884
|
"path": "skills/peak/references/raga-runtime/raga_runtime.py",
|
|
861
|
-
"sha256": "
|
|
885
|
+
"sha256": "aee7412788daf1b7114f8d9fe96051ef4db7aa9cd43443319a68425c3467045e",
|
|
862
886
|
"source": "raga native Python adapter",
|
|
863
|
-
"sourceSha256": "
|
|
887
|
+
"sourceSha256": "aee7412788daf1b7114f8d9fe96051ef4db7aa9cd43443319a68425c3467045e",
|
|
864
888
|
"adaptation": "raga native Python adapter"
|
|
865
889
|
},
|
|
866
890
|
{
|
|
867
891
|
"path": "skills/peak/references/raga-runtime/SKILL.md",
|
|
868
|
-
"sha256": "
|
|
892
|
+
"sha256": "53a3f75e3611316a3e1a6f402989dc89ef309bc511fa624dacdf5266ef3279c7",
|
|
869
893
|
"source": "raga native adaptation",
|
|
870
|
-
"sourceSha256": "
|
|
894
|
+
"sourceSha256": "53a3f75e3611316a3e1a6f402989dc89ef309bc511fa624dacdf5266ef3279c7",
|
|
871
895
|
"adaptation": "raga native adaptation"
|
|
872
896
|
},
|
|
873
897
|
{
|
|
@@ -1390,10 +1414,52 @@
|
|
|
1390
1414
|
},
|
|
1391
1415
|
{
|
|
1392
1416
|
"path": "skills/peak/SKILL.md",
|
|
1393
|
-
"sha256": "
|
|
1417
|
+
"sha256": "b8062baa06a1e870f988b155b16f82b8cac383e31085b1370431c84d6c29b662",
|
|
1394
1418
|
"source": "pstack/skills/poteto-mode/SKILL.md",
|
|
1395
1419
|
"sourceSha256": "2755f102e7a6d0496b429d1031a22fb353e1f3d523543367caeaae5c4ed6f544",
|
|
1396
1420
|
"adaptation": "raga native delegation policy"
|
|
1421
|
+
},
|
|
1422
|
+
{
|
|
1423
|
+
"path": "skills/raga-artifacts/artifact_tool.py",
|
|
1424
|
+
"sha256": "5e4d7ca9db500877f6386a85ce7906cdff79f0c791cad4c5253c9c6d7043b721",
|
|
1425
|
+
"source": "raga native adaptation",
|
|
1426
|
+
"sourceSha256": "5e4d7ca9db500877f6386a85ce7906cdff79f0c791cad4c5253c9c6d7043b721",
|
|
1427
|
+
"adaptation": "raga native adaptation"
|
|
1428
|
+
},
|
|
1429
|
+
{
|
|
1430
|
+
"path": "skills/raga-artifacts/artifact.mjs",
|
|
1431
|
+
"sha256": "e1ac1f55af91b00dc8c542d80a9dc536868cb7d909aa5b42c606e4d76ad09535",
|
|
1432
|
+
"source": "raga native adaptation",
|
|
1433
|
+
"sourceSha256": "e1ac1f55af91b00dc8c542d80a9dc536868cb7d909aa5b42c606e4d76ad09535",
|
|
1434
|
+
"adaptation": "raga native adaptation"
|
|
1435
|
+
},
|
|
1436
|
+
{
|
|
1437
|
+
"path": "skills/raga-artifacts/diagrams.md",
|
|
1438
|
+
"sha256": "f5218754b25c7a441ee81ff6755a36320c559835edc574b00ac6eaf9c82b2de6",
|
|
1439
|
+
"source": "raga native adaptation",
|
|
1440
|
+
"sourceSha256": "f5218754b25c7a441ee81ff6755a36320c559835edc574b00ac6eaf9c82b2de6",
|
|
1441
|
+
"adaptation": "raga native adaptation"
|
|
1442
|
+
},
|
|
1443
|
+
{
|
|
1444
|
+
"path": "skills/raga-artifacts/SKILL.md",
|
|
1445
|
+
"sha256": "e258a80cadf528f411ed25bc793a4b0963a38e0776485cb2df7e357fb277192a",
|
|
1446
|
+
"source": "raga native adaptation",
|
|
1447
|
+
"sourceSha256": "e258a80cadf528f411ed25bc793a4b0963a38e0776485cb2df7e357fb277192a",
|
|
1448
|
+
"adaptation": "raga native adaptation"
|
|
1449
|
+
},
|
|
1450
|
+
{
|
|
1451
|
+
"path": "skills/raga-artifacts/templates/doc.html",
|
|
1452
|
+
"sha256": "a2f0ed6c3f7b4cbea5f5fa16436623a71ac49ad536a1129bb08911e4337eb9f6",
|
|
1453
|
+
"source": "raga native adaptation",
|
|
1454
|
+
"sourceSha256": "a2f0ed6c3f7b4cbea5f5fa16436623a71ac49ad536a1129bb08911e4337eb9f6",
|
|
1455
|
+
"adaptation": "raga native adaptation"
|
|
1456
|
+
},
|
|
1457
|
+
{
|
|
1458
|
+
"path": "skills/raga-artifacts/templates/slides.html",
|
|
1459
|
+
"sha256": "1aa47336acfe08114464cf27e13131714c23d4f7667940a92620eb39fb626c3c",
|
|
1460
|
+
"source": "raga native adaptation",
|
|
1461
|
+
"sourceSha256": "1aa47336acfe08114464cf27e13131714c23d4f7667940a92620eb39fb626c3c",
|
|
1462
|
+
"adaptation": "raga native adaptation"
|
|
1397
1463
|
}
|
|
1398
1464
|
],
|
|
1399
1465
|
"exclusions": [
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
# Set up the bundled workflows
|
|
2
2
|
|
|
3
|
-
Every initialized instance already contains this pinned portable bundle. There is no plugin installation step. Read [the native runtime](../../skills/peak/references/raga-runtime/SKILL.md), then [configure model roles](../../skills/peak/references/peak-setup/SKILL.md) through a candidate revision. A null role inherits the session model. Verify available tools with capability_report before choosing a terminal, browser, or formal-verification workflow. Optional integrations require explicit setup. Start with /skill:peak and a goal with observable acceptance criteria.
|
|
3
|
+
Every initialized instance already contains this pinned portable bundle. There is no plugin installation step. Read [the native runtime](../../skills/peak/references/raga-runtime/SKILL.md), then assign models to roles: run `/agent-setup` in an ordinary session, or [configure model roles](../../skills/peak/references/peak-setup/SKILL.md) through a candidate revision in an instance session. A null role inherits the session model. Verify available tools with capability_report before choosing a terminal, browser, or formal-verification workflow. Optional integrations require explicit setup. Start with /skill:peak and a goal with observable acceptance criteria.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bend
|
|
3
|
+
description: Turn rules the user states in plain words into Bend laws, write the proofs, and check them with the bend CLI. Use when the user asks to formally verify, prove, or guarantee that a rule can never break.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Bend formal verification
|
|
7
|
+
|
|
8
|
+
You write Bend laws and proofs for the user. The user decides the rules. Bend decides whether the proofs hold. Never claim a rule is proven unless `bend` printed `ALL PROOFS CHECK`.
|
|
9
|
+
|
|
10
|
+
By Bend convention, `LAWS.bend` states the rules and `PROOF.bend` proves them. Here you write both, so the user must approve every law before you write proofs. After approval, a law is the spec. Do not edit it to make a proof pass.
|
|
11
|
+
|
|
12
|
+
## Load the helper
|
|
13
|
+
|
|
14
|
+
Work in the Python tool. Load the helper beside this file, then find the CLI:
|
|
15
|
+
|
|
16
|
+
```python
|
|
17
|
+
exec(await read("<directory of this SKILL.md>/bend_tool.py"), globals())
|
|
18
|
+
bend = find_bend()
|
|
19
|
+
files = law_files()
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
`find_bend()` checks `BEND_BIN`, then `PATH`, then `~/.bend/bin/bend`. If it returns `None`, stop. Ask the user to install Bend with `curl -fsSL https://bend-lang.com/install.sh | sh`. Do not install it yourself.
|
|
23
|
+
|
|
24
|
+
Outside the Python tool, run the same commands with bash: `bend guide`, `bend PROOF.bend --check-only`.
|
|
25
|
+
|
|
26
|
+
## Read the guide first
|
|
27
|
+
|
|
28
|
+
Run `guide = await bend_guide()` and keep it in a variable. Read the sections on laws and proofs, recursion and termination, quantities, and kinds before you write Bend. Search the variable for anything else you need. `bend base --types` and `bend base <name>` print the standard library.
|
|
29
|
+
|
|
30
|
+
## Steps
|
|
31
|
+
|
|
32
|
+
1. **Ask for the rules.** Ask the user which rules must never break, then stop and wait for the answer. Offer two or three concrete examples taken from the project. Do not invent rules. If the user asks you to choose, propose rules in plain words and wait for confirmation.
|
|
33
|
+
2. **Write the laws.** Write `files["laws"]`. Start with `import Base`. Define, in Bend, the code or model each rule talks about, then add one `law` per rule. Put the user's own words in a `# LAW:` comment above each law. Keep each law to one rule.
|
|
34
|
+
3. **Check that the laws parse.** Write a `files["proof"]` that only imports `./LAWS.bend as Laws`, then run `await bend_check(files["proof"])`. Expect `SOME PROOFS FAIL` with a count of open claims. Fix any other error in the laws file.
|
|
35
|
+
4. **Get approval.** Show the user each law twice: the Bend text and a one-sentence plain reading. Say what the laws do not cover. Ask whether they match the intended rules. Revise and ask again until the user approves. After the user says yes, call `approve_laws(files["laws"])`. A message the user sent before you asked is not approval. `bend_check` fails until the laws are approved.
|
|
36
|
+
5. **Write the proofs.** In `files["proof"]`, prove each law with `def Laws.<law name>`. Do not write a `law` in the proof file, and do not move a law out of the laws file. The laws file includes its definitions. If a proof needs any change to that file, stop, show the user the change, and call `approve_laws` again only after a new yes. Run `await bend_check(files["proof"])` after each change. Read `problems` first, then the expected and observed terms in `output`. Use `?name` to print a goal while you work.
|
|
37
|
+
6. **Handle a law you cannot prove.** If the output shows the law is false, show the user the counterexample and ask how to change the rule. If you cannot find a proof, leave `?TODO` in that def and report the law as open. Never use `@unsafe` or foreign code in a proof.
|
|
38
|
+
7. **Report.** A check passes only when `bend_check` returns `verdict` `passed`, which needs `ALL PROOFS CHECK` and an empty `problems` list. Run the final check through `bend_check`, not bash. Quote its `verdict` and `problems` and the verdict line from `output`. Copy each law from the laws file as written. Do not retype or restate it in Bend. List each law as proven or open. If Lean is installed, `await bend_check(files["proof"], verdict=True)` rechecks with the Lean-proven kernel. Report its result separately.
|
|
39
|
+
|
|
40
|
+
## Where the files go
|
|
41
|
+
|
|
42
|
+
`law_files()` reads custom file names from `.raga/verification.json`.
|
|
43
|
+
|
|
44
|
+
- In an ordinary session, `files["directory"]` is `.raga/verification/`. These are the files the instance gate reads.
|
|
45
|
+
- In an instance session, the sandbox hides `.raga`, so `files["directory"]` is `verification-draft/`. After the user approves, tell them to copy both files into `.raga/verification/`.
|
|
46
|
+
|
|
47
|
+
## Turn on the gate
|
|
48
|
+
|
|
49
|
+
Only the user can make a revision depend on these proofs. In an instance project, give the user these commands and let them run each one:
|
|
50
|
+
|
|
51
|
+
- `raga verify install --approved --network` downloads the pinned Bend release the gate uses.
|
|
52
|
+
- `raga verify enable --approved` requires a passing check before a harness revision becomes active.
|
|
53
|
+
- `raga verify run` runs the check in the sandbox and records the verdict.
|
|
54
|
+
|
|
55
|
+
## Limits
|
|
56
|
+
|
|
57
|
+
- A law proves only the Bend code that `LAWS.bend` defines or imports. For a project in another language, the laws prove facts about a Bend model of the code. Say so in the report.
|
|
58
|
+
- Proofs need structural recursion. Read the termination section before you write recursive defs.
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"""Bend helpers for the raga Python REPL. Load with exec(await read(path), globals())."""
|
|
2
|
+
|
|
3
|
+
import asyncio
|
|
4
|
+
import hashlib
|
|
5
|
+
import json
|
|
6
|
+
import os
|
|
7
|
+
import re
|
|
8
|
+
import shlex
|
|
9
|
+
import shutil
|
|
10
|
+
|
|
11
|
+
BEND_INSTALL = "curl -fsSL https://bend-lang.com/install.sh | sh"
|
|
12
|
+
CHECK_TIMEOUT = 600
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def find_bend():
|
|
16
|
+
"""Path of the bend executable, or None. BEND_BIN wins, then PATH, then the installer's default."""
|
|
17
|
+
for candidate in (os.environ.get("BEND_BIN"), shutil.which("bend"), os.path.expanduser("~/.bend/bin/bend")):
|
|
18
|
+
if candidate and os.path.isfile(candidate) and os.access(candidate, os.X_OK):
|
|
19
|
+
return candidate
|
|
20
|
+
return None
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def law_files(project="."):
|
|
24
|
+
"""Where LAWS.bend and PROOF.bend belong, and whether this session may write there.
|
|
25
|
+
|
|
26
|
+
An ordinary session writes the files the instance gate reads: .raga/verification/<laws> and <proof>,
|
|
27
|
+
named by .raga/verification.json. An instance session cannot write .raga, so it drafts under
|
|
28
|
+
verification-draft/ for the user to copy.
|
|
29
|
+
"""
|
|
30
|
+
project = os.path.abspath(project)
|
|
31
|
+
names = {"laws": "LAWS.bend", "proof": "PROOF.bend"}
|
|
32
|
+
config = os.path.join(project, ".raga", "verification.json")
|
|
33
|
+
if os.path.isfile(config):
|
|
34
|
+
with open(config, encoding="utf-8") as handle:
|
|
35
|
+
data = json.load(handle)
|
|
36
|
+
names = {key: data.get(key) or default for key, default in names.items()}
|
|
37
|
+
instance = bool(os.environ.get("RAGA_INSTANCE_ID"))
|
|
38
|
+
directory = os.path.join(project, "verification-draft" if instance else os.path.join(".raga", "verification"))
|
|
39
|
+
return {
|
|
40
|
+
"directory": directory,
|
|
41
|
+
"laws": os.path.join(directory, names["laws"]),
|
|
42
|
+
"proof": os.path.join(directory, names["proof"]),
|
|
43
|
+
"mode": "instance" if instance else "ordinary",
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
async def _run(command, cwd):
|
|
48
|
+
line = "cd " + shlex.quote(cwd) + " && " + command + " 2>&1; printf '\\nEXIT=%s\\n' $?"
|
|
49
|
+
runner = globals().get("bash")
|
|
50
|
+
if runner is not None:
|
|
51
|
+
output = await runner(line, timeout=CHECK_TIMEOUT)
|
|
52
|
+
else:
|
|
53
|
+
process = await asyncio.create_subprocess_shell(line, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.STDOUT)
|
|
54
|
+
stdout, _ = await asyncio.wait_for(process.communicate(), CHECK_TIMEOUT)
|
|
55
|
+
output = stdout.decode("utf-8", "replace")
|
|
56
|
+
body, _, code = output.rstrip().rpartition("\nEXIT=")
|
|
57
|
+
return body.strip(), int(code) if code.strip().isdigit() else None
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
async def bend_guide(topic=None):
|
|
61
|
+
"""The Bend guide text, or one named sub-guide such as "shaders"."""
|
|
62
|
+
bend = find_bend()
|
|
63
|
+
if bend is None:
|
|
64
|
+
raise RuntimeError("bend is not installed. Ask the user to run: " + BEND_INSTALL)
|
|
65
|
+
output, code = await _run(shlex.quote(bend) + " guide" + ((" " + shlex.quote(topic)) if topic else ""), os.getcwd())
|
|
66
|
+
if code != 0:
|
|
67
|
+
raise RuntimeError(output)
|
|
68
|
+
return output
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def _digest(path):
|
|
72
|
+
with open(path, "rb") as handle:
|
|
73
|
+
return hashlib.sha256(handle.read()).hexdigest()
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def approve_laws(laws_path):
|
|
77
|
+
"""Record the laws the user approved. Call only after the user says yes."""
|
|
78
|
+
with open(laws_path + ".approved", "w", encoding="utf-8") as handle:
|
|
79
|
+
handle.write(_digest(laws_path) + "\n")
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def _problems(proof_path):
|
|
83
|
+
with open(proof_path, encoding="utf-8") as handle:
|
|
84
|
+
proof = handle.read()
|
|
85
|
+
imported = re.search(r"^import\s+\./(\S+)\s+as\s+Laws\s*$", proof, re.M)
|
|
86
|
+
if not imported:
|
|
87
|
+
return ["PROOF.bend must import the laws file as Laws"]
|
|
88
|
+
problems = []
|
|
89
|
+
if re.search(r"^law\s", proof, re.M):
|
|
90
|
+
problems.append("PROOF.bend states a law. Laws belong only in the laws file")
|
|
91
|
+
laws_path = os.path.join(os.path.dirname(proof_path), imported.group(1))
|
|
92
|
+
with open(laws_path, encoding="utf-8") as handle:
|
|
93
|
+
laws = handle.read()
|
|
94
|
+
if not re.search(r"^law\s", laws, re.M):
|
|
95
|
+
problems.append("the laws file states no law")
|
|
96
|
+
problems.extend(_unused_variables(laws))
|
|
97
|
+
approval = laws_path + ".approved"
|
|
98
|
+
if not os.path.isfile(approval):
|
|
99
|
+
problems.append("the user has not approved these laws. Show them to the user and call approve_laws after a yes")
|
|
100
|
+
else:
|
|
101
|
+
with open(approval, encoding="utf-8") as handle:
|
|
102
|
+
if handle.read().strip() != _digest(laws_path):
|
|
103
|
+
problems.append("the laws changed after the user approved them. Ask the user to approve them again")
|
|
104
|
+
return problems
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def _unused_variables(laws):
|
|
108
|
+
"""A law whose statement ignores one of its `for` variables usually does not say what the user meant."""
|
|
109
|
+
problems = []
|
|
110
|
+
for name, body in re.findall(r"^law\s+([\w.]+)\s*:[^\n]*\n((?:[ \t]+[^\n]*(?:\n|$))+)", laws, re.M):
|
|
111
|
+
lines = [line.split("#", 1)[0].strip() for line in body.splitlines()]
|
|
112
|
+
binders = [line[4:].split(":", 1)[0] for line in lines if line.startswith("for ")]
|
|
113
|
+
statement = " ".join(line for line in lines if line and not line.startswith("for "))
|
|
114
|
+
for binder in binders:
|
|
115
|
+
for variable in (part.strip().lstrip("+-") for part in binder.split(",")):
|
|
116
|
+
if variable and not re.search(r"(?<![\w.])" + re.escape(variable) + r"(?!\w)", statement):
|
|
117
|
+
problems.append("law " + name + " never uses its variable " + variable)
|
|
118
|
+
return problems
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
async def bend_check(proof_path, verdict=False):
|
|
122
|
+
"""Run the gate on PROOF.bend. Passed needs exit 0, ALL PROOFS CHECK, and no problems.
|
|
123
|
+
|
|
124
|
+
Problems are structural: a law stated in the proof file, a laws file without laws, or laws that
|
|
125
|
+
differ from the approved ones. verdict=True adds --verdict, which rechecks with the Lean-proven
|
|
126
|
+
kernel and needs Lean installed.
|
|
127
|
+
"""
|
|
128
|
+
bend = find_bend()
|
|
129
|
+
if bend is None:
|
|
130
|
+
raise RuntimeError("bend is not installed. Ask the user to run: " + BEND_INSTALL)
|
|
131
|
+
proof_path = os.path.abspath(proof_path)
|
|
132
|
+
problems = _problems(proof_path)
|
|
133
|
+
command = shlex.quote(bend) + " " + shlex.quote(os.path.basename(proof_path)) + (" --verdict" if verdict else " --check-only")
|
|
134
|
+
output, code = await _run(command, os.path.dirname(proof_path))
|
|
135
|
+
passed = code == 0 and "ALL PROOFS CHECK" in output and not problems
|
|
136
|
+
if problems:
|
|
137
|
+
output = "CHECK REJECTED: " + "; ".join(problems) + ". Bend's own output follows and does not count.\n" + output
|
|
138
|
+
return {
|
|
139
|
+
"verdict": "passed" if passed else ("failed" if code is not None else "inconclusive"),
|
|
140
|
+
"problems": problems,
|
|
141
|
+
"exit_code": code,
|
|
142
|
+
"output": output,
|
|
143
|
+
"command": command,
|
|
144
|
+
}
|
|
@@ -39,7 +39,7 @@ Remaining triggers:
|
|
|
39
39
|
|
|
40
40
|
## Reference index
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
Peak, `bend`, and `raga-artifacts` are the installed skills. `bend` handles Bend formal verification, and `raga-artifacts` makes shareable slides and documents. Every other workflow is a reference under `references/<name>/SKILL.md`. Pick the reference whose description matches the task and read it in full before acting. Do not read them all.
|
|
43
43
|
|
|
44
44
|
### Principles
|
|
45
45
|
|
|
@@ -127,7 +127,7 @@ This is the only installed skill. Every other workflow is a reference under `ref
|
|
|
127
127
|
|
|
128
128
|
**Use `spec: "poteto-agent"` for any subagent you spawn inside a playbook step** (code-writing delegates, ad-hoc helpers). The chat that receives `/peak` runs the playbook. Never spawn a `poteto-agent` to run the playbook itself. Routed workflow references (`how`, `why`, `interrogate`, `reflect`, `swarm`) choose a native specification and configured model for review. Respect what the reference prescribes, don't override to `poteto-agent`.
|
|
129
129
|
|
|
130
|
-
**Defaults for every run_child call.** Use the pinned resource root and one of worker, poteto-agent, or comment-sicko. Read-only reviewers use read_only=True. Writing children use read_only=False, details=True. Run independent calls with asyncio.gather. Select models
|
|
130
|
+
**Defaults for every run_child call.** Use the pinned resource root and one of worker, poteto-agent, or comment-sicko. Read-only reviewers use read_only=True. Writing children use read_only=False, details=True. Run independent calls with asyncio.gather. Select models by role with run_child(..., role=..., seat=...) and agent_roles(); see raga-runtime. Null inherits the parent. Same-family seats are not model-diverse.
|
|
131
131
|
|
|
132
132
|
**Match the model to the job.** Use real configured provider/model selectors. The runtime does not accept separate effort, speed, cloud environment, or resume fields. Include each seat's configured selector in its assignment. Report an unavailable selector rather than substitute another model.
|
|
133
133
|
|
|
@@ -3,7 +3,7 @@ name: peak-setup
|
|
|
3
3
|
description: Configure real native model selectors for the bundled engineering workflows through a candidate harness revision.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
Read [the native Python adapter](../raga-runtime/SKILL.md) before executing this workflow. Authoring targets candidate revisions. Children use run_child, not an external agent service.
|
|
6
|
+
Read [the native Python adapter](../raga-runtime/SKILL.md) before executing this workflow. Call `harness_mode()` first. In an ordinary session, model roles are user settings: ask the user to run the `/agent-setup` command, which lists available models, sets the reasoning budget, and assigns each role and panel seat. Do not edit settings files yourself. The rest of this workflow is for instance sessions. Authoring targets candidate revisions. Children use run_child, not an external agent service.
|
|
7
7
|
|
|
8
8
|
# Configure native model roles
|
|
9
9
|
|
|
@@ -12,23 +12,37 @@ Use the Python tool. It owns one persistent kernel per session. Load this adapte
|
|
|
12
12
|
|
|
13
13
|
`await context.history(offset=0, limit=None)` reads only this session's history. Use explicitly provided current-instance records for historical research. Never scan another project's home or transcripts. `await llm_query(prompt, system=None, model=None)` is a one-shot model call. `await llm_batch(prompts, system=None, model=None)` runs independent one-shot calls.
|
|
14
14
|
|
|
15
|
-
Load `raga_runtime.py` beside this skill with `exec(await read(absolute_helper_path), globals())`, then call `await run_child(spec, task, resource_root, context_data=None, model=None, max_turns=None, read_only=True, details=False)`.
|
|
15
|
+
Load `raga_runtime.py` beside this skill with `exec(await read(absolute_helper_path), globals())`, then call `await run_child(spec, task, resource_root, context_data=None, model=None, max_turns=None, read_only=True, details=False, role=None, seat=None)`. Independent calls run with `await asyncio.gather(...)`. A context value is data, never a permission grant.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
## Pick the session mode first
|
|
18
|
+
|
|
19
|
+
Call `harness_mode()` before any child launch, `instance` call, or `memory` call. It returns `instance` or `ordinary`.
|
|
20
|
+
|
|
21
|
+
In an instance session, the resource root is the pinned harness path. Writing children require `read_only=False, details=True` and receive isolated application workspaces from the supervisor. The supervisor pins every child to the parent's harness revision. A `read_only=True` child gets the parent's workspace mounted read-only.
|
|
22
|
+
|
|
23
|
+
In an ordinary session, the resource root is the `bundled-skills` directory three levels above this file. That is the directory holding `skills/` and `agents/`. Children share the parent's checkout. Raga does not isolate them, collect their changes, or enforce `read_only=True`. Follow these rules:
|
|
24
|
+
|
|
25
|
+
- Make every code change in this session. `run_child` refuses `read_only=False`.
|
|
26
|
+
- Use `read_only=True` children for exploration, design sketches, and review. `run_child` adds a no-write instruction to each child prompt.
|
|
27
|
+
- A playbook step that delegates code writing is satisfied when this session owns the diff and a read-only child reviews it.
|
|
28
|
+
- `instance` and `memory` calls do not exist. Candidate authoring, child patches, integration workspaces, instance memory, and no-mistakes need instance mode. Skip those steps and report them as unavailable in ordinary mode.
|
|
29
|
+
- Commit, branch, and push only when the user asks. Preserve unrelated changes in the shared checkout.
|
|
30
|
+
|
|
31
|
+
Child specifications are in `../../../agents/`. `poteto-agent` carries the engineering style. `comment-sicko` reviews comments. `worker` handles general tasks. Model selectors are real provider/model strings from the configured registry. `None` inherits the parent. Roles pick models: `await agent_roles()` returns the table children resolve against, which is the user's `/agent-setup` choices in an ordinary session and the pinned revision's `agents/model-roles.json` in an instance session. Wherever a workflow says to take a model from a line of `agents/model-roles.json`, read that line from `agent_roles()` instead and launch each seat with `run_child(..., role=line, seat=i)`, omitting `seat` for a single-value role and leaving `model` unset. The host applies the assigned model and reasoning budget. A panel role's list length sets how many seats to run. When different review seats resolve to the same family, report that the review is not model-diverse. Do not invent aliases or silently replace a rejected model.
|
|
18
32
|
|
|
19
33
|
`answer['content']` and `answer['ready'] = True` return a child result. The native `rlm_query` API returns text by default. `details=True` returns the supervisor's workspace and change evidence. Never promise a worktree from a plain text answer.
|
|
20
34
|
|
|
21
|
-
Only the documented run_child parameters are supported. Inherited spec labels select one of the three native specifications. Tool-schema, environment, cloud branch, background, resume, effort, and file-attachment fields from other agents are not launch arguments. Read-only review does not remove ordinary sandboxed inspection tools.
|
|
35
|
+
Only the documented run_child parameters are supported. Inherited spec labels select one of the three native specifications. Tool-schema, environment, cloud branch, background, resume, effort, and file-attachment fields from other agents are not launch arguments. Read-only review does not remove ordinary sandboxed inspection tools. Users assign models with `/agent-setup` in ordinary sessions, or a candidate revision of agents/model-roles.json in instance sessions. Null inherits. A rejected selector is a prerequisite failure, never permission to choose an unapproved substitute.
|
|
22
36
|
|
|
23
|
-
|
|
37
|
+
In instance mode, use `await instance.child_patch(workspace_id)` to collect a child's owned change and patch. Use `await instance.integrate(workspace_ids, command, args, timeout_ms=120000)` for one supervisor-owned integration workspace and combined verification after each merge. Inspect its accepted result and returned patch before applying changes to the root workspace. Do not create or remove Git worktrees from worker shell commands. Git administration is deliberately hidden. Portable prose that requests branches or worktrees means these supervisor APIs, not raw Git worktree mutation.
|
|
24
38
|
|
|
25
39
|
Use an in-process bounded loop for autonomous work. A process exit ends the loop. There is no persistent wake scheduler or editor automation service. Keep ownership records in the instance state and stop descendant processes before cleanup.
|
|
26
40
|
|
|
27
41
|
## Candidate authoring
|
|
28
42
|
|
|
29
|
-
`await instance.info()` reports the current pin. `candidate = await instance.candidate_create()` creates an editable proposal. Read and write its allowlisted resources with `await instance.candidate_read(candidate['id'], path)` and `await instance.candidate_write(candidate['id'], path, content)`. Use `await instance.candidate_commit(candidate['id'], message)` to commit it. Ordinary model filesystem access does not expose instance state or accepted artifacts. Do not invoke management CLI commands through shell. Promotion is a user CLI operation backed by exact-revision evidence, never a model approval.
|
|
43
|
+
Candidate authoring needs instance mode. `await instance.info()` reports the current pin. `candidate = await instance.candidate_create()` creates an editable proposal. Read and write its allowlisted resources with `await instance.candidate_read(candidate['id'], path)` and `await instance.candidate_write(candidate['id'], path, content)`. Use `await instance.candidate_commit(candidate['id'], message)` to commit it. Ordinary model filesystem access does not expose instance state or accepted artifacts. Do not invoke management CLI commands through shell. Promotion is a user CLI operation backed by exact-revision evidence, never a model approval.
|
|
30
44
|
|
|
31
|
-
`await memory.search(query)`, `await memory.get(entry_id)`, and `await memory.observe(text, evidence)` access only this project's structured observations. Search returns observations, not an automatic proof that an earlier decision remains valid. Read the current source before reusing a lesson.
|
|
45
|
+
In instance mode, `await memory.search(query)`, `await memory.get(entry_id)`, and `await memory.observe(text, evidence)` access only this project's structured observations. Search returns observations, not an automatic proof that an earlier decision remains valid. Read the current source before reusing a lesson.
|
|
32
46
|
|
|
33
47
|
## Capabilities and dependencies
|
|
34
48
|
|
|
@@ -4,11 +4,27 @@ import os
|
|
|
4
4
|
import shlex
|
|
5
5
|
from pathlib import PurePosixPath
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
ORDINARY_READ_ONLY = "This child shares the parent's checkout in an ordinary raga session, and raga does not enforce read-only access here. Do not create, edit, delete, format, stage, or commit files. Do not run commands that write to the project."
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def harness_mode():
|
|
11
|
+
return "instance" if os.environ.get("RAGA_INSTANCE_ID") else "ordinary"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
async def agent_roles():
|
|
15
|
+
"""Role table children resolve against: /agent-setup choices in ordinary sessions, the pinned agents/model-roles.json in instance sessions."""
|
|
16
|
+
from raga_rlm import host_request
|
|
17
|
+
return await host_request({"type": "agent.roles"})
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
async def run_child(spec, task, resource_root, context_data=None, model=None, max_turns=None, read_only=True, details=False, role=None, seat=None):
|
|
8
21
|
if spec not in ("worker", "poteto-agent", "comment-sicko"):
|
|
9
22
|
raise ValueError("Unknown bundled child specification")
|
|
10
23
|
if not read_only and not details:
|
|
11
24
|
raise ValueError("Writing children require details=True for supervisor-owned change evidence")
|
|
25
|
+
ordinary = harness_mode() == "ordinary"
|
|
26
|
+
if ordinary and not read_only:
|
|
27
|
+
raise ValueError("Ordinary raga sessions have no isolated child workspaces. Make the change in this session and use read_only=True children for exploration and review")
|
|
12
28
|
root = resource_root.rstrip("/")
|
|
13
29
|
definition = json.loads(await read(root + "/agents/" + spec + ".json"))
|
|
14
30
|
definition_path = PurePosixPath(definition["instructions"])
|
|
@@ -18,11 +34,13 @@ async def run_child(spec, task, resource_root, context_data=None, model=None, ma
|
|
|
18
34
|
for name in definition["skills"]:
|
|
19
35
|
path = root + ("/skills/peak/SKILL.md" if name == "peak" else "/skills/peak/references/" + name + "/SKILL.md")
|
|
20
36
|
instructions += "\n\n" + await read(path)
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
prompt = instructions + "\n\nPinned resource root: " + root + "\n\n# Assignment\n" + task
|
|
25
|
-
|
|
37
|
+
if model is None and role is None:
|
|
38
|
+
role = definition["modelRole"]
|
|
39
|
+
notice = "\n\n" + ORDINARY_READ_ONLY if ordinary else ""
|
|
40
|
+
prompt = instructions + "\n\nPinned resource root: " + root + notice + "\n\n# Assignment\n" + task
|
|
41
|
+
if model is not None:
|
|
42
|
+
role, seat = None, None
|
|
43
|
+
return await rlm_query(prompt, context=context_data, model=model, max_turns=max_turns, read_only=read_only, details=details, role=role, seat=seat)
|
|
26
44
|
|
|
27
45
|
async def capability_report():
|
|
28
46
|
commands = {
|