translate: teach both backends in the grammar prompt, default to memory#22
Merged
Conversation
The prompt hardcoded 'temporal static ( ... )' as the only block form and
instructed 'Output exactly one block: temporal static'. So the LLM ALWAYS
emitted temporal — even when the user said 'in memory'. A memory-only
verb (summarize, search, ...) then landed on temporal and was rejected
with 'known action but not available on this backend yet'. The user asked
for memory; the prompt made it impossible.
Fix (BuildPrompt):
- Teach BOTH block forms: 'memory static ( ... )' and
'temporal static ( ... )', with one-line semantics (memory = runs
in-process immediately; temporal = durable workflow).
- Add a CHOOSING THE BACKEND section: default to memory for research /
summarize / read / ask / analyze / almost everything; use temporal
ONLY when durability/scheduling/background is explicitly requested
(and note only echo runs on temporal today); 'in memory' / 'locally'
/ 'quickly' → memory.
- Examples now show memory blocks (summarize, parallel research+merge+
ask) plus one explicit temporal example.
Effect: 'run in memory: summarize ...' now translates to
'memory static ( summarize ... )' → loom routes it to in-process
execution (Claude Code) → result posts back, instead of being rejected.
The full in-memory verb set becomes reachable from prose.
Test (prompt_backend_test.go): the prompt must contain both block forms,
the memory DEFAULT, and the 'in memory' cue — regression guard against
reverting to temporal-only.
CI: vet, gofmt, staticcheck, go test -race ./pkg/script/..., build pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug (this is what you just hit in Slack)
You typed 'run in memory: summarize ...' and loom replied 'known action but not available on this backend yet.' That's the temporal not-implemented error — meaning the LLM emitted
temporal static ( summarize ... )despite you saying in memory.Root cause:
BuildPrompthardcodedtemporal static ( ... )as the only block form and literally said 'Output exactly one block: temporal static'. The LLM was never toldmemoryexists, so it always picked temporal — wheresummarizeisn't implemented → rejected. The prompt made your request impossible. Not a loom bug; loom routes memory correctly.Fix (
BuildPrompt)memory static ( ... )(in-process, immediate) andtemporal static ( ... )(durable)Effect
@loom run in memory: summarize ...→memory static ( summarize ... )→ loom routes to in-process execution (Claude Code) → result posts back. The full in-memory verb set is now reachable from Slack prose.Test
prompt_backend_test.go: prompt must contain both block forms, the memory DEFAULT, and the 'in memory' cue — regression guard.go test -race ./pkg/script/...