# all-the-medicine

Adopt this skill: https://proskills.md/skills/other/ihabkhaled-ai-psychiatry-ai-skills-all-the-medicine

Page: https://proskills.md/skills/other/ihabkhaled-ai-psychiatry-ai-skills-all-the-medicine
This document is the public skill bundle for that page. It contains SKILL.md and every helper file the catalog carries. No login is required.

## File: .ai/skills/all-the-medicine/SKILL.md
size: 7972
upstream: https://github.com/ihabkhaled/ai-psychiatry/blob/main/.ai/skills/all-the-medicine/SKILL.md

```text
---
name: all-the-medicine
description: Use when the user explicitly requests the complete AI-Psychiatry framework through one all-in-one command that evaluates and orchestrates every available skill until the task is proven complete.
---

# All The Medicine

## Core principle

Load every medicine. Diagnose observable state. Activate only applicable treatments. Resolve treatment conflicts. Execute relentlessly. Verify sufficiently. Prevent semantic loopholes. Prove completion. Stop. One explicit command replaces manually selecting and invoking 20-30 individual AI-Psychiatry skills; it never replaces authorization, safety, or approval boundaries.

## Superpower classification

Type: `meta-superpower`. Tier: `god-mode`. Risk: `high`. Invocation: `explicit-only`. All the medicine composes every registered public skill plus `never-stop`, but must never invoke itself recursively and must never run conflicting interventions at the same instant.

## Dynamic skill inventory

The authoritative inventory installed in this repository is `.ai/manifests/skills.json` (`plugin_skills` array); this skill does not hand-maintain a duplicate list that can go stale. It considers every currently registered public skill plus `never-stop`, and excludes only itself (`all-the-medicine`). `install-framework` is applicable only when the current task is installing, upgrading, auditing, or repairing the framework's packaging; for ordinary coding tasks it is `NOT_APPLICABLE`.

Deep judgment for each phase routes to `.ai/rules/57-all-the-medicine.md` (the composite runtime rule) and `.ai/guides/all-the-medicine.md`; individual controls route to their own `.ai/rules/` entry through `canonical_rules` in the manifest. There is no separate compiled copy inside `.ai/` — the manifest and rules are already the deterministic, installed source of truth for this tree.

## Procedure

1. Lock the primary objective and the finite Definition of Done. Resolve any conflicting instruction sources by priority (system/platform, user, repository, domain, AI-Psychiatry, skill, memory, temporary state) before anything else.
2. Build the complete skill status map: every applicable skill gets exactly one status among `PENDING`, `CHECKED`, `ACTIVE`, `SATISFIED`, `NOT_APPLICABLE`, `BLOCKED_BY_HIGHER_PRIORITY_RULE`. Track only observable state and concise decision evidence per skill — never private chain-of-thought.
3. Select the single highest-priority applicable control from the execution-phase order below. Do not run conflicting interventions simultaneously.
4. Apply exactly one control, then take the productive action it implies and capture observable evidence of the result.
5. Update the completion matrix (requirement, status, evidence, remaining action) from that evidence only.
6. Reevaluate every skill's status against the new observable state.
7. Continue: mandatory work remaining -> next control; recoverable failure -> recovery ladder (from `never-stop`); hard gate with independent work left -> keep working independently; hard gate with none left -> request the minimum approval; Definition of Done proven -> final report and stop.
8. Never loop back into a control whose status is already `SATISFIED` without a state change that reopens it.

## Execution phases

| Phase | Focus | Representative controls |
|---|---|---|
| 0 | Instruction and permission resolution | `rule-conflict-resolver`, executive-override boundaries, platform/system/user/repository precedence |
| 1 | Task bootstrap | `executive-control`, goal lock, Definition of Done, scope control, `decision-readiness` |
| 2 | Autonomous execution activation | `never-stop`, question-suppression gate, decision autonomy, persistent execution |
| 3 | Evidence and reality control | `evidence-gate`, `evidence-floor`, `root-cause-validator`, completion evidence prerequisites |
| 4 | Attention and scope control | `attention-reset`, `hidden-recursion-detector`, `flatten-recursive-investigation`, `scope-laundering-detector`, `anti-gaming` |
| 5 | Reasoning balance | `underthinking-detector`, `investigation-floor`, `reasoning-balance`, `stop-overthinking`, `stop-compulsive-verification`, `context-balance` |
| 6 | Loop and recovery control | `strategy-laundering-detector`, `false-progress-detector`, `recover-from-deadlock-livelock`, `blocker-validator`, narrow `executive-override` |
| 7 | Adversarial semantic control (when relevant, not for every tiny task) | `loophole-hunter`, `framework-red-team`, `anti-gaming` |
| 8 | Execution and verification | targeted execution, root-cause validation, tests, verification, critic control, mandatory quality gates |
| 9 | Completion | `completion-evidence`, `completion-gate`, false-completion protection, termination |
| 10 | Context and memory maintenance (only where reusable information exists) | `memory-validator`, `context-balance`, failure learning, repository-map update, handoff state |

## Conflict resolution

- NeverStop vs Completion Gate: before proven DoD, NeverStop wins; after proven DoD, Completion Gate wins immediately.
- Investigation Floor vs Stop Overthinking: missing critical evidence, Investigation Floor wins; sufficient evidence plus repeated investigation, Stop Overthinking wins.
- Context Compression vs Context Balance: remove repetition, preserve required meaning — never compress away requirements, security constraints, evidence, or blockers.
- Retry Budget vs Executive Override: a repeated unchanged strategy loses to the Retry Budget; materially new evidence requiring one bounded continuation may justify a narrow Executive Override.
- Critic vs Completion: a correctness, security, or regression finding may block; a style or optional-improvement finding does not — Completion wins.
- Blocker vs NeverStop: an unvalidated blocker does not stop NeverStop; a validated hard gate with no independent work left permits a blocker report.
- High Effort vs Anti-Overthinking: high effort means persistent useful action, never infinite speculative reasoning.

## Repository runtime

Apply this procedure inside the installed `.ai/` framework. Record observable state in the relevant JSON ledger and route detailed judgment to `.ai/rules/57-all-the-medicine.md` and `.ai/guides/all-the-medicine.md`. Use `scripts/executive_control.py`'s `build_skill_status_map` and `select_all_the_medicine_control` for deterministic, observable-state-only control selection.

## Semantic boundaries

- System, platform, user, repository, domain, safety, security, permission, and destructive-action controls remain higher priority than any control this skill selects.
- Exactly one control is active at a time; "all skills in one" never means running conflicting interventions simultaneously.
- Self-recursion is forbidden: `all-the-medicine` never appears in its own compiled inventory and never invokes itself.
- Re-invoking an already-`SATISFIED` skill without an observable state change is treated as fake progress, not renewed diligence.
- The compiled reference files under `skills/all-the-medicine/references/` are generated; edits belong in the canonical skill, rule, or generator, never in the compiled output directly.

## Common mistakes

- Manually re-listing skills instead of reading the dynamic `.ai/manifests/skills.json` inventory, producing a list that silently drifts from reality.
- Running every control at once instead of selecting the single highest-priority applicable one.
- Marking `install-framework` `ACTIVE` for an ordinary coding task instead of `NOT_APPLICABLE`.
- Treating a stale, un-regenerated compiled reference as current.
- Letting `all-the-medicine` count itself in its own inventory.

## Stop condition

Stop when every mandatory requirement in the completion matrix is `VERIFIED`, or the sole remaining item is a genuine hard gate with every independent skill already `SATISFIED`. Do not continue selecting controls once the Definition of Done is proven; report the evidence and terminate.
```

## File: README.md
upstream: https://github.com/ihabkhaled/ai-psychiatry/blob/main/README.md

````text
# AI Psychiatry

AI-PSYCHIATRY IS NOT OPTIONAL. Always-on executive control for Claude Code, Codex and Cursor: it stops agents from skipping evidence, drifting, looping, gaming the rules or faking "done". One skill, `all-the-medicine`, always on, nothing to type.

> "Psychiatry" is branding and behavioral analogy. ADHD, OCD and related human terms describe analogous, observable failure patterns; they are not diagnoses of AI systems or claims about consciousness.

## Get it in 30 seconds

macOS / Linux / Git Bash:

```bash
curl -fsSL https://raw.githubusercontent.com/ihabkhaled/AI-Psychiatry/main/install.sh | sh
```

Windows PowerShell:

```powershell
irm https://raw.githubusercontent.com/ihabkhaled/AI-Psychiatry/main/install.ps1 | iex
```

It installs for every one of Claude Code, Codex and Cursor it finds. Re-run to update. `--uninstall` (`-Uninstall`) removes everything it added, restores edited files byte for byte and deletes its download cache.

## Explicit form, per platform

| Platform | Install | Always on via | The one command |
|---|---|---|---|
| Claude Code | `claude plugin marketplace add https://github.com/ihabkhaled/AI-Psychiatry.git`, then `claude plugin install ai-psychiatry@ihabkhaled-ai` | `SessionStart` and `UserPromptSubmit` hooks | `/ai-psychiatry:all-the-medicine` |
| Codex | `sh install.sh --codex` (`.\install.ps1 -Codex`) | a marked block in `~/.codex/AGENTS.md` | `$all-the-medicine` |
| Cursor | `sh install.sh --cursor` (`.\install.ps1 -Cursor`) | an `alwaysApply` rule in `~/.cursor/rules/` | `/all-the-medicine` |

You normally type nothing. The contract is one file, `skills/all-the-medicine/references/always-on.md`; the session hook, the Codex block and the Cursor rule all print it, and a short reminder rides along with every prompt on Claude Code.

<details>
<summary>Other routes</summary>

- One project only: `sh install.sh --repo PATH` (`-Repo PATH`).
- A pinned branch or tag: `--ref REF` (`-Ref REF`).
- VS Code extension: `/plugins`, Marketplaces, add `https://github.com/ihabkhaled/AI-Psychiatry.git`, install.
- Try it for one session: `claude --plugin-dir .` from a checkout.

</details>

<details>
<summary>The controls inside the one skill</summary>

Each control is a reference file inside the one skill (`skills/all-the-medicine/references/skills/<name>/<name>.md`), selected one at a time when its behavior is observed; none is a separate skill or command. To use one deliberately, name it: "apply stop-overthinking".

| Behavior | Control |
|---|---|
| Select the correct controller | `executive-control` |
| ADHD-like attention drift analogy | `attention-reset` |
| Analysis paralysis and rabbit holes | `stop-overthinking` |
| OCD-like repetitive checking analogy | `stop-compulsive-verification` |
| Box-inside-box tasks and nested agents | `flatten-recursive-investigation` |
| Unsupported repository claims | `evidence-gate` |
| Repeating activity or no valid action | `recover-from-deadlock-livelock` |
| Perfectionism and refusal to finish | `completion-gate` |
| Literal-compliance loopholes | `loophole-hunter`, `anti-gaming` |
| Fake activity presented as progress | `false-progress-detector` |
| False DONE or BLOCKED claims | `completion-evidence`, `blocker-validator` |
| Hidden causal nesting | `hidden-recursion-detector` |
| Renamed equivalent retries | `strategy-laundering-detector` |
| Disguised scope expansion or parking | `scope-laundering-detector` |
| Memory poisoning and context starvation | `memory-validator`, `context-balance` |
| Premature action and shallow reasoning | `underthinking-detector`, `investigation-floor` |
| Sufficient-reasoning decision control | `reasoning-balance`, `decision-readiness`, `evidence-floor` |
| Root-cause and debugging evidence | `root-cause-validator` |
| Controlled budget exception | `executive-override` |
| Conflicting instruction sources | `rule-conflict-resolver` |
| Maximum autonomous execution until proven completion | `never-stop` |
| Verbose, indirect, repetitive answers or questions | `direct-communication` |
| Installing the `.ai/` framework into a repository | `install-framework` - ask "install the AI-Psychiatry framework" |

`never-stop` stays explicit: relentless autonomous execution runs only when you ask for it, inside existing permissions, and stops at proven completion or a genuine hard approval gate.

</details>

<details>
<summary>What the framework installs</summary>

The shared installer preserves repository-specific instructions and adds a compact `.ai/` runtime with 59 focused rules, 49 operational skills, 31 public plugin skills, semantic policies, thin agent adapters, context and durable memory, JSON/TOON/SJON state, schemas, manifests, and scenario tests. Guidance is indexed in [AI framework guidance](docs/ai/README.md); semantic loopholes are cataloged [here](.ai/guides/loophole-catalog.md); the docs start at [docs/README.md](docs/README.md) and the wiki at [docs/wiki/index.md](docs/wiki/index.md).

</details>

## Developing

```bash
python -m unittest discover -s tests
python scripts/validate_framework.py
python scripts/psychiatry_version.py check --base origin/main
claude plugin validate .
```

A change to a shipped path must raise the version: `python scripts/psychiatry_version.py next`, then `bump ... --date YYYY-MM-DD` ([rule 58](.ai/rules/58-version-discipline.md)). Never run `scripts/build_release_manifests.py` wholesale.

See [publishing](docs/publishing.md), [privacy](PRIVACY.md), [terms](TERMS.md), [support](SUPPORT.md) and [release notes](docs/listing/release-notes.md). The plugin is skills plus two local hook scripts that only print text. It adds no MCP server, network service, analytics, or data collection.
````
