agentleFS
chenxiachanchenxiachan/thoughtdag/AGENTS.md

thoughtdag

AGENTS.md727 starsChanged 2 months agoMITView on GitHub

ThoughtDAG:把 LLM 对话变成无限画布上可编辑的思维 DAG(节点=一轮问答,边=上下文流)。React 19 + Vite + TypeScript 前端,Express 代理后端。状态:活跃开发中的开放原型(github.com/chenxiachan/thoughtdag)。 需要 .env(见 .env.example):至少一把 LLM key(ZHIPUAPIKEY 免费档 glm-4.5-flash,或 DASHSCOPEAPIKEY 付费)。

  • Reads credentials
Files
AGENTS.md

AGENTS.md

ThoughtDAG:把 LLM 对话变成无限画布上可编辑的思维 DAG(节点=一轮问答,边=上下文流)。React 19 + Vite + TypeScript 前端,Express 代理后端。状态:活跃开发中的开放原型(github.com/chenxiachan/thoughtdag)。

常用命令

npm run dev      # Vite 前端 (默认 5173)
npm run server   # LLM 代理 server.mjs (端口 3001,前端默认指向它)
npm run build    # tsc -b && vite build
npm run smoke    # scripts/smoke.mjs 冒烟测试
npm run lint

需要 .env(见 .env.example):至少一把 LLM key(ZHIPU_API_KEY 免费档 glm-4.5-flash,或 DASHSCOPE_API_KEY 付费)。

架构

  • server.mjs — 唯一后端文件:Express 代理,用 Vercel AI SDK(ai + @ai-sdk/openai-compatible + zhipu-ai-provider)调 LLM;含 agentic 网页搜索 + 行内引用(搜索后保证有综合回答)。
  • src/store/ — zustand 全局状态;持久化用 idb-keyval(IndexedDB)。
  • src/components/ — 画布基于 @xyflow/react(React Flow):ThoughtNode、ThoughtEdgeView、SelectionToolbar(圈选对齐,对齐前有确认提示)、focus-panel/。
  • src/lib/api.ts — 前端到 server.mjs 的调用层。
  • src/i18n/ — 中英双语。
  • Markdown 渲染:react-markdown + KaTeX + highlight.js;PDF 附件用 pdfjs-dist。

约定

  • 布局必须遵守箭头(上下文流)顺序,同一对话链节点竖向对齐——这是用户明确要求过的行为,改布局逻辑时不要破坏。
  • 与用户交流用中文;代码标识符和注释保持英文。
  • UI 文案(i18n、tooltip、toast、placeholder)不出现第三方品牌名。功能性标识除外:环境变量名、导入格式的身份(如 ChatGPT 导出文件)、实际数据源(arXiv、Semantic Scholar)。举例、推荐、宣传式的品牌提及一律用通称("外部 OCR 工具""其他助手")或扩展名(.docx)替代。

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.