Skip to content

docs(openspec): 收敛可删除 Quote 与缓存 MVP - #74

Open
hifizz wants to merge 86 commits into
codex/feat-agent-observability-evaluationfrom
codex/design-message-quotes-cache-friendly-prompt-v2
Open

docs(openspec): 收敛可删除 Quote 与缓存 MVP#74
hifizz wants to merge 86 commits into
codex/feat-agent-observability-evaluationfrom
codex/design-message-quotes-cache-friendly-prompt-v2

Conversation

@hifizz

@hifizz hifizz commented Sep 2, 2026

Copy link
Copy Markdown
Owner

目标

从 PR #49 的 Base codex/feat-agent-observability-evaluation@2f3024747ddb72e1e69aa916cb45addb7140f6ab 单独建立纯文档方案,不复用 #49 的实现。先把 Quote/Fork 的基础模型定对,再进入实现。

核心决定

  • Quote 是 User Message parts 中可选、可删除的 data-quote,不建 Quote 表。
  • 划选后 Fork 只在 Child Composer 预填一份 Quote;用户发送前或编辑时都可以删除。
  • Message Parts 是 Quote 是否存在的唯一依据;Send/Prompt Compiler 不得从 Thread 字段自动补回。
  • Child 的父子关系、来源导航和 forkContext 不依赖 Quote,删除 Quote 不修改它们。
  • Quote V1 只保存 text、可选 comment、最小 Message/Artifact 来源和 TextAnchor;没有 Quote ID、创建入口类型、Project/Thread ID。
  • 模型只看到 text + comment,不看到来源 ID、Anchor 或 Schema 版本。
  • Edit 继续使用 replacesMessageId/supersededAt;V1 Quote 的只读字段与旧 Part 一一对应,旧 {text} Quote 可原样保留/排序/删除。
  • 空 Fork 不创建 Message、不调用模型;总体问题文本为空时,Quote 草稿本身不触发生成。
  • 移除 Child 专属 6000 字符历史截断;完整压缩方案后续单独设计。
  • 缓存可以先启用,但不得改变 Prompt 语义、工具权限、强制工具行为或推理设置。

Quote Schema

详见 design.md。核心形状:

interface ThreadQuoteDataV1 {
  schemaVersion: "thread-quote-v1"
  text: string
  comment?: string
  source:
    | { type: "message"; messageId: string; anchor: TextAnchor }
    | {
        type: "artifact"
        messageId: string
        artifactId: string
        anchor: TextAnchor
      }
}

后续收敛

docs/prompt-cache/roadmap.md 将后续拆成固定生成模式、每轮 PDF 检索结果冻结、统一长上下文处理和逐步观测,避免再次形成一个混杂的大改造。

“从 A11 直接点击分叉、完全不带 Quote”的具体 UI/API/数据库调整不在本 PR;当前模型只保证它未来不需要改变 Quote 领域合同。

范围

本 PR 只新增 6 份文档,不修改运行代码、数据库或现有 OpenSpec。

验证

  • OPENSPEC_TELEMETRY=0 npx --yes @fission-ai/openspec@1.5.0 validate --all --strict
  • 结果:1 passed, 0 failed

@vercel

vercel Bot commented Sep 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
thread-chatbot Error Error Sep 2, 2026 5:19pm UTC

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: ddb9efb2-dc09-4698-9593-df8f3762f87d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

hifizz and others added 27 commits September 3, 2026 01:12
hifizz and others added 29 commits September 3, 2026 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant