Agent Orientation Workflow
Use this skill before starting implementation in an unfamiliar or ambiguous part
of a codebase.
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.
Pipeline
Verify the installed CLI has this workflow:
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.
Generate the brief:
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:
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:
indexion agent orient --no-update --task "name/content drift scoring and remediation planning" .
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.
Confirm the owner with focused tools:
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.
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.
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.
External Agent Mapping
- 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.
1---2name: indexion-agent-orient3description: Generate and use a pre-edit structure brief so coding agents learn likely owners, consumer surfaces, and unsafe edit locations before implementing.4---56# Agent Orientation Workflow78Use this skill before starting implementation in an unfamiliar or ambiguous part9of a codebase.1011## Why1213Coding agents often anchor on the path or noun in the user prompt and start14editing before they have learned the repository's ownership structure. `indexion15agent orient` builds an incremental orientation map across the selected16codebase, then renders a short, evidence-backed brief that can be pasted into17AGENTS.md, CLAUDE.md, a Claude slash command, a Codex skill, or a subagent prompt.1819The rendered `--limit` is only a display limit. Owner inference must come from20the full prebuilt map, including code structure, package READMEs, and wiki pages21whose provenance is maintained by `wiki pages update`, `wiki pages ingest`, and22`plan reconcile`.2324Owner profiles use package documentation and owner-specific wiki pages. Broad25wiki pages with multiple source roots are useful background, but they should not26be treated as proof that every referenced package owns the task.2728## Pipeline29300. Verify the installed CLI has this workflow:3132 ```bash33 indexion agent orient --help34 ```3536 If this command is missing, update or rebuild indexion before continuing.37 Having an older `indexion` binary in PATH is not enough for this skill.38391. Generate the brief:4041 ```bash42 indexion agent orient --task-file task.md --output=.indexion/cache/agent/orient.md .43 ```4445 The first run writes `.indexion/cache/agent/orient-map.json`. Later runs46 refresh changed files and affected owner profiles only. Use `--no-update`47 when you intentionally want to query the saved map without refreshing it.48 This is the mode to use when a zero-knowledge agent needs an immediate49 owner guess from the latest prebuilt map.5051 For short tasks:5253 ```bash54 indexion agent orient --task "add a name/content drift audit" .55 ```5657 If the user task is in a language or wording that does not appear in the58 repository's identifiers and README prose, keep the original task in your59 notes and pass a short codebase-vocabulary gloss to `--task`. The gloss60 should describe the objective, not the suspected owner. For example, say61 "detect drift between names and implementation contents" instead of naming a62 package you have not confirmed.6364 Do not put supporting infrastructure constraints into the owner-inference65 `--task` gloss. Keep the original request, required tools, and implementation66 constraints in your notes or subagent prompt. The gloss is only the objective67 vocabulary used to query the prebuilt map, for example:6869 ```bash70 indexion agent orient --no-update --task "name/content drift scoring and remediation planning" .71 ```72732. Read these sections before editing:7475 - `Likely Implementation Owners`: core packages that should own domain76 behavior.77 Treat the first entry as the initial owner hypothesis unless follow-up78 evidence contradicts it.79 - `Knowledge Sources`: release notes, wiki pages, READMEs, or other80 documentation that matched the task. Use these as context; do not treat a81 documentation-only path as the place to implement domain behavior.82 - `Consumer Surfaces`: CLI, skills, docs, or adapters likely to call the core.83 - `Do Not Implement Here`: files to avoid as domain implementation targets.84 - `Required Preflight`: files the agent should read before patching.85 - `Orientation Map`: confirms the total file/owner/documentation corpus used86 before display truncation.87883. Confirm the owner with focused tools:8990 ```bash91 indexion doc graph --format=text <likely-owner>92 indexion grep --semantic=name:<term> .93 indexion search "<task concept>" .94 ```9596 Use the distinguishing terms from the brief and the user task, not only the97 broad infrastructure words. If search results drift toward supporting98 systems instead of the likely owner, refine the query with the name/content,99 drift, divergence, or domain-specific terms that actually define the task100 before changing the owner.1011024. Gate implementation:103104 - If the intended edit path appears in `Do Not Implement Here`, stop and105 explain the conflict.106 - If the intended owner is absent from `Likely Implementation Owners`, gather107 more evidence with `doc graph`, `grep`, `search`, or `explore`.108 - Keep CLI code thin unless the brief and follow-up evidence show it owns the109 behavior.1101115. Use for zero-knowledge delegation:112113 Give a subagent only the task and the generated orientation brief, then quiz114 it before assigning implementation work. It should immediately name the core115 implementation owner, one knowledge source, one unsafe edit location, and one116 preflight evidence path. Passing that quiz is the signal that the prebuilt map117 has transferred the right ownership assumptions.118119## External Agent Mapping120121- Claude Code: store stable guidance in `CLAUDE.md`, project commands in122 `.claude/commands/`, and project subagents in `.claude/agents/`.123- Codex: store stable guidance in AGENTS.md or skills, and paste the orientation124 brief into delegated task context.125- Multi-agent workflows: use the brief as the structured handoff payload so each126 isolated agent starts with the same repository-specific assumptions.