try-works/role-model / .agents/skills/recursive-mode
recursive-mode
UnverifiedRepository workflow orchestration skill for staged implementation, locked artifacts, late-phase receipts, and durable memory maintenance. Use when executing recursive-mode runs, resuming a run, locking a phase, or verifying locks.
scripts/test_recursive_subagent_action.py
View on GitHub#!/usr/bin/env python3
from __future__ import annotations
import shutil
import subprocess
import sys
import tempfile
import unittest
from pathlib import Path
REPO_ROOT = Path(__file__).resolve().parent.parent
SCRIPT_PATH = REPO_ROOT / "scripts" / "recursive-subagent-action.py"
class RecursiveSubagentActionTests(unittest.TestCase):
def setUp(self) -> None:
self.temp_dir = Path(tempfile.mkdtemp(prefix="recursive-subagent-action-test-"))
self.repo_root = self.temp_dir / "repo"
(self.repo_root / ".recursive" / "run" / "run-123").mkdir(parents=True, exist_ok=True)
def tearDown(self) -> None:
shutil.rmtree(self.temp_dir, ignore_errors=True)
def test_action_record_includes_router_metadata_fields(self) -> None:
completed = subprocess.run(
[
sys.executable,
str(SCRIPT_PATH),
"--repo-root",
str(self.repo_root),
"--run-id",
"run-123",
"--subagent-id",
"code-reviewer",
"--phase",
"Phase 3.5",
"--purpose",
"Delegated code review",
"--execution-mode",
"review",
"--router-used",
"recursive-router",
"--routed-role",
"code-reviewer",
"--routed-cli",
"codex",
"--routed-model",
"gpt-5",
"--routing-config-path",
".recursive/config/recursive-router.json",
"--routing-discovery-path",
".recursive/config/recursive-router-discovered.json",
"--routing-resolution-basis",
"role_routes.code-reviewer",
"--cli-probe-summary",
"codex available",
"--prompt-bundle-path",
".recursive/run/run-123/router-prompts/code-reviewer-bundle.md",
"--invocation-exit-code",
"0",
"--output-capture-path",
".recursive/run/run-123/evidence/router/code-reviewer-output.md",
],
cwd=str(REPO_ROOT),
text=True,
capture_output=True,
check=False,
)
self.assertEqual(completed.returncode, 0, completed.stdout + completed.stderr)
action_records = list((self.repo_root / ".recursive" / "run" / "run-123" / "subagents").glob("*.md"))
self.assertEqual(len(action_records), 1)
content = action_records[0].read_text(encoding="utf-8")
self.assertIn("- Router Used: `recursive-router`", content)
self.assertIn("- Routed Role: `code-reviewer`", content)
self.assertIn("- Routed CLI: `codex`", content)
self.assertIn("- Routed Model: `gpt-5`", content)
self.assertIn("- Routing Config Path: `/.recursive/config/recursive-router.json`", content)
self.assertIn("- Prompt Bundle Path: `/.recursive/run/run-123/router-prompts/code-reviewer-bundle.md`", content)
self.assertIn("- Invocation Exit Code: `0`", content)
self.assertIn("- `/.recursive/run/run-123/evidence/router/code-reviewer-output.md`", content)
if __name__ == "__main__":
unittest.main()
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 468k | Updated | Claude CodeCodex | Unverified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |