richfrem/agent-plugins-skills / plugins/agent-agentic-os/.apm/skills/running-control-plane
running-control-plane
FlaggedCRITICAL INTAKE GATEWAY: use at the start of any non-trivial engineering task, feature, refactor, multi-file bugfix, work package or new idea, including requests to explore, brainstorm, build, fix or change something, before planning or code changes. Enforces read-only discovery, 1-3 structured questions with defaults, control-plane registration and the immutable four-pillar TASK_SPEC.md. Also runs the rest of the control plane: health ("run health check", "check os metrics", "system monitor", event bus, locks, memory, "is my signing identity ready" status check), transition simulation ("dry run transition", "simulate transition", "check edge X -> Y"), worktree selection, and gating on/off ("disable the control plane", "turn off the push guard", "stop gating my commits"). Not for project setup or key creation (use setting-up-agentic-os) or improving skills (use improving-skills-in-lab).
tests/test_os_init_dual_identity.py
View on GitHub#!/usr/bin/env python
"""
test_os_init_dual_identity.py
=============================
Purpose:
os-control-init onboarding for both approval identities (round-3 review follow-up):
- the readiness report lists human approval, simulation and isolation separately;
- --with-simulation-identity creates (and on reruns reuses) the agent's simulation identity in
context/simulation/identity/ and never creates or writes the human's production trust file;
- without the flag nothing is created (the existing contract in test_os_init_identity_status.py).
Key Input Dependencies:
plugins/agent-agentic-os/skills/setting-up-agentic-os/scripts/init_agentic_os.py (run as a real subprocess)
plugins/agent-agentic-os/skills/running-control-plane/scripts/control_plane/simulation_identity.py
Layer: Development / Testing
Functions:
- test_init_reports_three_readiness_items
- test_with_simulation_identity_creates_only_the_simulation_identity
- test_simulation_identity_rerun_reuses_the_key
Usage:
python -m pytest plugins/agent-agentic-os/skills/running-control-plane/tests/test_os_init_dual_identity.py
"""
import subprocess
import sys
from pathlib import Path
import pytest
SETUP_SCRIPTS = Path(__file__).resolve().parents[2] / "setting-up-agentic-os" / "scripts" # the setup skill beside this one
INIT = SETUP_SCRIPTS / "init_agentic_os.py"
@pytest.fixture
def target_repo(tmp_path):
repo = tmp_path / "repo"
repo.mkdir()
subprocess.run(["git", "init", "-q", str(repo)], check=True)
return repo
def _init(repo: Path, *extra: str) -> subprocess.CompletedProcess:
return subprocess.run(
[sys.executable, str(INIT), "--target", str(repo), "--retrofit", "--contribution-mode", "fork-and-pr", *extra],
capture_output=True, text=True, timeout=180,
)
def _sim_fingerprint(repo: Path) -> str:
sys.path.insert(0, str(INIT.parent))
from control_plane.approver_policy import key_fingerprint
return key_fingerprint((repo / "context" / "simulation" / "identity" / "simulation_key.pub").read_text().split()[1])
def test_init_reports_three_readiness_items(target_repo):
res = _init(target_repo)
assert res.returncode == 0, res.stderr
out = res.stdout
for item in ("Human approval", "Simulation", "Isolation"):
assert item in out, item
assert "Simulation: ready" in out # created by default now; no opt-in flag needed
def test_skipping_the_simulation_identity_reports_it_and_says_how_to_create_it(target_repo):
res = _init(target_repo, "--no-simulation-identity")
assert res.returncode == 0, res.stderr
assert "Simulation: not set up" in res.stdout and "re-run" in res.stdout
assert not (target_repo / "context" / "simulation" / "identity").exists()
def test_with_simulation_identity_creates_only_the_simulation_identity(target_repo):
res = _init(target_repo, "--with-simulation-identity")
assert res.returncode == 0, res.stderr
sim = target_repo / "context" / "simulation" / "identity"
assert (sim / "simulation_key").exists() and (sim / "allowed_signers").exists()
assert not (target_repo / "context" / "identity").exists() # the human's production identity is never created
assert "Simulation: ready" in res.stdout
def test_simulation_identity_rerun_reuses_the_key(target_repo):
assert _init(target_repo, "--with-simulation-identity").returncode == 0
first = _sim_fingerprint(target_repo)
assert _init(target_repo, "--with-simulation-identity").returncode == 0
assert _sim_fingerprint(target_repo) == first
def test_setup_check_reports_three_readiness_items(target_repo):
setup = INIT.parent / "setup_ciba_identity.py"
res = subprocess.run([sys.executable, str(setup), "--check", "--repo-root", str(target_repo)], capture_output=True, text=True, timeout=120)
for item in ("Human approval", "Simulation", "Isolation"):
assert item in res.stdout, res.stdout
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: 471k | Updated | Claude CodeCodex | Verified | 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: 322k | 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: 322k | 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: 322k | Updated | Claude CodeCodex | Verified | Install |