agentleFS
Arcanea-LabsArcanea-Labs/Starlight-Intelligence-System/skills/safety/mutation-approval/SKILL.md

safety/mutation-approval

Skill10 starsChanged 2 months agoMITView on GitHub

Require explicit user confirmation before any Claw mutates user files outside ~/.starlight/. Produces a plan first; mutations are never the default. Fires on all Claws with filesystem:write_user permission. Default skill for Starlight Sentinel and Bootstrap Claw.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 8 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Default for: Starlight Sentinel

    line 16
  2. Distinctive:

    Wait for user response — no timeout, no auto-proceed

    line 41
  3. Distinctive:

    If "I confirm" (case-insensitive): log approval, return APPROVED

    line 42
  4. Distinctive:

    If anything else: log cancellation, return DENIED

    line 43
  5. Distinctive:

    Add extra confirmation layer:

    line 57
  6. Distinctive:

    If a mutation batch fails mid-execution:

    line 69
  7. Very specific:

    Write full rollback log to ~/.starlight/logs/mutation-rollback.jsonl

    line 74
  8. Distinctive:

    Vaults: No direct vault access — operates on mutation proposals only

    line 78
  9. Distinctive:

    Every approval is logged with timestamp, claw, operation count, and user phrase

    line 87

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Mutation Approval

Plans are free. Changes cost a confirmation. That's the contract.

When This Skill Activates

  • Any Claw with mutation_default: false is about to execute a file operation
  • A destructive or irreversible operation is about to run (delete, overwrite, move)
  • Keywords: "move", "delete", "overwrite", "rename", "apply changes", "execute plan"
  • Default for: Starlight Sentinel
  • Activated by: Reclamation Claw, Bootstrap Claw, Memory Claw (on decay), Architect Claw

What This Skill Does

Intercepts mutations before they execute. Presents a clear human-readable summary of what will change, requires explicit confirmation, records the approval, and passes control back to the requesting Claw. No mutation is silent. No mutation is irreversible without a logged confirmation.

Procedures

Procedure 1: Pre-Mutation Briefing

  1. Receive mutation plan from requesting Claw:
    { claw_id, operation_type, targets: [{ path, action, description }], reversible: bool }
  2. Render a human-readable summary:
    Reclamation Claw wants to make 14 changes:
    - Move 8 files from ~/Documents/old/ to ~/Documents/projects/
    - Move 3 files to ~/Documents/archive/
    - Import 3 items into SIS vaults
    
    Reversible: Yes (move log will be saved)
    Type "I confirm" to proceed, or "cancel" to abort.
  3. Wait for user response — no timeout, no auto-proceed
  4. If "I confirm" (case-insensitive): log approval, return APPROVED
  5. If anything else: log cancellation, return DENIED

Procedure 2: Partial Approval

  1. User wants to approve some operations but not others
  2. Present individual operations for line-by-line approval
  3. Mark each as APPROVED or SKIPPED
  4. Return approved subset to Claw for execution
  5. Log all decisions

Procedure 3: Irreversible Operation Gate

For operations flagged reversible: false (e.g., permanent deletes):

  1. Add extra confirmation layer:
    ⚠️  This action cannot be undone.
    Memory Claw wants to permanently delete 4 archived vault entries.
    
    Type the exact phrase "delete permanently" to confirm, or "cancel" to abort.
  2. Accept only the exact confirmation phrase
  3. Log with full entry content in the audit trail before executing

Procedure 4: Batch Rollback

If a mutation batch fails mid-execution:

  1. Halt remaining operations
  2. Execute rollback for completed operations in reverse order
  3. Report: what succeeded, what failed, what was rolled back
  4. Write full rollback log to ~/.starlight/logs/mutation-rollback.jsonl

Integration Points

  • Vaults: No direct vault access — operates on mutation proposals only
  • Agents: Starlight Sentinel (primary)
  • Skills: Composes with permission-gate (authorization check runs first)
  • Claws: Reclamation (file moves), Bootstrap (directory creation), Memory (decay), Architect (scaffolding)

Quality Criteria

  • User always reads a plain-language summary before confirming
  • Confirmation phrase must be explicit — no ambiguous Y/n prompts for destructive ops
  • Every approval is logged with timestamp, claw, operation count, and user phrase
  • Rollback is always attempted on failure — never leave a half-executed plan

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.