agentleFS
thewaifucorpthewaifucorp/bastion-agent/skills/crisis-mode/SKILL.md

bastion/crisis-mode

Skill8 starsChanged 4 months agoMITView on GitHub

Detects crisis situations and executes the sacrifice algorithm to free up Deep Work time, automatically replanning the affected persona's schedule.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the sum of sacrificeable task hours is < 2h, the algorithm returns fallback=True with the list of available options, without executing …

    line 90
  2. Very specific:

    After each execution (with or without fallback), the event is recorded in personas/{slug}/MEMORY.md with:

    line 129

≈ “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

Crisis Mode

When this skill is activated

Crisis Mode is activated in two situations:

  1. Explicit trigger: user sends /crise or /crisis in any message.
  2. Automatic detection: message contains extreme urgency language and the internal classifier returns confidence > 0.8. Examples of language that trigger detection: "urgent", "emergency", "system down", "deadline today", "everything stopped", "can't wait".

Complete Flow

Message received
      │
      ▼
detect_crisis(message)
      │
      ├── is_crisis=False → end, process normally
      │
      └── is_crisis=True
              │
              ▼
        Identify affected persona
              │
              ▼
        sacrifice_algorithm(persona_slug, current_weight, tasks)
              │
              ├── fallback=True (< 2h available)
              │       │
              │       └── Notify user with available options
              │           (without executing anything)
              │
              └── fallback=False
                      │
                      ▼
                Cancel/move selected tasks
                      │
                      ▼
                Notify user with replanning summary
                      │
                      ▼
                record_crisis_event(persona_slug, result)
                      │
                      ▼
                Append event to personas/{slug}/MEMORY.md

Sacrifice Algorithm — Details

1. Weight Boost

new_weight = min(current_weight + 0.3, 1.0)

The crisis persona's weight is elevated by 0.3, respecting the maximum limit of 1.0.

2. Sacrificeable Tasks Filter

A task is sacrificeable if it satisfies both criteria:

  • movable = True — task can be moved or cancelled
  • priority < new_weight * 0.6 — task priority is low enough

3. Task Selection

Sacrificeable tasks are sorted by ascending priority (lowest priority first). The algorithm selects tasks until freeing ≥ 2 hours of Deep Work.

4. Fallback

If the sum of sacrificeable task hours is < 2h, the algorithm returns fallback=True with the list of available options, without executing any action. The user is notified and can decide what to do.


User Notification

Normal case (replanning executed)

{locale:crisis_activated}

{locale:weight_elevated}

{locale:tasks_moved}
  {locale:task_item}
  {locale:task_item}

{locale:deep_work_available}

Fallback case (insufficient hours)

{locale:fallback_title}

{locale:fallback_message}
{locale:fallback_options}
  {locale:task_item}
  {locale:task_item}

{locale:fallback_no_action}

MEMORY.md Recording

After each execution (with or without fallback), the event is recorded in personas/{slug}/MEMORY.md with:

  • ISO 8601 timestamp
  • Status: EXECUTED or FALLBACK
  • New persona weight
  • Hours freed
  • List of sacrificed tasks (or available options in fallback)

Edge Cases

SituationBehavior
No movable=True tasksImmediate fallback with empty list
All tasks have high priorityFallback with empty list
current_weight is already 1.0Boost doesn't change weight (remains 1.0)
Message contains /crise + other wordsExplicit trigger takes precedence (confidence=1.0)
Persona not identifiedaffected_persona=None, user is asked which persona

Dependencies

  • crisis_mode.py — computational logic (detect_crisis, sacrifice_algorithm, record_crisis_event)
  • personas/{slug}/MEMORY.md — persona memory file (created automatically if doesn't exist)

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.