.agents/skills/monitor-ci/references/fix-flows.md
The script returns autoApplySkipReason in its output.
APPLY if user agreeslast_cipe_url, enter wait modeAPPLYlast_cipe_url, enter wait modeThe script returns verifiableTaskIds in its output.
pnpm-lock.yaml → pnpm nx, yarn.lock → yarn nx, otherwise npx nxgeneral subagents for each taskAPPLY, enter wait modeSpawn FETCH_HEAVY subagent, then analyze fix content (suggestedFixDescription, suggestedFixSummary, taskFailureSummaries):
ci-state-update.mjs gate --gate-type local-fix. If not allowed, print message and exit. Otherwise → Reject + Fix From Scratch FlowSpawn FETCH_HEAVY subagent for taskFailureSummaries. Run ci-state-update.mjs gate --gate-type local-fix — if not allowed, print message and exit. Otherwise attempt local fix (counter already incremented by gate). If successful → commit, push, enter wait mode. If not → exit with failure.
ci-state-update.mjs gate --gate-type env-rerun. If not allowed, print message and exit.RERUN_ENVIRONMENT_STATElast_cipe_url setSpawn FETCH_HEAVY subagent for selfHealingSkipMessage.
/cipes/{id})shortLink, then UPDATE_FIX with REJECTci-state-update.mjs gate --gate-type local-fix. If not allowed → skip to step 4. Otherwise use failedTaskIds and taskFailureSummaries for context.git commit --allow-empty -m "ci: rerun after rejecting throttled fixes"), enter wait mode--auto-fix-workflow: detect package manager, run install, commit lockfile if changed, enter wait modegit commit --allow-empty -m "chore: retry ci [monitor-ci]" + push, enter wait modecipe_no_tasks: exit with failureSpawn UPDATE_FIX subagent with APPLY. New CI Attempt spawns automatically. No local git ops.
nx-cloud apply-locally <shortLink> (sets state to APPLIED_LOCALLY)ci-state-update.mjs gate --gate-type local-fix. If not allowed, commit current state and push (let CI be final judge). Otherwise loop back to enhance.ci-state-update.mjs gate --gate-type local-fix. If not allowed, print message and exit.REJECTWhen any local fix path runs a task and it fails, assess whether the failure is a code issue or an environment/tooling issue before running the gate script.
Indicators of environment/tooling failures (non-exhaustive): command not found / binary missing, OOM / heap allocation failures, permission denied, network timeouts / DNS failures, missing system libraries, Docker/container issues, disk space exhaustion.
When detected → bail immediately without running gate (no budget consumed). Report that the failure is an environment/tooling issue, not a code bug.
Code failures (compilation errors, test assertion failures, lint violations, type errors) are genuine candidates for local fix attempts and proceed normally through the gate.
git add -A or git add . risks committing the user's unrelated work-in-progress or secretsgit commit -m "fix(<projects>): <brief description>
Failed tasks: <taskId1>, <taskId2>
Local verification: passed|enhanced|failed-pushing-to-ci"