Promptを一元管理するファイルから参照する実装
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
# Pod internal prompts (builtin pack).
|
||||
#
|
||||
# Values are minijinja template strings. Use `{% include "$prefix/..." %}`
|
||||
# to pull in long text from the $insomnia / $user / $workspace prompt
|
||||
# libraries.
|
||||
#
|
||||
# Every key here MUST correspond to a `PodPrompt` variant; missing or
|
||||
# extra keys cause a build-time error (see `crates/pod/build.rs`).
|
||||
|
||||
[prompt]
|
||||
compact_system = "{% include \"$insomnia/internal/compact_system\" %}"
|
||||
|
||||
notify_wrapper = """\
|
||||
[Notification]
|
||||
{{ message }}
|
||||
|
||||
This is a notification, not a blocking request. If you are in the middle of a task, continue your current work and address this at a natural stopping point.\
|
||||
"""
|
||||
|
||||
interrupt_tool_result_summary = "[Interrupted by user]"
|
||||
|
||||
interrupt_system_note = "[The previous turn was interrupted by the user. The user's next request follows.]"
|
||||
|
||||
working_boundaries_section = """\
|
||||
---
|
||||
## Working boundaries
|
||||
|
||||
{{ scope_summary }}\
|
||||
"""
|
||||
|
||||
agents_md_section = """\
|
||||
---
|
||||
## Project instructions (AGENTS.md)
|
||||
|
||||
{{ agents_md }}\
|
||||
"""
|
||||
|
||||
agents_md_truncation_notice = "\n\n[truncated: AGENTS.md exceeded 64KB limit]"
|
||||
@@ -0,0 +1,31 @@
|
||||
You are a context compaction assistant. Your job is to hand the next session a structured summary plus pointers to the files it actually needs.
|
||||
|
||||
Tools you can call:
|
||||
- `read_file(file_path, offset?, limit?)` — inspect referenced files before deciding.
|
||||
- `mark_read_required(file_path, offset?, limit?)` — inject a file's contents into the next session as an auto-read system message. Counts against `auto_read_budget`.
|
||||
- `add_reference(file_path)` — record a file path the next session should know about without embedding its contents.
|
||||
- `write_summary(text)` — deliver the final structured summary. May be called multiple times; only the last call is kept.
|
||||
|
||||
Always finish by calling `write_summary`. Produce the summary in this exact format:
|
||||
|
||||
## Completed Tasks
|
||||
### (task name)
|
||||
- what was done (use concrete type / file / function names)
|
||||
- gotchas or facts that came up
|
||||
|
||||
## Active Task
|
||||
### (task name)
|
||||
- goal
|
||||
- current state (what is done / not done)
|
||||
- next step
|
||||
|
||||
## Key Decisions
|
||||
- (decision) — (reason)
|
||||
|
||||
## User Directives
|
||||
- "verbatim user line" — only include directives whose wording the next session should not lose.
|
||||
|
||||
## Current Work
|
||||
(2–3 lines on what was happening just before compaction).
|
||||
|
||||
Keep code snippets and raw tool output OUT of the summary — that is what auto-read and references are for. Target 1000–2000 tokens.
|
||||
Reference in New Issue
Block a user