Loop system architect
Cross-agent SKILL.md workflows for product architecture, UX audits, prompt clarity, work synthesis, and hands-on practice.
npx -y skills add m1nga/skill-builder --skill loop-system-architectAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 25 days oldThe repository was created 25 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Design, audit, repair, and operationalize reliable agent loops with explicit goals, triggers, persistent state, orchestration, independent verification, failure recovery, open skill discovery or creation, experience distillation, controlled self-improvement, and retirement conditions. Use when the user asks to build a loop, autonomous or recurring agent workflow, multi-agent operating system, self-improving process, knowledge/experience distillation pipeline, zero-context recovery flow, permanent update/replacement loop, or to turn a prose plan or repeated prompt into a genuinely executable loop.
SKILL.md
9.4 KB, ~1.8k tokens by cl100k_base, as published. Nobody here has run it
Loop System Architect
Turn a repeated task into an observable control system that can execute, prove its result, recover after interruption, and improve without rewriting its own purpose.
Choose the mode
- Audit: inspect an existing workflow and report missing or open-loop parts. Do not edit unless asked.
- Design: produce the contract, state schema, role graph, evals, and runtime design.
- Operationalize: implement the controller, adapters, persistence, evidence, and one-command run path.
- Evolve: analyze completed runs, validate a proposed loop/knowledge/skill improvement, and promote or reject it.
When the user asks to “build” or “get it working,” include Operationalize. A Markdown plan alone is not an operational loop.
Start from live reality
- Read repository instructions and the artifacts the user placed in scope.
- Inspect the actual tools, entry points, state files, tests, schedulers, agent CLIs, and dirty worktree.
- Separate current authoritative input from reference material. Do not use model memory to fill gaps.
- Classify the loop:
- Terminal: one goal with a demonstrable finish line.
- Recurring: every run terminates, while the monitor/service continues until retired.
- State what exists, what is missing, and what is only claimed before changing anything.
For a full audit, read audit-rubric.md.
Require a closed control loop
Identify and connect all of these:
- objective and owner;
- completion condition or per-run success condition;
- authoritative source boundary and provenance;
- trigger and cheap preflight;
- sensor and collected signal;
- comparator, window, and threshold/rule;
- controller and finite decision space;
- actuator and the path that returns the new result to the sensor;
- persistent state, cursor, event log, and evidence store;
- orchestrator, executor, and independent verifier responsibilities;
- open capability/skill discovery and candidate-skill creation;
- authority boundaries and protected fields;
- acceptance evals and required evidence;
- retries, timeouts, backoff, failure classification, and rollback;
- idempotency, deduplication, concurrency lock, and side-effect choke point;
- token, cost, turn, and wall-time budgets;
- observability, alerts, and a no-op success state;
- direct replacement of superseded active truth;
- experience distillation and controlled promotion;
- stop, pause, kill, and retirement conditions.
Missing sensor-to-actuator feedback means open loop. Missing persistent state means a repeated prompt. Missing verifier evidence means self-asserted completion. Missing a controller/trigger means a procedure humans must operate.
Produce a loop package
Adapt names to the repository, but keep one canonical machine-readable contract and one state record. The default package is:
loop/
├── LOOP-CONTRACT.md human-readable operating contract
├── loop.contract.json machine-readable canonical contract
├── RUN-STATE.json current run, cursor, attempts, next machine action
├── events/ append-only run events or an equivalent event store
├── evidence/ verifier-readable receipts
├── evals/ deterministic and semantic acceptance checks
├── knowledge/ typed promoted knowledge, not raw logs
├── candidates/ unpromoted lessons and skill changes
└── scripts/run-loop one-command controller or project-native equivalent
Use loop-contract.md for the field contract. Copy loop.contract.template.json, fill every placeholder, then run:
python3 scripts/loop_lint.py /path/to/loop.contract.json
Use the copy inside this skill when the project has not vendored the linter.
Build the controller, not only the instructions
The controller must make one invocation advance the loop without asking the user to copy and paste between agents:
- acquire a concurrency lock and derive an idempotency key;
- load and lint the contract and state;
- verify frozen-source hashes or current source authority;
- run the cheap trigger/preflight and record a no-op success when no work exists;
- resolve required capabilities;
- create a minimal context packet for the orchestrator/executor;
- execute in an isolated workspace when changes are possible;
- capture outputs, costs, tool calls, diffs, and evidence;
- run an independent verifier that cannot certify its own writes;
- on failure, classify and route a bounded repair, retry, rollback, or stop;
- on pass, atomically promote the result and update current state;
- append an immutable event/receipt;
- invoke distillation only when its trigger is satisfied;
- release the lock and expose the next machine-executable action.
Prefer deterministic code for triggers, state transitions, schema checks, permissions, retries, hashes, and promotion. Use LLMs for judgment, planning, diagnosis, and content that cannot be decided mechanically.
Discover or create skills without a static allowlist
Use open discovery with controlled execution:
- Derive a capability contract from the task: input, output, side effects, evidence, risk.
- Search installed skills and project capabilities by metadata and contract fit.
- Inspect provenance and dependencies; do not import embedded project identity as truth.
- Sandbox a candidate skill and run capability-specific evals.
- If none fits, create a candidate skill in isolation with its own examples and evals.
- Promote a version only after it passes security, privacy, functional, and regression checks.
- Register locally by default. External publication follows the owning environment's separate policy.
Open discovery does not grant open authority. Mandates, data scope, side-effect policy, and runtime permissions still constrain every skill.
Distill experience into usable knowledge
Never feed an ever-growing log to every agent. Keep raw evidence, episodic summaries, candidate lessons, canonical knowledge, procedural skills, and evals separate.
Run the promotion path:
trace + outcome
→ normalized episode
→ candidate lesson
→ deduplicate and conflict-check
→ replay against prior runs and counterexamples
→ shadow or canary
→ promote a version
→ monitor the next runs
→ keep or rollback
Trigger distillation on repeated failure, repeated manual work, drift, cost regression, meaningful outcome evidence, or a configured sample size—not merely because time passed. Read distillation.md before designing or changing the learning layer.
The evolution process may improve SOPs, triggers, context packing, scripts, skills, retrieval, and operational thresholds within delegated authority. It may not silently rewrite the objective, source boundary, tenant/privacy boundary, authority model, or the eval that defines success.
Replace active truth cleanly
For any accepted update:
- compute the impact graph across contract, state schema, code, tests, docs, views, and skills;
- declare
REPLACES,REMOVES, andKEEPS; - update all dependents;
- remove superseded wording and values from active retrieval;
- run contradiction/stale-value scans;
- run affected happy and failure-path evals;
- run a zero-context probe that must recover exactly one current answer;
- promote atomically; retain prior versions only in version control/event history, not active context.
Calibrate autonomy
- Auto-run reversible, bounded actions when deterministic and independent verification passes.
- Use canary, shadow, dual verification, and rollback for higher-risk automated actions.
- Stop for the user only when authority is missing, a required decision changes the objective, or the action is materially irreversible and not already authorized.
- Never make routine human approval a hidden actuator in a loop advertised as autonomous.
Verify completion
Do not call the loop operational until all are true:
- one command or configured event can advance it without prompt ferrying;
- interruption recovery resumes from persisted state without redoing accepted work;
- duplicate triggers cannot duplicate side effects;
- verifier failure causes bounded repair or a clean stop;
- both success and fail-closed paths have evidence;
- a no-work run terminates successfully and cheaply;
- the current status, last result, cost, open failure, and next action are observable;
- one evolution candidate has been replayed and either promoted or correctly rejected;
- a zero-context agent can explain the current contract and next action from active files alone.
Report separately: what is implemented, what was exercised, what remains dormant for lack of a live sensor, and what still requires the user's authority.