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_implementation_runtime_bridge.py
View on GitHubimport pytest
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "scripts"))
from agent_control import ControlPlane
from control_plane.ports import TransitionCommitRequest, TransitionRecord
from control_plane.constants import (
STATE_APPROVED, STATE_IN_WORKTREE, STATE_WORKTREE_REVIEW,
)
class FakePersistence:
def __init__(self):
self.receipts = []
def apply_transition_with_receipts(self, request):
return TransitionRecord(1, request.task_id, request.expected_from_state, request.to_state, request.actor, request.reason, "now")
def has_receipt(self, task_id, gate_name):
return any(r[0] == task_id and r[1] == gate_name for r in self.receipts)
def insert_verification_receipt(self, task_id, gate_name, command, exit_code, token):
self.receipts.append((task_id, gate_name, command, exit_code, token))
def _request(to_state=STATE_IN_WORKTREE):
return TransitionCommitRequest("task-1", STATE_APPROVED, to_state, 1, "edge", "controller", "ready", [], [])
def test_approved_to_worktree_persists_kickoff_and_invokes_controller_once():
persistence = FakePersistence()
calls = []
cp = ControlPlane(persistence_adapter=persistence, implementation_controller=lambda task_id, record: calls.append((task_id, record)))
record = cp.commit_authorized_transition(_request())
assert calls == [("task-1", record)]
assert [r[1] for r in persistence.receipts] == ["implementation_kickoff"]
def test_other_transition_does_not_kickoff():
persistence = FakePersistence()
calls = []
cp = ControlPlane(persistence_adapter=persistence, implementation_controller=lambda *args: calls.append(args))
cp.commit_authorized_transition(_request(STATE_WORKTREE_REVIEW))
assert calls == []
assert persistence.receipts == []
def test_replayed_worktree_entry_does_not_duplicate_kickoff():
persistence = FakePersistence()
calls = []
cp = ControlPlane(persistence_adapter=persistence, implementation_controller=lambda *args: calls.append(args))
cp.commit_authorized_transition(_request())
cp.commit_authorized_transition(_request())
assert len(calls) == 1
assert len(persistence.receipts) == 1
def test_kickoff_error_is_visible():
persistence = FakePersistence()
def fail(*args):
raise RuntimeError("controller unavailable")
cp = ControlPlane(persistence_adapter=persistence, implementation_controller=fail)
with pytest.raises(RuntimeError, match="controller unavailable"):
cp.commit_authorized_transition(_request())
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 | 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: 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 |