Adonis0123/adonis-skills / skills/task-completion-loop
task-completion-loop
VerifiedFinish an existing named plan/spec or clearly bounded unfinished non-trivial coding task through the explicit task-completion-loop: work ledger, Goal, implementation proof, agentic review, architecture hardening, and a fresh Claude audit. Use only for the whole requested pipeline, not ordinary implementation, planning, or review.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 18.3 KB |
| agents/openai.yaml | config | 456 B |
| evals/check_wait_rule.py | script | 4.5 KB |
| evals/evals.json | config | 28.9 KB |
| evals/trigger-eval.json | config | 4.5 KB |
| references/decision-and-terminal-gates.md | markdown | 9.5 KB |
references/decision-and-terminal-gates.md
View on GitHub# Decision and Terminal Gates
Read this reference only when one condition is true:
- Preflight cannot classify a dependency as available from SKILL.md's one-line rule.
- Phase 1 finds an unresolved `HUMAN_DECISION` or the user explicitly requests `grill-with-docs`.
- Phase 2 finds an existing Goal or a caller parent contract.
- Phase 4 is about to start, resume, or interpret a non-happy-path dependency result.
## Preflight policy
Invocation policy follows `architecture-hardening-loop` § 硬依赖与 runtime 能力:
- Naming this Loop authorizes every always-required hard dependency (including `architecture-hardening-loop` and its declared scanner) to be invoked nested for its declared purpose. Do not ask the user to name each nested skill.
- `disable-model-invocation` / `allow_implicit_invocation: false` only forbids isolated automatic triggering. If the host exposes no entry point for that reason but the dependency files are readable, continue on the parent-session execution path of the dependent Loop; do not report it missing.
- Still missing for this round: not installed or unreadable, incompatible contract, or the actual worker/tool cannot execute.
- The conditional dependency `grill-with-docs` must be explicitly requested by the user or proven necessary by preflight, and the host must be able to load it (its default frontmatter is `disable-model-invocation: true`, so readability, not the flag, decides).
- Resolve everything before discussion; do not discover a missing dependency after implementation.
## Goal ownership
| Goal relationship | Behavior | Completion owner |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `none` | Follow Goal Gate's returned `Decision` / `Next`; adopt the transcript contract or create a native Goal only as directed | `not-created` for transcript adoption; `created-by-loop` only after successful native creation |
| `exact-same-goal` | `Decision: set-now`, `Next: continue active goal`; do not ask again, create, or replace | this Skill |
| `broader-compatible` | The parent objective, scope, and Done condition explicitly contain this Loop checkpoint; continue it | parent orchestrator; checkpoint only |
| `conflicting/unclear` | `Decision: defer`; return `HUMAN_GATE` | none |
Evidence for the relationship may come from a native getter, product state, or a caller-supplied checkable parent contract. Only `created-by-loop` / `exact-same-goal` are completed by this Skill; `broader-compatible` always reports `Goal: active-checkpoint` and leaves completion to the parent owner.
## Human decision convergence
Implementation authorization covers reversible, in-scope technical choices that preserve decided behavior and external-action boundaries. Examples include an existing helper versus equivalent inline code, test placement within the necessary-test scope, and an already accepted repository default. Resolve these from authoritative docs, current code, repository conventions, minimality, and verification quality. Agent disagreement alone does not create a user decision.
Keep `HUMAN_DECISION` for an unresolved choice that changes product behavior, a public contract, data ownership/truth, security posture, frozen scope, or an external/destructive action requiring new authorization. A user instruction such as “do not ask” or “decide for me” does not waive these boundaries.
For a real `HUMAN_DECISION`:
1. Load `grill-with-docs` and its delegated skills. Follow `grilling`'s design-tree frontier rounds: one round may contain every independent question whose prerequisites are satisfied, each with a recommendation.
2. Resolve the repository-approved domain-document locations before invocation. Add any glossary or ADR paths that `domain-modeling` may write to the frozen write boundary. If they cannot be included safely, return `HUMAN_GATE`.
3. Agent consensus cannot replace the user. Before confirmation, return `HUMAN_GATE`; do not create a Goal or modify source.
4. After each answer, derive the convergence record from the actual conversation and working-tree diff. Do not require a wrapper-specific schema.
```text
Human Decision Convergence
- Resolved decisions:
- Unresolved frontier:
- User confirmation: pending | confirmed
- Domain docs touched: <actual paths or none>
- Scope / exclusions changed: <details or none>
```
Proceed only when the frontier is empty, the user has confirmed, and every touched domain path is inside the approved write boundary.
## Agentic review terminal contract
Invoke `agentic-review-handoff` and preserve its packet lifecycle:
- `PASS` / `NO_FINDINGS`: verify the returned `baseSha + pathFilter + digest`, then recompute with `review-loop evidence`. Missing or mismatched identity requires a rerun.
- `BLOCKED`: fix and verify under the dependency protocol, then continue the same packet.
- Default `PASS_WITH_CONCERNS` returns `concerns_require_fix`: treat actionable in-scope concerns as ordinary work, fix and verify, append Fix Completion, and continue the same packet without asking the user.
- `PASS_WITH_CONCERNS` with `awaiting_user_decision` is legal only after the user explicitly selected review-only mode. Then return `HUMAN_GATE`; neither the outer nor a nested loop may accept concerns automatically.
- `run --continue` may later end in an archived `PASS`; this path needs no Decision Closure.
- `close --reason accept-concerns` may resume only after the user's Decision Closure is recorded, the packet is archived, and no open `Fix` remains. Preserve the original verdict; never rewrite it to `PASS`.
- Delivery, evidence-hash, deadlock, or required-capability failures stop under the dependency's native result. Do not invent a successful terminal state.
## Architecture hardening terminal contract
Run `architecture-hardening-loop` on the same frozen scope and exclusions. Accept only:
```text
Result: NO_ACTIONABLE_FINDINGS
```
When it finds a `Fix`:
- If the Fix is already inside the parent Goal's scope and Done condition, `goal-gate` uses `Decision: set-now` and `Next: continue active goal`. Complete it under the same Goal without asking, nesting a Goal, or letting the architecture loop complete its parent.
- If scope or ownership conflicts or is unclear, use `Decision: defer`, return `HUMAN_GATE`, and ask only about that conflict.
The completion report must include `Goal: active-checkpoint` and a recomputable evidence id. If the loop changed source or tests, all earlier evidence for the old digest expires. Reuse its internal agentic review only when that review covers the final evidence; otherwise rerun the direct review and affected verification.
If architecture invoked automated review, require final verdict, packet, lifecycle, and evidence identity. A zero-Fix path records review `not-run` plus its terminal consult. Default review concerns are repaired and re-reviewed automatically. A nested `awaiting_user_decision` is a user gate only when review-only mode was explicitly selected. After a valid user continue-to-PASS or accept-concerns Decision Closure, resume the original-scope rescan; do not gate forever on a historical verdict string.
## Fresh Claude audit
After verification plus the first two gates cover the current evidence, create a new Claude Code session. Never resume a discussion or earlier review session.
- Give it the original objective, frozen scope, exclusions, and evidence id, but not previous reviewer conclusions.
- Review tracked diff, related untracked files, and actual `file:line` evidence.
- Enforce a verifiable read-only boundary: repository reads and non-mutating checks only; no editing, Git control plane, deployment, or external writes.
- Require each finding to include impact, minimum fix, verification, and actual command.
The host independently classifies each finding:
| Class | Rule |
| --------- | ----------------------------------------------------------------------- |
| `Fix` | Real, in scope, worth its complexity, minimally fixable, and verifiable |
| `Backlog` | Real but low-value, out of scope, future-dependent, or unsafe to verify |
| `Reject` | Preference, theoretical expansion, duplicate abstraction, or stale |
Severity alone does not decide the class. A real P3 may be a `Fix`; an unsupported P1 may be `Reject`.
A `Fix` keeps the Goal active and expires old gates: add the nearest regression, implement the minimum repair, rerun verification, direct review, same-scope architecture hardening, and a new blind audit on the new evidence. One such cycle is one round. After two rounds, remaining in-scope Fixes return `UNVERIFIED`, keep the Goal active, and resume from the remaining evidence on the next Goal turn. Use `HUMAN_GATE` only for a real product, permission, range, safety, or external-side-effect decision that the agent cannot resolve from evidence.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |