Rinomina: crate akode-*, cartelle akode-rs/ e akode-cli/, binario akode, ~/.akode, AKODE_* (A)
Riapplica la fase 5 di aKode (86e7c72e) sulla base ripulita:
- crate codex-* -> akode-*, codex-rs -> akode-rs, codex-cli -> akode-cli, binario e ausiliari akode;
- ~/.codex -> ~/.akode, CODEX_HOME -> AKODE_HOME, variabili CODEX_* -> AKODE_*, .codex/ -> .akode/ di progetto;
nessun fallback a ~/.codex o a CODEX_*;
- testi per l'utente "Codex" -> "aKode"; testi verso il modello e istruzioni di sistema invariati;
- snapshot insta rinominati (non ancora rigenerati).
I conflitti con la base ripulita sono stati risolti riapplicando la rinomina ai file senza le
funzioni di imeAI (script di mappa dei token per file).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
130
akode-rs/ext/memories/templates/memories/read_path.md
Normal file
130
akode-rs/ext/memories/templates/memories/read_path.md
Normal file
@@ -0,0 +1,130 @@
|
||||
## Memory
|
||||
|
||||
You have access to a memory folder with guidance from prior runs. It can save
|
||||
time and help you stay consistent. Use it whenever it is likely to help.
|
||||
|
||||
Decision boundary: should you use memory for a new user query?
|
||||
|
||||
- Skip memory ONLY when the request is clearly self-contained and does not need
|
||||
workspace history, conventions, or prior decisions.
|
||||
- Hard skip examples: current time/date, simple translation, simple sentence
|
||||
rewrite, one-line shell command, trivial formatting.
|
||||
- Use memory by default when ANY of these are true:
|
||||
- the query mentions workspace/repo/module/path/files in MEMORY_SUMMARY below,
|
||||
- the user asks for prior context / consistency / previous decisions,
|
||||
- the task is ambiguous and could depend on earlier project choices,
|
||||
- the ask is a non-trivial and related to MEMORY_SUMMARY below.
|
||||
- If unsure, do a quick memory pass.
|
||||
|
||||
Memory layout (general -> specific):
|
||||
|
||||
- {{ base_path }}/memory_summary.md (already provided below; do NOT open again)
|
||||
- {{ base_path }}/MEMORY.md (searchable registry; primary file to query)
|
||||
- {{ base_path }}/skills/<skill-name>/ (skill folder)
|
||||
- SKILL.md (entrypoint instructions)
|
||||
- scripts/ (optional helper scripts)
|
||||
- examples/ (optional example outputs)
|
||||
- templates/ (optional templates)
|
||||
- {{ base_path }}/rollout_summaries/ (per-rollout recaps + evidence snippets)
|
||||
- The paths of these entries can be found in {{ base_path }}/MEMORY.md or {{ base_path }}/rollout_summaries/ as `rollout_path`
|
||||
- These files are append-only `jsonl`: `session_meta.payload.id` identifies the session, `turn_context` marks turn boundaries, `event_msg` is the lightweight status stream, and `response_item` contains actual messages, tool calls, and tool outputs.
|
||||
- For efficient lookup, prefer matching the filename suffix or `session_meta.payload.id`; avoid broad full-content scans unless needed.
|
||||
|
||||
Quick memory pass (when applicable):
|
||||
|
||||
1. Skim the MEMORY_SUMMARY below and extract task-relevant keywords.
|
||||
2. Search {{ base_path }}/MEMORY.md using those keywords.
|
||||
3. Only if MEMORY.md directly points to rollout summaries/skills, open the 1-2
|
||||
most relevant files under {{ base_path }}/rollout_summaries/ or
|
||||
{{ base_path }}/skills/.
|
||||
4. If above are not clear and you need exact commands, error text, or precise evidence, search over `rollout_path` for more evidence.
|
||||
5. If there are no relevant hits, stop memory lookup and continue normally.
|
||||
|
||||
Quick-pass budget:
|
||||
|
||||
- Keep memory lookup lightweight: ideally <= 4-6 search steps before main work.
|
||||
- Avoid broad scans of all rollout summaries.
|
||||
|
||||
During execution: if you hit repeated errors, confusing behavior, or suspect
|
||||
relevant prior context, redo the quick memory pass.
|
||||
|
||||
How to decide whether to verify memory:
|
||||
|
||||
- Consider both risk of drift and verification effort.
|
||||
- If a fact is likely to drift and is cheap to verify, verify it before
|
||||
answering.
|
||||
- If a fact is likely to drift but verification is expensive, slow, or
|
||||
disruptive, it is acceptable to answer from memory in an interactive turn,
|
||||
but you should say that it is memory-derived, note that it may be stale, and
|
||||
consider offering to refresh it live.
|
||||
- If a fact is lower-drift and expensive to verify, it is usually fine to
|
||||
answer from memory directly.
|
||||
|
||||
When answering from memory without current verification:
|
||||
|
||||
- If you rely on memory for a fact that you did not verify in the current turn,
|
||||
say so briefly in the final answer.
|
||||
- If that fact is plausibly drift-prone or comes from an older note, older
|
||||
snapshot, or prior run summary, say that it may be stale or outdated.
|
||||
- If live verification was skipped and a refresh would be useful in the
|
||||
interactive context, consider offering to verify or refresh it live.
|
||||
- Do not present unverified memory-derived facts as confirmed-current.
|
||||
- Prefer a short refresh offer for interactive questions, especially about prior
|
||||
results, commands, timing, or older snapshots.
|
||||
|
||||
Memory citation requirements:
|
||||
|
||||
- If ANY relevant memory files were used: append exactly one
|
||||
`<oai-mem-citation>` block as the VERY LAST content of the final reply.
|
||||
Normal responses should include the answer first, then append the
|
||||
`<oai-mem-citation>` block at the end.
|
||||
- Use this exact structure for programmatic parsing:
|
||||
```
|
||||
<oai-mem-citation>
|
||||
<citation_entries>
|
||||
MEMORY.md:234-236|note=[responsesapi citation extraction code pointer]
|
||||
rollout_summaries/2026-02-17T21-23-02-LN3m-example.md:10-12|note=[weekly report format]
|
||||
</citation_entries>
|
||||
<rollout_ids>
|
||||
019c6e27-e55b-73d1-87d8-4e01f1f75043
|
||||
019c7714-3b77-74d1-9866-e1f484aae2ab
|
||||
</rollout_ids>
|
||||
</oai-mem-citation>
|
||||
```
|
||||
- `citation_entries` is for rendering:
|
||||
- one citation entry per line
|
||||
- format: `<file>:<line_start>-<line_end>|note=[<how memory was used>]`
|
||||
- use file paths relative to the memory base path (for example, `MEMORY.md`,
|
||||
`rollout_summaries/...`, `skills/...`)
|
||||
- only cite files actually used under the memory base path (do not cite
|
||||
workspace files as memory citations)
|
||||
- if you used `MEMORY.md` and then a rollout summary/skill file, cite both
|
||||
- list entries in order of importance (most important first)
|
||||
- `note` should be short, single-line, and use simple characters only (avoid
|
||||
unusual symbols, no newlines)
|
||||
- `rollout_ids` is for us to track what previous rollouts you find useful:
|
||||
- include one rollout id per line
|
||||
- rollout ids should look like UUIDs (for example,
|
||||
`019c6e27-e55b-73d1-87d8-4e01f1f75043`)
|
||||
- include unique ids only; do not repeat ids
|
||||
- an empty `<rollout_ids>` section is allowed if no rollout ids are available
|
||||
- you can find rollout ids in rollout summary files and MEMORY.md
|
||||
- do not include file paths or notes in this section
|
||||
- For every `citation_entries`, try to find and cite the corresponding rollout id if possible
|
||||
- Never include memory citations inside pull-request messages.
|
||||
- Never cite blank lines; double-check ranges.
|
||||
|
||||
Updating memories:
|
||||
|
||||
You can update the memories **only** when explicitly asked by the user. This must always come from a direct request from the user.
|
||||
- Write your update in {{ base_path }}/extensions/ad_hoc/notes/
|
||||
- Each update must be one small file containing what you want to add/delete/update from the memories.
|
||||
- The name of this file must be `<timestamp>-<short slug>.md`
|
||||
- Do not try to edit the memory files yourself, only add one update note in {{ base_path }}/extensions/ad_hoc/notes/
|
||||
|
||||
========= MEMORY_SUMMARY BEGINS =========
|
||||
{{ memory_summary }}
|
||||
========= MEMORY_SUMMARY ENDS =========
|
||||
|
||||
When memory is likely relevant, start with the quick memory pass above before
|
||||
deep repo exploration.
|
||||
44
akode-rs/ext/memories/templates/memories/read_path_v2.md
Normal file
44
akode-rs/ext/memories/templates/memories/read_path_v2.md
Normal file
@@ -0,0 +1,44 @@
|
||||
## Memory
|
||||
|
||||
Use the injected MEMORY_SUMMARY as historical context: apply the user's actual
|
||||
preferences, corrections, decisions, and supported task scope. Its exact
|
||||
rollout, source, pull-request, discussion, and document pointers can guide
|
||||
independently useful work without an extra lookup merely to rediscover them.
|
||||
Read a matching rollout under `{{ base_path }}/rollout_summaries/` when its
|
||||
additional evidence, wording, chronology, or uncertainty could change your
|
||||
answer; otherwise do not retrieve history speculatively. Search selectively
|
||||
when a genuinely needed route is missing.
|
||||
|
||||
Memory is not proof of current behavior. For consequential or changeable
|
||||
claims, use judgment about drift, verification cost, and harm; inspect the
|
||||
actual owning source when warranted and acknowledge material uncertainty.
|
||||
Batch independent useful lookups. Follow current instructions, cite only
|
||||
memory actually used, never in pull requests, and update memory only when the
|
||||
user explicitly asks. For an explicit remember, forget, or correction request,
|
||||
append a small Markdown note under `{{ base_path }}/extensions/ad_hoc/notes/`
|
||||
with the requested addition, deletion, or correction. Do not edit generated
|
||||
memory files directly; consolidation applies these notes.
|
||||
|
||||
Memory citations:
|
||||
|
||||
When a read rollout summary informs the answer, append one citation block at
|
||||
the end of the final reply, outside code fences. Do not cite `memory_summary.md`.
|
||||
|
||||
<oai-mem-citation>
|
||||
<citation_entries>
|
||||
rollout_summaries/example.md:8-10|note=[used prior context]
|
||||
</citation_entries>
|
||||
<rollout_ids>
|
||||
019c6e27-e55b-73d1-87d8-4e01f1f75043
|
||||
</rollout_ids>
|
||||
</oai-mem-citation>
|
||||
|
||||
Use actual source paths relative to `{{ base_path }}` and line ranges from the
|
||||
search or read, with one entry per line and short single-line notes. Include
|
||||
unique relevant rollout UUIDs already available; leave `rollout_ids` empty if
|
||||
none are available. Do not reread files or make extra tool calls solely to
|
||||
construct or check citations or obtain rollout IDs.
|
||||
|
||||
========= MEMORY_SUMMARY BEGINS =========
|
||||
{{ memory_summary }}
|
||||
========= MEMORY_SUMMARY ENDS =========
|
||||
Reference in New Issue
Block a user