A LangGraph-based prototype for generating Spack package recipes from a source repository URL.
View the specifications document
The project analyses a software repository, extracts its package metadata, resolves its source archive, and generates an initial Spack package.py recipe.
The current implementation is deterministic and rule-based. LLM-assisted recipe modelling, validation, and repair will be added in later development phases.
The prototype currently:
- clones the provided source repository;
- inspects the repository files;
- detects the project type and build system;
- extracts package metadata;
- identifies package dependencies;
- resolves a source archive;
- generates a Spack package recipe;
- writes the generated files to the
outputs/directory.
graph.py— defines the LangGraph workflow and transitions.nodes.py— contains the workflow node implementations.state.py— defines the shared state used by the graph.tool.py— provides the command-line entry point..gitignore— excludes generated files, virtual environments, caches, and local workspace files.
Activate the Python virtual environment:
source .venv/bin/activateRun the tool with a repository URL:
python tool.py <repository-url>Example:
python tool.py https://github.com/deisa-project/deisa-daskGenerated files are written under:
outputs/<spack-package-name>/
The output currently includes:
package.py
metadata.json
The outputs/ directory is intentionally excluded from Git because it contains generated files.
- The workflow currently focuses on Python projects.
- Recipe generation is rule-based.
- Generated recipes may still require human review.
- Advanced validation against Spack is not yet fully integrated.
- LLM-assisted reasoning and confidence-based decisions are not yet implemented.
Future work includes:
- structured recipe modelling;
- LLM-assisted metadata interpretation;
- confidence scoring and provenance tracking;
- automatic Spack validation;
- recipe repair based on validation errors;
- explicit human-review branches;
- support for additional project types and build systems.
Prototype under active development at Maison de la Simulation, CEA Paris-Saclay.