bots-garden/mini-mepublic Fork
⑂ 1831025
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/mini-me.git
git clone ssh://git@rickub.com/bots-garden/mini-me.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP

🎫 Ticket 261 closed: dynamic rules are reachable with skills, skillRouting, a preGeneration hook

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
agent committed 2026-11-27T05:18:35+01:00 Browse files
1831025 parent: e2237d7
modified .tickets/issues/0261-dynamic-system-instructions-inject-the-relevant-r.yaml +59 -7
@@ -1,12 +1,13 @@
11 # Managed by IssueSpec. Hand edits are welcome; keep the schema valid.
22 id: 261
33 title: "Dynamic system instructions: inject the relevant rules at each turn (study pk's directives)"
4-state: open
4+state: closed
55 author:
66 name: k33g
77 email: ph.charriere@gmail.com
88 createdAt: 2026-11-25T05:15:39.000Z
9-updatedAt: 2026-11-25T05:15:39.000Z
9+updatedAt: 2026-11-27T12:00:00.000Z
10+closedAt: 2026-11-27T12:00:00.000Z
1011 labels:
1112 - question
1213 - enhancement
@@ -77,34 +78,85 @@ body: |
7778 tasks:
7879 - id: 1
7980 title: Read pk's implementation (pkg/directives, internal/agent/directives.go) and its dynamic-golo demo
80- state: open
81+ state: closed
8182 priority: high
8283 author:
8384 name: k33g
8485 email: ph.charriere@gmail.com
8586 createdAt: 2026-11-25T05:15:39.000Z
87+ updatedAt: 2026-11-27T12:00:00.000Z
88+ closedAt: 2026-11-27T12:00:00.000Z
8689 - id: 2
8790 title: Choose a selection method (BM25, embeddings, decider, keywords) and the injection point (system vs next to the question)
88- state: open
91+ state: closed
8992 priority: high
9093 author:
9194 name: k33g
9295 email: ph.charriere@gmail.com
9396 createdAt: 2026-11-25T05:15:39.000Z
97+ updatedAt: 2026-11-27T12:00:00.000Z
98+ closedAt: 2026-11-27T12:00:00.000Z
9499 - id: 3
95100 title: Measure on a demo agent with many rules - static vs dynamic, prompt cache cost
96- state: open
101+ state: closed
97102 priority: medium
98103 author:
99104 name: k33g
100105 email: ph.charriere@gmail.com
101106 createdAt: 2026-11-25T05:15:39.000Z
107+ updatedAt: 2026-11-27T12:00:00.000Z
108+ closedAt: 2026-11-27T12:00:00.000Z
102109 - id: 4
103110 title: Decide and write implementation tickets
104- state: open
111+ state: closed
105112 priority: medium
106113 author:
107114 name: k33g
108115 email: ph.charriere@gmail.com
109116 createdAt: 2026-11-25T05:15:39.000Z
110-comments: []
117+ updatedAt: 2026-11-27T12:00:00.000Z
118+ closedAt: 2026-11-27T12:00:00.000Z
119+comments:
120+ - id: 1
121+ author:
122+ name: k33g
123+ email: ph.charriere@gmail.com
124+ createdAt: 2026-11-27T12:00:00.000Z
125+ body: |
126+ Closed (user's decision, 2026-11-27): no new mechanism — what pk's
127+ directives give is already reachable with what mm has, and in the
128+ place the questions of this ticket pointed to (next to the question,
129+ the system prompt left alone, so the server's prompt cache holds).
130+ The tasks are void.
131+
132+ ## How to get "dynamic rules" with mm today
133+ - **One rule (or a theme of rules) = one skill.** `.mm/skills/<rule>/
134+ SKILL.md` with a `name`, a `description` and `keywords` (the front
135+ matter pk's rules would need anyway); the model loads the one a
136+ request needs with `read_skill`. Measured on 4B models this week:
137+ demos/how-to-use-mini-me 25/25 right skills over 16, demos/
138+ memory-skills and memory-skills-2 8/8. Lesson from those demos:
139+ keep an index skill for what no rule covers — otherwise the model
140+ grabs the nearest one and invents (demos/how-to-use-mini-me).
141+ - **Chosen before the turn, without the model:** `skillRouting` — a
142+ decider picks the skill and appends the `$skill` line to the
143+ question (`minConfidence`, `timeout`), i.e. pk's selection step,
144+ with a decision model instead of embeddings.
145+ - **Any selection you want (BM25, grep, keywords, embeddings):** a
146+ `preGeneration` hook reads the question (`prompt` on stdin) and
147+ answers `{"context": "…the rules that apply…"}`, appended to the
148+ question — exactly the "injection next to the question" this
149+ ticket wanted to measure; `displayHooks: true` shows each run (the
150+ `/dyn-directives` of pk). No embedding model in mm itself.
151+ - **The rules that always apply:** `turnReminder` (#230), next to
152+ every question — measured 3/3 against 0/5 from the system prompt
153+ (demos/lfm-coder).
154+ - **The model searches the rules itself:** `docSearch` over a rules
155+ folder (BM25, `search_docs`), `"@agent/rules"` to ship them with
156+ the agent (#156).
157+ - **The static part:** `system` with variables (#253) and AGENTS.md
158+ (`agentsMd`, its `path` can point at any file — used for a memory
159+ file in demos/memory-skills-2).
160+
161+ If a measured case shows these are not enough (a long rule set where
162+ skills and a hook both fail), reopen with that demo.
@@ -1,12 +1,13 @@
1 # Managed by IssueSpec. Hand edits are welcome; keep the schema valid.1 # Managed by IssueSpec. Hand edits are welcome; keep the schema valid.
2 id: 2612 id: 261
3 title: "Dynamic system instructions: inject the relevant rules at each turn (study pk's directives)"3 title: "Dynamic system instructions: inject the relevant rules at each turn (study pk's directives)"
4-state: open4+state: closed
5 author:5 author:
6 name: k33g6 name: k33g
7 email: ph.charriere@gmail.com7 email: ph.charriere@gmail.com
8 createdAt: 2026-11-25T05:15:39.000Z8 createdAt: 2026-11-25T05:15:39.000Z
9-updatedAt: 2026-11-25T05:15:39.000Z9+updatedAt: 2026-11-27T12:00:00.000Z
10+closedAt: 2026-11-27T12:00:00.000Z
10 labels:11 labels:
11 - question12 - question
12 - enhancement13 - enhancement
@@ -77,34 +78,85 @@ body: |
77 tasks:78 tasks:
78 - id: 179 - id: 1
79 title: Read pk's implementation (pkg/directives, internal/agent/directives.go) and its dynamic-golo demo80 title: Read pk's implementation (pkg/directives, internal/agent/directives.go) and its dynamic-golo demo
80- state: open81+ state: closed
81 priority: high82 priority: high
82 author:83 author:
83 name: k33g84 name: k33g
84 email: ph.charriere@gmail.com85 email: ph.charriere@gmail.com
85 createdAt: 2026-11-25T05:15:39.000Z86 createdAt: 2026-11-25T05:15:39.000Z
87+ updatedAt: 2026-11-27T12:00:00.000Z
88+ closedAt: 2026-11-27T12:00:00.000Z
86 - id: 289 - id: 2
87 title: Choose a selection method (BM25, embeddings, decider, keywords) and the injection point (system vs next to the question)90 title: Choose a selection method (BM25, embeddings, decider, keywords) and the injection point (system vs next to the question)
88- state: open91+ state: closed
89 priority: high92 priority: high
90 author:93 author:
91 name: k33g94 name: k33g
92 email: ph.charriere@gmail.com95 email: ph.charriere@gmail.com
93 createdAt: 2026-11-25T05:15:39.000Z96 createdAt: 2026-11-25T05:15:39.000Z
97+ updatedAt: 2026-11-27T12:00:00.000Z
98+ closedAt: 2026-11-27T12:00:00.000Z
94 - id: 399 - id: 3
95 title: Measure on a demo agent with many rules - static vs dynamic, prompt cache cost100 title: Measure on a demo agent with many rules - static vs dynamic, prompt cache cost
96- state: open101+ state: closed
97 priority: medium102 priority: medium
98 author:103 author:
99 name: k33g104 name: k33g
100 email: ph.charriere@gmail.com105 email: ph.charriere@gmail.com
101 createdAt: 2026-11-25T05:15:39.000Z106 createdAt: 2026-11-25T05:15:39.000Z
107+ updatedAt: 2026-11-27T12:00:00.000Z
108+ closedAt: 2026-11-27T12:00:00.000Z
102 - id: 4109 - id: 4
103 title: Decide and write implementation tickets110 title: Decide and write implementation tickets
104- state: open111+ state: closed
105 priority: medium112 priority: medium
106 author:113 author:
107 name: k33g114 name: k33g
108 email: ph.charriere@gmail.com115 email: ph.charriere@gmail.com
109 createdAt: 2026-11-25T05:15:39.000Z116 createdAt: 2026-11-25T05:15:39.000Z
110-comments: []117+ updatedAt: 2026-11-27T12:00:00.000Z
118+ closedAt: 2026-11-27T12:00:00.000Z
119+comments:
120+ - id: 1
121+ author:
122+ name: k33g
123+ email: ph.charriere@gmail.com
124+ createdAt: 2026-11-27T12:00:00.000Z
125+ body: |
126+ Closed (user's decision, 2026-11-27): no new mechanism — what pk's
127+ directives give is already reachable with what mm has, and in the
128+ place the questions of this ticket pointed to (next to the question,
129+ the system prompt left alone, so the server's prompt cache holds).
130+ The tasks are void.
131+
132+ ## How to get "dynamic rules" with mm today
133+ - **One rule (or a theme of rules) = one skill.** `.mm/skills/<rule>/
134+ SKILL.md` with a `name`, a `description` and `keywords` (the front
135+ matter pk's rules would need anyway); the model loads the one a
136+ request needs with `read_skill`. Measured on 4B models this week:
137+ demos/how-to-use-mini-me 25/25 right skills over 16, demos/
138+ memory-skills and memory-skills-2 8/8. Lesson from those demos:
139+ keep an index skill for what no rule covers — otherwise the model
140+ grabs the nearest one and invents (demos/how-to-use-mini-me).
141+ - **Chosen before the turn, without the model:** `skillRouting` — a
142+ decider picks the skill and appends the `$skill` line to the
143+ question (`minConfidence`, `timeout`), i.e. pk's selection step,
144+ with a decision model instead of embeddings.
145+ - **Any selection you want (BM25, grep, keywords, embeddings):** a
146+ `preGeneration` hook reads the question (`prompt` on stdin) and
147+ answers `{"context": "…the rules that apply…"}`, appended to the
148+ question — exactly the "injection next to the question" this
149+ ticket wanted to measure; `displayHooks: true` shows each run (the
150+ `/dyn-directives` of pk). No embedding model in mm itself.
151+ - **The rules that always apply:** `turnReminder` (#230), next to
152+ every question — measured 3/3 against 0/5 from the system prompt
153+ (demos/lfm-coder).
154+ - **The model searches the rules itself:** `docSearch` over a rules
155+ folder (BM25, `search_docs`), `"@agent/rules"` to ship them with
156+ the agent (#156).
157+ - **The static part:** `system` with variables (#253) and AGENTS.md
158+ (`agentsMd`, its `path` can point at any file — used for a memory
159+ file in demos/memory-skills-2).
160+
161+ If a measured case shows these are not enough (a long rule set where
162+ skills and a hook both fail), reopen with that demo.