Urgent.News

What's breaking now, across thousands of outlets.

AI

Give a Jira workflow rule a memory that survives, without blowing the prompt budget

Give a Jira workflow rule a memory that survives, without blowing the prompt budget Key takeaways END STATE: a workflow rule that accumulates lessons about YOUR instance across runs, injected under a byte cap you can prove holds, with duplicates folded in rather than appended. Cap the prompt block in UTF-8 BYTES, never in string length. Measured: a Japanese memory block was 95 bytes for 53…

To implement a Jira workflow rule that remembers lessons across runs without exceeding a prompt budget, follow these steps:

1. Stand up a local harness to run the real module without Forge. Swap the Forge key-value store with an in-memory stub by replacing the import line with `import storage from "./kvs-stub.mjs";`. Verify the swap by running the harness and checking that the output remains identical to the original.

2. Save a lesson containing information about the Jira instance, such as the Due Date field rejecting DD/MM/YYYY format. Save another lesson with a similar but not identical statement. The deduplication mechanism will check the normalized text or Jaccard similarity threshold (0.85) to determine if the lesson should be merged or stored separately.

3. Measure the deduplication threshold. Calculate the Jaccard similarity between the two lessons. If the similarity is below 0.85, the lessons will not be merged and both will be stored. This proves that the memory system is not indiscriminately folding together similar lessons.

4. Build the injection block to insert the stored lessons into the workflow prompt. Ensure the prompt block is capped in UTF-8 bytes, not string length, to stay within the budget. Defang any prompt-fence tokens before injecting the stored text.

5. Enable the memory store only for the specific paths that require it. This avoids unnecessary storage growth and keeps the prompt focused on the relevant information.

By following these steps, you can create a memory system that accumulates valuable lessons about your Jira instance across workflow runs, while staying within the prompt budget. The key is measuring the deduplication threshold accurately instead of relying on the constant value alone.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

span-01 vs mercury-decide: same score, opposite failures

span-01 vs mercury-decide: same score, opposite failures Last time I tested a "decision model" — a model that takes a plain-language question about a text and answers with a probability — as a gate…

  • Both span-01 and mercury-decide scored equally (F1 0.93) in English word detection test.
  • Span-01 provided consistent probabilities, mercury-decide varied based on instruction clarity.
  • Span-01 showed stability over days, mercury-decide exhibited daily score fluctuations.

More from Saturday 3 October →