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_installation_probe.py
View on GitHubimport sqlite3
import sys
from pathlib import Path
SCRIPTS_DIR = Path(__file__).resolve().parent.parent / "scripts"
if str(SCRIPTS_DIR) not in sys.path:
sys.path.insert(0, str(SCRIPTS_DIR))
from control_plane.installation_probe import classify_target
from control_plane.adapters import CURRENT_SCHEMA_VERSION
def _scaffold(target: Path, *, version: int = CURRENT_SCHEMA_VERSION, transitions: bool = True,
authorized_actor_parity: bool = True) -> None:
for rel in (".claude/hooks/hooks.json", ".git/hooks/pre-commit-evolution-guard",
".github/workflows/verify-evolution-integrity.yml"):
path = target / rel
path.parent.mkdir(parents=True, exist_ok=True)
path.write_text("managed", encoding="utf-8")
db_path = target / "context/control_plane.db"
db_path.parent.mkdir(parents=True, exist_ok=True)
conn = sqlite3.connect(db_path)
conn.execute("CREATE TABLE schema_version (version INTEGER NOT NULL)")
conn.execute("INSERT INTO schema_version VALUES (?)", (version,))
conn.execute("CREATE TABLE valid_transitions (from_state TEXT, to_state TEXT, authorized_actor TEXT)")
if transitions:
from control_plane.adapters import LEGAL_INITIAL_STATES
from control_plane.registry import TransitionRegistry
registry = TransitionRegistry.load_default()
edges_with_actor = registry.get_all_edges_with_actor()
if not authorized_actor_parity:
edges_with_actor = [(f, t, "agent_or_human") for (f, t, _a) in edges_with_actor]
valid_rows = list(edges_with_actor) + [(None, s, "agent_or_human") for s in LEGAL_INITIAL_STATES]
conn.executemany("INSERT INTO valid_transitions VALUES (?, ?, ?)", valid_rows)
conn.execute("CREATE TRIGGER enforce_valid_transition AFTER INSERT ON schema_version BEGIN SELECT 1; END")
conn.commit()
conn.close()
def test_fresh_target_is_classified_without_writes(tmp_path):
result = classify_target(tmp_path)
assert result.state == "FRESH"
def test_complete_target_requires_schema_and_transition_parity(tmp_path):
_scaffold(tmp_path)
result = classify_target(tmp_path)
assert result.state == "COMPLETE"
assert result.missing == ()
def test_stale_schema_or_transition_rows_are_drifted(tmp_path):
_scaffold(tmp_path, version=CURRENT_SCHEMA_VERSION - 1, transitions=False)
result = classify_target(tmp_path)
assert result.state == "PARTIAL_OR_DRIFTED"
assert any("schema" in item or "transition" in item for item in result.missing)
def test_authorized_actor_column_drift_is_reported(tmp_path):
"""T5: an installed database whose valid_transitions.authorized_actor values
disagree with the registry's own authorized_actor derivation (e.g. from an
unsynced or manually-edited row) must be reported as drift, not silently
ignored -- authorized_actor is security-relevant, not cosmetic."""
_scaffold(tmp_path, authorized_actor_parity=False)
result = classify_target(tmp_path)
assert result.state == "PARTIAL_OR_DRIFTED"
assert any("authorized_actor" in item for item in result.missing)
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 |