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_init_respects_control_plane_mode.py
View on GitHub"""
test_init_respects_control_plane_mode.py - os-control-init must never silently re-enable a gate.
Purpose:
`init_agentic_os.py --install-hooks` (and --retrofit, which shares the same code) used to
re-install and re-wire the control-plane guards unconditionally. With a declared mode of
`disabled` it must skip pipeline + push guards, while still installing the independent
evolution guard. A missing mode file must behave exactly as before (everything installed).
"""
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"
HOOKS = ".git/hooks"
@pytest.fixture
def repo(tmp_path):
root = tmp_path / "repo"
root.mkdir()
for cmd in (["git", "init", "-q"], ["git", "config", "user.email", "a@b.c"], ["git", "config", "user.name", "T"],
["git", "commit", "--allow-empty", "-q", "-m", "x"]):
subprocess.run(cmd, cwd=root, check=True, capture_output=True)
return root
def _install(root):
return subprocess.run([sys.executable, str(INIT), "--target", str(root), "--install-hooks"],
capture_output=True, text=True)
def test_no_mode_file_installs_and_wires_every_guard_as_before(repo):
res = _install(repo)
assert res.returncode == 0, res.stdout + res.stderr
hooks = repo / HOOKS
for guard in ("pre-commit-evolution-guard", "pre-commit-pipeline-guard", "pre-push-review-guard"):
assert (hooks / guard).is_file(), guard
assert "pre-commit-pipeline-guard" in (hooks / "pre-commit").read_text()
assert "pre-commit-evolution-guard" in (hooks / "pre-commit").read_text()
assert "pre-push-review-guard" in (hooks / "pre-push").read_text()
def test_disabled_mode_skips_the_control_plane_guards_but_keeps_the_evolution_guard(repo):
(repo / "context").mkdir()
(repo / "context" / "control-plane-mode").write_text("disabled\n")
res = _install(repo)
assert res.returncode == 0, res.stdout + res.stderr
assert "Control plane is DISABLED" in res.stdout
hooks = repo / HOOKS
assert not (hooks / "pre-commit-pipeline-guard").exists()
assert not (hooks / "pre-push-review-guard").exists()
assert not (hooks / "pre-push").exists() # nothing to wire, so no dispatcher was created
assert (hooks / "pre-commit-evolution-guard").is_file() # independent feature, still installed
assert "pre-commit-pipeline-guard" not in (hooks / "pre-commit").read_text()
def test_rerunning_the_installer_does_not_re_enable_a_disabled_gate(repo):
(repo / "context").mkdir()
(repo / "context" / "control-plane-mode").write_text("disabled\n")
_install(repo)
_install(repo)
assert not (repo / HOOKS / "pre-push-review-guard").exists()
assert (repo / "context" / "control-plane-mode").read_text().strip() == "disabled"
def test_a_corrupt_mode_file_fails_closed_and_installs_the_guards(repo):
(repo / "context").mkdir()
(repo / "context" / "control-plane-mode").write_text("maybe\n")
res = _install(repo)
assert res.returncode == 0
assert "Treating the control plane as enabled" in res.stdout
assert (repo / HOOKS / "pre-push-review-guard").is_file()
def test_installer_is_idempotent_when_enabled(repo):
_install(repo)
first = (repo / HOOKS / "pre-commit").read_text(), (repo / HOOKS / "pre-push").read_text()
_install(repo)
assert ((repo / HOOKS / "pre-commit").read_text(), (repo / HOOKS / "pre-push").read_text()) == first
def test_an_install_without_the_control_plane_skill_beside_it_fails_with_a_clear_instruction(repo, tmp_path):
lonely = tmp_path / "lonely" / "setting-up-agentic-os" / "scripts"
lonely.mkdir(parents=True)
for name in ("init_agentic_os.py", "control_plane_path.py"):
(lonely / name).write_text((SETUP_SCRIPTS / name).read_text()) # the setup skill alone, no running-control-plane beside it
res = subprocess.run([sys.executable, str(lonely / "init_agentic_os.py"), "--target", str(repo), "--install-hooks"],
capture_output=True, text=True)
assert res.returncode != 0
assert "running-control-plane skill was not found" in res.stderr and "apm install" in res.stderr
assert "Traceback" not in res.stderr # an instruction, not a double tracebackRelated 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 |