본문으로 건너뛰기
cccskills
무료GitHub에 공개

loop-engineering

Use when a repeatable task must become a bounded Trigger -> Execute -> Verify -> State loop, scheduled automation, goal agent, or metric-driven research cycle.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Mark393295827/third-brain-v7-skills스타 141(GitHub 141 + cccskills 0)

실행 점수 미검증

설치 방법 보기

포함된 파일(4)

  • SKILL.md7.3 KB
  • agents/openai.yaml246 B
  • references/ci-repair-loop-example.md4.6 KB
  • scripts/validate_loop_contract.py8.3 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Loop Engineering

<skill_contract> <input>A repeatable task with inspectable state, finite budgets, permissions, and an independent verifier.</input> <output>A validated Trigger -> Execute -> Verify -> State contract plus resumable run receipts.</output> <done>The declared metric or stop condition is supported by fresh validator and verifier evidence.</done> <non_goals>Dependency-graph orchestration, unbounded autonomy, or self-certified completion.</non_goals>

Build loops only when repeated execution creates evidence. Every loop needs admission, a validated contract, durable state, independent evaluation, bounded retries, stop/recovery rules, and a final receipt.

Usage Template

Provide: objective, trigger, scope/non-goals, inputs, state/artifact paths, metric, verifier, permissions, budgets, stop condition, recovery, and write-back. See references/ci-repair-loop-example.md for a worked contract.

Workflow

<intake>

Select one mode:

  • Goal: run until a defined end state or cap.
  • Loop: poll/iterate while eligible work exists.
  • Automation: start from an external schedule/event; the trigger is not execution evidence.
  • AutoResearch: vary experiments against an objective metric in a sandbox.

Admit only if work is repeatable, outputs are inspectable, a verifier exists, failures are recoverable, and autonomy is worth the orchestration/review cost. Otherwise use a one-shot workflow.

Use graph-engineering instead when explicit data dependencies, independent branches, typed joins, or node-local recovery create measurable value. A Graph node may use this Loop contract for local repetition; Graph width does not replace finite Loop depth.

</intake>

<unknowns_gate>

Classify unknowns as known, probeable, testable, or blocked. Missing objective, verifier, permission boundary, budget, or recovery is NEEDS_INPUT; do not infer these controls from intent. Unknown implementation details may be resolved inside the loop only when the probe is bounded and reversible.

</unknowns_gate>

<execute>

Write this contract before acting:

Objective:                 Mode: Goal | Loop | Automation | AutoResearch
Trigger:                   Scope:                 Non-goals:
Owner:                     Inputs:
Artifacts path:            State path:            Work clock:
Success metric:            Evidence:              Verifier:
Topology: single-agent | maker-checker | manager-workers
Max iterations:            Time limit:            Budget:
Review budget:             Stop condition:
Write-back:                Permission boundary:   Recovery:

Validate it with scripts/validate_loop_contract.py --strict. Then iterate:

  1. Observe: load durable state, fresh environment evidence, budgets, and last error.
  2. Orient: update one hypothesis; choose the smallest action that can change the metric.
  3. Decide: check scope, permissions, expected evidence, and rollback.
  4. Act: execute one bounded action and capture artifact/diff/receipt.
  5. Verify: use a deterministic check or independent checker; compare metric and guardrails.
  6. State: append diagnosis, action, evidence, delta, budget, and next decision atomically.
  7. Stop/continue: stop on success, cap, permission boundary, regression, repeated signature, or no useful work.

Normalize the model/runtime termination signal after every action. complete still requires the declared verifier; tool_request returns proposed arguments to the host permission gate; checkpoint/truncation persists state before any continuation; refusal, error, or unknown escalates. Never infer completion from fluent prose or from the word "stop" alone.

For maintenance and queue loops, declare an allowed NO_OP outcome and its eligibility query. A quiet iteration is successful only when the query proves there was no eligible work, output count is within policy, and no side effect occurred.

Use single-agent by default, maker-checker for ambiguous/high-risk evaluation, and manager-workers only for genuinely independent work with an explicit integration gate.

If a validated Graph owns the dependency topology, this skill owns only the bounded retry behavior inside its declared loop nodes.

</execute> <evaluate>

The verifier must test the declared result rather than reward activity. Check evidence freshness, metric movement, guardrails, scope, and state replay. For external or consequential actions, require approval and verified rollback before crossing the boundary.

</evaluate>

<retry_policy>

max_attempts equals the contract's finite max iterations. Retry only after a named diagnosis and a changed input, tool, scope, or strategy. Stop on the same failure signature twice, metric regression, exhausted review budget, or NO_PROGRESS.

</retry_policy>

<state_contract>

Persist {run_id, status, attempt, budget, evidence, unknowns, last_error, next_action} plus contract version, trigger receipt, hypothesis, action, normalized termination reason, artifact/diff, metric/guardrail delta, permissions, output count, no-op receipt, work clock, and recovery point. Append iterations; write current state atomically.

</state_contract>

Failure Protocol

  • NEEDS_INPUT: a mandatory contract field is absent; do not start.
  • BLOCKED_PERMISSION: the next action crosses authority; checkpoint and request approval.
  • VERIFY_FAILED: result or guardrail fails; rollback/regroup before another attempt.
  • NO_PROGRESS: the same signature repeats or the metric is unchanged after a changed attempt.
  • BUDGET_STOP: any iteration, time, tool, cost, or review cap fires. max_attempts is always finite.

Output Contract

Return status, result (metric/end-state decision), evidence (validator and iteration receipts), unknowns, and next_action (stop, retry, approval, recovery, or handoff).

Edge Cases

  • A scheduled job fired but produced no run receipt: status is triggered, not completed; inspect executor state.
  • The model ends because its context or token budget is exhausted: checkpoint and return BUDGET_STOP or resume from state; do not label truncation success.
  • A queue poll returns zero items: accept NO_OP only after the declared query and side-effect check pass.
  • The metric improves while a safety guardrail regresses: rollback and return VERIFY_FAILED; never optimize the headline metric alone.

Success Metrics

  • The strict validator passes before execution.
  • Every iteration changes evidence, state, or diagnosis within finite budgets.
  • A fresh verifier supports the final status and residual risk.

Quality Gates

  • Trigger, owner, topology, budgets, stop, recovery, and write-back are explicit.
  • Builder opinion is not the only verifier.
  • Termination classes and any legal no-op have host-owned routing and evidence.
  • State replay recovers the next decision losslessly.
  • External mutation requires approval and rollback.

</skill_contract>

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Use when work has genuinely independent streams or distinct builder, evaluator, domain, and integration roles that require bounded multi-agent command scaled from 5 to 100+ agents.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Mark393295827/third-brain-v7-skills1412026년 9월 19일 업데이트

Use when designing or refactoring a model-native engineering workflow with bounded autonomy, probes, custom evaluation, durable state, and verified write-back.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Mark393295827/third-brain-v7-skills1412026년 9월 19일 업데이트

Use when property-service operations need an AI plus ontology plus DMAIC design for work orders, dispatch, quotes, evidence, CTQ metrics, and control dashboards.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Mark393295827/third-brain-v7-skills1412026년 9월 19일 업데이트

Use when a personal or team operating system needs a bounded redesign using Four-C, closed-loop controls, 70/30 allocation, 3B creativity, experiments, and prediction-error learning.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Mark393295827/third-brain-v7-skills1412026년 9월 19일 업데이트

Use when a goal must be converted into a repeatable behavior, cue, SOP, review cadence, and identity-aligned reinforcement.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Mark393295827/third-brain-v7-skills1412026년 9월 19일 업데이트

Use when source material must be transformed into a compact, evidence-aware model for learning, decisions, or an Obsidian concept note.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Mark393295827/third-brain-v7-skills1412026년 9월 19일 업데이트

Mark393295827의 스킬 모두 보기

이 스킬의 문제 신고