Harden model results with lossless isolated repair and scoped permissions

This commit is contained in:
2026-10-09 20:02:41 +01:00
parent 0f80ff4e95
commit 67ac79765f
23 changed files with 977 additions and 58 deletions
@@ -56,6 +56,21 @@ Planning stages must not label a task blocked simply because they defer edits to
an implementer stage. Keep examples and prompts language-neutral unless the task
itself asks for a specific language.
Optional `permissions` is a JSON object with `edit` (run-directory-relative
patterns) and `shell` (exact commands) arrays. It narrows declared tools and any
run-level file scope; it never enables a missing tool. Empty arrays deny actions.
Nulls, duplicate/unknown keys, traversal and shell wildcards/chaining/redirects or
expansion are rejected. If edits are restricted and shell is enabled, provide an
explicit shell list too. Example: `{"edit":["README.md","plugin/*.qml"],"shell":["bash -n install.sh"]}`.
Use this block for intentional file/command restrictions; prose is not a runtime
permission policy. Keep ordinary workflows language-neutral and unrestricted
within their run directory unless the user asks for a narrower scope.
Malformed final JSON has bounded, syntax-only recovery even with `retries=0`;
it never replays stage tools or changes verdict/evidence. The native stable API
requests schema output; V2 still requires local envelope validation. Do not
promise recovery of truncated strings, missing evidence or invalid outcomes.
## Scheduling
Manual-only is the default. To schedule, put `# settings` before all stages with