LLM Coding Agents
io.typeflows:typeflows-llmTypeflows provides comprehensive support for configuring AI coding assistants and LLM agents. Generate standardised instruction files, configuration directories, and ignore patterns for different AI tools used in development workflows.
AGENTS.md Configuration
Configure general-purpose AI agent instructions that work across different assistant platforms. Create unified guidelines that can be consumed by any AI coding assistant.
Better Experience in Landscape Mode
The code examples look much better when viewed horizontally. Please rotate your device for the best experience!
Or view on a larger screen to see the code!
class AgentsExample : Builder<TypeflowsGitHubRepo> {
override fun build() = TypeflowsGitHubRepo {
files += Agents.of(
MarkdownContent.of(
"""
# Development Guidelines
- Use meaningful variable names
- Write tests for all public methods
- Mock external dependencies
"""
)
)
}
}
Generated Output:
AGENTS.md- General AI assistant instructions
Core Classes:
| Method | Parameters | Description |
|---|---|---|
Agents.of() | MarkdownContent... | Create general agent instructions |
Claude Configuration
Configure Claude AI assistant with instruction files, directory structure, settings, custom agents, commands, and hooks. Supports both simple CLAUDE.md files and advanced .claude directory configurations.
Better Experience in Landscape Mode
The code examples look much better when viewed horizontally. Please rotate your device for the best experience!
Or view on a larger screen to see the code!
class ClaudeExample : Builder<TypeflowsGitHubRepo> {
override fun build() = TypeflowsGitHubRepo {
files += Claude.of(
"""
# Claude Configuration
- Follow TypeScript patterns
- Add JSDoc comments for APIs
- Write unit and integration tests
"""
)
files += DotClaude {
agents += MarkdownContent.of(
"""
# Code Reviewer Agent
- Static code analysis
- Code style checking
- Security vulnerability detection
"""
).asTypeflowsFile("code-reviewer.md")
commands += MarkdownContent.of(
"""
# Generate Documentation
Generates API documentation from JSDoc comments.
"""
).asTypeflowsFile("generate-docs.md")
hooks += TextContent.of(
"""
#!/bin/bash
# Pre-commit hook for Claude Code
echo "Running pre-commit checks..."
npm run lint
npm run test
"""
).asTypeflowsFile("pre-commit")
settings = Settings.of(
JSONContent.of(
"""
{
"model": "claude-3-sonnet",
"temperature": 0.1,
"max_tokens": 4096,
"tools": ["bash", "edit", "grep"],
"auto_save": true,
"project_context": {
"primary_language": "java",
"framework": "spring-boot",
"testing_framework": "junit"
}
}
"""
)
)
}
}
}
Generated Output:
CLAUDE.md- Claude-specific instructions.claude/settings.json- Claude configuration.claude/agents/- Agent definitions.claude/commands/- Custom commands.claude/hooks/- Pre/post hooks
Core Classes:
| Class/Method | Parameters | Description |
|---|---|---|
Claude.of() | String | Create Claude instruction file |
DotClaude.create() | builder | Configure Claude directory structure |
Settings | JSONContent | Claude settings configuration |
TextContent | Content | Scripts and hooks |
Cursor IDE Rules
Configure Cursor IDE with coding assistance rules and guidelines. Create modular rule files for different domains like coding standards, language-specific patterns, and testing approaches.
Better Experience in Landscape Mode
The code examples look much better when viewed horizontally. Please rotate your device for the best experience!
Or view on a larger screen to see the code!
class CursorExample : Builder<TypeflowsGitHubRepo> {
override fun build() = TypeflowsGitHubRepo {
files += DotCursor {
rules += MarkdownContent.of(
"""
# General Coding Standards
- Write self-documenting code
- Follow single responsibility principle
- Use proper exception handling
"""
).asTypeflowsFile("coding-standards.md")
rules += MarkdownContent.of(
"""
# TypeScript Specific Rules
- Use strict TypeScript configuration
- Prefer explicit types over 'any'
- Use const over let, avoid var
"""
).asTypeflowsFile("typescript-rules.md")
rules += MarkdownContent.of(
"""
# Testing Guidelines
- Use Arrange-Act-Assert pattern
- Test happy path and edge cases
- Mock external dependencies
"""
).asTypeflowsFile("testing.md")
}
}
}
Generated Output:
.cursor/rules/- IDE-specific coding rules- Multiple rule files for different domains
Core Classes:
| Method | Parameters | Description |
|---|---|---|
DotCursor.create() | builder | Configure Cursor rules directory |
MarkdownContent | Content | Rule files content |
Junie Configuration
Configure Junie AI assistant with project-specific guidelines and intelligent file exclusions. Define development practices and control which files are included in AI context through .aiignore patterns.
Better Experience in Landscape Mode
The code examples look much better when viewed horizontally. Please rotate your device for the best experience!
Or view on a larger screen to see the code!
class JunieExample : Builder<TypeflowsGitHubRepo> {
override fun build() = TypeflowsGitHubRepo {
files += DotJunie {
guidelines = Guidelines.of(
MarkdownContent.of(
"""
# Junie Guidelines
- Use functional components with hooks
- Write self-documenting code
- Use React Testing Library for tests
"""
)
)
aiIgnore = AiIgnore.create { gitIgnore ->
gitIgnore.sections += IgnoreFile.Section("Sensitive") {
entries += Ignore.of("*.key")
entries += Ignore.of("secrets/")
entries += Negate.of(".env.example", "Keep example")
}
}
}
}
}
Generated Output:
guidelines.md- Junie-specific project guidelines.aiignore- Files to exclude from AI context
Core Classes:
| Class/Method | Parameters | Description |
|---|---|---|
DotJunie.create() | builder | Configure Junie setup |
Guidelines.of() | MarkdownContent | Create project guidelines |
AiIgnore.create() | builder | Configure exclusion patterns |
IgnoreEntry | String | File/directory patterns to ignore |
Negate | String, String | Exceptions to ignore patterns |
Gemini Configuration
Configure Google Gemini AI assistant with project context and development guidelines. Create GEMINI.md files with architecture details, coding standards, and project-specific instructions.
Better Experience in Landscape Mode
The code examples look much better when viewed horizontally. Please rotate your device for the best experience!
Or view on a larger screen to see the code!
class GeminiExample : Builder<TypeflowsGitHubRepo> {
override fun build() = TypeflowsGitHubRepo {
files += Gemini.of(
"""
# Gemini Configuration
- Use dependency injection for components
- Follow clean architecture principles
- Unit tests for business logic
"""
)
}
}
Generated Output:
GEMINI.md- Gemini-specific instructions and context
Core Classes:
| Method | Parameters | Description |
|---|---|---|
Gemini.of() | String | Create Gemini instruction file |
Use this reference when implementing AI assistant configurations in your Typeflows setup. Each configuration type generates specific files that AI assistants can consume for project-specific guidance and context.