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).
scripts/capability_probe.py
View on GitHub"""
capability_probe.py -- Session-Aware Runtime Capability Probing
====================================================================
Purpose:
Session-aware runtime capability probing for native-first orchestration.
Detects which AI CLI runtime (claude-code, agy, copilot, codex) a session is
running under from environment markers, and reports that runtime's explicit
native-planning/native-worktree/native-subagent support so callers can defer to
native host features instead of a portable fallback where available.
Key Input Dependencies:
- Environment variables: the marker vars in _RUNTIME_MARKERS (e.g.
CLAUDE_CODE_ENTRY, ANTIGRAVITY_IDE, GITHUB_COPILOT_CLI, CODEX_CLI), plus
per-runtime explicit capability overrides of the form
<RUNTIME>_NATIVE_<CAPABILITY> (see _explicit_capability()).
Key Functions:
- RuntimeCapabilities -- frozen dataclass of one runtime's observed facilities.
- _explicit_capability() -- reads one boolean env-var override for a capability.
- detect_runtime() -- returns the detected runtime_id from environment markers.
- probe_runtime() -- builds the full RuntimeCapabilities for the current (or a
given) runtime_id.
"""
from __future__ import annotations
import os
from dataclasses import dataclass
from typing import Mapping, Optional
@dataclass(frozen=True)
class RuntimeCapabilities:
"""Explicitly observed runtime facilities and portable fallback guidance."""
runtime_id: str
available: bool
native_planning: bool
native_worktree: bool
native_subagents: bool
tool_support: tuple[str, ...]
worktree_activation: str
portable_fallback: str
_RUNTIME_MARKERS = (
("claude-code", ("CLAUDE_CODE_ENTRY", "CLAUDE_PROJECT_DIR")),
("agy", ("ANTIGRAVITY_IDE", "ANTIGRAVITY_AGENT")),
("copilot", ("GITHUB_COPILOT_CLI", "COPILOT_CLI")),
("codex", ("CODEX_CLI", "CODEX_SESSION")),
)
def _explicit_capability(values: Mapping[str, str], prefix: str, capability: str, default: bool = False) -> bool:
"""Return a native capability only when the active runtime advertises it."""
raw = values.get(f"{prefix}_NATIVE_{capability}")
if raw is None:
return default
return raw.lower() in {"1", "true", "yes"}
def detect_runtime(env: Optional[Mapping[str, str]] = None) -> str:
"""Return the active runtime from session markers, never from model names."""
values = os.environ if env is None else env
for runtime_id, markers in _RUNTIME_MARKERS:
if any(values.get(marker) for marker in markers):
return runtime_id
return "unknown"
def probe_runtime(
runtime_id: Optional[str] = None,
env: Optional[Mapping[str, str]] = None,
) -> RuntimeCapabilities:
"""Build a capability result from documented runtime facilities.
An explicit ``<RUNTIME>_NATIVE_*`` marker can disable a documented facility
or opt into a host-provided extension. Model names never grant capability.
"""
values = os.environ if env is None else env
runtime = (runtime_id or detect_runtime(values)).lower()
fallback = "Invoke the issue-worktree-agent skill for the portable .worktrees lifecycle."
base = {
"runtime_id": runtime,
"available": runtime != "unknown",
"native_planning": False,
"native_worktree": False,
"native_subagents": False,
"tool_support": (),
"worktree_activation": "Use the portable worktree fallback.",
"portable_fallback": fallback,
}
if runtime == "claude-code":
native_planning = _explicit_capability(values, "CLAUDE", "PLANNING", default=True)
native_worktree = _explicit_capability(values, "CLAUDE", "WORKTREE", default=True)
native_subagents = _explicit_capability(values, "CLAUDE", "SUBAGENTS", default=True)
base.update(native_planning=native_planning, native_worktree=native_worktree,
native_subagents=native_subagents, tool_support=("plan_mode", "worktree", "subagents", "tools"),
worktree_activation=("Use Claude Code native worktree capability."
if native_worktree else "Use Claude Code native plan mode; retain the portable worktree fallback."))
elif runtime == "agy":
native_planning = _explicit_capability(values, "AGY", "PLANNING", default=True)
native_worktree = _explicit_capability(values, "AGY", "WORKTREE")
native_subagents = _explicit_capability(values, "AGY", "SUBAGENTS", default=True)
base.update(native_planning=native_planning, native_worktree=native_worktree,
native_subagents=native_subagents, tool_support=("plan_mode", "subagents", "tools"),
worktree_activation=("Use Antigravity native worktree capability."
if native_worktree else "Use Antigravity native planning when available; retain the portable worktree fallback."))
elif runtime == "copilot":
native_planning = _explicit_capability(values, "COPILOT", "PLANNING", default=True)
native_worktree = _explicit_capability(values, "COPILOT", "WORKTREE")
native_subagents = _explicit_capability(values, "COPILOT", "SUBAGENTS", default=True)
base.update(native_planning=native_planning, native_worktree=native_worktree,
native_subagents=native_subagents, tool_support=("plan_mode", "subagents", "tools"),
worktree_activation=("Use Copilot native worktree capability."
if native_worktree else "Copilot native worktree capability is not confirmed; use the portable fallback."))
elif runtime == "codex":
native_planning = _explicit_capability(values, "CODEX", "PLANNING")
native_worktree = _explicit_capability(values, "CODEX", "WORKTREE")
native_subagents = _explicit_capability(values, "CODEX", "SUBAGENTS")
base.update(native_planning=native_planning, native_worktree=native_worktree,
native_subagents=native_subagents, tool_support=("plan_mode", "tools"),
worktree_activation=(
"Activate Codex native worktree mode before creating files; do not create a portable worktree."
if native_worktree else
"Codex native worktree capability is not confirmed; use the portable fallback."
))
return RuntimeCapabilities(**base)
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 |