{"data":{"slug":"discovered-434fec4723e8c8eec8a836b71177daba23042f7342478b48","title":"Devxkit Agent Flow","summary":"Carry out a Director-scoped task with one worker in a managed worktree, validate it, and hand back exact evidence for CI and publication decisions. Works for Codex, Claude, OpenCode, Cursor CLI (explicitly assigned), and any explicitly selected agent backend.","url":"https:\/\/skillshunter.net\/skills\/discovered-434fec4723e8c8eec8a836b71177daba23042f7342478b48","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/discovered-434fec4723e8c8eec8a836b71177daba23042f7342478b48","markdown_url":"https:\/\/skillshunter.net\/skills\/discovered-434fec4723e8c8eec8a836b71177daba23042f7342478b48.md","download_url":"https:\/\/skillshunter.net\/skills\/discovered-434fec4723e8c8eec8a836b71177daba23042f7342478b48\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Before editing, check worktree\/branch identity against the Director's assignment. Do not start a second worker, fall back to a paid\/model-specific backend, or launch the Cursor GUI or IDE autonomously. If the assigned worker is unavailable, pause and reconcile with the Director.","instructions":"---\nname: devxkit-agent-flow\ndescription: Carry out a Director-scoped task with one worker in a managed worktree, validate it, and hand back exact evidence for CI and publication decisions. Works for Codex, Claude, OpenCode, Cursor CLI (explicitly assigned), and any explicitly selected agent backend.\n---\n\n# devxkit agent flow\n\n## When to use\n\nUse for Director \u2192 worker \u2192 managed-worktree implementation and handoff across\nrepositories. Read the consumer repository's `AGENTS.md`, project skills and\nvalidation contract first; this recipe does not replace their authority rules.\nChatGPT is the Director, with Desktop Commander or authorized CLI access.\nDIL is frozen historical compatibility: no issue-backed slice, callback,\nDelivery Pack or Herdr bridge is required for ordinary direct work.\n\nThis skill is agent-agnostic: Codex, Claude, OpenCode, and Cursor CLI (explicitly assigned)\nare all valid workers when explicitly assigned. Do not switch agents or start a\nfallback worker without Director authorization.\n\n## Agent selection and relevo\n\nThe Director assigns exactly one authoritative worker for the task. Accept the\nassignment as-is; do not:\n\n- Start a second worker \"just in case\".\n- Fall back to a paid\/model-specific backend to bypass quota or errors.\n- Launch the Cursor GUI or IDE autonomously.\n- Infer account, shared-wallet, or model-specific limits from process status.\n\nIf the assigned worker is unavailable, misidentified, or hits a hard stop, pause\nand reconcile with the Director. `RUNNING` in a process table only means a\nprocess exists; it does not mean the worker is busy, idle, or safe to interrupt.\n\n## Read-only preflight\n\nIn the assigned worktree, record:\n\n```bash\npwd\ngit rev-parse --show-toplevel\ngit rev-parse --git-common-dir\ngit branch --show-current\ngit rev-parse HEAD\ngit status --short\ngit worktree list --porcelain\ndevxkit agent preflight --local-only --json\n```\n\nA blank branch means detached HEAD; report it explicitly. Work in the exact\nmanaged worktree assigned by the Director. If none exists, use the native\nworktree mechanism of the assigned agent; do not switch the human checkout to\nmake room. Do not pull, stash, reset or clean another worktree. Preserve\npre-existing changes and record the starting diff. `preflight` describes\nidentity; it does not reserve a workspace, grant mutation rights or prove\nanother writer is absent.\n\n## Implementation and Git writers\n\nConfirm one authoritative writer for the task from the Director's assignment.\nBefore editing, check worktree\/branch identity against that assignment. Separate\nworktrees isolate files and indexes but still share refs and repository metadata.\nBefore any authorized branch, commit, push or other Git mutation, recheck HEAD,\nbranch, status and worktree reservations. If another writer or unexpected changes\nappear, stop the conflicting action and reconcile with the Director. Do not\nremove Git lock files, force an update or start a competing worker to recover.\nRead-only inspection can continue where it does not race the affected operation.\n\nMake the smallest change that meets acceptance, with deterministic regression\nchecks where appropriate. Use repo-native commands and existing tools. Do not\nlaunch Cursor (CLI or IDE) by default. Do not start Herdr, FirstMate, Treehouse,\na bridge, watcher or another agent as an implicit dependency. An explicitly\nselected orchestration workflow uses its own instructions; this skill neither\nstarts it nor promises automatic fallback or remote delivery.\n\n## Tool events, process status, and completion evidence\n\nWhen an agent backend emits JSON tool events (e.g., OpenCode), read only the\nstructured metadata needed for the handoff: tool name, invocation count,\ncompletion\/exit status, and duration if provided. Do not include raw tool\npayloads, credentials, prompt text, or model outputs in the handoff.\n\nProcess status is evidence, not a verdict:\n\n- `RUNNING` \u2260 busy or safe to interrupt.\n- `EXITED`\/`COMPLETED` \u2260 successful validation unless you also have the exit\ncode and test evidence.\n- Unknown status \u2260 failure; record it as unverified.\n\nCapture completion evidence: final exit code, last HEAD, changed paths, and the\nactual test\/lint\/type output.\n\n## Quota and cost boundaries\n\nDo not infer shared-wallet or model-specific quota from process presence, token\nlogs, or error messages. Quota unknown is honest. If a backend reports a quota\nor rate-limit error, record the exact code\/message and stop; do not auto-switch\nto another backend or model tier. Relevo to another worker is a Director\ndecision, not an autonomous recovery.\n\n## Test gates and handoff\n\nRun focused checks, then the repository's required full lint\/type\/test gates.\nRecord actual commands, exit codes, skips and unavailable dependencies. A missing\ntool or external service is unverified evidence, never a pass. Do not install or\nreconfigure global runtime to make a check green without task authorization.\n\nFor an explicitly prepared DevXKit slice, fill its `pr-body.md` and use\n`devxkit agent validate <issue>` as the canonical configured gate; do not first run\nthe same full commands manually. That command may write closure artifacts when\nGit metadata is unavailable. Direct tasks use native test commands and do not\ncreate slice\/closure state or start a bridge merely to validate.\n\nReturn exact worktree, branch\/detached HEAD, starting and current HEAD, changed\npaths, test evidence, limitations and suggested CI\/publication gates. A dirty\ntree's diff is part of its identity: HEAD alone does not identify tested edits.\nRespect the assignment's stop point. If instructed to leave a diff, stop there;\ndo not commit, push or create a PR as a side effect of this recipe.\n\n## Later Director gates\n\nThese are checkpoints for the authorized owner, not permission to publish:\n\n- PR: inspect the final diff and exact tested revision; use the repository's\n  ordinary PR workflow when authorized (draft is optional). Send Markdown through a body\n  file or structured API. For prepared slices, existing `devxkit agent ops pr-create`\n  and `delivery-publish` enforce their own identity\/Delivery Pack contracts.\n- CI and merge: bind remote checks and required contexts to the exact PR HEAD\n  and base. Recheck after changes or rebases. Missing, pending or skipped required\n  checks do not prove readiness. For prepared slices,\n  `devxkit agent ops pr-report <issue> --json` supplies the existing scorecard;\n  `--local-only` cannot prove remote CI. The Director integrates automatically after the exact-head CI is green when\n  that integration is within the user-authorized task.\n- Release: inspect the actual merged revision and repository release policy.\n  Where configured, `devxkit release plan --version X.Y.Z` is read-only. Publication\n  requires the applicable human authorization; see the packaged `devxkit-release`\n  skill for the existing release contract. Do not infer deployment readiness\n  from a successful merge or release.\n\n- Final gate: verify main sentinel, publish only the intended release when\n  applicable, close completed issues\/milestones, and remove only verified\n  integrated task worktrees\/branches. Stop at the agreed checkpoint.\n\n## Distribution\n\nThe versioned source is this DevXKit package. `devxkit skills install --dry-run`\npreviews installation; `devxkit skills install --target PATH` or\n`devxkit skills export PATH` copies the same skill tree and ownership manifest to\nan explicit catalog. Install only when requested. Updates preserve locally\nmodified\/unmanaged entries by reporting conflicts. Verify native discovery in\nthe actual installed harness: DevXKit's own `skills show` is not proof that an\nagent loaded an exported copy. Keep consumer domain rules and credentials out\nof this portable skill.\n","use_cases":["Implement a Director-scoped task using an assigned agent in a managed worktree","Validate task implementation and provide evidence for CI and publication decisions","Ensure compliance with repository-specific agent rules and validation contracts"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/jesuserro\/devxkit\/blob\/0380bd30488627f7232a08c38ebc0c7dd9a66dc3\/src\/devxkit\/assets\/skills\/devxkit\/devxkit-agent-flow\/SKILL.md","source_commit":"0380bd30488627f7232a08c38ebc0c7dd9a66dc3","license":null,"version":null,"listing_approved_at":"2026-11-29","created_at":"2026-11-28T18:48:42.000000Z","updated_at":"2026-11-29T10:53:27.000000Z","seo_title":"Devxkit Agent Flow - Execute Director-Scoped Tasks with Managed Workt","seo_description":"Execute Director-scoped tasks with one worker in a managed worktree, validate the implementation, and provide exact evidence for CI and publication decisions. SupportsCod","seo_keywords":["Devxkit Agent Flow","Director-scoped task","managed worktree","agent validation","CI evidence","Cursor CLI","OpenCode","Codex"]}}