1. Conduid
  2. Documentation
  3. Spec Gen
MCP server · Documentation

Spec Gen

Deterministic, local-first code and contract intelligence and guardrails for AI coding agents, with no LLM in the hot path.

75Good

Scored 8 hours ago · breakdown

About Spec Gen

Spec Gen is an MCP server published by clay-good in the Documentation category: deterministic, local-first code and contract intelligence and guardrails for AI coding agents, with no LLM in the hot path. Conduid read 85 tools from its source: analyze_codebase, analyze_env_impact, analyze_error_propagation, analyze_impact, annotate_story, approve_decision and 79 more. It is published to npm as openlore and starts with npx.

The repository has 370 stars and 52 forks, is licensed MIT, and its last commit was on 1 Dec 2026. The latest release is v3.9.0 (29 Nov 2026): Your agent now gets short, exact facts when it needs them, and much less standing text every turn. It follows v3.8.0 (22 Nov 2026), and the 5 most recent releases go back to v3.5.0 (25 Oct 2026). It passes 4 of the 5 static checks Conduid ran on the repository; it does not pass No dynamic code execution. Its topics include api-documentation, automated-documentation, code-analysis, code-archaeology, dependency-graph and devtools.

Install

Claude Code
claude mcp add spec-gen -- npx -y openlore
npx
npx -y openlore
From source
git clone https://github.com/clay-good/OpenLore

Tools (85)

analyze_codebaseUSE THIS WHEN: the project has never been analyzed, or the user says the code changed significantly since the last run, or other tools return "no cache found". Builds the call graph, dependency graph, and refactor priorities — all without an LLM. Results are cached for 1 hour; skip this if the cache is recent.
ParameterTypeDescription
directorystringAbsolute path; default cwd
forcebooleanForce re-analysis even if a recent cache exists (default: false)
analyze_env_impactUSE THIS WHEN: you are about to remove or rename an environment variable — "what breaks?". The config analogue of analyze_impact: for an env var `name`, returns line-precise `readSites` (file/line/enclosing function, or module-level), `affectedFunctions` (callers that transitively reach a read), `reachingTests`, whether the var is declared with a default, and per-site `required` (a read with no site-local fallback is a hard break). SCOPE: env reads in TS/JS/Python/Go/Ruby; config-object key reads are a disclosed out-of-scope boundary, never guessed. An unknown var returns not-found + candidates (never "unused"); module-level reads and call-graph limits are disclosed in `boundaries`, so the blast radius is a SOUND LOWER BOUND. Run analyze_codebase first.
ParameterTypeDescription
directorystringAbsolute path; default cwd
maxDepthnumberBackward-reachability depth bound (default 12, clamped to [1, 30]). Truncation is disclosed in boundaries.
name *stringThe environment variable to analyze, e.g. DATABASE_URL.
analyze_error_propagationUSE THIS WHEN: you are about to call a function ("what can it throw, and is any of it handled?") or you made one throw ("who is exposed, and where is it caught?"). The error analogue of analyze_impact: for a `symbol` (name or name::path), returns `escapes` (exception types that propagate OUT to callers, each with origin and call path) and `handledInternally` (caught here). SCOPE: TS/JS/Python/Java/C# exceptions, plus a Go returned-error and panic/recover model (`errorModel: go-value`); any other language returns `unsupported`, never an empty escape set. A SOUND LOWER BOUND: an un-analyzable callee is disclosed in `boundaries`, never assumed exception-free; an unknowable throw type is `<dynamic>`; typed catch/except matches exact type names only (no subclasses). Run analyze_codebase first.
ParameterTypeDescription
directorystringAbsolute path; default cwd
maxDepthnumberCallee-traversal depth bound (default 10, clamped to [1, 30]). Truncation is disclosed in boundaries.
symbol *stringThe function to analyze: its name, or name::path to disambiguate.
analyze_impactUSE THIS WHEN: the user asks "what breaks if I change X?", "what's the blast radius of modifying Y?", or "is it safe to refactor Z?". Returns risk score, fan-in/out, and full upstream/downstream call chains — gives the complete picture without reading every caller file.
ParameterTypeDescription
depthnumberChain depth (default: 2)
directory *stringAbsolute path to the project directory
symbol *stringFunction name to analyse (exact or partial)
annotate_storyUSE THIS WHEN: you have a BMAD story file and want to auto-populate its risk_context section with structural analysis from the codebase. Reads the story file, runs orient + analyze_impact, writes the risk_context block directly into the file (replaces existing section or inserts it). Run by the Architect Agent after writing stories — eliminates manual copy-paste of generate_change_proposal output. Run analyze_codebase first.
ParameterTypeDescription
description *stringStory intent for structural analysis — use story title + primary AC. e.g. "add payment retry — must retry up to 3 times on timeout"
directorystringAbsolute path; default cwd
storyFilePath *stringPath to the BMAD story markdown file — relative to the project directory or absolute. e.g. ".bmad-method/stories/001-add-payment-retry.md"
approve_decision⚠ REQUIRES EXPLICIT HUMAN AUTHORIZATION — do NOT call this tool autonomously. Before calling, you MUST present the decision to the user and receive an explicit "yes" or "approve" response. Never approve on behalf of the user. Approves a verified architectural decision for syncing into spec.md files. After approving, call sync_decisions to write the decision to the relevant spec.
ParameterTypeDescription
directorystringAbsolute path; default cwd
id *string8-character decision ID from list_decisions
notestringOptional review note
audit_spec_coverageParity audit: report spec coverage gaps without any LLM call. Returns uncovered functions (exist in call graph but have no spec), hub gaps (high fan-in functions with no spec), orphan requirements (spec requirements with no mapped implementation), and stale domains (source files changed after spec was last written). Use this before starting a new feature to understand what needs specs, or to audit coverage health. Distinct from its sibling check_spec_drift: audit_spec_coverage finds requirements/code with NO spec (coverage gaps); check_spec_drift finds existing specs that no longer match changed code (drift). Requires "openlore analyze" to have been run.
ParameterTypeDescription
directorystringAbsolute path; default cwd
hubThresholdnumberMinimum fanIn to flag a function as a hub gap (default: 5)
maxUncoverednumberMaximum uncovered functions to return (default: 50)
blast_radiusUSE THIS WHEN: before committing, you want one briefing of what your diff touches — "what is the blast radius of my changes?", "is this safe to commit?". Composes deterministic analyses over the staged/working diff, for the symbols it ACTUALLY changed (formatting and comments are not changes; a file kept whole says why in changeGranularity): affected callers and layers (analyze_impact), the tests to run (select_tests), the anchored memories/decisions it will drift or orphan, and the specs it will make stale (check_spec_drift). Advisory. Siblings: structural_diff is the raw graph delta + newly-stale callers; change_impact_certificate certifies the paths a diff newly opens into a sensitive surface; this is the all-in-one pre-commit briefing. Run analyze_codebase first.
ParameterTypeDescription
baseRefstringGit ref to diff the working tree against (e.g. "HEAD", "main"). Default HEAD (uncommitted changes).
depthnumberImpact-analysis traversal depth (default 2).
directorystringAbsolute path; default cwd
maxSymbolsnumberCap on the number of highest-fan-in changed symbols analyzed for impact (default 12). Truncation is reported.
briefing_sinceUSE THIS WHEN: a lot changed since you last looked and you want the changes that STRUCTURALLY MATTER. Unlike blast_radius / change_impact_certificate (YOUR pending diff), this briefs everything SINCE a base ref. Changed production symbols are ranked in a fixed tier order, surprising-change (a hub whose file rarely changed) > hub-change > chokepoint-change > ordinary-change, from existing labels, NOT a weighted score; each carries raw evidence (fan-in, fan-out, prior churn), grouped by region, with the tests to run. Renames are listed under carried, and a file kept whole says why in changeGranularity; surprising-change is withheld when history is too shallow; a bounded briefing carries a truncation receipt and never drops a higher tier for a lower one. Run analyze_codebase first.
ParameterTypeDescription
baseRefstringGit ref to brief changes SINCE (e.g. "main", a PR base, "HEAD~20"). Default "auto": resolves main → master → HEAD~1 → empty tree.
directorystringAbsolute path; default cwd
filePatternstringRegion scope — only brief changes whose file path contains this substring.
maxResultsnumberBound on briefed symbols, highest-tier-first (default 50, max 200). Overflow is reported in the truncation receipt.
certify_mergeUSE THIS WHEN: before landing two branches that merge cleanly — "will these combine correctly, or does one break what the other calls?". Builds the call graph at the merge-base and each side, and reports where one side ADDS a call into a symbol the other side changed incompatibly or removed: the "git merges cleanly, the combination is broken" failure textual merge cannot see. Each finding is incompatible (removed / breaking signature) or potentially-incompatible (unprovable), never silently safe; the overall verdict is a sound lower bound ("no detected incompatibility"). Follows plan_parallel_work (dispatch) and map_in_flight_conflicts (in flight); the merge-tree oracle says whether git textually conflicts, this says what breaks when it does not. No LLM.
ParameterTypeDescription
basestringMerge base to compare against (default: the git merge-base of ours and theirs).
directorystringAbsolute path; default cwd
maxFindingsnumberCap on reported conflicts (default 200).
ours *stringOne side to merge (a git ref).
theirs *stringThe other side to merge (a git ref).
certify_provenanceEmit a reproducible, content-addressed record of WHAT A CHANGE DOES, for attachment to the repo's supply-chain provenance (SLSA / in-toto). Composes change_impact_certificate (blast radius, paths newly opened into a declared surface, drifted specs, tests to run) + structural_diff (added/removed/re-signed functions), serialized canonically and hashed (sha256) so any consumer can RECOMPUTE and verify it — checkable, not merely signed. Emit as an in-toto predicate (format "in-toto") or standalone JSON. OpenLore emits, it does not sign. Bad base is fatal; boundaries disclosed (the claim is a lower bound, never "safe"). Sibling change_impact_certificate briefs YOUR pending diff in-session; this is the portable attestation a third party recomputes. No LLM.
ParameterTypeDescription
allowBaseFallbackbooleanAccept the disclosed main → master → HEAD~1 base fallback instead of failing on an unresolvable base.
baseRefstringGit ref to diff the working tree against (default HEAD).
changestringChange id recorded on the certificate (spec-store context; default "working-tree").
directorystringAbsolute path; default cwd
formatstringOutput shape: an unsigned in-toto Statement v1 envelope (its shape structurally checked locally), or standalone JSON (default json).
certify_public_surfaceUSE THIS WHEN: shipping a library change — "did I break my consumers' contract?" (removed/renamed export, new required param, narrowed types, reduced visibility). No base ref: the PUBLIC SURFACE (exports + signatures). With a base ref: a breaking-change VERDICT for the working-tree diff, each changed export breaking | non-breaking | potentially-breaking; a breaking one is breaking-consumed (with consumers) or breaking-unconsumed-in-index (never "safe"); federation also counts indexed sibling repos. Breakages accepted in .openlore/public-surface-baseline.jsonl are listed as accepted. Unprovable = potentially-breaking. Renames stay renames. Distinct from change_impact_certificate (paths into a surface). Signatures: TS/JS/Python; others fail-soft. Run analyze_codebase first.
ParameterTypeDescription
baseRefstringGit ref to diff the working tree's public surface against (e.g. "HEAD", "main"). Omit to return the surface itself.
directorystringAbsolute path; default cwd
maxResultsnumberLimit the surface listing in surface mode (default 200, capped 500).
certify_service_contractUSE THIS WHEN: you change an OpenAPI, protobuf or GraphQL schema or the code serving it. Unlike certify_public_surface (exported code), this certifies the HTTP contract. No baseRef: declared operations and parity with indexed route handlers. With baseRef: a closed-table verdict per changed element vs the merge-base (breaking | dangerous | non-breaking | potentially-breaking), breaking ones with their in-repo client call sites, and a suggestedBump. An unreadable spec is notAssessed, never unchanged. Advisory findings can be gated by enforcement.policy.
ParameterTypeDescription
allowBaseFallbackbooleanFall back to the default branch when baseRef does not resolve (disclosed).
baseRefstringCompare with this ref (its merge-base with HEAD).
directorystringAbsolute path; default cwd
federationbooleanAlso census client call sites in indexed sibling repositories (.openlore/federation.json). A service's consumers are usually not in its own repository; every sibling not censused is disclosed.
federationReposarrayLimit the federation census to these registry repo names (default: all).
maxResultsnumberCap per list (default 100, max 1000).
change_impact_certificateCertify what the current diff touches before it lands. ONE conclusion-shaped certificate: blast radius, the paths the change NEWLY OPENS into each declared covering surface (reachable after but not before — computed differentially), drifted specs, and tests to run. Decays via the freshness lease; advisory, never blocks. Declare surfaces under "impactCertificate.surfaces". Unlike its change-family siblings — blast_radius (all-in-one pre-commit briefing) and structural_diff (raw graph delta + stale callers) — this certifies the paths a diff NEWLY OPENS into a sensitive surface. No LLM.
ParameterTypeDescription
baseRefstringGit ref to diff the working tree against (default HEAD).
changestringChange id to record on the certificate (spec-store context; default "working-tree").
directorystringAbsolute path; default cwd
persistbooleanPersist under .openlore/impact-certificates/ so the spec-store health check can re-fire it when it decays.
check_architectureUSE THIS BEFORE adding an import to check it against the repo's architecture rules, or to list current architecture violations. Opt-in and inert unless the repo declares rules in .openlore/architecture.json (layers / forbidden / allowedOnly / required / circular / reachable / orphan / moreUnstable) or via an "Invariant:" marker in a synced ADR. Pre-edit mode: pass {from, to} ("may a file under <from> import <to>?") for a deterministic allowed/denied + the governing rule + why, BEFORE you write the code. Scan mode: pass only {directory} for the full current-violations report. Cross-language, offline, deterministic; complements (does not replace) CI linters. Run analyze_codebase first.
ParameterTypeDescription
directorystringAbsolute path; default cwd
fromstringPre-edit mode: the file that would gain the import (relative or absolute). Requires "to".
tostringPre-edit mode: the target file path or exported symbol being imported. Requires "from".
check_spec_driftUSE THIS WHEN: you've modified code and want to know if the specs are still aligned, or when asked "is the code in sync with the spec?", "what changed since the last spec run?". Compares git-changed files against spec coverage — impossible to replicate by reading files. Distinct from its sibling audit_spec_coverage: check_spec_drift asks whether EXISTING specs still match code you changed (drift), while audit_spec_coverage asks what requirements/code have NO spec at all (coverage gaps). Requires openlore generate to have been run at least once. No LLM required.
ParameterTypeDescription
basestringGit ref to compare against (default: auto-detect main/master)
directorystringAbsolute path; default cwd
domainsarrayOnly check these spec domains (default: all domains)
failOnstringMinimum severity to report (default: "warning")
filesarraySpecific files to check (default: all changed files)
maxFilesintegerMaximum number of changed files to analyze (default: 100)
configure_openloreInspect repository configuration without an index or daemon; preview, apply, verify or revert a revision-bound plan. Writes require a scoped host startup grant. Does not reason with an internal model.
ParameterTypeDescription
action *stringinspect; preview a candidate; apply/verify/revert a preview plan.
candidateany
directorystringAbsolute path; default cwd
planobjectExact complete preview result, unchanged, required for apply/verify/revert.
scopestringRepository-relative directory to inspect (default: root).
declare_footprintUSE THIS WHEN: several agents work in worktrees of one clone and you start a task. Publishes your writeSet/readSet (symbols or files; unknown names = intended creations) to the clone's peer board and returns hazards vs live peers (the plan_parallel_work classes plus duplicate-intent). action: release when done, list to read. Entries end on release, merged or deleted branch, or 30 min idle, never on a check git could not answer. Advisory; peer text local-unreviewed.
ParameterTypeDescription
actionstringdeclare (default), release, or list.
actorIdstringStable agent id (default <branch>@<worktree>).
directorystringAbsolute path; default cwd
readSetarraySymbols or files this agent depends on but will not edit.
titlestringTask title (120 chars).
writeModestring"append" for pure registration-site additions (default "modify").
writeSetarraySymbols or files this agent will edit; a name not in the index is an intended creation.
detect_changesDetect recently changed functions and rank them by blast radius. Runs git diff against a base ref (default HEAD), maps changed lines to function nodes, then scores each changed function by fan-in + transitive callers. Highest-scored functions are the riskiest to break. Also reports test coverage for each changed function via tested_by edges. Run analyze_codebase first.
ParameterTypeDescription
basestringGit ref to diff against (default: HEAD). Use "HEAD~1" for last commit, "main" for branch diff.
directorystringAbsolute path; default cwd
explain_retrieval_missExplain why one named target missed search_code or search_specs; unlike either search, requires an exact target.
ParameterTypeDescription
directorystringAbsolute path; default cwd
domainstringThe domain filter the search used (surface "spec" only).
languagestringThe language filter the search used (surface "code" only).
limitintegerThe limit the search used (default 10).
minFanInintegerThe minFanIn filter the search used (surface "code" only).
query *stringThe query that missed, exactly as passed to the search.
sectionstringThe section filter the search used (surface "spec" only).
surface *string"code" for search_code, "spec" for search_specs.
target *objectThe result you expected the search to return.
federation_statusReport the multi-repo federation registry (.openlore/federation.json) and each registered repo's live index state (indexed/stale/unindexed/missing). Index-of-indexes: no merged graph. Read-only.
ParameterTypeDescription
directorystringAbsolute path; default cwd
find_clonesUSE THIS WHEN: you are about to write a function — "does a near-duplicate already exist that I should reuse?". Unlike get_duplicate_report (the whole-repo audit of every clone group), this answers ONE query: `symbol` (name or name::path in the index) or `snippet` (raw code, checked BEFORE you write it). Returns clones ranked exact > structural (renamed identifiers) > near (token overlap ≥ floor), each with file, function, line range, similarity, and language. One-vs-all, so it works where the whole-repo O(n²) pass is skipped. An unknown symbol is not-found with candidates, never "unique"; a query below the evidence floor is "too small to compare"; the query never matches itself; HTML inline-script symbols are excluded. Run analyze_codebase first.
ParameterTypeDescription
directorystringAbsolute path; default cwd
maxResultsnumberCap on returned matches (default 25, max 200).
minSimilaritynumberNear-clone Jaccard floor for this query (default 0.7, clamped to [0.1, 1]). Exact/structural matches are always included.
snippetstringRaw code to find clones of (need not be in the index) — answers the pre-write "does this already exist?". Provide exactly one of symbol or snippet.
symbolstringA function in the index to find clones of: its name, or name::path to disambiguate. Provide exactly one of symbol or snippet.
find_dead_codeUSE THIS WHEN: "what code is unreachable / dead?", "is anything calling X?", or "what becomes dead if I delete X?". Cross-language mark-and-sweep reachability from roots (tests, imported symbols, route handlers, main, files a config invokes) over the call graph. Pass ifDeleted to get the downstream-only-reachable set for a symbol. Results are confidence-tagged CANDIDATES, never deletion authority — dynamic dispatch, DI, and external consumers cause false positives, stated in the response. Run analyze_codebase first.
ParameterTypeDescription
directResolvedOnlybooleanRestrict reachability to directly-resolved edges, ignoring synthesized dynamic-dispatch edges — strict certainty over completeness (default false).
directorystringAbsolute path; default cwd
filePatternstringOnly report candidates whose file path contains this substring
ifDeletedstringSymbol name — returns what becomes dead if it is deleted (delete-impact mode)
maxResultsnumberMax candidate-dead results (default 100)
find_pathFind the route from A to B in the call graph. `from`/`to` may be exact/fuzzy function names OR selectors: landmark:<id>, role:entrypoint|hub|sink, file:<path>. Returns the single CHEAPEST path (by call-distance, or fewest hops if useCallDistance=false) plus a few bounded alternates and a reason — not a raw multi-path dump. "No path within budget" is an explicit answer. Distinct from trace_execution_path, which enumerates ALL paths for debugging: reach for find_path to select the cheapest route (by name, role, or landmark), trace_execution_path to see every path. Run analyze_codebase first.
ParameterTypeDescription
directResolvedOnlybooleanTraverse only directly-resolved edges, ignoring synthesized dynamic-dispatch edges (default false).
directorystringAbsolute path; default cwd
from *stringStart endpoint: a function name, or landmark:<id> / role:entrypoint|hub|sink / file:<path>
to *stringGoal endpoint: a function name, or landmark:<id> / role:entrypoint|hub|sink / file:<path>
useCallDistancebooleanRank by confidence-weighted call-distance (default true); false ranks by fewest hops
fleet_statusUSE THIS WHEN: coordinating parallel agents/branches off a moving base — "which of my recorded verdicts still hold, and what is the coordination picture?". Re-checks each recorded coordination verdict (a clean blast radius, a stable public surface, a passed certify_merge) against the current graph via the freshness lease: still-valid / carried / invalidated / needs-reverification; a verdict is never served fresh once its base moved without the check. Composes plan_parallel_work → map_in_flight_conflicts → certify_merge. A record ENDS on board-entry evidence (30 min idle, dir gone, branch deleted or merged): then a count with its reason, not a live verdict. A rule it could not evaluate is in unknownPredicates, never read as ended. Advisory.
ParameterTypeDescription
branchesarrayIn-flight branches to compose the arc for (attribution + the tools to run per branch).
directorystringAbsolute path; default cwd
generate_change_proposalUSE THIS WHEN: you have a BMAD story, a feature description, or a spec delta request, and want to create a structured OpenSpec change proposal before writing any code. Combines orient + search_specs + analyze_impact to produce a pre-filled <spec root>/changes/{slug}/proposal.md (spec root = openspecPath, default openspec) — no LLM required. Output includes affected domains, touched requirements, risk scores, and insertion points. Run analyze_codebase first; spec index optional (degrades gracefully).
ParameterTypeDescription
description *stringIntent of the change — story title + primary AC, or a free-form feature description. e.g. "add retry logic to payment processing — must retry up to 3 times on timeout"
directorystringAbsolute path; default cwd
slug *stringChange identifier used as the directory name, e.g. "add-payment-retry". Will be lowercased and hyphenated automatically.
storyContentstringOptional: full BMAD story content (markdown). If provided, it is embedded verbatim in the proposal for traceability.
generate_testsGenerate spec-driven test files from OpenSpec scenarios. Supports vitest, playwright (JS/TS), pytest (Python), gtest and catch2 (C++), junit (Java/Kotlin) and gotest (Go). A THEN clause pattern engine emits real assertions for common patterns (HTTP status codes, property presence, error messages) without any LLM call. Pass useLlm:true to enrich unmatched clauses using mapped function source. Each generated test is tagged with a parseable openlore: metadata comment that enables spec coverage tracking via get_test_coverage. Defaults to dryRun:true — set dryRun:false to write files to disk.
ParameterTypeDescription
directorystringAbsolute path; default cwd
domainsarrayOnly generate tests for these spec domains (omit for all)
dryRunbooleanPreview generated content without writing files (default: true)
frameworkstringTest framework (default: auto-detect from project files)
useLlmbooleanUse LLM to fill in assertions the pattern engine cannot match
get_architecture_overviewUSE THIS WHEN: the user asks "how is this project organized?", "what are the main components?", or wants a broad overview before diving in. Returns domain clusters, cross-cluster dependencies, global entry points, and critical hubs in one call — faster than reading package.json + directory tree yourself.
ParameterTypeDescription
directory *stringAbsolute path to the project directory
get_call_graphUSE THIS WHEN: the user asks "which functions are called the most?", "what are the critical bottlenecks?", or "are there layer violations?". Returns hub functions, entry points, and architecture violations across all files — impossible to reconstruct by reading individual files.
ParameterTypeDescription
directory *stringAbsolute path to the project directory
get_change_couplingUSE THIS WHEN: "what changes together with this file?" or "what is the most volatile code?". Mined from local git history (not the call graph): co-change coupling surfaces invisible coupling with no import/call edge (the config + parser that move in lockstep), and volatility/churn flags risky high-change code. Pass a file for its coupling, or omit for the most-volatile overview. Advisory signal (correlation, not causation); bulk commits filtered. Run analyze_codebase first.
ParameterTypeDescription
directorystringAbsolute path; default cwd
filestringA file to query its coupling/volatility. Omit for the most-volatile overview.
limitnumberCap results (default 20)
get_clusterReturn all functions in the same community as the given function. Communities are computed via label propagation on the call graph at analyze time — tightly coupled functions land in the same cluster regardless of directory. Use this to understand the "blast radius neighbourhood" without traversing the graph manually. Run analyze_codebase first.
ParameterTypeDescription
directorystringAbsolute path; default cwd
functionName *stringFunction name to look up the community for
get_critical_hubsUSE THIS WHEN: the user asks "what's the most central code?", "what should I refactor to reduce coupling?", or "which functions are shared the most?". Lists the highest fan-in functions — modifying them has the widest blast radius.
ParameterTypeDescription
directory *stringAbsolute path to the project directory
limitnumberMaximum hubs to return (default: 10)
minFanInnumberMinimum fan-in threshold (default: 3)
get_duplicate_reportDetect duplicate code (clone groups) across the codebase using pure static analysis. Detects Type 1 (exact clones — identical after whitespace/comment normalization), Type 2 (structural clones — same structure with renamed variables), and Type 3 (near-clones with Jaccard similarity ≥ 0.7 on token n-grams). This is the WHOLE-REPO audit of every clone group; for the pre-write "does a near-duplicate of THIS function already exist?" one-vs-all query, use find_clones instead. Returns a concise summary (stats + top clone groups + a truncation receipt) by default; pass responseFormat:"detailed" for the full report. Run analyze_codebase first.
ParameterTypeDescription
directorystringAbsolute path; default cwd
responseFormatstringOutput verbosity. "concise" (default): stats + the top clone groups + a truncation receipt. "detailed": the full report.
get_env_varsReturn all environment variables referenced in the project: names, which files use them, whether they have a known default (from .env.example), and whether they are required (used without a fallback in source code). Reads the pre-computed env-inventory.json artifact when available, otherwise scans source files live. Supports JS/TS (process.env), Python (os.environ/os.getenv), Go (os.Getenv), Ruby (ENV[]). Returns a concise summary by default; pass responseFormat:"detailed" for the full inventory. Run analyze_codebase first for the fastest results.
ParameterTypeDescription
directorystringAbsolute path; default cwd
responseFormatany
get_external_packagesReturn all direct external dependencies declared in package manifests: package.json (npm), pyproject.toml / requirements.txt (pypi), Cargo.toml (cargo), go.mod (go). Each entry includes name, version, ecosystem, and isDev flag. Reads the pre-computed external-packages.json artifact when available, otherwise scans manifests live. Run analyze_codebase first for the fastest results.
ParameterTypeDescription
directorystringAbsolute path; default cwd
get_file_dependenciesUSE THIS WHEN: the user asks "what does file X import?", "what files depend on Y?", or when planning a refactor and needing to understand coupling before touching a file. Uses pre-computed in/out degree — no need to grep import statements across the codebase.
ParameterTypeDescription
directionstring"imports", "importedBy", or "both" (default)
directory *stringAbsolute path to the project directory
filePath *stringRelative file path, e.g. "src/core/analyzer/vector-index.ts"
get_function_bodyReturn the exact source code of a named function in a file. Use focus plus focusKind for stored variable/callee evidence; omit both for the full implementation. Prior analysis enables exact byte ranges; otherwise it parses the file now and errors if no definition is found.
ParameterTypeDescription
directorystringAbsolute path; default cwd
filePath *stringFile path relative to the project directory, e.g. "src/auth/jwt.ts"
focusstringVariable or callee name; requires focusKind.
focusKindstringRequired with focus; selects its evidence kind.
functionName *stringName of the function to extract, e.g. "verifyToken"
get_function_skeletonReturn a noise-stripped skeleton of a source file: logs, inline comments, and non-JSDoc block comments are removed while signatures, control flow (if/for/try), return/throw statements, and call expressions are preserved. Use this before refactoring a god function to get a compact structural view without reading thousands of lines of raw source.
ParameterTypeDescription
directorystringAbsolute path; default cwd
filePath *stringPath to the file, relative to the project directory
get_god_functionsUSE THIS WHEN: the user asks "which functions do too much?", "what are the worst SRP violations?", or "which functions should be split?". Finds high fan-out orchestrators — the functions most likely to need decomposition.
ParameterTypeDescription
directory *stringAbsolute path to the project directory
fanOutThresholdnumberMinimum fan-out (default: 8)
filePathstringOptional: restrict to a specific file
get_handoff_briefingUSE THIS WHEN: you take over in-flight work in a fresh context (after compaction, a cleared session, or another machine) and need the state of the change, not a prose summary. Unlike blast_radius (a pending diff), briefing_since (others' landed changes) and orient (a new task), this hands over an in-flight change: the touched symbols (working tree, plus this session's commits when a session ledger is live) with callers, open openspec changes naming them with unchecked tasks quoted, reaching tests, in-scope memories and decisions (orphaned ones withheld), specs that may go stale, uncommitted files, and the index lease. A budget trims the least central sections first, with omission receipts. A clean tree says nothing is in flight. Reads no transcript.
ParameterTypeDescription
directorystringAbsolute path; default cwd
tokenBudgetnumberApproximate token budget for the briefing (default 1500, 300-8000).
get_health_mapReturn a structural health dashboard: hubs (high fan-in), god functions (high fan-out), layer violations, and volatile files — aggregated in one call and ranked by severity. Use this as a starting point before a refactor or code review to identify the riskiest areas. Drill in with get_critical_hubs, get_god_functions, get_change_coupling, or find_dead_code. Run analyze_codebase first.
ParameterTypeDescription
directorystringAbsolute path; default cwd
limitnumberMax items per hotspot list and max topRisks (default: 10, max: 50)
get_landmarksWhole-repo structural anchors as LABELED signals with evidence: the union of hub/orchestrator/chokepoint/volatile/entrypoint/dead (each per-signal tool exposes only one). Each function carries its earned labels + raw evidence (e.g. hub:{fanIn}); no blended score — rank as your task needs. Optionally filter to one label. Run analyze_codebase first.
ParameterTypeDescription
directorystringAbsolute path; default cwd
labelstringOptional: return only landmarks carrying this label (hub | orchestrator | chokepoint | volatile | entrypoint | dead)
limitnumberMax landmarks to return, ordered by fan-in (default: 20, max: 200)
get_language_supportUSE THIS WHEN: a result for a file looks empty or weak and you need to know whether that means "nothing found" or "this language is only partly supported". Returns the deterministic capability matrix (${LANGUAGE_CAPABILITIES.join(', ')}) for the repo's DETECTED languages, or, with a`language` name, that one language (an unknown language returns an all-unsupported record, never an error). An unsupported capability yields nothing, never a guess. Repo mode needs analyze_codebase first; a named language does not.
ParameterTypeDescription
directorystringAbsolute path; default cwd
languagestringOptional: a specific language name (e.g. "Go", "Kotlin"). Omit to report the repo's detected languages.
get_leaf_functionsReturn functions that make no internal calls (leaves of the call graph). These are the safest refactoring targets: self-contained, easy to unit-test, zero downstream blast radius. Best entry point for bottom-up refactoring. Run analyze_codebase first.
ParameterTypeDescription
directorystringAbsolute path; default cwd
filePatternstringOptional substring to restrict results to matching file paths
limitnumberMaximum number of results to return (default: 20)
sortBystringSort order: "fanIn" (most-called leaves first, default), "name", or "file"
get_low_risk_refactor_candidatesReturn the safest functions to refactor first: low fan-in (few callers), low fan-out (few dependencies), no cyclic involvement, not a hub. Ideal starting point for incremental, low-risk refactoring sessions. Run analyze_codebase first.
ParameterTypeDescription
directorystringAbsolute path; default cwd
filePatternstringOptional substring to restrict candidates to matching file paths
limitnumberMaximum number of candidates to return (default: 5)
get_mapThe lay of the land: a coarse-to-fine map of the call graph. With no communityId, returns the REGION view — each code community as a super-node (label, size, top files, top landmark) plus weighted inter-region connections, no function bodies — so you can see where regions connect without reading any code. Pass a communityId to drill into one region at function granularity. Run analyze_codebase first.
ParameterTypeDescription
communityIdstringOptional: drill into this region (a communityId from the region view) at function granularity
directorystringAbsolute path; default cwd
get_mappingReturn the requirement → function mapping produced by openlore generate. Shows which functions implement which spec requirements, confidence level (llm / heuristic), and orphan functions not covered by any requirement. Requires openlore generate to have been run at least once.
ParameterTypeDescription
directorystringAbsolute path; default cwd
domainstringFilter by domain name (e.g. "auth", "crawler")
orphansOnlybooleanReturn only orphan functions (not covered by any requirement)
get_middleware_inventoryReturn the middleware inventory for the project: all detected middleware entries with type (auth, cors, rate-limit, validation, logging, error-handler, custom), framework, source file, line number, and name. Reads the pre-computed middleware-inventory.json artifact when available, otherwise scans source files live. Supports Express, Hono, Fastify, NestJS, Next.js, and more. Returns a concise summary by default; pass responseFormat:"detailed" for the full inventory. Run analyze_codebase first for the fastest results.
ParameterTypeDescription
directorystringAbsolute path; default cwd
responseFormatany
get_minimal_contextReturn the minimum context needed to safely modify a function: its signature and body, direct callers (signatures only), direct callees (signatures only), and which test files cover it. Use this instead of orient when you already know exactly which function to modify. Typically 200-600 tokens vs orient's 2000+. Run analyze_codebase first.
ParameterTypeDescription
directorystringAbsolute path; default cwd
filePathstringOptional relative file path to disambiguate when multiple functions share the name
functionName *stringExact function or method name
rankBystringOpt-in caller/callee ordering (default "distance"). "pagerank" orders neighbours by personalized PageRank seeded on the target and attaches a per-neighbour `relevance`. Default output unchanged.
tokenBudgetnumberOptional (pagerank mode): cap callers+callees to ~this many tokens, keeping highest-relevance neighbours and reporting `omittedForBudget` instead of truncating.
get_refactor_reportUSE THIS WHEN: the user asks "what should I clean up?", "what's the biggest technical debt?", or "what are the worst code quality issues?". Returns a prioritized list: unreachable code, hub overload, god functions, SRP violations, cyclic dependencies — all in one report.
ParameterTypeDescription
directory *stringAbsolute path to the project directory
get_route_inventoryReturn the full HTTP/API route inventory for the project: total count, breakdown by HTTP method and framework, and the list of individual routes with method, path, framework, source file, and handler name. Reads the pre-computed route-inventory.json artifact when available (runs in < 1 ms), otherwise scans source files live. Supports Express, Hono, Fastify, NestJS, Next.js App Router, FastAPI, Flask, Django, and more. Run analyze_codebase first for the fastest results.
ParameterTypeDescription
directorystringAbsolute path; default cwd
get_schema_inventoryReturn the database schema inventory for the project: all detected ORM model/table definitions with their fields, types, and nullability. Reads the pre-computed schema-inventory.json artifact when available, otherwise scans source files live. Supports Prisma, TypeORM, Drizzle ORM, and SQLAlchemy. Returns a concise summary by default; pass responseFormat:"detailed" for the full inventory. Run analyze_codebase first for the fastest results.
ParameterTypeDescription
directorystringAbsolute path; default cwd
responseFormatany
get_signaturesReturn compact function and class signatures for files in a project. Useful for understanding a codebase's public API without reading full source. Optionally filter by file path pattern. Run analyze_codebase first.
ParameterTypeDescription
directorystringAbsolute path; default cwd
filePatternstringOptional substring to filter file paths (e.g. "services", "api", ".py")
get_specUSE THIS WHEN: the user asks to read a specific spec domain — "show me the auth spec", "what does the analyzer spec say?", "read the API spec". Returns the full spec content and the functions that implement it, in one call.
ParameterTypeDescription
directory *stringAbsolute path to the project directory
domain *stringDomain name, e.g. "auth" or "analyzer"
get_style_fingerprintUSE THIS WHEN: you are about to write or edit code and want to match the house style instead of your training default. Returns a DESCRIPTIVE idiom profile measured from the AST: per language, the dominant choice for a fixed set of idioms (arrow vs. declared function, const vs. let, ternary vs. if, await vs. .then, template vs. concatenation, function-naming case) as { dominant, ratio, samples }. Repository profile by default; pass communityId for a region (from get_map) or filePath for one file. An idiom below the evidence floor, or one the language or formatter enforces (Go ties case to visibility), reports a null signal, never a guess. No lint judgment, no composite style score. Languages: TypeScript, JavaScript, Python, Go (others fail-soft). Run analyze_codebase first.
ParameterTypeDescription
communityIdstringProfile one community/region by id (list ids with get_map).
directorystringAbsolute path; default cwd
filePathstringProfile a single file (exact path or a unique path suffix). Most specific scope: if both filePath and communityId are given, filePath wins.
languagestringRestrict the returned languages to this one (e.g. "TypeScript").
get_subgraphUSE THIS WHEN: the user needs to trace calls from or to a specific function — "what does X call?", "who calls Y?", "show me the call chain for Z". More targeted than get_call_graph. Works across all files without you having to grep through each one.
ParameterTypeDescription
directionstringDirection (default: downstream)
directory *stringAbsolute path to the project directory
functionName *stringFunction name (exact or partial match)
maxDepthnumberBFS depth limit (default: 3)
get_surprising_connectionsFind unexpected structural coupling via composite scoring: cross-community edges, peripheral-to-hub calls, and cross-test-boundary dependencies. Use before a refactor or code review to spot accidental dependencies. Run analyze_codebase first.
ParameterTypeDescription
directorystringAbsolute path; default cwd
limitnumberMax results to return (default: 15, max: 50)
get_test_coverageReport which OpenSpec scenarios have corresponding test coverage. Scans test files for // openlore: {JSON} or # openlore: {JSON} metadata tags (added automatically by generate_tests). Returns coverage percentage by domain, a list of uncovered scenarios, and flags domains where spec drift was detected. Use minCoverage to enforce a CI coverage gate.
ParameterTypeDescription
directorystringAbsolute path; default cwd
domainsarrayOnly check these spec domains (omit for all)
minCoveragenumberReport belowThreshold:true if effective coverage is below this percentage
get_ui_component_inventoryReturn the UI component inventory for the project: all detected components with their framework, props, source file, and line number. Reads the pre-computed ui-inventory.json artifact when available, otherwise scans source files live. Supports React, Vue, Svelte, and Angular. Returns a concise summary by default; pass responseFormat:"detailed" for the full inventory. Run analyze_codebase first for the fastest results.
ParameterTypeDescription
directorystringAbsolute path; default cwd
responseFormatany
list_decisionsList architectural decisions recorded during the current session. Shows draft, consolidated, verified, approved, rejected, and synced decisions. Use approve_decision or reject_decision to act on verified decisions, then sync_decisions to write them to spec.md files.
ParameterTypeDescription
directorystringAbsolute path; default cwd
statusstringFilter by status (default: returns all)
list_spec_domainsList all OpenSpec domains available in this project. Use this first when you need to discover what domains exist before doing a targeted search_specs call.
ParameterTypeDescription
directorystringAbsolute path; default cwd
locate_symbol_spanUSE THIS WHEN: you know WHICH symbol to edit and need its exact location, instead of re-finding it by string-matching a fresh read. Resolves `symbol` (a name, or name::path to disambiguate) and returns the span (startByte/endByte as UTF-16 code-unit offsets + 1-based startLine/endLine) with a freshness VERDICT: `fresh` (the index matches the file; safe to edit at, with a contentHash token), `stale` (the file changed since analysis; a re-analyze hint and NO offset), `ambiguous` (name::path candidates), or `not-found` (candidates). Unlike suggest_insertion_points (where to ADD code), this pinpoints an EXISTING symbol. Read-only: the host applies the edit with its own edit tool. Run analyze_codebase first.
ParameterTypeDescription
directorystringAbsolute path; default cwd
symbol *stringThe symbol to locate: its name, or name::path to disambiguate.
map_in_flight_conflictsUSE THIS WHEN: many humans/agents edit one codebase and you want to know, before merge, which in-flight changes collide. Builds ONE conflict graph over local branches, open PRs (via gh), and supplied agent task descriptors. Each footprint comes from the ACTUAL diff (per-symbol append vs modify, so two PRs appending disjoint registry entries do NOT falsely conflict); the WAW/RAW/shared-append/WAR classifier runs across all of them. Per conflict: the two actors, hazard, shared symbols, landing order, and git merge-tree textualMerge. A change whose diff can't be fetched or whose symbols don't resolve is "not assessed", never "no conflict". Read-only, advisory. Same classifier as plan_parallel_work, which plans a caller-supplied task list instead. Run analyze_codebase first.
ParameterTypeDescription
baseRefstringGit ref every change is diffed against (default: resolved default branch).
branchesarrayRestrict to these branch names (default: all ahead of base).
directorystringAbsolute path; default cwd
includeBranchesbooleanInclude local branches ahead of base (default true).
includePullRequestsbooleanInclude open PRs via gh (default true; absent gh degrades).
maxChangesnumberCap on assessed changes (default 40).
tasksarrayOptional agent task descriptors that join as first-class nodes (plan_parallel_work shape: id + seedSymbols/seedFiles + optional writeMode).
orientSTART HERE. USE THIS WHEN: beginning any new task — "add X", "fix Y", "where does Z live?". Returns relevant functions, files, spec domains, call neighbours, and insertion points in ONE call. Replaces the need to chain search_code → search_specs → suggest_insertion_points manually.
ParameterTypeDescription
directory *stringAbsolute path to the project directory
limitnumberNumber of relevant functions to return (default: 5)
task *stringNatural language description of the task
plan_parallel_workUSE THIS WHEN: before fanning N tasks out across agents/worktrees — "which of these tasks are safe to run concurrently, and in what order?". Given a caller-supplied task list (id + seed symbols/files each), returns the plan: a hazard-typed conflict graph (WAW/shared-append/RAW/WAR/soft-coupling), a wave schedule (wave 1 = dispatch now), and the critical path (minimum rounds with unlimited agents). Stateless, advisory; re-invoke with remaining tasks to re-plan. Mark registration-site touches writeMode:"append" so they are not falsely serialized. Same hazard classifier as map_in_flight_conflicts, different input: this plans a caller-supplied task list, map_in_flight_conflicts harvests changes already in flight (branches/PRs). Run analyze_codebase first.
ParameterTypeDescription
directorystringAbsolute path; default cwd
includeBoardbooleanAlso plan the live peer-board agents (declare_footprint) as tasks board:<actorId>.
tasks *arrayTask descriptors; each needs an id and ≥1 seed (symbol or file). The list is never invented or decomposed.
prepare_spec_generationReturn paged evidence for a host to author an OpenSpec domain. Read-only; no LLM or writes.
ParameterTypeDescription
cursorstringContinuation cursor.
directorystringAbsolute path; default cwd
domain *stringAnalyzed domain to document.
maxItemsnumberPage size (default 80).
maxResponseBytesnumberByte budget (default 49,152).
prepare_spec_repairReturn paged evidence for a host to repair an OpenSpec domain. Read-only; no LLM or writes.
ParameterTypeDescription
baseRefstringDrift comparison ref.
cursorstringContinuation cursor.
directorystringAbsolute path; default cwd
domain *stringExisting domain to repair.
maxItemsnumberMaximum evidence records per page (default 80).
maxResponseBytesnumberByte budget (default 49,152).
recallRecall code-anchored memories (notes + decisions) for a task with a freshness verdict: fresh, drifted (verify), or orphaned (in needsReanchoring, never authoritative). Two authoritative memories on one symbol surface in unreconciled. Optional: asOf/changedSince (commit-ish) for history, type filter, federation (surface producer-repo memory on interfaces you call). Omit task to scan all.
ParameterTypeDescription
asOfstringCommit-ish: memory authoritative as of that commit.
changedSincestringCommit-ish: memory recorded/invalidated after it.
directorystringAbsolute path; default cwd
limitnumberMax memories to return (default: 10).
taskstringWhat you are about to work on (optional).
tokenBudgetnumberOptional token cap; reports withheld count.
typestringRestrict notes to this type (decisions excluded when set).
record_decisionRecord an architectural decision. Call this on a significant design choice: data structure, library, API contract, auth strategy. Under decision autopilot (the default unless a blocking decisions gate is installed) it is accepted at once as auto-approved and a human reviews it later; otherwise it is a DRAFT, and diff-grounded consolidation then promotes it (possibly rewording it, keeping your text as authorStatement), merges it, or rejects it — always with a stated reason. The response returns the draft id and the command that reads the verdict; re-recording a decided draft returns that verdict instead of a second draft. Use supersedes when a later decision replaces an earlier one.
ParameterTypeDescription
affectedFilesarraySource files most relevant to this decision (optional)
consequencesstringWhat changes as a result (optional)
constraintsobjectOptional versioned architecture constraints. Rules use the existing layers / forbidden / allowedOnly vocabulary and inherit this decision's lifecycle.
directorystringAbsolute path; default cwd
rationale *stringWhy this decision was made
scopestringDecision scope. local: single file; component: single module/service; cross-domain: multiple spec domains or service contracts; system: global constraint. Only cross-domain and system generate ADR files. Defaults to component; auto-promoted to cross-domain when multiple domains inferred.
supersedesstringID of a prior decision this one replaces (optional)
title *stringShort imperative statement, e.g. "Use UUIDs for decision IDs"
reject_decisionReject a pending decision. Rejected decisions are never synced to spec files.
ParameterTypeDescription
directorystringAbsolute path; default cwd
id *string8-character decision ID from list_decisions
notestringOptional reason for rejection
rememberPersist a durable, code-anchored memory to recall later (invariant/gotcha/rationale). Pass anchors (symbol and/or file) so it self-invalidates when that code changes. Optional: type (default note) and supersedes=<id> to retire a prior memory; re-recording the same content+anchor updates in place. For spec-synced decisions use record_decision.
ParameterTypeDescription
anchorsarrayCode this memory is about; each anchor names a symbol and/or file.
claimsarrayverify_claim claims it rests on; must hold now, rechecked at recall.
content *stringThe memory to persist (one self-contained fact).
directorystringAbsolute path; default cwd
pinnedbooleanPush into every full orient briefing (cap 10).
supersedesstringId of a prior memory to retire (kept queryable via asOf).
tagsarrayOptional retrieval tags.
triggerobjectOne predicate; pushed into orient/blast_radius on a match. Globs: * ? **.
typestringClassification (default note); never inferred.
report_coverage_gapsUSE THIS WHEN: you need to know which important code has NO test reaching it — "is the risky part of this change tested?", where to start improving coverage, or the untested HUBS ranked. Computes the structural inverse of select_tests over the whole graph (functions in no test's reachable set), ranked by hub/chokepoint significance. SOUND DIRECTION ONLY: it reports "no reaching test" and NEVER claims a symbol is "tested"; reachable-from-a-test is not behavior-verified. Distinct from find_dead_code (a gap with no caller at all is labeled also-dead) and from get_test_coverage (spec-tag based). No runtime, no coverage tool, deterministic. Scope to a diff (changedSymbols/diffRef) or a region (filePattern). Run analyze_codebase first.
ParameterTypeDescription
changedSymbolsarrayRestrict to gaps among these changed symbols (diff scope).
diffRefstringGit ref to diff the working tree against for diff scope (e.g. "HEAD", "main").
directResolvedOnlybooleanCount only directly-resolved edges as test-reach (ignore synthesized dynamic-dispatch); reports more gaps, more certainly. Default false.
directorystringAbsolute path; default cwd
filePatternstringOnly report gaps whose file path contains this substring (region scope).
maxResultsnumberLimit reported gaps (default 100, capped 500).
search_codeUSE THIS WHEN: you don't know which file or function handles a concept — "where is rate limiting implemented?", "which function validates tokens?", "what handles authentication?". Beats grep when the function name is unknown. Falls back to keyword search automatically if the embedding server is down.
ParameterTypeDescription
directory *stringAbsolute path to the project directory
limitnumberResults to return (default: 10)
query *stringNatural language search query
search_specsUSE THIS WHEN: the user asks "which spec covers X?", "what does the spec say about Y?", "which requirement describes Z?", or "what domains exist?". Omit query to list available spec domains. Provide a query to search by meaning. Returns linked source files for graph highlighting.
ParameterTypeDescription
directory *stringAbsolute path to the project directory
domainstringFilter by domain name (e.g. "auth", "analyzer")
limitnumberResults to return (default: 10)
querystringNatural language search query (omit to list domains)
sectionstringFilter by section type: "requirements", "purpose", "design", "architecture", "entities"
search_unifiedUSE THIS WHEN: you want to find where something is implemented AND what the spec says about it in a single call. Searches both code functions and spec requirements simultaneously, then cross-boosts results that are linked through mapping.json — so a function that implements a matching requirement ranks higher than one found by code search alone. Returns results with type "code", "spec", or "both" and a mappingBoost score. Requires "openlore analyze --embed" and a prior "openlore generate" run.
ParameterTypeDescription
directorystringAbsolute path; default cwd
domainstringFilter spec results by domain name
languagestringFilter code results by language (e.g. "TypeScript")
limitnumberMaximum number of results to return (default: 10)
query *stringNatural language query, e.g. "validate user authentication"
sectionstringFilter spec results by section type: "requirements", "purpose", etc.
select_testsUSE THIS WHEN: you changed code and want to know which tests to run — "which tests cover parseConfig?", "what should I run for this diff?". Walks the call graph BACKWARD from the change to every test that reaches it, with the reaching path per test, and always includes changed and new test files; each test says why it was selected. An over-approximate PRIORITIZER (run these first), not a sound replacement for the full suite; the response states its confidence and coverage. A diff resolves to the symbols that changed (formatting and comments are not changes); a file kept whole says why in changeGranularity. The inverse of report_coverage_gaps (important code NO test reaches). Deterministic, offline, no test run. Run analyze_codebase first.
ParameterTypeDescription
changedSymbolsarrayChanged function/method names. Optional — if neither this nor diffRef is given, defaults to your current working-tree changes vs HEAD.
diffRefstringGit ref to diff the working tree against (e.g. "HEAD", "main"). Optional — defaults to HEAD when neither this nor changedSymbols is given.
directResolvedOnlybooleanTraverse only directly-resolved edges, ignoring synthesized dynamic-dispatch edges (default false).
directorystringAbsolute path; default cwd
maxDepthnumberBackward reachability depth (default 12)
spec_store_statusReport the health of a spec-store binding: an external spec repository (.openlore/config.json "specStore") whose declared target/reference repositories are resolved against the federation registry. Returns conclusion-shaped findings with stable codes (target-unresolved, index-stale, reference-missing, …) and pasteable remediations. Read-only; never blocks.
ParameterTypeDescription
directorystringAbsolute path; default cwd
structural_diffUSE THIS WHEN reviewing or refactoring a change: "what changed structurally?", "whose callers are now stale?". A graph diff (complement to git diff) between two states (working tree vs a ref, or two refs): functions/edges added & removed, signature changes, and the existing callers now STALE because a callee signature moved under them. Rename/move ambiguity is flagged, not guessed. Deterministic, offline. This is the raw graph delta; for the all-in-one pre-commit briefing use blast_radius, and for paths a diff newly opens into a sensitive surface use change_impact_certificate. Run analyze_codebase first for stale-caller analysis. Opt-in escape check: pass declaredFootprint to also flag symbols modified OUTSIDE the declared write-set and conflicts they open against peerFootprints.
ParameterTypeDescription
baseRefstringOld state to diff against (default "HEAD")
declaredFootprintobjectOPT-IN escape check: the task's declared write-footprint (a plan_parallel_work `Footprint`). Shape { taskId?, writeSet: [{ id:"file::name", filePath?, writeMode?:append|modify }], readSet?:string[] }. Adds an `escapeAnalysis` block; omit = unchanged behavior.
directorystringAbsolute path; default cwd
filesarrayOptional repository-relative files to analyze. Applied before category limits.
headRefstringNew state (a git ref). Omit to use the working tree.
maxResultsnumberCap reported items per category (default 200)
peerFootprintsarrayDeclared footprints of OTHER in-flight tasks (same shape as declaredFootprint). An escape landing in a peer's write-set opens a newly-reported conflict naming that peer.
suggest_insertion_pointsUSE THIS WHEN: the user asks "where should I add X?", "where's the best place to implement Y?", or "how do I integrate Z into the existing code?". Combines semantic search + call graph to find ranked candidates with context — far more targeted than grepping for similar patterns.
ParameterTypeDescription
description *stringNatural language description of the feature
directory *stringAbsolute path to the project directory
limitnumberNumber of candidates (default: 5)
sync_decisionsWrite all approved decisions into their target spec.md files. Appends new Requirement blocks and Decision sections (append-only, never overwrites). Creates ADR files in openspec/decisions/ for architectural decisions. Pass dryRun=true to preview without writing. Pass id to sync a single decision by ID.
ParameterTypeDescription
directorystringAbsolute path; default cwd
dryRunbooleanPreview without writing files (default: false)
idstringSync only this specific decision ID (default: all approved)
trace_execution_pathUSE THIS WHEN debugging: "how does request X reach function Y?", "which call chain produced this error?", "is there a path from A to B?". Returns all paths ordered by hop count. Complements get_subgraph (neighbourhood) with point-to-point tracing.
ParameterTypeDescription
directory *stringAbsolute path to the project directory
entryFunction *stringStarting function name (exact or partial)
maxDepthnumberMax path length in hops (default: 6)
maxPathsnumberMax paths returned (default: 10)
targetFunction *stringTarget function name (exact or partial)
unified_searchUSE THIS WHEN: the user asks to search across both code and specs — "find everything related to authentication", "show me code and specs for user validation", or "search for rate limiting implementation and requirements". Combines code and spec indexes with cross-scoring to boost results that are linked through bidirectional mappings. Results include provenance tags (code, spec, or both).
ParameterTypeDescription
directory *stringAbsolute path to the project directory
domainstringFilter by spec domain (e.g., "auth", "analyzer")
languagestringFilter by language (e.g., "TypeScript", "Python")
limitnumberResults to return (default: 10)
query *stringNatural language search query
sectionstringFilter by spec section type: "requirements", "purpose", "design", etc.
verify_changeUSE THIS WHEN: you just made a change and want ONE checklist before landing — "what did I break and what must I re-run?". One severity-ranked receipt of what the diff adds, each item with its subject, check, severity, and the fact behind it, plus the tests to run: removed or re-signed functions, breaking exports and their consumers, contract breaks, env keys still set in infrastructure, new architecture violations, added credentials, new import cycles, weakened checks, phantom imports, spec drift. Composes blast_radius and structural_diff; no LLM. Advisory: it runs and edits nothing. Its sibling blast_radius returns the full briefing. Run analyze_codebase first.
ParameterTypeDescription
baseRefstringGit ref to diff the working tree against (e.g. "HEAD", "main"). Default HEAD (uncommitted changes).
directorystringAbsolute path; default cwd
stagedbooleanGrade the staged diff. Fails, naming the files, when the working tree has unstaged or untracked changes.
verify_claimUSE THIS BEFORE asserting a structural fact ("X is dead", "Y calls Z", "this is safe to change") or citing a decision ("ADR abc12345 governs this"). Returns a deterministic verdict (confirmed | refuted | unverifiable) + a citation receipt — a graph computation, never an LLM guess. kinds: calls, reaches, impacts, dead, safe-to-change (structural); decision-current (is a recorded decision still authoritative?); decision-governed (a symbol); endpoint-implemented, endpoint-consumed ("METHOD /path"); tested (does a test assert on a symbol's output?); log-origin (which code prints a log line?). "unverifiable" is first-class when the claim hits a dynamic-dispatch blind spot or names an unknown decision — hedge or read the source. Run analyze_codebase first for structural kinds.
ParameterTypeDescription
directorystringAbsolute path; default cwd
kind *stringThe kind of claim to verify.
objectstringThe second symbol — required for relational kinds (calls, reaches, impacts).
subject *stringA symbol, decision id, "METHOD /path", leaseToken or log line.
working_set_contextAssemble the working-set structural briefing for an active change in a spec-store binding: orient, generalized from one repo to the change's target repositories. Reads the change's proposal under the bound store, orients each resolved+indexed target on that intent, and returns ONE deterministic, token-budgeted briefing whose items are attributed per target (symbol, callers, spec domains, insertion points) plus fresh in-scope anchored intent. Conclusion-shaped, read-only, never blocks; orphaned intent is withheld and drifted intent is flagged. No LLM.
ParameterTypeDescription
changestringThe active change id to brief (its proposal lives under the bound store).
directorystringAbsolute path; default cwd
tokenBudgetnumberCap the merged briefing to ~this many tokens (default 8000).

Security checks

Static checks derived from the repository 2 days ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository's README runs to about 1.3K words.
  • ✓License declaredThe repository declares the MIT license.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedDependency versions are pinned by flake.lock and 2 more.
  • !No dynamic code executionScanned 587 source files and found 1 call to eval or shell execution, in src/cli/commands/drift.ts:177. Review how tool inputs reach them before granting credentials.

1 check has not been run yet.

What the source scan found

Transport
stdiosrc/cli/commands/mcp.ts:2846
Starts other programs
34 callssrc/cli/commands/drift.ts:177, src/cli/commands/drift.ts:216, src/cli/commands/drift.ts:224
Outbound network calls
37 callssrc/api/health.ts:115, src/cli/commands/doctor.ts:1185, src/cli/commands/serve-descriptor.ts:228
Writes or deletes files
3 callssrc/utils/shutdown.ts:152, src/utils/shutdown.ts:168, src/utils/shutdown.ts:170
Lockfile
flake.lock and 2 more

Pattern matches on the source text of 587 files: places to read, not proof of what the code does at run time.

Releases

v3.9.0v3.9.0 · 29 Nov 2026Your agent now gets short, exact facts when it needs them, and much less standing text every turn. No breaking changes. Highlights First-read briefing. The first read or edit of a file says who calls it, which decisions govern it, and…
v3.8.0v3.8.0 · 22 Nov 2026OpenLore now tells an agent whether a test actually checks a function, not only whether it reaches it. This release also fixes moved spec folders and a Windows console window. No breaking changes. Highlights Test evidence. Each test linked…
v3.7.0v3.7.0 · 16 Nov 2026OpenLore now ships as a Claude Code plugin, and most of this release makes its answers to agents more accurate. Test selection finds more of the tests a change breaks, `blast_radius` reports less noise, and the prompt hook only speaks when…
v3.6.0v3.6.0 · 9 Nov 2026The graph learns your service contracts, and the agent loop leaves receipts. OpenLore now reads your service contracts — OpenAPI, protobuf, and GraphQL — into the same call graph as your code, binds handlers and generated clients to the…
v3.5.0v3.5.0 · 25 Oct 2026The index heals itself, and every change comes with a receipt. An always-on, self-healing index. A call-graph index that is stale, empty, reset by a version upgrade, truncated, or otherwise unservable now rebuilds itself automatically in…

README

The repository's README runs to about 1.3K words, fetched 2 days ago. The original in the repository is authoritative.

Read full README
Questions

About Spec Gen

How do I install Spec Gen?

In Claude Code, run claude mcp add spec-gen -- npx -y openlore. Other MCP clients take the command after "--" in their server configuration.

Is Spec Gen safe to use with an AI agent?

Its trust score is 75 out of 100 (good). It passes 4 of the 5 static checks Conduid ran on the repository; it does not pass No dynamic code execution. Conduid's scan of 587 source files found that it serves MCP over stdio, starts other programs (34 calls), makes outbound network calls (37 calls) and writes or deletes files (3 calls). Its dependencies are pinned by flake.lock and 2 more. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Spec Gen still maintained?

Yes — the latest release is v3.9.0 (29 Nov 2026), and the last commit was yesterday. The repository has 370 stars.

What tools does Spec Gen provide?

Conduid read 85 tools from the source: analyze_codebase, analyze_env_impact, analyze_error_propagation, analyze_impact, annotate_story, approve_decision, audit_spec_coverage, blast_radius and 77 more. 85 of them publish their parameters, listed under Tools above.

What license is Spec Gen released under?

The repository declares the MIT license. That applies to the latest release, v3.9.0, as well.