Project Query
Purpose
Answer and discuss project questions from a project-local .llm-wiki and its linked source materials.
This skill is the Project Develop Copilot equivalent of an Obsidian LLM Wiki query flow. It helps the user quickly find relevant requirements, development docs, bug notes, artifacts, dashboard state, and source proxies, then assemble a small discussion context for follow-up thinking.
It is read-only by default. It does not create Change Briefs, Bug Briefs, working-context pages, dashboard updates, or code changes unless the user explicitly asks to save or act on the discussion. When the user explicitly asks to update or refresh the dashboard, this skill may run dashboard-refresh mode and update only dashboard-related files.
When to Use
Use when the user asks to:
- answer a project question from
.llm-wiki
- find the requirement, bug, design doc, source proxy, or artifact related to a topic
- discuss project architecture, decisions, progress, or tradeoffs using existing project context
- summarize what the project wiki says about a feature, module, bug, or decision
- answer "what exists in this project / how is it called / how was it designed" questions about a module, integration, API, or feature; start from
.llm-wiki context first, then verify key facts against source code when needed
- answer cross-service ownership and contract questions such as which remote project owns an interface, Feign client, MQTT topic, HTTP API, RPC endpoint, shared DB, or shared config
- assemble context for later development without starting development yet
- compare related requirements, bugs, source materials, or working-context pages
- locate evidence before deciding whether to create a requirement, fix a bug, or review a change
- update, refresh, or sync the static project dashboard/progress page from existing
.llm-wiki evidence
Example triggers:
- "基于这个项目的 llm wiki 回答"
- "从项目 wiki 里找一下这个需求"
- "这个功能之前有什么开发文档"
- "帮我找到相关 requirement / bug / working-context"
- "先把上下文找出来,我们讨论一下"
- "what does the project wiki say about this module"
- "find related project docs before we decide what to do"
- "这个项目里面,大疆 API 适配,直播相关的内容有哪些?如何通过 API 调用"
- "更新项目看板"
- "刷新 dashboard"
- "同步项目状态页"
- "update progress dashboard"
When Not to Use
- Do not use for implementation after the user clearly asks to develop; route to
project-develop.
- Do not use for bug diagnosis/fix after the user clearly asks to fix; route to
project-fix.
- Do not use for adding new source material; route to
project-ingest.
- Do not use for finish sync; route to
project-finish.
- Do not use for commit/PR review; route to
project-review.
- Do not save synthesis back to
.llm-wiki unless the user explicitly asks to save it.
- Do not use dashboard refresh to imply finish, done, verified, or review-passed status; route to
project-finish or project-review for those claims.
Owned Gates
- Lightweight Boundary
- Context Recovery Gate
- Finish Sync Gate in explicit
dashboard-refresh mode
Initialization Gate
Run after resolving the project root and before a wiki query, cross-project lookup, or dashboard refresh.
wiki_required: true
on_missing_wiki: route project-init
direct_invocation_missing_wiki: dispatch-project-init
- When directly invoked and no parent router is active, treat the bootstrap handoff as an internal routing message, not a terminal user-facing response.
- Unless an explicit no-write constraint or root-confidence check requires confirmation, continue through
project-init in the same turn, consume its return handoff, and resume only at a supported next gate.
pending_primary_stage: project-query
- Preserve the requested evidence question or dashboard action as
pending_intent.
source-only_without_wiki: lightweight-answer
explicit_no_write_missing_wiki: confirm-before-init
- If
<project_root>/.llm-wiki/ is absent, stop and return a Context Handoff to project-init with bootstrap_mode: automatic-minimal. Do not present source fallback as a successful wiki query or dashboard refresh.
- Default query read-only behavior does not forbid automatic minimal bootstrap. If the user explicitly says no writes or forbids file changes, do not let
project-init write until the user confirms initialization.
- If the user explicitly wants only a small source-based answer with no lifecycle state, return to the router as
lightweight-answer instead of continuing in project-query.
On the missing-wiki branch, emit this minimal handoff:
bootstrap_handoff:
project_root: <resolved project root>
pending_intent: <preserved evidence question or dashboard request>
pending_primary_stage: project-query
requested_stage_or_bridge: project-init
bootstrap_mode: automatic-minimal
current_gate: Initialization Gate
Required First Check
- Resolve project root.
- Run the Initialization Gate before resolving child references or wiki targets.
- Resolve optional shared references from
../references/ or local references/. If lifecycle-router.md, flow-record.md, or progress-dashboard.md is missing, continue in degraded mode using the minimum rules in this skill; report the missing deep references and keep answers read-only unless the user explicitly asks to write dashboard state.
- Confirm
.llm-wiki/ exists. The directory itself proves that the project has a local LLM Wiki; .llm-wiki/index.md is an optional navigation page, not the existence sentinel.
- Decide whether this is read-only project query or full lifecycle work.
- Identify likely query targets: requirements, bugs, sources, working-context, modules, artifacts, dashboard, session-digests, log.
- If the user asks only to refresh dashboard/progress state, enter
dashboard-refresh mode.
- If the user asks to act beyond dashboard refresh, route to the appropriate lifecycle stage after answering or ask one minimal clarification.
Core Process
Read as needed:
../references/north-star.md
../references/lifecycle-router.md
../references/lifecycle-gates.md
../references/project-graph.md
../references/cross-project-refs.md
../references/base-graph.md
../references/progress-dashboard.md
../references/flow-record.md
.llm-wiki/README.md
.llm-wiki/index.md when present
.llm-wiki/modules/index.md
.llm-wiki/ingest/index.md
.llm-wiki/artifacts/index.md
.llm-wiki/cross-refs/index.md
.llm-wiki/project-graph/edges.md
.llm-wiki/project-graph/candidates.md
.llm-wiki/cross-refs/registry.local.json
.llm-wiki/registry.local.json
.llm-wiki/log.md
.llm-wiki/session-digests/
- relevant
.llm-wiki/requirements/*.md
- relevant
.llm-wiki/bugs/*.md
- relevant
.llm-wiki/sources/*.md
- relevant
.llm-wiki/working-context/*.md
Reference availability policy:
- Shared references are deep references, not startup requirements.
- Do not stop solely because
../references/ is missing.
- In degraded mode, query can still read
.llm-wiki indexes and return evidence/inference separation.
- Dashboard refresh in degraded mode must not claim done/verified/progress status unless existing Flow Record evidence is clear.
Workflow:
- Resolve project root and
.llm-wiki root.
- Build the wiki entrypoint map from the available targets under
.llm-wiki/. Prefer .llm-wiki/README.md and .llm-wiki/index.md when present, but do not declare the wiki absent just because either file is missing.
- Search lightweight indexes and directory entrypoints before deep-reading pages.
- Read the smallest relevant set of wiki pages.
- For cross-service questions, use Project Graph lookup before inferring remote ownership or contracts:
- Read
.llm-wiki/cross-refs/index.md as the pin layer.
- If a pin matches, follow
edge_id into .llm-wiki/project-graph/edges.md; never treat pin fields as contract facts.
- If no pin matches, search
.llm-wiki/project-graph/edges.md.
- If no edge matches, search
.llm-wiki/project-graph/candidates.md and label the result candidate only.
- If remote evidence is needed, resolve the remote project through registry order from
cross-project-refs.md: current project preferred registry, legacy current-project registry, Base Graph registry when Base is discoverable, then legacy global fallback as read-only compatibility.
- If no registry mapping exists, ask for the local path. With Base, write Base Graph
.llm-wiki/registry.local.json after confirmation; without Base, write only current project .llm-wiki/registry.local.json. Ensure .gitignore contains the three local-only ignore lines when writing current-project registry.
- Before reading remote wiki or source, output a cross-project boundary check with
scope: read-only.
- Use
verification_required: wiki-only-allowed for ownership or clue-finding answers; state when source verification was not performed.
- Do not write Change Brief, Bug Brief, Flow Record, dashboard, edges, candidates, pins, Base tracked files, or remote project files during ordinary query.
- If the user wants to register a missing relation after query, hand off to
project-maintain graph-register after confirmation.
- For large cross-service context, discover Base Graph through
LLM_WIKI_BASE_GRAPH_PATH or ~/.llm-wiki/base-graph.local.json; if found, read Base base-graph/overview.md and base-graph/project-catalog.md as read-only discussion context. If Base is not found, continue with current-project graph and state the downgrade.
- Fall back to original source files only when wiki summaries are insufficient or stale.
- Separate sourced wiki facts from inference.
- Return a concise answer and a Project Context Pack.
- In
dashboard-refresh mode, update only .llm-wiki/dashboard/progress.html, dashboard artifact metadata, and a short .llm-wiki/log.md entry when needed. Build flow board cards from Flow Records in Change Briefs, Bug Briefs, and working-context pages using progress-dashboard.md projection rules.
- Treat Flow Record as the lifecycle status authority.
- Treat artifact registry as the artifact/path/discoverability authority.
- Treat dashboard as a projection only.
- Do not edit Change Briefs, Bug Briefs, working-context Flow Records, or verification status during dashboard-only refresh.
- If a dashboard card disagrees with Flow Record evidence, downgrade/remove the card or report drift; do not rewrite Flow Record to match the card.
- Before reporting a dashboard refresh complete, run the Progress Dashboard consistency checks: every distinct
flow_id and parent_flow_id/child Flow Record discovered from .llm-wiki must have visible board cards for each eligible Flow Record row, matching dashboardData.flowRecords entries, and correct lane counts. Fix drift before returning.
- Offer upgrade routes only when useful: develop, fix, ingest, finish, review, evaluator, or Dolores.
Anti-Corruption Read Discipline
Before using .llm-wiki content as project fact, downgrade any item with these signals to clue-only status:
freshness-expired
stale-source-anchor
coarse-stale-source-anchor
missing-verified-commit
unreachable-verified-commit
unverifiable-anchor
source_refs[*].dirty_at_capture
source_refs[*].needs_commit_resolution
Clue-only content may guide where to look next, but it must not be presented as current fact. Prefer current source code, tests, configuration, runtime evidence, and source-verified Project Graph edges. If wiki content conflicts with current source evidence, state that source wins and that the wiki item needs re-verification.
Mode / Entry Selection
| Mode |
Use when |
quick-lookup |
user asks where a requirement/doc/page/artifact is |
wiki-answer |
user asks a question answerable from project wiki pages |
discussion-context |
user wants context assembled before discussion |
evidence-map |
user asks which docs, requirements, bugs, or artifacts relate to a topic |
cross-project-lookup |
user asks which remote project owns an interface/topic/client/config/callback or asks for a cross-service contract clue |
base-overview-query |
user asks for large cross-service context and Base Graph is discoverable |
dashboard-refresh |
user explicitly asks to refresh or update the static project dashboard/progress page |
upgrade-candidate |
query reveals a likely requirement, bug, stale source, or review issue |
Inputs
- user question
- project root
.llm-wiki root
- topic, module, requirement, bug, source, artifact, or dashboard hint
- optional current conversation context
Outputs
Answer format:
## Answer
## Project Context Pack
- project_root:
- wiki_pages_used:
- source_proxies_used:
- artifacts_used:
- related_requirements:
- related_bugs:
- related_modules:
- related_session_digests:
- cross_project_refs:
- project_graph_edges:
- project_graph_candidates:
- open_questions:
- confidence:
## Evidence
## Inference
## Possible Next Routes
Rules:
- Name the wiki pages used.
- State when evidence is insufficient.
- Do not expose sensitive raw content.
- Do not present inference as sourced fact.
- Treat Session Digests as recall context by default. They help recover what was discussed, but they are not confirmed project truth, scope, Flow Record, dashboard, or verification evidence unless selected items were explicitly promoted through Lifecycle Promotion. Prefer current code, current user confirmation, and current requirement/bug pages when conflicts exist.
- Keep the context pack small enough to feed into later discussion or lifecycle work.
Dashboard-refresh completion rules:
- Do not report completion if a child Flow Record appears only in evidence links or parent-card prose.
- Do not report completion if visible board cards and
dashboardData.flowRecords disagree for any flow_id.
- Do not report completion if lane count badges do not match the visible cards in each lane.
- Do not report completion if dashboard-only changes would imply a stronger lifecycle status than the source Flow Record supports.
Context Handoff
If the user upgrades after query, provide a handoff:
## Context Handoff
- lifecycle_session:
- user_intent:
- active_sources:
- active_scope:
- read_only_scope:
- candidate_scope:
- excluded_scope:
- current_gate:
- requested_stage_or_bridge:
- constraints:
For pure query mode, lifecycle_session can be none.
Return Handoff
Return:
## Return Handoff
- stage_or_bridge_used: project-query
- result_summary:
- changed_assumptions:
- recommended_scope_changes:
- artifacts:
- verification_notes:
- lifecycle_updates_needed:
- next_gate:
For read-only query, lifecycle_updates_needed is usually none.
For dashboard refresh:
## Dashboard Refresh
- dashboard_path:
- evidence_used:
- flow_records_used:
- updated_sections:
- unchanged_sections:
- unsupported_claims_downgraded:
- next_action:
Boundaries
- Do not modify code.
- Do not create or update
.llm-wiki by default.
- Ordinary cross-project lookup must not modify lifecycle state; writing a user-confirmed
.llm-wiki/registry.local.json mapping, plus the matching .gitignore ignore lines when missing, is local resolver configuration per cross-project-refs.md Write Boundary.
- Do not write remote project wiki, source, config, registry, or reverse cross-refs.
- Do not create or update
project-graph/edges.md, project-graph/candidates.md, or cross-refs/index.md in query mode; route registration to project-maintain.
- In
dashboard-refresh mode, modify only .llm-wiki/dashboard/progress.html, .llm-wiki/artifacts/index.md dashboard metadata when needed, and .llm-wiki/log.md.
- In
dashboard-refresh mode, do not create Change Briefs or mark plan/development/testing/archive done; show unmatched source/design docs as candidate or pending.
- In
dashboard-refresh mode, do not repair Flow Record status. Route stale or contradictory Flow Record evidence to project-finish, project-develop, project-fix, or project-review.
- Do not create Change Brief, Bug Brief, or working-context unless the user explicitly asks to save or act.
- Do not deep-read every source or module.
- Do not treat stale wiki summaries as authoritative over source code, tests, or current user decisions.
- Do not route to full lifecycle just because a topic is development-related.
Common Mistakes
- Treating every project question as
project-develop.
- Creating Change Briefs for exploratory discussion.
- Ignoring
.llm-wiki indexes and jumping straight to raw source files.
- Letting "real code first" override the query boundary. For project questions like "what exists here" or "how is this API called", use
project-query first to recover requirement/source/working-context evidence, then inspect code only to verify current behavior.
- Returning a broad essay instead of a small context pack.
- Answering cross-service behavior from memory or inference instead of checking pin -> edge -> candidate and clearly labeling wiki-only or candidate-only evidence.
- Failing to name the wiki pages used.
- Hiding uncertainty when wiki evidence is stale or missing.
- Treating dashboard refresh as project finish.
1---2name: project-query3description: Use when answering, discussing, locating, or synthesizing project questions from a project-local `.llm-wiki`, including cross-project refs, related requirements, bugs, source proxies, working-context pages, design docs, artifacts, dashboard state, and development notes without starting implementation.4---56# Project Query78## Purpose910Answer and discuss project questions from a project-local `.llm-wiki` and its linked source materials.1112This skill is the Project Develop Copilot equivalent of an Obsidian LLM Wiki query flow. It helps the user quickly find relevant requirements, development docs, bug notes, artifacts, dashboard state, and source proxies, then assemble a small discussion context for follow-up thinking.1314It is read-only by default. It does not create Change Briefs, Bug Briefs, working-context pages, dashboard updates, or code changes unless the user explicitly asks to save or act on the discussion. When the user explicitly asks to update or refresh the dashboard, this skill may run `dashboard-refresh` mode and update only dashboard-related files.1516## When to Use1718Use when the user asks to:1920- answer a project question from `.llm-wiki`21- find the requirement, bug, design doc, source proxy, or artifact related to a topic22- discuss project architecture, decisions, progress, or tradeoffs using existing project context23- summarize what the project wiki says about a feature, module, bug, or decision24- answer "what exists in this project / how is it called / how was it designed" questions about a module, integration, API, or feature; start from `.llm-wiki` context first, then verify key facts against source code when needed25- answer cross-service ownership and contract questions such as which remote project owns an interface, Feign client, MQTT topic, HTTP API, RPC endpoint, shared DB, or shared config26- assemble context for later development without starting development yet27- compare related requirements, bugs, source materials, or working-context pages28- locate evidence before deciding whether to create a requirement, fix a bug, or review a change29- update, refresh, or sync the static project dashboard/progress page from existing `.llm-wiki` evidence3031Example triggers:3233- "基于这个项目的 llm wiki 回答"34- "从项目 wiki 里找一下这个需求"35- "这个功能之前有什么开发文档"36- "帮我找到相关 requirement / bug / working-context"37- "先把上下文找出来,我们讨论一下"38- "what does the project wiki say about this module"39- "find related project docs before we decide what to do"40- "这个项目里面,大疆 API 适配,直播相关的内容有哪些?如何通过 API 调用"41- "更新项目看板"42- "刷新 dashboard"43- "同步项目状态页"44- "update progress dashboard"4546## When Not to Use4748- Do not use for implementation after the user clearly asks to develop; route to `project-develop`.49- Do not use for bug diagnosis/fix after the user clearly asks to fix; route to `project-fix`.50- Do not use for adding new source material; route to `project-ingest`.51- Do not use for finish sync; route to `project-finish`.52- Do not use for commit/PR review; route to `project-review`.53- Do not save synthesis back to `.llm-wiki` unless the user explicitly asks to save it.54- Do not use dashboard refresh to imply finish, done, verified, or review-passed status; route to `project-finish` or `project-review` for those claims.5556## Owned Gates5758- Lightweight Boundary59- Context Recovery Gate60- Finish Sync Gate in explicit `dashboard-refresh` mode6162## Initialization Gate6364Run after resolving the project root and before a wiki query, cross-project lookup, or dashboard refresh.6566- `wiki_required: true`67- `on_missing_wiki: route project-init`68- `direct_invocation_missing_wiki: dispatch-project-init`69- When directly invoked and no parent router is active, treat the bootstrap handoff as an internal routing message, not a terminal user-facing response.70- Unless an explicit no-write constraint or root-confidence check requires confirmation, continue through `project-init` in the same turn, consume its return handoff, and resume only at a supported next gate.71- `pending_primary_stage: project-query`72- Preserve the requested evidence question or dashboard action as `pending_intent`.73- `source-only_without_wiki: lightweight-answer`74- `explicit_no_write_missing_wiki: confirm-before-init`75- If `<project_root>/.llm-wiki/` is absent, stop and return a Context Handoff to `project-init` with `bootstrap_mode: automatic-minimal`. Do not present source fallback as a successful wiki query or dashboard refresh.76- Default query read-only behavior does not forbid automatic minimal bootstrap. If the user explicitly says no writes or forbids file changes, do not let `project-init` write until the user confirms initialization.77- If the user explicitly wants only a small source-based answer with no lifecycle state, return to the router as `lightweight-answer` instead of continuing in `project-query`.7879On the missing-wiki branch, emit this minimal handoff:8081```text82bootstrap_handoff:83 project_root: <resolved project root>84 pending_intent: <preserved evidence question or dashboard request>85 pending_primary_stage: project-query86 requested_stage_or_bridge: project-init87 bootstrap_mode: automatic-minimal88 current_gate: Initialization Gate89```9091## Required First Check92931. Resolve project root.942. Run the Initialization Gate before resolving child references or wiki targets.953. Resolve optional shared references from `../references/` or local `references/`. If `lifecycle-router.md`, `flow-record.md`, or `progress-dashboard.md` is missing, continue in degraded mode using the minimum rules in this skill; report the missing deep references and keep answers read-only unless the user explicitly asks to write dashboard state.964. Confirm `.llm-wiki/` exists. The directory itself proves that the project has a local LLM Wiki; `.llm-wiki/index.md` is an optional navigation page, not the existence sentinel.975. Decide whether this is read-only project query or full lifecycle work.986. Identify likely query targets: requirements, bugs, sources, working-context, modules, artifacts, dashboard, session-digests, log.997. If the user asks only to refresh dashboard/progress state, enter `dashboard-refresh` mode.1008. If the user asks to act beyond dashboard refresh, route to the appropriate lifecycle stage after answering or ask one minimal clarification.101102## Core Process103104Read as needed:105106- `../references/north-star.md`107- `../references/lifecycle-router.md`108- `../references/lifecycle-gates.md`109- `../references/project-graph.md`110- `../references/cross-project-refs.md`111- `../references/base-graph.md`112- `../references/progress-dashboard.md`113- `../references/flow-record.md`114- `.llm-wiki/README.md`115- `.llm-wiki/index.md` when present116- `.llm-wiki/modules/index.md`117- `.llm-wiki/ingest/index.md`118- `.llm-wiki/artifacts/index.md`119- `.llm-wiki/cross-refs/index.md`120- `.llm-wiki/project-graph/edges.md`121- `.llm-wiki/project-graph/candidates.md`122- `.llm-wiki/cross-refs/registry.local.json`123- `.llm-wiki/registry.local.json`124- `.llm-wiki/log.md`125- `.llm-wiki/session-digests/`126- relevant `.llm-wiki/requirements/*.md`127- relevant `.llm-wiki/bugs/*.md`128- relevant `.llm-wiki/sources/*.md`129- relevant `.llm-wiki/working-context/*.md`130131Reference availability policy:132133- Shared references are deep references, not startup requirements.134- Do not stop solely because `../references/` is missing.135- In degraded mode, query can still read `.llm-wiki` indexes and return evidence/inference separation.136- Dashboard refresh in degraded mode must not claim done/verified/progress status unless existing Flow Record evidence is clear.137138Workflow:1391401. Resolve project root and `.llm-wiki` root.1412. Build the wiki entrypoint map from the available targets under `.llm-wiki/`. Prefer `.llm-wiki/README.md` and `.llm-wiki/index.md` when present, but do not declare the wiki absent just because either file is missing.1423. Search lightweight indexes and directory entrypoints before deep-reading pages.1434. Read the smallest relevant set of wiki pages.1445. For cross-service questions, use Project Graph lookup before inferring remote ownership or contracts:145 - Read `.llm-wiki/cross-refs/index.md` as the pin layer.146 - If a pin matches, follow `edge_id` into `.llm-wiki/project-graph/edges.md`; never treat pin fields as contract facts.147 - If no pin matches, search `.llm-wiki/project-graph/edges.md`.148 - If no edge matches, search `.llm-wiki/project-graph/candidates.md` and label the result `candidate only`.149 - If remote evidence is needed, resolve the remote project through registry order from `cross-project-refs.md`: current project preferred registry, legacy current-project registry, Base Graph registry when Base is discoverable, then legacy global fallback as read-only compatibility.150 - If no registry mapping exists, ask for the local path. With Base, write Base Graph `.llm-wiki/registry.local.json` after confirmation; without Base, write only current project `.llm-wiki/registry.local.json`. Ensure `.gitignore` contains the three local-only ignore lines when writing current-project registry.151 - Before reading remote wiki or source, output a cross-project boundary check with `scope: read-only`.152 - Use `verification_required: wiki-only-allowed` for ownership or clue-finding answers; state when source verification was not performed.153 - Do not write Change Brief, Bug Brief, Flow Record, dashboard, edges, candidates, pins, Base tracked files, or remote project files during ordinary query.154 - If the user wants to register a missing relation after query, hand off to `project-maintain graph-register` after confirmation.155 - For large cross-service context, discover Base Graph through `LLM_WIKI_BASE_GRAPH_PATH` or `~/.llm-wiki/base-graph.local.json`; if found, read Base `base-graph/overview.md` and `base-graph/project-catalog.md` as read-only discussion context. If Base is not found, continue with current-project graph and state the downgrade.1566. Fall back to original source files only when wiki summaries are insufficient or stale.1577. Separate sourced wiki facts from inference.1588. Return a concise answer and a Project Context Pack.1599. In `dashboard-refresh` mode, update only `.llm-wiki/dashboard/progress.html`, dashboard artifact metadata, and a short `.llm-wiki/log.md` entry when needed. Build flow board cards from Flow Records in Change Briefs, Bug Briefs, and working-context pages using `progress-dashboard.md` projection rules.160 - Treat Flow Record as the lifecycle status authority.161 - Treat artifact registry as the artifact/path/discoverability authority.162 - Treat dashboard as a projection only.163 - Do not edit Change Briefs, Bug Briefs, working-context Flow Records, or verification status during dashboard-only refresh.164 - If a dashboard card disagrees with Flow Record evidence, downgrade/remove the card or report drift; do not rewrite Flow Record to match the card.16510. Before reporting a dashboard refresh complete, run the Progress Dashboard consistency checks: every distinct `flow_id` and `parent_flow_id`/child Flow Record discovered from `.llm-wiki` must have visible board cards for each eligible Flow Record row, matching `dashboardData.flowRecords` entries, and correct lane counts. Fix drift before returning.16611. Offer upgrade routes only when useful: develop, fix, ingest, finish, review, evaluator, or Dolores.167168## Anti-Corruption Read Discipline169170Before using `.llm-wiki` content as project fact, downgrade any item with these signals to clue-only status:171172- `freshness-expired`173- `stale-source-anchor`174- `coarse-stale-source-anchor`175- `missing-verified-commit`176- `unreachable-verified-commit`177- `unverifiable-anchor`178- `source_refs[*].dirty_at_capture`179- `source_refs[*].needs_commit_resolution`180181Clue-only content may guide where to look next, but it must not be presented as current fact. Prefer current source code, tests, configuration, runtime evidence, and source-verified Project Graph edges. If wiki content conflicts with current source evidence, state that source wins and that the wiki item needs re-verification.182183## Mode / Entry Selection184185| Mode | Use when |186|---|---|187| `quick-lookup` | user asks where a requirement/doc/page/artifact is |188| `wiki-answer` | user asks a question answerable from project wiki pages |189| `discussion-context` | user wants context assembled before discussion |190| `evidence-map` | user asks which docs, requirements, bugs, or artifacts relate to a topic |191| `cross-project-lookup` | user asks which remote project owns an interface/topic/client/config/callback or asks for a cross-service contract clue |192| `base-overview-query` | user asks for large cross-service context and Base Graph is discoverable |193| `dashboard-refresh` | user explicitly asks to refresh or update the static project dashboard/progress page |194| `upgrade-candidate` | query reveals a likely requirement, bug, stale source, or review issue |195196## Inputs197198- user question199- project root200- `.llm-wiki` root201- topic, module, requirement, bug, source, artifact, or dashboard hint202- optional current conversation context203204## Outputs205206Answer format:207208```markdown209## Answer210211## Project Context Pack212213- project_root:214- wiki_pages_used:215- source_proxies_used:216- artifacts_used:217- related_requirements:218- related_bugs:219- related_modules:220- related_session_digests:221- cross_project_refs:222- project_graph_edges:223- project_graph_candidates:224- open_questions:225- confidence:226227## Evidence228229## Inference230231## Possible Next Routes232```233234Rules:235236- Name the wiki pages used.237- State when evidence is insufficient.238- Do not expose sensitive raw content.239- Do not present inference as sourced fact.240- Treat Session Digests as recall context by default. They help recover what was discussed, but they are not confirmed project truth, scope, Flow Record, dashboard, or verification evidence unless selected items were explicitly promoted through Lifecycle Promotion. Prefer current code, current user confirmation, and current requirement/bug pages when conflicts exist.241- Keep the context pack small enough to feed into later discussion or lifecycle work.242243Dashboard-refresh completion rules:244245- Do not report completion if a child Flow Record appears only in evidence links or parent-card prose.246- Do not report completion if visible board cards and `dashboardData.flowRecords` disagree for any `flow_id`.247- Do not report completion if lane count badges do not match the visible cards in each lane.248- Do not report completion if dashboard-only changes would imply a stronger lifecycle status than the source Flow Record supports.249250## Context Handoff251252If the user upgrades after query, provide a handoff:253254```markdown255## Context Handoff256257- lifecycle_session:258- user_intent:259- active_sources:260- active_scope:261- read_only_scope:262- candidate_scope:263- excluded_scope:264- current_gate:265- requested_stage_or_bridge:266- constraints:267```268269For pure query mode, `lifecycle_session` can be `none`.270271## Return Handoff272273Return:274275```markdown276## Return Handoff277278- stage_or_bridge_used: project-query279- result_summary:280- changed_assumptions:281- recommended_scope_changes:282- artifacts:283- verification_notes:284- lifecycle_updates_needed:285- next_gate:286```287288For read-only query, `lifecycle_updates_needed` is usually `none`.289290For dashboard refresh:291292```markdown293## Dashboard Refresh294295- dashboard_path:296- evidence_used:297- flow_records_used:298- updated_sections:299- unchanged_sections:300- unsupported_claims_downgraded:301- next_action:302```303304## Boundaries305306- Do not modify code.307- Do not create or update `.llm-wiki` by default.308- Ordinary cross-project lookup must not modify lifecycle state; writing a user-confirmed `.llm-wiki/registry.local.json` mapping, plus the matching `.gitignore` ignore lines when missing, is local resolver configuration per `cross-project-refs.md` Write Boundary.309- Do not write remote project wiki, source, config, registry, or reverse cross-refs.310- Do not create or update `project-graph/edges.md`, `project-graph/candidates.md`, or `cross-refs/index.md` in query mode; route registration to `project-maintain`.311- In `dashboard-refresh` mode, modify only `.llm-wiki/dashboard/progress.html`, `.llm-wiki/artifacts/index.md` dashboard metadata when needed, and `.llm-wiki/log.md`.312- In `dashboard-refresh` mode, do not create Change Briefs or mark plan/development/testing/archive done; show unmatched source/design docs as candidate or pending.313- In `dashboard-refresh` mode, do not repair Flow Record status. Route stale or contradictory Flow Record evidence to `project-finish`, `project-develop`, `project-fix`, or `project-review`.314- Do not create Change Brief, Bug Brief, or working-context unless the user explicitly asks to save or act.315- Do not deep-read every source or module.316- Do not treat stale wiki summaries as authoritative over source code, tests, or current user decisions.317- Do not route to full lifecycle just because a topic is development-related.318319## Common Mistakes320321- Treating every project question as `project-develop`.322- Creating Change Briefs for exploratory discussion.323- Ignoring `.llm-wiki` indexes and jumping straight to raw source files.324- Letting "real code first" override the query boundary. For project questions like "what exists here" or "how is this API called", use `project-query` first to recover requirement/source/working-context evidence, then inspect code only to verify current behavior.325- Returning a broad essay instead of a small context pack.326- Answering cross-service behavior from memory or inference instead of checking pin -> edge -> candidate and clearly labeling wiki-only or candidate-only evidence.327- Failing to name the wiki pages used.328- Hiding uncertainty when wiki evidence is stale or missing.329- Treating dashboard refresh as project finish.