Compose LLM Agent Instructions

Typeflows SDK Modules:
io.typeflows:typeflows-github io.typeflows:typeflows-llm

Problem: Teams need to standardise LLM agent instructions across different repository types (Kotlin services, TypeScript frontends, TDD projects, Hexagonal Architecture projects) whilst allowing each repository to use the appropriate mix of instruction sets for its domain.

Solution: Create modular instruction components for different domains and practices, then compose them in the Typeflows Builder to generate standardised instruction files for each repository type.

Typeflows supports the following LLMs products:

  • Agents: AGENTS.md
  • Claude: CLAUDE.md, Command MD files, Agents files
  • Cursor: Cursor rules files
  • Junie: guidelines.md, .aiignore
  • Gemini: GEMINI.md

Markdown as Components

Create focused components that can load content from resource files or generate it programmatically, making them easy to version and maintain:

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!

Composing in Typeflows

Compose instruction components to create AGENTS.md files tailored to a specific repository:

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!

Exported AGENTS.md

When exported, Typeflows merges the instruction components based on their sections to create a tailored instruction file:

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!

Benefits

  • Standardisation: Each instruction domain (Kotlin, TDD, Hexagonal) is maintained once and shared across relevant repositories
  • Composition: Different repository types get exactly the instruction mix they need through flexible composition
  • Consistency: Teams working with the same technology stack get identical guidance
  • Maintainability: Updates to practices propagate automatically to all repositories using that component
  • Extensibility: It’s composition all the way down - instruction components can themselves be composed from smaller parts

Teams can share instruction components as versioned packages, enabling organisation-wide standardisation whilst maintaining the flexibility to compose the right mix for each repository type.