name: locallife-prompt-router description: Route LocalLife repository tasks to the correct project-owned .github instructions, prompt templates, standards, domain runbooks, and validation commands. Use when working in /home/sam/locallife, choosing between backend/web/weapp/flutter/general prompts, preparing implementation/review/bugfix/integration-test work, or updating the AI prompt system itself.
LocalLife Prompt Router
Purpose
Use this skill as the lightweight router for the LocalLife AI-facing prompt system. Keep .github/ as the source of truth; this skill only decides what to read and when.
Start Here
- Read
AGENTS.mdat the repository root. - Read
.github/copilot-instructions.mdand.github/README.mdfor workspace routing. - Identify the target area:
locallife/,merchant_app/,web/,weapp/,legal_exports/,artifacts/, or cross-cutting.github/work. - Open the smallest matching
.github/instructions/*.instructions.mdfile before editing code. - Open the matching
.github/prompts/*.prompt.mdonly when the task is implementation, bugfix, review, integration-test, takeover, incident follow-up, task loop, SQL review, or diagram work. - Open deeper
.github/standards/**files only when the chosen instruction or prompt points to them, or when the task touches a high-risk area.
Routing Rules
- Backend work under
locallife/: followlocallife/AGENTS.md, then use.github/instructions/backend-locallife.instructions.mdplus narrower backend instruction files for the active path. - Backend implementation: use
.github/prompts/backend-implementation.prompt.mdunless a more specific backend prompt applies. - Payment, refund, profit sharing, withdrawal, callbacks, or money movement: use
.github/prompts/backend-payment-domain.prompt.mdplus the matching provider domain README. For WeChat payment use.github/standards/domains/wechat-payment/README.md; for Baofoo/Baofu/BaoCaiTong work use.github/standards/domains/baofu-payment/README.md. - SQL/schema/sqlc work: use
.github/instructions/backend-db-query.instructions.md,.github/instructions/backend-db-sqlc.instructions.md, and.github/prompts/backend-sql-review.prompt.mdwhen reviewing SQL. - Backend production defects or regressions: use
.github/prompts/backend-bugfix.prompt.md. - Backend formal closure or review propagation: use
.github/prompts/backend-review-closure.prompt.md. - Web app work under
web/: use.github/instructions/web-ui.instructions.mdplus operator/merchant/shared UI instructions when matching, thenweb-implementationorweb-reviewprompt. - Mini Program work under
weapp/: use.github/instructions/weapp-mini-program.instructions.md, thenweapp-implementationorweapp-reviewprompt. - Flutter merchant app work under
merchant_app/: use.github/instructions/flutter-merchant-app.instructions.md, thenflutter-implementation,flutter-bugfix, orflutter-reviewprompt. - Cross-area work: use
general-implementation,general-review,general-task-loop, orgeneral-incident-followupprompts. - Business process diagrams: use
.github/prompts/business-flow-mermaid.prompt.md. - AI prompt-system maintenance: read
.github/standards/engineering/AI_PROMPT_GOVERNANCE.mdbefore changing.github/prompts/,.github/instructions/,.github/agents/, or this skill.
Validation Selection
- Choose validation from the target project's README, instruction file, or prompt template.
- For backend SQL changes, expect
make sqlcand generated-code checks. - For backend route or Swagger annotation changes, expect
make swagger. - For backend high-risk flows, prefer targeted tests plus safety checks called out by the relevant standard.
- For frontend apps, run the smallest relevant lint/build/test command from the app directory.
- If validation is not run, state why and what residual risk remains.
Reference
For a compact file map, read references/routing-map.md when the first-read files do not make the right route obvious.