[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6D9AYEN4YZGB0XJ4KXCAMSW":3,"skill-same:01M6D9AYEN4YZGB0XJ4KXCAMSW":58},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":27,"linkOnly":28,"markdownContent":29,"markdownBody":30,"frontMatter":31,"refName":34,"commitSha":35,"skillDirectory":36,"forksCount":37,"repositoryHtmlUrl":38,"repositoryHomepageUrl":39,"ownerHtmlUrl":40,"ownerBlogUrl":41,"ownerDescription":42,"updatedAt":43,"install":44,"resources":57},"01M6D9AYEN4YZGB0XJ4KXCAMSW","exec",null,"Plan the next incomplete step (or full phase with --phase flag) from the plan, then enter plan mode for user approval before executing","GeorgeQLe\u002Fagentic-skills","GeorgeQLe","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F21134126?v=4","01M6D2JP418S0VGJGF8M93EC3H","George Le","01M6D2JPBAKYD82TA5FS6HKQ3D",1,"MIT","https:\u002F\u002Fgithub.com\u002FGeorgeQLe\u002Fagentic-skills\u002Fblob\u002Fmaster\u002Fpacks\u002Fexec-loop\u002Fclaude\u002Fexec\u002Farchive\u002Fv0.5\u002FSKILL.md",[],[5,19,20,21,22,23,24,25,26],"execution","plan","user","orchestrator","v0","approval","next","full","2026-11-10 10:12:30",false,"---\nname: exec\ndescription: Plan the next incomplete step (or full phase with --phase flag) from the plan, then enter plan mode for user approval before executing\ntype: execution\nversion: v0.5\nargument-hint: \"[--phase]\"\ninvocation: orchestrator\n---\n\n# Exec\n\nIdentify the next incomplete unit of work from the phased plan, build an execution plan, and enter plan mode for user approval before implementing. By default, plans **only the next single incomplete step**. If `$ARGUMENTS` contains `--phase`, plans the **entire next phase**.\n\n## Process\n\n1. **Migration check:** If `tasks\u002Froadmap.md` does not exist but `tasks\u002Ftodo.md` contains multiple `## Phase` headers, migrate: copy `tasks\u002Ftodo.md` -> `tasks\u002Froadmap.md`, then trim `tasks\u002Ftodo.md` to just the current phase (first phase with unchecked steps). Stop after the migration and tell the user to run `\u002Fship` to package and push the task-doc split. Do **not** commit or push from `\u002Fexec`.\n2. **Read `tasks\u002Ftodo.md`** — this contains the current phase's steps. Reference `tasks\u002Froadmap.md` only if cross-phase context is needed.\n3. **Read CLAUDE.md** for project conventions.\n3b. If `tasks\u002Frecord-todo.md` or `tasks\u002Frecurring-todo.md` exists, count unchecked advisory items for status only. Do not select them as next work.\n4. **Find the next incomplete item:**\n   - Look for the next phase with an unchecked milestone.\n   - If `--phase` mode: scope the entire phase.\n   - Otherwise (default): find only the next unchecked `- [ ]` step within that phase.\n   - **If the phase has acceptance criteria but no implementation steps** (no `### Tests First` or `### Implementation` section): this phase needs just-in-time planning. **You MUST invoke `\u002Fplan-phase` for this phase** to generate implementation steps and file-level detail before proceeding. Do NOT tell the user the phase is \"deferred\" or that they need to run `\u002Fplan-phase` manually — this auto-invocation is the designed workflow. A phase without implementation steps is NOT deferred; it simply hasn't been decomposed yet. Only items under the `## Deferred \u002F Future Work` heading in the roadmap are actually deferred.\n5. **Check `tasks\u002Fmanual-todo.md`** (if it exists) for blocking manual tasks:\n   - Look for unchecked items with `_(blocks: Step N.X)_` annotations matching the step about to be executed.\n   - If a blocking external human-only manual task is found, stop and ask the user how to proceed: \"**Manual task blocking this step:** [task]. Complete it before proceeding, or run `\u002Fguide` (guided-walkthrough pack) for step-by-step instructions.\" Do NOT execute the step unless the manual task is completed or the user explicitly overrides the blocker.\n   - If the unchecked item is task-doc bookkeeping, reconciliation, or agent-executable work (repo edits, SDK wiring, local commands, tests, audits, generated assets, or authenticated CLI\u002FAPI work), do not route it to `\u002Fguide` (guided-walkthrough pack); route it to `\u002Freconcile-dev-docs fix tasks` (docs-health pack), promote it to `tasks\u002Ftodo.md`, or handle it as a direct dev-doc audit.\n6. **Research what's needed** — read only the files relevant to the step\u002Fphase to understand existing code, patterns, and dependencies.\n6a. **Prototype-first product gate** — for user-facing product, SaaS, marketplace, dashboard, internal tool, product-experience work, or substantial new feature work, check whether the selected step would introduce durable database\u002Fstorage, auth, payments, analytics, deployment, admin tooling, multi-tenancy, or production observability before clickable prototype experiments have calibrated one journey. If the current plan or user instruction does not explicitly authorize that infrastructure, stop and re-plan the step around a separate prototype\u002Fexperiment phase using fake, fixture, local, or in-memory data. When multiple workflows, layouts, densities, copy approaches, navigation models, or interaction patterns remain plausible, prefer multiple small experiment routes such as `\u002Fexperiments\u002F\u003Cvariant>` over one merged implementation. Record the deferred infrastructure and the evidence needed to promote it later.\n6b. **Read the execution profile** — read the current phase's `### Execution Profile` from `tasks\u002Ftodo.md` if present:\n   - If missing, treat the phase as `serial`.\n   - Use the profile only for the current step or scoped phase; do not plan ahead.\n   - If the profile's `Parallel mode` is `agent-team`:\n     - Parse all lanes. If any lane is missing `Mode:` or `Depends on:`, still contains placeholder text, write lanes have overlapping `Owns`, or write lanes are missing a concrete non-primary `Branch:`, **auto-invoke `\u002Fpatch-exec-profile`** for this phase (same pattern as step 4's auto-invocation of `\u002Fplan-phase`). Re-read `tasks\u002Ftodo.md` after it returns. Do not tell the user to run `\u002Fpatch-exec-profile` manually — this auto-invocation is the designed workflow.\n     - Build the lane DAG from each lane's `Depends on:` field. Compute topological waves. Include the DAG and wave structure in the plan-mode presentation at step 8.\n     - Confirm the plan includes a consolidation\u002FPR review step after all write lanes and before final validation or shipping. If not, stop and patch the phase plan before dispatch.\n7. **Enter plan mode** using the EnterPlanMode tool.\n8. **Present the execution plan** to the user:\n   - What the step\u002Fphase requires\n   - Which files will be created or modified\n   - The approach (e.g., what tests to write, what code to change)\n   - Whether the execution profile will run serially, use read-only research lanes, use review lanes, or use disjoint write lanes\n   - For `agent-team`: the planned lane branches and the consolidation\u002FPR review gate\n   - Any decisions or trade-offs the user should weigh in on\n9. **Wait for user approval.** Do NOT write any code until the user approves.\n10. **After approval, execute the approved plan.** If Claude Code already returned to normal mode after approval, do not call ExitPlanMode again; continue directly with implementation. Only use the plan-mode exit tool when the session is still visibly in plan mode.\n\n### Execution Profile Handling\n\nAfter approval, apply the current phase's `### Execution Profile`:\n\n- `serial`: execute normally.\n- `research-only`: launch read-only subagent lanes first when the active environment permits subagents, synthesize their findings, then implement in the main agent.\n- `review-only`: implement in the main agent, then launch review subagent lanes before final validation.\n- `implementation-safe`: launch write subagent lanes only when every write lane has disjoint `Owns` paths and explicit `Must not edit` boundaries; otherwise downgrade to `research-only` or `serial` and report the downgrade.\n- `agent-team`: auto-dispatch lanes via `Agent` tool calls with `isolation: \"worktree\"` (see **Agent-Team Dispatch** below). Each write lane must run on its declared separate GitHub branch and return branch, commit SHA, validation evidence, and PR URL. This is the current policy — **do not stop** merely because the profile says `agent-team` or because the phase\u002Fstep body contains legacy advisory text like *\"do not implement in a single `\u002Fexec`\"*, *\"requires isolated worktrees or a dedicated agent team\"*, or *\"use `\u002Fdelegate` (agent-bridge pack) instead\"*. That guidance predates agent-team dispatch and is now stale. Trust the `### Execution Profile` metadata (after `\u002Fpatch-exec-profile` fills it) and proceed. Only stop if `\u002Fpatch-exec-profile` returns with unresolvable ambiguity (overlapping `Owns`, cyclic `Depends on`, missing lane specs that cannot be inferred, or missing branch\u002FPR review requirements).\n\nThe main agent owns integration, conflict resolution, task doc updates, history updates, shipping handoff, and deploy handoff. If a subagent touches files outside its owned paths or returns conflicting changes, stop and reconcile before validation.\n\n#### Agent-Team Dispatch\n\nWhen the profile is `agent-team`:\n\n- Execute lane waves in topological order (computed from `Depends on:` in step 6b).\n- For each wave of **write** lanes: dispatch one `Agent` call per lane, in a single message (parallel execution), with:\n  - `isolation: \"worktree\"`\n  - The lane's declared `Branch:` value, created from the current primary branch (`main` when present, otherwise `master`) and never named `main` or `master`\n  - `subagent_type: \"general-purpose\"` unless the lane spec names another agent\n  - Prompt scoped to the lane's `Scope`, `Owns`, `Must not edit`, and `Deliverable`\n  - Explicit instruction in the prompt: \"Work only on your assigned branch. Before returning, commit all your changes, push the branch to GitHub, open or update a draft PR, and include the branch name, final commit SHA, validation evidence, and PR URL.\"\n- If the repository has no GitHub remote, branch push is unavailable, or PR creation\u002Freview cannot be performed, stop before dispatch and report the blocker instead of downgrading silently.\n- When each lane returns:\n  1. **Verify branch evidence:** confirm the returned branch matches the lane's `Branch:`, the commit exists on that branch, and a PR URL was returned. If not, stop.\n  2. **Validate write boundaries:** fetch the lane branch, then run `git diff --name-only \u003Cprimary>...origin\u002F\u003Clane-branch>` (or the reviewed remote branch ref). Every changed path must be a subset of the lane's declared `Owns`. If any file falls outside (including matches against `Must not edit`), abort integration for that lane and surface the violation. Do not attempt partial integration.\n  3. **Consolidation\u002FPR review:** inspect the PR diff, test evidence, and lane summary. Record findings as `blocker` or `advisory` with file path and line references. Do not integrate a branch with blocker findings.\n  4. **Integrate approved branch work into the shared tree:** `git restore --source=origin\u002F\u003Clane-branch> --staged --worktree -- \u003Cowns-path-1> \u003Cowns-path-2> …`. This captures modifications, additions, and deletions. Do not use `git checkout \u003Cbranch> -- \u003Cpaths>` — it silently drops deletions. Do not create a merge commit; the result is a dirty working tree for `\u002Fship`.\n  5. **Clean up local worktrees only after integration:** `git worktree remove \u003Cworktree-path>` then delete the local lane branch when safe. Leave the remote branch\u002FPR available until consolidation status is documented or the project explicitly closes\u002Fmerges it.\n- After all write waves integrate, dispatch any additional **review** lanes as non-worktree `Agent` calls (no `isolation`) against the integrated dirty tree. Their deliverable contract: return findings as a list, each classified `blocker` or `advisory`, with file path and line references.\n- Write a `### Review Findings` block under the step in `tasks\u002Ftodo.md`:\n  - If any finding is `blocker`: leave the step unchecked, stop `\u002Fexec`, and surface the findings in the final report.\n  - Else: record the findings, check off the step, and continue normal `\u002Fexec` flow.\n- Exec the phase's test strategy against the integrated state before checking off the step.\n\n### Single Step Mode (default)\n\n- If the step creates, deletes, renames, or changes behavior\u002Fmetadata in any tracked `SKILL.md` or `PACK.md`, refresh the Skills Showcase before handing off to `\u002Fship`: run `node apps\u002Fskills-showcase\u002Fscripts\u002Fgenerate-skills-showcase-data.mjs`, `node apps\u002Fskills-showcase\u002Fscripts\u002Fgenerate-skills-showcase-github-data.mjs`, and `apps\u002Fskills-showcase\u002Fscripts\u002Fvalidate-skills-showcase-data.sh`; include changed generated assets in the dirty tree. Review curated showcase copy, catalog grouping, workflow animation text, and proof receipts; update affected site files or record why no curated website copy changed.\n- If it's a \"Tests First\" step: write the failing tests, run them to confirm they fail (red). Stop.\n- If it's an implementation step: implement it, run existing tests to check for regressions. Stop.\n- If it's a \"Green\" step: run all tests. For `tests-after` phases, also write regression tests covering acceptance criteria. Fix any failures. If validation is clean and a following cleanup\u002Frefactor step is explicitly conditional on validation findings or says no source changes are expected, complete that no-op cleanup in the same execution by recording the no-op result instead of leaving it for a separate plan-mode handoff. Stop.\n- **Mark the step as done** in `tasks\u002Ftodo.md` (check it off).\n\n### Full Phase Mode (`--phase`)\n\n- Execute the entire phase, step by step:\n  - Start with the \"Tests First\" steps — write the failing tests.\n  - Exec the tests to confirm they fail (red).\n  - Implement each step in order.\n  - Run tests after implementation to confirm they pass (green).\n  - Refactor only when validation exposes concrete drift or cleanup work; do not create or preserve separate no-op refactor steps after a clean validation gate.\n- **Verify the milestone**:\n  - Check each acceptance criterion.\n  - Exec the full test suite to confirm no regressions.\n  - Check off completed criteria in `tasks\u002Ftodo.md`.\n\n## After Execution (both modes)\n\n**Report concisely:**\n- Phase\u002Fstep completed\n- Files modified\n- Test results (if tests were run) — **explicitly state whether any failures are expected (red phase: tests written before implementation) or unexpected (regressions\u002Fbugs that need fixing)**\n- Manual tasks — if `tasks\u002Fmanual-todo.md` exists, report count of pending manual tasks for this phase\n- Advisory tasks — pending record\u002Frecurring counts from `tasks\u002Frecord-todo.md` and `tasks\u002Frecurring-todo.md` if they exist\n- **Next work:** the next concrete shipping, validation, blocker, or follow-up task\n- **Recommended next command:** one command or route for that work\n\n## Next-Step Routing\n\nBefore handing back, identify the next concrete work item from project state, then recommend the executor and invocation.\n\nOutput exactly two lines beyond the normal report:\n\n- **Next work:** \u003Cspecific shipping, validation, blocker, or follow-up task>\n- **Recommended next command:** \u003Cone command or route>\n\nRules:\n\n- Make the next work item primary. Derive it from `tasks\u002Ftodo.md`, validation results, manual blockers, deploy\u002Fsmoke-test gaps, or the absence of remaining work. Do not use agent mode itself as the next work item.\n- Use `.\u002Fscripts\u002Fagent-mode.sh` only to choose command text. If it is missing, unset, or non-zero, infer routing from the current invocation and task type instead of asking the user to select a mode by default.\n- Normalize copied task routes to Claude syntax before final output. If `tasks\u002Ftodo.md`, `tasks\u002Froadmap.md`, benchmark reports, or prior handoffs contain Codex dollar commands for base skills (for example `$exec`, `$ship`, `$roadmap`, `$guide`, `$reconcile-dev-docs`), treat them as task identifiers, not final command text. Convert the final `Recommended next command` to the equivalent Claude `\u002F...` route unless the next action is explicitly a Codex handoff such as `\u002Fdelegate $ship`.\n- Inference defaults:\n  - Hybrid execution handoff after Claude `\u002Fexec` → recommend `\u002Fdelegate` (agent-bridge pack) `$ship`.\n  - Claude-only or manual\u002Forchestration-heavy work → recommend `\u002Fship` or `\u002Fguide` (guided-walkthrough pack).\n  - Codex-only execution → recommend `$ship`.\n- Do **not** recommend `\u002Fdelegate` (agent-bridge pack) as a workaround for an `agent-team` profile. `\u002Fexec` now auto-dispatches agent-team lanes itself via isolated worktrees; `\u002Fdelegate` (agent-bridge pack) is for Claude↔Codex handoff, not for lane parallelism.\n- Only present multiple commands when the ambiguity materially changes execution safety or there are equally valid next work items. Otherwise choose the best route and mention degraded mode lookup inline.\n\n## What NOT to do\n\n- Do NOT write code before entering plan mode and getting user approval.\n- Do NOT call ExitPlanMode from normal mode. If Claude Code reports \"You are not in plan mode\" after approval, treat approval as complete and continue implementation.\n- Do NOT execute more than one step (or more than one phase in `--phase` mode).\n- Do NOT read unnecessary files — only what's needed for the current work.\n- Do NOT plan ahead or analyze future phases\u002Fsteps.\n- Do NOT refactor unrelated code.\n- Do NOT update CLAUDE.md.\n- Do NOT commit or push. `\u002Fexec` is the Claude execution step; `\u002Fship` owns packaging, task-history updates, commits, pushes, deploys, and next-step planning.\n- Do NOT execute external human-action items from `tasks\u002Fmanual-todo.md`. Bookkeeping or agent-executable items that were misfiled there should be reconciled through `\u002Freconcile-dev-docs` (docs-health pack) or promoted into `tasks\u002Ftodo.md`, not routed to `\u002Fguide` (guided-walkthrough pack).\n- Do NOT execute items from `tasks\u002Frecord-todo.md` or `tasks\u002Frecurring-todo.md` unless the item has first been promoted into `tasks\u002Ftodo.md`.\n\n## Flow\n\n```\n\u002Fexec                  → plans one step, enters plan mode, executes after approval\n\u002Fexec --phase          → plans the next full phase, enters plan mode, executes after approval\n\u002Fship                 → commits, pushes, plans next, enters plan mode\n                      → select \"clear context and implement\"\n                      → fresh context reads tasks\u002Ftodo.md and implements\n```\n\n\n## Constraints\n- When recommending a skill from another pack, verify the pack is installed via `.agents\u002Fproject.json` `enabled_packs`. If not installed, include `npx skillpacks install \u003Cpack-name>` from the project shell as the prerequisite.\n- **One step (or one phase). That's it.** Then stop and let the user decide what's next.\n- **Always enter plan mode before executing.** The user must approve the approach first.\n- Keep context footprint minimal — don't read the entire codebase, only files relevant to this work.\n- If the work can't be completed due to a blocker, document the blocker in `tasks\u002Ftodo.md` and stop.\n- Follow the test strategy annotated on each phase (`tdd`, `tests-after`, or `none`). Do not skip test steps for `tdd` phases.\n- Follow the `### Execution Profile` annotated on each phase. If subagents are unavailable in the active environment, execute serially and report the downgrade.\n- Do not let subagents update `tasks\u002Ftodo.md`, `tasks\u002Froadmap.md`, `tasks\u002Fhistory.md`, shipping commits, or deploy steps. Those remain main-agent responsibilities.\n- Do not run parallel write lanes unless their `Owns` paths are disjoint. When in doubt, downgrade to `research-only` or `serial`.\n- Do not invoke `\u002Fcommit-and-push-by-feature` or push shipping commits from the main `\u002Fexec` tree. A dirty tracked tree after successful `\u002Fexec` is expected and is the handoff to `\u002Fship`. The narrow exception is `agent-team` lane work: lane agents must commit and push their assigned non-primary GitHub branches for PR review.\n- For `agent-team` phases: do not integrate a lane whose diff contains files outside its declared `Owns` — surface the violation and stop instead. Lane agent prompts must require branch-backed commit, push, and PR evidence before return; do not integrate from an uncommitted worktree, unpushed branch, or unreviewed PR. Clean up local worktrees after every integration, but preserve remote branches\u002FPRs until consolidation status is documented.\n- Each execution must be self-contained — read the plan fresh, don't rely on prior context.\n\n## Execution Handoff Contract\n\n- `\u002Fexec` deliberately leaves completed tracked changes uncommitted so `\u002Fship` can validate, update `tasks\u002Fhistory.md`, commit, push, deploy, plan the next step, and enter plan mode in one coherent shipping pass.\n- If the user explicitly asks `\u002Fexec` to commit or push, stop and redirect them to `\u002Fship` or `\u002Fcommit-and-push-by-feature`; do not reinterpret `\u002Fexec` as a shipping command.\n- Report the exact next command as `\u002Fship` unless a blocker prevents shipping.\n","# Exec\n\nIdentify the next incomplete unit of work from the phased plan, build an execution plan, and enter plan mode for user approval before implementing. By default, plans **only the next single incomplete step**. If `$ARGUMENTS` contains `--phase`, plans the **entire next phase**.\n\n## Process\n\n1. **Migration check:** If `tasks\u002Froadmap.md` does not exist but `tasks\u002Ftodo.md` contains multiple `## Phase` headers, migrate: copy `tasks\u002Ftodo.md` -> `tasks\u002Froadmap.md`, then trim `tasks\u002Ftodo.md` to just the current phase (first phase with unchecked steps). Stop after the migration and tell the user to run `\u002Fship` to package and push the task-doc split. Do **not** commit or push from `\u002Fexec`.\n2. **Read `tasks\u002Ftodo.md`** — this contains the current phase's steps. Reference `tasks\u002Froadmap.md` only if cross-phase context is needed.\n3. **Read CLAUDE.md** for project conventions.\n3b. If `tasks\u002Frecord-todo.md` or `tasks\u002Frecurring-todo.md` exists, count unchecked advisory items for status only. Do not select them as next work.\n4. **Find the next incomplete item:**\n   - Look for the next phase with an unchecked milestone.\n   - If `--phase` mode: scope the entire phase.\n   - Otherwise (default): find only the next unchecked `- [ ]` step within that phase.\n   - **If the phase has acceptance criteria but no implementation steps** (no `### Tests First` or `### Implementation` section): this phase needs just-in-time planning. **You MUST invoke `\u002Fplan-phase` for this phase** to generate implementation steps and file-level detail before proceeding. Do NOT tell the user the phase is \"deferred\" or that they need to run `\u002Fplan-phase` manually — this auto-invocation is the designed workflow. A phase without implementation steps is NOT deferred; it simply hasn't been decomposed yet. Only items under the `## Deferred \u002F Future Work` heading in the roadmap are actually deferred.\n5. **Check `tasks\u002Fmanual-todo.md`** (if it exists) for blocking manual tasks:\n   - Look for unchecked items with `_(blocks: Step N.X)_` annotations matching the step about to be executed.\n   - If a blocking external human-only manual task is found, stop and ask the user how to proceed: \"**Manual task blocking this step:** [task]. Complete it before proceeding, or run `\u002Fguide` (guided-walkthrough pack) for step-by-step instructions.\" Do NOT execute the step unless the manual task is completed or the user explicitly overrides the blocker.\n   - If the unchecked item is task-doc bookkeeping, reconciliation, or agent-executable work (repo edits, SDK wiring, local commands, tests, audits, generated assets, or authenticated CLI\u002FAPI work), do not route it to `\u002Fguide` (guided-walkthrough pack); route it to `\u002Freconcile-dev-docs fix tasks` (docs-health pack), promote it to `tasks\u002Ftodo.md`, or handle it as a direct dev-doc audit.\n6. **Research what's needed** — read only the files relevant to the step\u002Fphase to understand existing code, patterns, and dependencies.\n6a. **Prototype-first product gate** — for user-facing product, SaaS, marketplace, dashboard, internal tool, product-experience work, or substantial new feature work, check whether the selected step would introduce durable database\u002Fstorage, auth, payments, analytics, deployment, admin tooling, multi-tenancy, or production observability before clickable prototype experiments have calibrated one journey. If the current plan or user instruction does not explicitly authorize that infrastructure, stop and re-plan the step around a separate prototype\u002Fexperiment phase using fake, fixture, local, or in-memory data. When multiple workflows, layouts, densities, copy approaches, navigation models, or interaction patterns remain plausible, prefer multiple small experiment routes such as `\u002Fexperiments\u002F\u003Cvariant>` over one merged implementation. Record the deferred infrastructure and the evidence needed to promote it later.\n6b. **Read the execution profile** — read the current phase's `### Execution Profile` from `tasks\u002Ftodo.md` if present:\n   - If missing, treat the phase as `serial`.\n   - Use the profile only for the current step or scoped phase; do not plan ahead.\n   - If the profile's `Parallel mode` is `agent-team`:\n     - Parse all lanes. If any lane is missing `Mode:` or `Depends on:`, still contains placeholder text, write lanes have overlapping `Owns`, or write lanes are missing a concrete non-primary `Branch:`, **auto-invoke `\u002Fpatch-exec-profile`** for this phase (same pattern as step 4's auto-invocation of `\u002Fplan-phase`). Re-read `tasks\u002Ftodo.md` after it returns. Do not tell the user to run `\u002Fpatch-exec-profile` manually — this auto-invocation is the designed workflow.\n     - Build the lane DAG from each lane's `Depends on:` field. Compute topological waves. Include the DAG and wave structure in the plan-mode presentation at step 8.\n     - Confirm the plan includes a consolidation\u002FPR review step after all write lanes and before final validation or shipping. If not, stop and patch the phase plan before dispatch.\n7. **Enter plan mode** using the EnterPlanMode tool.\n8. **Present the execution plan** to the user:\n   - What the step\u002Fphase requires\n   - Which files will be created or modified\n   - The approach (e.g., what tests to write, what code to change)\n   - Whether the execution profile will run serially, use read-only research lanes, use review lanes, or use disjoint write lanes\n   - For `agent-team`: the planned lane branches and the consolidation\u002FPR review gate\n   - Any decisions or trade-offs the user should weigh in on\n9. **Wait for user approval.** Do NOT write any code until the user approves.\n10. **After approval, execute the approved plan.** If Claude Code already returned to normal mode after approval, do not call ExitPlanMode again; continue directly with implementation. Only use the plan-mode exit tool when the session is still visibly in plan mode.\n\n### Execution Profile Handling\n\nAfter approval, apply the current phase's `### Execution Profile`:\n\n- `serial`: execute normally.\n- `research-only`: launch read-only subagent lanes first when the active environment permits subagents, synthesize their findings, then implement in the main agent.\n- `review-only`: implement in the main agent, then launch review subagent lanes before final validation.\n- `implementation-safe`: launch write subagent lanes only when every write lane has disjoint `Owns` paths and explicit `Must not edit` boundaries; otherwise downgrade to `research-only` or `serial` and report the downgrade.\n- `agent-team`: auto-dispatch lanes via `Agent` tool calls with `isolation: \"worktree\"` (see **Agent-Team Dispatch** below). Each write lane must run on its declared separate GitHub branch and return branch, commit SHA, validation evidence, and PR URL. This is the current policy — **do not stop** merely because the profile says `agent-team` or because the phase\u002Fstep body contains legacy advisory text like *\"do not implement in a single `\u002Fexec`\"*, *\"requires isolated worktrees or a dedicated agent team\"*, or *\"use `\u002Fdelegate` (agent-bridge pack) instead\"*. That guidance predates agent-team dispatch and is now stale. Trust the `### Execution Profile` metadata (after `\u002Fpatch-exec-profile` fills it) and proceed. Only stop if `\u002Fpatch-exec-profile` returns with unresolvable ambiguity (overlapping `Owns`, cyclic `Depends on`, missing lane specs that cannot be inferred, or missing branch\u002FPR review requirements).\n\nThe main agent owns integration, conflict resolution, task doc updates, history updates, shipping handoff, and deploy handoff. If a subagent touches files outside its owned paths or returns conflicting changes, stop and reconcile before validation.\n\n#### Agent-Team Dispatch\n\nWhen the profile is `agent-team`:\n\n- Execute lane waves in topological order (computed from `Depends on:` in step 6b).\n- For each wave of **write** lanes: dispatch one `Agent` call per lane, in a single message (parallel execution), with:\n  - `isolation: \"worktree\"`\n  - The lane's declared `Branch:` value, created from the current primary branch (`main` when present, otherwise `master`) and never named `main` or `master`\n  - `subagent_type: \"general-purpose\"` unless the lane spec names another agent\n  - Prompt scoped to the lane's `Scope`, `Owns`, `Must not edit`, and `Deliverable`\n  - Explicit instruction in the prompt: \"Work only on your assigned branch. Before returning, commit all your changes, push the branch to GitHub, open or update a draft PR, and include the branch name, final commit SHA, validation evidence, and PR URL.\"\n- If the repository has no GitHub remote, branch push is unavailable, or PR creation\u002Freview cannot be performed, stop before dispatch and report the blocker instead of downgrading silently.\n- When each lane returns:\n  1. **Verify branch evidence:** confirm the returned branch matches the lane's `Branch:`, the commit exists on that branch, and a PR URL was returned. If not, stop.\n  2. **Validate write boundaries:** fetch the lane branch, then run `git diff --name-only \u003Cprimary>...origin\u002F\u003Clane-branch>` (or the reviewed remote branch ref). Every changed path must be a subset of the lane's declared `Owns`. If any file falls outside (including matches against `Must not edit`), abort integration for that lane and surface the violation. Do not attempt partial integration.\n  3. **Consolidation\u002FPR review:** inspect the PR diff, test evidence, and lane summary. Record findings as `blocker` or `advisory` with file path and line references. Do not integrate a branch with blocker findings.\n  4. **Integrate approved branch work into the shared tree:** `git restore --source=origin\u002F\u003Clane-branch> --staged --worktree -- \u003Cowns-path-1> \u003Cowns-path-2> …`. This captures modifications, additions, and deletions. Do not use `git checkout \u003Cbranch> -- \u003Cpaths>` — it silently drops deletions. Do not create a merge commit; the result is a dirty working tree for `\u002Fship`.\n  5. **Clean up local worktrees only after integration:** `git worktree remove \u003Cworktree-path>` then delete the local lane branch when safe. Leave the remote branch\u002FPR available until consolidation status is documented or the project explicitly closes\u002Fmerges it.\n- After all write waves integrate, dispatch any additional **review** lanes as non-worktree `Agent` calls (no `isolation`) against the integrated dirty tree. Their deliverable contract: return findings as a list, each classified `blocker` or `advisory`, with file path and line references.\n- Write a `### Review Findings` block under the step in `tasks\u002Ftodo.md`:\n  - If any finding is `blocker`: leave the step unchecked, stop `\u002Fexec`, and surface the findings in the final report.\n  - Else: record the findings, check off the step, and continue normal `\u002Fexec` flow.\n- Exec the phase's test strategy against the integrated state before checking off the step.\n\n### Single Step Mode (default)\n\n- If the step creates, deletes, renames, or changes behavior\u002Fmetadata in any tracked `SKILL.md` or `PACK.md`, refresh the Skills Showcase before handing off to `\u002Fship`: run `node apps\u002Fskills-showcase\u002Fscripts\u002Fgenerate-skills-showcase-data.mjs`, `node apps\u002Fskills-showcase\u002Fscripts\u002Fgenerate-skills-showcase-github-data.mjs`, and `apps\u002Fskills-showcase\u002Fscripts\u002Fvalidate-skills-showcase-data.sh`; include changed generated assets in the dirty tree. Review curated showcase copy, catalog grouping, workflow animation text, and proof receipts; update affected site files or record why no curated website copy changed.\n- If it's a \"Tests First\" step: write the failing tests, run them to confirm they fail (red). Stop.\n- If it's an implementation step: implement it, run existing tests to check for regressions. Stop.\n- If it's a \"Green\" step: run all tests. For `tests-after` phases, also write regression tests covering acceptance criteria. Fix any failures. If validation is clean and a following cleanup\u002Frefactor step is explicitly conditional on validation findings or says no source changes are expected, complete that no-op cleanup in the same execution by recording the no-op result instead of leaving it for a separate plan-mode handoff. Stop.\n- **Mark the step as done** in `tasks\u002Ftodo.md` (check it off).\n\n### Full Phase Mode (`--phase`)\n\n- Execute the entire phase, step by step:\n  - Start with the \"Tests First\" steps — write the failing tests.\n  - Exec the tests to confirm they fail (red).\n  - Implement each step in order.\n  - Run tests after implementation to confirm they pass (green).\n  - Refactor only when validation exposes concrete drift or cleanup work; do not create or preserve separate no-op refactor steps after a clean validation gate.\n- **Verify the milestone**:\n  - Check each acceptance criterion.\n  - Exec the full test suite to confirm no regressions.\n  - Check off completed criteria in `tasks\u002Ftodo.md`.\n\n## After Execution (both modes)\n\n**Report concisely:**\n- Phase\u002Fstep completed\n- Files modified\n- Test results (if tests were run) — **explicitly state whether any failures are expected (red phase: tests written before implementation) or unexpected (regressions\u002Fbugs that need fixing)**\n- Manual tasks — if `tasks\u002Fmanual-todo.md` exists, report count of pending manual tasks for this phase\n- Advisory tasks — pending record\u002Frecurring counts from `tasks\u002Frecord-todo.md` and `tasks\u002Frecurring-todo.md` if they exist\n- **Next work:** the next concrete shipping, validation, blocker, or follow-up task\n- **Recommended next command:** one command or route for that work\n\n## Next-Step Routing\n\nBefore handing back, identify the next concrete work item from project state, then recommend the executor and invocation.\n\nOutput exactly two lines beyond the normal report:\n\n- **Next work:** \u003Cspecific shipping, validation, blocker, or follow-up task>\n- **Recommended next command:** \u003Cone command or route>\n\nRules:\n\n- Make the next work item primary. Derive it from `tasks\u002Ftodo.md`, validation results, manual blockers, deploy\u002Fsmoke-test gaps, or the absence of remaining work. Do not use agent mode itself as the next work item.\n- Use `.\u002Fscripts\u002Fagent-mode.sh` only to choose command text. If it is missing, unset, or non-zero, infer routing from the current invocation and task type instead of asking the user to select a mode by default.\n- Normalize copied task routes to Claude syntax before final output. If `tasks\u002Ftodo.md`, `tasks\u002Froadmap.md`, benchmark reports, or prior handoffs contain Codex dollar commands for base skills (for example `$exec`, `$ship`, `$roadmap`, `$guide`, `$reconcile-dev-docs`), treat them as task identifiers, not final command text. Convert the final `Recommended next command` to the equivalent Claude `\u002F...` route unless the next action is explicitly a Codex handoff such as `\u002Fdelegate $ship`.\n- Inference defaults:\n  - Hybrid execution handoff after Claude `\u002Fexec` → recommend `\u002Fdelegate` (agent-bridge pack) `$ship`.\n  - Claude-only or manual\u002Forchestration-heavy work → recommend `\u002Fship` or `\u002Fguide` (guided-walkthrough pack).\n  - Codex-only execution → recommend `$ship`.\n- Do **not** recommend `\u002Fdelegate` (agent-bridge pack) as a workaround for an `agent-team` profile. `\u002Fexec` now auto-dispatches agent-team lanes itself via isolated worktrees; `\u002Fdelegate` (agent-bridge pack) is for Claude↔Codex handoff, not for lane parallelism.\n- Only present multiple commands when the ambiguity materially changes execution safety or there are equally valid next work items. Otherwise choose the best route and mention degraded mode lookup inline.\n\n## What NOT to do\n\n- Do NOT write code before entering plan mode and getting user approval.\n- Do NOT call ExitPlanMode from normal mode. If Claude Code reports \"You are not in plan mode\" after approval, treat approval as complete and continue implementation.\n- Do NOT execute more than one step (or more than one phase in `--phase` mode).\n- Do NOT read unnecessary files — only what's needed for the current work.\n- Do NOT plan ahead or analyze future phases\u002Fsteps.\n- Do NOT refactor unrelated code.\n- Do NOT update CLAUDE.md.\n- Do NOT commit or push. `\u002Fexec` is the Claude execution step; `\u002Fship` owns packaging, task-history updates, commits, pushes, deploys, and next-step planning.\n- Do NOT execute external human-action items from `tasks\u002Fmanual-todo.md`. Bookkeeping or agent-executable items that were misfiled there should be reconciled through `\u002Freconcile-dev-docs` (docs-health pack) or promoted into `tasks\u002Ftodo.md`, not routed to `\u002Fguide` (guided-walkthrough pack).\n- Do NOT execute items from `tasks\u002Frecord-todo.md` or `tasks\u002Frecurring-todo.md` unless the item has first been promoted into `tasks\u002Ftodo.md`.\n\n## Flow\n\n```\n\u002Fexec                  → plans one step, enters plan mode, executes after approval\n\u002Fexec --phase          → plans the next full phase, enters plan mode, executes after approval\n\u002Fship                 → commits, pushes, plans next, enters plan mode\n                      → select \"clear context and implement\"\n                      → fresh context reads tasks\u002Ftodo.md and implements\n```\n\n\n## Constraints\n- When recommending a skill from another pack, verify the pack is installed via `.agents\u002Fproject.json` `enabled_packs`. If not installed, include `npx skillpacks install \u003Cpack-name>` from the project shell as the prerequisite.\n- **One step (or one phase). That's it.** Then stop and let the user decide what's next.\n- **Always enter plan mode before executing.** The user must approve the approach first.\n- Keep context footprint minimal — don't read the entire codebase, only files relevant to this work.\n- If the work can't be completed due to a blocker, document the blocker in `tasks\u002Ftodo.md` and stop.\n- Follow the test strategy annotated on each phase (`tdd`, `tests-after`, or `none`). Do not skip test steps for `tdd` phases.\n- Follow the `### Execution Profile` annotated on each phase. If subagents are unavailable in the active environment, execute serially and report the downgrade.\n- Do not let subagents update `tasks\u002Ftodo.md`, `tasks\u002Froadmap.md`, `tasks\u002Fhistory.md`, shipping commits, or deploy steps. Those remain main-agent responsibilities.\n- Do not run parallel write lanes unless their `Owns` paths are disjoint. When in doubt, downgrade to `research-only` or `serial`.\n- Do not invoke `\u002Fcommit-and-push-by-feature` or push shipping commits from the main `\u002Fexec` tree. A dirty tracked tree after successful `\u002Fexec` is expected and is the handoff to `\u002Fship`. The narrow exception is `agent-team` lane work: lane agents must commit and push their assigned non-primary GitHub branches for PR review.\n- For `agent-team` phases: do not integrate a lane whose diff contains files outside its declared `Owns` — surface the violation and stop instead. Lane agent prompts must require branch-backed commit, push, and PR evidence before return; do not integrate from an uncommitted worktree, unpushed branch, or unreviewed PR. Clean up local worktrees after every integration, but preserve remote branches\u002FPRs until consolidation status is documented.\n- Each execution must be self-contained — read the plan fresh, don't rely on prior context.\n\n## Execution Handoff Contract\n\n- `\u002Fexec` deliberately leaves completed tracked changes uncommitted so `\u002Fship` can validate, update `tasks\u002Fhistory.md`, commit, push, deploy, plan the next step, and enter plan mode in one coherent shipping pass.\n- If the user explicitly asks `\u002Fexec` to commit or push, stop and redirect them to `\u002Fship` or `\u002Fcommit-and-push-by-feature`; do not reinterpret `\u002Fexec` as a shipping command.\n- Report the exact next command as `\u002Fship` unless a blocker prevents shipping.\n",{"name":5,"type":19,"version":32,"invocation":22,"description":7,"argument-hint":33},"v0.5","[--phase]","master","96e2912af886dd1606b1b97df707715aef062b02","packs\u002Fexec-loop\u002Fclaude\u002Fexec\u002Farchive\u002Fv0.5",0,"https:\u002F\u002Fgithub.com\u002FGeorgeQLe\u002Fagentic-skills","https:\u002F\u002Fagentic-skills-blush.vercel.app","https:\u002F\u002Fgithub.com\u002FGeorgeQLe","georgeqle.com","George Le is a futurist and serial tech entrepreneur who wants to work toward a world where humanity is free from robotic tasks.","2026-11-10 04:07:24",{"source":8,"skillName":5,"commands":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add GeorgeQLe\u002Fagentic-skills --skill exec",{"tool":50,"command":51},"bunx","bunx skills add GeorgeQLe\u002Fagentic-skills --skill exec",{"tool":53,"command":54},"pnpm","pnpm dlx skills add GeorgeQLe\u002Fagentic-skills --skill exec","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FGeorgeQLe\u002Fagentic-skills\u002Fblob\u002Fmaster\u002Fpacks\u002Fexec-loop\u002Fclaude\u002Fexec\u002Farchive\u002Fv0.5\u002FSKILL.md",true,[],[59,71,81,93,108,119],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":27},"01M6G0NJES15RJKZE6YZ0TSYGF","source-checkout-allowed","Valid source-checkout-only fixture.","https:\u002F\u002Fgithub.com\u002FGeorgeQLe\u002Fagentic-skills\u002Fblob\u002Fmaster\u002Ftests\u002Ffixtures\u002Fskill-install-routing\u002Fvalid\u002Fsource-checkout-allowed\u002FSKILL.md",[],[66,67,68,69,23,70],"source checkout allowed","checkout","fixture","only","valid",{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":27},"01M6G0NFZ3R1MNB1E3DVTM0WB7","deck-install-valid","Valid deck install fixture.","https:\u002F\u002Fgithub.com\u002FGeorgeQLe\u002Fagentic-skills\u002Fblob\u002Fmaster\u002Ftests\u002Ffixtures\u002Fskill-install-routing\u002Fvalid\u002Fdeck-install\u002FSKILL.md",[],[78,79,80,70,68,23],"deck install valid","deck","install",{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":27},"01M6G0ND3QZQC4MDZ9NVB97PT2","codex-pack-guard-valid","Valid Codex Pack Availability Guard fixture.","https:\u002F\u002Fgithub.com\u002FGeorgeQLe\u002Fagentic-skills\u002Fblob\u002Fmaster\u002Ftests\u002Ffixtures\u002Fskill-install-routing\u002Fvalid\u002Fcodex-pack-guard\u002FSKILL.md",[],[88,89,90,70,91,92,68,23],"codex pack guard valid","pack","guard","codex","availability",{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":104,"publishedAt":27},"01M6G0NA9YB3NKGZKD3S96JMNB","codex-missing-skill-valid","Valid Codex missing skill fallback fixture.","https:\u002F\u002Fgithub.com\u002FGeorgeQLe\u002Fagentic-skills\u002Fblob\u002Fmaster\u002Ftests\u002Ffixtures\u002Fskill-install-routing\u002Fvalid\u002Fcodex-missing-skill-fallback\u002FSKILL.md",[99],{"categoryNo":100,"categoryName":101,"taxonomyType":102,"taxonomyTypeDesc":103},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[105,106,70,91,23,107,68],"codex missing skill valid","missing","fallback",{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":115,"publishedAt":27},"01M6G0N7PC0EKFD40ZWQAXSAQ9","codex-base-skill-fallback-valid","Valid Codex base skill fallback fixture.","https:\u002F\u002Fgithub.com\u002FGeorgeQLe\u002Fagentic-skills\u002Fblob\u002Fmaster\u002Ftests\u002Ffixtures\u002Fskill-install-routing\u002Fvalid\u002Fcodex-base-skill-fallback\u002FSKILL.md",[114],{"categoryNo":100,"categoryName":101,"taxonomyType":102,"taxonomyTypeDesc":103},[70,91,107,116,117,118,23,68],"base skill","codex base skill fallback valid","base",{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":27},"01M6G0N4VRR2YKZQ6N3Y6S2BQA","claude-pack-guard-valid","Valid Claude Pack Availability Guard fixture.","https:\u002F\u002Fgithub.com\u002FGeorgeQLe\u002Fagentic-skills\u002Fblob\u002Fmaster\u002Ftests\u002Ffixtures\u002Fskill-install-routing\u002Fvalid\u002Fclaude-pack-guard\u002FSKILL.md",[],[70,90,89,126,92,23,68],"claude pack guard valid"]