recon

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

recon — Codebase Topology & Architecture Cartography Engine

recon — 代码库拓扑与架构制图引擎

Domain Rubric

领域评估标准

1. Cartography Dimensions

1. 制图维度

  • Topography & Module Seams: Entrypoints, schemas, data models, and architectural boundaries between subsystems.
  • Key Execution Flows: Sequential call chains tracing runtime dispatch from intake to terminal state persistence with exact code pointers (
    file:///path/to/file#L<N>
    ).
  • System Invariants & Gotchas: Transaction boundaries, state lifecycles, hidden side-effects, or specification drift.
  • 地形与模块接缝:入口点、模式、数据模型以及子系统之间的架构边界。
  • 关键执行流:从入口到终端状态持久化的顺序调用链,精确追踪运行时调度,并附带精确代码指针(
    file:///path/to/file#L<N>
    )。
  • 系统不变式与陷阱:事务边界、状态生命周期、隐藏副作用或规范漂移。

2. Exploration Guardrails (What to Ignore)

2. 探索护栏(忽略什么)

  • Focus strictly on architectural transitions and module seams; forbid cataloging trivial leaf utilities, transient test fixtures, or dumping raw directory listings.
  • 严格关注架构转换和模块接缝;禁止罗列琐碎的叶子工具、临时测试夹具或原始目录列表。

Canonical Output Contract

标准输出契约

markdown
undefined
markdown
undefined

Codebase Cartography: <Subsystem / Target Scope>

代码库制图:<子系统 / 目标范围>

1. Topography & Architectural Seams

1. 地形与架构接缝

  • Entrypoints: <Primary intake points, commands, public APIs, or event consumers with file pointers>
  • Core Contracts & Schemas: <Key interfaces, data types, state schemas, or governing specifications>
  • Module Boundaries: <Key directories/packages and their distinct architectural responsibilities>
  • 入口点:<主要输入点、命令、公共API或事件消费者,并包含文件指针>
  • 核心契约与模式:<关键接口、数据类型、状态模式或治理规范>
  • 模块边界:<关键目录/包及其独特的架构职责>

2. Key Execution Flows

2. 关键执行流

Flow: <Primary Flow Name, e.g., Data Intake / Transformation / Render Pipeline>

流程:<主要流程名称,例如:数据输入 / 转换 / 渲染管线>

  1. <Symbol>
    (<file>#L<N>) ── <Trigger or input intake>
  2. <Symbol>
    (<file>#L<N>) ── <Intermediate dispatch, orchestration, or validation>
  3. <Symbol>
    (<file>#L<N>) ── <Core state transition, persistence, or terminal execution> (Add secondary flow if distinct execution path exists)
  1. <符号>
    (<文件>#L<N>) ── <触发器或输入入口>
  2. <符号>
    (<文件>#L<N>) ── <中间分发、编排或验证>
  3. <符号>
    (<文件>#L<N>) ── <核心状态转换、持久化或终端执行> (如果存在不同的执行路径,则添加次要流程)

3. Invariants & Gotchas

3. 不变式与陷阱

  • Invariants (Must Preserve): <Core rules, transaction boundaries, or state lifecycles that cannot be broken>
  • Gotchas (Watch Out): <Hidden side-effects, spec drift, or surprising couplings; state 'None observed' if clean>
  • 不变式(必须保留):<不可破坏的核心规则、事务边界或状态生命周期>
  • 陷阱(注意):<隐藏副作用、规范漂移或意外耦合;如果干净则说明“未观察到”>

4. Pipeline Routing

4. 管线路由

  • /changeset
    ── Execution paths and mutation boundaries are clear; proceed to change planning.
  • /clarify
    ── Discovered architectural tensions, trade-offs, or multiple viable implementation paths.
undefined
  • /changeset
    ── 执行路径和变更边界清晰;继续进行变更规划。
  • /clarify
    ── 发现架构张力、权衡或多个可行的实现路径。
undefined

Execution Protocol

执行协议

Phase 1: Macro Anchor Grounding

阶段1:宏观锚点锚定

  1. Ingest target subsystem or codebase scope.
  2. Scout high-level architectural anchors (entrypoints, key schemas, router boundaries) using file and symbol tools.
  3. Establish anchor coordinates before deep inspection.
  1. 获取目标子系统或代码库范围。
  2. 使用文件和符号工具侦察高层架构锚点(入口点、关键模式、路由器边界)。
  3. 在深入检查之前确定锚点坐标。

Phase 2: Scale-Adaptive Cartography

阶段2:规模自适应制图

  1. Evaluate target scope scale:
    • In-Turn Execution (1–5 files or single cohesive module): Trace call flows against discovered anchors directly in-turn to eliminate subagent latency and token overhead.
    • Subagent Fan-Out (broad codebase or cross-layer scopes): Launch 1–3
      research
      subagents (Role:
      Cartography Scout (<Layer>)
      ). Seed each with target boundary, discovered anchors, and Canonical Output Contract.
  1. 评估目标范围规模:
    • 轮内执行(1-5个文件或单个内聚模块):直接针对已发现的锚点按顺序跟踪调用流,以消除子代理延迟和令牌开销。
    • 子代理扇出(广泛的代码库或跨层范围):启动1-3个
      research
      子代理(角色:
      Cartography Scout(<层>)
      )。为每个子代理提供目标边界、已发现的锚点和标准输出契约。

Phase 3: Synthesis & Turn-Halt Gate (Fan-in)

阶段3:综合与回合停止门(扇入)

  1. Reconcile findings into the Canonical Output Contract.
  2. Present the completed cartography into the conversation stream and halt turn immediately.
  1. 将发现结果整合到标准输出契约中。
  2. 将完整的制图结果呈现到对话流中,并立即停止当前回合。