frontend-page-discovery

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

前端页面清单逆向(证据化)

Frontend Page List Reverse Generation (Evidence-based)

概览

Overview

目标:基于代码证据生成页面清单与单页说明文档(落盘到
docs/
)。
Goal: Generate page list and single-page description documents based on code evidence (saved to
docs/
directory).

何时使用 / 何时不使用

When to use / When not to use

使用时机(触发信号)
  • 你需要从前端代码得出可追溯的页面清单,并继续提炼流程/规则
  • 项目路由入口复杂:多 SPA/微前端/多框架共存、运行时注入路由、后端下发菜单
  • 团队常见问题:漏页、重复页、权限/动态路由无法落盘、规则总结缺证据
不使用时机
  • 你只需要写 PRD/原型(这不是代码逆向)
  • 你被要求“没代码也要给出你项目的真实页面清单/规则结论”(此时只能交付模板/示例,不能输出事实)
Usage scenarios (trigger signals)
  • You need to derive a traceable page list from frontend code, and further refine processes/rules
  • Complex project routing entries: coexistence of multiple SPAs/micro-frontends/multiple frameworks, runtime injected routes, backend-delivered menus
  • Common team problems: missing pages, duplicate pages, undocumentable permissions/dynamic routes, rule summaries lacking evidence
Non-usage scenarios
  • You only need to write PRD/prototypes (this is not code reverse engineering)
  • You are required to "provide the real page list/rule conclusions of your project even without code" (in this case, only templates/examples can be delivered, no factual output)

本技能的默认交付物(落盘到 docs/)

Default deliverables of this skill (saved to
docs/
directory)

  • docs/frontend/pages/index.md
  • docs/frontend/pages/<page_id>.md
  • docs/frontend/flows/index.md
  • docs/frontend/conflicts.md
  • docs/frontend/pages/index.md
  • docs/frontend/pages/<page_id>.md
  • docs/frontend/flows/index.md
  • docs/frontend/conflicts.md

落盘模板(最小可用,可直接复制)

Saved templates (minimum viable, can be copied directly)

本技能的输出模板已迁移到
assets/
目录,以减少技能正文长度并保持模板可复用。
模板映射:
  • docs/frontend/pages/index.md
    <本SKILL.md目录>/assets/pages-index-template.md
  • docs/frontend/pages/<page_id>.md
    <本SKILL.md目录>/assets/page-template.md
  • docs/frontend/flows/index.md
    <本SKILL.md目录>/assets/flows-index-template.md
  • docs/frontend/conflicts.md
    <本SKILL.md目录>/assets/conflicts-template.md
The output templates of this skill have been moved to the
assets/
directory to reduce the length of the skill body and keep the templates reusable.
Template mapping:
  • docs/frontend/pages/index.md
    <this SKILL.md directory>/assets/pages-index-template.md
  • docs/frontend/pages/<page_id>.md
    <this SKILL.md directory>/assets/page-template.md
  • docs/frontend/flows/index.md
    <this SKILL.md directory>/assets/flows-index-template.md
  • docs/frontend/conflicts.md
    <this SKILL.md directory>/assets/conflicts-template.md

硬规则(出现任一条:停止并纠正)

Hard rules (if any of the following occurs: stop and correct)

  1. 禁止脑补
    • 任何“页面/流程/规则”必须能指向证据(见下方证据格式);否则写入
      Evidence Gaps
      ,不得写推测性结论。
  2. 事实与示例必须物理隔离
    • 若用户要求“大胆假设、不用证据”,只能输出
      EXAMPLE(示例)
      区块或模板;不得把示例写成项目事实,也不得与事实表格混排。
  3. 输出字段必须齐全
    • 页面索引必须包含
      module_name
      page_id
      page_name
    • 单页必须包含
      page_name
      breadcrumb
      ascii_wireframe
      核心任务
      关键规则摘要
  1. No assumptions allowed
    • Any "page/process/rule" must point to evidence (see evidence format below); otherwise, write it into
      Evidence Gaps
      , and no speculative conclusions are allowed.
  2. Facts and examples must be physically isolated
    • If the user requires "make bold assumptions without evidence", only output
      EXAMPLE
      blocks or templates; do not write examples as project facts, nor mix them with fact tables.
  3. Output fields must be complete
    • The page index must include
      module_name
      page_id
      page_name
      .
    • A single page must include
      page_name
      breadcrumb
      ascii_wireframe
      core tasks
      key rule summary
      .

证据格式(统一可复核)

Evidence format (unified and verifiable)

每条结论至少附 1 条证据:
  • type
    page_title | route_decl | file_convention | menu_static | menu_backend | nav_call | guard | api_call | state_machine | form_validation | other
  • file:相对路径
  • lines
    start-end
  • excerpt:1–3 行关键摘录(原文)
缺证据时,必须写:
  • gap:缺什么证据
  • candidate_locations:可能在哪里找到(目录/文件类型/关键词)
  • impact:对结论的影响(例如“无法确认是否存在后端下发菜单导致的隐藏页面”)
Each conclusion must be accompanied by at least 1 piece of evidence:
  • type:
    page_title | route_decl | file_convention | menu_static | menu_backend | nav_call | guard | api_call | state_machine | form_validation | other
  • file: relative path
  • lines:
    start-end
  • excerpt: 1–3 lines of key excerpts (original text)
When evidence is missing, you must write:
  • gap: What evidence is missing
  • candidate_locations: Where it may be found (directory/file type/keywords)
  • impact: Impact on the conclusion (e.g. "Cannot confirm whether there are hidden pages caused by backend-delivered menus")

输出字段(必须出现在最终结果里)

Output fields (must appear in the final result)

  • 页面索引:
    module_name
    page_id
    page_name
  • 单页:
    page_name
    breadcrumb
    ascii_wireframe
    核心任务
    关键规则摘要
  • Page index:
    module_name
    page_id
    page_name
  • Single page:
    page_name
    breadcrumb
    ascii_wireframe
    core tasks
    key rule summary