turbo_promptable
Object-Oriented Prompting framework for the turbo ecosystem. Define AI agent prompts, roles, workflows, and tools as type-safe Dart objects that serialize to JSON, YAML, Markdown, and XML.
Features
- Type-safe workspace models:
Role,Persona,Workflow,Step,Activity,Instruction,Input,Output,Goal,Issue,Context,Template,Tool, and more - Spec models:
Ability,Feature,Requirement,Scenario,Journey,Task,Module,Mockup,Prototype - Tool models:
Api,Cli,Script,Mcp, together withToolCommand,ToolParameter, andToolParameterOptionfor declarative command schemas - Spawnable abstraction (
TSpawnable) with CLI tool and prompt-delivery enums for launching agents against Claude Code, Cursor, Windsurf, and others - Cross-referencing abstracts (
OfAbilities,OfFeatures,OfIssues,OfJourneys,OfMockups,OfModules,OfPrds,OfProjects,OfPrototypes,OfScenarios) for composing specs - JSON serialization on every model via
json_serializable; YAML, Markdown, and XML output inherited fromturbo_serializable - Structured metadata (
TMetaData) on every promptable
Installation
dependencies:
turbo_promptable: ^0.4.0
Usage
import 'package:turbo_promptable/turbo_promptable.dart';
const workflow = Workflow(
name: 'Review Workflow',
steps: [
Step(
name: 'Analyse',
input: Input(name: 'Source Code'),
instructions: 'Analyse the provided source code for quality issues.',
output: Output(
name: 'Analysis Report',
schema: 'markdown',
),
),
],
);
const role = Role(
name: 'Code Reviewer',
expertise: 'Static analysis and code quality',
workflows: [workflow],
);
const persona = Persona(
name: 'Code Reviewer',
expertise: 'Static analysis and code quality',
workflows: [workflow],
identity: 'A meticulous reviewer focused on maintainability.',
);
print(persona.toJson());
Core Concepts
TPromptable
Every workspace model extends TPromptable, which itself extends TSerializable from turbo_serializable. Models have:
name— required identifiermetaData— optionalTMetaDatafor frontmatter (description, tags, etc.) on models that declare it
Roles and Personas
Role— a spawnable capability bundle with expertise, activities, checklists, instructions, templates, tools, and workflowsPersona— aRoleaugmented with anidentitystring that describes the persona's character; construct viaPersona(...)orPersona.fromRole(role: ..., identity: ...)
Workflows and Steps
A Workflow contains an ordered list of Steps. Each Step has a required Input, a string instructions field, and a required Output.
Specs
Spec models (Ability, Feature, Requirement, Scenario, Journey, Task, Module, Mockup, Prototype) describe intended behaviour and deliverables. They cross-reference each other via the Of* abstracts exported from workspace/abstracts/.
Tools
Tool subclasses (Api, Cli, Script, Mcp) extend the shared Tool base, which carries a list of ToolCommands. Each command declares its parameters via ToolParameter, and parameters can enumerate discrete ToolParameterOptions.
Spawnable
TSpawnable (used by Role and Persona) carries cliTool (TCliTool), command, and promptDelivery (TPromptDelivery) for orchestrating agent launches across tools like Claude Code, Cursor, Windsurf, and custom CLIs.
License
MIT
Libraries
- core/extensions/t_collection_extensions
- spawn/enums/t_cli_tool
- spawn/enums/t_config_source
- spawn/models/t_file
- spawn/models/t_folder
- spawn/records/headless_invocation
- spawn/records/interactive_invocation
- spawn/records/system_prompt_invocation
- turbo_promptable
- Object-Oriented Prompting framework for defining AI agent prompts, roles, workflows, and tools as type-safe Dart objects.
- workspace/abstracts/of_abilities
- workspace/abstracts/of_features
- workspace/abstracts/of_issues
- workspace/abstracts/of_journeys
- workspace/abstracts/of_mockups
- workspace/abstracts/of_modules
- workspace/abstracts/of_prds
- workspace/abstracts/of_projects
- workspace/abstracts/of_prototypes
- workspace/abstracts/of_scenarios
- workspace/constants/tp_defaults
- workspace/enums/t_body_type
- workspace/enums/t_ref_type
- workspace/models/checklists/acceptance_criteria
- workspace/models/checklists/constraints
- workspace/models/checklists/non_goals
- workspace/models/context/actor
- workspace/models/context/collection
- workspace/models/context/concept
- workspace/models/context/documentation
- workspace/models/context/project
- workspace/models/context/reference
- workspace/models/context/stakeholder
- workspace/models/context/subject
- workspace/models/instructions/convention
- workspace/models/instructions/skill
- workspace/models/memories/decision
- workspace/models/memories/event
- workspace/models/memories/insight
- workspace/models/memories/meeting
- workspace/models/memories/progress
- workspace/models/meta/t_meta_data
- workspace/models/meta/t_promptable
- workspace/models/meta/t_spawnable
- workspace/models/root/agent
- workspace/models/root/checklist
- workspace/models/root/context
- workspace/models/root/end_goal
- workspace/models/root/goal
- workspace/models/root/input
- workspace/models/root/instruction
- workspace/models/root/issue
- workspace/models/root/memory
- workspace/models/root/output
- workspace/models/root/persona
- workspace/models/root/role
- workspace/models/root/spec
- workspace/models/root/template
- workspace/models/root/tool
- workspace/models/root/tool_set
- workspace/models/root/workflow
- workspace/models/specs/ability
- workspace/models/specs/feature
- workspace/models/specs/fr
- workspace/models/specs/journey
- workspace/models/specs/mockup
- workspace/models/specs/module
- workspace/models/specs/nfr
- workspace/models/specs/prototype
- workspace/models/specs/requirement
- workspace/models/specs/scenario
- workspace/models/specs/task
- workspace/models/tools/api
- workspace/models/tools/cli
- workspace/models/tools/mcp
- workspace/models/tools/script
- workspace/models/tools/tool_ability
- workspace/models/workflows/step