[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M786C7C6H7VA3RXZMEEEMDPM":3,"skill-same:01M786C7C6H7VA3RXZMEEEMDPM":59},{"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},"01M786C7C6H7VA3RXZMEEEMDPM","sp-map-scan",null,"Use when a brownfield workflow needs a fresh graph-native cognition baseline and you must collect full project-internal evidence before graph reconstruction.","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-map-scan\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: \"sp-map-scan\"\ndescription: \"Use when a brownfield workflow needs a fresh graph-native cognition baseline and you must collect full project-internal evidence before graph reconstruction.\"\nargument-hint: \"Optional subsystem, directory, or workflow area to emphasize while scanning\"\ncompatibility: \"Requires spec-kit project structure with .specify\u002F directory\"\nmetadata:\n  author: \"github-spec-kit\"\n  source: \"templates\u002Fcommands\u002Fmap-scan.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**: A workflow needs reliable brownfield cognition and no graph-native baseline exists yet, or a full baseline rebuild is explicitly required.\n- **Primary objective**: Enumerate the full project file universe cheaply, classify file value, deep-scan the highest-value project evidence, build provisional nodes and candidate edges, and publish the scan artifacts required for graph reconstruction.\n- **Primary outputs**: `.specify\u002Fproject-cognition\u002Fstatus.json`, `.specify\u002Fproject-cognition\u002Fevidence\u002F`, `.specify\u002Fproject-cognition\u002Fprovisional\u002Fnodes.json`, `.specify\u002Fproject-cognition\u002Fprovisional\u002Fedges.json`, `.specify\u002Fproject-cognition\u002Fprovisional\u002Fobservations.json`, `.specify\u002Fproject-cognition\u002Fcoverage.json`, `.specify\u002Fproject-cognition\u002Fworkbench\u002Frepository-universe.json`, `.specify\u002Fproject-cognition\u002Fworkbench\u002Fscan-targets.json`, `.specify\u002Fproject-cognition\u002Fworkbench\u002Fcoverage-ledger.*`, `.specify\u002Fproject-cognition\u002Fworkbench\u002Fscan-queue.json`, `.specify\u002Fproject-cognition\u002Fworkbench\u002Fhandoff-ledger.json`, and `.specify\u002Fproject-cognition\u002Fworkbench\u002Fmap-state.md`.\n- **Default handoff**: \u002Fsp-map-build after the evidence baseline is complete and the scan outputs are ready for graph reconstruction.\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\nGenerate a complete graph-native evidence baseline for the current codebase.\n\n## Context\n\n- Primary inputs: git-baseline diff data when available, live repository surfaces, existing reference artifacts, passive learning files as read-only workflow guidance, not scan evidence, and optional focus hints from `$ARGUMENTS`.\n- This command owns graph-native evidence-baseline outputs only; it must not write final cognition truth.\n- Legacy atlas artifacts such as `PROJECT-HANDBOOK.md` may be read only when explicitly relevant to migration or export parity; they must not become scan targets.\n- `.specify\u002F**` is workflow\u002Fruntime state, not project graph evidence; `.specify\u002F**` paths may be read only for command operation or validation and must not become scan targets or graph paths.\n- Resolve the candidate scan set through `project-cognition scan-set` before repository inventory, evidence, coverage, or packet scope. The runtime applies project cognition ignore rules from root `.cognitionignore` and `.specify\u002Fproject-cognition\u002F.cognitionignore`, built-in low-signal exclusions, binary-file suppression, and obvious secret-path suppression. These rules are for project cognition only.\n- Before subagent dispatch, write the canonical boundary in `.specify\u002Fproject-cognition\u002Fworkbench\u002Frepository-universe.json` from the resolved scan-set file; do not substitute raw `rg --files`, broad directory globs, or free-form agent judgment about what to omit.\n- [AGENT] Treat `scan-queue.json` and `handoff-ledger.json` as required scan workbench artifacts before `validate-scan`.\n- Stage the canonical boundary artifact before dispatch, then accept scan packets only after the leader verifies packet-local ledger accounting for every assigned path and a `worker-results\u002F\u003Cpacket-id>.json` handoff whose `paths_read` is a non-empty concrete path array.\n- Machine contract: each `worker-results\u002F\u003Cpacket-id>.json` handoff must put the packet-local ledger in top-level `ledger` with `todo`, `doing`, `done`, `blocked`, and `overflow`; do not write `packet_local_ledger`, `packet-local-ledger`, or Markdown-only ledger sections.\n- Treat `.cognitionignore` and `scan-set` runtime exclusions as boundary sources recorded in `decision_source`; excluded paths stay in boundary accounting and out of graph-facing coverage.\n- The resulting evidence baseline must let `sp-map-build` reconstruct the project cognition graph from live-surface evidence without inventing scan scope.\n- Maintain `.specify\u002Fproject-cognition\u002Fstatus.json` as the baseline state surface for graph-native cognition readiness.\n- If native subagent dispatch is unavailable or a substantive scan lane cannot complete, persist `subagent_blocked` in machine-readable state and block baseline activation until recovery. `coverage-ledger.json.open_gaps[]` may use `low_risk_open_gap` only with owner, reason, evidence expectation, and revisit condition.\n\n## Ignore Configuration Gate\n\n- Before repository inventory, run:\n\n```text\nC:\\Users\\11034\\.specify\\bin\\project-cognition.exe generate-ignore --format json\n```\n\n- If the command returns `status=created`, review `.specify\u002Fproject-cognition\u002F.cognitionignore` with the user and wait for confirmation before continuing to inventory, packet dispatch, or writing `repository-universe.json`.\n- Treat commented starter suggestions as inactive. They are review prompts, not exclusions, until the user removes the comment marker.\n- Preserve root `.cognitionignore` and existing `.specify\u002Fproject-cognition\u002F.cognitionignore` content; `generate-ignore` must not overwrite an existing ignore file.\n\nAfter the ignore gate is clear, resolve the agent-facing candidate file list:\n\n```text\nC:\\Users\\11034\\.specify\\bin\\project-cognition.exe scan-set --out .specify\u002Fproject-cognition\u002Ftmp\u002Fscan-files.json --format json\n```\n\n- Default stdout is compact JSON containing only the scan-set file path and count.\n- The handoff file is a temporary agent-facing scan-set containing only `files`.\n- If focus hints from `$ARGUMENTS` intentionally narrow the scan, pass them as concrete repeated `--scope` values and rerun `scan-set`; do not narrow by deleting paths from the resolved file manually.\n\n[AGENT] For project-cognition-backed semantic intake, routing, audit, resume, or final-claim gates, read `references\u002Fsemantic-work-contract.md`.\n\n## Detailed References\n\nRead [Reference index](references\u002FINDEX.md) before applying shared semantic contracts.\n\n- [semantic work contract](references\u002Fsemantic-work-contract.md)\n\n## Mandatory Subagent Execution\n\nAll substantive tasks in ordinary `sp-*` workflows default to and must use subagents.\n\nThe leader orchestrates: route, split tasks, prepare task contracts, dispatch subagents, wait for structured handoffs, integrate results, verify, and update state.\n\nBefore dispatch, every subagent lane needs a task contract with objective, authoritative inputs, allowed read\u002Fwrite scope, forbidden paths, acceptance checks, verification evidence, and structured handoff format.\n\nUse `execution_model: subagent-mandatory`.\nUse `dispatch_shape: one-subagent | parallel-subagents`.\nUse `execution_surface: native-subagents`.\n\n## Process\n\n- Before repository inventory, run `project-cognition generate-ignore --format json`. If it creates `.specify\u002Fproject-cognition\u002F.cognitionignore`, ask the user to review the starter suggestions and wait for confirmation before continuing.\n- After the ignore gate is clear, run `project-cognition scan-set --out .specify\u002Fproject-cognition\u002Ftmp\u002Fscan-files.json --format json` and use the returned file list as the candidate scan set. The agent may choose scan intent and concrete `--scope` values, but `project-cognition scan-set` decides the initial included file list through deterministic runtime rules; do not let the agent freely decide which files to omit.\n- Build a value-weighted evidence baseline before any graph reconstruction work begins.\n- First spread out the resolved scan set as a cheap inventory pass: enumerate paths, metadata, runtime exclusion status, Git tracking status, size, extension, directory family, and likely generated\u002Fvendor\u002Ftest\u002Fdoc\u002Fconfig\u002Fsource classification without deep-reading file contents.\n- Classify every non-excluded candidate path by value tier before dispatch: `P0` core behavior and entry surfaces, `P1` supporting contracts and runtime\u002Fconfig surfaces, `P2` selective tests\u002Fdocs\u002Fexamples, and `P3` low-signal generated\u002Fvendor\u002Fassets\u002Fcache\u002Fstatic output.\n- Deep-scan `P0` and `P1` first. Use `P2` selectively when it proves behavior, verification, or public contracts. Keep `P3` as inventory-only or excluded unless the user explicitly asks for that surface or it is the only evidence for a critical behavior.\n- Write `.specify\u002Fproject-cognition\u002Fworkbench\u002Fscan-targets.json` after classification and before dispatch. It is the leader-owned execution target list derived from `repository-universe.json`.\n- Dispatch each bounded scan lane only from a validated `MapScanPacket`.\n- Wait for every dispatched lane's structured handoff before accepting scan coverage.\n- If a safe scan lane cannot be packetized or delegated, record `subagent-blocked` and stop for escalation or recovery.\n\n## Value-Weighted Repository Inventory\n\n`sp-map-scan` must inventory all candidate paths from the runtime-resolved scan\nset, but it must not deep-read all files by default. The first pass is a\npath-level accounting pass, not a content scan.\n\nWrite `.specify\u002Fproject-cognition\u002Fworkbench\u002Frepository-universe.json` with one\nrow per candidate path from `.specify\u002Fproject-cognition\u002Ftmp\u002Fscan-files.json`.\nRuntime-excluded paths may be recorded only in boundary accounting when the\nruntime exposes them through a debug\u002Fexplain path; the default agent-facing\nscan-set handoff intentionally contains only included files. Each included or\nambiguous row should record:\n\n- `path`: repository-relative path\n- `path_kind`: `source`, `test`, `config`, `script`, `doc`, `template`, `asset`, `generated`, `vendor`, `build_output`, `lockfile`, `unknown`\n- `extension`\n- `size_bytes`\n- `directory_family`\n- `git_tracked`\n- `ignored_by_cognition`\n- `matched_ignore_rule` when applicable\n- `value_tier`: `P0`, `P1`, `P2`, or `P3`\n- `scan_decision`: `scan`, `sample`, `inventory_only`, `exclude`, or `blocked`\n- `disposition`: existing boundary disposition: `deep_read`, `sampled`, `inventory_only`, `excluded`, or `blocked`\n- `criticality`: `critical`, `important`, or `low_risk`\n- `classification_reasons`\n- `decision_source`\n\nValue tier rules:\n\n- `P0`: application\u002Fruntime entrypoints, CLI commands, routes\u002Fcontrollers,\n  public APIs, core services, state machines, data flow owners, protocol\n  boundaries, security\u002Fauth\u002Fpayment\u002Fdestructive-operation surfaces, generated\n  source templates that affect downstream behavior, and primary user workflows.\n- `P1`: package\u002Fbuild\u002Fconfig manifests, CI\u002Frelease scripts, migrations\u002Fschemas,\n  adapter boundaries, feature gates, runtime wiring, verification entrypoints,\n  and docs that define behavior or operator contracts.\n- `P2`: tests, examples, secondary docs, story\u002Fdemo files, and usage samples.\n  Scan them when they prove behavior, expected contracts, or verification\n  reachability; otherwise sample or inventory them.\n- `P3`: vendored dependencies, generated bundles, cache\u002Fbuild\u002Fdist output,\n  binary\u002Fstatic assets, lockfiles that do not define behavior beyond dependency\n  identity, archived material, and large low-signal files. Keep these as\n  `inventory_only` or `excluded` unless explicitly needed.\n\nWrite `.specify\u002Fproject-cognition\u002Fworkbench\u002Fscan-targets.json` with the subset\nselected for packet dispatch. It must include:\n\n- `schema_version`\n- `selection_policy: \"value_weighted\"`\n- `selected_paths`\n- `sampled_paths`\n- `inventory_only_paths`\n- `excluded_paths`\n- `blocked_paths`\n- per-path `value_tier`, `scan_decision`, `disposition`, `criticality`, and\n  `classification_reasons`\n\nHigh-value coverage is more important than raw path-count coverage. A scan can\nvalidly leave many `P3` paths inventory-only, but it must not leave unexplained\n`P0` or `P1` gaps.\n\n## Machine-Readable Blocked State\n\nHuman workflow prose may say `subagent-blocked`, but persisted machine fields use\n`subagent_blocked`.\n\nIf a substantive scan\u002Fbuild lane cannot dispatch or complete, write:\n\n- `.specify\u002Fproject-cognition\u002Fstatus.json` with `baseline_state=blocked` and\n  `subagent_blocked` in `stale_reasons` or `dirty_reasons`\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Fmap-state.md` with\n  `readiness=blocked`, `blocking_reason=subagent_blocked`, blocked lane ids,\n  blocked scope, and recovery condition\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Fcoverage-ledger.json.open_gaps[]` with\n  `reason=\"subagent_blocked\"`, `lane_id`, `packet_id`, `blocked_scope`,\n  `criticality`, `owner`, `status=\"blocked\"`, and `recovery_condition`\n\n`unknown` blocks, `blocked`, `critical_open_gap`, and `subagent_blocked` block baseline\nactivation. `low_risk_open_gap` may pass only with owner, reason,\n`evidence_expectation`, and `revisit_condition`.\n\n## Project Learning\n\nThe CLI is the only agent-facing Learning read surface:\n\n1. Run `uvx --from git+https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Fspec-kit-plus.git@4a631657f75460886dbd12ebe48b14fc11cfe0bf specify learning start --command \u003Cclassic-command-name> --format json` before deeper non-trivial work.\n2. Select summaries by applicability and triggers; use `uvx --from git+https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Fspec-kit-plus.git@4a631657f75460886dbd12ebe48b14fc11cfe0bf specify learning list --command \u003Cclassic-command-name> --format json` only to filter or page.\n3. Execute one matching card's `show_argv`. Do not parse Learning storage.\n\n`start`, `list`, and `show` are read-only. Current repository evidence,\n`.specify\u002Fmemory\u002Fconstitution.md`, and explicit user direction override stale or\ncandidate Learning.\n\nAt closeout, corrections, retries, route changes, recovery, false leads, hidden\ndependencies, validation\u002Ftooling\u002Fstate\u002Fcognition gaps, constraints, and near\nmisses are capture signals. Prefer `uvx --from git+https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Fspec-kit-plus.git@4a631657f75460886dbd12ebe48b14fc11cfe0bf specify learning capture-auto`\nfrom owning state; manual capture includes summary, problem, action, triggers,\nsuccess criteria, avoid items, exceptions, and evidence.\n\n- `fast`: skip unless the task escalates.\n- `accept`, `analyze`, `ask`, `auto`, `constitution`, `explain`,\n  `implement-teams`, `taskstoissues`, and `team`: consume-only; do not violate\n  their write boundaries to capture.\n- Other non-trivial workflows: consume before deeper work; capture reusable\n  signals at closeout or record a no-learning decision.\n\nThe `policy` returned by the CLI is authoritative when prompt wording drifts.\n\n- Passive learning files are workflow guidance, not scan evidence.\n- `.specify\u002F**` must never enter the project cognition graph.\n- `.specify\u002Fmemory\u002F**` must not appear in repository-universe, coverage-ledger, evidence rows, provisional nodes, provisional edges, observations, path_index, or alias_index.\n\n## Hard Boundary\n\n- `sp-map-scan` must not publish final cognition truth.\n- `sp-map-scan` must not claim the baseline is graph-ready.\n- `sp-map-scan` must produce evidence, provisional nodes, provisional edges, observations, and coverage diagnostics only.\n- `sp-map-scan` may classify evidence and derive provisional structure, but `sp-map-build` owns schema v5 graph-store publication, confidence assignment, typed graph-claim lifecycle derivation, route validation, revision-bound claim-reconciliation basis support, and alias catalog readiness.\n\n## Output Contract\n\nThe only canonical outputs for this command are:\n\n- `.specify\u002Fproject-cognition\u002Fstatus.json`\n- `.specify\u002Fproject-cognition\u002Fevidence\u002F`\n- `.specify\u002Fproject-cognition\u002Fprovisional\u002Fnodes.json`\n- `.specify\u002Fproject-cognition\u002Fprovisional\u002Fedges.json`\n- `.specify\u002Fproject-cognition\u002Fprovisional\u002Fobservations.json`\n- optional `.specify\u002Fproject-cognition\u002Fprovisional\u002Fclaims.json`\n- `.specify\u002Fproject-cognition\u002Fcoverage.json`\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Fmap-scan.md`\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Fcoverage-ledger.md`\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Fcoverage-ledger.json`\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Fscan-queue.json`\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Fhandoff-ledger.json`\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Fscan-packets\u002F\u003Clane-id>.md`\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Fworker-results\u002F\u003Cpacket-id>.json`\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Fmap-state.md`\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Frepository-universe.json`\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Fscan-targets.json`\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Fcapability-ledger.json`\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Fcontrol-ledger.json`\n- refresh-workbench `coverage-ledger` artifacts that summarize scan coverage for follow-on build validation\n- `map-state.md` as the scan-stage workbench state surface\n\nDo not create handbook-first brownfield truth, alternate mapping trees, or canonical runtime documents during `sp-map-scan`.\n\n## Machine-Readable Scan Artifact Schema\n\nWrite canonical JSON fields, not agent-local aliases. The runtime accepts a few\nlegacy aliases for compatibility, but new scan packets must emit the canonical\nshape below so `sp-map-build` can reconstruct the graph without manual repair.\n\n`provisional\u002Fnodes.json` must contain a top-level `nodes` array. Each node row\nuses:\n\n- `id`: stable node identity. Do not write placeholder values such as `NO_ID`.\n- `type`: node class such as `capability`, `module`, `file`, `page`, `command`, `test`, or `state`.\n- `title`: human-readable node title.\n- `paths`: concrete repository file paths owned or represented by this node. build-from-scan creates path_index rows only from nodes[].paths.\n- `confidence`: `verified`, `high`, `medium`, `low`, or `provisional`.\n- `evidence_ids`: evidence row IDs that justify the node.\n- `attrs`: optional object for secondary metadata.\n\nEmit alias-ready node material for schema v5. `nodes[].title`, `nodes[].type`,\n`nodes[].paths`, and `nodes[].attrs.aliases`, `domain`, `owner`, `workflow`,\n`route`, `route_hints`, and `verification_hints` feed the `alias_index` during\n`sp-map-build`. This creates the alias catalog used to normalize user input\nbefore query planning. Do not write raw observation summaries as aliases.\nObservations may support bounded observation tags only when tied to graph\nevidence. If validation reports schema v1 or rebuild-required readiness, run\nsp-map-scan -> sp-map-build so build-from-scan can publish schema v5 alias\ncatalog rows.\nWhen writing the recommendation in plain text, use: run sp-map-scan -> sp-map-build.\n\nCompatibility aliases accepted by the runtime are `node_id` for `id`, `kind` for\n`type`, `label` or `name` for `title`, and `attrs_json` for `attrs`. These are\nfallbacks only; do not use them in newly generated scan artifacts.\n\n`provisional\u002Fedges.json` must contain a top-level `edges` array. Each edge row\nuses `id`, `type`, `source_id`, `target_id`, `confidence`, `evidence_ids`, and\noptional `attrs`. `source_id` and `target_id` should reference node IDs. The\nruntime can resolve a file path endpoint to a node only when exactly one node\nlists that path in `nodes[].paths`. Compatibility aliases accepted by the\nruntime are `source`, `target`, `source_node_id`, `target_node_id`, `kind`, and\n`attrs_json`.\n\n`provisional\u002Fobservations.json` must contain a top-level `observations` array.\nEach row uses `id`, `observation_type`, `summary`, `evidence_ids`, and optional\n`attrs`. string observations are accepted only as compatibility input and are normalized as `observation_type: note`; new scan artifacts must write objects.\n\n`provisional\u002Fclaims.json` is optional so legacy-compatible scan packages remain\nvalid. When present, it must contain a top-level `claims` array. Each graph claim\nrow uses `id`, `node_id`, `graph_claim_type`, `summary`, optional\n`requested_state`, `supporting_evidence_ids`, `contradicting_evidence_ids`,\n`verifications`, optional `stale_reason`, and optional `attrs`. Each verification\nuses `id`, `result`, optional `command`, `evidence_id`, `observed_at`, and\noptional `attrs`. The Agent proposes candidates and evidence; it does not assign\nthe published lifecycle state. The deterministic compiler derives `candidate`,\n`supported`, `verified_in_graph_generation`, `contradicted`, or `stale`, ignores\nan unsupported self-promotion in `requested_state`, and blocks missing node or\nevidence references. Do not use bare `claim_type` or workflow final claim types\nsuch as `root_cause_claim`, `fixed_claim`, `completed_claim`, or `release_safe`\nas graph claim lifecycle fields.\n\n`coverage.json` must contain a top-level `rows` array with `path` values for\ncoverage accounting. Compatibility input may use a top-level `coverage` array,\nbut new scan artifacts must write `rows`; do not maintain separate `rows` and\n`coverage` lists that can drift. coverage.json does not create path_index rows by itself; every queryable path must also appear in at least one node's `paths` array.\n\n## Guardrails\n\n- Do not publish final cognition truth from this command.\n- Do not treat raw inventory notes or raw chat summaries as accepted scan results.\n- Do not silently downgrade unknown or unclassified project-relevant surfaces.\n- `.specify\u002F**` workflow\u002Fruntime state is excluded from default source\u002Fruntime scan targets; do not put `.specify\u002F**` paths into project graph evidence, nodes, observations, graph claims, path_index, or alias_index.\n- Only read `.specify\u002F**` for workflow operation, validation, migration, or when the requested scan is explicitly about generated workflow surfaces or spec-kit-plus itself; even then, classify it as workflow\u002Freference support rather than source\u002Fruntime graph truth.\n- Respect project cognition ignore rules from root `.cognitionignore` and `.specify\u002Fproject-cognition\u002F.cognitionignore`. These files use gitignore-compatible syntax, including comments, directory patterns, globs, `**`, and `!` re-includes.\n- `.cognitionignore` excludes project cognition scan\u002Fbuild\u002Fupdate targets only; it does not replace `.gitignore` or prove that ignored code is irrelevant to other tooling.\n- If the required scan lane cannot be safely packetized or delegated, record `subagent-blocked` and stop for escalation or recovery.\n\n## Project Cognition Workbench State Protocol\n\n- `MAP_STATE_FILE=.specify\u002Fproject-cognition\u002Fworkbench\u002Fmap-state.md`\n- Treat `.specify\u002Fproject-cognition\u002Fworkbench\u002Fmap-state.md` as the refresh-workbench state surface for scan progress, accepted packets, and unresolved gaps.\n- `scan-queue.json` is the leader-owned scheduler queue. Every `scan-packets\u002F\u003Cpacket-id>.md` file must have exactly one queue row.\n- `scan-targets.json` is the leader-owned value-weighted target set. Every scan packet must draw concrete `assigned_paths` from `scan-targets.json`, not from broad directory globs or unclassified path lists.\n- `handoff-ledger.json` records every dispatch and return event. Every `worker-results\u002F\u003Cpacket-id>.json` file must have a matching queue row and return event.\n- The leader loop is: leader receives worker result, leader reads durable scan state, leader validates handoff quality, leader updates queue, coverage, and handoff ledgers, leader plans next packets, and leader dispatches the next bounded wave.\n- Worker packet acceptance is separate from path coverage outcome. If a packet exceeds budget, the worker returns `acceptance=fail_gap`, marks affected paths as `coverage[].outcome=\"overflow\"`, and includes split recommendations.\n- Do not create huge mixed-value packets. Target packet size should be small enough for the worker to read and account for every path concretely. Prefer 25-75 paths for `P0`\u002F`P1` code lanes, use a hard cap of 150 paths for any one packet, and split large directories by behavior owner, entrypoint family, or dependency boundary.\n- A timed-out or overflowed `P0`\u002F`P1` packet must be split and retried before it can become an accepted gap. Only low-risk `P3` or justified `P2` paths may become accepted nonblocking inventory gaps.\n- New worker results must write top-level `acceptance`. Top-level `outcome` is a legacy alias only and must not appear in generated worker prompt examples.\n- `worker-results\u002F\u003Cpacket-id>.json` must write the packet-local ledger as top-level `ledger`, not `packet_local_ledger`, `packet-local-ledger`, scan-packet Markdown sections, or inline JSON inside `scan-packets\u002F*.md`.\n- `accepted_nonblocking_gap_paths` contains only low-risk paths with owner, reason, evidence expectation, revisit condition, and `low_risk_open_gap` status.\n- Scan packets are executable read instructions, not final truth documents.\n- `MapScanPacket` is the required packet contract for each delegated scan lane.\n- Each packet must declare `mode: read_only` and a `result_handoff_path`.\n- Each `result_handoff_path` must point to `.specify\u002Fproject-cognition\u002Fworkbench\u002Fworker-results\u002F\u003Cpacket-id>.json`.\n- Every `scan-packets\u002F\u003Clane-id>.md` file must have exactly one matching `worker-results\u002F\u003Clane-id>.json` handoff, and worker results without a matching scan packet are invalid.\n- Worker result handoffs are the machine-checkable evidence surface for packet acceptance.\n- Use `project-cognition scan-set` for inventory discovery before escalating to deeper reads. `rg --files` may support diagnostics, but it must not replace the runtime-resolved scan set.\n- Treat Git-tracked file lists and user-provided scan hints as metadata or `scan-set --scope` inputs; they must not become scan targets until `project-cognition scan-set` returns them in `.specify\u002Fproject-cognition\u002Ftmp\u002Fscan-files.json`.\n- Raw inventory notes or raw chat summaries are not sufficient.\n- Idle subagent output is not an accepted scan result.\n- The leader must wait for every dispatched scan lane to return a structured handoff before closing the scan stage.\n- Even when freshness is `fresh`, `sp-map-scan` still reasons from the git baseline diff before deciding whether the refresh workbench needs new coverage.\n- Reference-only material is a live surface only for refresh-workbench validation; it must not become a scan target by default.\n\n## Canonical Boundary Contract\n\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Frepository-universe.json` is the canonical boundary artifact derived from the runtime-resolved scan set.\n- It must include `schema_version`, `candidate_universe`, `included_paths`, `excluded_paths`, `ambiguous_paths`, `dispositions`, `criticality`, `value_tier`, `scan_decision`, `path_kind`, `classification_reasons`, and `decision_source`.\n- Every candidate path must receive exactly one disposition: `deep_read`, `sampled`, `inventory_only`, `excluded`, or `blocked`.\n- Disposition is separate from criticality; value tier adds another classification axis. Value tier remains `P0`, `P1`, `P2`, or `P3`; criticality remains `critical`, `important`, or `low_risk`.\n- `scan_decision` is the execution intent derived from value tier and disposition. Use `scan` for deep-read packets, `sample` for sampled proof, `inventory_only` for accounted low-value surfaces, `exclude` for boundary exclusions, and `blocked` when no safe decision can be made.\n- sampled and inventory_only are not free-form convenience labels; they must align with the recorded disposition and criticality in `repository-universe.json`.\n- Critical entrypoints, shared state, configuration, tests, verification surfaces, generated-surface propagation chains, and any `P0`\u002F`P1` path should not pass as `sampled` or `inventory_only` unless the boundary artifact already records an explicit accepted gap or an equally explicit lower-depth decision.\n- `sampled` and `inventory_only` are acceptable only when the disposition and criticality together justify them, with value tier confirming the lower-depth decision.\n- Excluded paths must not appear in graph-facing `coverage.json` rows, evidence rows, provisional nodes, provisional edges, observations, path indexes, route indexes, alias indexes, or `minimal_live_reads`.\n- `MapScanPacket` must include bounded `assigned_paths`.\n- `assigned_paths`, queue rows, worker `paths_read`, and worker coverage paths must be concrete repository file paths enumerated from `repository-universe.json`; globs such as `JZWinReNew\u002F*.cpp`, directory patterns, absolute paths, and summary labels are invalid.\n- Each packet carries a packet-local task ledger in the worker result JSON top-level `ledger` object with `todo`, `doing`, `done`, `blocked`, and `overflow`.\n- Each accepted worker result must repeat `assigned_paths`, include `paths_read` as a non-empty array of concrete repository paths, include packet-local `coverage` rows for the final outcome of each assigned path, and include confidence.\n- Minimal accepted worker result JSON shape:\n  `{\"packet_id\":\"lane-1\",\"family_id\":\"app\",\"assigned_paths\":[\"src\u002Fapp.go\"],\"paths_read\":[\"src\u002Fapp.go\"],\"ledger\":{\"todo\":[],\"doing\":[],\"done\":[\"src\u002Fapp.go\"],\"blocked\":[],\"overflow\":[]},\"coverage\":[{\"path\":\"src\u002Fapp.go\",\"outcome\":\"read\",\"evidence_ids\":[\"E-001\"]}],\"confidence\":\"high\",\"acceptance\":\"pass\"}`\n- `paths_read: true`, summary-only read claims, and boolean read flags are invalid.\n- `read` and `deep_read` outcomes must reference existing `evidence_ids`, and at least one referenced evidence row must have `source_path` equal to the covered path.\n- Subagents must account for every assigned path with evidence, `sampled`, `inventory_only`, `excluded`, `blocked`, or `overflow`.\n- A top-level `coverage.json` or `coverage-ledger.json` row is not proof that a path was scanned. Before accepting a packet or closing the scan, compute `included_paths - assigned_paths - accepted_nonblocking_gap_paths`; any non-empty set blocks completion. For accepted packets, every assigned path must also have a packet-local worker `coverage[]` outcome.\n- If assigned paths do not fit in context, the subagent must return `acceptance=fail_gap`, mark path-level `coverage[].outcome=\"overflow\"` or `coverage[].outcome=\"blocked\"`, and include split or recovery recommendations; the leader records queue state `overflow` or `blocked`.\n- For `P0`\u002F`P1` overflow, the leader must split and redispatch a smaller packet before closing the scan. Do not mark a high-value overflow as accepted nonblocking coverage.\n- Leader acceptance has two gates: a coverage gate that requires every assigned path to have a declared outcome, and a quality gate that rejects summary-only or inconsistent evidence.\n- The leader may classify packet failure as `fail_gap`, `fail_quality`, `fail_contract`, or `fail_systemic`.\n- `fail_quality` must return a machine-checkable repack subset naming at least one of `paths[]`, `claim_ids[]`, `coverage_row_ids[]`, or `evidence_ids[]`; otherwise treat it as `fail_contract`.\n- Any acceptance value other than `pass` blocks scan acceptance until the leader repacks, repairs, or explicitly records the unresolved gap.\n- `fail_contract` and `fail_systemic` do not use local patch-only redispatch; repair the packet schema\u002Fboundary or repack the affected packet family.\n\n## Scan Duties\n\n`sp-map-scan` must:\n\n- enumerate project-internal evidence comprehensively as value-weighted repository inventory, then scan evidence selectively by value\n- generate a full project-relevant inventory from the runtime-resolved scan set across nested directories, then add Git tracking status and directory metadata during classification\n- write `.specify\u002Fproject-cognition\u002Fworkbench\u002Frepository-universe.json` with `included_paths` and any available `excluded_paths`; default `scan-set` output is intentionally minimal and does not require per-path exclusion details unless an explicit explain\u002Fdebug mode was used\n- write `.specify\u002Fproject-cognition\u002Fworkbench\u002Fscan-targets.json` with the value-weighted execution target set\n- classify project-relevant repository surfaces\n- gather evidence first from high-value committed source, runtime entrypoints, tests that prove behavior, scripts, configs, docs that define behavior, templates, generated-surface sources, and `.git` history\n- construct provisional nodes and candidate edges\n- record uncertainty, blockers, and missing evidence explicitly\n- stay graph-native from the start rather than staging a handbook-first atlas\n- current-runtime native subagents are the default execution surface for scan lanes\n- scan packets are executable read instructions and must still execute the packet reads before the leader accepts atlas evidence\n- every project-relevant row is categorized with value tiers and coverage classes such as `P0`, `P1`, `P2`, `P3`, `inventory`, `sampled`, `deep-read`, `critical`, `important`, and `low-risk`\n- `unknown` is a scan failure\n- maintain `excluded_from_deep_read` reasoning for `vendor-cache-build-output` and similar excluded roots\n- The runtime-resolved scan set is the primary inventory boundary; Git-tracked files and Git tracking status are classification metadata unless the scan explicitly records why untracked evidence matters.\n- `.cognitionignore`-excluded paths must not appear in coverage rows, evidence rows, provisional nodes, provisional edges, observations, or scan packets unless a later `!` rule re-includes the path.\n\n## Coverage Classification\n\n- Coverage classification must explain why each surface is `inventory`, `sampled`, `deep-read`, `critical`, `important`, or `low-risk`.\n- Every project-relevant row is categorized before the scan can report completion.\n\n## Criticality Scoring\n\n- Criticality scoring must explain why a surface escalates toward `critical` or can stay `low-risk`.\n- Atlas evidence should prioritize owner, consumer, change propagation, and verification reachability for higher-criticality rows.\n\n## Required Evidence Coverage\n\nThe scan must cover:\n\n- project shape and stack\n- architecture overview\n- directory ownership\n- module dependency graph\n- core code elements\n- entry and api surfaces\n- data and state flows\n- user and maintainer workflows\n- integrations and protocol boundaries\n- build, release, and runtime\n- testing and verification\n- risk, security, observability, and evolution\n- template and generated-surface propagation\n- coverage reverse index\n- layer 1 retrieval inputs\n- source and symbol surfaces\n- module and ownership surfaces\n- capability and workflow surfaces\n- state and handoff surfaces\n- verification surfaces\n- when UI exists: real UI entry points\u002Fnavigation, token\u002Ftheme\u002Ftypography\n  owners, reusable component owners, responsive\u002Fstate patterns,\n  Storybook\u002Fvisual\u002Faccessibility tests, and design\u002Freference assets\n- risk and fragility surfaces\n- high-value `.git` evolution surfaces\n\n## Consequence Substrate Evidence\n\nDuring the first baseline scan and rare full rebuilds, scan packets must collect the evidence that lets later workflows reason like a long-term project maintainer:\n\n- ownership evidence for files, modules, commands, APIs, generated assets, and workflow state\n- upstream and downstream consumers, including generated-surface propagation and adjacent workflow dependencies\n- lifecycle and state surfaces, including active\u002Frunning actors, queues, sessions, locks, caches, persisted state, and cleanup paths\n- shared mutable state and destructive-operation surfaces where close\u002Fdelete\u002Farchive\u002Frename\u002Fmigrate behavior can affect other work\n- compatibility, migration, rollback, retry, idempotency, and observability evidence\n- verification routes that prove affected owners, consumers, state transitions, and recovery paths\n- confidence notes, conflicts, known unknowns, and minimal live reads needed when later `sp-map-update` cannot fully prove an edge from existing evidence\n\nIf project-relevant evidence cannot be classified, the scan must remain blocked instead of silently downgrading the gap.\n\nFor UI evidence, make roles retrievable through node `type`, `title`, aliases,\ndomain, owner, route hints, and verification hints—not only opaque attrs. Use\nrole language such as `ui_entrypoint`, `design_token_owner`, `ui_component`,\n`ui_pattern`, `visual_verification`, and `design_reference_asset` when live\nevidence supports it.\n\n## Dispatch Guidance\n\n- Use `choose_subagent_dispatch(command_name=\"map-scan\", snapshot, workload_shape)` before broad work begins.\n- Dispatch each scan lane from a validated `MapScanPacket`.\n- Recommended scan lanes include source\u002Fsymbol discovery, module boundaries, capability flows, state surfaces, build\u002Ftest\u002Fruntime surfaces, and git evolution surfaces.\n- Every lane must return inspected paths, evidence harvested, confidence notes, provisional structure updates, typed graph-claim candidates, supporting or contradicting evidence references, and unresolved unknowns. Workers may propose `requested_state`, but only the compiler derives the published lifecycle state.\n- Must wait for every dispatched scan lane and consume its structured handoff before the scan closes.\n\n## Layer 1 Route Material\n\n- Generate layer 1 retrieval source material before the build phase begins.\n- Produce task route candidates.\n- Produce symptom route candidates.\n- Produce shared-surface hotspot candidates.\n- Produce verification route candidates.\n- Produce propagation-risk route candidates.\n\n## Concept Retrieval Signal Evidence\n\n- Collect concept retrieval signals that let `project-cognition lexicon` surface\n  useful `concept_candidates` instead of only path or symbol matches.\n- Record colloquial user phrases, aliases, shorthand, command names, workflow\n  names, symptoms, and domain vocabulary that maintainers naturally use when\n  asking for work.\n- Record these signals so downstream agent-owned semantic normalization can\n  extract embedded project terms when raw lexicon ranking and\n  `agent_normalization` are only bootstrap signals, all candidates are\n  `score=0`, or user prompts are localized, mixed-language, CJK, colloquial,\n  symptom-first, or mixed-language or CJK text. If\n  `agent_normalization.required=true`, treat it as a non-intelligent CLI\n  reminder to write `semantic_intake` from the alias catalog (action:\n  write_semantic_intake_from_alias_catalog). If `agent_normalization` is\n  omitted, treat it as `required=false`; omission does not make raw lexical\n  ranking authoritative. CJK or mixed CJK\u002FASCII input still requires agent\n  normalization even when positive raw lexical matches exist because embedded\n  project tokens do not translate the surrounding user language. The agent still\n  owns translation; `agent_normalization` is advisory guidance, not a route\n  decision.\n- Attach domain ownership evidence to each retrieval signal, including owning\n  paths, modules, generated surfaces, workflow artifacts, tests, and supporting\n  evidence rows.\n- Preserve conflicts, weak ownership, and unknown mappings as scan evidence for\n  `sp-map-build` rather than flattening them into accepted keywords.\n\n## Truth Layer Ledgers\n\n- Maintain file, entrypoint, branch, and control-node coverage.\n- Summarize ledger coverage by capability.\n- Summarize ledger coverage by symptom.\n\n## Completion Rule\n\nBefore reporting completion:\n\n- confirm that the evidence baseline exists under `.specify\u002Fproject-cognition\u002F`\n- confirm that provisional nodes and candidate edges were written\n- run `C:\\Users\\11034\\.specify\\bin\\project-cognition.exe validate-scan --format json` before handoff to `sp-map-build`\n- `sp-map-scan` may report complete only after `validate-scan` returns `status=ok` and `readiness=scan_ready`\n- if `validate-scan` returns `status=blocked`, report the blocking errors and do not claim the scan package is build-ready\n- confirm that the scan still has not published final cognition truth\n- report any open uncertainty that `sp-map-build` must reconcile\n\n## Claude Code Map Subagent Capability Discovery\n\n- Execution model: preserve the workflow's existing `subagent-mandatory`, `subagents-first`, `adaptive`, or `subagent-assisted` policy.\n- Dispatch shape: preserve the workflow's existing dispatch shape; use `subagent-blocked` only after the discovery step below fails or is unsafe.\n- Execution surface: prefer `native-subagents` when the current runtime supports it; use `none` only after recording the unavailable or unsafe surface.\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- Keep map packet\u002Fresult schemas from this workflow authoritative; do not substitute implementation `WorkerTaskResult` fields for map scan\u002Fbuild\u002Fupdate packet contracts.\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**: A workflow needs reliable brownfield cognition and no graph-native baseline exists yet, or a full baseline rebuild is explicitly required.\n- **Primary objective**: Enumerate the full project file universe cheaply, classify file value, deep-scan the highest-value project evidence, build provisional nodes and candidate edges, and publish the scan artifacts required for graph reconstruction.\n- **Primary outputs**: `.specify\u002Fproject-cognition\u002Fstatus.json`, `.specify\u002Fproject-cognition\u002Fevidence\u002F`, `.specify\u002Fproject-cognition\u002Fprovisional\u002Fnodes.json`, `.specify\u002Fproject-cognition\u002Fprovisional\u002Fedges.json`, `.specify\u002Fproject-cognition\u002Fprovisional\u002Fobservations.json`, `.specify\u002Fproject-cognition\u002Fcoverage.json`, `.specify\u002Fproject-cognition\u002Fworkbench\u002Frepository-universe.json`, `.specify\u002Fproject-cognition\u002Fworkbench\u002Fscan-targets.json`, `.specify\u002Fproject-cognition\u002Fworkbench\u002Fcoverage-ledger.*`, `.specify\u002Fproject-cognition\u002Fworkbench\u002Fscan-queue.json`, `.specify\u002Fproject-cognition\u002Fworkbench\u002Fhandoff-ledger.json`, and `.specify\u002Fproject-cognition\u002Fworkbench\u002Fmap-state.md`.\n- **Default handoff**: \u002Fsp-map-build after the evidence baseline is complete and the scan outputs are ready for graph reconstruction.\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\nGenerate a complete graph-native evidence baseline for the current codebase.\n\n## Context\n\n- Primary inputs: git-baseline diff data when available, live repository surfaces, existing reference artifacts, passive learning files as read-only workflow guidance, not scan evidence, and optional focus hints from `$ARGUMENTS`.\n- This command owns graph-native evidence-baseline outputs only; it must not write final cognition truth.\n- Legacy atlas artifacts such as `PROJECT-HANDBOOK.md` may be read only when explicitly relevant to migration or export parity; they must not become scan targets.\n- `.specify\u002F**` is workflow\u002Fruntime state, not project graph evidence; `.specify\u002F**` paths may be read only for command operation or validation and must not become scan targets or graph paths.\n- Resolve the candidate scan set through `project-cognition scan-set` before repository inventory, evidence, coverage, or packet scope. The runtime applies project cognition ignore rules from root `.cognitionignore` and `.specify\u002Fproject-cognition\u002F.cognitionignore`, built-in low-signal exclusions, binary-file suppression, and obvious secret-path suppression. These rules are for project cognition only.\n- Before subagent dispatch, write the canonical boundary in `.specify\u002Fproject-cognition\u002Fworkbench\u002Frepository-universe.json` from the resolved scan-set file; do not substitute raw `rg --files`, broad directory globs, or free-form agent judgment about what to omit.\n- [AGENT] Treat `scan-queue.json` and `handoff-ledger.json` as required scan workbench artifacts before `validate-scan`.\n- Stage the canonical boundary artifact before dispatch, then accept scan packets only after the leader verifies packet-local ledger accounting for every assigned path and a `worker-results\u002F\u003Cpacket-id>.json` handoff whose `paths_read` is a non-empty concrete path array.\n- Machine contract: each `worker-results\u002F\u003Cpacket-id>.json` handoff must put the packet-local ledger in top-level `ledger` with `todo`, `doing`, `done`, `blocked`, and `overflow`; do not write `packet_local_ledger`, `packet-local-ledger`, or Markdown-only ledger sections.\n- Treat `.cognitionignore` and `scan-set` runtime exclusions as boundary sources recorded in `decision_source`; excluded paths stay in boundary accounting and out of graph-facing coverage.\n- The resulting evidence baseline must let `sp-map-build` reconstruct the project cognition graph from live-surface evidence without inventing scan scope.\n- Maintain `.specify\u002Fproject-cognition\u002Fstatus.json` as the baseline state surface for graph-native cognition readiness.\n- If native subagent dispatch is unavailable or a substantive scan lane cannot complete, persist `subagent_blocked` in machine-readable state and block baseline activation until recovery. `coverage-ledger.json.open_gaps[]` may use `low_risk_open_gap` only with owner, reason, evidence expectation, and revisit condition.\n\n## Ignore Configuration Gate\n\n- Before repository inventory, run:\n\n```text\nC:\\Users\\11034\\.specify\\bin\\project-cognition.exe generate-ignore --format json\n```\n\n- If the command returns `status=created`, review `.specify\u002Fproject-cognition\u002F.cognitionignore` with the user and wait for confirmation before continuing to inventory, packet dispatch, or writing `repository-universe.json`.\n- Treat commented starter suggestions as inactive. They are review prompts, not exclusions, until the user removes the comment marker.\n- Preserve root `.cognitionignore` and existing `.specify\u002Fproject-cognition\u002F.cognitionignore` content; `generate-ignore` must not overwrite an existing ignore file.\n\nAfter the ignore gate is clear, resolve the agent-facing candidate file list:\n\n```text\nC:\\Users\\11034\\.specify\\bin\\project-cognition.exe scan-set --out .specify\u002Fproject-cognition\u002Ftmp\u002Fscan-files.json --format json\n```\n\n- Default stdout is compact JSON containing only the scan-set file path and count.\n- The handoff file is a temporary agent-facing scan-set containing only `files`.\n- If focus hints from `$ARGUMENTS` intentionally narrow the scan, pass them as concrete repeated `--scope` values and rerun `scan-set`; do not narrow by deleting paths from the resolved file manually.\n\n[AGENT] For project-cognition-backed semantic intake, routing, audit, resume, or final-claim gates, read `references\u002Fsemantic-work-contract.md`.\n\n## Detailed References\n\nRead [Reference index](references\u002FINDEX.md) before applying shared semantic contracts.\n\n- [semantic work contract](references\u002Fsemantic-work-contract.md)\n\n## Mandatory Subagent Execution\n\nAll substantive tasks in ordinary `sp-*` workflows default to and must use subagents.\n\nThe leader orchestrates: route, split tasks, prepare task contracts, dispatch subagents, wait for structured handoffs, integrate results, verify, and update state.\n\nBefore dispatch, every subagent lane needs a task contract with objective, authoritative inputs, allowed read\u002Fwrite scope, forbidden paths, acceptance checks, verification evidence, and structured handoff format.\n\nUse `execution_model: subagent-mandatory`.\nUse `dispatch_shape: one-subagent | parallel-subagents`.\nUse `execution_surface: native-subagents`.\n\n## Process\n\n- Before repository inventory, run `project-cognition generate-ignore --format json`. If it creates `.specify\u002Fproject-cognition\u002F.cognitionignore`, ask the user to review the starter suggestions and wait for confirmation before continuing.\n- After the ignore gate is clear, run `project-cognition scan-set --out .specify\u002Fproject-cognition\u002Ftmp\u002Fscan-files.json --format json` and use the returned file list as the candidate scan set. The agent may choose scan intent and concrete `--scope` values, but `project-cognition scan-set` decides the initial included file list through deterministic runtime rules; do not let the agent freely decide which files to omit.\n- Build a value-weighted evidence baseline before any graph reconstruction work begins.\n- First spread out the resolved scan set as a cheap inventory pass: enumerate paths, metadata, runtime exclusion status, Git tracking status, size, extension, directory family, and likely generated\u002Fvendor\u002Ftest\u002Fdoc\u002Fconfig\u002Fsource classification without deep-reading file contents.\n- Classify every non-excluded candidate path by value tier before dispatch: `P0` core behavior and entry surfaces, `P1` supporting contracts and runtime\u002Fconfig surfaces, `P2` selective tests\u002Fdocs\u002Fexamples, and `P3` low-signal generated\u002Fvendor\u002Fassets\u002Fcache\u002Fstatic output.\n- Deep-scan `P0` and `P1` first. Use `P2` selectively when it proves behavior, verification, or public contracts. Keep `P3` as inventory-only or excluded unless the user explicitly asks for that surface or it is the only evidence for a critical behavior.\n- Write `.specify\u002Fproject-cognition\u002Fworkbench\u002Fscan-targets.json` after classification and before dispatch. It is the leader-owned execution target list derived from `repository-universe.json`.\n- Dispatch each bounded scan lane only from a validated `MapScanPacket`.\n- Wait for every dispatched lane's structured handoff before accepting scan coverage.\n- If a safe scan lane cannot be packetized or delegated, record `subagent-blocked` and stop for escalation or recovery.\n\n## Value-Weighted Repository Inventory\n\n`sp-map-scan` must inventory all candidate paths from the runtime-resolved scan\nset, but it must not deep-read all files by default. The first pass is a\npath-level accounting pass, not a content scan.\n\nWrite `.specify\u002Fproject-cognition\u002Fworkbench\u002Frepository-universe.json` with one\nrow per candidate path from `.specify\u002Fproject-cognition\u002Ftmp\u002Fscan-files.json`.\nRuntime-excluded paths may be recorded only in boundary accounting when the\nruntime exposes them through a debug\u002Fexplain path; the default agent-facing\nscan-set handoff intentionally contains only included files. Each included or\nambiguous row should record:\n\n- `path`: repository-relative path\n- `path_kind`: `source`, `test`, `config`, `script`, `doc`, `template`, `asset`, `generated`, `vendor`, `build_output`, `lockfile`, `unknown`\n- `extension`\n- `size_bytes`\n- `directory_family`\n- `git_tracked`\n- `ignored_by_cognition`\n- `matched_ignore_rule` when applicable\n- `value_tier`: `P0`, `P1`, `P2`, or `P3`\n- `scan_decision`: `scan`, `sample`, `inventory_only`, `exclude`, or `blocked`\n- `disposition`: existing boundary disposition: `deep_read`, `sampled`, `inventory_only`, `excluded`, or `blocked`\n- `criticality`: `critical`, `important`, or `low_risk`\n- `classification_reasons`\n- `decision_source`\n\nValue tier rules:\n\n- `P0`: application\u002Fruntime entrypoints, CLI commands, routes\u002Fcontrollers,\n  public APIs, core services, state machines, data flow owners, protocol\n  boundaries, security\u002Fauth\u002Fpayment\u002Fdestructive-operation surfaces, generated\n  source templates that affect downstream behavior, and primary user workflows.\n- `P1`: package\u002Fbuild\u002Fconfig manifests, CI\u002Frelease scripts, migrations\u002Fschemas,\n  adapter boundaries, feature gates, runtime wiring, verification entrypoints,\n  and docs that define behavior or operator contracts.\n- `P2`: tests, examples, secondary docs, story\u002Fdemo files, and usage samples.\n  Scan them when they prove behavior, expected contracts, or verification\n  reachability; otherwise sample or inventory them.\n- `P3`: vendored dependencies, generated bundles, cache\u002Fbuild\u002Fdist output,\n  binary\u002Fstatic assets, lockfiles that do not define behavior beyond dependency\n  identity, archived material, and large low-signal files. Keep these as\n  `inventory_only` or `excluded` unless explicitly needed.\n\nWrite `.specify\u002Fproject-cognition\u002Fworkbench\u002Fscan-targets.json` with the subset\nselected for packet dispatch. It must include:\n\n- `schema_version`\n- `selection_policy: \"value_weighted\"`\n- `selected_paths`\n- `sampled_paths`\n- `inventory_only_paths`\n- `excluded_paths`\n- `blocked_paths`\n- per-path `value_tier`, `scan_decision`, `disposition`, `criticality`, and\n  `classification_reasons`\n\nHigh-value coverage is more important than raw path-count coverage. A scan can\nvalidly leave many `P3` paths inventory-only, but it must not leave unexplained\n`P0` or `P1` gaps.\n\n## Machine-Readable Blocked State\n\nHuman workflow prose may say `subagent-blocked`, but persisted machine fields use\n`subagent_blocked`.\n\nIf a substantive scan\u002Fbuild lane cannot dispatch or complete, write:\n\n- `.specify\u002Fproject-cognition\u002Fstatus.json` with `baseline_state=blocked` and\n  `subagent_blocked` in `stale_reasons` or `dirty_reasons`\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Fmap-state.md` with\n  `readiness=blocked`, `blocking_reason=subagent_blocked`, blocked lane ids,\n  blocked scope, and recovery condition\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Fcoverage-ledger.json.open_gaps[]` with\n  `reason=\"subagent_blocked\"`, `lane_id`, `packet_id`, `blocked_scope`,\n  `criticality`, `owner`, `status=\"blocked\"`, and `recovery_condition`\n\n`unknown` blocks, `blocked`, `critical_open_gap`, and `subagent_blocked` block baseline\nactivation. `low_risk_open_gap` may pass only with owner, reason,\n`evidence_expectation`, and `revisit_condition`.\n\n## Project Learning\n\nThe CLI is the only agent-facing Learning read surface:\n\n1. Run `uvx --from git+https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Fspec-kit-plus.git@4a631657f75460886dbd12ebe48b14fc11cfe0bf specify learning start --command \u003Cclassic-command-name> --format json` before deeper non-trivial work.\n2. Select summaries by applicability and triggers; use `uvx --from git+https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Fspec-kit-plus.git@4a631657f75460886dbd12ebe48b14fc11cfe0bf specify learning list --command \u003Cclassic-command-name> --format json` only to filter or page.\n3. Execute one matching card's `show_argv`. Do not parse Learning storage.\n\n`start`, `list`, and `show` are read-only. Current repository evidence,\n`.specify\u002Fmemory\u002Fconstitution.md`, and explicit user direction override stale or\ncandidate Learning.\n\nAt closeout, corrections, retries, route changes, recovery, false leads, hidden\ndependencies, validation\u002Ftooling\u002Fstate\u002Fcognition gaps, constraints, and near\nmisses are capture signals. Prefer `uvx --from git+https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Fspec-kit-plus.git@4a631657f75460886dbd12ebe48b14fc11cfe0bf specify learning capture-auto`\nfrom owning state; manual capture includes summary, problem, action, triggers,\nsuccess criteria, avoid items, exceptions, and evidence.\n\n- `fast`: skip unless the task escalates.\n- `accept`, `analyze`, `ask`, `auto`, `constitution`, `explain`,\n  `implement-teams`, `taskstoissues`, and `team`: consume-only; do not violate\n  their write boundaries to capture.\n- Other non-trivial workflows: consume before deeper work; capture reusable\n  signals at closeout or record a no-learning decision.\n\nThe `policy` returned by the CLI is authoritative when prompt wording drifts.\n\n- Passive learning files are workflow guidance, not scan evidence.\n- `.specify\u002F**` must never enter the project cognition graph.\n- `.specify\u002Fmemory\u002F**` must not appear in repository-universe, coverage-ledger, evidence rows, provisional nodes, provisional edges, observations, path_index, or alias_index.\n\n## Hard Boundary\n\n- `sp-map-scan` must not publish final cognition truth.\n- `sp-map-scan` must not claim the baseline is graph-ready.\n- `sp-map-scan` must produce evidence, provisional nodes, provisional edges, observations, and coverage diagnostics only.\n- `sp-map-scan` may classify evidence and derive provisional structure, but `sp-map-build` owns schema v5 graph-store publication, confidence assignment, typed graph-claim lifecycle derivation, route validation, revision-bound claim-reconciliation basis support, and alias catalog readiness.\n\n## Output Contract\n\nThe only canonical outputs for this command are:\n\n- `.specify\u002Fproject-cognition\u002Fstatus.json`\n- `.specify\u002Fproject-cognition\u002Fevidence\u002F`\n- `.specify\u002Fproject-cognition\u002Fprovisional\u002Fnodes.json`\n- `.specify\u002Fproject-cognition\u002Fprovisional\u002Fedges.json`\n- `.specify\u002Fproject-cognition\u002Fprovisional\u002Fobservations.json`\n- optional `.specify\u002Fproject-cognition\u002Fprovisional\u002Fclaims.json`\n- `.specify\u002Fproject-cognition\u002Fcoverage.json`\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Fmap-scan.md`\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Fcoverage-ledger.md`\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Fcoverage-ledger.json`\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Fscan-queue.json`\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Fhandoff-ledger.json`\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Fscan-packets\u002F\u003Clane-id>.md`\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Fworker-results\u002F\u003Cpacket-id>.json`\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Fmap-state.md`\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Frepository-universe.json`\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Fscan-targets.json`\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Fcapability-ledger.json`\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Fcontrol-ledger.json`\n- refresh-workbench `coverage-ledger` artifacts that summarize scan coverage for follow-on build validation\n- `map-state.md` as the scan-stage workbench state surface\n\nDo not create handbook-first brownfield truth, alternate mapping trees, or canonical runtime documents during `sp-map-scan`.\n\n## Machine-Readable Scan Artifact Schema\n\nWrite canonical JSON fields, not agent-local aliases. The runtime accepts a few\nlegacy aliases for compatibility, but new scan packets must emit the canonical\nshape below so `sp-map-build` can reconstruct the graph without manual repair.\n\n`provisional\u002Fnodes.json` must contain a top-level `nodes` array. Each node row\nuses:\n\n- `id`: stable node identity. Do not write placeholder values such as `NO_ID`.\n- `type`: node class such as `capability`, `module`, `file`, `page`, `command`, `test`, or `state`.\n- `title`: human-readable node title.\n- `paths`: concrete repository file paths owned or represented by this node. build-from-scan creates path_index rows only from nodes[].paths.\n- `confidence`: `verified`, `high`, `medium`, `low`, or `provisional`.\n- `evidence_ids`: evidence row IDs that justify the node.\n- `attrs`: optional object for secondary metadata.\n\nEmit alias-ready node material for schema v5. `nodes[].title`, `nodes[].type`,\n`nodes[].paths`, and `nodes[].attrs.aliases`, `domain`, `owner`, `workflow`,\n`route`, `route_hints`, and `verification_hints` feed the `alias_index` during\n`sp-map-build`. This creates the alias catalog used to normalize user input\nbefore query planning. Do not write raw observation summaries as aliases.\nObservations may support bounded observation tags only when tied to graph\nevidence. If validation reports schema v1 or rebuild-required readiness, run\nsp-map-scan -> sp-map-build so build-from-scan can publish schema v5 alias\ncatalog rows.\nWhen writing the recommendation in plain text, use: run sp-map-scan -> sp-map-build.\n\nCompatibility aliases accepted by the runtime are `node_id` for `id`, `kind` for\n`type`, `label` or `name` for `title`, and `attrs_json` for `attrs`. These are\nfallbacks only; do not use them in newly generated scan artifacts.\n\n`provisional\u002Fedges.json` must contain a top-level `edges` array. Each edge row\nuses `id`, `type`, `source_id`, `target_id`, `confidence`, `evidence_ids`, and\noptional `attrs`. `source_id` and `target_id` should reference node IDs. The\nruntime can resolve a file path endpoint to a node only when exactly one node\nlists that path in `nodes[].paths`. Compatibility aliases accepted by the\nruntime are `source`, `target`, `source_node_id`, `target_node_id`, `kind`, and\n`attrs_json`.\n\n`provisional\u002Fobservations.json` must contain a top-level `observations` array.\nEach row uses `id`, `observation_type`, `summary`, `evidence_ids`, and optional\n`attrs`. string observations are accepted only as compatibility input and are normalized as `observation_type: note`; new scan artifacts must write objects.\n\n`provisional\u002Fclaims.json` is optional so legacy-compatible scan packages remain\nvalid. When present, it must contain a top-level `claims` array. Each graph claim\nrow uses `id`, `node_id`, `graph_claim_type`, `summary`, optional\n`requested_state`, `supporting_evidence_ids`, `contradicting_evidence_ids`,\n`verifications`, optional `stale_reason`, and optional `attrs`. Each verification\nuses `id`, `result`, optional `command`, `evidence_id`, `observed_at`, and\noptional `attrs`. The Agent proposes candidates and evidence; it does not assign\nthe published lifecycle state. The deterministic compiler derives `candidate`,\n`supported`, `verified_in_graph_generation`, `contradicted`, or `stale`, ignores\nan unsupported self-promotion in `requested_state`, and blocks missing node or\nevidence references. Do not use bare `claim_type` or workflow final claim types\nsuch as `root_cause_claim`, `fixed_claim`, `completed_claim`, or `release_safe`\nas graph claim lifecycle fields.\n\n`coverage.json` must contain a top-level `rows` array with `path` values for\ncoverage accounting. Compatibility input may use a top-level `coverage` array,\nbut new scan artifacts must write `rows`; do not maintain separate `rows` and\n`coverage` lists that can drift. coverage.json does not create path_index rows by itself; every queryable path must also appear in at least one node's `paths` array.\n\n## Guardrails\n\n- Do not publish final cognition truth from this command.\n- Do not treat raw inventory notes or raw chat summaries as accepted scan results.\n- Do not silently downgrade unknown or unclassified project-relevant surfaces.\n- `.specify\u002F**` workflow\u002Fruntime state is excluded from default source\u002Fruntime scan targets; do not put `.specify\u002F**` paths into project graph evidence, nodes, observations, graph claims, path_index, or alias_index.\n- Only read `.specify\u002F**` for workflow operation, validation, migration, or when the requested scan is explicitly about generated workflow surfaces or spec-kit-plus itself; even then, classify it as workflow\u002Freference support rather than source\u002Fruntime graph truth.\n- Respect project cognition ignore rules from root `.cognitionignore` and `.specify\u002Fproject-cognition\u002F.cognitionignore`. These files use gitignore-compatible syntax, including comments, directory patterns, globs, `**`, and `!` re-includes.\n- `.cognitionignore` excludes project cognition scan\u002Fbuild\u002Fupdate targets only; it does not replace `.gitignore` or prove that ignored code is irrelevant to other tooling.\n- If the required scan lane cannot be safely packetized or delegated, record `subagent-blocked` and stop for escalation or recovery.\n\n## Project Cognition Workbench State Protocol\n\n- `MAP_STATE_FILE=.specify\u002Fproject-cognition\u002Fworkbench\u002Fmap-state.md`\n- Treat `.specify\u002Fproject-cognition\u002Fworkbench\u002Fmap-state.md` as the refresh-workbench state surface for scan progress, accepted packets, and unresolved gaps.\n- `scan-queue.json` is the leader-owned scheduler queue. Every `scan-packets\u002F\u003Cpacket-id>.md` file must have exactly one queue row.\n- `scan-targets.json` is the leader-owned value-weighted target set. Every scan packet must draw concrete `assigned_paths` from `scan-targets.json`, not from broad directory globs or unclassified path lists.\n- `handoff-ledger.json` records every dispatch and return event. Every `worker-results\u002F\u003Cpacket-id>.json` file must have a matching queue row and return event.\n- The leader loop is: leader receives worker result, leader reads durable scan state, leader validates handoff quality, leader updates queue, coverage, and handoff ledgers, leader plans next packets, and leader dispatches the next bounded wave.\n- Worker packet acceptance is separate from path coverage outcome. If a packet exceeds budget, the worker returns `acceptance=fail_gap`, marks affected paths as `coverage[].outcome=\"overflow\"`, and includes split recommendations.\n- Do not create huge mixed-value packets. Target packet size should be small enough for the worker to read and account for every path concretely. Prefer 25-75 paths for `P0`\u002F`P1` code lanes, use a hard cap of 150 paths for any one packet, and split large directories by behavior owner, entrypoint family, or dependency boundary.\n- A timed-out or overflowed `P0`\u002F`P1` packet must be split and retried before it can become an accepted gap. Only low-risk `P3` or justified `P2` paths may become accepted nonblocking inventory gaps.\n- New worker results must write top-level `acceptance`. Top-level `outcome` is a legacy alias only and must not appear in generated worker prompt examples.\n- `worker-results\u002F\u003Cpacket-id>.json` must write the packet-local ledger as top-level `ledger`, not `packet_local_ledger`, `packet-local-ledger`, scan-packet Markdown sections, or inline JSON inside `scan-packets\u002F*.md`.\n- `accepted_nonblocking_gap_paths` contains only low-risk paths with owner, reason, evidence expectation, revisit condition, and `low_risk_open_gap` status.\n- Scan packets are executable read instructions, not final truth documents.\n- `MapScanPacket` is the required packet contract for each delegated scan lane.\n- Each packet must declare `mode: read_only` and a `result_handoff_path`.\n- Each `result_handoff_path` must point to `.specify\u002Fproject-cognition\u002Fworkbench\u002Fworker-results\u002F\u003Cpacket-id>.json`.\n- Every `scan-packets\u002F\u003Clane-id>.md` file must have exactly one matching `worker-results\u002F\u003Clane-id>.json` handoff, and worker results without a matching scan packet are invalid.\n- Worker result handoffs are the machine-checkable evidence surface for packet acceptance.\n- Use `project-cognition scan-set` for inventory discovery before escalating to deeper reads. `rg --files` may support diagnostics, but it must not replace the runtime-resolved scan set.\n- Treat Git-tracked file lists and user-provided scan hints as metadata or `scan-set --scope` inputs; they must not become scan targets until `project-cognition scan-set` returns them in `.specify\u002Fproject-cognition\u002Ftmp\u002Fscan-files.json`.\n- Raw inventory notes or raw chat summaries are not sufficient.\n- Idle subagent output is not an accepted scan result.\n- The leader must wait for every dispatched scan lane to return a structured handoff before closing the scan stage.\n- Even when freshness is `fresh`, `sp-map-scan` still reasons from the git baseline diff before deciding whether the refresh workbench needs new coverage.\n- Reference-only material is a live surface only for refresh-workbench validation; it must not become a scan target by default.\n\n## Canonical Boundary Contract\n\n- `.specify\u002Fproject-cognition\u002Fworkbench\u002Frepository-universe.json` is the canonical boundary artifact derived from the runtime-resolved scan set.\n- It must include `schema_version`, `candidate_universe`, `included_paths`, `excluded_paths`, `ambiguous_paths`, `dispositions`, `criticality`, `value_tier`, `scan_decision`, `path_kind`, `classification_reasons`, and `decision_source`.\n- Every candidate path must receive exactly one disposition: `deep_read`, `sampled`, `inventory_only`, `excluded`, or `blocked`.\n- Disposition is separate from criticality; value tier adds another classification axis. Value tier remains `P0`, `P1`, `P2`, or `P3`; criticality remains `critical`, `important`, or `low_risk`.\n- `scan_decision` is the execution intent derived from value tier and disposition. Use `scan` for deep-read packets, `sample` for sampled proof, `inventory_only` for accounted low-value surfaces, `exclude` for boundary exclusions, and `blocked` when no safe decision can be made.\n- sampled and inventory_only are not free-form convenience labels; they must align with the recorded disposition and criticality in `repository-universe.json`.\n- Critical entrypoints, shared state, configuration, tests, verification surfaces, generated-surface propagation chains, and any `P0`\u002F`P1` path should not pass as `sampled` or `inventory_only` unless the boundary artifact already records an explicit accepted gap or an equally explicit lower-depth decision.\n- `sampled` and `inventory_only` are acceptable only when the disposition and criticality together justify them, with value tier confirming the lower-depth decision.\n- Excluded paths must not appear in graph-facing `coverage.json` rows, evidence rows, provisional nodes, provisional edges, observations, path indexes, route indexes, alias indexes, or `minimal_live_reads`.\n- `MapScanPacket` must include bounded `assigned_paths`.\n- `assigned_paths`, queue rows, worker `paths_read`, and worker coverage paths must be concrete repository file paths enumerated from `repository-universe.json`; globs such as `JZWinReNew\u002F*.cpp`, directory patterns, absolute paths, and summary labels are invalid.\n- Each packet carries a packet-local task ledger in the worker result JSON top-level `ledger` object with `todo`, `doing`, `done`, `blocked`, and `overflow`.\n- Each accepted worker result must repeat `assigned_paths`, include `paths_read` as a non-empty array of concrete repository paths, include packet-local `coverage` rows for the final outcome of each assigned path, and include confidence.\n- Minimal accepted worker result JSON shape:\n  `{\"packet_id\":\"lane-1\",\"family_id\":\"app\",\"assigned_paths\":[\"src\u002Fapp.go\"],\"paths_read\":[\"src\u002Fapp.go\"],\"ledger\":{\"todo\":[],\"doing\":[],\"done\":[\"src\u002Fapp.go\"],\"blocked\":[],\"overflow\":[]},\"coverage\":[{\"path\":\"src\u002Fapp.go\",\"outcome\":\"read\",\"evidence_ids\":[\"E-001\"]}],\"confidence\":\"high\",\"acceptance\":\"pass\"}`\n- `paths_read: true`, summary-only read claims, and boolean read flags are invalid.\n- `read` and `deep_read` outcomes must reference existing `evidence_ids`, and at least one referenced evidence row must have `source_path` equal to the covered path.\n- Subagents must account for every assigned path with evidence, `sampled`, `inventory_only`, `excluded`, `blocked`, or `overflow`.\n- A top-level `coverage.json` or `coverage-ledger.json` row is not proof that a path was scanned. Before accepting a packet or closing the scan, compute `included_paths - assigned_paths - accepted_nonblocking_gap_paths`; any non-empty set blocks completion. For accepted packets, every assigned path must also have a packet-local worker `coverage[]` outcome.\n- If assigned paths do not fit in context, the subagent must return `acceptance=fail_gap`, mark path-level `coverage[].outcome=\"overflow\"` or `coverage[].outcome=\"blocked\"`, and include split or recovery recommendations; the leader records queue state `overflow` or `blocked`.\n- For `P0`\u002F`P1` overflow, the leader must split and redispatch a smaller packet before closing the scan. Do not mark a high-value overflow as accepted nonblocking coverage.\n- Leader acceptance has two gates: a coverage gate that requires every assigned path to have a declared outcome, and a quality gate that rejects summary-only or inconsistent evidence.\n- The leader may classify packet failure as `fail_gap`, `fail_quality`, `fail_contract`, or `fail_systemic`.\n- `fail_quality` must return a machine-checkable repack subset naming at least one of `paths[]`, `claim_ids[]`, `coverage_row_ids[]`, or `evidence_ids[]`; otherwise treat it as `fail_contract`.\n- Any acceptance value other than `pass` blocks scan acceptance until the leader repacks, repairs, or explicitly records the unresolved gap.\n- `fail_contract` and `fail_systemic` do not use local patch-only redispatch; repair the packet schema\u002Fboundary or repack the affected packet family.\n\n## Scan Duties\n\n`sp-map-scan` must:\n\n- enumerate project-internal evidence comprehensively as value-weighted repository inventory, then scan evidence selectively by value\n- generate a full project-relevant inventory from the runtime-resolved scan set across nested directories, then add Git tracking status and directory metadata during classification\n- write `.specify\u002Fproject-cognition\u002Fworkbench\u002Frepository-universe.json` with `included_paths` and any available `excluded_paths`; default `scan-set` output is intentionally minimal and does not require per-path exclusion details unless an explicit explain\u002Fdebug mode was used\n- write `.specify\u002Fproject-cognition\u002Fworkbench\u002Fscan-targets.json` with the value-weighted execution target set\n- classify project-relevant repository surfaces\n- gather evidence first from high-value committed source, runtime entrypoints, tests that prove behavior, scripts, configs, docs that define behavior, templates, generated-surface sources, and `.git` history\n- construct provisional nodes and candidate edges\n- record uncertainty, blockers, and missing evidence explicitly\n- stay graph-native from the start rather than staging a handbook-first atlas\n- current-runtime native subagents are the default execution surface for scan lanes\n- scan packets are executable read instructions and must still execute the packet reads before the leader accepts atlas evidence\n- every project-relevant row is categorized with value tiers and coverage classes such as `P0`, `P1`, `P2`, `P3`, `inventory`, `sampled`, `deep-read`, `critical`, `important`, and `low-risk`\n- `unknown` is a scan failure\n- maintain `excluded_from_deep_read` reasoning for `vendor-cache-build-output` and similar excluded roots\n- The runtime-resolved scan set is the primary inventory boundary; Git-tracked files and Git tracking status are classification metadata unless the scan explicitly records why untracked evidence matters.\n- `.cognitionignore`-excluded paths must not appear in coverage rows, evidence rows, provisional nodes, provisional edges, observations, or scan packets unless a later `!` rule re-includes the path.\n\n## Coverage Classification\n\n- Coverage classification must explain why each surface is `inventory`, `sampled`, `deep-read`, `critical`, `important`, or `low-risk`.\n- Every project-relevant row is categorized before the scan can report completion.\n\n## Criticality Scoring\n\n- Criticality scoring must explain why a surface escalates toward `critical` or can stay `low-risk`.\n- Atlas evidence should prioritize owner, consumer, change propagation, and verification reachability for higher-criticality rows.\n\n## Required Evidence Coverage\n\nThe scan must cover:\n\n- project shape and stack\n- architecture overview\n- directory ownership\n- module dependency graph\n- core code elements\n- entry and api surfaces\n- data and state flows\n- user and maintainer workflows\n- integrations and protocol boundaries\n- build, release, and runtime\n- testing and verification\n- risk, security, observability, and evolution\n- template and generated-surface propagation\n- coverage reverse index\n- layer 1 retrieval inputs\n- source and symbol surfaces\n- module and ownership surfaces\n- capability and workflow surfaces\n- state and handoff surfaces\n- verification surfaces\n- when UI exists: real UI entry points\u002Fnavigation, token\u002Ftheme\u002Ftypography\n  owners, reusable component owners, responsive\u002Fstate patterns,\n  Storybook\u002Fvisual\u002Faccessibility tests, and design\u002Freference assets\n- risk and fragility surfaces\n- high-value `.git` evolution surfaces\n\n## Consequence Substrate Evidence\n\nDuring the first baseline scan and rare full rebuilds, scan packets must collect the evidence that lets later workflows reason like a long-term project maintainer:\n\n- ownership evidence for files, modules, commands, APIs, generated assets, and workflow state\n- upstream and downstream consumers, including generated-surface propagation and adjacent workflow dependencies\n- lifecycle and state surfaces, including active\u002Frunning actors, queues, sessions, locks, caches, persisted state, and cleanup paths\n- shared mutable state and destructive-operation surfaces where close\u002Fdelete\u002Farchive\u002Frename\u002Fmigrate behavior can affect other work\n- compatibility, migration, rollback, retry, idempotency, and observability evidence\n- verification routes that prove affected owners, consumers, state transitions, and recovery paths\n- confidence notes, conflicts, known unknowns, and minimal live reads needed when later `sp-map-update` cannot fully prove an edge from existing evidence\n\nIf project-relevant evidence cannot be classified, the scan must remain blocked instead of silently downgrading the gap.\n\nFor UI evidence, make roles retrievable through node `type`, `title`, aliases,\ndomain, owner, route hints, and verification hints—not only opaque attrs. Use\nrole language such as `ui_entrypoint`, `design_token_owner`, `ui_component`,\n`ui_pattern`, `visual_verification`, and `design_reference_asset` when live\nevidence supports it.\n\n## Dispatch Guidance\n\n- Use `choose_subagent_dispatch(command_name=\"map-scan\", snapshot, workload_shape)` before broad work begins.\n- Dispatch each scan lane from a validated `MapScanPacket`.\n- Recommended scan lanes include source\u002Fsymbol discovery, module boundaries, capability flows, state surfaces, build\u002Ftest\u002Fruntime surfaces, and git evolution surfaces.\n- Every lane must return inspected paths, evidence harvested, confidence notes, provisional structure updates, typed graph-claim candidates, supporting or contradicting evidence references, and unresolved unknowns. Workers may propose `requested_state`, but only the compiler derives the published lifecycle state.\n- Must wait for every dispatched scan lane and consume its structured handoff before the scan closes.\n\n## Layer 1 Route Material\n\n- Generate layer 1 retrieval source material before the build phase begins.\n- Produce task route candidates.\n- Produce symptom route candidates.\n- Produce shared-surface hotspot candidates.\n- Produce verification route candidates.\n- Produce propagation-risk route candidates.\n\n## Concept Retrieval Signal Evidence\n\n- Collect concept retrieval signals that let `project-cognition lexicon` surface\n  useful `concept_candidates` instead of only path or symbol matches.\n- Record colloquial user phrases, aliases, shorthand, command names, workflow\n  names, symptoms, and domain vocabulary that maintainers naturally use when\n  asking for work.\n- Record these signals so downstream agent-owned semantic normalization can\n  extract embedded project terms when raw lexicon ranking and\n  `agent_normalization` are only bootstrap signals, all candidates are\n  `score=0`, or user prompts are localized, mixed-language, CJK, colloquial,\n  symptom-first, or mixed-language or CJK text. If\n  `agent_normalization.required=true`, treat it as a non-intelligent CLI\n  reminder to write `semantic_intake` from the alias catalog (action:\n  write_semantic_intake_from_alias_catalog). If `agent_normalization` is\n  omitted, treat it as `required=false`; omission does not make raw lexical\n  ranking authoritative. CJK or mixed CJK\u002FASCII input still requires agent\n  normalization even when positive raw lexical matches exist because embedded\n  project tokens do not translate the surrounding user language. The agent still\n  owns translation; `agent_normalization` is advisory guidance, not a route\n  decision.\n- Attach domain ownership evidence to each retrieval signal, including owning\n  paths, modules, generated surfaces, workflow artifacts, tests, and supporting\n  evidence rows.\n- Preserve conflicts, weak ownership, and unknown mappings as scan evidence for\n  `sp-map-build` rather than flattening them into accepted keywords.\n\n## Truth Layer Ledgers\n\n- Maintain file, entrypoint, branch, and control-node coverage.\n- Summarize ledger coverage by capability.\n- Summarize ledger coverage by symptom.\n\n## Completion Rule\n\nBefore reporting completion:\n\n- confirm that the evidence baseline exists under `.specify\u002Fproject-cognition\u002F`\n- confirm that provisional nodes and candidate edges were written\n- run `C:\\Users\\11034\\.specify\\bin\\project-cognition.exe validate-scan --format json` before handoff to `sp-map-build`\n- `sp-map-scan` may report complete only after `validate-scan` returns `status=ok` and `readiness=scan_ready`\n- if `validate-scan` returns `status=blocked`, report the blocking errors and do not claim the scan package is build-ready\n- confirm that the scan still has not published final cognition truth\n- report any open uncertainty that `sp-map-build` must reconcile\n\n## Claude Code Map Subagent Capability Discovery\n\n- Execution model: preserve the workflow's existing `subagent-mandatory`, `subagents-first`, `adaptive`, or `subagent-assisted` policy.\n- Dispatch shape: preserve the workflow's existing dispatch shape; use `subagent-blocked` only after the discovery step below fails or is unsafe.\n- Execution surface: prefer `native-subagents` when the current runtime supports it; use `none` only after recording the unavailable or unsafe surface.\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- Keep map packet\u002Fresult schemas from this workflow authoritative; do not substitute implementation `WorkerTaskResult` fields for map scan\u002Fbuild\u002Fupdate packet contracts.\n",{"name":5,"metadata":24,"description":7,"argument-hint":27,"compatibility":28,"user-invocable":29},{"author":25,"source":26},"github-spec-kit","templates\u002Fcommands\u002Fmap-scan.md","Optional subsystem, directory, or workflow area to emphasize while scanning","Requires spec-kit project structure with .specify\u002F directory",true,"main","021f5cbe02157229460a577e9a585f2da6d78cb0",".claude\u002Fskills\u002Fsp-map-scan","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-map-scan",{"tool":42,"command":43},"bunx","bunx skills add chenziyang110\u002Flaunchdeck --skill sp-map-scan",{"tool":45,"command":46},"pnpm","pnpm dlx skills add chenziyang110\u002Flaunchdeck --skill sp-map-scan","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsp-map-scan\u002FSKILL.md",[49,55],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"references\u002FINDEX.md","REFERENCE","参考文档",605,"https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsp-map-scan\u002Freferences\u002FINDEX.md",{"path":56,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002Fsemantic-work-contract.md",32214,"https:\u002F\u002Fgithub.com\u002Fchenziyang110\u002Flaunchdeck\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsp-map-scan\u002Freferences\u002Fsemantic-work-contract.md",[60,67,73,79,86,95],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"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":68,"name":62,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"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":74,"name":62,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"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":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"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":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":90,"licenseFileUrl":91,"sourceHtmlUrl":92,"categories":93,"keywords":94,"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":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"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",[],[]]