docs(spec): document skill safe_mode, resource taxonomy, and script execution gate #184

Merged
CoreRasurae merged 1 commit from feature/m1-skill-resource-spec-update into develop 2026-11-20 19:09:13 +00:00
Member

Summary

ADR-2034's 2026-11-09 revision added D-8 (resource-directory taxonomy), D-9 (skill-local safe_mode and the double-safety gate), and D-10 (gated script execution), but the Package Registry Standard and the Actor Configuration Standard did not describe these capabilities. This PR closes that gap, purely in documentation — the described behavior already ships (see the feat(skills): ... commits already on develop).

  • docs/actor-registry-standard.md §16.3: extends the example with an asset and a non-standard folder alongside the existing script, so all four resource classes appear together, with a short note on when safe_mode: false is (and isn't) warranted. §16.1/§15.1 already carried the safe_mode field and the 1.2.0 revision row from prior work.
  • docs/index.md §4.4: documents the optional skills field in full — it had never been documented, even for its original D-5 introduction — covering the three reference schemes (local:/ID:/registry:), resolution/validation behavior, the discovery/activation/execution progressive-disclosure model, and the D-9 double-safety gate, in a new §4.4.8. Also documents the safe_mode LLM-agent config field (reusing the type: tool field's semantics), since it is the gate's "global" half. Bumps the standard to 1.10.0 with a §21.1 revision-history entry.
  • docs/tools/safe-mode.md: while reviewing user-facing documentation for this feature, found that the "Bundled skill script execution" section described the gate's allow_shell/safe_mode requirements as belonging to "the tool agent" — but the skill tool is only ever loaded onto a type: llm agent's own skills: catalogue (AgentFactory only resolves skills when agent_type == "llm"). Clarified that both fields live on that same type: llm agent's own config, matching the pattern already documented for shell/http_request timeouts.

No behavioral change. New Behave/Robot tests are not required for a documentation-only change, per the issue's acceptance criteria.

Test plan

  • nox -s docs — MkDocs builds cleanly, no new warnings
  • nox -s lint — clean
  • nox -s typecheck — clean (0 errors)
  • nox -s security_scan — clean
  • nox -s dead_code — clean
  • All new/edited YAML examples validated with yaml.safe_load
  • Verified cross-links to ADR-2034 resolve correctly, including the new anchor links into timeouts.md/index.md

Closes #164

## Summary ADR-2034's 2026-11-09 revision added D-8 (resource-directory taxonomy), D-9 (skill-local `safe_mode` and the double-safety gate), and D-10 (gated script execution), but the Package Registry Standard and the Actor Configuration Standard did not describe these capabilities. This PR closes that gap, purely in documentation — the described behavior already ships (see the `feat(skills): ...` commits already on `develop`). - `docs/actor-registry-standard.md` §16.3: extends the example with an asset and a non-standard folder alongside the existing script, so all four resource classes appear together, with a short note on when `safe_mode: false` is (and isn't) warranted. §16.1/§15.1 already carried the `safe_mode` field and the 1.2.0 revision row from prior work. - `docs/index.md` §4.4: documents the optional `skills` field in full — it had never been documented, even for its original D-5 introduction — covering the three reference schemes (`local:`/`ID:`/`registry:`), resolution/validation behavior, the discovery/activation/execution progressive-disclosure model, and the D-9 double-safety gate, in a new §4.4.8. Also documents the `safe_mode` LLM-agent config field (reusing the `type: tool` field's semantics), since it is the gate's "global" half. Bumps the standard to 1.10.0 with a §21.1 revision-history entry. - `docs/tools/safe-mode.md`: while reviewing user-facing documentation for this feature, found that the "Bundled skill script execution" section described the gate's `allow_shell`/`safe_mode` requirements as belonging to "the tool agent" — but the `skill` tool is only ever loaded onto a `type: llm` agent's own `skills:` catalogue (`AgentFactory` only resolves `skills` when `agent_type == "llm"`). Clarified that both fields live on that same `type: llm` agent's own config, matching the pattern already documented for `shell`/`http_request` timeouts. No behavioral change. New Behave/Robot tests are not required for a documentation-only change, per the issue's acceptance criteria. ## Test plan - [x] `nox -s docs` — MkDocs builds cleanly, no new warnings - [x] `nox -s lint` — clean - [x] `nox -s typecheck` — clean (0 errors) - [x] `nox -s security_scan` — clean - [x] `nox -s dead_code` — clean - [x] All new/edited YAML examples validated with `yaml.safe_load` - [x] Verified cross-links to ADR-2034 resolve correctly, including the new anchor links into `timeouts.md`/`index.md` Closes #164
CoreRasurae added this to the v2.1.0 milestone 2026-11-20 12:41:45 +00:00
ADR-2034's 2026-11-09 revision added D-8 (resource taxonomy), D-9
(safe_mode and the double-safety gate), and D-10 (script execution), but
the Package Registry Standard and the Actor Configuration Standard did
not describe these capabilities, so implementations had no normative
text to declare conformance against.

- docs/actor-registry-standard.md §16.3: extend the example with an
  asset and a non-standard folder alongside the existing script, so all
  four resource classes are represented together, with a short note on
  when safe_mode: false is (and isn't) warranted. §16.1/§15.1 already
  carried the safe_mode field and the 1.2.0 revision row from prior work.
- docs/index.md §4.4: add the optional `skills` field entirely -- it was
  undocumented even for its original D-5 introduction -- covering the
  three reference schemes, resolution/validation behavior, the
  discovery/activation/execution progressive-disclosure model, and the
  D-9 double-safety gate, in a new §4.4.8. Also documents the `safe_mode`
  LLM-agent config field (reusing the `type: tool` field's semantics)
  since it is the gate's "global" half. Bumps the standard to 1.10.0 with
  a §21.1 revision-history entry.

No behavioral change; the described capabilities already ship. MkDocs
builds cleanly and the new/edited YAML examples parse.

ISSUES CLOSED: #164
docs(tools): clarify the skill double-safety gate configures the LLM agent
Some checks failed
CI / lint (pull_request) Successful in 39s
CI / security (pull_request) Successful in 1m6s
CI / typecheck (pull_request) Successful in 1m29s
CI / quality (pull_request) Successful in 1m31s
CI / build (pull_request) Successful in 47s
CI / integration_tests (pull_request) Successful in 4m10s
CI / unit_tests (pull_request) Successful in 6m20s
CI / benchmark (pull_request) Failing after 17m22s
CI / coverage (pull_request) Successful in 6m46s
CI / status-check (pull_request) Successful in 2s
7c81079b05
Safe Mode & Security described the D-9 gate's "global safety" and
allow_shell requirements as "the tool agent"'s config. The `skill` tool
is only ever loaded onto a `type: llm` agent's own `skills:` catalogue
(AgentFactory only resolves `skills` when agent_type == "llm") -- there
is no separate `type: tool` agent to configure. A reader following the
old wording could set allow_shell/safe_mode on the wrong agent and get
a confusing refusal.

Clarifies that safe_mode/allow_shell are read from the same type: llm
agent's own config, matching the pattern already documented for
shell/http_request timeouts, and points at
examples/packages/calculator-app-builder.yaml for the config shape.

Refs: #164
hurui200320 left a comment

PR Review: !184 (Ticket #164)

Verdict: Approve

Documentation-only PR that folds ADR-2034's 2026-11-09 revision (D-8 resource taxonomy, D-9 safe_mode + double-safety gate, D-10 gated script execution) into the Package Registry Standard (§16.3) and the Actor Configuration Standard (§4.4, new §4.4.8, §21.1). Every normative statement in the new text was verified against ADR-2034 and the shipped implementation and is accurate; the two blocking-worthy inconsistencies found are one stale version header (minor) and two nits. Nothing here warrants blocking the merge, but the version header should ideally be fixed before merge (one line).

Scope notes: no prior reviews or comments existed on this PR, so nothing was excluded as out-of-scope/deferred. Per reviewer instructions, red-tape items (commit footers, labels, base-branch wording in the ticket's DoD) are excluded.

Critical Issues

None.

Major Issues

None.

Minor Issues

  1. Stale document version header — docs/index.md:3
    §21 now declares Version 1.10.0 and §21.1 carries the 1.10.0 row, but the document header still reads **Version:** 1.9.0. The precedent bump commit (4b98ce0, the 1.9.0 bump) updated both places, so this deviates from established practice. Since §21 states "Conformance MUST be declared against a specific version of this standard," a header pointing at 1.9.0 (which predates skills/safe_mode) makes the standard internally inconsistent about which version it declares. Recommendation: change line 3 to **Version:** 1.10.0.

Nits

  1. §4.11 not cross-updated — docs/index.md:933, docs/index.md:936
    New §4.4.8 says a loaded catalogue "contributes the "skill-loading" capability identifier (§4.11)" and is "reflected in this agent's metadata (skills_loaded, skill_names)" — all three verified in the implementation (src/cleveractors/agents/llm.py:2471-2494). But §4.11's capability-identifier list and the LLM-agent metadata enumeration ("provider, model, temperature, max_tokens, memory_enabled, supports_structured_output") don't mention them, so a reader following the §4.11 pointer finds nothing. The capability list is non-exhaustive ("include"), so this is not a contradiction — consider appending skill-loading to the identifier list and skills_loaded/skill_names to the metadata sentence for cross-section consistency.

  2. Example ID contradicts its own format specifier — docs/index.md:554 vs docs/index.md:566
    The new reference-scheme table documents ID:pkg_skl_<40-hex-sha1> (matching PRS §16.2), but the example immediately below uses ID:pkg_skl_a1b2c3d4e5f67890abcdef1234567890abcdef (38 hex chars). The identical 38-hex string is also used in PRS §5.3 and ADR-2034 D-5, so this follows corpus precedent — but it sits directly under a format specifier this PR adds. Consider padding the example to 40 hex.

Verification performed

  • Ticket acceptance criteria (all met): §16.1 safe_mode row with type/default/canonical-absence rules and §15.1 1.2.0 row were already on develop from prior work as the PR claims (verified present at base). New §16.3 text describes all four resource classes with correct read/execute semantics; §4.4/§4.4.8 document skills, the three reference schemes (local:, ID:, registry: with @latest default — matches PRS §5.3/§7.3 and §4.1.1), progressive disclosure, and the double-safety gate; §21.1 entry added; additions are purely additive under §1.3 (no normative requirement weakened).
  • Normative text vs implementation (all consistent): gate semantics in §4.4.8/safe-mode.md match _is_global_unsafe/gate_open in src/cleveractors/agents/tool.py (global = agent safe_mode: false OR context _unsafe_mode: true; gate open = both false; execution additionally requires allow_shell and scripts/non-standard class; non-standard reads gated, references/assets/root files and script source inspection exempt; manifest hides non-standard entries while closed; errors name both states and the resource). §4.4.8 loading claims match SkillLoader (src/cleveractors/agents/skills.py): list of non-empty strings, agent-creation-time resolution, schema-validation failures and unresolvable references raise AgentCreationError naming the reference, duplicate skill names rejected, discovery catalogue appended to system_prompt, skill tool synthesized unless already declared. safe_mode/allow_shell read from the type: llm agent's own config confirmed at src/cleveractors/agents/llm.py:965 and llm.py:1029; skills resolved only for agent_type == "llm" confirmed in factory.py.
  • safe-mode.md corrections are accurate: the skill tool indeed only reaches type: llm agents' skills: catalogues, and the referenced examples/packages/calculator-app-builder.yaml has safe_mode: false + allow_shell: true alongside skills:, while the referenced programming-patterns skill sets no safe_mode and bundles no scripts — the parenthetical caveat is correct.
  • Cross-links resolve: §9.4/§10.3 (_unsafe_mode), PRS §5.3/§7.3/§8, §4.1.1, ADR-2034 paths, and the anchors ../index.md#44-llm-agents-type-llm and timeouts.md#type-llm-agents-dispatch-these-tools-too all verified.
  • YAML examples: both edited YAML blocks parse cleanly with yaml.safe_load.
  • Local build: nox -s docs passes with no new warnings (only the pre-existing nav INFO notices and the pre-existing mkdocs-2 deprecation notice). No tests parse the documentation, so the doc-only change cannot affect lint/typecheck/unit tests.

Summary

A precise, well-scoped documentation PR. The new §4.4.8 is unusually rigorous — every MUST/claim it introduces is backed by both ADR-2034 and the actual implementation, and the safe-mode.md fix resolves a real reader-facing ambiguity about where safe_mode/allow_shell live. The only substantive defect is the stale **Version:** header at docs/index.md:3 (one-line fix, recommended before merge); the two nits are optional polish. Approve.

## PR Review: !184 (Ticket #164) ### Verdict: Approve Documentation-only PR that folds ADR-2034's 2026-11-09 revision (D-8 resource taxonomy, D-9 `safe_mode` + double-safety gate, D-10 gated script execution) into the Package Registry Standard (§16.3) and the Actor Configuration Standard (§4.4, new §4.4.8, §21.1). Every normative statement in the new text was verified against ADR-2034 and the shipped implementation and is accurate; the two blocking-worthy inconsistencies found are one stale version header (minor) and two nits. Nothing here warrants blocking the merge, but the version header should ideally be fixed before merge (one line). Scope notes: no prior reviews or comments existed on this PR, so nothing was excluded as out-of-scope/deferred. Per reviewer instructions, red-tape items (commit footers, labels, base-branch wording in the ticket's DoD) are excluded. ### Critical Issues None. ### Major Issues None. ### Minor Issues 1. **Stale document version header — `docs/index.md:3`** §21 now declares **Version 1.10.0** and §21.1 carries the 1.10.0 row, but the document header still reads `**Version:** 1.9.0`. The precedent bump commit (`4b98ce0`, the 1.9.0 bump) updated both places, so this deviates from established practice. Since §21 states "Conformance MUST be declared against a specific version of this standard," a header pointing at 1.9.0 (which predates `skills`/`safe_mode`) makes the standard internally inconsistent about which version it declares. **Recommendation:** change line 3 to `**Version:** 1.10.0`. ### Nits 1. **§4.11 not cross-updated — `docs/index.md:933`, `docs/index.md:936`** New §4.4.8 says a loaded catalogue "contributes the `"skill-loading"` capability identifier (§4.11)" and is "reflected in this agent's metadata (`skills_loaded`, `skill_names`)" — all three verified in the implementation (`src/cleveractors/agents/llm.py:2471-2494`). But §4.11's capability-identifier list and the LLM-agent metadata enumeration ("provider, model, temperature, max_tokens, memory_enabled, supports_structured_output") don't mention them, so a reader following the §4.11 pointer finds nothing. The capability list is non-exhaustive ("include"), so this is not a contradiction — consider appending `skill-loading` to the identifier list and `skills_loaded`/`skill_names` to the metadata sentence for cross-section consistency. 2. **Example ID contradicts its own format specifier — `docs/index.md:554` vs `docs/index.md:566`** The new reference-scheme table documents `ID:pkg_skl_<40-hex-sha1>` (matching PRS §16.2), but the example immediately below uses `ID:pkg_skl_a1b2c3d4e5f67890abcdef1234567890abcdef` (38 hex chars). The identical 38-hex string is also used in PRS §5.3 and ADR-2034 D-5, so this follows corpus precedent — but it sits directly under a format specifier this PR adds. Consider padding the example to 40 hex. ### Verification performed - **Ticket acceptance criteria (all met):** §16.1 `safe_mode` row with type/default/canonical-absence rules and §15.1 1.2.0 row were already on `develop` from prior work as the PR claims (verified present at base). New §16.3 text describes all four resource classes with correct read/execute semantics; §4.4/§4.4.8 document `skills`, the three reference schemes (`local:`, `ID:`, `registry:` with `@latest` default — matches PRS §5.3/§7.3 and §4.1.1), progressive disclosure, and the double-safety gate; §21.1 entry added; additions are purely additive under §1.3 (no normative requirement weakened). - **Normative text vs implementation (all consistent):** gate semantics in §4.4.8/safe-mode.md match `_is_global_unsafe`/`gate_open` in `src/cleveractors/agents/tool.py` (global = agent `safe_mode: false` OR context `_unsafe_mode: true`; gate open = both false; execution additionally requires `allow_shell` and scripts/non-standard class; non-standard reads gated, references/assets/root files and script source inspection exempt; manifest hides non-standard entries while closed; errors name both states and the resource). §4.4.8 loading claims match `SkillLoader` (`src/cleveractors/agents/skills.py`): list of non-empty strings, agent-creation-time resolution, schema-validation failures and unresolvable references raise `AgentCreationError` naming the reference, duplicate skill names rejected, discovery catalogue appended to `system_prompt`, `skill` tool synthesized unless already declared. `safe_mode`/`allow_shell` read from the `type: llm` agent's own config confirmed at `src/cleveractors/agents/llm.py:965` and `llm.py:1029`; `skills` resolved only for `agent_type == "llm"` confirmed in `factory.py`. - **safe-mode.md corrections are accurate:** the `skill` tool indeed only reaches `type: llm` agents' `skills:` catalogues, and the referenced `examples/packages/calculator-app-builder.yaml` has `safe_mode: false` + `allow_shell: true` alongside `skills:`, while the referenced `programming-patterns` skill sets no `safe_mode` and bundles no scripts — the parenthetical caveat is correct. - **Cross-links resolve:** §9.4/§10.3 (`_unsafe_mode`), PRS §5.3/§7.3/§8, §4.1.1, ADR-2034 paths, and the anchors `../index.md#44-llm-agents-type-llm` and `timeouts.md#type-llm-agents-dispatch-these-tools-too` all verified. - **YAML examples:** both edited YAML blocks parse cleanly with `yaml.safe_load`. - **Local build:** `nox -s docs` passes with no new warnings (only the pre-existing nav INFO notices and the pre-existing mkdocs-2 deprecation notice). No tests parse the documentation, so the doc-only change cannot affect lint/typecheck/unit tests. ### Summary A precise, well-scoped documentation PR. The new §4.4.8 is unusually rigorous — every MUST/claim it introduces is backed by both ADR-2034 and the actual implementation, and the safe-mode.md fix resolves a real reader-facing ambiguity about where `safe_mode`/`allow_shell` live. The only substantive defect is the stale `**Version:**` header at `docs/index.md:3` (one-line fix, recommended before merge); the two nits are optional polish. Approve.
CoreRasurae force-pushed feature/m1-skill-resource-spec-update from 7c81079b05
Some checks failed
CI / lint (pull_request) Successful in 39s
CI / security (pull_request) Successful in 1m6s
CI / typecheck (pull_request) Successful in 1m29s
CI / quality (pull_request) Successful in 1m31s
CI / build (pull_request) Successful in 47s
CI / integration_tests (pull_request) Successful in 4m10s
CI / unit_tests (pull_request) Successful in 6m20s
CI / benchmark (pull_request) Failing after 17m22s
CI / coverage (pull_request) Successful in 6m46s
CI / status-check (pull_request) Successful in 2s
to 0ae6963a09
Some checks failed
CI / lint (pull_request) Successful in 1m15s
CI / typecheck (pull_request) Successful in 1m50s
CI / security (pull_request) Successful in 1m39s
CI / quality (pull_request) Successful in 1m38s
CI / build (pull_request) Successful in 2m39s
CI / integration_tests (pull_request) Successful in 4m0s
CI / unit_tests (pull_request) Successful in 6m52s
CI / benchmark (pull_request) Failing after 32m26s
CI / coverage (pull_request) Successful in 7m29s
CI / status-check (pull_request) Successful in 2s
CI / lint (push) Successful in 1m22s
CI / typecheck (push) Successful in 1m55s
CI / build (push) Successful in 51s
CI / quality (push) Successful in 1m33s
CI / security (push) Successful in 1m49s
CI / integration_tests (push) Successful in 4m43s
CI / benchmark (push) Failing after 16m48s
CI / unit_tests (push) Failing after 17m47s
CI / coverage (push) Has been cancelled
CI / status-check (push) Has been cancelled
2026-11-20 16:19:30 +00:00
Compare
CoreRasurae deleted branch feature/m1-skill-resource-spec-update 2026-11-20 19:09:13 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveractors-core!184
No description provided.