[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M786BS3Y51F4AXY5DB59TGTE":3,"skill-same:01M786BS3Y51F4AXY5DB59TGTE":83},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":14,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":48},"01M786BS3Y51F4AXY5DB59TGTE","sp-implement",null,"Execute the implementation plan by dispatching subagents and integrating their results","chenziyang110\u002Flaunchdeck","chenziyang110","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43693913?v=4","01M7863EBWK1D0P6A29YGEMAS4","Robin11","01M7863ECM1VB6RXDMHTW90D2T",0,"MIT","https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsp-implement\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: \"sp-implement\"\ndescription: \"Execute the implementation plan by dispatching subagents and integrating their results\"\nargument-hint: \"Optional implementation guidance or task filter\"\ncompatibility: \"Requires spec-kit project structure with .specify\u002F directory\"\nmetadata:\n  author: \"github-spec-kit\"\n  source: \"templates\u002Fcommands\u002Fimplement.md\"\nuser-invocable: true\n---\n## Invocation Syntax\n\n- In this integration, invoke workflow skills with `\u002Fsp-plan`-style syntax.\n- References such as `\u002Fsp.plan`, `\u002Fsp.tasks`, or `next_command: \u002Fsp.plan` are canonical workflow-state identifiers and handoff values.\n- Preserve those canonical state tokens exactly in artifacts and workflow state; do not rewrite them to this integration's invocation syntax.\n\n\n\n## Workflow Contract Summary\n\n- **When to use**: `tasks.md` is ready and the feature should move from planning into tracked execution batches.\n- **Primary objective**: Execute the ready batches while preserving tracker state, subagent contracts, verification discipline, and resumability.\n- **Primary outputs**: Verified code, test, and documentation changes plus compact execution state, one task lifecycle record per executed task, conditional drift\u002Frepair records, and `implementation-summary.md` for the active feature.\n- **Default handoff**: Continue with the next ready batch, route blockers into \u002Fsp-debug, or after technical closeout hand human product acceptance to \u002Fsp.accept and stop.\n- **Execution note**: This summary is routing metadata only. Follow the full contract below end-to-end rather than inferring behavior from the description alone.\n\n## Blocked Exit Contract\n\nIf blocked after safe recovery, read and follow\n`.specify\u002Ftemplates\u002Fworkflow-blocker-template.md` and its JSON schema. Never\nreturn only an error or “ask a human”; preserve state and keep agent-capable\nrepair agent-owned. Set `human_action_required: true` only for authority,\ncredentials, protected systems, human decisions\u002Freviews, or physical access.\nTailor steps, expected results, failure paths, evidence, and resume action to\nCI, visual review, or product decisions. Never claim completion.\n\n## User Input\n\n```text\n$ARGUMENTS\n```\n\nYou **MUST** consider the user input before proceeding (if not empty).\n\n## Objective\n\nAdvance the current feature through tracked implementation batches while keeping execution state, subagent work, verification evidence, and recovery paths explicit.\n\n## Context\n\n- Primary inputs: canonical `task-index.json` or the light leader-direct task list, current execution state, the current task's required refs, and live repository evidence for the touched area. The full plan\u002Fspec package is fallback evidence, not default intake.\n- The leader owns tracker truth, execution strategy, join points, blocker handling, and final validation.\n- Delegated workers own bounded implementation lanes only; they do not own the overall implementation state.\n\n\n## Claude Code Project Cognition Advisory Gate\n\n**Current-Task Navigation Repair**: Reuse the current task's required refs and live touched-area evidence. Only when a required ref is stale, missing, or contradicted by live code, run at most one `C:\\Users\\11034\\.specify\\bin\\project-cognition.exe compass --intent implement --query=\\\"$ARGUMENTS\\\" --format json` before any implementation actions. Read and carry `epistemic_contract`; require `graph_role=route_candidate_only`, `fact_source_of_truth=live_repository`, `live_verification_required=true`, `graph_only_claims_allowed=false`, and `unverified_claim_action=withhold`. The contract cannot authorize source changes and cannot prove current behavior; contradictory live evidence overrides the route candidate. Graph claims are indexed assertions; even `verified_in_graph_generation` is only an active graph-generation state, not current repository truth. Graph claims cannot authorize source changes and cannot set workflow `claim_ready=true`; bounded live evidence and the separate workflow final-claim gate remain required. Use `compass_state`, `minimal_live_reads`, `first_pass_paths`, `coverage_diagnostics`, and `expansion_ref` only to repair current-task context; they do not replace live proof or authorize broader implementation scope.\n- Read and carry `epistemic_contract`; require `graph_role=route_candidate_only`, `fact_source_of_truth=live_repository`, `live_verification_required=true`, `graph_only_claims_allowed=false`, and `unverified_claim_action=withhold`. The contract cannot authorize source changes and cannot prove current behavior; contradictory live evidence overrides the route candidate. Graph claims are indexed assertions; even `verified_in_graph_generation` is only an active graph-generation state, not current repository truth. Graph claims cannot authorize source changes and cannot set workflow `claim_ready=true`; bounded live evidence and the separate workflow final-claim gate remain required.\n- Interpret returned readiness: `query_ready` reads top-level `minimal_live_reads` first and then lane-level `first_pass_paths`; `review` permits only returned `minimal_live_reads` plus `coverage_diagnostics`; `needs_rebuild` treats map output as advisory, continues with live repository evidence, and recommends `{{invoke:map-scan}}`, then `{{invoke:map-build}}` only for brownfield first\u002Fmissing\u002Funusable baseline, schema failure, schema v1 or old broad-schema rebuild-required readiness, zero active-generation `path_index` rows outside a `greenfield_empty` baseline, missing or invalid `alias_index`, `explicit_rebuild_requested`, or `baseline_identity_invalid`; `blocked` reports the runtime issue as advisory map state and continues with live repository evidence; `unsupported_runtime` continues with live evidence and records that compass intake was unavailable. If `baseline_kind=greenfield_empty`, continue with workflow artifacts and live requirements instead of treating absent graph paths as `needs_rebuild`. If the user's actual request is to fix cognition runtime state, report the blocked state and follow the same map-update-first routing policy.\n- Use `map-update` for ordinary existing-baseline gaps. If `baseline_kind=greenfield_empty`, do not recommend map-scan -> map-build solely because the graph has no paths; continue with workflow artifacts and live requirements. Use `map-scan -> map-build` only for brownfield first\u002Fmissing\u002Funusable baseline, schema failure, schema v1 or old broad-schema rebuild-required readiness, zero active-generation `path_index` rows outside `greenfield_empty`, missing or invalid `alias_index`, `explicit_rebuild_requested`, or `baseline_identity_invalid`.\n- Treat the project cognition compass packet as advisory navigation for brownfield context; do not fall back to chat memory or ad hoc repository instincts when compass-backed runtime coverage should guide the route.\n- Treat this as advisory navigation, not a hard gate; continue with live repository evidence when the bundle is weak, stale, or missing, and use map maintenance only when it is actually useful.\n- Mutation closeout is separate from entry routing: entry stale may continue, but workflow-owned mutation closeout is not an external map-maintenance handoff. If the workflow changes source\u002Fruntime truth-owning surfaces, shared surfaces, command\u002Froute\u002Fcontract boundaries, verification entry points, runtime assumptions, or other project-related behavior surfaces, final state must run inline project cognition update from changed paths, affected surfaces, and verification evidence.\n- Inline project cognition update uses `project-cognition delta append` followed by `project-cognition update --delta-session \"$DELTA_SESSION_ID\" --reason workflow-finalize --format json` when a delta session exists, or `project-cognition update --payload-file \".specify\u002Fproject-cognition\u002Fupdates\u002F\u003Cupdate-id>.json\" --reason workflow-finalize --format json` when no delta session exists.\n- The payload-file path must include changed_paths, behavior_surfaces, generated_surfaces, state_contracts, verification, known_unknowns, and confidence_notes so the update is equivalent to `sp-map-update`, not just a path stamp; `verification_evidence` and `generated_surface_notes` are accepted compatibility aliases.\n- Use `known_unknowns` only for blockers that make the cognition update unsafe to trust. If unrelated dirty or untracked working-tree paths were excluded by explicit workflow-owned paths, record that as `confidence_notes` or `boundary.initial_dirty_paths`, not as blocking `known_unknowns`.\n- clean closeout keys on `result_state`, not `update_id`, `last_update_id`, or freshness alone. Treat `ready` and `no_op` as clean, `partial_refresh` as recorded but not fully clean, `needs_rebuild` as a map-scan\u002Fmap-build route, `blocked` as blocked, and `recorded` as legacy recorded-only output that is never clean completion.\n- Use `project-cognition mark-dirty --reason \"\u003Creason>\" --format json` only when inline update cannot complete. Dirty only when inline update cannot complete.\n- `sp-map-update` is for manual\u002Fexternal maintenance and follow-up repair after user edits, interrupted workflows, or explicit operator map-maintenance requests. It is not routine cleanup for changes this workflow just made.\n- A project-cognition compass intake is not complete when it returns JSON. It is complete only when readiness drives routing, `minimal_live_reads` constrains inspection, lane-level `first_pass_paths` reasons are considered, and relevant facts are carried into the next workflow artifact or execution state.\n- Carry forward only the current task's selected capability, minimal live reads, boundary constraints, required references, validation route, and evidence gaps into its lifecycle record or just-in-time `WorkerTaskPacket`.\n\n## Process\n\n- Recover compact execution state, validate the task-graph revision, and identify the current ready batch.\n- If the feature lane is not explicit, run `uvx --from git+https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Fspec-kit-plus.git@4a631657f75460886dbd12ebe48b14fc11cfe0bf specify lane resolve --command implement --ensure-worktree`; use the returned execution context\u002Fmaterialized worktree and stop on `uncertain`.\n- Read `FEATURE_DIR\u002Fworkflow-state.md` when present. If its canonical `next_command` still points to `\u002Fsp.analyze`, stop and honor that pending diagnostic gate rather than self-authorizing implementation from chat memory.\n- On resume, audit terminal-looking tracker\u002Ftask state before trusting completion; checked tasks are claims until validation, handoff, join point, and consumer evidence prove them. When `real_entrypoint_evidence` is required, synthetic-only consumer proof is not sufficient.\n- Carry every `CA-###` consequence obligation from packets into dispatch, implementation evidence, result acceptance, tracker open gaps, and stop-and-reopen routing.\n- Choose leader-direct or delegated execution. Compile and validate a WorkerTaskPacket just in time only for delegated work; do not require packets for leader-direct tasks.\n- Integrate worker results into one task lifecycle record with validation, review verdict, blockers, and recovery; keep execution truth current without duplicating task briefs, review packages, and ledgers.\n- Continue automatically until the feature is complete or blocked by a real blocker.\n\n## Output Contract\n\n- Produce verified implementation changes plus updated compact execution state for the active feature.\n- Keep one task lifecycle record per executed task aligned with what actually happened. Additional review or repair records are event-triggered rather than mandatory for every batch.\n- Report blockers, retries, and completion honestly rather than inferring success from partial progress.\n- On successful technical closeout, keep `active_command: sp-implement`, mark implementation `status: completed` with `phase_mode: execution-only`, set canonical `next_command: \u002Fsp.accept`, report `human-acceptance.json`, and hand off to `\u002Fsp-accept`. This is the default post-implement stage; do not pre-fill a human PASS, set `active_command: sp-accept` early, or continue into acceptance within the same invocation.\n- For any blocked, approval-gated, timeout-gated, or nonzero-verification exit, include an **Actionable Blocker Resolution** section instead of a bare blocked summary. It must name each blocker, `owner: agent | user | maintainer | external-system`, `exact_next_action`, `approval_question` when human approval is the next step, artifact or log evidence, `unblock_criteria`, and whether the rest of implementation can continue.\n- Do not leave the user to infer whether to handle the blocker. Say whether the blocker is mandatory for completion, optional cleanup, external baseline maintenance, or a follow-up risk, and name the next command or approval decision when one is known.\n- Preserve any `MP-*` obligations carried in task packets, implementation state, or result handoff expectations.\n- Worker result handoffs must include must-preserve evidence when packet obligations require it.\n- If implementation discovers a conflict with an `MP-*` obligation, return a blocked result instead of silently changing the protected discussion decision.\n\n## Guardrails\n\n- Do not dispatch from raw task text alone; compile and validate the packet first.\n- Do not bypass tracker truth, result handoffs, or verification gates.\n- Do not declare completion because tasks look checked off if the implementation contract is not actually satisfied.\n\n## Senior Consequence Analysis Gate\n\nRun this gate whenever the request, artifact set, defect, or planned change can affect lifecycle operations, running objects, concurrent work, destructive behavior, shared state, downstream consumers, compatibility, security-sensitive behavior, or multiple plausible product behaviors.\n\nProject cognition first. Use the project cognition runtime to identify ownership, consumers, state surfaces, change-propagation facts, verification routes, conflicts, known unknowns, and coverage gaps. Senior consequence analysis second. Turn those facts into explicit product and implementation obligations instead of treating the graph as the decision-maker.\n\nProject cognition readiness provides routing advice. If readiness is `query_ready`, read top-level `minimal_live_reads` first, then use lane-level `first_pass_paths` reasons. If readiness is `review`, inspect the returned `minimal_live_reads` before continuing and treat `coverage_diagnostics` as confidence and closeout signals. If readiness is `needs_rebuild`, continue with live repository evidence and recommend `\u002Fsp-map-scan -> \u002Fsp-map-build` only for brownfield first\u002Fmissing\u002Funusable baseline, schema failure, schema v1 or old broad-schema rebuild-required readiness, zero active-generation `path_index` rows outside `greenfield_empty`, missing or invalid `alias_index`, `explicit_rebuild_requested`, or `baseline_identity_invalid`. If readiness is `blocked`, report the blocked state and continue with live repository evidence unless the user's actual request is to fix cognition runtime state. If readiness is `unsupported_runtime`, continue with live evidence and record that compass intake was unavailable. If `baseline_kind=greenfield_empty`, continue with workflow artifacts and live requirements; do not recommend map-scan -> map-build solely because the graph has no paths. Carry relevant project cognition facts, returned `minimal_live_reads`, inference notes, and coverage gaps into the workflow's artifacts or durable state, but back consequence claims with live code, tests, scripts, configuration, or authoritative docs. Mutation closeout is separate from entry routing: entry stale may continue, but that does not allow source\u002Fruntime mutation workflows to defer closeout. Workflow-owned mutation closeout is not an external map-maintenance handoff; after changing project-related files or behavior, the workflow must run inline project cognition update from its changed paths, affected surfaces, and verification evidence, with `project-cognition mark-dirty` only as fallback when inline update cannot complete. `sp-map-update` is for manual\u002Fexternal maintenance and follow-up repair; it is external map maintenance, not routine closeout for this workflow's own changes. In shared routing summaries, sp-map-update is for manual\u002Fexternal maintenance and ordinary existing-baseline gaps.\n\nRequired output when the gate triggers:\n\n- **Affected Object Map**: name each object, record, worker, queue, artifact, command, API, file surface, user-visible state, or downstream consumer that can be affected.\n- **State-Behavior Matrix**: describe behavior for each important lifecycle state, including created, queued, running, paused, failed, cancelled, completed, resumed, archived, missing, stale, or partially refreshed states when relevant.\n- **Dependency Impact Table**: map direct dependencies, indirect consumers, shared state, compatibility surfaces, validation routes, and adjacent workflows that can break if semantics change.\n- **Recovery And Validation Contract**: state rollback, retry, idempotency, cleanup, migration, observability, and validation evidence required before handoff or completion.\n- **Coverage Gaps**: list what project cognition or live evidence cannot prove, who must resolve each gap, the latest safe resolve phase, the stop-and-reopen condition, and the routing decision: current workflow may continue with an assumption, must ask the user, must route to clarification or deep research, or must request map maintenance.\n- **Consequence Obligations**: assign stable `CA-###` IDs to every obligation that must survive downstream handoff, task generation, worker packets, verification, or debug closeout. Each `CA-###` must include claim, affected objects, owner workflow, latest resolve phase, status, and stop-and-reopen condition.\n\nStand down only for docs-only wording changes, trivial isolated fixes, or local refactors that cannot affect lifecycle operations, running state, destructive operations, shared state, downstream consumers, compatibility, security, or multiple behavior choices. Record the no-trigger reason or stand-down reason in the workflow's durable artifact or closeout before skipping the required outputs.\n\nIf the gate triggers and the current workflow cannot preserve the required outputs, stop and route to the workflow that can. Do not mark ready, resolved, handoff-ready, planning-ready, or complete while triggered consequence obligations remain unresolved, unmapped, or unsupported by validation evidence.\n\n## Agent Phase Handoff\n\nPhase handoff is an agent-only control surface. Human-facing explanation belongs in the visible reply or in project documents that have independent review value; it must not be duplicated into a handoff.\n\n- The previous phase's canonical JSON contract is the next phase's primary input.\n- Use the compact transition shape from `.specify\u002Ftemplates\u002Fagent-phase-transition-schema.json`: `status`, `source_ref`, `semantic_delta`, `required_refs`, `blockers`, `next_action`, and recovery only when blocked.\n- Carry the minimum sufficient context: include a fact only when omitting it could change the next action, lose a requirement or obligation, force rediscovery, weaken verification, or prevent safe recovery.\n- Preserve decisions, acceptance criteria, evidence provenance, `MP-*`, `CA-###`, and stop\u002Freopen conditions by stable reference. Do not copy their full bodies into every downstream artifact.\n- Protected `MP-*` and `CA-###` obligations must not drop between phases. A downstream phase may resolve or reopen them, but may not silently omit them.\n- Carry the locked implementation-target reference. A cross-project transition must not silently point to the current repository when the confirmed target differs.\n- Consume project rules and Learning through `learning start --command \u003Cclassic-command-name> -> list -> show`; run selected `show_argv` only. Constitution remains at `.specify\u002Fmemory\u002Fconstitution.md`; never parse Learning storage.\n- Capture at owning closeout only when the lesson would change a future action; prefer `learning capture-auto`.\n- A rendered Markdown view is never an agent handoff authority. Do not require Markdown\u002FJSON companion agreement.\n- Revalidate upstream truth only when its revision changed, evidence became stale, live repository facts contradict it, or the current phase discovers a scope, boundary, feasibility, or risk change.\n- If `semantic_delta` is empty, do not repeat upstream questions, approach selection, or user confirmation.\n\n## Deterministic Workflow Runtime\n\nFor a feature-bearing `specify -> plan -> tasks -> implement -> accept` stage,\nthe CLI owns phase order and `workflow-state.md`. Do not author or advance\n`workflow-state.md` by hand.\n\n- After `FEATURE_DIR` is known, run `uvx --from git+https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Fspec-kit-plus.git@4a631657f75460886dbd12ebe48b14fc11cfe0bf specify workflow show --feature-dir \u003Cfeature-dir> --format json`. If state is missing at the first feature stage, run `uvx --from git+https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Fspec-kit-plus.git@4a631657f75460886dbd12ebe48b14fc11cfe0bf specify workflow enter --command specify --feature-dir \u003Cfeature-dir> --format json`.\n- On entry to `plan`, `tasks`, `implement`, or `accept`, use the current revision with `uvx --from git+https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Fspec-kit-plus.git@4a631657f75460886dbd12ebe48b14fc11cfe0bf specify workflow transition --to \u003Cthis-stage> --feature-dir \u003Cfeature-dir> --expected-revision \u003Crevision> --format json` before writing that stage's artifacts. The command validates the completed source-stage artifacts and refuses skips, stale revisions, or incomplete handoffs with exit `10`.\n- The destination command owns the transition. A completed stage recommends the next command but must not execute `workflow transition` to that next stage in the same invocation.\n- Use `uvx --from git+https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Fspec-kit-plus.git@4a631657f75460886dbd12ebe48b14fc11cfe0bf specify workflow next --feature-dir \u003Cfeature-dir> --format json` for the compact next action. Execute only its structured `next_argv`; do not reconstruct flags from prose.\n- After safe agent recovery is exhausted, persist the blocker through `uvx --from git+https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Fspec-kit-plus.git@4a631657f75460886dbd12ebe48b14fc11cfe0bf specify workflow block --input \u003Cblocker-json-or-> --format json`. Obtain its exact input shape with `uvx --from git+https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Fspec-kit-plus.git@4a631657f75460886dbd12ebe48b14fc11cfe0bf specify api schema workflow-block-input --format json`; preserve the returned resume argv and human tutorial.\n- After explicit human acceptance and the acceptance-owned closeout both succeed, run `uvx --from git+https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Fspec-kit-plus.git@4a631657f75460886dbd12ebe48b14fc11cfe0bf specify workflow closeout --feature-dir \u003Cfeature-dir> --expected-revision \u003Crevision> --format json`. It validates acceptance artifacts before marking the feature workflow complete.\n\nFor every blocked exit, including a pre-feature discussion that cannot use the\nfeature runtime yet, follow\n`.specify\u002Ftemplates\u002Fworkflow-blocker-template.md` and its schema. Report the\nexact cause, sanitized evidence, attempted recovery and result, affected scope,\nsmallest next action, observable unblock criteria, and exact resume point. Keep\nagent-capable repair agent-owned. When authority, credentials, a protected\nsystem, physical access, or human judgment is genuinely required, add the full\nHuman Action Guide: goal, prerequisites, safety notes, numbered exact actions,\nexpected result and safe failure branch for every action, independent\nverification, sanitized evidence to return, and the exact resume command.\n\n[AGENT] For project-cognition-backed semantic intake, routing, audit, resume, or final-claim gates, read `references\u002Fsemantic-work-contract.md`.\n\n## Main Flow\n\n1. Run `.specify\u002Fscripts\u002Fpowershell\u002Fcheck-prerequisites.ps1 -Json -RequireTasks -IncludeTasks` to resolve the task-bearing feature context, then read canonical `task-index.json` or the light leader-direct task list, compact execution state, and current branch\u002Fworktree status. Load the current task plus its required refs; do not ingest the full upstream package when revisions are unchanged.\n2. Validate the task-graph revision and current ready batch. Compile delegated WorkerTaskPackets just in time from live code, establish RED-first validation for behavior changes, and do not claim completion from chat narration.\n3. Use `choose_subagent_dispatch(command_name=\"implement\", snapshot, workload_shape)` for safe worker lanes, use the current integration's native subagent lifecycle where available, and keep leader ownership of tracker state.\n4. Execute the current task or ready batch, update tracker fields, resolve blockers through bounded repair, and route unknown root cause to `\u002Fsp-debug`.\n5. Run event-triggered review for repository drift, parallel joins, write-scope drift, validation failure, worker concerns, obligation conflicts, or sequential change-window limits. Maintain one task lifecycle record containing packet\u002Fref, result, validation, review verdict, and recovery; report completion only when changed paths, validation evidence, review status, and mutation closeout are complete.\n6. For UI work, record task-lifecycle `ui_verification` with concrete evidence\n   refs after the real-entrypoint visual convergence loop. Set\n   `evidence_scope: task` and persist typed `structure_snapshot`,\n   `visual_capture`, and `runtime_diagnostics` evidence plus passing runtime\n   status. Use\n   `pending-human-review` only when objective visual evidence cannot close the\n   criterion; it blocks accepted closeout until resolved. Route an invalid,\n   bootstrap, or missing design source to `sp-design` instead of inventing one.\n7. After successful technical closeout, ensure `human-acceptance.json` was prepared from the fresh `implementation-summary.md`, recommend `\u002Fsp-accept`, and stop. Do not claim that automated verification or implementation completion equals human product acceptance.\n\n### Inline Project Cognition Update\n\nWorkflow-owned mutation closeout is not an external map-maintenance handoff and is not external map maintenance. It is the workflow-local form of `\u002Fsp-map-update`. If this workflow changed project-related source, runtime, templates, generated assets, config, tests, state contracts, shared surfaces, or behavior-bearing docs, closeout MUST run inline project cognition update for the workflow-owned changed paths and affected surfaces before claiming clean completion.\n\nCall the planner first:\n\n```text\nproject-cognition closeout-plan --workflow \"$ACTIVE_WORKFLOW\" --format json\n```\n\nWhen `DELTA_SESSION_ID` exists, pass it into the planner:\n\n```text\nproject-cognition closeout-plan --workflow \"$ACTIVE_WORKFLOW\" --delta-session \"$DELTA_SESSION_ID\" --format json\n```\n\nConsume `workflow_canonical`, `update_mode`, `payload_draft`, `required_agent_fields`, `unknown_paths`, `unknown_path_dispositions`, `delta_append_draft`, display-only `delta_append_command`, `update_argv`, display-only `update_command`, and `recommended_next_command`.\n\nBefore running `update`, fill the fields listed in `required_agent_fields` from live evidence from this workflow. Supported agent-owned evidence fields include:\n\n- `verification`\n- `behavior_surfaces`\n- `generated_surfaces`\n- `state_contracts`\n- `known_unknowns`\n- `confidence_notes`\n- `user_decisions`\n- `boundary`\n\nIf a field appears in `required_agent_fields`, provide live-evidence-backed content for it. Fields not listed by `required_agent_fields`, such as `known_unknowns` and `boundary`, are populated only when live evidence supports them; do not invent them to satisfy the shape.\nUse `known_unknowns` only for blockers that make the cognition update unsafe to trust. If the working tree contains unrelated dirty\u002Funtracked paths and the workflow uses explicit workflow-owned paths, record that as `confidence_notes` or `boundary.initial_dirty_paths`, not as a blocking `known_unknowns` item.\n\nFor each `unknown_path_dispositions[]` item, set `agent_disposition` to exactly one allowed value:\n\n- `adoptable`: verified new path inside this workflow-owned scope; it may be recorded in changed\u002Fscope paths and verified adoptable paths do not become blocking `known_unknowns`.\n- `review_only`: path informed review but is not adopted into changed coverage.\n- `ignored`: path remains excluded and must not enter payloads, records, route indexes, evidence, aliases, or minimal live reads.\n- `blocking_known_unknown`: record it as a known unknown and report partial or blocked cognition closeout.\n\n`agent_disposition=adoptable` is an agent accounting decision, not proof that runtime indexing already succeeded. Runtime adoption still requires a usable active project-cognition DB, at least one passing verification evidence item, and no blocking `known_unknowns`. After `update_argv` runs, inspect `result_state`, `adopted_paths`, `review_paths`, `minimal_live_reads`, and `partial_refresh_reasons`; do not explain a remaining `partial_refresh` as \"path_index missing\" until those fields show which adoption gate failed.\n\nIf `update_mode=delta_session`, complete `delta_append_draft.argv_prefix` with agent-owned repeatable flags such as `--behavior-surface`, `--generated-surface`, `--verification`, and accepted `--known-unknown` values from `delta_append_draft.argv_placeholders`. Then append the delta event and run `update_argv`. `delta_append_command` and `update_command` are display-only placeholders, not execution strings.\n\nIf `update_mode=payload_file`, write the completed `payload_draft` to the planner's `payload_path`. Then run `update_argv`. `update_command` is a display-only placeholder, not an execution string.\n\nCompleted payload drafts preserve the planner-owned `changed_paths` and `scope_paths` and add agent-owned evidence fields before recording.\n\nStructured `update` invalidates related claims and returns their stable IDs in `affected_graph_claims`. This is separate from update readiness: generic workflow verification and `result_state=ready` must not re-promote stale or contradicted graph claims. Only when this workflow already has decisive claim-specific bounded live evidence for an exact returned claim ID may it submit semantic reconciliation intent and run:\n\n```text\nproject-cognition claim-reconcile prepare --input \u003Cintent.json> --format json\nproject-cognition claim-reconcile apply --input \u003Cprepared_packet_path> --format json\n```\n\nProvide only reconciliation intent: workflow, stable `claim_id`, reason, and evidence containing repository-relative `source_path`, bounded line `span`, and `supporting` or `contradicting` role. Add verification only when it is claim-specific. The runtime owns the contract version, active generation, expected state and revision, UTC observation and expiry, source kind, content hashes, repository snapshot, IDs, and prepared packet path. Do not author or edit those integrity fields; execute the returned `apply_argv` exactly. If no such evidence exists, leave the claim stale. If reconciliation returns ready, rerun Compass once so later routing consumes the current evidence basis; partial or blocked reconciliation remains withheld and follows `recommended_next_action`.\n\nFor compatibility with worker handoffs and delta packets, the runtime also accepts `verification_evidence` as an alias for `verification` and `generated_surface_notes` as an alias for `generated_surfaces`. Verification evidence may be an array of objects (`command`, `result`, `artifact`) or an array of command-result strings, but clean closeout still requires passing verification evidence; failed verification cannot produce a clean `ready` closeout.\n\nClean closeout keys on `result_state`, not `status=ok`, `update_id`, `last_update_id`, or freshness alone:\n\n- `ready` or `no_op`: project cognition closeout may be clean when ordinary verification also passed.\n- `partial_refresh`: useful update data was written, but the final workflow state must report partial cognition closeout, `partial_refresh_reasons`, and the returned `minimal_live_reads`. If `partial_refresh_reasons` includes `missing_passing_verification_result`, repair the payload or delta evidence and rerun `update_argv` before final closeout; do not route that to `sp-map-update`. If verified workflow-owned paths still remain in `review_paths` after the update, report implementation completion separately from project-cognition maintenance and name `\u002Fsp-map-update` as follow-up repair.\n- `needs_rebuild`: report the exact rebuild condition and route to `\u002Fsp-map-scan`, then `\u002Fsp-map-build`.\n- `blocked`: report the runtime or validation blocker and the exact recovery command.\n- `recorded`: legacy recorded-only output; treat it as partial or blocked, never as clean completion.\n\nNever run the `complete-refresh` or `clear-dirty` helper after `result_state=partial_refresh`, `needs_rebuild`, `blocked`, or legacy `recorded`; those helpers are only for states that the runtime and validation prove ready.\n\nDirty fallback command shape: `C:\\Users\\11034\\.specify\\bin\\project-cognition.exe mark-dirty --reason \\\"\u003Creason>\\\" --format json`.\nUse `C:\\Users\\11034\\.specify\\bin\\project-cognition.exe mark-dirty --reason \\\"workflow-closeout-failed\\\" --format json` only when inline update cannot complete: when the planner or update command is unavailable, cannot record useful update data, cannot identify workflow-owned scope, or cannot be trusted because verification\u002Fworkflow completion is not trustworthy. Dirty only when inline update cannot complete.\n\nsp-map-update is for manual\u002Fexternal maintenance and follow-up repair. `\u002Fsp-map-update` remains the external\u002Fmanual workflow for user edits, interrupted workflow repair, explicit map maintenance, and follow-up repair. It is not routine cleanup for changes this workflow just made. If `sp-map-update` already ran `project-cognition update --reason map-update` for the same changed paths, do not run a second `workflow-finalize` closeout update for those paths.\n\n## Detailed References\n\nRead [Reference index](references\u002FINDEX.md) before applying detailed contracts.\n\n- [task intake and tracker](references\u002Ftask-intake-and-tracker.md)\n- [red first and validation](references\u002Fred-first-and-validation.md)\n- [subagent worker contract](references\u002Fsubagent-worker-contract.md)\n- [join point review](references\u002Fjoin-point-review.md)\n- [safe repair loop](references\u002Fsafe-repair-loop.md)\n- [final reconciliation and closeout](references\u002Fbranch-review-and-closeout.md)\n\n## Claude Code Leader Gate\n\nWhen running `sp-implement` in Claude Code, you are the leader and own route selection, execution-state truth, acceptance, and recovery.\n\n**Current-Task Navigation Repair**: Reuse the current task's required refs and live touched-area evidence. Only when a required ref is stale, missing, or contradicted by live code, run at most one `C:\\Users\\11034\\.specify\\bin\\project-cognition.exe compass --intent implement --query=\\\"$ARGUMENTS\\\" --format json` before any implementation actions. Read and carry `epistemic_contract`; require `graph_role=route_candidate_only`, `fact_source_of_truth=live_repository`, `live_verification_required=true`, `graph_only_claims_allowed=false`, and `unverified_claim_action=withhold`. The contract cannot authorize source changes and cannot prove current behavior; contradictory live evidence overrides the route candidate. Graph claims are indexed assertions; even `verified_in_graph_generation` is only an active graph-generation state, not current repository truth. Graph claims cannot authorize source changes and cannot set workflow `claim_ready=true`; bounded live evidence and the separate workflow final-claim gate remain required. Use `compass_state`, `minimal_live_reads`, `first_pass_paths`, `coverage_diagnostics`, and `expansion_ref` only to repair current-task context; they do not replace live proof or authorize broader implementation scope.\n\nBefore implementation actions:\n- Read canonical `task-index.json` or the light direct task list, compact execution state, and the current task's required refs.\n- **Resume Audit**: If the tracker is `resolved`, all tasks appear checked, or the previous session exit is unknown, run `uvx --from git+https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Fspec-kit-plus.git@4a631657f75460886dbd12ebe48b14fc11cfe0bf specify implement resume-audit --feature-dir \\\"$FEATURE_DIR\\\" --format json` before trusting completion.\n- Treat completed task markers as claims until changed paths, validation, required consumer evidence, review status, and mutation closeout prove them.\n- Choose `leader-direct` for a small or tightly coupled ready task when delegation adds no quality or critical-path benefit and no high-risk trigger calls for an independent lane.\n- Choose `one-subagent` for one independent bounded task and `parallel-subagents` only for validated lanes with isolated write sets and an explicit join point.\n- Compile and validate a `WorkerTaskPacket` just in time only for delegated work; leader-direct work does not require one.\n- If dispatch fails, record the event and re-evaluate route safety. Use leader-direct only if the task independently qualifies; otherwise repair the packet\u002Fsurface or block truthfully.\n- Wait for every subagent's structured handoff before accepting the join point, closing the batch, or declaring completion.\n- Do not treat an idle subagent as done work; idle without a consumed handoff means the result channel is still unresolved.\n- Require consumer evidence when a worker creates a reusable UI, route, provider, registry, factory, config, API, or test surface; a created but not wired file is not complete.\n- When a packet requires `real_entrypoint_evidence`, require `consumer_evidence` with `kind: real_entrypoint`, `entrypoint`, `producer`, `transformer`, `consumer`, `boundary_or_executor`, and `validation`; synthetic-only component, reducer, helper, or hand-built state evidence is not enough.\n- The leader must not edit a delegated lane's write scope while that subagent is active.\n- On technical blockers, attempt the smallest safe autonomous recovery or specialist lane before asking for manual intervention.\n\n## Claude Code Subagent Dispatch Contract\n\n- Execution model: `adaptive`\n- Dispatch shape: `one-subagent`, `parallel-subagents`, or `subagent-blocked`\n- Execution surface: `native-subagents`, `managed-team`, or `leader-inline`\n- Delegation surface contract: preserve the native dispatch, fallback, worker result contract, and handoff path below.\n- Native subagent capability discovery: Before recording `subagent-blocked`, check the active tool surface for the integration-native subagent or task-dispatch entrypoint and record the exact missing surface if unavailable.\n- Do not record `subagent-blocked` until this capability discovery step is complete and the exact unavailable or unsafe surface is recorded.\n- Native subagent dispatch: Dispatch subagents through the integration's native subagent support using the shared prompt contract.\n- Join behavior: Use the integration-native join point, then integrate results back on the leader path.\n- Managed-team fallback: No in-command team fallback for `sp-implement`; if subagents cannot proceed safely, stay on the leader path and record why.\n- Leader-direct route: valid for a small or tightly coupled task when it independently passes the workflow safety gate; record the selected route in the current lifecycle record.\n- Worker result contract: WorkerTaskResult contract with status, changed files, validation evidence, blockers, failed assumptions, and recovery guidance.\n- Result contract: WorkerTaskResult contract with status, changed files, validation evidence, blockers, failed assumptions, and recovery guidance.\n- Result handoff path: FEATURE_DIR\u002Fworker-results\u002F\u003Ctask-id>.json\n\n## Claude Code Subagent Result Contract\n\n- Worker result contract: preserve the shared `WorkerTaskResult` semantics even when the runtime calls lanes subagents.\n- Preferred result contract: WorkerTaskResult contract with status, changed files, validation evidence, blockers, failed assumptions, and recovery guidance.\n- Result file handoff path: FEATURE_DIR\u002Fworker-results\u002F\u003Ctask-id>.json\n- For filesystem handoffs, use `specify result path` with the concrete workflow identifiers such as `--feature-dir`\u002F`--task-id`, `--workspace`\u002F`--lane-id`, or `--session-slug`\u002F`--lane-id`.\n- `specify result path` emits JSON and does not accept `--format`; do not append `--format`.\n- Normalize subagent-reported statuses like `DONE`, `DONE_WITH_CONCERNS`, `BLOCKED`, and `NEEDS_CONTEXT` into the shared `WorkerTaskResult` contract before the leader accepts the handoff.\n- Keep `reported_status` when normalization occurs so runtime-specific subagent language can be reconciled with canonical orchestration state.\n- Wait for every subagent's structured handoff before accepting the join point, closing the batch, or declaring completion.\n- Do not treat an idle subagent as done work; idle without a consumed handoff means the result channel is still unresolved.\n- Do not interrupt or shut down subagent work before the handoff has been written or explicitly reported as `BLOCKED` or `NEEDS_CONTEXT`.\n- Treat `DONE_WITH_CONCERNS` as completed work plus follow-up concerns, not as silent success.\n- Treat `NEEDS_CONTEXT` as a blocked handoff that must carry the missing context or failed assumption explicitly.\n","## Invocation Syntax\n\n- In this integration, invoke workflow skills with `\u002Fsp-plan`-style syntax.\n- References such as `\u002Fsp.plan`, `\u002Fsp.tasks`, or `next_command: \u002Fsp.plan` are canonical workflow-state identifiers and handoff values.\n- Preserve those canonical state tokens exactly in artifacts and workflow state; do not rewrite them to this integration's invocation syntax.\n\n\n\n## Workflow Contract Summary\n\n- **When to use**: `tasks.md` is ready and the feature should move from planning into tracked execution batches.\n- **Primary objective**: Execute the ready batches while preserving tracker state, subagent contracts, verification discipline, and resumability.\n- **Primary outputs**: Verified code, test, and documentation changes plus compact execution state, one task lifecycle record per executed task, conditional drift\u002Frepair records, and `implementation-summary.md` for the active feature.\n- **Default handoff**: Continue with the next ready batch, route blockers into \u002Fsp-debug, or after technical closeout hand human product acceptance to \u002Fsp.accept and stop.\n- **Execution note**: This summary is routing metadata only. Follow the full contract below end-to-end rather than inferring behavior from the description alone.\n\n## Blocked Exit Contract\n\nIf blocked after safe recovery, read and follow\n`.specify\u002Ftemplates\u002Fworkflow-blocker-template.md` and its JSON schema. Never\nreturn only an error or “ask a human”; preserve state and keep agent-capable\nrepair agent-owned. Set `human_action_required: true` only for authority,\ncredentials, protected systems, human decisions\u002Freviews, or physical access.\nTailor steps, expected results, failure paths, evidence, and resume action to\nCI, visual review, or product decisions. Never claim completion.\n\n## User Input\n\n```text\n$ARGUMENTS\n```\n\nYou **MUST** consider the user input before proceeding (if not empty).\n\n## Objective\n\nAdvance the current feature through tracked implementation batches while keeping execution state, subagent work, verification evidence, and recovery paths explicit.\n\n## Context\n\n- Primary inputs: canonical `task-index.json` or the light leader-direct task list, current execution state, the current task's required refs, and live repository evidence for the touched area. The full plan\u002Fspec package is fallback evidence, not default intake.\n- The leader owns tracker truth, execution strategy, join points, blocker handling, and final validation.\n- Delegated workers own bounded implementation lanes only; they do not own the overall implementation state.\n\n\n## Claude Code Project Cognition Advisory Gate\n\n**Current-Task Navigation Repair**: Reuse the current task's required refs and live touched-area evidence. Only when a required ref is stale, missing, or contradicted by live code, run at most one `C:\\Users\\11034\\.specify\\bin\\project-cognition.exe compass --intent implement --query=\\\"$ARGUMENTS\\\" --format json` before any implementation actions. Read and carry `epistemic_contract`; require `graph_role=route_candidate_only`, `fact_source_of_truth=live_repository`, `live_verification_required=true`, `graph_only_claims_allowed=false`, and `unverified_claim_action=withhold`. The contract cannot authorize source changes and cannot prove current behavior; contradictory live evidence overrides the route candidate. Graph claims are indexed assertions; even `verified_in_graph_generation` is only an active graph-generation state, not current repository truth. Graph claims cannot authorize source changes and cannot set workflow `claim_ready=true`; bounded live evidence and the separate workflow final-claim gate remain required. Use `compass_state`, `minimal_live_reads`, `first_pass_paths`, `coverage_diagnostics`, and `expansion_ref` only to repair current-task context; they do not replace live proof or authorize broader implementation scope.\n- Read and carry `epistemic_contract`; require `graph_role=route_candidate_only`, `fact_source_of_truth=live_repository`, `live_verification_required=true`, `graph_only_claims_allowed=false`, and `unverified_claim_action=withhold`. The contract cannot authorize source changes and cannot prove current behavior; contradictory live evidence overrides the route candidate. Graph claims are indexed assertions; even `verified_in_graph_generation` is only an active graph-generation state, not current repository truth. Graph claims cannot authorize source changes and cannot set workflow `claim_ready=true`; bounded live evidence and the separate workflow final-claim gate remain required.\n- Interpret returned readiness: `query_ready` reads top-level `minimal_live_reads` first and then lane-level `first_pass_paths`; `review` permits only returned `minimal_live_reads` plus `coverage_diagnostics`; `needs_rebuild` treats map output as advisory, continues with live repository evidence, and recommends `{{invoke:map-scan}}`, then `{{invoke:map-build}}` only for brownfield first\u002Fmissing\u002Funusable baseline, schema failure, schema v1 or old broad-schema rebuild-required readiness, zero active-generation `path_index` rows outside a `greenfield_empty` baseline, missing or invalid `alias_index`, `explicit_rebuild_requested`, or `baseline_identity_invalid`; `blocked` reports the runtime issue as advisory map state and continues with live repository evidence; `unsupported_runtime` continues with live evidence and records that compass intake was unavailable. If `baseline_kind=greenfield_empty`, continue with workflow artifacts and live requirements instead of treating absent graph paths as `needs_rebuild`. If the user's actual request is to fix cognition runtime state, report the blocked state and follow the same map-update-first routing policy.\n- Use `map-update` for ordinary existing-baseline gaps. If `baseline_kind=greenfield_empty`, do not recommend map-scan -> map-build solely because the graph has no paths; continue with workflow artifacts and live requirements. Use `map-scan -> map-build` only for brownfield first\u002Fmissing\u002Funusable baseline, schema failure, schema v1 or old broad-schema rebuild-required readiness, zero active-generation `path_index` rows outside `greenfield_empty`, missing or invalid `alias_index`, `explicit_rebuild_requested`, or `baseline_identity_invalid`.\n- Treat the project cognition compass packet as advisory navigation for brownfield context; do not fall back to chat memory or ad hoc repository instincts when compass-backed runtime coverage should guide the route.\n- Treat this as advisory navigation, not a hard gate; continue with live repository evidence when the bundle is weak, stale, or missing, and use map maintenance only when it is actually useful.\n- Mutation closeout is separate from entry routing: entry stale may continue, but workflow-owned mutation closeout is not an external map-maintenance handoff. If the workflow changes source\u002Fruntime truth-owning surfaces, shared surfaces, command\u002Froute\u002Fcontract boundaries, verification entry points, runtime assumptions, or other project-related behavior surfaces, final state must run inline project cognition update from changed paths, affected surfaces, and verification evidence.\n- Inline project cognition update uses `project-cognition delta append` followed by `project-cognition update --delta-session \"$DELTA_SESSION_ID\" --reason workflow-finalize --format json` when a delta session exists, or `project-cognition update --payload-file \".specify\u002Fproject-cognition\u002Fupdates\u002F\u003Cupdate-id>.json\" --reason workflow-finalize --format json` when no delta session exists.\n- The payload-file path must include changed_paths, behavior_surfaces, generated_surfaces, state_contracts, verification, known_unknowns, and confidence_notes so the update is equivalent to `sp-map-update`, not just a path stamp; `verification_evidence` and `generated_surface_notes` are accepted compatibility aliases.\n- Use `known_unknowns` only for blockers that make the cognition update unsafe to trust. If unrelated dirty or untracked working-tree paths were excluded by explicit workflow-owned paths, record that as `confidence_notes` or `boundary.initial_dirty_paths`, not as blocking `known_unknowns`.\n- clean closeout keys on `result_state`, not `update_id`, `last_update_id`, or freshness alone. Treat `ready` and `no_op` as clean, `partial_refresh` as recorded but not fully clean, `needs_rebuild` as a map-scan\u002Fmap-build route, `blocked` as blocked, and `recorded` as legacy recorded-only output that is never clean completion.\n- Use `project-cognition mark-dirty --reason \"\u003Creason>\" --format json` only when inline update cannot complete. Dirty only when inline update cannot complete.\n- `sp-map-update` is for manual\u002Fexternal maintenance and follow-up repair after user edits, interrupted workflows, or explicit operator map-maintenance requests. It is not routine cleanup for changes this workflow just made.\n- A project-cognition compass intake is not complete when it returns JSON. It is complete only when readiness drives routing, `minimal_live_reads` constrains inspection, lane-level `first_pass_paths` reasons are considered, and relevant facts are carried into the next workflow artifact or execution state.\n- Carry forward only the current task's selected capability, minimal live reads, boundary constraints, required references, validation route, and evidence gaps into its lifecycle record or just-in-time `WorkerTaskPacket`.\n\n## Process\n\n- Recover compact execution state, validate the task-graph revision, and identify the current ready batch.\n- If the feature lane is not explicit, run `uvx --from git+https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Fspec-kit-plus.git@4a631657f75460886dbd12ebe48b14fc11cfe0bf specify lane resolve --command implement --ensure-worktree`; use the returned execution context\u002Fmaterialized worktree and stop on `uncertain`.\n- Read `FEATURE_DIR\u002Fworkflow-state.md` when present. If its canonical `next_command` still points to `\u002Fsp.analyze`, stop and honor that pending diagnostic gate rather than self-authorizing implementation from chat memory.\n- On resume, audit terminal-looking tracker\u002Ftask state before trusting completion; checked tasks are claims until validation, handoff, join point, and consumer evidence prove them. When `real_entrypoint_evidence` is required, synthetic-only consumer proof is not sufficient.\n- Carry every `CA-###` consequence obligation from packets into dispatch, implementation evidence, result acceptance, tracker open gaps, and stop-and-reopen routing.\n- Choose leader-direct or delegated execution. Compile and validate a WorkerTaskPacket just in time only for delegated work; do not require packets for leader-direct tasks.\n- Integrate worker results into one task lifecycle record with validation, review verdict, blockers, and recovery; keep execution truth current without duplicating task briefs, review packages, and ledgers.\n- Continue automatically until the feature is complete or blocked by a real blocker.\n\n## Output Contract\n\n- Produce verified implementation changes plus updated compact execution state for the active feature.\n- Keep one task lifecycle record per executed task aligned with what actually happened. Additional review or repair records are event-triggered rather than mandatory for every batch.\n- Report blockers, retries, and completion honestly rather than inferring success from partial progress.\n- On successful technical closeout, keep `active_command: sp-implement`, mark implementation `status: completed` with `phase_mode: execution-only`, set canonical `next_command: \u002Fsp.accept`, report `human-acceptance.json`, and hand off to `\u002Fsp-accept`. This is the default post-implement stage; do not pre-fill a human PASS, set `active_command: sp-accept` early, or continue into acceptance within the same invocation.\n- For any blocked, approval-gated, timeout-gated, or nonzero-verification exit, include an **Actionable Blocker Resolution** section instead of a bare blocked summary. It must name each blocker, `owner: agent | user | maintainer | external-system`, `exact_next_action`, `approval_question` when human approval is the next step, artifact or log evidence, `unblock_criteria`, and whether the rest of implementation can continue.\n- Do not leave the user to infer whether to handle the blocker. Say whether the blocker is mandatory for completion, optional cleanup, external baseline maintenance, or a follow-up risk, and name the next command or approval decision when one is known.\n- Preserve any `MP-*` obligations carried in task packets, implementation state, or result handoff expectations.\n- Worker result handoffs must include must-preserve evidence when packet obligations require it.\n- If implementation discovers a conflict with an `MP-*` obligation, return a blocked result instead of silently changing the protected discussion decision.\n\n## Guardrails\n\n- Do not dispatch from raw task text alone; compile and validate the packet first.\n- Do not bypass tracker truth, result handoffs, or verification gates.\n- Do not declare completion because tasks look checked off if the implementation contract is not actually satisfied.\n\n## Senior Consequence Analysis Gate\n\nRun this gate whenever the request, artifact set, defect, or planned change can affect lifecycle operations, running objects, concurrent work, destructive behavior, shared state, downstream consumers, compatibility, security-sensitive behavior, or multiple plausible product behaviors.\n\nProject cognition first. Use the project cognition runtime to identify ownership, consumers, state surfaces, change-propagation facts, verification routes, conflicts, known unknowns, and coverage gaps. Senior consequence analysis second. Turn those facts into explicit product and implementation obligations instead of treating the graph as the decision-maker.\n\nProject cognition readiness provides routing advice. If readiness is `query_ready`, read top-level `minimal_live_reads` first, then use lane-level `first_pass_paths` reasons. If readiness is `review`, inspect the returned `minimal_live_reads` before continuing and treat `coverage_diagnostics` as confidence and closeout signals. If readiness is `needs_rebuild`, continue with live repository evidence and recommend `\u002Fsp-map-scan -> \u002Fsp-map-build` only for brownfield first\u002Fmissing\u002Funusable baseline, schema failure, schema v1 or old broad-schema rebuild-required readiness, zero active-generation `path_index` rows outside `greenfield_empty`, missing or invalid `alias_index`, `explicit_rebuild_requested`, or `baseline_identity_invalid`. If readiness is `blocked`, report the blocked state and continue with live repository evidence unless the user's actual request is to fix cognition runtime state. If readiness is `unsupported_runtime`, continue with live evidence and record that compass intake was unavailable. If `baseline_kind=greenfield_empty`, continue with workflow artifacts and live requirements; do not recommend map-scan -> map-build solely because the graph has no paths. Carry relevant project cognition facts, returned `minimal_live_reads`, inference notes, and coverage gaps into the workflow's artifacts or durable state, but back consequence claims with live code, tests, scripts, configuration, or authoritative docs. Mutation closeout is separate from entry routing: entry stale may continue, but that does not allow source\u002Fruntime mutation workflows to defer closeout. Workflow-owned mutation closeout is not an external map-maintenance handoff; after changing project-related files or behavior, the workflow must run inline project cognition update from its changed paths, affected surfaces, and verification evidence, with `project-cognition mark-dirty` only as fallback when inline update cannot complete. `sp-map-update` is for manual\u002Fexternal maintenance and follow-up repair; it is external map maintenance, not routine closeout for this workflow's own changes. In shared routing summaries, sp-map-update is for manual\u002Fexternal maintenance and ordinary existing-baseline gaps.\n\nRequired output when the gate triggers:\n\n- **Affected Object Map**: name each object, record, worker, queue, artifact, command, API, file surface, user-visible state, or downstream consumer that can be affected.\n- **State-Behavior Matrix**: describe behavior for each important lifecycle state, including created, queued, running, paused, failed, cancelled, completed, resumed, archived, missing, stale, or partially refreshed states when relevant.\n- **Dependency Impact Table**: map direct dependencies, indirect consumers, shared state, compatibility surfaces, validation routes, and adjacent workflows that can break if semantics change.\n- **Recovery And Validation Contract**: state rollback, retry, idempotency, cleanup, migration, observability, and validation evidence required before handoff or completion.\n- **Coverage Gaps**: list what project cognition or live evidence cannot prove, who must resolve each gap, the latest safe resolve phase, the stop-and-reopen condition, and the routing decision: current workflow may continue with an assumption, must ask the user, must route to clarification or deep research, or must request map maintenance.\n- **Consequence Obligations**: assign stable `CA-###` IDs to every obligation that must survive downstream handoff, task generation, worker packets, verification, or debug closeout. Each `CA-###` must include claim, affected objects, owner workflow, latest resolve phase, status, and stop-and-reopen condition.\n\nStand down only for docs-only wording changes, trivial isolated fixes, or local refactors that cannot affect lifecycle operations, running state, destructive operations, shared state, downstream consumers, compatibility, security, or multiple behavior choices. Record the no-trigger reason or stand-down reason in the workflow's durable artifact or closeout before skipping the required outputs.\n\nIf the gate triggers and the current workflow cannot preserve the required outputs, stop and route to the workflow that can. Do not mark ready, resolved, handoff-ready, planning-ready, or complete while triggered consequence obligations remain unresolved, unmapped, or unsupported by validation evidence.\n\n## Agent Phase Handoff\n\nPhase handoff is an agent-only control surface. Human-facing explanation belongs in the visible reply or in project documents that have independent review value; it must not be duplicated into a handoff.\n\n- The previous phase's canonical JSON contract is the next phase's primary input.\n- Use the compact transition shape from `.specify\u002Ftemplates\u002Fagent-phase-transition-schema.json`: `status`, `source_ref`, `semantic_delta`, `required_refs`, `blockers`, `next_action`, and recovery only when blocked.\n- Carry the minimum sufficient context: include a fact only when omitting it could change the next action, lose a requirement or obligation, force rediscovery, weaken verification, or prevent safe recovery.\n- Preserve decisions, acceptance criteria, evidence provenance, `MP-*`, `CA-###`, and stop\u002Freopen conditions by stable reference. Do not copy their full bodies into every downstream artifact.\n- Protected `MP-*` and `CA-###` obligations must not drop between phases. A downstream phase may resolve or reopen them, but may not silently omit them.\n- Carry the locked implementation-target reference. A cross-project transition must not silently point to the current repository when the confirmed target differs.\n- Consume project rules and Learning through `learning start --command \u003Cclassic-command-name> -> list -> show`; run selected `show_argv` only. Constitution remains at `.specify\u002Fmemory\u002Fconstitution.md`; never parse Learning storage.\n- Capture at owning closeout only when the lesson would change a future action; prefer `learning capture-auto`.\n- A rendered Markdown view is never an agent handoff authority. Do not require Markdown\u002FJSON companion agreement.\n- Revalidate upstream truth only when its revision changed, evidence became stale, live repository facts contradict it, or the current phase discovers a scope, boundary, feasibility, or risk change.\n- If `semantic_delta` is empty, do not repeat upstream questions, approach selection, or user confirmation.\n\n## Deterministic Workflow Runtime\n\nFor a feature-bearing `specify -> plan -> tasks -> implement -> accept` stage,\nthe CLI owns phase order and `workflow-state.md`. Do not author or advance\n`workflow-state.md` by hand.\n\n- After `FEATURE_DIR` is known, run `uvx --from git+https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Fspec-kit-plus.git@4a631657f75460886dbd12ebe48b14fc11cfe0bf specify workflow show --feature-dir \u003Cfeature-dir> --format json`. If state is missing at the first feature stage, run `uvx --from git+https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Fspec-kit-plus.git@4a631657f75460886dbd12ebe48b14fc11cfe0bf specify workflow enter --command specify --feature-dir \u003Cfeature-dir> --format json`.\n- On entry to `plan`, `tasks`, `implement`, or `accept`, use the current revision with `uvx --from git+https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Fspec-kit-plus.git@4a631657f75460886dbd12ebe48b14fc11cfe0bf specify workflow transition --to \u003Cthis-stage> --feature-dir \u003Cfeature-dir> --expected-revision \u003Crevision> --format json` before writing that stage's artifacts. The command validates the completed source-stage artifacts and refuses skips, stale revisions, or incomplete handoffs with exit `10`.\n- The destination command owns the transition. A completed stage recommends the next command but must not execute `workflow transition` to that next stage in the same invocation.\n- Use `uvx --from git+https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Fspec-kit-plus.git@4a631657f75460886dbd12ebe48b14fc11cfe0bf specify workflow next --feature-dir \u003Cfeature-dir> --format json` for the compact next action. Execute only its structured `next_argv`; do not reconstruct flags from prose.\n- After safe agent recovery is exhausted, persist the blocker through `uvx --from git+https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Fspec-kit-plus.git@4a631657f75460886dbd12ebe48b14fc11cfe0bf specify workflow block --input \u003Cblocker-json-or-> --format json`. Obtain its exact input shape with `uvx --from git+https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Fspec-kit-plus.git@4a631657f75460886dbd12ebe48b14fc11cfe0bf specify api schema workflow-block-input --format json`; preserve the returned resume argv and human tutorial.\n- After explicit human acceptance and the acceptance-owned closeout both succeed, run `uvx --from git+https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Fspec-kit-plus.git@4a631657f75460886dbd12ebe48b14fc11cfe0bf specify workflow closeout --feature-dir \u003Cfeature-dir> --expected-revision \u003Crevision> --format json`. It validates acceptance artifacts before marking the feature workflow complete.\n\nFor every blocked exit, including a pre-feature discussion that cannot use the\nfeature runtime yet, follow\n`.specify\u002Ftemplates\u002Fworkflow-blocker-template.md` and its schema. Report the\nexact cause, sanitized evidence, attempted recovery and result, affected scope,\nsmallest next action, observable unblock criteria, and exact resume point. Keep\nagent-capable repair agent-owned. When authority, credentials, a protected\nsystem, physical access, or human judgment is genuinely required, add the full\nHuman Action Guide: goal, prerequisites, safety notes, numbered exact actions,\nexpected result and safe failure branch for every action, independent\nverification, sanitized evidence to return, and the exact resume command.\n\n[AGENT] For project-cognition-backed semantic intake, routing, audit, resume, or final-claim gates, read `references\u002Fsemantic-work-contract.md`.\n\n## Main Flow\n\n1. Run `.specify\u002Fscripts\u002Fpowershell\u002Fcheck-prerequisites.ps1 -Json -RequireTasks -IncludeTasks` to resolve the task-bearing feature context, then read canonical `task-index.json` or the light leader-direct task list, compact execution state, and current branch\u002Fworktree status. Load the current task plus its required refs; do not ingest the full upstream package when revisions are unchanged.\n2. Validate the task-graph revision and current ready batch. Compile delegated WorkerTaskPackets just in time from live code, establish RED-first validation for behavior changes, and do not claim completion from chat narration.\n3. Use `choose_subagent_dispatch(command_name=\"implement\", snapshot, workload_shape)` for safe worker lanes, use the current integration's native subagent lifecycle where available, and keep leader ownership of tracker state.\n4. Execute the current task or ready batch, update tracker fields, resolve blockers through bounded repair, and route unknown root cause to `\u002Fsp-debug`.\n5. Run event-triggered review for repository drift, parallel joins, write-scope drift, validation failure, worker concerns, obligation conflicts, or sequential change-window limits. Maintain one task lifecycle record containing packet\u002Fref, result, validation, review verdict, and recovery; report completion only when changed paths, validation evidence, review status, and mutation closeout are complete.\n6. For UI work, record task-lifecycle `ui_verification` with concrete evidence\n   refs after the real-entrypoint visual convergence loop. Set\n   `evidence_scope: task` and persist typed `structure_snapshot`,\n   `visual_capture`, and `runtime_diagnostics` evidence plus passing runtime\n   status. Use\n   `pending-human-review` only when objective visual evidence cannot close the\n   criterion; it blocks accepted closeout until resolved. Route an invalid,\n   bootstrap, or missing design source to `sp-design` instead of inventing one.\n7. After successful technical closeout, ensure `human-acceptance.json` was prepared from the fresh `implementation-summary.md`, recommend `\u002Fsp-accept`, and stop. Do not claim that automated verification or implementation completion equals human product acceptance.\n\n### Inline Project Cognition Update\n\nWorkflow-owned mutation closeout is not an external map-maintenance handoff and is not external map maintenance. It is the workflow-local form of `\u002Fsp-map-update`. If this workflow changed project-related source, runtime, templates, generated assets, config, tests, state contracts, shared surfaces, or behavior-bearing docs, closeout MUST run inline project cognition update for the workflow-owned changed paths and affected surfaces before claiming clean completion.\n\nCall the planner first:\n\n```text\nproject-cognition closeout-plan --workflow \"$ACTIVE_WORKFLOW\" --format json\n```\n\nWhen `DELTA_SESSION_ID` exists, pass it into the planner:\n\n```text\nproject-cognition closeout-plan --workflow \"$ACTIVE_WORKFLOW\" --delta-session \"$DELTA_SESSION_ID\" --format json\n```\n\nConsume `workflow_canonical`, `update_mode`, `payload_draft`, `required_agent_fields`, `unknown_paths`, `unknown_path_dispositions`, `delta_append_draft`, display-only `delta_append_command`, `update_argv`, display-only `update_command`, and `recommended_next_command`.\n\nBefore running `update`, fill the fields listed in `required_agent_fields` from live evidence from this workflow. Supported agent-owned evidence fields include:\n\n- `verification`\n- `behavior_surfaces`\n- `generated_surfaces`\n- `state_contracts`\n- `known_unknowns`\n- `confidence_notes`\n- `user_decisions`\n- `boundary`\n\nIf a field appears in `required_agent_fields`, provide live-evidence-backed content for it. Fields not listed by `required_agent_fields`, such as `known_unknowns` and `boundary`, are populated only when live evidence supports them; do not invent them to satisfy the shape.\nUse `known_unknowns` only for blockers that make the cognition update unsafe to trust. If the working tree contains unrelated dirty\u002Funtracked paths and the workflow uses explicit workflow-owned paths, record that as `confidence_notes` or `boundary.initial_dirty_paths`, not as a blocking `known_unknowns` item.\n\nFor each `unknown_path_dispositions[]` item, set `agent_disposition` to exactly one allowed value:\n\n- `adoptable`: verified new path inside this workflow-owned scope; it may be recorded in changed\u002Fscope paths and verified adoptable paths do not become blocking `known_unknowns`.\n- `review_only`: path informed review but is not adopted into changed coverage.\n- `ignored`: path remains excluded and must not enter payloads, records, route indexes, evidence, aliases, or minimal live reads.\n- `blocking_known_unknown`: record it as a known unknown and report partial or blocked cognition closeout.\n\n`agent_disposition=adoptable` is an agent accounting decision, not proof that runtime indexing already succeeded. Runtime adoption still requires a usable active project-cognition DB, at least one passing verification evidence item, and no blocking `known_unknowns`. After `update_argv` runs, inspect `result_state`, `adopted_paths`, `review_paths`, `minimal_live_reads`, and `partial_refresh_reasons`; do not explain a remaining `partial_refresh` as \"path_index missing\" until those fields show which adoption gate failed.\n\nIf `update_mode=delta_session`, complete `delta_append_draft.argv_prefix` with agent-owned repeatable flags such as `--behavior-surface`, `--generated-surface`, `--verification`, and accepted `--known-unknown` values from `delta_append_draft.argv_placeholders`. Then append the delta event and run `update_argv`. `delta_append_command` and `update_command` are display-only placeholders, not execution strings.\n\nIf `update_mode=payload_file`, write the completed `payload_draft` to the planner's `payload_path`. Then run `update_argv`. `update_command` is a display-only placeholder, not an execution string.\n\nCompleted payload drafts preserve the planner-owned `changed_paths` and `scope_paths` and add agent-owned evidence fields before recording.\n\nStructured `update` invalidates related claims and returns their stable IDs in `affected_graph_claims`. This is separate from update readiness: generic workflow verification and `result_state=ready` must not re-promote stale or contradicted graph claims. Only when this workflow already has decisive claim-specific bounded live evidence for an exact returned claim ID may it submit semantic reconciliation intent and run:\n\n```text\nproject-cognition claim-reconcile prepare --input \u003Cintent.json> --format json\nproject-cognition claim-reconcile apply --input \u003Cprepared_packet_path> --format json\n```\n\nProvide only reconciliation intent: workflow, stable `claim_id`, reason, and evidence containing repository-relative `source_path`, bounded line `span`, and `supporting` or `contradicting` role. Add verification only when it is claim-specific. The runtime owns the contract version, active generation, expected state and revision, UTC observation and expiry, source kind, content hashes, repository snapshot, IDs, and prepared packet path. Do not author or edit those integrity fields; execute the returned `apply_argv` exactly. If no such evidence exists, leave the claim stale. If reconciliation returns ready, rerun Compass once so later routing consumes the current evidence basis; partial or blocked reconciliation remains withheld and follows `recommended_next_action`.\n\nFor compatibility with worker handoffs and delta packets, the runtime also accepts `verification_evidence` as an alias for `verification` and `generated_surface_notes` as an alias for `generated_surfaces`. Verification evidence may be an array of objects (`command`, `result`, `artifact`) or an array of command-result strings, but clean closeout still requires passing verification evidence; failed verification cannot produce a clean `ready` closeout.\n\nClean closeout keys on `result_state`, not `status=ok`, `update_id`, `last_update_id`, or freshness alone:\n\n- `ready` or `no_op`: project cognition closeout may be clean when ordinary verification also passed.\n- `partial_refresh`: useful update data was written, but the final workflow state must report partial cognition closeout, `partial_refresh_reasons`, and the returned `minimal_live_reads`. If `partial_refresh_reasons` includes `missing_passing_verification_result`, repair the payload or delta evidence and rerun `update_argv` before final closeout; do not route that to `sp-map-update`. If verified workflow-owned paths still remain in `review_paths` after the update, report implementation completion separately from project-cognition maintenance and name `\u002Fsp-map-update` as follow-up repair.\n- `needs_rebuild`: report the exact rebuild condition and route to `\u002Fsp-map-scan`, then `\u002Fsp-map-build`.\n- `blocked`: report the runtime or validation blocker and the exact recovery command.\n- `recorded`: legacy recorded-only output; treat it as partial or blocked, never as clean completion.\n\nNever run the `complete-refresh` or `clear-dirty` helper after `result_state=partial_refresh`, `needs_rebuild`, `blocked`, or legacy `recorded`; those helpers are only for states that the runtime and validation prove ready.\n\nDirty fallback command shape: `C:\\Users\\11034\\.specify\\bin\\project-cognition.exe mark-dirty --reason \\\"\u003Creason>\\\" --format json`.\nUse `C:\\Users\\11034\\.specify\\bin\\project-cognition.exe mark-dirty --reason \\\"workflow-closeout-failed\\\" --format json` only when inline update cannot complete: when the planner or update command is unavailable, cannot record useful update data, cannot identify workflow-owned scope, or cannot be trusted because verification\u002Fworkflow completion is not trustworthy. Dirty only when inline update cannot complete.\n\nsp-map-update is for manual\u002Fexternal maintenance and follow-up repair. `\u002Fsp-map-update` remains the external\u002Fmanual workflow for user edits, interrupted workflow repair, explicit map maintenance, and follow-up repair. It is not routine cleanup for changes this workflow just made. If `sp-map-update` already ran `project-cognition update --reason map-update` for the same changed paths, do not run a second `workflow-finalize` closeout update for those paths.\n\n## Detailed References\n\nRead [Reference index](references\u002FINDEX.md) before applying detailed contracts.\n\n- [task intake and tracker](references\u002Ftask-intake-and-tracker.md)\n- [red first and validation](references\u002Fred-first-and-validation.md)\n- [subagent worker contract](references\u002Fsubagent-worker-contract.md)\n- [join point review](references\u002Fjoin-point-review.md)\n- [safe repair loop](references\u002Fsafe-repair-loop.md)\n- [final reconciliation and closeout](references\u002Fbranch-review-and-closeout.md)\n\n## Claude Code Leader Gate\n\nWhen running `sp-implement` in Claude Code, you are the leader and own route selection, execution-state truth, acceptance, and recovery.\n\n**Current-Task Navigation Repair**: Reuse the current task's required refs and live touched-area evidence. Only when a required ref is stale, missing, or contradicted by live code, run at most one `C:\\Users\\11034\\.specify\\bin\\project-cognition.exe compass --intent implement --query=\\\"$ARGUMENTS\\\" --format json` before any implementation actions. Read and carry `epistemic_contract`; require `graph_role=route_candidate_only`, `fact_source_of_truth=live_repository`, `live_verification_required=true`, `graph_only_claims_allowed=false`, and `unverified_claim_action=withhold`. The contract cannot authorize source changes and cannot prove current behavior; contradictory live evidence overrides the route candidate. Graph claims are indexed assertions; even `verified_in_graph_generation` is only an active graph-generation state, not current repository truth. Graph claims cannot authorize source changes and cannot set workflow `claim_ready=true`; bounded live evidence and the separate workflow final-claim gate remain required. Use `compass_state`, `minimal_live_reads`, `first_pass_paths`, `coverage_diagnostics`, and `expansion_ref` only to repair current-task context; they do not replace live proof or authorize broader implementation scope.\n\nBefore implementation actions:\n- Read canonical `task-index.json` or the light direct task list, compact execution state, and the current task's required refs.\n- **Resume Audit**: If the tracker is `resolved`, all tasks appear checked, or the previous session exit is unknown, run `uvx --from git+https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Fspec-kit-plus.git@4a631657f75460886dbd12ebe48b14fc11cfe0bf specify implement resume-audit --feature-dir \\\"$FEATURE_DIR\\\" --format json` before trusting completion.\n- Treat completed task markers as claims until changed paths, validation, required consumer evidence, review status, and mutation closeout prove them.\n- Choose `leader-direct` for a small or tightly coupled ready task when delegation adds no quality or critical-path benefit and no high-risk trigger calls for an independent lane.\n- Choose `one-subagent` for one independent bounded task and `parallel-subagents` only for validated lanes with isolated write sets and an explicit join point.\n- Compile and validate a `WorkerTaskPacket` just in time only for delegated work; leader-direct work does not require one.\n- If dispatch fails, record the event and re-evaluate route safety. Use leader-direct only if the task independently qualifies; otherwise repair the packet\u002Fsurface or block truthfully.\n- Wait for every subagent's structured handoff before accepting the join point, closing the batch, or declaring completion.\n- Do not treat an idle subagent as done work; idle without a consumed handoff means the result channel is still unresolved.\n- Require consumer evidence when a worker creates a reusable UI, route, provider, registry, factory, config, API, or test surface; a created but not wired file is not complete.\n- When a packet requires `real_entrypoint_evidence`, require `consumer_evidence` with `kind: real_entrypoint`, `entrypoint`, `producer`, `transformer`, `consumer`, `boundary_or_executor`, and `validation`; synthetic-only component, reducer, helper, or hand-built state evidence is not enough.\n- The leader must not edit a delegated lane's write scope while that subagent is active.\n- On technical blockers, attempt the smallest safe autonomous recovery or specialist lane before asking for manual intervention.\n\n## Claude Code Subagent Dispatch Contract\n\n- Execution model: `adaptive`\n- Dispatch shape: `one-subagent`, `parallel-subagents`, or `subagent-blocked`\n- Execution surface: `native-subagents`, `managed-team`, or `leader-inline`\n- Delegation surface contract: preserve the native dispatch, fallback, worker result contract, and handoff path below.\n- Native subagent capability discovery: Before recording `subagent-blocked`, check the active tool surface for the integration-native subagent or task-dispatch entrypoint and record the exact missing surface if unavailable.\n- Do not record `subagent-blocked` until this capability discovery step is complete and the exact unavailable or unsafe surface is recorded.\n- Native subagent dispatch: Dispatch subagents through the integration's native subagent support using the shared prompt contract.\n- Join behavior: Use the integration-native join point, then integrate results back on the leader path.\n- Managed-team fallback: No in-command team fallback for `sp-implement`; if subagents cannot proceed safely, stay on the leader path and record why.\n- Leader-direct route: valid for a small or tightly coupled task when it independently passes the workflow safety gate; record the selected route in the current lifecycle record.\n- Worker result contract: WorkerTaskResult contract with status, changed files, validation evidence, blockers, failed assumptions, and recovery guidance.\n- Result contract: WorkerTaskResult contract with status, changed files, validation evidence, blockers, failed assumptions, and recovery guidance.\n- Result handoff path: FEATURE_DIR\u002Fworker-results\u002F\u003Ctask-id>.json\n\n## Claude Code Subagent Result Contract\n\n- Worker result contract: preserve the shared `WorkerTaskResult` semantics even when the runtime calls lanes subagents.\n- Preferred result contract: WorkerTaskResult contract with status, changed files, validation evidence, blockers, failed assumptions, and recovery guidance.\n- Result file handoff path: FEATURE_DIR\u002Fworker-results\u002F\u003Ctask-id>.json\n- For filesystem handoffs, use `specify result path` with the concrete workflow identifiers such as `--feature-dir`\u002F`--task-id`, `--workspace`\u002F`--lane-id`, or `--session-slug`\u002F`--lane-id`.\n- `specify result path` emits JSON and does not accept `--format`; do not append `--format`.\n- Normalize subagent-reported statuses like `DONE`, `DONE_WITH_CONCERNS`, `BLOCKED`, and `NEEDS_CONTEXT` into the shared `WorkerTaskResult` contract before the leader accepts the handoff.\n- Keep `reported_status` when normalization occurs so runtime-specific subagent language can be reconciled with canonical orchestration state.\n- Wait for every subagent's structured handoff before accepting the join point, closing the batch, or declaring completion.\n- Do not treat an idle subagent as done work; idle without a consumed handoff means the result channel is still unresolved.\n- Do not interrupt or shut down subagent work before the handoff has been written or explicitly reported as `BLOCKED` or `NEEDS_CONTEXT`.\n- Treat `DONE_WITH_CONCERNS` as completed work plus follow-up concerns, not as silent success.\n- Treat `NEEDS_CONTEXT` as a blocked handoff that must carry the missing context or failed assumption explicitly.\n",{"name":5,"metadata":24,"description":7,"argument-hint":27,"compatibility":28,"user-invocable":29},{"author":25,"source":26},"github-spec-kit","templates\u002Fcommands\u002Fimplement.md","Optional implementation guidance or task filter","Requires spec-kit project structure with .specify\u002F directory",true,"main","021f5cbe02157229460a577e9a585f2da6d78cb0",".claude\u002Fskills\u002Fsp-implement","https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck","https:\u002F\u002Fgithub.com\u002Fchenziyang110","2026-08-07 18:10:54",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":29},[38,41,44],{"tool":39,"command":40},"npx","npx skills add chenziyang110\u002Flaunchdeck --skill sp-implement",{"tool":42,"command":43},"bunx","bunx skills add chenziyang110\u002Flaunchdeck --skill sp-implement",{"tool":45,"command":46},"pnpm","pnpm dlx skills add chenziyang110\u002Flaunchdeck --skill sp-implement","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsp-implement\u002FSKILL.md",[49,55,59,63,67,71,75,79],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"references\u002Fbranch-review-and-closeout.md","REFERENCE","参考文档",6131,"https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsp-implement\u002Freferences\u002Fbranch-review-and-closeout.md",{"path":56,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002FINDEX.md",1488,"https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsp-implement\u002Freferences\u002FINDEX.md",{"path":60,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Fjoin-point-review.md",4381,"https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsp-implement\u002Freferences\u002Fjoin-point-review.md",{"path":64,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Fred-first-and-validation.md",1896,"https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsp-implement\u002Freferences\u002Fred-first-and-validation.md",{"path":68,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Fsafe-repair-loop.md",2739,"https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsp-implement\u002Freferences\u002Fsafe-repair-loop.md",{"path":72,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Fsemantic-work-contract.md",32227,"https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsp-implement\u002Freferences\u002Fsemantic-work-contract.md",{"path":76,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Fsubagent-worker-contract.md",6238,"https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsp-implement\u002Freferences\u002Fsubagent-worker-contract.md",{"path":80,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002Ftask-intake-and-tracker.md",2917,"https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsp-implement\u002Freferences\u002Ftask-intake-and-tracker.md",[84,91,97,103,110,119],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7875F3HQ1GF5F6BR36KY3JE","launchdeck-agent","Codex host adapter contract fixture for Launchdeck.","https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fagent-hosts\u002Fcodex\u002Fskill\u002FSKILL.md",[],[],{"skillNo":92,"name":86,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M7875DV2DQR33K1NFJHKAMZP","Claude host adapter contract fixture for Launchdeck.","https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fagent-hosts\u002Fclaude\u002Fskill\u002FSKILL.md",[],[],{"skillNo":98,"name":86,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M78759JQ7A6FQ8KDQTNYS3X9","Use this skill aggressively for local project lifecycle operations even when the user does not mention Launchdeck: start this project, run the dev server, dev, build, test, restart service, stop service, show logs, inspect ports, port is occupied, clean cache; and when the user explicitly asks to configure this local project for Launchdeck or create or generate a project-adapted `.launchdeck.yml`, including 为这个项目生成 Launchdeck 配置. Do not use for ordinary code edits, docs-only work, general explanations, API design discussion, or production deployment unless the user also asks to operate or configure a local project or service.","https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002Fagent\u002Finstaller-payload\u002Fskill\u002Flaunchdeck-agent\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":19},"01M78753ZJQ7G2CZT1W1G8WRJV","zig-testing","Use ONLY when user explicitly requests Zig test code, built-in test runner configuration,\ntest failure diagnosis, or coverage for Zig projects.\n\nTriggers: \"write test zig\", \"zig test\", \"testing.allocator\", \"zig coverage\",\n\"comptime test\", \"zig expectError\", \"zig snapshot test\", \"zig fuzz\".\n\nDo NOT activate for: general Zig coding without test context, build.zig configuration\nfor non-test targets, Zig compiler errors, or Zig build system setup.","https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002F.specify\u002Ftemplates\u002Fpassive-skills\u002Fzig-testing\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":115,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":19},"01M78750JXY4Z5D5W1EX3PQ31Z","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002F.specify\u002Ftemplates\u002Fpassive-skills\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002F.specify\u002Ftemplates\u002Fpassive-skills\u002Fwebapp-testing\u002FSKILL.md",[],[],{"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":19},"01M7874X2T83EQQFRCEY5SJJVC","verification-before-completion","Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always","https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002F.specify\u002Ftemplates\u002Fpassive-skills\u002Fverification-before-completion\u002FSKILL.md",[],[]]