Skip to content

Delesque/DAP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DAP(Doc‑First AI 编程引擎)— 早期实验版

这是一个基于开源项目 Aider 的二次开发版本:保留 Aider 作为“可用的 AI 编程工具链”(模型接入、编辑循环、git/测试/命令体系等),同时引入 Doc‑First 工作流,用结构化文档替代“冗长对话历史”来驱动 AI 的上下文与定位。

本仓库当前定位:非常早期的实验版本。如果你遇到任何问题、行为不符合预期、或者有更好的想法,欢迎提 Issue/留言反馈。

核心理念

1) 三层记忆(不依赖长对话)

默认不把聊天记录当作主要记忆来源,而是把“记忆”拆成三层、用仓库内的文档/文件来承载:

  • 长期记忆(Project Overview):稳定的架构概览与关键不变量
    • 文件:PROJECT_OVERVIEW.md
  • 短期记忆(Feature Requirements):当前功能的工程要求与验收标准
    • 形式:一功能一份需求文档(可随任务切换)
  • 瞬间记忆(Working Set):当前正在编辑/即将编辑的文件内容与最小相关片段
    • 形式:工作集文件 + 少量依赖

这三层的目标是让 AI 在不同规模项目上“可控、可复现、可维护”:记忆不靠聊天堆积,而靠可追踪的工程文档沉淀。

2) 文档树(AI_ARCH.md)作为“定位导航”

仓库根目录的 AI_ARCH.md 是 Doc‑First 导航入口:
当 AI 需要理解或修改代码时,应当从根文档开始逐级下钻到子目录的 AI_ARCH.md,直到定位到目标文件/入口点。

这种“文档树定位”强调:

  • 默认不全仓库搜索
  • 只有在文档指向范围内,才做最小必要的有限搜索作为兜底
  • 改完代码必须同步更新相关文档,保证“文档与工程一致”

你可以从这里开始了解文档树:

3) Doc Index + DocSync(文档检索与文档同步)

为了让 Doc‑First 在实际工程里可用,本项目提供两类能力:

  • Doc Index:构建/增量更新/搜索文档片段(索引默认落盘到 DAP/doc_index.json
  • DocSync:代码修改后,生成并应用对 AI_ARCH.md 文档树的更新草稿(交互命令 /docsync

与上游 Aider 的主要差异

  • 本 fork 把项目内的 .aider* 命名迁移为 DAP*
    • 运行时状态目录:DAP/(替代 .aider/
    • tags cache:DAP.tags.cache.v*(替代 .aider.tags.cache.v*
    • 常用配置/历史:DAP.conf.ymlDAPignoreDAP.chat.history.mdDAP.input.history
  • 启动时会自动把旧的 .aider* 重命名迁移到 DAP*(如果新文件不存在)

安装与运行

运行环境

  • Python:3.10 ~ 3.12(见 pyproject.tomlrequires-python
  • Git:建议安装(用于 repo 功能与差异管理)

依赖说明

  • 基础运行依赖:见 requirements.txt(通过 pyproject.toml 动态注入)
  • 可选依赖:
    • desktop:桌面端运行(PySide6,见 requirements/requirements-desktop.txt
    • desktop-build:桌面端打包(PyInstaller,见 requirements/requirements-desktop-build.txt

配置与本地状态(不会提交到仓库)

  • DAP/:运行时本地状态目录(例如文档索引、DocSync 草稿等),默认应当忽略
  • DAP.conf.yml:本地配置文件(替代上游 .aider.conf.yml
  • DAPignore:本地忽略规则文件(替代上游 .aiderignore

安装(开发模式)

在仓库根目录执行:

python -m pip install -U pip
python -m pip install -e .

运行(CLI)

aider --help

运行(桌面端)

安装桌面依赖(PySide6):

python -m pip install -e ".[desktop]"

启动桌面端:

python aider_desktop_app.py

打包 EXE(Windows)

安装打包依赖(PyInstaller)并构建:

python -m pip install -e ".[desktop,desktop-build]"
python tools\build_desktop_exe.py --name DAP --out-dir dist

产物默认输出到:dist\DAP.exe

反馈与贡献

  • 这是早期实验版:欢迎反馈 bug、建议、以及对“Doc‑First 工作流”的改进想法
  • 如果你要在上游 Aider 的基础上继续演进,也欢迎把可复用的改进回馈社区

致谢与许可证

  • 本项目基于上游 Aider 二次开发:https://github.com/Aider-AI/aider
  • 许可证:Apache License 2.0(见 LICENSE.txt
  • 说明:本仓库包含对上游代码的修改与新增功能,但并非上游官方版本;上游作者不为本 fork 的行为或结果背书。

上游 Aider README(保留作参考)

Aider Logo

AI Pair Programming in Your Terminal

Aider lets you pair program with LLMs to start a new project or build on your existing codebase.

aider screencast

GitHub Stars PyPI Downloads Tokens per week OpenRouter Ranking Singularity

Features

Aider works best with Claude 3.7 Sonnet, DeepSeek R1 & Chat V3, OpenAI o1, o3-mini & GPT-4o, but can connect to almost any LLM, including local models.


Aider makes a map of your entire codebase, which helps it work well in larger projects.


Aider works with most popular programming languages: python, javascript, rust, ruby, go, cpp, php, html, css, and dozens more.


Aider automatically commits changes with sensible commit messages. Use familiar git tools to easily diff, manage and undo AI changes.


Use aider from within your favorite IDE or editor. Ask for changes by adding comments to your code and aider will get to work.


Add images and web pages to the chat to provide visual context, screenshots, reference docs, etc.


Speak with aider about your code! Request new features, test cases or bug fixes using your voice and let aider implement the changes.


Automatically lint and test your code every time aider makes changes. Aider can fix problems detected by your linters and test suites.


Work with any LLM via its web chat interface. Aider streamlines copy/pasting code context and edits back and forth with a browser.

Getting Started

python -m pip install aider-install
aider-install

# Change directory into your codebase
cd /to/your/project

# DeepSeek
aider --model deepseek --api-key deepseek=<key>

# Claude 3.7 Sonnet
aider --model sonnet --api-key anthropic=<key>

# o3-mini
aider --model o3-mini --api-key openai=<key>

See the installation instructions and usage documentation for more details.

More Information

Documentation

Community & Resources

Kind Words From Users