orient

A pre-flight check for an existing codebase that examines the planned work, identifies affected functions, estimates structural risk, and finds relevant specification requirements. It uses cached results from an earlier project analysis.

In plain words
What is it for?
Use it before implementing planned tasks in a project with `.specify` task files, especially when the change may affect several connected parts of the codebase.
Why use it?
It reveals high-impact areas before implementation begins, so an agent can account for dependencies and requirements earlier.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/clay-good/openlore/orient
Clone the repo
git clone --depth 1 https://github.com/clay-good/OpenLore
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,052 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00022 $0.01052
Opus 5 $0.00011 $0.00526
Sonnet 5 $0.00004 $0.00210
Haiku 4.5 $0.00002 $0.00105

Measured 2d ago against content hash 438f269b95bb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

orient scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

examples/spec-kit/commands/orient.md · 139 lines

How it starts

The opening of the file, as written. The whole thing — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.

openlore: Pre-flight Check

Run this command before /speckit.implement on an existing codebase. It identifies the functions affected by the planned tasks, scores their blast radius, and surfaces any spec requirements that apply — so you don't discover high-risk areas mid-implementation.

Greenfield projects (no existing codebase): skip this command. It is only useful when implementing against an existing codebase.

Prerequisites

  1. openlore MCP server configured in your AI agent settings
  2. openlore analyze run at least once on the project directory (produces the .openlore/ cache used by orient)

User Input

$ARGUMENTS

If a project directory is provided, use it. Otherwise use the current working directory.

Step 1 — Read tasks.md

Read .specify/{feature}/tasks.md to extract the list of planned tasks. Summarise the implementation intent in one sentence — this is the $TASK_DESCRIPTION passed to orient.

If tasks.md does not exist, ask the user for a brief description of what they are about to implement.

Step 2 — Orient

openlore orient
  directory: $PROJECT_ROOT
  task: $TASK_DESCRIPTION
  limit: 7

If orient returns "error": "no cache":

"openlore has no analysis cache for this project. Run openlore analyze $PROJECT_ROOT first (takes ~1 min), then re-run /speckit.openlore.orient." Stop here.

Step 3 — Check spec baseline

Check whether OpenSpec specifications exist for this project:

ls $PROJECT_ROOT/openspec/specs/ 2>/dev/null | head -5

If no specs exist (openspec/specs/ is absent or empty):

"No OpenSpec specs found. search_specs and check_spec_drift will return empty results until specs are generated.

Recommended: run openlore generate $PROJECT_ROOT after this sprint to create a spec baseline from the existing code. You only need to do this once — subsequent sprints will have specs to align against.

Continuing with structural analysis only (orient + impact)."

If specs exist: proceed to search_specs below.

Read the full file on GitHub · 139 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 139 lines · 22 tokens per session scan A 438f269b95bb

Subscribe to this mod's changes

orient is a command published in the GitHub repository clay-good/OpenLore (290 stars, last pushed 2d ago), licensed MIT. It adds 22 tokens to every session and 1,052 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.