ai-coding-assistant/memory/2026-05-12.md
root 98d113883e docs: add AI Coding Assistant design and P0 implementation plan
Design covers: agent loop, LLM provider abstraction, transport layer,
context management, skill system, tool registry. P0 plan targets the
minimum viable loop: user input → LLM streaming → tool call → output.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 08:56:41 +08:00

1.4 KiB
Raw Blame History

2026-05-12

决策

  • 技术栈Python 后端 (agent) + TypeScript 前端 (TUI/Web),双语言架构

    • 理由Python 生态适合 agent 逻辑和 LLM 交互TypeScript 天然适配 Web Components / xterm.js
    • 影响:需要统一 Transport 抽象层桥接两语言
  • Transport 方案:统一 Transport 接口 + stdio(SSE/WS) 双实现

    • 理由TUI 直接 spawn 子进程最简单Web 需要 SSE/WS 流式推送
    • 影响agent loop 不感知传输方式,前端可独立选择接入方式
  • LLM ProviderOpenAI 兼容协议 + Anthropic 原生双协议

    • 理由OpenAI 兼容覆盖绝大多数提供者Anthropic 原生保留 tool_use/extended_thinking
    • 影响:两个 adapterGemini 初期走 OpenAI 兼容层
  • 上下文管理:滑动窗口 + 摘要 + 分层上下文SQLite 持久化

    • 理由分层保证关键上下文不被压缩SQLite 支持会话恢复和历史查询
    • 影响:需要 aiosqlite 依赖,数据库 schema 设计
  • 技能系统:函数注册 + 提示词模板(方案 C支持动态加载

    • 理由:底层工具函数注册 + 上层技能描述编排,灵活可扩展
    • 影响:目录扫描 + importlib 动态加载机制

纪要

  • 完成 AI Coding Assistant 设计文档初稿:docs/plans/2026-05-12-ai-coding-assistant-design.md
  • 待用户批准设计后进入 Phase 2 (Planning)