Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .ai-team/PROJECT.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Build AutoResearch: a LangGraph-based, evidence-gated research system that takes
## Scope

- In scope: exactly five business agents (`orchestrator`, `paper_search`, `paper_reader`, `writer`, `reviewer`).
- In scope: typed state, deterministic lifecycle transitions, structured handoffs, evidence grades, fail-closed gates, checkpoint/resume, partitioned Wiki+Graph knowledge, user profiles, experience consolidation, evolution proposals, paper-project folders, CLI, HTTP API, tests, and documentation.
- In scope: typed project/run/artifact/Gate states, deterministic lifecycle transitions, structured handoffs, evidence grades, fail-closed gates, checkpoint/resume, partitioned knowledge, paper-project folders, project-level Web workspaces, CLI, versioned HTTP API, tests, and documentation.
- In scope: offline deterministic execution for development and an optional OpenAI-compatible LLM adapter selected only through environment configuration.
- Out of scope: bypassing paywalls or access controls; fabricating citations, experiments, or approvals; autonomous submission/publication; destructive research-data operations; claims of publication readiness without a real paper pilot.

Expand All @@ -23,6 +23,8 @@ Build AutoResearch: a LangGraph-based, evidence-gated research system that takes
- `src/autoresearch/agents/`: exactly five business-agent implementations.
- `src/autoresearch/graph.py`: LangGraph parent graph, lifecycle routing, checkpoint/resume, and handoff validation.
- `src/autoresearch/api.py` and `cli.py`: supported external boundaries.
- `src/autoresearch/workbench_contracts.py`, `workbench_service.py`, and `workbench_api.py`: V2 project evidence workbench contracts, persistence, quality gates, run events and `/api/v1` routes.
- `web/app/projects/` and `web/components/`: project-level Next.js workspaces; formal research data comes only from `/api/v1`.
- `.project-to-act/`: canonical product scope, feature status, version, progress, evidence, and acceptance.
- `.ai-team/TASK.md`: the single active implementation task and handoff checkpoint.
- `docs/`: architecture, contracts, development, operations, API, and user guides.
Expand All @@ -35,6 +37,8 @@ Build AutoResearch: a LangGraph-based, evidence-gated research system that takes
- Gate decisions are deterministic and fail closed; an LLM cannot override them or populate human approval identity.
- Agent handoffs contain stable IDs and bounded summaries, never full chat history or full-paper dumps.
- Model calls are optional and environment-configured. Offline tests must pass without an API key.
- The default V2 chain is Idea → literature → reading/synthesis → research report → human confirmation → manuscript → review. Experiment/code/MD execution is an optional project Profile and cannot block ordinary literature research.
- Browsers hold unsubmitted input only; Idea, Brief, papers, notes, reports and manuscript versions are backend records. Model or search failure never falls back to hard-coded research prose.
- External publication, sending, deletion, and high-cost execution remain disabled unless explicit H3 approval and policy requirements pass.
- Let tests and CI decide observable behavior; distinguish implemented local behavior from external integration and real research validation.

Expand Down
91 changes: 60 additions & 31 deletions .ai-team/TASK.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,90 @@
# Current Task

- ID: `AR-003`
- Title: `Simplify the assignment plan to module level`
- Status: `done`
- Owner: `zzg`
- Next owner: `user/team`
- ID: `AR-008`
- Title: `Rebuild AutoResearch as a runnable project evidence workbench`
- Status: `active`
- Owner: `Codex`
- Next owner: `Codex`

## Goal

根据用户反馈,把任务拆解入口从 122 个子任务收敛为模块级分配。保留此前详细版作为附录,但当前团队先按模块认领负责人、边界、主要产出、依赖和验收目标。
交付 AutoResearch V2 的完整功能设计手册与可运行本机单用户纵向切片。默认主链为 Idea、多源文献、阅读综合、研究报告、人工确认、论文稿和审核修改;实验执行改为可选 Profile。所有可见交互必须连接真实导航、后端持久化或带原因的禁用状态,不再使用静态对话或演示稿冒充研究产物。

## Acceptance scenarios

- [x] `docs/AutoResearch_任务拆解书.md` 只作为模块级分配入口,覆盖 M00–M17。
- [x] 每个模块说明目标、边界、主要交付物、前置模块、负责人建议和当前状态。
- [x] 文档提供模块负责人验收模板和第一批模块分配建议。
- [x] 原 122 子任务版本保留为 `docs/AutoResearch_任务拆解书_详细版.md`,不丢失后续拆解素材。
- [x] README、Project-to-Act 和 VibeCollab 任务状态保持一致,不改变五业务 Agent 和证据门禁边界。
- [x] `docs/AutoResearch_完整功能设计手册_V2.md` 定义模块、状态、数据对象、API、按钮追踪、质量门和验收矩阵。
- [x] 保持恰好五个业务 Agent;Project、Evidence、Artifact、Capability、Quality 和 Gate 保持确定性服务。
- [x] 提供版本化 `/api/v1` 项目、能力、Idea、论文、阅读、综合、报告、稿件、审核、文件、知识、run/event 合同,并保留旧接口兼容。
- [x] 正式 Idea 消息、Brief、论文、阅读卡、综合、报告、稿件和审核记录持久化;刷新后可恢复,进程重启沿用 SQLite 规范源。
- [x] 未配置模型或网络检索时明确降级;允许项目和本地资料管理,禁止生成型入口输出模板假成果。
- [x] Next.js 按项目级工作区拆分,项目文件、知识与证据、设置等入口均可运行;无空操作按钮。
- [x] 完成本机客户旅程:创建项目、Idea、导入真实题录、阅读、综合、报告、论文升级、审核、重新打开;真实受管 GLM 的 ReadingCard 输出通过 schema 兼容回归。当前证据为 3 篇 DOI 摘要软件旅程,不替代 20/30 质量 Pilot。
- [x] 前后端自动化、生产构建、宽屏/移动端浏览器交互、Project-to-Act 与 repo-task-sync 检查通过。
- [ ] 真实 20 篇授权 corpus/30 gold 问题保持单独质量 Pilot Gate;未完成人工盲审前不得标为通过。
- [ ] 开放获取全文可从前端绑定到 PaperRecord,PDF 正文被安全解析并产生全文 locator;完成至少 3 篇 CC BY 论文的可见前端回归到最终定稿。

## Invariants

- 当前入口不要求团队一次性拆到函数、接口或工单;模块负责人后续再自行细化。
- 详细版是参考材料,不代表所有子任务都已实现或已验收。
- 真实论文试点、生产数据库、Web UI、灾备和性能仍保持原有“外部阻塞/待开发”状态。
- 不提交 token、密钥、私有来源、完整论文、原始提示或虚构外部结果。
- 原 `F:\Codex\AutoResearch` AR-007/STORM/GLM 工作树和未提交内容不得修改或携带。
- PR #2 仅是原型证据;AR-008 不继承其完成声明。
- 模型密钥只来自受管环境;禁止提交 `.env.local`、密钥、原始 prompt/response 或受限全文。
- 所有引用必须解析到 PaperRecord;关键 claim 必须绑定 EvidenceItem 和 locator。
- LLM、检索、许可或证据不足时返回 disabled、unknown、input_required 或 blocked,不回退到硬编码研究正文。
- 外部发布、投稿、删除和高成本执行保持关闭,除非既有确定性 Gate 与人工批准通过。

## Decisions

- 使用 M00–M17 作为稳定模块 ID,先按模块分配负责人。
- 保留详细拆解版,避免未来重新整理时丢失依赖和验收素材。
- `.project-to-act` 继续作为长期项目事实源;`.ai-team/TASK.md` 只记录本次短周期交付。
- 新分支 `codex/ar-008-autoresearch-v2` 从 `4051476` 创建,复用其受管 GLM/Nature 写作质量边界。
- 仅移植 AR-006 Web 的视觉资产和基础依赖,重新实现路由、数据和交互合同。
- 首发为本机单用户 T3 产品;无认证、多租户、计费或公网部署。
- 主界面为项目证据工作台;研究报告先于论文稿;实验执行仅由项目 Profile 显式启用。
- 对话模式为 D1/D2/D4,使用 C1/C2 控制;外发仍按 D5/C3 门禁。

## Completed

- 将原 `docs/AutoResearch_任务拆解书.md` 移为 `docs/AutoResearch_任务拆解书_详细版.md`。
- 新建模块级 `docs/AutoResearch_任务拆解书.md`,包含 18 个模块、执行阶段、负责人模板和首批分配建议。
- 保留 README 任务书入口,并将 AR-003 的状态、范围和下一步写入协作账本。
- 已审计当前 UI 和 API,确认静态 Idea 对话、硬编码稿件及多个无绑定按钮。
- 已锁定 V2 产品范围、离线降级语义、界面方向和质量边界。
- 已创建独立 AR-008 工作树,保留 AR-007 原工作树。
- 已交付 V2 完整设计手册、状态拆分、稳定 `/api/v1` 和结构化错误/幂等/run event 合同。
- 已实现项目、能力、Idea、Brief、真实题录/文件导入、阅读卡、综合、报告确认、论文版本、审核、知识证据、文件和运行恢复服务。
- 已将 Web 拆为项目级路由和 11 个独立入口;删除 demo fixtures、静态假对话和旧单页工作台。
- 后端 Ruff + 32 tests、前端 lint/typecheck/4 tests/build 通过;1440×900 与 390×844 浏览器验收无页面级横向溢出。
- 浏览器实际创建 `browser-v2`、离线保存 Idea、导入题录、刷新恢复,并验证知识证据、项目文件和能力诊断。
- 已提交并推送 `75501a2`,新实现位于 PR #3;旧 PR #2 已关闭并标记为 superseded prototype evidence。
- 已兼容真实受管 GLM 将 ReadingCard `findings`/`limitations` 返回为标量字符串的情况,并收紧阅读、综合、报告和稿件结构化输出 schema。
- 已用流式 Route Handler 替代长任务 rewrite 代理,模型任务客户端超时调整为 190 秒;真实报告约 70 秒、稿件约 97 秒均从前端返回成功。
- 已增加稿件定稿 Gate:确定性审核通过前拒绝确认,人工确认后状态为 accepted,仍保持 `release_ready=false`。
- 已修复历史 blocked run 误报当前项目 blocker;历史失败仍保留在运行台账中。
- 已通过可见前端将 `student-md-fracture-review` 推进到 3 张 ReadingCard、6 条 evidence、综合、报告 V1 确认、稿件 V2 人工修订、审核 pass、确认定稿,并在服务重启与项目重开后恢复。
- 已实现许可全文上传绑定 PaperRecord、PDF 逐页解析、正文 checksum/page count、`p.N` locator 校验和 E2 evidence;解析失败保留 DocumentArtifact 并明确提示 OCR。
- 已找到并核验 3 篇与金属孔洞/层裂相关的 CC BY 4.0 PDF(14–19 页),均可解析且 DOI、许可声明、SHA-256 可复核;原文只保存在本机临时 corpus,未提交仓库。

## Pending

- 用户/团队需要为模块负责人模板填写实际 owner、分支、目标日期和 evidence ID。
- 模块负责人确认后,再选择需要展开的模块,不默认展开全部模块。
- 真实论文试点仍等待 idea、领域、目标 venue、授权全文和实验资源边界。
- 当前文件上传仅保存 DocumentArtifact,未解析 PDF,也未绑定 PaperRecord;必须先补齐全文导入合同。
- 真实 20 篇授权 corpus/30 gold 问题人工质量 Pilot 仍需后续授权全文与独立评审;该 Gate 不由当前 3 篇摘要软件旅程或自动化替代。

## Next step

先认领 M01–M04、M05–M07、M08、M09–M10、M11–M12、M13–M15/M17、M16 这 7 个模块包;完成模块边界确认后,再只对当前瓶颈模块做子任务拆解。
实现 PDF 解析与 PaperRecord 绑定,通过前端导入至少 3 篇许可明确的开放获取全文并重跑 ReadingCard→综合→报告→稿件→审核定稿;随后仍保持 20/30 人工质量 Pilot 为独立 Gate。

## Verification

- [x] Project-to-Act `--check` — managed 配置有效,唯一账本保持不变。
- [x] 模块文档结构检查 — M00–M17 全部存在,详细版文件可访问。
- [x] `node .ai-team/check.mjs --base main` — AR-003 acceptance 5/5,任务范围和变更同步有效。
- [x] Project-to-Act `--validate` — managed 配置 valid,issues 为空。
- [x] `npm.cmd run lint`
- [x] `npm.cmd run typecheck`
- [x] `npm.cmd run test`(4 tests)
- [x] `npm.cmd run build`
- [x] `.venv\Scripts\python.exe -m ruff check src tests`
- [x] `.venv\Scripts\python.exe -m pytest -q`(33 tests)
- [x] `.venv\Scripts\python.exe -m pytest -W error -q`(33 tests)
- [x] `.venv\Scripts\autoresearch.exe doctor`(ok,agent_count=5)
- [x] Root Project-to-Act `--validate`(valid,0 issues)
- [x] Browser wide/mobile validation and no-op control audit
- [x] 真实受管 `glm-5.2` 可见前端学生旅程(3 DOI 摘要;ReadingCard→综合→报告确认→稿件 V2→审核→定稿→重开恢复)
- [x] `node .ai-team/check.mjs --base codex/ar-006-glm-nature-writing`(valid)

## Handoff note

- From: `zzg`
- From: `Codex`
- To: `user/team`
- Summary: 当前分配入口已经降为模块级;详细拆解保留在附录。先分模块负责人,后续只对真正需要的模块继续细化。
- Summary: AR-008 V2 软件闭环和真实受管 GLM 前端回归已通过;ReadingCard schema、长任务代理、报告/稿件结构、定稿 Gate 与 blocker 展示已修复。真实 20/30 质量 Pilot 保持独立未通过 Gate。
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ LLM_PROVIDER=offline
LLM_API_KEY=
LLM_BASE_URL=
LLM_MODEL=
LLM_TIMEOUT_SECONDS=60
LLM_TIMEOUT_SECONDS=180
AUTORESEARCH_NATURE_WRITING_SKILL_DIR=
AUTORESEARCH_DATA_DIR=var
AUTORESEARCH_DB_PATH=var/autoresearch.sqlite3
AUTORESEARCH_CHECKPOINT_PATH=var/checkpoints.sqlite3
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ dist/
# Runtime state and generated artifacts
var/
.langgraph_api/
/.tmp-browser/

# Local reference repository; not part of the AutoResearch source tree
DeepReason-Agents-Framework/
Expand Down
Loading