SuperAPI AI Directory

ac-workflow

Agents & models

View repository

Updated 10-16 09:28

About this skill

  1. Inspect .agents/state/INDEX.md plus unfinished task summaries first; do not bind, select, or create any task state file yet.
  2. Resolve workflow context before calling $ac-memory:
  • identify task type (feat / fix / refactor / chore / docs)
  • determine whether this is a new task or continue
  • check whether the request is a pure copy-edit exempted by AGENTS; if yes, do not enter workflow state handling
  • treat active / blocked as resumable only when the user explicitly indicates continue
  • if unfinished task-state files exist but the user intent is a new task, create a new task instead of auto-resuming
  • if the user says continue, first try explicit task-id or exact TASK_TITLE
  • if exact resolution fails, build a small candidate set from stable substring / keyword matches against unfinished TASK_TITLE
  • if the candidate set has one clear match, surface it and let the user confirm before binding
  • if the candidate set has multiple matches, list the candidates and require user confirmation before binding
  1. Call $ac-memory only after the target task is resolved, so .agents/state/INDEX.md and the selected or newly created task state file are valid and ready for routing.
  2. Determine route using the AGENTS risk score:
  • single for low-risk work: run minimal ac-plan then ac-execute responsibilities in the same thread, do not edit files before the Contract is written and PLAN_FROZEN=true, and after execution perform summary closeout by writing CURRENT_ROLE: single and WORKFLOW_STATUS: completed
  • single + reviewer when review must be forced: complete the same collapsed planning/execution path, hand off to $ac-review, then reclaim control after a pass for final summary closeout
  • planner -> executor -> reviewer for multi-file, high-risk, or workflow-rule changes; reclaim control after $ac-review passes for final summary closeout
  • for low-risk work that is not AGENTS copy-edit exempt, prefer single unless workflow routing semantics, AGENTS core rules, review conclusions, or shared terminology across multiple workflow assets also change
  1. Echo a concise state line such as [STATE] <task-id> | <role> | <status> | 已检查/已更新 when helpful, then emit the standard workflow progress display and keep it aligned with the real phase in the active task state file. 5.5. When running a low-risk non-copy-edit task, the caller may echo a concise line such as 当前按轻量 workflow 执行(简版 Contract、聚合验证、按需 review); the workflow progress display may be shortened as long as the active task state remains accurate.

5.6. AGENTS lightweight workflow eligibility is decided by task shape and exclusions first; use the risk score to decide whether the route stays single, upgrades to single + reviewer, or exits lightweight handling for a fuller route. 6. For docs / skills / templates tasks, ensure the Contract uses consistency checks instead of default gradlew commands unless code or build files are touched. 7. On phase or status change, update the active task state file and .agents/state/INDEX.md before handoff. 8. On continue, long-running tasks, or context risk, trigger the forced wrap-up pattern:

  • pause work
  • set WORKFLOW_STATUS: blocked
  • refresh the active task state file and .agents/state/INDEX.md
  • echo the updated [STATE] line when helpful
  • output completed work, remaining work, and the next resume hint with both TASK_TITLE and task-id
  1. Summary closeout ownership:
  • $ac-workflow is the only owner of final 📝 总结
  • after $ac-review passes, echo the final [STATE] line when helpful and output the summary in the same thread
  • for reviewed routes, keep CURRENT_ROLE: reviewer and WORKFLOW_STATUS: completed; do not rewrite reviewed tasks to single

Outputs:

  • valid .agents/state/INDEX.md
  • valid selected or newly created active task state file
  • active route (single, single + reviewer, or planner -> executor -> reviewer)
  • current phase and WORKFLOW_STATUS aligned across user-facing output and state file

Hard rules:

  • Always resolve new task versus continue, plus the target TASK_TITLE / task-id, before calling $ac-memory in a way that binds or creates a task state file.
  • Candidate matching may narrow continue choices, but it never replaces explicit user confirmation when exact TASK_TITLE / task-id resolution failed.
  • Do not replace planner / executor / reviewer responsibilities; orchestrate them, and collapse them only when single is explicitly selected.
  • Do not create workflow state for AGENTS copy-edit-exempt requests.
  • Do not let $ac-memory auto-create or auto-select a task while continue intent is unresolved or ambiguous.
  • Do not leave a finished single task in CURRENT_ROLE: executor or WORKFLOW_STATUS: active.
  • Do not treat docs-only file changes as general chat once workflow assets are being edited.
  • Do not auto-resume from .agents/state/INDEX.md or .agents/state/tasks/*.md without explicit user intent to continue.
  • Do not auto-resume a WORKFLOW_STATUS: completed task as continue.
  • Do not leave passed reviewed routes without returning to $ac-workflow for final summary closeout.
  • Keep user-facing workflow progress and [STATE] echo aligned with actual state in the active task state file.