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_identity_status.py
View on GitHub"""
tests/test_os_init_identity_status.py
=====================================
Purpose:
Failing-first acceptance tests for T13 (auth-ciba-increment-b, issue #639, spec case 16): os-control-init
reports the Gate 1 signing-identity status and prints the exact human setup command, but is a
READ-ONLY reporter. It never creates a key, never writes `context/identity/` or `allowed_signers*`,
and never runs the setup. os-control-init is an agent-run surface, so anything else would be an enrollment
path for an agent. Real subprocess runs of init_agentic_os.py on a real throwaway git repo, the
same pattern as test_init_agentic_os_scaffolding.py.
Key Input Dependencies:
- scripts/init_agentic_os.py (signing_identity_notice, print_next_steps)
- control_plane/identity_setup.py (identity_status), identity_layout.py
Key Functions (test cases):
- test_init_reports_signing_identity_status_and_the_human_command
- test_init_never_creates_keys_or_identity_files
- test_init_reports_enrolled_keys_when_a_human_already_set_it_up
"""
import os
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
REPO_ROOT = Path(__file__).resolve().parents[5]
SKILL_DIR = Path(__file__).resolve().parent.parent
INIT_SCRIPT = SETUP_SCRIPTS / "init_agentic_os.py"
_scripts_dir = str(SKILL_DIR / "scripts")
if _scripts_dir not in sys.path:
sys.path.insert(0, _scripts_dir)
@pytest.fixture
def target_repo(tmp_path):
repo = tmp_path / "test_project"
repo.mkdir()
subprocess.run(["git", "init"], cwd=repo, check=True, capture_output=True)
subprocess.run(["git", "config", "user.name", "Test User"], cwd=repo, check=True)
subprocess.run(["git", "config", "user.email", "test@example.com"], cwd=repo, check=True)
(repo / "README.md").write_text("# Test Project\n", encoding="utf-8")
subprocess.run(["git", "add", "."], cwd=repo, check=True)
subprocess.run(["git", "commit", "-m", "Initial commit"], cwd=repo, check=True, capture_output=True)
return repo
def _init(repo):
return subprocess.run([sys.executable, str(INIT_SCRIPT), "--target", str(repo), "--retrofit"], capture_output=True, text=True)
def test_init_reports_signing_identity_status_and_the_human_command(target_repo):
res = _init(target_repo)
assert res.returncode == 0, res.stderr
out = res.stdout
assert "Signing identity" in out and "not set up" in out.lower()
assert "setup_ciba_identity.py" in out
assert "human" in out.lower() and "never" in out.lower() # says it is not run by init
def test_init_never_creates_keys_or_identity_files(target_repo):
_init(target_repo)
# The HUMAN's identity is never created by an agent-run os-control-init (no terminal here).
assert not (target_repo / "context" / "identity").exists()
# The only trust files that may exist are the agent's OWN simulation ones (created by default now).
stray = [p for p in target_repo.rglob("allowed_signers*") if "context/simulation/identity" not in p.as_posix()]
assert not stray, f"human trust file created by os-control-init: {stray}"
assert not list(target_repo.rglob("id_ed25519*"))
assert not list(target_repo.rglob("agentic-os_signing*"))
def test_init_reports_enrolled_keys_when_a_human_already_set_it_up(target_repo, tmp_path):
from control_plane.identity_layout import default_layout
from control_plane.identity_setup import enroll_key
key = tmp_path / "id"
subprocess.run(["ssh-keygen", "-q", "-t", "ed25519", "-N", "pw", "-C", "t", "-f", str(key)], check=True, capture_output=True)
enroll_key(default_layout(target_repo), "op@local", (tmp_path / "id.pub").read_text().strip())
res = _init(target_repo)
assert res.returncode == 0
assert "SHA256:" in res.stdout and "enrolled" in res.stdout.lower()
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 |