Skip to content

Prompt node type with PromptAssembler service and graph-override layering - #1053

Merged
malibio merged 2 commits into
mainfrom
feature/issue-1049-prompt-node-assembler
Apr 6, 2026
Merged

malibio merged 2 commits into
mainfrom
feature/issue-1049-prompt-node-assembler

Conversation

@malibio

@malibio malibio commented Apr 6, 2026

Copy link
Copy Markdown
Collaborator

Closes #1049

malibio and others added 2 commits April 6, 2026 10:17
…layering (#1049)

Phase 2 of ADR-030: Store prompts as first-class graph nodes with a purpose-built
assembler that layers graph overrides on top of hardcoded defaults.

- Register prompt node behavior (validates priority, template_syntax, source)
- Add prompt core schema (priority, template_syntax enum, source enum)
- Add prompt to MCP tool schemas node_type enum
- Implement PromptAssembler: hardcoded base + graph overrides + Minijinja templates
- Event-driven cache invalidation via NodeService broadcast channel
- Content boundary markers for user-authored prompts (injection safety)
- Seed prompt nodes for first-run migration (tool strategy, response rules, etc.)
- 200+ Rust tests passing across both crates, 3918 frontend tests passing

Co-Authored-By: Claude <[email protected]>
…t validation

Review findings addressed:
- Remove unused cache infrastructure (YAGNI - CachedPrompt struct, event
  listener, clear_cache method were never populated or read during assembly)
- Sanitize </user-content> closing tags in user content to prevent boundary
  escape in prompt injection
- Add non-empty content validation to PromptNodeBehavior
- Log warning on deserialization failures in fetch_prompt_overrides
- Document intentional auto-escaping disabled in minijinja
- Make render_template a static method (no &self needed)
- Add user_content_boundary_escape test

Co-Authored-By: Claude <[email protected]>
@malibio
malibio merged commit 65cbaea into main Apr 6, 2026
@malibio
malibio deleted the feature/issue-1049-prompt-node-assembler branch April 6, 2026 09:23
malibio added a commit that referenced this pull request Jun 22, 2026
…ring (#1053)

* Add prompt node type with PromptAssembler service and graph-override layering (#1049)

Phase 2 of ADR-030: Store prompts as first-class graph nodes with a purpose-built
assembler that layers graph overrides on top of hardcoded defaults.

- Register prompt node behavior (validates priority, template_syntax, source)
- Add prompt core schema (priority, template_syntax enum, source enum)
- Add prompt to MCP tool schemas node_type enum
- Implement PromptAssembler: hardcoded base + graph overrides + Minijinja templates
- Event-driven cache invalidation via NodeService broadcast channel
- Content boundary markers for user-authored prompts (injection safety)
- Seed prompt nodes for first-run migration (tool strategy, response rules, etc.)
- 200+ Rust tests passing across both crates, 3918 frontend tests passing

Co-Authored-By: Claude <[email protected]>

* Address PR review: remove dead cache, fix boundary escape, add content validation

Review findings addressed:
- Remove unused cache infrastructure (YAGNI - CachedPrompt struct, event
  listener, clear_cache method were never populated or read during assembly)
- Sanitize </user-content> closing tags in user content to prevent boundary
  escape in prompt injection
- Add non-empty content validation to PromptNodeBehavior
- Log warning on deserialization failures in fetch_prompt_overrides
- Document intentional auto-escaping disabled in minijinja
- Make render_template a static method (no &self needed)
- Add user_content_boundary_escape test

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prompt node type with PromptAssembler service and graph-override layering

1 participant