indexion-agent-orient

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Agent Orientation Workflow

Agent定向工作流

Use this skill before starting implementation in an unfamiliar or ambiguous part of a codebase.
在代码库中不熟悉或模糊的部分开始实现前,使用此skill。

Why

为什么要这么做

Coding agents often anchor on the path or noun in the user prompt and start editing before they have learned the repository's ownership structure.
indexion agent orient
builds an incremental orientation map across the selected codebase, then renders a short, evidence-backed brief that can be pasted into AGENTS.md, CLAUDE.md, a Claude slash command, a Codex skill, or a subagent prompt.
The rendered
--limit
is only a display limit. Owner inference must come from the full prebuilt map, including code structure, package READMEs, and wiki pages whose provenance is maintained by
wiki pages update
,
wiki pages ingest
, and
plan reconcile
.
Owner profiles use package documentation and owner-specific wiki pages. Broad wiki pages with multiple source roots are useful background, but they should not be treated as proof that every referenced package owns the task.
编码Agent通常会聚焦于用户提示中的路径或名词,在了解仓库的所有权结构前就开始编辑。
indexion agent orient
会在选定的代码库中构建增量定向地图,然后生成一份简短、有证据支持的摘要,可粘贴到AGENTS.md、CLAUDE.md、Claude斜杠命令、Codex skill或子Agent提示中。
渲染的
--limit
仅为显示限制。负责人推断必须基于完整的预构建地图,包括代码结构、包README和wiki页面,这些内容的来源由
wiki pages update
wiki pages ingest
plan reconcile
维护。
负责人档案使用包文档和特定负责人的wiki页面。包含多个源根的宽泛wiki页面是有用的背景信息,但不应将其视为每个引用包都负责该任务的证据。

Pipeline

流程

  1. Verify the installed CLI has this workflow:
    bash
    indexion agent orient --help
    If this command is missing, update or rebuild indexion before continuing. Having an older
    indexion
    binary in PATH is not enough for this skill.
  2. Generate the brief:
    bash
    indexion agent orient --task-file task.md --output=.indexion/cache/agent/orient.md .
    The first run writes
    .indexion/cache/agent/orient-map.json
    . Later runs refresh changed files and affected owner profiles only. Use
    --no-update
    when you intentionally want to query the saved map without refreshing it. This is the mode to use when a zero-knowledge agent needs an immediate owner guess from the latest prebuilt map.
    For short tasks:
    bash
    indexion agent orient --task "add a name/content drift audit" .
    If the user task is in a language or wording that does not appear in the repository's identifiers and README prose, keep the original task in your notes and pass a short codebase-vocabulary gloss to
    --task
    . The gloss should describe the objective, not the suspected owner. For example, say "detect drift between names and implementation contents" instead of naming a package you have not confirmed.
    Do not put supporting infrastructure constraints into the owner-inference
    --task
    gloss. Keep the original request, required tools, and implementation constraints in your notes or subagent prompt. The gloss is only the objective vocabulary used to query the prebuilt map, for example:
    bash
    indexion agent orient --no-update --task "name/content drift scoring and remediation planning" .
  3. Read these sections before editing:
    • Likely Implementation Owners
      : core packages that should own domain behavior. Treat the first entry as the initial owner hypothesis unless follow-up evidence contradicts it.
    • Knowledge Sources
      : release notes, wiki pages, READMEs, or other documentation that matched the task. Use these as context; do not treat a documentation-only path as the place to implement domain behavior.
    • Consumer Surfaces
      : CLI, skills, docs, or adapters likely to call the core.
    • Do Not Implement Here
      : files to avoid as domain implementation targets.
    • Required Preflight
      : files the agent should read before patching.
    • Orientation Map
      : confirms the total file/owner/documentation corpus used before display truncation.
  4. Confirm the owner with focused tools:
    bash
    indexion doc graph --format=text <likely-owner>
    indexion grep --semantic=name:<term> .
    indexion search "<task concept>" .
    Use the distinguishing terms from the brief and the user task, not only the broad infrastructure words. If search results drift toward supporting systems instead of the likely owner, refine the query with the name/content, drift, divergence, or domain-specific terms that actually define the task before changing the owner.
  5. Gate implementation:
    • If the intended edit path appears in
      Do Not Implement Here
      , stop and explain the conflict.
    • If the intended owner is absent from
      Likely Implementation Owners
      , gather more evidence with
      doc graph
      ,
      grep
      ,
      search
      , or
      explore
      .
    • Keep CLI code thin unless the brief and follow-up evidence show it owns the behavior.
  6. Use for zero-knowledge delegation:
    Give a subagent only the task and the generated orientation brief, then quiz it before assigning implementation work. It should immediately name the core implementation owner, one knowledge source, one unsafe edit location, and one preflight evidence path. Passing that quiz is the signal that the prebuilt map has transferred the right ownership assumptions.
  1. 验证已安装的CLI是否包含此工作流:
    bash
    indexion agent orient --help
    如果缺少此命令,请先更新或重建indexion再继续。PATH中存在旧版
    indexion
    二进制文件不足以支持此skill。
  2. 生成摘要:
    bash
    indexion agent orient --task-file task.md --output=.indexion/cache/agent/orient.md .
    首次运行会写入
    .indexion/cache/agent/orient-map.json
    。后续运行仅刷新已更改的文件和受影响的负责人档案。当你有意查询已保存的地图而不刷新时,使用
    --no-update
    。当零知识Agent需要从最新预构建地图中立即猜测负责人时,应使用此模式。
    对于短任务:
    bash
    indexion agent orient --task "add a name/content drift audit" .
    如果用户任务的语言或措辞未出现在仓库的标识符和README文本中,请将原始任务保留在你的笔记中,并向
    --task
    传递一个简短的代码库词汇说明。该说明应描述目标,而非疑似负责人。例如,应说“检测名称与实现内容之间的偏差”,而非提及你尚未确认的包。
    不要将支持性基础设施约束放入负责人推断的
    --task
    说明中。将原始请求、所需工具和实现约束保留在你的笔记或子Agent提示中。该说明仅用于查询预构建地图的目标词汇,例如:
    bash
    indexion agent orient --no-update --task "name/content drift scoring and remediation planning" .
  3. 编辑前阅读以下部分:
    • Likely Implementation Owners
      :应负责领域行为的核心包。 除非后续证据与之矛盾,否则将第一个条目视为初始负责人假设。
    • Knowledge Sources
      :与任务匹配的发行说明、wiki页面、README或其他文档。将这些作为上下文;不要仅将文档路径视为实现领域行为的位置。
    • Consumer Surfaces
      :可能调用核心功能的CLI、skill、文档或适配器。
    • Do Not Implement Here
      :应避免作为领域实现目标的文件。
    • Required Preflight
      :Agent在打补丁前应阅读的文件。
    • Orientation Map
      :确认显示截断前使用的所有文件/负责人/文档集合。
  4. 使用针对性工具确认负责人:
    bash
    indexion doc graph --format=text <likely-owner>
    indexion grep --semantic=name:<term> .
    indexion search "<task concept>" .
    使用摘要和用户任务中的区分性术语,而非仅使用宽泛的基础设施词汇。如果搜索结果偏向支持系统而非可能的负责人,请在更改负责人前,使用实际定义任务的名称/内容、偏差、差异或领域特定术语优化查询。
  5. 实施管控:
    • 如果预期的编辑路径出现在
      Do Not Implement Here
      中,请停止并解释冲突。
    • 如果预期的负责人未出现在
      Likely Implementation Owners
      中,请使用
      doc graph
      grep
      search
      explore
      收集更多证据。
    • 除非摘要和后续证据表明CLI代码应负责该行为,否则保持CLI代码精简。
  6. 用于零知识委托:
    仅向子Agent提供任务和生成的定向摘要,然后在分配实现工作前对其进行测试。它应立即说出核心实现负责人、一个知识来源、一个不安全的编辑位置和一个预检证据路径。通过该测试表明预构建地图已传递了正确的所有权假设。

External Agent Mapping

外部Agent映射

  • Claude Code: store stable guidance in
    CLAUDE.md
    , project commands in
    .claude/commands/
    , and project subagents in
    .claude/agents/
    .
  • Codex: store stable guidance in AGENTS.md or skills, and paste the orientation brief into delegated task context.
  • Multi-agent workflows: use the brief as the structured handoff payload so each isolated agent starts with the same repository-specific assumptions.
  • Claude Code:将稳定指南存储在
    CLAUDE.md
    中,项目命令存储在
    .claude/commands/
    中,项目子Agent存储在
    .claude/agents/
    中。
  • Codex:将稳定指南存储在AGENTS.md或skill中,并将定向摘要粘贴到委托任务的上下文中。
  • 多Agent工作流:将摘要用作结构化交接 payload,以便每个独立Agent都从相同的仓库特定假设开始。