Project Develop Copilot
Purpose
project-develop-copilot is the top-level lifecycle router for project development work.
It helps users enter naturally without choosing a child skill first. It decides whether the request should stay lightweight or enter the full project lifecycle, then routes full work into the right stage while preserving scope, lifecycle state, handoff, verification, knowledge sync, artifact sync, dashboard sync, and review.
It does not replace project-query, project-task-dispatch, project-base-init, project-graph-visualize, project-init, project-ingest, project-develop, project-fix, project-finish, or project-review. It owns routing and lifecycle continuity; stage skills own stage execution.
When to Use
Use this skill when the user asks for project development help from natural language, including:
- Finding, explaining, querying, or discussing project
.llm-wiki, requirements, bugs, design docs, README files, skills, references, artifacts, or current project status.
- Investigating cross-service or cross-project integration points such as Feign clients, MQTT topics, HTTP/RPC interfaces, shared DB tables, shared config, upstream/downstream services, or external contracts.
- Previewing and distributing a stable design, requirement, discussion, review, test, deployment, or development package across two or more projects without losing the executable source documents.
- Developing a feature, requirement, PRD, design change, implementation plan, or scoped project change.
- Diagnosing or fixing a bug, failed test, runtime error, log symptom, regression, incident, or unexpected behavior.
- Ingesting PRDs, logs, PDFs, URLs, meeting notes, customer feedback, or temporary source material into project context.
- Extracting, distilling, reviewing, or importing historical AI/team chat sessions, transcript files, old conversation summaries, colleague AI discussions, or previous agent handoffs into project
.llm-wiki.
- Finishing work, syncing project knowledge, updating progress, preparing handoff, or checking done status.
- Refreshing or updating the static project dashboard/progress page without claiming work is finished.
- Checking, auditing, maintaining, or repairing project
.llm-wiki structure, visibility, Flow Records, artifact registry entries, module backlinks, dashboard consistency, logs, links, or safety issues.
- Running LLM Wiki Doctor, scoring
.llm-wiki maturity, checking whether project-init produced a useful wiki, diagnosing empty wiki skeletons, or explaining doctor/pre-commit/CI findings.
- Scanning Project Graph candidates through
project-graph-candidates-scan.
- Resolving candidates into evidence-backed edge proposals through
project-graph-auto-edge.
- Confirming, rejecting, manually registering, or pinning Project Graph edges through
project-graph-human-edge.
- Generating, refreshing, rebuilding, previewing, or validating an offline Base Graph / Project Graph interactive HTML through
project-graph-visualize.
- Auditing or repairing Project Graph structure through
project-maintain.
- Initializing an independent Base Graph repository that coordinates many project-local
.llm-wiki directories, including Chinese requests such as 初始化 Base Graph、初始化项目图谱仓库、创建跨项目导航层、注册多项目目录、跨项目总览仓库.
- Reviewing before commit, merge, PR, handoff, release, or broader testing.
- Continuing, resuming, or asking what to do next for previous project work.
- Evaluating whether a project skill flow went wrong, asking for skill-evaluator, conversation self-review, self-review, Dolores, eval gap, failure case, golden case, or lifecycle trace review.
When Not to Use
- Use an ordinary direct answer when the user is not asking about a project, repository, project skill,
.llm-wiki, or project lifecycle.
- Use a specialized external skill directly only when the user explicitly wants that skill outside project lifecycle context.
- Do not create lifecycle state for lightweight explanation, file lookup, or design discussion unless the user asks to save or execute the decision.
- Do not route to code implementation when the user says they only want to discuss, inspect, or design.
- Do not claim project work is complete from this router alone.
Owned Gates
The router owns lifecycle coherence across gates:
- Lightweight Boundary
- Context Recovery Gate
- Lifecycle Anchor Gate
- External Bridge Gate
- Session Import Gate
- Finish Sync Gate when the user explicitly asks to refresh dashboard/progress state
- Review & Wiki Integrity Gate when the user reports missing, stale, hard-to-find, inconsistent
.llm-wiki state or lifecycle-quality risk
- Cross-Project Dispatch Gate when a stable design spans two or more projects and is ready to split into independently executable task packages
Stage skills own their stage-specific gates, but this router must ensure the next gate is explicit before handing off.
Cross-project evidence is handled as a Context Recovery / External Bridge sub-check, not as a separate lifecycle Gate. Remote wiki/source access must stay read-only and must return through the current lifecycle session.
Cross-Service Project Graph First Rule
When a request mentions cross-service, cross-repository, upstream/downstream, Feign, MQTT, HTTP, WebSocket, API gateway, shared DB, shared configuration, event bus, or two or more registry project ids, inject a Project Graph first step before routing into project-fix, project-develop, or project-query.
The injected step is:
- Read
.llm-wiki/cross-refs/index.md.
- Read
.llm-wiki/project-graph/edges.md.
- Read
.llm-wiki/project-graph/candidates.md when confirmed edges do not cover the relation.
- Use the graph only to narrow source-reading scope.
- If graph evidence is missing, stale, draft, or indirect, verify from source before making implementation decisions.
This is a router navigation rule, not a validator guarantee. Do not claim Project Graph was the primary workflow unless the actual trace shows it was used before source exploration.
Cross-Project Task Dispatch Trigger
When a stable design spans two or more projects, proactively offer task distribution instead of waiting for the user to name a child skill. Preserve the original task kind: a discussion or design stays a discussion/design task unless the user chooses development.
Present exactly two clear choices:
- A — Dispatch mode (default): preview and send complete project-specific task packages. Delivery to the target Codex session means dispatch is complete; do not require receipts or manage downstream results.
- B — Development mode: preview and send complete project-specific task packages, then track each child until project-local development, project-local tests, and a local Git commit are complete. Do not push, create worktrees, switch branches, or require cross-project integration tests by default.
If the user asks to distribute tasks without requesting receipts, select Dispatch mode. Resolve each destination by corroborating Base Graph, Project Graph, and Codex Projects. If no matching Codex Project exists, fall back to creating the child task from the current session while setting its working directory to the Base Graph project root.
Always preview the complete split and task packages before creation. Ask for one batch confirmation covering all child tasks; never require one confirmation per project. Route the approved package to project-task-dispatch.
LLM Wiki Discovery Rule
Treat a discovered .llm-wiki/ directory as proof that the project has an LLM Wiki. Do not use .llm-wiki/index.md as the existence sentinel.
When .llm-wiki/index.md is missing, report only that the root index is missing or optional, then continue with available wiki targets such as .llm-wiki/README.md, .llm-wiki/log.md, .llm-wiki/modules/index.md, .llm-wiki/requirements/, .llm-wiki/bugs/, .llm-wiki/sources/, .llm-wiki/working-context/, .llm-wiki/artifacts/index.md, and Project Graph files. Fall back to source only after checking the relevant available wiki entries or when the wiki evidence is insufficient or stale.
Initialization Gate
Run this gate after resolving the business-project root and intended route, but before creating or resuming lifecycle state or invoking a wiki-backed child skill.
wiki_required_for: full-lifecycle-or-wiki-backed
on_missing_wiki: route project-init
excluded_mode: lightweight-answer-or-mechanical-artifact
missing_wiki_bootstrap_mode: automatic-minimal
explicit_no_write_missing_wiki: confirm-before-init
- Preserve the original request as
pending_intent and the selected route as pending_primary_stage.
- If
<project_root>/.llm-wiki/ is absent, stop the pending stage and hand off to project-init with bootstrap_mode: automatic-minimal. Do not create a partial wiki, Change Brief, Bug Brief, routing record, plan, or code change first.
- Automatic minimal bootstrap may write only under
<project_root>/.llm-wiki/**; it must defer project-root integrations such as .gitignore, .pre-commit-config.yaml, and .github/workflows/llm-wiki-doctor.yml.
- Keep the bootstrap routing handoff in memory until
project-init creates the standard wiki; then persist the routing record in the appropriate lifecycle session.
- Resume the pending stage only when the
project-init return handoff identifies a supported next_gate. Initialization Level 1 or 2 alone must not be treated as feature-ready.
- Explicit
project-init and project-base-init requests are gate destinations, not inputs to this gate.
- Default read-only behavior of a child stage, including Doctor diagnosis, is not an explicit no-write constraint. Only when the user explicitly says read-only, no writes, do not modify, or equivalent, report the missing wiki and ask before
project-init writes; offer a source-only lightweight-answer alternative without losing the pending intent.
- A source-only answer stays
lightweight-answer. A clearly source/diff-only review may use the narrow quick-diff-review exception, but it must not claim lifecycle or wiki integrity.
Required First Check
Before doing project work:
- Decide whether the request is
lightweight-answer or full-lifecycle.
- If lightweight-answer applies, answer from available evidence without creating lifecycle state.
- If
mechanical-artifact applies, route directly to the deterministic child skill without Change Brief, Flow Record, planning, finish sync, or other lifecycle state.
- If full lifecycle or any wiki-backed route applies, resolve or ask for the project root when it is not obvious.
- Select the intended primary stage without invoking it.
- Run the Initialization Gate for business-project full-lifecycle or wiki-backed work.
- If the gate routes to
project-init, wait for its return handoff and keep pending_intent plus pending_primary_stage intact.
- For full-lifecycle routes, create or resume a Lifecycle Session: Change Brief, Bug Brief, or working-context.
- Save or update a short routing record for full-lifecycle routes.
- Invoke one primary stage skill, then select optional external bridge skills only after project scope is known.
Core Process
- Read
references/north-star.md when goals, scope, or lifecycle ownership are unclear.
- Read
references/lifecycle-router.md for routing decisions and routing record format.
- Classify the user request:
- lightweight-answer
- project wiki query / discussion context
- cross-project lookup / evidence gathering
- cross-project task dispatch
- init / ingest
- historical session extraction / Session Digest import
- requirement or feature development
- bug or incident fixing
- finish or progress sync
- dashboard refresh
- review
- resume
- evaluator / self-review / Dolores / lifecycle-quality review
- Recover project context only as much as the route requires.
- For full lifecycle work, establish the lifecycle session and next gate.
- Hand off to the primary stage skill with concise scoped context.
- After the stage returns, make sure the lifecycle still has a next action: verify, sync, review, update dashboard, evaluate flow quality, or stop with a clear limitation.
Mode / Entry Selection
| Situation |
Mode |
Primary stage |
| User asks a tiny file/doc lookup or simple concept explanation |
lightweight-answer |
none |
User asks to query project .llm-wiki, find related requirements/docs/bugs/artifacts, or assemble discussion context |
read-only-query |
project-query |
| User asks which service owns an interface/topic/client/config/callback, or asks for cross-service contract evidence without requesting a change |
cross-project-lookup |
project-query |
| User asks to register a known cross-project integration point manually, confirm a proposal, reject a proposal, or pin an accepted relationship |
wiki-maintenance |
project-graph-human-edge |
User asks to generate, refresh, rebuild, preview, or validate Base Graph / Project Graph graph.html or another interactive graph HTML |
mechanical-artifact |
project-graph-visualize |
| User asks to scan for missing upstream/downstream relationship candidates |
wiki-maintenance |
project-graph-candidates-scan |
| User asks to turn a candidate into an evidence-backed edge proposal through Base Graph or source verification |
wiki-maintenance |
project-graph-auto-edge |
| User asks for large-scope requirement discussion across services |
read-only-query |
query Base Graph overview first when Base is discoverable |
| User says to discuss design and not implement |
lightweight-answer |
none |
| A stable design spans two or more projects and the user asks to preview, distribute, delegate, or create project-specific Codex tasks |
cross-project-dispatch |
project-task-dispatch |
User asks to initialize, create, adopt, or refresh a Base Graph repository, graph-base repo, base-project-graph, platform graph catalog, platform overview repo, 项目图谱仓库, 跨项目导航层, Base Graph 初始化, or 多项目 .llm-wiki 总目录 |
full-lifecycle |
project-base-init |
| User provides PRD/source material to index |
full-lifecycle |
project-ingest |
User provides or references historical AI/team chat, session transcript, old conversation summary, colleague AI discussion, previous agent handoff, or asks to distill/import previous session context into .llm-wiki |
session-context-import |
project-session-extract |
| User asks to initialize/adopt/refresh project context |
full-lifecycle |
project-init |
User asks to run LLM Wiki Doctor, score .llm-wiki, check whether project-init produced a useful wiki, or explain doctor/pre-commit/CI findings |
wiki-doctor |
llm-wiki-doctor |
| User asks for a feature, requirement, plan, or implementation |
full-lifecycle |
project-develop |
| User reports a bug, log, error, failed test, or incident |
full-lifecycle |
project-fix |
| User asks to update, refresh, or sync the static dashboard/progress page only |
dashboard-refresh |
project-query |
User asks why wiki pages cannot be found, or asks to check, audit, lint, repair, or maintain .llm-wiki structure, links, Flow Records, module backlinks, artifacts, logs, dashboard consistency, Project Graph consistency, or safety |
wiki-maintenance |
project-maintain |
| User asks finish, done, sync, update status, or handoff |
full-lifecycle |
project-finish |
| User asks review, risk check, before commit/PR/merge |
full-lifecycle |
project-review |
| User says continue or resume previous work |
full-lifecycle |
resume then choose stage |
| User asks skill failure review, skill-evaluator, eval gap, failure case, golden case, self-review, conversation self-review, lifecycle trace review, or Dolores |
lifecycle-quality |
project-review, evaluator bridge, or Dolores bridge |
If confidence is low, ask one minimal routing question. Do not start a long intake form.
Routing Tie-breakers
When multiple routes seem plausible, choose the least state-changing route that still satisfies the user:
lightweight-answer < read-only-query < mechanical-artifact < wiki-doctor < dashboard-refresh < wiki-maintenance < cross-project-dispatch < full-lifecycle
Use this quick decision order:
- No project evidence needed and no write requested ->
lightweight-answer.
- Project evidence needed, but read-only ->
read-only-query / project-query.
- If the evidence crosses another project through Project Graph pins/edges/candidates, use
cross-project-lookup and keep remote scope read-only.
- Only visible dashboard/progress projection requested ->
dashboard-refresh / project-query.
- LLM Wiki Doctor, wiki maturity score, empty wiki skeleton, or doctor/pre-commit/CI finding explanation requested ->
wiki-doctor / llm-wiki-doctor.
- Project Graph candidate scan requested (
graph-scan, candidates scan, 自动扫描候选关系, 扫一下 candidates) -> wiki-maintenance / project-graph-candidates-scan.
- Project Graph auto proposal requested (
auto-edge, 自动登记, 生成 edge proposal, 通过 base-graph 找项目类方法但先确认) -> wiki-maintenance / project-graph-auto-edge.
- Project Graph human confirmation/manual edge requested (
human-edge, 手动登记, 确认 proposal, 接受 proposal, 拒绝 proposal) -> wiki-maintenance / project-graph-human-edge.
- Wiki visibility, broken links, stale indexes, dashboard/card drift, artifact registry drift, Project Graph audit/repair, safety, or consistency requested ->
wiki-maintenance / project-maintain.
- Base Graph repository initialization, adoption, or refresh requested, including Chinese prompts like 初始化项目图谱仓库 or 跨项目导航层 -> full lifecycle /
project-base-init.
- Stable confirmed work spans two or more projects and needs previewed task creation ->
cross-project-dispatch / project-task-dispatch.
- Requirement, bug, source ingest, implementation, finish, verification, handoff, or review readiness requested -> full lifecycle.
- Process/routing/gate/conversation-flow evaluation requested ->
lifecycle-quality.
Natural lifecycle-quality intent is enough. The user does not need to say Dolores or skill-evaluator; phrases like "did this flow go wrong", "review whether the lifecycle drifted", or "评估这次流程是否跑偏" should route to lifecycle-quality. Ordinary review code, continue, finish, bug, and next step stay on normal delivery routes unless the user asks to evaluate the process itself.
No Child Skill Mode
no skills, no child skill, and no lifecycle requests are aliases for lightweight-answer with primary_stage: none.
Use this mode when the user wants a quick answer, a tiny lookup, a lightweight explanation, or a design discussion that should not be saved or executed yet.
In this mode:
- Do not call a child project skill.
- Do not call an external bridge skill.
- Do not create or modify
.llm-wiki files.
- Do not create Change Brief, Bug Brief, Flow Record, handoff, artifact registry rows, dashboard updates, or code changes.
- Cite evidence when useful, then answer directly.
Upgrade out of this mode only when the user explicitly asks to save, ingest, plan, execute, fix, review, finish, refresh dashboard, or otherwise update project lifecycle state.
Lifecycle Quality Trigger Phrases
Use lifecycle-quality mode when the user explicitly uses language such as:
- skill-evaluator, evaluator, evaluate this skill, eval gap, failure case, golden case
- self-review, conversation self-review, Dolores, lifecycle trace, routing trace, gate trace
- "这个 skill 为什么跑偏?", "这个流程是不是跑偏了", "先不要直接改,评估一下"
- "review the conversation trace", "did this lifecycle go wrong", "find the smallest patch"
Do not trigger lifecycle-quality for ordinary delivery requests such as "继续", "修 bug", "review 代码", "完成了吗", or "总结一下" unless the user also asks to evaluate the process or review the conversation lifecycle.
Inputs
Possible inputs include:
- user request
- repository path or project root
- PRD/design/log/source paths
.llm-wiki pages
- Change Brief, Bug Brief, or working-context
- git diff or changed files
- external skill output
- dashboard file or artifact registry
Outputs
For lightweight-answer:
- concise answer
- evidence references when useful
- no lifecycle state changes unless requested
For read-only query:
- answer from
.llm-wiki and linked evidence
- Project Context Pack
- related requirements/bugs/sources/artifacts
- possible next routes
- no lifecycle state changes unless requested
For dashboard-refresh:
- recover project dashboard evidence from
.llm-wiki
- update only
.llm-wiki/dashboard/progress.html and related dashboard artifact metadata/log when needed
- do not mark work done unless finish/verification evidence already exists
For session-context-import:
- brief Session Digest candidate list first
- user selection of items to keep
- Session Digest Markdown draft before
.llm-wiki writes
- confirmation question before writing
.llm-wiki/session-digests/
- no requirement, bug, Flow Record, dashboard, scope, or project-truth update by default
- optional Lifecycle Promotion candidates only when the user asks to promote selected digest items
- imported digest path after approval
For cross-project-dispatch:
- verified destination mapping from Base Graph, Project Graph, and Codex Projects
- complete shared baseline plus one executable project task specification and handoff per destination
- preview before task creation
- one batch confirmation
- Dispatch mode by default; Development mode only when the user explicitly requests receipt tracking
For full lifecycle:
- routing decision
- lifecycle session path or recovery summary
- active source/scope summary
- selected primary stage
- optional secondary bridges
- next gate
Context Handoff
When handing off to a child stage skill or external bridge, use a short structured handoff:
## Context Handoff
- project_root:
- lifecycle_session:
- user_intent:
- pending_intent:
- pending_primary_stage:
- active_sources:
- active_scope:
- read_only_scope:
- candidate_scope:
- excluded_scope:
- current_gate:
- requested_stage_or_bridge:
- bootstrap_mode:
- constraints:
Do not include long reasoning. Include only enough context for the next skill to act safely.
Return Handoff
When a child stage or external bridge returns, fold the result back into lifecycle state:
## Return Handoff
- stage_or_bridge_used:
- result_summary:
- changed_assumptions:
- recommended_scope_changes:
- artifacts:
- verification_notes:
- lifecycle_updates_needed:
- next_gate:
If the returned result suggests new scope, new sources, changed acceptance criteria, or missing verification, route to the correct gate before proceeding.
Boundaries
- Lightweight-answer and read-only query must not create Change Brief, Bug Brief, dashboard updates, or code changes by default.
mechanical-artifact routes such as project-graph-visualize may write only their declared artifact output and must not create lifecycle documents, plans, finish-sync records, or commits unless the user explicitly asks.
- Full lifecycle work must not call external implementation/debugging/planning skills before project scope is established.
- Cross-project dispatch must not replace executable source documents with summary-only handoffs, create worktrees, switch branches, or push commits by default.
- External skills are bridges, not lifecycle owners.
- Completion claims must go through verification, knowledge sync, artifact sync, dashboard sync when enabled, and review as appropriate.
- Evaluator and Dolores are non-blocking by default unless the user explicitly asks to enter improvement mode or review finds high-risk process failure.
.llm-wiki stores indexes, summaries, relationships, status, and gaps; it is not a raw document warehouse.
Common Mistakes
- Forcing lightweight design discussion into full lifecycle.
- Letting users choose child skills manually when natural routing is possible.
- Asking for one confirmation per child task instead of one batch confirmation after preview.
- Jumping into
systematic-debugging, planning, TDD, or execution before scoped project context exists.
- Creating duplicate Change Briefs or Bug Briefs instead of resuming existing sessions.
- Treating dashboard state as a source of truth instead of evidence-backed summary.
- Answering "why can I not see this wiki document" as a plain query when the underlying issue is missing artifact, module, dashboard, or log visibility.
- Declaring project work done from the router without finish/review gates.
- Running evaluator or Dolores on every normal task and making the workflow feel heavy.
1---2name: project-develop-copilot3description: Use when the user wants project development help from natural intent, including Chinese prompts for 项目开发、项目文档、跨项目关系、跨项目任务分发、项目图谱仓库、Base Graph、需求、bug、日志、评审、继续, or routing into project lifecycle skills.4---56# Project Develop Copilot78## Purpose910`project-develop-copilot` is the top-level lifecycle router for project development work.1112It helps users enter naturally without choosing a child skill first. It decides whether the request should stay lightweight or enter the full project lifecycle, then routes full work into the right stage while preserving scope, lifecycle state, handoff, verification, knowledge sync, artifact sync, dashboard sync, and review.1314It does not replace `project-query`, `project-task-dispatch`, `project-base-init`, `project-graph-visualize`, `project-init`, `project-ingest`, `project-develop`, `project-fix`, `project-finish`, or `project-review`. It owns routing and lifecycle continuity; stage skills own stage execution.1516## When to Use1718Use this skill when the user asks for project development help from natural language, including:1920- Finding, explaining, querying, or discussing project `.llm-wiki`, requirements, bugs, design docs, README files, skills, references, artifacts, or current project status.21- Investigating cross-service or cross-project integration points such as Feign clients, MQTT topics, HTTP/RPC interfaces, shared DB tables, shared config, upstream/downstream services, or external contracts.22- Previewing and distributing a stable design, requirement, discussion, review, test, deployment, or development package across two or more projects without losing the executable source documents.23- Developing a feature, requirement, PRD, design change, implementation plan, or scoped project change.24- Diagnosing or fixing a bug, failed test, runtime error, log symptom, regression, incident, or unexpected behavior.25- Ingesting PRDs, logs, PDFs, URLs, meeting notes, customer feedback, or temporary source material into project context.26- Extracting, distilling, reviewing, or importing historical AI/team chat sessions, transcript files, old conversation summaries, colleague AI discussions, or previous agent handoffs into project `.llm-wiki`.27- Finishing work, syncing project knowledge, updating progress, preparing handoff, or checking done status.28- Refreshing or updating the static project dashboard/progress page without claiming work is finished.29- Checking, auditing, maintaining, or repairing project `.llm-wiki` structure, visibility, Flow Records, artifact registry entries, module backlinks, dashboard consistency, logs, links, or safety issues.30- Running LLM Wiki Doctor, scoring `.llm-wiki` maturity, checking whether project-init produced a useful wiki, diagnosing empty wiki skeletons, or explaining doctor/pre-commit/CI findings.31- Scanning Project Graph candidates through `project-graph-candidates-scan`.32- Resolving candidates into evidence-backed edge proposals through `project-graph-auto-edge`.33- Confirming, rejecting, manually registering, or pinning Project Graph edges through `project-graph-human-edge`.34- Generating, refreshing, rebuilding, previewing, or validating an offline Base Graph / Project Graph interactive HTML through `project-graph-visualize`.35- Auditing or repairing Project Graph structure through `project-maintain`.36- Initializing an independent Base Graph repository that coordinates many project-local `.llm-wiki` directories, including Chinese requests such as 初始化 Base Graph、初始化项目图谱仓库、创建跨项目导航层、注册多项目目录、跨项目总览仓库.37- Reviewing before commit, merge, PR, handoff, release, or broader testing.38- Continuing, resuming, or asking what to do next for previous project work.39- Evaluating whether a project skill flow went wrong, asking for skill-evaluator, conversation self-review, self-review, Dolores, eval gap, failure case, golden case, or lifecycle trace review.4041## When Not to Use4243- Use an ordinary direct answer when the user is not asking about a project, repository, project skill, `.llm-wiki`, or project lifecycle.44- Use a specialized external skill directly only when the user explicitly wants that skill outside project lifecycle context.45- Do not create lifecycle state for lightweight explanation, file lookup, or design discussion unless the user asks to save or execute the decision.46- Do not route to code implementation when the user says they only want to discuss, inspect, or design.47- Do not claim project work is complete from this router alone.4849## Owned Gates5051The router owns lifecycle coherence across gates:5253- Lightweight Boundary54- Context Recovery Gate55- Lifecycle Anchor Gate56- External Bridge Gate57- Session Import Gate58- Finish Sync Gate when the user explicitly asks to refresh dashboard/progress state59- Review & Wiki Integrity Gate when the user reports missing, stale, hard-to-find, inconsistent `.llm-wiki` state or lifecycle-quality risk60- Cross-Project Dispatch Gate when a stable design spans two or more projects and is ready to split into independently executable task packages6162Stage skills own their stage-specific gates, but this router must ensure the next gate is explicit before handing off.6364Cross-project evidence is handled as a Context Recovery / External Bridge sub-check, not as a separate lifecycle Gate. Remote wiki/source access must stay read-only and must return through the current lifecycle session.6566## Cross-Service Project Graph First Rule6768When a request mentions cross-service, cross-repository, upstream/downstream, Feign, MQTT, HTTP, WebSocket, API gateway, shared DB, shared configuration, event bus, or two or more registry project ids, inject a Project Graph first step before routing into `project-fix`, `project-develop`, or `project-query`.6970The injected step is:71721. Read `.llm-wiki/cross-refs/index.md`.732. Read `.llm-wiki/project-graph/edges.md`.743. Read `.llm-wiki/project-graph/candidates.md` when confirmed edges do not cover the relation.754. Use the graph only to narrow source-reading scope.765. If graph evidence is missing, stale, draft, or indirect, verify from source before making implementation decisions.7778This is a router navigation rule, not a validator guarantee. Do not claim Project Graph was the primary workflow unless the actual trace shows it was used before source exploration.7980## Cross-Project Task Dispatch Trigger8182When a stable design spans two or more projects, proactively offer task distribution instead of waiting for the user to name a child skill. Preserve the original task kind: a discussion or design stays a discussion/design task unless the user chooses development.8384Present exactly two clear choices:8586- **A — Dispatch mode (default):** preview and send complete project-specific task packages. Delivery to the target Codex session means dispatch is complete; do not require receipts or manage downstream results.87- **B — Development mode:** preview and send complete project-specific task packages, then track each child until project-local development, project-local tests, and a local Git commit are complete. Do not push, create worktrees, switch branches, or require cross-project integration tests by default.8889If the user asks to distribute tasks without requesting receipts, select Dispatch mode. Resolve each destination by corroborating Base Graph, Project Graph, and Codex Projects. If no matching Codex Project exists, fall back to creating the child task from the current session while setting its working directory to the Base Graph project root.9091Always preview the complete split and task packages before creation. Ask for one batch confirmation covering all child tasks; never require one confirmation per project. Route the approved package to `project-task-dispatch`.9293## LLM Wiki Discovery Rule9495Treat a discovered `.llm-wiki/` directory as proof that the project has an LLM Wiki. Do not use `.llm-wiki/index.md` as the existence sentinel.9697When `.llm-wiki/index.md` is missing, report only that the root index is missing or optional, then continue with available wiki targets such as `.llm-wiki/README.md`, `.llm-wiki/log.md`, `.llm-wiki/modules/index.md`, `.llm-wiki/requirements/`, `.llm-wiki/bugs/`, `.llm-wiki/sources/`, `.llm-wiki/working-context/`, `.llm-wiki/artifacts/index.md`, and Project Graph files. Fall back to source only after checking the relevant available wiki entries or when the wiki evidence is insufficient or stale.9899## Initialization Gate100101Run this gate after resolving the business-project root and intended route, but before creating or resuming lifecycle state or invoking a wiki-backed child skill.102103- `wiki_required_for: full-lifecycle-or-wiki-backed`104- `on_missing_wiki: route project-init`105- `excluded_mode: lightweight-answer-or-mechanical-artifact`106- `missing_wiki_bootstrap_mode: automatic-minimal`107- `explicit_no_write_missing_wiki: confirm-before-init`108- Preserve the original request as `pending_intent` and the selected route as `pending_primary_stage`.109- If `<project_root>/.llm-wiki/` is absent, stop the pending stage and hand off to `project-init` with `bootstrap_mode: automatic-minimal`. Do not create a partial wiki, Change Brief, Bug Brief, routing record, plan, or code change first.110- Automatic minimal bootstrap may write only under `<project_root>/.llm-wiki/**`; it must defer project-root integrations such as `.gitignore`, `.pre-commit-config.yaml`, and `.github/workflows/llm-wiki-doctor.yml`.111- Keep the bootstrap routing handoff in memory until `project-init` creates the standard wiki; then persist the routing record in the appropriate lifecycle session.112- Resume the pending stage only when the `project-init` return handoff identifies a supported `next_gate`. Initialization Level 1 or 2 alone must not be treated as feature-ready.113- Explicit `project-init` and `project-base-init` requests are gate destinations, not inputs to this gate.114- Default read-only behavior of a child stage, including Doctor diagnosis, is not an explicit no-write constraint. Only when the user explicitly says read-only, no writes, do not modify, or equivalent, report the missing wiki and ask before `project-init` writes; offer a source-only `lightweight-answer` alternative without losing the pending intent.115- A source-only answer stays `lightweight-answer`. A clearly source/diff-only review may use the narrow `quick-diff-review` exception, but it must not claim lifecycle or wiki integrity.116117## Required First Check118119Before doing project work:1201211. Decide whether the request is `lightweight-answer` or `full-lifecycle`.1222. If lightweight-answer applies, answer from available evidence without creating lifecycle state.1233. If `mechanical-artifact` applies, route directly to the deterministic child skill without Change Brief, Flow Record, planning, finish sync, or other lifecycle state.1244. If full lifecycle or any wiki-backed route applies, resolve or ask for the project root when it is not obvious.1255. Select the intended primary stage without invoking it.1266. Run the Initialization Gate for business-project full-lifecycle or wiki-backed work.1277. If the gate routes to `project-init`, wait for its return handoff and keep `pending_intent` plus `pending_primary_stage` intact.1288. For full-lifecycle routes, create or resume a Lifecycle Session: Change Brief, Bug Brief, or working-context.1299. Save or update a short routing record for full-lifecycle routes.13010. Invoke one primary stage skill, then select optional external bridge skills only after project scope is known.131132## Core Process1331341. Read `references/north-star.md` when goals, scope, or lifecycle ownership are unclear.1352. Read `references/lifecycle-router.md` for routing decisions and routing record format.1363. Classify the user request:137 - lightweight-answer138 - project wiki query / discussion context139 - cross-project lookup / evidence gathering140 - cross-project task dispatch141 - init / ingest142 - historical session extraction / Session Digest import143 - requirement or feature development144 - bug or incident fixing145 - finish or progress sync146 - dashboard refresh147 - review148 - resume149 - evaluator / self-review / Dolores / lifecycle-quality review1504. Recover project context only as much as the route requires.1515. For full lifecycle work, establish the lifecycle session and next gate.1526. Hand off to the primary stage skill with concise scoped context.1537. After the stage returns, make sure the lifecycle still has a next action: verify, sync, review, update dashboard, evaluate flow quality, or stop with a clear limitation.154155## Mode / Entry Selection156157| Situation | Mode | Primary stage |158|---|---|---|159| User asks a tiny file/doc lookup or simple concept explanation | lightweight-answer | none |160| User asks to query project `.llm-wiki`, find related requirements/docs/bugs/artifacts, or assemble discussion context | read-only-query | `project-query` |161| User asks which service owns an interface/topic/client/config/callback, or asks for cross-service contract evidence without requesting a change | cross-project-lookup | `project-query` |162| User asks to register a known cross-project integration point manually, confirm a proposal, reject a proposal, or pin an accepted relationship | wiki-maintenance | `project-graph-human-edge` |163| User asks to generate, refresh, rebuild, preview, or validate Base Graph / Project Graph `graph.html` or another interactive graph HTML | mechanical-artifact | `project-graph-visualize` |164| User asks to scan for missing upstream/downstream relationship candidates | wiki-maintenance | `project-graph-candidates-scan` |165| User asks to turn a candidate into an evidence-backed edge proposal through Base Graph or source verification | wiki-maintenance | `project-graph-auto-edge` |166| User asks for large-scope requirement discussion across services | read-only-query | query Base Graph overview first when Base is discoverable |167| User says to discuss design and not implement | lightweight-answer | none |168| A stable design spans two or more projects and the user asks to preview, distribute, delegate, or create project-specific Codex tasks | cross-project-dispatch | `project-task-dispatch` |169| User asks to initialize, create, adopt, or refresh a Base Graph repository, graph-base repo, base-project-graph, platform graph catalog, platform overview repo, 项目图谱仓库, 跨项目导航层, Base Graph 初始化, or 多项目 `.llm-wiki` 总目录 | full-lifecycle | `project-base-init` |170| User provides PRD/source material to index | full-lifecycle | `project-ingest` |171| User provides or references historical AI/team chat, session transcript, old conversation summary, colleague AI discussion, previous agent handoff, or asks to distill/import previous session context into `.llm-wiki` | session-context-import | `project-session-extract` |172| User asks to initialize/adopt/refresh project context | full-lifecycle | `project-init` |173| User asks to run LLM Wiki Doctor, score `.llm-wiki`, check whether project-init produced a useful wiki, or explain doctor/pre-commit/CI findings | wiki-doctor | `llm-wiki-doctor` |174| User asks for a feature, requirement, plan, or implementation | full-lifecycle | `project-develop` |175| User reports a bug, log, error, failed test, or incident | full-lifecycle | `project-fix` |176| User asks to update, refresh, or sync the static dashboard/progress page only | dashboard-refresh | `project-query` |177| User asks why wiki pages cannot be found, or asks to check, audit, lint, repair, or maintain `.llm-wiki` structure, links, Flow Records, module backlinks, artifacts, logs, dashboard consistency, Project Graph consistency, or safety | wiki-maintenance | `project-maintain` |178| User asks finish, done, sync, update status, or handoff | full-lifecycle | `project-finish` |179| User asks review, risk check, before commit/PR/merge | full-lifecycle | `project-review` |180| User says continue or resume previous work | full-lifecycle | resume then choose stage |181| User asks skill failure review, skill-evaluator, eval gap, failure case, golden case, self-review, conversation self-review, lifecycle trace review, or Dolores | lifecycle-quality | `project-review`, evaluator bridge, or Dolores bridge |182183If confidence is low, ask one minimal routing question. Do not start a long intake form.184185## Routing Tie-breakers186187When multiple routes seem plausible, choose the least state-changing route that still satisfies the user:188189```text190lightweight-answer < read-only-query < mechanical-artifact < wiki-doctor < dashboard-refresh < wiki-maintenance < cross-project-dispatch < full-lifecycle191```192193Use this quick decision order:1941951. No project evidence needed and no write requested -> `lightweight-answer`.1962. Project evidence needed, but read-only -> `read-only-query` / `project-query`.197 - If the evidence crosses another project through Project Graph pins/edges/candidates, use `cross-project-lookup` and keep remote scope read-only.1983. Only visible dashboard/progress projection requested -> `dashboard-refresh` / `project-query`.1994. LLM Wiki Doctor, wiki maturity score, empty wiki skeleton, or doctor/pre-commit/CI finding explanation requested -> `wiki-doctor` / `llm-wiki-doctor`.2005. Project Graph candidate scan requested (`graph-scan`, `candidates scan`, `自动扫描候选关系`, `扫一下 candidates`) -> `wiki-maintenance` / `project-graph-candidates-scan`.2016. Project Graph auto proposal requested (`auto-edge`, `自动登记`, `生成 edge proposal`, `通过 base-graph 找项目类方法但先确认`) -> `wiki-maintenance` / `project-graph-auto-edge`.2027. Project Graph human confirmation/manual edge requested (`human-edge`, `手动登记`, `确认 proposal`, `接受 proposal`, `拒绝 proposal`) -> `wiki-maintenance` / `project-graph-human-edge`.2038. Wiki visibility, broken links, stale indexes, dashboard/card drift, artifact registry drift, Project Graph audit/repair, safety, or consistency requested -> `wiki-maintenance` / `project-maintain`.2049. Base Graph repository initialization, adoption, or refresh requested, including Chinese prompts like 初始化项目图谱仓库 or 跨项目导航层 -> full lifecycle / `project-base-init`.20510. Stable confirmed work spans two or more projects and needs previewed task creation -> `cross-project-dispatch` / `project-task-dispatch`.20611. Requirement, bug, source ingest, implementation, finish, verification, handoff, or review readiness requested -> full lifecycle.20712. Process/routing/gate/conversation-flow evaluation requested -> `lifecycle-quality`.208209Natural lifecycle-quality intent is enough. The user does not need to say `Dolores` or `skill-evaluator`; phrases like "did this flow go wrong", "review whether the lifecycle drifted", or "评估这次流程是否跑偏" should route to lifecycle-quality. Ordinary `review code`, `continue`, `finish`, `bug`, and `next step` stay on normal delivery routes unless the user asks to evaluate the process itself.210211## No Child Skill Mode212213`no skills`, `no child skill`, and `no lifecycle` requests are aliases for `lightweight-answer` with `primary_stage: none`.214215Use this mode when the user wants a quick answer, a tiny lookup, a lightweight explanation, or a design discussion that should not be saved or executed yet.216217In this mode:218219- Do not call a child project skill.220- Do not call an external bridge skill.221- Do not create or modify `.llm-wiki` files.222- Do not create Change Brief, Bug Brief, Flow Record, handoff, artifact registry rows, dashboard updates, or code changes.223- Cite evidence when useful, then answer directly.224225Upgrade out of this mode only when the user explicitly asks to save, ingest, plan, execute, fix, review, finish, refresh dashboard, or otherwise update project lifecycle state.226227228## Lifecycle Quality Trigger Phrases229230Use `lifecycle-quality` mode when the user explicitly uses language such as:231232- skill-evaluator, evaluator, evaluate this skill, eval gap, failure case, golden case233- self-review, conversation self-review, Dolores, lifecycle trace, routing trace, gate trace234- "这个 skill 为什么跑偏?", "这个流程是不是跑偏了", "先不要直接改,评估一下"235- "review the conversation trace", "did this lifecycle go wrong", "find the smallest patch"236237Do not trigger lifecycle-quality for ordinary delivery requests such as "继续", "修 bug", "review 代码", "完成了吗", or "总结一下" unless the user also asks to evaluate the process or review the conversation lifecycle.238239## Inputs240241Possible inputs include:242243- user request244- repository path or project root245- PRD/design/log/source paths246- `.llm-wiki` pages247- Change Brief, Bug Brief, or working-context248- git diff or changed files249- external skill output250- dashboard file or artifact registry251252## Outputs253254For lightweight-answer:255256- concise answer257- evidence references when useful258- no lifecycle state changes unless requested259260For read-only query:261262- answer from `.llm-wiki` and linked evidence263- Project Context Pack264- related requirements/bugs/sources/artifacts265- possible next routes266- no lifecycle state changes unless requested267268For dashboard-refresh:269270- recover project dashboard evidence from `.llm-wiki`271- update only `.llm-wiki/dashboard/progress.html` and related dashboard artifact metadata/log when needed272- do not mark work done unless finish/verification evidence already exists273274For session-context-import:275276- brief Session Digest candidate list first277- user selection of items to keep278- Session Digest Markdown draft before `.llm-wiki` writes279- confirmation question before writing `.llm-wiki/session-digests/`280- no requirement, bug, Flow Record, dashboard, scope, or project-truth update by default281- optional Lifecycle Promotion candidates only when the user asks to promote selected digest items282- imported digest path after approval283284For cross-project-dispatch:285286- verified destination mapping from Base Graph, Project Graph, and Codex Projects287- complete shared baseline plus one executable project task specification and handoff per destination288- preview before task creation289- one batch confirmation290- Dispatch mode by default; Development mode only when the user explicitly requests receipt tracking291292For full lifecycle:293294- routing decision295- lifecycle session path or recovery summary296- active source/scope summary297- selected primary stage298- optional secondary bridges299- next gate300301## Context Handoff302303When handing off to a child stage skill or external bridge, use a short structured handoff:304305```markdown306## Context Handoff307308- project_root:309- lifecycle_session:310- user_intent:311- pending_intent:312- pending_primary_stage:313- active_sources:314- active_scope:315- read_only_scope:316- candidate_scope:317- excluded_scope:318- current_gate:319- requested_stage_or_bridge:320- bootstrap_mode:321- constraints:322```323324Do not include long reasoning. Include only enough context for the next skill to act safely.325326## Return Handoff327328When a child stage or external bridge returns, fold the result back into lifecycle state:329330```markdown331## Return Handoff332333- stage_or_bridge_used:334- result_summary:335- changed_assumptions:336- recommended_scope_changes:337- artifacts:338- verification_notes:339- lifecycle_updates_needed:340- next_gate:341```342343If the returned result suggests new scope, new sources, changed acceptance criteria, or missing verification, route to the correct gate before proceeding.344345## Boundaries346347- Lightweight-answer and read-only query must not create Change Brief, Bug Brief, dashboard updates, or code changes by default.348- `mechanical-artifact` routes such as `project-graph-visualize` may write only their declared artifact output and must not create lifecycle documents, plans, finish-sync records, or commits unless the user explicitly asks.349- Full lifecycle work must not call external implementation/debugging/planning skills before project scope is established.350- Cross-project dispatch must not replace executable source documents with summary-only handoffs, create worktrees, switch branches, or push commits by default.351- External skills are bridges, not lifecycle owners.352- Completion claims must go through verification, knowledge sync, artifact sync, dashboard sync when enabled, and review as appropriate.353- Evaluator and Dolores are non-blocking by default unless the user explicitly asks to enter improvement mode or review finds high-risk process failure.354- `.llm-wiki` stores indexes, summaries, relationships, status, and gaps; it is not a raw document warehouse.355356## Common Mistakes357358- Forcing lightweight design discussion into full lifecycle.359- Letting users choose child skills manually when natural routing is possible.360- Asking for one confirmation per child task instead of one batch confirmation after preview.361- Jumping into `systematic-debugging`, planning, TDD, or execution before scoped project context exists.362- Creating duplicate Change Briefs or Bug Briefs instead of resuming existing sessions.363- Treating dashboard state as a source of truth instead of evidence-backed summary.364- Answering "why can I not see this wiki document" as a plain query when the underlying issue is missing artifact, module, dashboard, or log visibility.365- Declaring project work done from the router without finish/review gates.366- Running evaluator or Dolores on every normal task and making the workflow feel heavy.