control-metalayer-loop
Original:🇺🇸 English
Translated
16 scripts
Create and maintain a control-system metalayer for autonomous code-agent development in any repository. Use when you need explicit control primitives (setpoints, sensors, controller policy, actuators, feedback loop, stability and entropy controls), repo command/rule governance, and a scalable folder topology that lets agents operate safely and keep improving over time.
2installs
Added on
NPX Install
npx skill4agent add broomva/agent-control-metalayer-skill control-metalayer-loopTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Control Metalayer Loop
Use this skill to initialize or upgrade a repository into a control-loop driven agentic development system.
What To Load
- for the control model and minimal control law.
references/control-primitives.md - for policy/rules and command governance.
references/rules-and-commands.md - for repository topology and scale path.
references/topology-growth.md - for command usage.
references/wizard-cli.md
Primary Entry Point
Use the Typer wizard:
bash
python3 scripts/control_wizard.py init <repo-path> --profile governedProfiles:
- : minimal harness and command surface.
baseline - : baseline + policy/commands/topology + control loop + metrics + git hooks.
governed - : governed + recovery/nightly controls + web and CLI E2E primitives.
autonomous
Workflow
- Baseline current repo workflows and constraints.
- Initialize baseline metalayer artifacts.
- Add control primitives and governance rules.
- Audit and close gaps.
- Iterate based on run outcomes and metric drift.
Step 1: Baseline
- Identify canonical test/lint/typecheck/build commands.
- Identify high-risk actions requiring policy gates.
- Identify required observability IDs for agent runs.
Step 2: Initialize Metalayer
Run:
bash
python3 scripts/control_wizard.py init <repo-path> --profile baselineThis creates stable operational interfaces:
- ,
AGENTS.md,PLANS.mdMETALAYER.md - and
Makefile.controlscripts/control/* - and
docs/control/ARCHITECTURE.mddocs/control/OBSERVABILITY.md - CI workflow for control checks
Step 3: Add Control Primitives
Run:
bash
python3 scripts/control_wizard.py init <repo-path> --profile governedThis adds the core control plane:
.control/policy.yaml.control/commands.yaml.control/topology.yamldocs/control/CONTROL_LOOP.mdevals/control-metrics.yaml
For a fully self-sustaining loop:
bash
python3 scripts/control_wizard.py init <repo-path> --profile autonomousAdds:
- +
scripts/control/install_hooks.sh.githooks/* scripts/control/recover.shscripts/control/web_e2e.shscripts/control/cli_e2e.sh.github/workflows/web-e2e.yml.github/workflows/cli-e2e.yml- +
tests/e2e/web/*playwright.config.ts tests/e2e/cli/smoke.sh.control/state.json.github/workflows/control-nightly.yml
Step 4: Validate
Run:
bash
python3 scripts/control_wizard.py audit <repo-path>
python3 scripts/control_wizard.py audit <repo-path> --strictTreat audit failures as blocking until corrected.
Step 5: Operate And Grow
- Keep command names stable (,
smoke,check,test).recover - Keep E2E command names stable (,
web-e2e).cli-e2e - Keep policy and command catalog synchronized with actual behavior.
- Track control metrics and adjust setpoints deliberately.
- Prune stale rules/scripts/docs to prevent entropy growth.
Adaptation Rules
- Do not overwrite existing project conventions without explicit reason.
- Prefer wrappers and policy files over ad-hoc command execution.
- Make every major behavior observable and auditable.
- Keep human escalation rules explicit and easy to trigger.