Description of Problem
Based on #53
Description
As the Fluxnova core engine, I need to support a configurable userPrompt in the agentic namespace during agent initialization, so that each agentic subprocess can be configured with a process-specific initial user message instead of using a hardcoded default.
Currently, agent initialization sends a hardcoded default empty user message. We need to:
- Create support for reading the
userPrompt attribute from the BPMN extension elements
- Pass the configured
userPrompt to the agent initialization logic
- Handle edge cases (null, empty, special characters)
- Support
${...} expressions for instance-specific prompt values with fallback to default when empty
- Maintain backwards compatibility for models without a configured
userPrompt
Acceptance Criteria
- The XML parser correctly reads the
userPrompt attribute from the agentic namespace element
- The parsed
userPrompt is passed to the agent initialization logic (alongside the existing systemPrompt)
${...} expressions in the userPrompt are evaluated against the process instance variables at runtime
${...} expressions in the userPrompt can be combined with normal strings.
- If
userPrompt is null, empty, or evaluates to an empty string after expression substitution, the agent falls back to the current default
- Multi-line prompts (containing line breaks) are correctly parsed and preserved
- Special characters in the prompt are properly unescaped from XML and passed to the agent
- The engine gracefully handles BPMN models without a
userPrompt attribute (uses default fallback)
- Existing unit tests continue to pass; new tests added for
userPrompt parsing and initialization
Potential Solutions
Technical Notes
- Extend the existing agentic namespace schema to include the
userPrompt element/attribute
- Ensure the XML attribute name and structure match the modeler implementation from JIRA Story 1
- The
userPrompt should be created using the same underlying type as the system prompt
- Expression evaluation should follow the same pattern as other configurable fields in Fluxnova (e.g., variable substitution)
- Update any relevant documentation on the agentic namespace structure
Definition of Done
- Unit tests cover:
- Parsing
userPrompt from valid BPMN
- Handling null/empty
userPrompt
- Evaluating
${...} expressions in userPrompt
- Fallback to default when
userPrompt is empty or evaluates to empty
- Handling multi-line prompts
- Handling special characters
- Backwards compatibility with models lacking
userPrompt
- Documentation updated with new agentic namespace attribute and expression support examples
Description of Problem
Based on #53
Description
As the Fluxnova core engine, I need to support a configurable
userPromptin the agentic namespace during agent initialization, so that each agentic subprocess can be configured with a process-specific initial user message instead of using a hardcoded default.Currently, agent initialization sends a hardcoded default empty user message. We need to:
userPromptattribute from the BPMN extension elementsuserPromptto the agent initialization logic${...}expressions for instance-specific prompt values with fallback to default when emptyuserPromptAcceptance Criteria
userPromptattribute from the agentic namespace elementuserPromptis passed to the agent initialization logic (alongside the existingsystemPrompt)${...}expressions in theuserPromptare evaluated against the process instance variables at runtime${...}expressions in theuserPromptcan be combined with normal strings.userPromptis null, empty, or evaluates to an empty string after expression substitution, the agent falls back to the current defaultuserPromptattribute (uses default fallback)userPromptparsing and initializationPotential Solutions
Technical Notes
userPromptelement/attributeuserPromptshould be created using the same underlying type as the system promptDefinition of Done
userPromptfrom valid BPMNuserPrompt${...}expressions inuserPromptuserPromptis empty or evaluates to emptyuserPrompt