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).
references/modes/worktree.md
View on GitHub# Worktree Manager
Selects confirmed native worktree facilities or the governed portable repository worktree fallback, validates placement, and reports cleanup guidance.
## When to use
Carried over from the description of the former skill, so its trigger phrases and exclusions stay on record:
> Selects confirmed native worktree facilities or the governed portable repository worktree fallback, validates placement, and reports cleanup guidance.
## Contents
- [Critical Constraints](#critical-constraints)
- [Quick start](#quick-start)
- [Workflow](#workflow)
- [Verification](#verification)
- [References](#references)
## Critical Constraints
1. **Origin Base Invariant**: Before creating any worktree, run `git fetch origin main` and base new branches on `origin/main` — never on local `main`.
2. **Path Confinement**: Portable worktrees must reside strictly below `<repo>/.worktrees/<task-id>`.
3. **Governance Equivalence**: Native worktree execution is an implementation facility, not a governance bypass. Both native and portable execution require identical approval, verification, and review gates.
4. **Reconciliation & Concurrency**: Never assume pre-worktree dirty state or concurrent branches carry over automatically. `APPROVED -> IN_WORKTREE` requires deterministic reconciliation (`main_worktree_reconciliation`). Rebase onto fresh `origin/main` immediately before merging.
## Quick start
Probe the active runtime to determine available worktree facilities:
```bash
python3 scripts/capability_probe.py
```
## Workflow
1. **Probe Runtime**: Run `capability_probe.py` and treat returned capability as authoritative. Never infer native support from model name or binary presence.
2. **Select Facility**:
- If `native_worktree` is true: follow returned activation guidance and retain task control-plane gates.
- If portable fallback: generate execution plan via `scripts/worktree_manager.py` and delegate lifecycle management to `issue-worktree-agent`.
3. **Reconcile Base & State**: Fetch `origin/main` and verify base commit. If migrating uncommitted edits, run deterministic reconciliation.
4. **Report & Activate**: Report selected strategy, exact path, branch, activation guidance, and cleanup commands before mutating repository.
## Verification
1. Confirm worktree directory path matches `<repo>/.worktrees/<task-id>`.
2. Verify branch HEAD is derived directly from `origin/main`.
3. Inspect `git status` inside worktree to confirm reconciliation succeeded without uncommitted file collisions.
## References
- [worktree-reconciliation-and-multi-worktree-practices.md](../worktree-reconciliation-and-multi-worktree-practices.md) — Read when handling dirty working trees, rebase conflicts, or concurrent worktrees.
- [acceptance-criteria.md](../acceptance-criteria.md#mode-intake) — Acceptance gates and readiness checks.
- [fallback-tree.md](../fallback-tree.md#mode-intake) — Recovery procedures when worktree creation fails.
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 |