Deterministic-first AI code assistant that crawls your codebase to implement changes using open source LLMs
npm install spaiderAI code assistant that crawls your codebase to answer questions and implement changes.
Open source models often fail to use tools / function calling in a reliable manner.
Spaider uses structured outputs and deterministic workflows to ensure consistency and thorough implementation.
This is a working proof of concept.
For now it works with TS/JS projects only.
``bashMake sure you have rg installed
brew install ripgrep
CLI Options:
-
-p, --prompt : The request/prompt for the AI assistant
- -f, --files : Initial files to include in the analysis
- -r, --root : Project root directory (default: current directory)
- -h, --help: Show help message
- -v, --version: Show version informationHow It Works
Spaider has a pipeline architecture with conditional steps. It can be easily extended with more functionality and logic.
`ts
const processRequest = pipeline(
generateProjectTree,
readFiles,
parseAST,
analyzeIntent,
{
when: needsMoreContext,
steps: [discoverFiles, readFiles, parseAST],
},
{
when: isAskMode,
steps: [generateAnswer],
},
{
when: isEditMode,
steps: [generateChanges, applyChanges],
}
);
``