The #INTENT construct allows you to write natural language descriptions that are automatically transformed into executable SCRUM code at compile time using LLMs.
Use a cloud LLM provider for instant #INTENT support:
PowerShell:
# Using Groq (Free tier available)
$env:SCRUM_API_KEY = "your-groq-api-key"
$env:SCRUM_API_BASE_URL = "https://api.groq.com/openai/v1"
$env:SCRUM_API_MODEL = "llama-3.3-70b-versatile"Bash:
# Using Groq (Free tier available)
export SCRUM_API_KEY="your-groq-api-key"
export SCRUM_API_BASE_URL="https://api.groq.com/openai/v1"
export SCRUM_API_MODEL="llama-3.3-70b-versatile"Get a free API key from:
- Groq: https://console.groq.com/ (Fast, free tier)
- OpenAI: https://platform.openai.com/ (Most capable)
- Cerebras: https://cloud.cerebras.ai/ (Fast inference)
- Together.ai: https://api.together.xyz/ (Various models)
For fully offline execution:
# Install Ollama
curl -fsSL https://ollama.com/install.sh | sh
# Pull a model
ollama pull llama3.2
# SCRUM will auto-detect running OllamaCreate HelloIntent.scrum:
EPIC "HelloWorldApp"
USER STORY "Greeting"
#INTENT
I want to create a simple greeting that displays "Hello from SCRUM!" to the user.
#END INTENT
END OF STORY
END OF EPIC
app IS NEW HelloWorldApp
app::Greeting USING []
Run it:
cd development
java -jar scrum.jar examples/HelloIntent.scrumSee examples/IntentComputeBirthYear.scrum for a complete example that:
- Asks user for their age
- Calculates birth year
- Displays the result
EPIC "BirthYearCalculator"
USER STORY "ComputeBirthYear"
#INTENT
I want to ask the user for their current age.
The input will be used to calculate and display their birth year
based on the current year 2024.
#END INTENT
END OF STORY
END OF EPIC
calculator IS NEW BirthYearCalculator
calculator::ComputeBirthYear USING []
- Write Intent: Describe what you want in natural language inside
#INTENT...#END INTENT - Compile-time Transformation: SCRUM sends your intent to the LLM with examples of SCRUM syntax
- Code Generation: LLM generates valid SCRUM code matching your intent
- Auto-validation: Generated code is validated and re-parsed before execution
- Execution: Your program runs with the generated implementation
SCRUM automatically:
- Checks for API key → uses cloud API
- Falls back to Ollama if running locally
- Provides clear error messages if neither available
See docs/LLM-CONFIGURATION.md for:
- Complete environment variable reference
- Provider-specific examples
- Cost considerations
- Troubleshooting guide
- Be Specific: Describe expected input/output clearly
- Break It Down: Use multiple small intents rather than one large one
- Test Iteratively: Start simple, add complexity gradually
- Review Generated Code: Use verbose mode to see what LLM generated
- Read
docs/LANGUAGE-REFERENCE.mdfor full SCRUM syntax - Review
examples/directory for more #INTENT examples - See
docs/API-DEFINITIONS.mdfor creating APIs with intents - Configure your preferred LLM provider in
docs/LLM-CONFIGURATION.md