Compare commits

...

4 Commits

Author SHA1 Message Date
Zuxin Liu
0bc0613b57 update read path 2026-02-13 10:28:30 -08:00
Zuxin Liu
04c26834af add citation 2026-02-12 18:51:02 -08:00
Zuxin Liu
295817d3b2 Decision boundary change 2026-02-12 18:50:49 -08:00
Zuxin Liu
1f39b57c13 hack: relax memory startup limits 2026-02-12 15:54:27 -08:00
2 changed files with 25 additions and 13 deletions

View File

@@ -29,9 +29,9 @@ mod phase_one {
/// Prompt used for phase 1.
pub(super) const PROMPT: &str = include_str!("../../templates/memories/stage_one_system.md");
/// Maximum number of rollout candidates processed per startup pass.
pub(super) const MAX_ROLLOUTS_PER_STARTUP: usize = 8;
pub(super) const MAX_ROLLOUTS_PER_STARTUP: usize = 128;
/// Concurrency cap for startup memory extraction and consolidation scheduling.
pub(super) const CONCURRENCY_LIMIT: usize = 8;
pub(super) const CONCURRENCY_LIMIT: usize = 64;
/// Fallback stage-1 rollout truncation limit (tokens) when model metadata
/// does not include a valid context window.
pub(super) const DEFAULT_STAGE_ONE_ROLLOUT_TOKEN_LIMIT: usize = 150_000;
@@ -45,7 +45,7 @@ mod phase_one {
/// framing, and model output.
pub(super) const CONTEXT_WINDOW_PERCENT: i64 = 70;
/// Maximum rollout age considered for phase-1 extraction.
pub(super) const MAX_ROLLOUT_AGE_DAYS: i64 = 30;
pub(super) const MAX_ROLLOUT_AGE_DAYS: i64 = 90;
/// Minimum rollout idle time required before phase-1 extraction.
pub(super) const MIN_ROLLOUT_IDLE_HOURS: i64 = 12;
/// Lease duration (seconds) for phase-1 job ownership.

View File

@@ -1,12 +1,14 @@
## Memory
You have access to a memory folder with guidance from prior runs. It can save time and help you stay consistent,
but it's optional: use it whenever it's likely to help.
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's likely to help.
Decision boundary: should you use memory for the new user query?
- You can SKIP memory when the new user query is trivial (e.g. a one-liner change, chit chat, simple formatting, a quick lookup)
or clearly unrelated to this workspace / prior runs / memory summary below.
- You SHOULD do a quick memory pass when the new user query is ambiguous and relevant to the memory summary below, or when consistency with prior decisions/conventions matters.
Decision boundary: should you use memory for a new user query?
- You may skip memory when the new query is trivial (e.g., a one-line change, chit-chat,
simple formatting) or clearly unrelated to this workspace or the memory summary below.
- You SHOULD do a quick memory pass when the new query is ambiguous and likely relevant to
the memory summary below, or when consistency with prior decisions/conventions matters.
Especially if the user asks about a specific repo/module/code path that seems relevant,
skim/search the relevant memory files first before diving into the repo.
Memory layout (general -> specific):
- {{ base_path }}/memory_summary.md (already provided below; do NOT open again)
@@ -25,12 +27,22 @@ Quick memory pass (when applicable):
4) If nothing relevant turns up, proceed normally without memory.
During execution: if you hit repeated errors, confusing behavior, or you suspect there's relevant prior context,
it's worth redoing the quick memory pass. Treat memory as guidance, not truth: if memory conflicts with the current repo state,
tool outputs, or environment, user feedback, the current state wins. If you discover stale or misleading guidance, update the
memory files accordingly.
it's worth redoing the quick memory pass.
When to update memory:
- Treat memory as guidance, not truth: if memory conflicts with the current repo state, tool outputs, or environment, user feedback, the current state wins. If you discover stale or misleading guidance, update the memory files accordingly.
- When user explicitly asks you to remember something or update the memory, you should revise the files accordingly. Usually you should directly update memory_summary.md (such as general tips and user profile section) and MEMORY.md.
Memory citation requirements:
- If ANY relevant memory files were used: you must output exactly one final line:
Memory used: `<file1>:<line_start>-<line_end>`, `<file2>:<line_start>-<line_end>`, ...
- Never include memory citations inside the pull-request message itself.
- Never cite blank lines; double-check ranges.
- Append these at the VERY END of the final reply; last line only
- If user ask you do not output citations, you shouldn't do it.
========= MEMORY_SUMMARY BEGINS =========
{{ memory_summary }}
========= MEMORY_SUMMARY ENDS =========
If memory is relevant for a new user query, start with the quick memory pass above.
If memory seems to be relevant for a new user query, always start with the quick memory pass above.