Deploy Poimen Memory K8s cluster with ArgoCD tracking (M2.2, M3.5-M3.7)
ci / markdown (push) Waiting to run
ci / markdown (push) Waiting to run
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|---|---|
|
||||
| Phase | M1 — Gated loop at L1 |
|
||||
| Size | M — 1–3 days |
|
||||
| Status | ⬜ Not started |
|
||||
| Status | ✅ Done |
|
||||
| Flags | — |
|
||||
| Spec | inlined below |
|
||||
| Blocks | M1.2 |
|
||||
@@ -14,6 +14,30 @@
|
||||
Assemble the memory-agent prompt exactly as the paper specifies, because the
|
||||
model's ability to emit parseable gates depends on the format it was aligned to.
|
||||
|
||||
## Files
|
||||
|
||||
| Action | Path |
|
||||
|---|---|
|
||||
| Create | `crates/mem-core/src/prompt.rs` — `PromptBuilder` struct |
|
||||
| Modify | `crates/mem-core/src/lib.rs` — add `pub mod prompt;` |
|
||||
| Create | `templates/gru-mem.txt` — the prompt template (verbatim from paper Fig 10a) |
|
||||
| Create | `fixtures/expected/prompt-t1.txt` — golden file for turn 1 |
|
||||
| Create | `fixtures/expected/prompt-tn.txt` — golden file for turn N |
|
||||
| Create | `tests/it_prompt.rs` — integration tests (workspace root) |
|
||||
|
||||
## Dependencies
|
||||
|
||||
**None new.** No template engine — the prompt has 3 substitutions (`{prompt}`,
|
||||
`{memory}`, `{chunk}`). Use `str::replace()` or `format!()`. Adding `tera` for
|
||||
3 variables is overengineering.
|
||||
|
||||
## Existing code to reuse
|
||||
|
||||
- `Chunk` from `domain.rs` — render its `records` vec
|
||||
- `Role` from `domain.rs` — map to `[User]`, `[Assistant]`, `[ToolResult]`, `[System]` labels
|
||||
- `Query` from `query.rs` (M1.2) — read `query.question` for the `{prompt}` substitution
|
||||
- `TokenCounter` from `mem-chunk` — check assembled prompt fits budget
|
||||
|
||||
## Facts (inlined — no spec read needed)
|
||||
|
||||
Paper Figure 10a, reproduced verbatim — this is the contract, not a starting
|
||||
@@ -98,7 +122,7 @@ change to the contract.
|
||||
7. `a7_budget_headroom` — for the real fixture corpus, assert every assembled
|
||||
prompt is under 32768 minus 2048.
|
||||
|
||||
**Command:** `cargo test -p mem-core prompt`
|
||||
**Command:** `cargo test --test it_prompt`
|
||||
|
||||
**False pass:**
|
||||
- Asserting the prompt "contains" the question. A template that dropped the
|
||||
|
||||
Reference in New Issue
Block a user