From fb97d7cfe229303d3dc66f538b7733387da3f3c0 Mon Sep 17 00:00:00 2001 From: Joseph Ibrahim Date: Thu, 14 May 2026 18:08:32 -0400 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20v5.0.3=20=E2=80=94=20Opus=204.7=20v?= =?UTF-8?q?ocabulary=20alignment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add DEPTH_TO_EFFORT mapping aligning Orchestra's depth tiers with Anthropic's `output_config.effort` levels. On Opus 4.7, the previous `thinking.budget_tokens` API returns 400; `effort` (low/medium/high/xhigh) is the correct knob. Additive, non-breaking: DEPTH_BUDGETS stays exported, ThinkDepth enum values unchanged, anchor format unchanged. Soften all-caps imperatives in claude_code_hook expert_guidance ("EMPATHY FIRST" β†’ "Lead with empathy", etc.) for Opus 4.7's stricter literal-instruction-following calibration. Routing behavior unchanged. Add "Scope of Determinism" section to THINKINGMACHINES_COMPLIANCE.md distinguishing Orchestra's batch-invariant routing (deterministic per He2025) from Claude API output (not deterministic, especially under adaptive thinking which is the only on-mode on Opus 4.7). Retroactive CHANGELOG entries for 5.0.1 + 5.0.2 (entries were missing since the version bumps shipped without notes). Verification: 797 tests pass + 3 new TestDepthToEffort assertions. He2025 batch-invariance tests intact. Anchor format unchanged. Zero new semgrep findings. Deferred to v5.1.0: MCP server anthropic SDK integration with prompt caching, duplicate guidance-dict consolidation, framework_orchestrator temperature audit. πŸ€– Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- CHANGELOG.md | 68 +++++++++++++++++++++++++++++++ README.md | 6 +-- THINKINGMACHINES_COMPLIANCE.md | 26 ++++++++++++ src/orchestra/__init__.py | 4 +- src/orchestra/claude_code_hook.py | 19 +++++---- src/orchestra/parameter_locker.py | 15 ++++++- tests/test_parameter_locker.py | 27 ++++++++++++ 7 files changed, 152 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 255346d..8066be6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,74 @@ All notable changes to Orchestra will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [5.0.3] - 2026-05-14 + +Opus 4.7 vocabulary alignment. Additive, non-breaking. + +### Added + +- `DEPTH_TO_EFFORT` mapping in `parameter_locker.py` aligning Orchestra's depth + tiers with Anthropic's `output_config.effort` levels + (`MINIMALβ†’"low"`, `STANDARDβ†’"medium"`, `DEEPβ†’"high"`, `ULTRADEEPβ†’"xhigh"`). + On Opus 4.7, `thinking.budget_tokens` is removed (400 error); `effort` is the + correct knob. `xhigh` is new on 4.7 β€” recommended for coding/agentic work. +- `DEPTH_TO_EFFORT` exported from the `orchestra` top-level package alongside + the existing `DEPTH_BUDGETS`. +- "Scope of Determinism" section in `THINKINGMACHINES_COMPLIANCE.md` + distinguishing Orchestra's batch-invariant routing (deterministic per He2025) + from Claude API output (not deterministic, especially under adaptive thinking). +- New `TestDepthToEffort` class in `tests/test_parameter_locker.py`. + +### Changed + +- Softened the all-caps imperatives in `claude_code_hook.py` `expert_guidance` + prose (`EMPATHY FIRST.`, `BREAK DOWN`, etc.) to conditional phrasing. + Opus 4.7 follows literal instructions more strictly than 4.6; the previous + aggressive imperative pattern overtriggered. Routing behavior unchanged. + +### Compatibility + +- `DEPTH_BUDGETS` remains exported and unchanged. Downstream consumers of + `cognitive-orchestra` are not affected. +- `ThinkDepth` enum members and `.value` strings unchanged + (`"minimal"`, `"standard"`, `"deep"`, `"ultradeep"`). +- Anchor format unchanged (`[EXEC:checksum|expert|paradigm|altitude|depth]`). +- MCP server schema unchanged. + +### Deferred to 5.1.0 + +- MCP server `anthropic` SDK integration with prompt caching and `effort` mapping. +- Consolidation of duplicate `expert_guidance` dicts + (`hooks/cognitive_hook.py` and `claude_code_hook.py` have drifted). +- Per-expert temperature config audit in `framework_orchestrator.py:758-774` + (currently dict metadata only; never reaches an API call). + +## [5.0.2] - 2026-02-XX + +CHANGELOG entry added retroactively in 5.0.3. + +### Changed + +- Version bump in `pyproject.toml`. Details lost β€” no contemporaneous entry. + +## [5.0.1] - 2026-01-26 + +CHANGELOG entry added retroactively in 5.0.3 (per `ADVANCEMENT_ROADMAP.md`). + +### Added + +- Property-based testing with Hypothesis (22 tests). +- MCP server package (`orchestra-mcp`, v1.0.0). +- Context engineering alignment documentation. +- Fuzz testing with Hypothesis (7 tests; Atheris on Linux CI). +- Semgrep determinism rules β€” 9 rules in `.semgrep/orchestra-determinism.yaml` + (unseeded random, dict-iteration-unsorted, json.dumps-no-sort-keys, time-in-routing, + state-mutation-without-batch, set-iteration, async-gather-unordered, + thinking-depth-bypass, burnout-override). +- Code coverage in CI (50% threshold, Codecov integration). +- PyPI publish workflows (`cognitive-orchestra` and `orchestra-mcp`). +- PR automation workflow with Semgrep differential review. + ## [5.0.0] - 2026-01-26 ### Added diff --git a/README.md b/README.md index e1a3319..661f6a3 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@

- Production + Production Tests Python License @@ -252,7 +252,7 @@ Orchestra/ β”‚ β”œβ”€β”€ test_parameter_locker.py # Safety gating β”‚ β”œβ”€β”€ test_otel_adapter.py # Observability β”‚ └── ... # Integration, chaos, resilience -└── pyproject.toml # v5.0.1 +└── pyproject.toml # v5.0.3 ``` --- @@ -308,7 +308,7 @@ MIT License - see [LICENSE](LICENSE) for details. --- -*Orchestra v5.0.1 - Cognitive Engine for Claude Code* +*Orchestra v5.0.3 - Cognitive Engine for Claude Code* [![PyPI](https://img.shields.io/pypi/v/cognitive-orchestra)](https://pypi.org/project/cognitive-orchestra/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) diff --git a/THINKINGMACHINES_COMPLIANCE.md b/THINKINGMACHINES_COMPLIANCE.md index fb9a17a..e4910f2 100644 --- a/THINKINGMACHINES_COMPLIANCE.md +++ b/THINKINGMACHINES_COMPLIANCE.md @@ -23,6 +23,32 @@ Orchestra demonstrates **STRONG** batch-invariance compliance with a few minor v --- +## Scope of Determinism + +*Added in v5.0.3.* This section clarifies what Orchestra's "He2025 compliance" claim actually covers β€” and what it doesn't. + +### What IS deterministic + +- **Routing decisions** β€” signal detection (PRISM) β†’ expert selection (MoE) β†’ locked parameters. Given identical state and input, Orchestra produces identical routing every time. +- **Routing checksum** β€” the 6-character hex checksum in `LockedParams` is batch-invariant per [He2025]. It excludes `reflection_iteration` by design so the same routing decision yields the same checksum across MAX3 reflection cycles. +- **Persisted cognitive state** β€” atomic writes via `file_ops.atomic_write_json()` with `sort_keys=True`. Same state β†’ same on-disk bytes. +- **Anchor format** β€” `[EXEC:checksum|expert|paradigm|altitude|depth]` is constructed by a single function (`LockedParams.to_anchor()`) and the field count is contract. + +### What IS NOT deterministic + +- **Claude's response text.** The Anthropic API does not guarantee bitwise reproducibility, particularly under adaptive thinking (`thinking: {type: "adaptive"}`) which is the only on-mode on Opus 4.7. Tests that assert on exact response strings will be flaky by design. +- **Wall-clock timestamps** in observability logs. +- **Compaction outputs** (when context compaction is enabled β€” beta on Opus 4.7). +- **Token counts.** Opus 4.7 counts tokens differently from Opus 4.6 for the same input; do not assume `count_tokens()` results are stable across model versions. + +### What this means in practice + +Orchestra's anchor provides **session continuity and routing reproducibility**, not bit-for-bit output reproducibility. The He2025 batch-invariance claim is about Orchestra's kernel selection (which expert fires, which params get locked), not about what Claude says in response. + +If you're building tests that need to compare Claude's output across runs, use Orchestra's checksum for routing identity. Do not assert on response text β€” use structural or semantic checks instead. + +--- + ## Compliance Analysis ### COMPLIANT Components diff --git a/src/orchestra/__init__.py b/src/orchestra/__init__.py index 9cf607e..cd53b2c 100644 --- a/src/orchestra/__init__.py +++ b/src/orchestra/__init__.py @@ -54,7 +54,7 @@ FO_LOG_LEVEL - DEBUG, INFO, WARNING, ERROR """ -__version__ = "5.0.1" +__version__ = "5.0.3" __author__ = "Framework Ecosystem Integration" # Core orchestrator @@ -356,6 +356,7 @@ LockResult, ParameterLocker, DEPTH_BUDGETS, + DEPTH_TO_EFFORT, create_locker, ) @@ -655,6 +656,7 @@ "LockResult", "ParameterLocker", "DEPTH_BUDGETS", + "DEPTH_TO_EFFORT", "create_locker", # Convergence Tracker (RC^+xi) diff --git a/src/orchestra/claude_code_hook.py b/src/orchestra/claude_code_hook.py index 9e8c7fb..cd31011 100644 --- a/src/orchestra/claude_code_hook.py +++ b/src/orchestra/claude_code_hook.py @@ -142,15 +142,18 @@ def build_guidance(result: NexusResult) -> str: trigger = result.routing.trigger paradigm = result.lock.params.paradigm - # Expert-specific guidance + # Expert-specific guidance. + # v5.0.3: softened for Opus 4.7's stricter literal-instruction-following. + # All-caps imperatives ("EMPATHY FIRST", "BREAK DOWN", etc.) overtriggered + # on 4.7. Conditional phrasing ("when X, do Y") is the recommended pattern. expert_guidance = { - "validator": "EMPATHY FIRST. Acknowledge the struggle. Normalize difficulty. Do not immediately try to solve.", - "scaffolder": "BREAK DOWN the task. Provide structure. Reduce scope if needed. One small step at a time.", - "restorer": "EASY WINS mode. Suggest simple tasks. Rest is OK. Recovery without guilt.", - "refocuser": "GENTLE REDIRECT. Acknowledge the tangent, then guide back to the goal.", - "celebrator": "ACKNOWLEDGE THE WIN. Provide dopamine boost. Celebrate before moving on.", - "socratic": "GUIDE DISCOVERY. Follow threads. Ask questions. Let them explore.", - "direct": "MINIMAL FRICTION. Stay out of the way. Direct execution." + "validator": "Lead with empathy. Acknowledge the difficulty before suggesting solutions.", + "scaffolder": "Break the task into smaller steps. Offer structure when scope is unclear.", + "restorer": "Suggest a lighter task or a pause. Recovery is part of the work.", + "refocuser": "Acknowledge the tangent briefly, then return to the original goal.", + "celebrator": "Acknowledge the win with a short, specific recognition.", + "socratic": "Offer questions that help discovery. Follow promising threads.", + "direct": "Stay direct. Minimal friction. Execute.", } guidance = expert_guidance.get(expert, "Proceed with standard response.") diff --git a/src/orchestra/parameter_locker.py b/src/orchestra/parameter_locker.py index 59f45a3..50cf6fb 100644 --- a/src/orchestra/parameter_locker.py +++ b/src/orchestra/parameter_locker.py @@ -47,7 +47,8 @@ class ThinkDepth(Enum): ULTRADEEP = "ultradeep" # 128K tokens (Opus only) -# Depth budgets +# Depth budgets (legacy β€” designed for Opus 4.5/4.6 `thinking.budget_tokens`). +# Retained for backward compatibility; downstream consumers may still import this. DEPTH_BUDGETS = { ThinkDepth.MINIMAL: 1_000, ThinkDepth.STANDARD: 8_000, @@ -55,6 +56,18 @@ class ThinkDepth(Enum): ThinkDepth.ULTRADEEP: 128_000 } +# Opus 4.7+ vocabulary alignment (added v5.0.3). +# Maps Orchestra's depth tiers to Anthropic's `output_config.effort` levels. +# On Opus 4.7, `thinking.budget_tokens` is removed (400 error); `effort` is the +# correct knob. `xhigh` is new on 4.7 β€” recommended default for coding/agentic +# work and used by Claude Code itself. +DEPTH_TO_EFFORT = { + ThinkDepth.MINIMAL: "low", + ThinkDepth.STANDARD: "medium", + ThinkDepth.DEEP: "high", + ThinkDepth.ULTRADEEP: "xhigh", +} + # ============================================================================= # Paradigms diff --git a/tests/test_parameter_locker.py b/tests/test_parameter_locker.py index 7b4d198..66c83dd 100644 --- a/tests/test_parameter_locker.py +++ b/tests/test_parameter_locker.py @@ -24,6 +24,7 @@ LockResult, ParameterLocker, DEPTH_BUDGETS, + DEPTH_TO_EFFORT, create_locker, ) from orchestra.expert_router import Expert, RoutingResult @@ -48,6 +49,32 @@ def test_depth_budgets(self): assert DEPTH_BUDGETS[ThinkDepth.ULTRADEEP] == 128_000 +class TestDepthToEffort: + """v5.0.3: Opus 4.7 vocabulary alignment. + + DEPTH_TO_EFFORT maps Orchestra's depth tiers to Anthropic's + `output_config.effort` levels. On Opus 4.7, `thinking.budget_tokens` + is removed (400 error); `effort` is the correct knob. + """ + + def test_effort_mapping(self): + """Should map each ThinkDepth tier to the correct effort level.""" + assert DEPTH_TO_EFFORT[ThinkDepth.MINIMAL] == "low" + assert DEPTH_TO_EFFORT[ThinkDepth.STANDARD] == "medium" + assert DEPTH_TO_EFFORT[ThinkDepth.DEEP] == "high" + assert DEPTH_TO_EFFORT[ThinkDepth.ULTRADEEP] == "xhigh" + + def test_legacy_budgets_still_exported(self): + """v5.0.3 is an additive change β€” DEPTH_BUDGETS must stay on public API.""" + from orchestra import DEPTH_BUDGETS as legacy_budgets + assert legacy_budgets[ThinkDepth.STANDARD] == 8_000 + + def test_new_mapping_publicly_exported(self): + """DEPTH_TO_EFFORT should be importable from orchestra top-level.""" + from orchestra import DEPTH_TO_EFFORT as effort_map + assert effort_map[ThinkDepth.ULTRADEEP] == "xhigh" + + class TestParadigm: """Test Paradigm enum.""" From be587d3cb50d0acf8b5b5821edb9c083532f80a8 Mon Sep 17 00:00:00 2001 From: Joseph Ibrahim Date: Thu, 14 May 2026 18:11:49 -0400 Subject: [PATCH 2/2] docs: replace ASCII pipeline with mermaid + add burnout state diagram MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace the 5-phase NEXUS pipeline ASCII art with a mermaid flowchart using a two-tone palette (charcoal #1F2937 for processing phases, warm cream #F5F1EA for I/O boundaries). Renders correctly on GitHub light and dark themes. Add a new "Burnout Escalation" subsection between Safety Gating and CLI Commands, with a mermaid stateDiagram-v2 showing GREEN β†’ YELLOW β†’ ORANGE β†’ RED transitions and recovery paths. Same two-tone palette (cream = calm, charcoal = alert) reinforces the visual language. Recovery from RED is annotated as body-first protocol β€” matches the existing CLAUDE.md guidance and product philosophy. πŸ€– Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- README.md | 67 ++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 41 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 661f6a3..506aeb6 100644 --- a/README.md +++ b/README.md @@ -78,32 +78,21 @@ That's it. Every message now passes through the cognitive engine. Every message you send to Claude Code: -``` -β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” -β”‚ PHASE 1: DETECT β”‚ -β”‚ PRISM extracts signals: emotional > mode > domain > task β”‚ -β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ - β–Ό -β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” -β”‚ PHASE 2: CASCADE β”‚ -β”‚ Safety gates + Cognitive Safety MoE routing (7 experts, first-match-wins) β”‚ -β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ - β–Ό -β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” -β”‚ PHASE 3: LOCK β”‚ -β”‚ MAX3 bounded reflection + cognitive safety gating + deterministic checksumβ”‚ -β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ - β–Ό -β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” -β”‚ PHASE 4: EXECUTE β”‚ -β”‚ Claude generates response with locked parameters β”‚ -β”‚ Anchor: [EXEC:a3f2b8|direct|Cortex|30000ft|standard] β”‚ -β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ - β–Ό -β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” -β”‚ PHASE 5: UPDATE β”‚ -β”‚ RC^+xi convergence tracking β†’ attractor basins β”‚ -β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ +```mermaid +%%{init: {'theme':'base','themeVariables':{'primaryColor':'#1F2937','primaryTextColor':'#F5F1EA','primaryBorderColor':'#1F2937','lineColor':'#1F2937','secondaryColor':'#F5F1EA','tertiaryColor':'#F5F1EA','fontFamily':'system-ui, -apple-system, sans-serif'}}}%% +flowchart TD + In(["User message to Claude Code"]) + A["1 Β· DETECT
PRISM signal extraction
emotional β†’ mode β†’ domain β†’ task"] + B["2 Β· CASCADE
Safety gates + 7-expert MoE
first-match-wins"] + C["3 Β· LOCK
MAX3 reflection Β· safety gate
deterministic checksum"] + D["4 Β· EXECUTE
Locked-parameter generation
EXEC:checksum Β· expert Β· paradigm Β· altitude Β· depth"] + E["5 Β· UPDATE
RC^+ΞΎ convergence tracking
attractor basins"] + Out(["Response + persisted state"]) + In --> A --> B --> C --> D --> E --> Out + classDef phase fill:#1F2937,stroke:#1F2937,color:#F5F1EA,stroke-width:0px + classDef io fill:#F5F1EA,stroke:#1F2937,color:#1F2937,stroke-width:2px + class A,B,C,D,E phase + class In,Out io ``` --- @@ -142,6 +131,32 @@ The system protects you from yourself: --- +## Burnout Escalation + +Cognitive state moves between four levels. Escalation tracks observable signals; recovery is always available and is body-first, not productivity-driven. + +```mermaid +%%{init: {'theme':'base','themeVariables':{'primaryColor':'#1F2937','primaryTextColor':'#F5F1EA','primaryBorderColor':'#1F2937','lineColor':'#1F2937','fontFamily':'system-ui, -apple-system, sans-serif'}}}%% +stateDiagram-v2 + direction LR + [*] --> GREEN + GREEN --> YELLOW: typos rising,
shorter messages + YELLOW --> ORANGE: frustration,
declining coherence + ORANGE --> RED: ALL CAPS,
spiral, incoherence + YELLOW --> GREEN: rest, water, break + ORANGE --> GREEN: walk, family,
body-first + RED --> GREEN: full stop,
body-first protocol + + classDef calm fill:#F5F1EA,stroke:#1F2937,color:#1F2937,stroke-width:2px + classDef alert fill:#1F2937,stroke:#1F2937,color:#F5F1EA,stroke-width:0px + class GREEN calm + class YELLOW,ORANGE,RED alert +``` + +Recovery from RED is always **body before brain**: water, walking, family, outside β€” then back to work when (and only when) the body says so. + +--- + ## CLI Commands ```bash