scheduler: new-skill creation is a tri-state allow/deny/ask mode

Replace the boolean creation_approval and the per-category boolean
locks.new_skill with a single tri-state new_skill_creation mode: a global
default (allow | deny | ask) with a per-category override in the category
config. allow authors immediately, deny blocks creation, ask gates on human
approval (the old approval path). housekeeping/response stay denied in code.

Surfaces updated: config.example.json, REPL /mode, dashboard
/api/new-skill-modes + /api/new-skill-mode, static UI. The retired booleans
creation_approval (true->ask) and locks.new_skill (true->deny) are still read
as fallbacks so an existing deployment keeps its behaviour.

Docs (AGENTS.md, docs/flow.md) and tests updated.
This commit is contained in:
gabby committed 2026-10-10 01:38:16 +00:00
1 parent 88700898be
commit c5ee87875f
11 files changed
+350 -160

No files matched your search

+11 -8
View File
@@ -138,13 +138,15 @@ flowchart TD
GC --> APPROVE
GS --> APPROVE
APPROVE{"creation_approval<br/>on? (default off)"}
APPROVE -- "no / already approved" --> REGISTER
APPROVE -- "yes" --> PROMPT["Output: approval prompt<br/>REPL / dashboard / gateway<br/>deny or timeout aborts"]
APPROVE{"new-skill mode<br/>allow / deny / ask<br/>(global default, per-category override)"}
APPROVE -- "allow" --> REGISTER
APPROVE -- "deny" --> ABORT2["Output: creation denied<br/>nothing registered, not re-dispatched"]
APPROVE -- "ask (already approved)" --> REGISTER
APPROVE -- "ask" --> PROMPT["Output: approval prompt<br/>REPL / dashboard / gateway<br/>deny or timeout aborts"]
PROMPT -- "approved" --> REGISTER
PROMPT -- "denied / timeout / no front end" --> ABORT["Output: creation aborted<br/>nothing registered, not re-dispatched"]
REGISTER["register stub in registry + tree<br/>seed category config (locks.new_skill)<br/>trace 'category_created' / 'skill_created'"]
REGISTER["register stub in registry + tree<br/>seed category config (new_skill_creation)<br/>trace 'category_created' / 'skill_created'"]
REGISTER -- "category" --> CHAIN["chain into skill job<br/>approved=true"]
CHAIN --> DRAFT
REGISTER -- "skill" --> WRITE["single-slot codegen worker<br/>SkillWrite queue<br/>leaf.writing = true, trace 'skill_writing'"]
@@ -176,7 +178,7 @@ flowchart TD
classDef output fill:#fce8e6,stroke:#d93025;
classDef author fill:#e6f4ea,stroke:#34a853;
class FID,CFG,REGEN semfill;
class PROMPT,ABORT,QS,FAIL,CANCELLED output;
class PROMPT,ABORT,ABORT2,QS,FAIL,CANCELLED output;
class START,DIRECT,BACK,MAT,REQ author;
```
@@ -217,6 +219,7 @@ at or above `softmax_bypass_tau` (default 0.5) is already decisive, so its scope
confirm is skipped; the **leaf** intent guard is never bypassed (the leaf softmax
has no create option, so a confident winner is only the closest existing skill,
never a match) — it always runs and can reject into create.
New-skill creation is also gated deterministically by the per-category
`locks.new_skill` (the `housekeeping` and `response` categories are hard-locked
in code).
New-skill creation is gated deterministically by the tri-state
`new_skill_creation` mode — global default (`allow` / `deny` / `ask`) with a
per-category override in `data/skills/<category>/config.json`; the
`housekeeping` and `response` categories are always `deny` in code.