spec-editor Pro is in early access. Request access

Code tools

Search and check the code, and annotate it with implements markers. This group has 8 tools, 7 of them available only with spec-editor Pro.

Tool Edition Summary
annotate_code Pro Auto-annotate code with implements decorators based on symbol names.
get_file_tree Open core Show project file structure.
read_lints Pro Check code for errors via ruff.
search_code Pro Grep for TEXT PATTERNS in source files (regex, strings, comments).
search_semantic Pro Semantic (natural language) search across the codebase.
search_symbol Pro Find CLASS/FUNCTION/METHOD DEFINITIONS by name — the primary tool for symbol lookup.
verify_implements Pro Verify that a code file implements requirements via implements annotations.
verify_traceability Pro Verify requirements traceability in code.

annotate_code

Pro tool. Available with the spec-editor Pro plugin.

Auto-annotate code with implements decorators based on symbol names. dry_run=True shows changes without writing files.

Parameters

Parameter Type Required Description
code_dir string yes Path to code directory
dry_run boolean no If true, show what would be changed without modifying files

get_file_tree

Show project file structure. Returns sorted list of all files. Uses project_path as root directory.

Parameters

Parameter Type Required Description
path string no Subdirectory path (default: project root)
project_path string yes Path to spec-editor project (directory with methodology.yaml)

read_lints

Pro tool. Available with the spec-editor Pro plugin.

Check code for errors via ruff.

Parameters

Parameter Type Required Description
code_dir string yes Path to code directory
file_path string no Specific file (optional)

search_code

Pro tool. Available with the spec-editor Pro plugin.

Grep for TEXT PATTERNS in source files (regex, strings, comments). For finding CLASS/FUNCTION/METHOD definitions by name, prefer search_symbol instead — it returns structured symbol data (name, kind, file, line, docstring).

Parameters

Parameter Type Required Description
code_dir string yes Path to code directory
pattern string yes Regex pattern for search

search_semantic

Pro tool. Available with the spec-editor Pro plugin.

Semantic (natural language) search across the codebase. Returns matching functions, classes, and methods with relevance scores. Unlike search_symbol (exact name match), this finds code by meaning (e.g., ‘payment processing’ finds process_payment even if the word ‘payment’ isn’t in the function name). Uses a local ONNX embedding model (all-MiniLM-L6-v2) via fastembed. Reads the index currently on disk only — it never builds or rebuilds on its own; a missing index returns status=‘not_built’ and results carry a ‘stale’ flag when source changed since the last build. Unlike search_elements (substring search over model elements only), this has no access to the model — it only searches code.

Parameters

Parameter Type Required Description
query string yes Natural language query describing what to find
rebuild boolean no Force rebuild the index (default false)
top_k integer no Number of results (default 10, max 50)

search_symbol

Pro tool. Available with the spec-editor Pro plugin.

Find CLASS/FUNCTION/METHOD DEFINITIONS by name — the primary tool for symbol lookup. Uses AST parsers (not grep) for Python/TS/Go/Java/Rust. Returns structured data: symbol name, kind (class/function/method), file path, line number, decorators, and docstring. MUCH better than grep when you need to find where a class or function is DEFINED. Example: query=‘AgentWorker’ finds ‘class AgentWorker(Agent):’ at persistent_agent.py:26.

Parameters

Parameter Type Required Description
code_dir string no Path to code directory (defaults to project_path if omitted)
query string yes Symbol name to search for (partial match)

verify_implements

Pro tool. Available with the spec-editor Pro plugin.

Verify that a code file implements requirements via implements annotations. Returns passed, implemented count, and gaps.

Parameters

Parameter Type Required Description
code_dir string yes Path to code directory
file_path string yes Path to the code file for analysis

verify_traceability

Pro tool. Available with the spec-editor Pro plugin.

Verify requirements traceability in code. Checks implements coverage and reports gaps.

Parameters

Parameter Type Required Description
code_dir string yes Path to code directory
language string no Programming language (python, typescript)