Documentation
¶
Overview ¶
Package reminder 提供 Coordinator 的每轮 system-reminder 生成逻辑。
设计原则(对应 docs/refactor-v2.md 铁律二):
- 纯函数:每个 Generator 只读 store 状态,不产生副作用
- 原子语义:单条 reminder 只回答"一个问题",避免一条 reminder 承担多职责
- 成本敏感:reminder 只在确有指引价值时生成,空字符串直接跳过
工具链:agentcore.ReminderGenerator 会在每 turn 调用 Generate; 最终 reminder 作为一次性 system 消息注入到 LLM 请求里。
Index ¶
- func Aggregate(st *store.Store, gens ...Generator) agentcore.ReminderGenerator
- func NewArchitectStopGuard(st *store.Store) agentcore.StopGuard
- func NewEditorStopGuard(st *store.Store) agentcore.StopGuard
- func NewStopGuard(st *store.Store, onBlock func(reason string, consecutive int32)) agentcore.StopGuard
- func NewWriterStopGuard(st *store.Store) agentcore.StopGuard
- type Generator
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Aggregate ¶
func Aggregate(st *store.Store, gens ...Generator) agentcore.ReminderGenerator
Aggregate 把一组 Generator 组合成 agentcore.ReminderGenerator。 每 turn 先拉 store 快照,再按注册顺序逐个询问,相同 Source 后覆盖先。
func NewArchitectStopGuard ¶
NewArchitectStopGuard 要求 architect 本轮至少落盘一次 save_foundation。
func NewEditorStopGuard ¶
NewEditorStopGuard 要求 editor 本轮至少落盘一次审阅或摘要。
Types ¶
type State ¶
type State struct {
Progress *domain.Progress
// LatestGlobalCheckpoint 是最近一次全局级 checkpoint,用于感知弧/卷结束、重写完成等事件。
LatestGlobalCheckpoint *domain.Checkpoint
// ArcHandoffPending 为 true 表示当前弧已全部写完但 arc_summary 尚未归档,
// 此时 Coordinator 必须先按 coordinator.md 的弧结束流程交接,再派写下一章。
ArcHandoffPending bool
// FoundationMissing 是基础设定中尚缺的项(premise/outline/characters/world_rules/compass)。
FoundationMissing []string
TurnIndex int
}
State 是 Generator 在本轮可读的 store 快照。 快照在每 turn 开头一次性拉取,避免每个 Generator 都独立读 store。
Click to show internal directories.
Click to hide internal directories.