Theta wave

From grandamenium/cortextos · View interactive version

Theta wave is an AI agent skill from the GitHub repository grandamenium/cortextos. System-level deep improvement cycle. You scan the entire system, evaluate all experiments, do external research, have a real conversation with the orchestrator, and manage agent research cycles. Theta wave is itself an autoresearch cycle with a compound qualitative metric.

How to use this skill

Skill file

Theta Wave

Theta wave is the system's sleep cycle - a deep analysis and improvement process that you (the analyst) own. It is itself an autoresearch cycle: you hypothesize about system-level improvements, experiment by changing agent cycles or configurations, measure the compound effect, and iterate.

Your Compound Metric

Your metric is system_effectiveness - a qualitative compound score from 1-10 that you assign each cycle. It reflects:

You MUST write a paragraph justifying your score each cycle. Historical scores show the system's trajectory.

The Theta Wave Cycle

When your theta-wave cron fires:

Phase 1: Initiate

First action: Message the orchestrator that theta wave is starting.

cortextos bus send-message <orchestrator> high "Theta wave initiated. Running deep system scan. Stand by for findings."

Phase 2: Deep System Scan

Scan EVERYTHING:

Phase 3: Evaluate Previous Theta Wave Experiment

If you have an active theta wave experiment:

Phase 4: Evaluate Agent Research Cycles

For each agent with active experiments:

Phase 5: External Research

Based on the north star and current bottleneck:

Phase 6: Conversation with Orchestrator

This is a REAL conversation. Not templated. Not scripted.

Send your findings to the orchestrator via send-message.sh. Share:

Then LISTEN to the orchestrator's response. They will:

Guidelines for the conversation:

Phase 7: Hypothesis and Action

Based on the conversation, decide what to change:

Create new cycles for agents:

cortextos bus manage-cycle create <agent> \
  --cycle <cycle_name> \
  --metric <metric_name> \
  --metric-type <quantitative|qualitative> \
  --surface <path_to_surface_file> \
  --direction <higher|lower> \
  --window <measurement_window> \
  --measurement "<how_to_measure>" \
  --loop-interval <cron_frequency>

Then send the agent a message to set up the corresponding cron:

cortextos bus send-message <agent> normal "New autoresearch cycle created: <cycle_name> optimizing <metric_name>. Register the cron: cortextos bus add-cron \$CTX_AGENT_NAME experiment-<metric> <loop_interval> \"Read .claude/skills/autoresearch/SKILL.md and execute the experiment loop.\""

Modify existing cycles:

cortextos bus manage-cycle modify <agent> --cycle <name> \
  --window <new_window> \
  --loop-interval <new_loop_interval> \
  --surface <new_surface> \
  --measurement "<new_method>" \
  --metric-type <quantitative|qualitative> \
  --enabled <true|false>

Use --enabled false to pause a stale or converged cycle instead of removing it entirely — pausing preserves the cycle history.

Remove converged or irrelevant cycles:

cortextos bus manage-cycle remove <agent> --cycle <name>

If auto_create_agent_cycles or auto_modify_agent_cycles is false, create approvals instead of executing directly.

Phase 8: Score, Log, and Report

Your Unique Powers

Important Rules

  1. Always message the orchestrator first when theta wave starts
  2. The conversation must be real and substantive - push each other
  3. Score justifications must reference specific data
  4. Log EVERYTHING to learnings.md - both what worked and what failed
  5. Never repeat a system-level change that was already discarded
  6. External research must be relevant to current goals, not generic
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.