iomgaa
|
dea8a7d3f6
|
feat(question_gen): load_benchmark — benchmark JSON 加载
从 JSON 目录 glob *.json 加载题目,stem 作 video_id。
legacy schema 无 difficulty 字段时赋 _LEGACY_DEFAULT_DIFFICULTY 常量。
options/source_nodes 转 tuple 配合 frozen dataclass。
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-07 04:41:25 -04:00 |
|
iomgaa
|
eea3bcba3f
|
feat(core): 追加 GeneratedQuestion frozen dataclass
跨层共享类型,被 core/evolution/ 和 app/harness/、app/question_gen/ 使用。
frozen=True + tuple 字段确保不可变。无默认值(显式传入)。
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-07 04:36:56 -04:00 |
|
iomgaa
|
4686adf266
|
feat(tree/repair): 检测器扩展 — visible_entities/ongoing_actions/spatial_layout 为空也触发修复
|
2026-07-07 03:15:42 -04:00 |
|
iomgaa
|
ee5bd0de57
|
fix(tools): handle None card in flat tree conversion
|
2026-07-07 03:13:38 -04:00 |
|
iomgaa
|
73b240cc84
|
test(tree): 建树模块端到端集成测试
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-07 02:44:28 -04:00 |
|
iomgaa
|
18971a794b
|
feat(tree/repair): Q&A 反向补全 — 从 TRM4 supplement 迁移
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-07 02:37:50 -04:00 |
|
iomgaa
|
edaa0d8290
|
feat(tree): VideoTreeBuilder 保真 #1 #2 #3 + 复杂度重构
- 从 reference/video_tree_trm/video_tree_builder.py (994行) 迁移
- 保真算法 #1: L2 轴心建树策略 (asyncio.gather 链式并发)
- 保真算法 #2: VLM 批量帧描述 + JSON fallback (_L3_BATCH_SIZE=5)
- 保真算法 #3: 断点续跑 (progress.json + L1 中间 JSON)
- 新增: VLMProvider/LLMProvider Protocol 替代 LLMClient
- 新增: 结构化 JSON 输出 → L1Card/L2Card/L3Card
- 新增: L2 代表帧复用 L3 帧 (_sample_representative_frames)
- 新增: 字幕注入 + Voronoi 分配
- 重构: 提取 _load_resume_state/_assemble_roots 降低 _build_async 复杂度 D(21)→C(14)
- 44 个单元测试全部通过
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-07 02:17:50 -04:00 |
|
iomgaa
|
12f20493c1
|
feat(tree): 质量校验 — 交叉验证 entities/visible_text
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-07 01:57:32 -04:00 |
|
iomgaa
|
fb6f9964d8
|
feat(tree): 字幕模块 — SRT 解析 + 完整性检查 + Voronoi 分配
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-07 01:54:09 -04:00 |
|
iomgaa
|
e3b027ce34
|
feat(adapters): GovernedVLMClient — VLMProvider 最小可用实现
- 包装 GovernedLLMClient,注入 base64 图片到 OpenAI Vision API 格式
- 复用 LLM 治理栈全部能力(熔断、缓存、重试、遥测)
- 8 项单元测试覆盖协议满足、图片编码、注入逻辑、不可变性
|
2026-07-07 01:49:55 -04:00 |
|
iomgaa
|
c1680447c0
|
feat(adapters): EmbeddingProvider Protocol + local/remote 双后端实现
- app/ports.py: 添加 EmbeddingProvider Protocol(runtime_checkable,dim 属性 + embed 方法)
- adapters/embedding.py: 从参考代码迁移,拆分为 LocalEmbeddingProvider 和 RemoteEmbeddingProvider
- Local: sentence-transformers 冻结推理,维度校验
- Remote: OpenAI 兼容 API,L2 归一化,按 index 排序
- 两者均提供 embed() 和 embed_tensor() 统一接口
- tests/unit/test_embedding_adapter.py: Protocol 满足性、形状校验、导入测试
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-07 01:45:09 -04:00 |
|
iomgaa
|
547c9ddd84
|
feat(tree): TreeConfig 配置 dataclass
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-07 01:41:50 -04:00 |
|
iomgaa
|
e0f7851975
|
fix(tree): from_dict 增加 ID 唯一性校验
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-07 01:40:46 -04:00 |
|
iomgaa
|
c136de076d
|
refactor(tree): extract _embed_l2_subtree to reduce embed_all complexity
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-07 01:37:09 -04:00 |
|
iomgaa
|
22ad014973
|
feat(tree): TreeIndex 数据结构 — Card 体系 + 节点 + 序列化
- 新增三级 frozen Card dataclass: L3Card(6字段), L2Card(7字段), L1Card(7字段)
- 节点重构: L3Node/L2Node/L1Node 使用 Card 替代原始字符串字段
- 添加 @property 兼容层: description/summary 代理到 Card 字段
- L3Node 新增 subtitle 字段(字幕集成预留)
- JSON 序列化/反序列化支持 Card 结构 + embedding base64 编解码
- load_json 新增 ID 唯一性校验(重复 ID 抛 ValueError)
- 移除 pickle 序列化(仅保留 JSON)
- 日志从 log_msg 迁移到 loguru
- 17 个单元测试全部通过
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-07 01:35:10 -04:00 |
|
iomgaa
|
2be2569ed8
|
docs(tree): add tree module vertical slice design and implementation plan
|
2026-07-07 01:27:36 -04:00 |
|
iomgaa
|
c2ba3ed591
|
chore: lint 修复(TC001/TC003 类型导入优化)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 23:15:06 -04:00 |
|
iomgaa
|
dc6f8e047e
|
test: AgentLoop + GovernedLLMClient 集成测试
验证 core/agent/ 通过 LLMProvider Protocol 与 adapters/ 端到端协作。
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 23:13:59 -04:00 |
|
iomgaa
|
ee90fb8e88
|
fix(adapters): 修复 GovernedLLMClient 流式消费和规格偏差
- _stream_request + _consume_stream 合并为 _call_streaming,
在 async with self._http.stream() 内直接消费流,
确保看门狗作用于真实 HTTP 流而非内存列表(Critical 1)
- breaker 检查移到 call_id 生成之前(Critical 2)
- cache/ttft_timeout_s/inter_token_timeout_s 支持 None(Important 1)
- 重试失败路径遥测使用统一 call_id(Important 2)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 23:08:52 -04:00 |
|
iomgaa
|
cfd3277f80
|
style: format adapters/llm.py
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 23:01:06 -04:00 |
|
iomgaa
|
f1a0414be8
|
feat(adapters): 实现 GovernedLLMClient 四层治理栈
流式 SSE + 三层看门狗 + 重试退避 + 熔断 + Redis 缓存 + 遥测。
provider 差异处理(DeepSeek reasoning_content vs Qwen think 标签)。
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 23:00:22 -04:00 |
|
iomgaa
|
30aec373c8
|
fix(core/agent): 移除 max_steps 默认值
设计要求调用方显式传入 max_steps(P4: 显式优于隐式)。
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 22:53:05 -04:00 |
|
iomgaa
|
9ca9035190
|
feat(core/agent): 实现 AgentLoop 推理循环引擎
保真 TRM4 算法 #11: json_repair 兜底、submit_answer 终止、
pluggy hook 生命周期、无效工具不计步。
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 22:43:22 -04:00 |
|
iomgaa
|
c2ff2855b7
|
feat(adapters): 实现三层流式看门狗
TTFT / inter_token / total 超时保护。
参考 CHSAnalyzer2 streaming.py。
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 22:43:01 -04:00 |
|
iomgaa
|
82f065e4ef
|
feat(adapters): 实现 SQLiteTelemetryRecorder
asyncio.to_thread 桥接 SQLite,字段与 TelemetryRecorder Protocol 一一对应。
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 22:40:15 -04:00 |
|
iomgaa
|
14bb60e918
|
feat(adapters): 实现 CircuitBreaker 内存级熔断器
注入 now 纯确定性,force_open 支持 401/403 直接熔断。
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 22:39:57 -04:00 |
|
iomgaa
|
9dae7dda98
|
feat(adapters): 实现 RedisResponseCache
content-addressed sha256 缓存键,Redis 不可用时静默降级。
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 22:39:42 -04:00 |
|
iomgaa
|
d79d67b1d3
|
feat(core/agent): 添加 ToolDispatcher Protocol 和 AgentLoopSpec hookspec
ToolDispatcher async + context 参数。AgentLoopSpec 四个 async 生命周期 hook。
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 22:36:31 -04:00 |
|
iomgaa
|
112111408e
|
feat(core): 添加共享 Protocol 端口
LLMProvider / VLMProvider / TelemetryRecorder,全部 runtime_checkable。
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 22:36:23 -04:00 |
|
iomgaa
|
70320d7cfa
|
feat(core): 添加 LLMResponse frozen dataclass
含 content/thinking/ttft_ms/max_inter_token_ms/call_id 等 11 个字段。
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 22:33:48 -04:00 |
|
iomgaa
|
9340c5e0f8
|
feat(core/agent): 添加 Step 和 LoopResult 数据类
保真 TRM4 算法 #11,Step 新增 call_id 字段。
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 22:32:59 -04:00 |
|
iomgaa
|
6b7c28ea1e
|
docs: 同步 core/protocols.py 分层、四层治理栈、遥测新字段
ARCHITECTURE.md §2.3/§2.4/§3.1/§4/§5 + CLAUDE.md §4.8/§4.9/§5 + .env.example
对应设计 research-wiki/designs/2026-07-06-core-agent-adapters-llm-design.md §8
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 22:30:16 -04:00 |
|
iomgaa
|
bc78138d8f
|
plan: core/agent/ + adapters/llm 实现计划(14 Tasks)
Self-Review + Codex 审查通过。修复:依赖前置、治理栈顺序统一、
GovernedLLMClient 补充异常/provider/parent_call_id 测试、ARQ 残留清理。
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 22:25:48 -04:00 |
|
iomgaa
|
f541c4047a
|
design: core/agent/ + adapters/llm 基础设施设计
全异步 AgentLoop + 四层治理栈(超时→重试→熔断→缓存)+ 流式三层看门狗。
LLMProvider/VLMProvider/TelemetryRecorder 上提到 core/protocols.py 作为共享端口。
经 Codex 独立审查,修复 7 项发现(含缓存遥测、inter_token 指标、json_repair 依赖等)。
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 22:06:48 -04:00 |
|
iomgaa
|
9bc9bf2425
|
docs: update CLAUDE.md — AAAI 2026 target, conda activate, tmux logging
|
2026-07-06 21:02:06 -04:00 |
|
iomgaa
|
6bdb802f01
|
chore: track claude skills, tools, templates, reference code and research-wiki
- Add all claude skills (brainstorming, commit, debugging, TDD, etc.)
- Add claude hooks (pre-commit-guard, post-edit-quality)
- Add research templates (experiment plan, research brief, etc.)
- Add claude tools (arxiv/semantic_scholar/openalex fetch, wiki, exa)
- Add TRM4 reference implementation as algorithm fidelity baseline
- Add research-wiki content (plans, index, graph, query_pack)
- Update .gitignore to exclude .graphify_version runtime state
|
2026-07-06 20:59:03 -04:00 |
|
iomgaa
|
0616d16956
|
fix: replace chs→Video-Tree-TRM in implementer prompt template
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 11:44:15 -04:00 |
|
iomgaa
|
fefe3bd71f
|
fix: address final review — AAAI→EMNLP, chs→Video-Tree-TRM, D7 config boundary
- ARCHITECTURE.md: fix target conference AAAI→EMNLP
- subagent-driven-development SKILL.md: fix remaining chs env reference
- .env.example: remove EMBED_BACKEND/EMBED_MODEL (D7: belongs in YAML)
- config/default.yaml: clarify as research experiment config source
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 11:43:44 -04:00 |
|
iomgaa
|
b2914b3828
|
skill: add algorithm fidelity review to subagent-driven-development
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 11:40:08 -04:00 |
|
iomgaa
|
8bcf5bdc6c
|
skill: add algorithm fidelity check to writing-plans
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 11:40:05 -04:00 |
|
iomgaa
|
92ea93eff6
|
docs: add overview.md with system overview and module structure
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 11:39:12 -04:00 |
|
iomgaa
|
e60823de1a
|
build: add README, pyproject.toml, package skeletons and smoke test
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 11:37:59 -04:00 |
|
iomgaa
|
91e7746a89
|
build: add Makefile with test/lint/build-tree/train targets
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 11:37:47 -04:00 |
|
iomgaa
|
dceec0d93c
|
config: add default.yaml with tree/retriever/harness parameters
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 11:37:43 -04:00 |
|
iomgaa
|
958652a5c2
|
config: add .env.example with LLM/Redis/telemetry templates
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 11:37:39 -04:00 |
|
iomgaa
|
afdc341642
|
fix: add missing telemetry fields to CLAUDE.md §4.8
Add parent_call_id, provider, messages, response per ARCHITECTURE.md §4
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 11:34:55 -04:00 |
|
iomgaa
|
0fb1a436c4
|
docs: rewrite CLAUDE.md for TRM5 production-grade project
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 11:32:50 -04:00 |
|
iomgaa
|
fe707ac33e
|
docs: add ARCHITECTURE.md with Clean Architecture design
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 11:23:25 -04:00 |
|
iomgaa
|
ed65e6a8d4
|
chore: init repo with .gitignore
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-07-06 11:18:19 -04:00 |
|