{
  "canonical_name": "Aider-AI/aider",
  "compilation_id": "pack_65df9dd1b82e4a4bbefa65d59f6f73f7",
  "created_at": "2026-05-18T12:54:16.682547+00:00",
  "created_by": "project-pack-compiler",
  "feedback": {
    "carrier_selection_notes": [
      "viable_asset_types=skill, recipe, host_instruction, eval, preflight",
      "recommended_asset_types=skill, recipe, host_instruction, eval, preflight"
    ],
    "evidence_delta": {
      "confirmed_claims": [
        "identity_anchor_present",
        "capability_and_host_targets_present",
        "install_path_declared_or_better"
      ],
      "missing_required_fields": [],
      "must_verify_forwarded": [
        "Run or inspect `pip install aider-install` in an isolated environment.",
        "Confirm the project exposes the claimed capability to at least one target host."
      ],
      "quickstart_execution_scope": "allowlisted_sandbox_smoke",
      "sandbox_command": "pip install aider-install",
      "sandbox_container_image": "python:3.12-slim",
      "sandbox_execution_backend": "docker",
      "sandbox_planner_decision": "llm_execute_isolated_install",
      "sandbox_validation_id": "sbx_f6cab3663bf64202a6aa7ab69f49af6f"
    },
    "feedback_event_type": "project_pack_compilation_feedback",
    "learning_candidate_reasons": [],
    "template_gaps": []
  },
  "identity": {
    "canonical_id": "project_6199092206f14d87016a01e6ba902c34",
    "canonical_name": "Aider-AI/aider",
    "homepage_url": null,
    "license": "unknown",
    "repo_url": "https://github.com/Aider-AI/aider",
    "slug": "aider",
    "source_packet_id": "phit_c0888ba95e1949fca869295e642081f2",
    "source_validation_id": "dval_789198eeef554a67b7e85a05df2f099a"
  },
  "merchandising": {
    "best_for": "需要软件开发与交付能力，并使用 claude的用户",
    "github_forks": 4382,
    "github_stars": 44599,
    "one_liner_en": "aider is AI pair programming in your terminal",
    "one_liner_zh": "aider is AI pair programming in your terminal",
    "primary_category": {
      "category_id": "software-development",
      "confidence": "medium",
      "name_en": "Software Development",
      "name_zh": "软件开发与交付",
      "reason": "matched_keywords:git"
    },
    "target_user": "使用 claude, chatgpt 等宿主 AI 的用户",
    "title_en": "aider",
    "title_zh": "aider 能力包",
    "visible_tags": [
      {
        "label_en": "Browser Agents",
        "label_zh": "浏览器 Agent",
        "source": "repo_evidence_project_characteristics",
        "tag_id": "product_domain-browser-agents",
        "type": "product_domain"
      },
      {
        "label_en": "Web Task Automation",
        "label_zh": "网页任务自动化",
        "source": "repo_evidence_project_characteristics",
        "tag_id": "user_job-web-task-automation",
        "type": "user_job"
      },
      {
        "label_en": "Natural-language Web Actions",
        "label_zh": "自然语言网页操作",
        "source": "repo_evidence_project_characteristics",
        "tag_id": "core_capability-natural-language-web-actions",
        "type": "core_capability"
      },
      {
        "label_en": "Automated Workflow",
        "label_zh": "自动化工作流",
        "source": "repo_evidence_project_characteristics",
        "tag_id": "workflow_pattern-automated-workflow",
        "type": "workflow_pattern"
      },
      {
        "label_en": "Evaluation Suite",
        "label_zh": "评测体系",
        "source": "repo_evidence_project_characteristics",
        "tag_id": "selection_signal-evaluation-suite",
        "type": "selection_signal"
      }
    ]
  },
  "packet_id": "phit_c0888ba95e1949fca869295e642081f2",
  "page_model": {
    "artifacts": {
      "artifact_slug": "aider",
      "files": [
        "PROJECT_PACK.json",
        "QUICK_START.md",
        "PROMPT_PREVIEW.md",
        "HUMAN_MANUAL.md",
        "AI_CONTEXT_PACK.md",
        "BOUNDARY_RISK_CARD.md",
        "PITFALL_LOG.md",
        "REPO_INSPECTION.json",
        "REPO_INSPECTION.md",
        "CAPABILITY_CONTRACT.json",
        "EVIDENCE_INDEX.json",
        "CLAIM_GRAPH.json"
      ],
      "required_files": [
        "PROJECT_PACK.json",
        "QUICK_START.md",
        "PROMPT_PREVIEW.md",
        "HUMAN_MANUAL.md",
        "AI_CONTEXT_PACK.md",
        "BOUNDARY_RISK_CARD.md",
        "PITFALL_LOG.md",
        "REPO_INSPECTION.json"
      ]
    },
    "detail": {
      "capability_source": "Project Hit Packet + DownstreamValidationResult",
      "commands": [
        {
          "command": "pip install aider-install",
          "label": "Python / pip · 官方安装入口",
          "source": "https://github.com/Aider-AI/aider#readme",
          "verified": true
        }
      ],
      "display_tags": [
        "浏览器 Agent",
        "网页任务自动化",
        "自然语言网页操作",
        "自动化工作流",
        "评测体系"
      ],
      "eyebrow": "软件开发与交付",
      "glance": [
        {
          "body": "判断自己是不是目标用户。",
          "label": "最适合谁",
          "value": "需要软件开发与交付能力，并使用 claude的用户"
        },
        {
          "body": "先理解能力边界，再决定是否继续。",
          "label": "核心价值",
          "value": "aider is AI pair programming in your terminal"
        },
        {
          "body": "未完成验证前保持审慎。",
          "label": "继续前",
          "value": "publish to Doramagic.ai project surfaces"
        }
      ],
      "guardrail_source": "Boundary & Risk Card",
      "guardrails": [
        {
          "body": "Prompt Preview 只展示流程，不证明项目已安装或运行。",
          "label": "Check 1",
          "value": "不要把试用当真实运行"
        },
        {
          "body": "claude, chatgpt",
          "label": "Check 2",
          "value": "确认宿主兼容"
        },
        {
          "body": "publish to Doramagic.ai project surfaces",
          "label": "Check 3",
          "value": "先隔离验证"
        }
      ],
      "mode": "skill, recipe, host_instruction, eval, preflight",
      "pitfall_log": {
        "items": [
          {
            "body": "GitHub 社区证据显示该项目存在一个安装相关的待验证问题：Python 3.13 support",
            "category": "安装坑",
            "evidence": [
              "community_evidence:github | cevd_d422c2c05bc34d938b82095b9b0b7131 | https://github.com/Aider-AI/aider/issues/3037 | 来源讨论提到 python 相关条件，需在安装/试用前复核。"
            ],
            "severity": "high",
            "suggested_check": "来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。",
            "title": "来源证据：Python 3.13 support",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个配置相关的待验证问题：benchmark.py uses `--read-model-settings` but main cli + docs say `--model-settings-file`",
            "category": "配置坑",
            "evidence": [
              "community_evidence:github | cevd_04ccacbfaff740caaa5ac6f5280521c8 | https://github.com/Aider-AI/aider/issues/5131 | 来源讨论提到 python 相关条件，需在安装/试用前复核。"
            ],
            "severity": "high",
            "suggested_check": "来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。",
            "title": "来源证据：benchmark.py uses `--read-model-settings` but main cli + docs say `--model-settings-file`",
            "user_impact": "可能影响升级、迁移或版本选择。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Zed Editor Support",
            "category": "安全/权限坑",
            "evidence": [
              "community_evidence:github | cevd_de9d553c32dc4238bb4601e547645020 | https://github.com/Aider-AI/aider/issues/851 | 来源讨论提到 python 相关条件，需在安装/试用前复核。"
            ],
            "severity": "high",
            "suggested_check": "来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。",
            "title": "来源证据：Zed Editor Support",
            "user_impact": "可能影响授权、密钥配置或安全边界。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个安装相关的待验证问题：feat: Add --one-shot flag for sessionless single-prompt execution",
            "category": "安装坑",
            "evidence": [
              "community_evidence:github | cevd_4434e2534a6d45e58141e326a1cd97f1 | https://github.com/Aider-AI/aider/issues/5143 | 来源类型 github_issue 暴露的待验证使用条件。"
            ],
            "severity": "medium",
            "suggested_check": "来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。",
            "title": "来源证据：feat: Add --one-shot flag for sessionless single-prompt execution",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "项目面向 Claude/Cursor/Codex/Gemini/OpenCode 等宿主，或安装命令涉及用户配置目录。",
            "category": "配置坑",
            "evidence": [
              "capability.host_targets | github_repo:638629097 | https://github.com/Aider-AI/aider | host_targets=claude, chatgpt"
            ],
            "severity": "medium",
            "suggested_check": "列出会写入的配置文件、目录和卸载/回滚步骤。",
            "title": "可能修改宿主 AI 配置",
            "user_impact": "安装可能改变本机 AI 工具行为，用户需要知道写入位置和回滚方法。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Uncaught NotImplementedError in pathlib.py line 1090",
            "category": "配置坑",
            "evidence": [
              "community_evidence:github | cevd_4a2e6220201a4896920a22c45da17ae4 | https://github.com/Aider-AI/aider/issues/5145 | 来源讨论提到 python 相关条件，需在安装/试用前复核。"
            ],
            "severity": "medium",
            "suggested_check": "来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。",
            "title": "来源证据：Uncaught NotImplementedError in pathlib.py line 1090",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Uncaught OSError in _win32_console.py line 403",
            "category": "配置坑",
            "evidence": [
              "community_evidence:github | cevd_f4f7880f667f4a52b7ad9b82e7a4acd2 | https://github.com/Aider-AI/aider/issues/5117 | 来源讨论提到 python 相关条件，需在安装/试用前复核。"
            ],
            "severity": "medium",
            "suggested_check": "来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。",
            "title": "来源证据：Uncaught OSError in _win32_console.py line 403",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Uncaught OSError in pathlib.py line 1222",
            "category": "配置坑",
            "evidence": [
              "community_evidence:github | cevd_7f5383bfd86147d0929d2366e5b3044c | https://github.com/Aider-AI/aider/issues/5130 | 来源讨论提到 python 相关条件，需在安装/试用前复核。"
            ],
            "severity": "medium",
            "suggested_check": "来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。",
            "title": "来源证据：Uncaught OSError in pathlib.py line 1222",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Uncaught QueryError in repomap.py line 302",
            "category": "配置坑",
            "evidence": [
              "community_evidence:github | cevd_64f88b21f5fd4baa94c7e340b7006423 | https://github.com/Aider-AI/aider/issues/5133 | 来源讨论提到 python 相关条件，需在安装/试用前复核。"
            ],
            "severity": "medium",
            "suggested_check": "来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。",
            "title": "来源证据：Uncaught QueryError in repomap.py line 302",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个配置相关的待验证问题：git repo corrupted",
            "category": "配置坑",
            "evidence": [
              "community_evidence:github | cevd_3cf7b9ede88e4598bacb2a1c5f7cd847 | https://github.com/Aider-AI/aider/issues/2734 | 来源讨论提到 python 相关条件，需在安装/试用前复核。"
            ],
            "severity": "medium",
            "suggested_check": "来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。",
            "title": "来源证据：git repo corrupted",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "README/documentation is current enough for a first validation pass.",
            "category": "能力坑",
            "evidence": [
              "capability.assumptions | github_repo:638629097 | https://github.com/Aider-AI/aider | README/documentation is current enough for a first validation pass."
            ],
            "severity": "medium",
            "suggested_check": "将假设转成下游验证清单。",
            "title": "能力判断依赖假设",
            "user_impact": "假设不成立时，用户拿不到承诺的能力。"
          },
          {
            "body": "未记录 last_activity_observed。",
            "category": "维护坑",
            "evidence": [
              "evidence.maintainer_signals | github_repo:638629097 | https://github.com/Aider-AI/aider | last_activity_observed missing"
            ],
            "severity": "medium",
            "suggested_check": "补 GitHub 最近 commit、release、issue/PR 响应信号。",
            "title": "维护活跃度未知",
            "user_impact": "新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。"
          },
          {
            "body": "no_demo",
            "category": "安全/权限坑",
            "evidence": [
              "downstream_validation.risk_items | github_repo:638629097 | https://github.com/Aider-AI/aider | no_demo; severity=medium"
            ],
            "severity": "medium",
            "suggested_check": "进入安全/权限治理复核队列。",
            "title": "下游验证发现风险项",
            "user_impact": "下游已经要求复核，不能在页面中弱化。"
          },
          {
            "body": "no_demo",
            "category": "安全/权限坑",
            "evidence": [
              "risks.scoring_risks | github_repo:638629097 | https://github.com/Aider-AI/aider | no_demo; severity=medium"
            ],
            "severity": "medium",
            "suggested_check": "把风险写入边界卡，并确认是否需要人工复核。",
            "title": "存在评分风险",
            "user_impact": "风险会影响是否适合普通用户安装。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Proposal: optional pre-commit safety scan with Agent Threat Rules",
            "category": "安全/权限坑",
            "evidence": [
              "community_evidence:github | cevd_4fa6fdcc672345afa8c3ff5a452863aa | https://github.com/Aider-AI/aider/issues/5121 | 来源类型 github_issue 暴露的待验证使用条件。"
            ],
            "severity": "medium",
            "suggested_check": "来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。",
            "title": "来源证据：Proposal: optional pre-commit safety scan with Agent Threat Rules",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Uncaught OSError in pathlib.py line 840",
            "category": "安全/权限坑",
            "evidence": [
              "community_evidence:github | cevd_8e8437da35794c5bb2c53e2b08db3a70 | https://github.com/Aider-AI/aider/issues/5114 | 来源讨论提到 python 相关条件，需在安装/试用前复核。"
            ],
            "severity": "medium",
            "suggested_check": "来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。",
            "title": "来源证据：Uncaught OSError in pathlib.py line 840",
            "user_impact": "可能影响授权、密钥配置或安全边界。"
          }
        ],
        "source": "ProjectPitfallLog + ProjectHitPacket + validation + community signals",
        "summary": "发现 21 个潜在踩坑项，其中 3 个为 high/blocking；最高优先级：安装坑 - 来源证据：Python 3.13 support。",
        "title": "踩坑日志"
      },
      "snapshot": {
        "contributors": 180,
        "forks": 4382,
        "license": "unknown",
        "note": "站点快照，非实时质量证明；用于开工前背景判断。",
        "stars": 44599
      },
      "source_url": "https://github.com/Aider-AI/aider",
      "steps": [
        {
          "body": "不安装项目，先体验能力节奏。",
          "code": "preview",
          "title": "先试 Prompt"
        },
        {
          "body": "理解输入、输出、失败模式和边界。",
          "code": "manual",
          "title": "读说明书"
        },
        {
          "body": "把上下文交给宿主 AI 继续工作。",
          "code": "context",
          "title": "带给 AI"
        },
        {
          "body": "进入主力环境前先完成安装入口与风险边界验证。",
          "code": "verify",
          "title": "沙箱验证"
        }
      ],
      "subtitle": "aider is AI pair programming in your terminal",
      "title": "aider 能力包",
      "trial_prompt": "# aider - Prompt Preview\n\n> Copy the prompt below into your AI host before installing anything.\n> Its purpose is to let you safely feel the project's workflow, not to claim the project has already run.\n\n## Copy this prompt\n\n```text\nYou are using an independent Doramagic capability pack for Aider-AI/aider.\n\nProject:\n- Name: aider\n- Repository: https://github.com/Aider-AI/aider\n- Summary: aider is AI pair programming in your terminal\n- Host target: claude, chatgpt\n\nGoal:\nHelp me evaluate this project for the following task without installing it yet: aider is AI pair programming in your terminal\n\nBefore taking action:\n1. Restate my task, success standard, and boundary.\n2. Identify whether the next step requires tools, browser access, network access, filesystem access, credentials, package installation, or host configuration.\n3. Use only the Doramagic Project Pack, the upstream repository, and the source-linked evidence listed below.\n4. If a real command, install step, API call, file write, or host integration is required, mark it as \"requires post-install verification\" and ask for approval first.\n5. If evidence is missing, say \"evidence is missing\" instead of filling the gap.\n\nPreviewable capabilities:\n- Capability 1: aider is AI pair programming in your terminal\n\nCapabilities that require post-install verification:\n- Capability 1: Use the source-backed project context to guide one small, checkable workflow step.\n\nCore service flow:\n1. page-introduction: Introduction to Aider. Produce one small intermediate artifact and wait for confirmation.\n2. page-installation: Installation and Setup. Produce one small intermediate artifact and wait for confirmation.\n3. page-quickstart: Quick Start Guide. Produce one small intermediate artifact and wait for confirmation.\n4. page-core-architecture: Core Architecture. Produce one small intermediate artifact and wait for confirmation.\n5. page-model-integration: Model Integration System. Produce one small intermediate artifact and wait for confirmation.\n\nSource-backed evidence to keep in mind:\n- https://github.com/Aider-AI/aider\n- https://github.com/Aider-AI/aider#readme\n- aider/README.md\n- aider/__init__.py\n- aider/help.py\n- aider/prompts.py\n- pyproject.toml\n- requirements.txt\n- docker/Dockerfile\n- aider/website/docs/install.md\n\nFirst response rules:\n1. Start Step 1 only.\n2. Explain the one service action you will perform first.\n3. Ask exactly three questions about my target workflow, success standard, and sandbox boundary.\n4. Stop and wait for my answers.\n\nStep 1 follow-up protocol:\n- After I answer the first three questions, stay in Step 1.\n- Produce six parts only: clarified task, success standard, boundary conditions, two or three options, tradeoffs for each option, and one recommendation.\n- End by asking whether I confirm the recommendation.\n- Do not move to Step 2 until I explicitly confirm.\n\nConversation rules:\n- Advance one step at a time and wait for confirmation after each small artifact.\n- Write outputs as recommendations or planned checks, not as completed execution.\n- Do not claim tests passed, files changed, commands ran, APIs were called, or the project was installed.\n- If the user asks for execution, first provide the sandbox setup, expected output, rollback, and approval checkpoint.\n```\n",
      "voices": [
        {
          "body": "来源平台：github。github/github_issue: Uncaught NotImplementedError in pathlib.py line 1090（https://github.com/Aider-AI/aider/issues/5145）；github/github_issue: feat: Add --one-shot flag for sessionless single-prompt execution（https://github.com/Aider-AI/aider/issues/5143）；github/github_issue: benchmark.py uses `--read-model-settings` but main cli + docs say `--mod（https://github.com/Aider-AI/aider/issues/5131）；github/github_issue: security: bump urllib3 pin (CVE-2026-44431)（https://github.com/Aider-AI/aider/issues/5141）；github/github_issue: security: bump Pillow pin (CVE-2026-42311)（https://github.com/Aider-AI/aider/issues/5140）；github/github_issue: security: bump GitPython pin (CVE-2026-42215/42284/44243/44244)（https://github.com/Aider-AI/aider/issues/5139）；github/github_issue: Uncaught QueryError in repomap.py line 302（https://github.com/Aider-AI/aider/issues/5133）；github/github_issue: Uncaught QueryError in repomap.py line 302（https://github.com/Aider-AI/aider/issues/5134）；github/github_issue: Uncaught OSError in pathlib.py line 1222（https://github.com/Aider-AI/aider/issues/5130）；github/github_issue: Uncaught QueryError in repomap.py line 302（https://github.com/Aider-AI/aider/issues/5123）；github/github_issue: Zed Editor Support（https://github.com/Aider-AI/aider/issues/851）；github/github_issue: Python 3.13 support（https://github.com/Aider-AI/aider/issues/3037）。这些是项目级外部声音，不作为单独质量证明。",
          "items": [
            {
              "kind": "github_issue",
              "source": "github",
              "title": "Uncaught NotImplementedError in pathlib.py line 1090",
              "url": "https://github.com/Aider-AI/aider/issues/5145"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "feat: Add --one-shot flag for sessionless single-prompt execution",
              "url": "https://github.com/Aider-AI/aider/issues/5143"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "benchmark.py uses `--read-model-settings` but main cli + docs say `--mod",
              "url": "https://github.com/Aider-AI/aider/issues/5131"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "security: bump urllib3 pin (CVE-2026-44431)",
              "url": "https://github.com/Aider-AI/aider/issues/5141"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "security: bump Pillow pin (CVE-2026-42311)",
              "url": "https://github.com/Aider-AI/aider/issues/5140"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "security: bump GitPython pin (CVE-2026-42215/42284/44243/44244)",
              "url": "https://github.com/Aider-AI/aider/issues/5139"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "Uncaught QueryError in repomap.py line 302",
              "url": "https://github.com/Aider-AI/aider/issues/5133"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "Uncaught QueryError in repomap.py line 302",
              "url": "https://github.com/Aider-AI/aider/issues/5134"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "Uncaught OSError in pathlib.py line 1222",
              "url": "https://github.com/Aider-AI/aider/issues/5130"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "Uncaught QueryError in repomap.py line 302",
              "url": "https://github.com/Aider-AI/aider/issues/5123"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "Zed Editor Support",
              "url": "https://github.com/Aider-AI/aider/issues/851"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "Python 3.13 support",
              "url": "https://github.com/Aider-AI/aider/issues/3037"
            }
          ],
          "status": "已收录 12 条来源",
          "title": "社区讨论"
        }
      ]
    },
    "homepage_card": {
      "category": "软件开发与交付",
      "desc": "aider is AI pair programming in your terminal",
      "effort": "安装已验证",
      "forks": 4382,
      "icon": "code",
      "name": "aider 能力包",
      "risk": "可发布",
      "slug": "aider",
      "stars": 44599,
      "tags": [
        "浏览器 Agent",
        "网页任务自动化",
        "自然语言网页操作",
        "自动化工作流",
        "评测体系"
      ],
      "thumb": "gray",
      "type": "Skill Pack"
    },
    "manual": {
      "markdown": "# https://github.com/Aider-AI/aider 项目说明书\n\n生成时间：2026-05-16 09:51:38 UTC\n\n## 目录\n\n- [Introduction to Aider](#page-introduction)\n- [Installation and Setup](#page-installation)\n- [Quick Start Guide](#page-quickstart)\n- [Core Architecture](#page-core-architecture)\n- [Main Application Flow](#page-main-flow)\n- [Model Integration System](#page-model-integration)\n- [Chat Communication Protocol](#page-chat-communication)\n- [Code Editing Strategies](#page-coder-strategies)\n- [Edit Format Handling](#page-edit-formats)\n- [Git Integration](#page-git-integration)\n\n<a id='page-introduction'></a>\n\n## Introduction to Aider\n\n### 相关页面\n\n相关主题：[Installation and Setup](#page-installation), [Quick Start Guide](#page-quickstart)\n\n<details>\n<summary>Relevant Source Files</summary>\n\n以下源码文件用于生成本页说明：\n\n- [aider/README.md](https://github.com/Aider-AI/aider/blob/main/README.md)\n- [aider/website/index.html](https://github.com/Aider-AI/aider/blob/main/aider/website/index.html)\n- [aider/website/_includes/get-started.md](https://github.com/Aider-AI/aider/blob/main/aider/website/_includes/get-started.md)\n- [aider/website/examples/chat-transcript-css.md](https://github.com/Aider-AI/aider/blob/main/aider/website/examples/chat-transcript-css.md)\n- [aider/website/examples/complex-change.md](https://github.com/Aider-AI/aider/blob/main/aider/website/examples/complex-change.md)\n- [CONTRIBUTING.md](https://github.com/Aider-AI/aider/blob/main/CONTRIBUTING.md)\n</details>\n\n# Introduction to Aider\n\nAider is an AI pair programming tool that runs directly in your terminal. It enables developers to collaborate with Large Language Models (LLMs) to create new projects, modify existing codebases, and manage software development tasks through natural language commands.\n\n## Overview\n\nAider positions itself as an AI pair programmer, bridging the gap between human developers and artificial intelligence. Unlike traditional coding assistants that operate within IDEs, Aider operates through the command line, making it accessible and scriptable. The tool is designed to work seamlessly with Git, automatically committing changes with descriptive messages.\n\n| Attribute | Value |\n|-----------|-------|\n| Project Type | AI-assisted code editing tool |\n| Interface | Command-line terminal |\n| Primary Language | Python |\n| License | [MIT](https://github.com/Aider-AI/aider) |\n| Repository | [github.com/Aider-AI/aider](https://github.com/Aider-AI/aider) |\n\n资料来源：[aider/website/index.html](https://github.com/Aider-AI/aider/blob/main/aider/website/index.html)\n\n## Core Features\n\nAider provides a comprehensive set of features designed to streamline the development workflow.\n\n### Cloud and Local LLM Support\n\nAider connects to various LLM providers, with optimal support for:\n\n| Provider | Recommended Models |\n|----------|-------------------|\n| Anthropic | Claude 3.7 Sonnet |\n| DeepSeek | R1, Chat V3 |\n| OpenAI | o1, o3-mini, GPT-4o |\n| Local Models | Ollama, LM Studio compatible APIs |\n\nThe tool works best with LLM APIs but also supports interaction via web chat interfaces through copy/paste workflows.\n\n资料来源：[aider/website/index.html](https://github.com/Aider-AI/aider/blob/main/aider/website/index.html#L68-L85)\n\n### Multi-Language Support\n\nAider supports over 100 programming languages including:\n\n- Python, JavaScript, TypeScript\n- Rust, Go, Ruby\n- C++, PHP\n- HTML, CSS\n- And many more\n\n资料来源：[aider/website/index.html](https://github.com/Aider-AI/aider/blob/main/aider/website/index.html#L95-L105)\n\n### Git Integration\n\nAider automatically commits changes with sensible commit messages after each AI response. This integration allows developers to:\n\n- Track all AI-assisted changes\n- Use familiar Git tools to diff, manage, and undo changes\n- Maintain a complete history of modifications\n\n```bash\n# Example workflow\naider --model sonnet --api-key anthropic=<key>\n# Make changes via conversation\n# Aider auto-commits with descriptive messages\n```\n\n资料来源：[aider/website/index.html](https://github.com/Aider-AI/aider/blob/main/aider/website/index.html#L50-L60)\n\n### Codebase Mapping\n\nAider creates a comprehensive map of your entire codebase, enabling it to:\n\n- Understand project structure and dependencies\n- Make contextually appropriate changes in larger projects\n- Navigate and modify multiple files intelligently\n\n资料来源：[aider/website/index.html](https://github.com/Aider-AI/aider/blob/main/aider/website/index.html#L85-L95)\n\n## System Architecture\n\nThe architecture of Aider consists of several interconnected components that work together to provide the AI pair programming experience.\n\n```mermaid\ngraph TD\n    A[User Terminal] --> B[Aider CLI]\n    B --> C[InputOutput Module]\n    B --> D[LLM Connector]\n    D --> E[External LLM APIs]\n    B --> F[Git Manager]\n    B --> G[Codebase Mapper]\n    G --> H[Repository Files]\n    F --> H\n    C --> I[prompt_toolkit UI]\n    \n    style A fill:#e1f5fe\n    style E fill:#fff3e0\n    style H fill:#e8f5e9\n```\n\n### Component Overview\n\n| Component | Purpose |\n|-----------|---------|\n| CLI Entry Point | Parses arguments and initiates session |\n| InputOutput | Handles terminal I/O and UI rendering |\n| LLM Connector | Manages communication with LLM providers |\n| Git Manager | Handles version control operations |\n| Codebase Mapper | Analyzes and indexes project structure |\n\n资料来源：[aider/website/examples/complex-change.md](https://github.com/Aider-AI/aider/blob/main/aider/website/examples/complex-change.md)\n\n## Installation\n\nAider requires Python 3.9 through 3.12 and can be installed using pip or the official installer.\n\n### Quick Installation\n\n```bash\npython -m pip install aider-install\naider-install\n```\n\n### Direct pip Installation\n\n```bash\npip install aider-chat\n```\n\n### Manual Installation from Source\n\n```bash\ngit clone https://github.com/Aider-AI/aider.git\ncd aider\npip install -e .\n```\n\n资料来源：[aider/website/_includes/get-started.md](https://github.com/Aider-AI/aider/blob/main/aider/website/_includes/get-started.md)\n\n## Getting Started\n\n### Basic Usage\n\n1. Navigate to your project directory:\n\n```bash\ncd /to/your/project\n```\n\n2. Launch Aider with your preferred model:\n\n```bash\n# DeepSeek\naider --model deepseek --api-key deepseek=<key>\n\n# Claude 3.7 Sonnet\naider --model sonnet --api-key anthropic=<key>\n\n# OpenAI o3-mini\naider --model o3-mini --api-key openai=<key>\n```\n\n3. Start asking for changes:\n\n```bash\n# Create a new feature\n/add main.py\nPlease refactor the authenticate_user function to use JWT tokens\n\n# Modify existing code\n/add utils.py\nCan you add input validation to the parse_config function?\n```\n\n资料来源：[README.md](https://github.com/Aider-AI/aider/blob/main/README.md#L45-L75)\n\n### Interactive Workflow\n\n```mermaid\ngraph LR\n    A[Start Aider] --> B{Add files}\n    B --> C[Specify task]\n    C --> D[AI analyzes code]\n    D --> E[Proposes changes]\n    E --> F{User approves?}\n    F -->|Yes| G[Apply changes]\n    F -->|No| H[Provide feedback]\n    H --> C\n    G --> I[Auto-commit]\n    I --> J[Continue or exit]\n    J --> C\n```\n\n资料来源：[aider/website/examples/update-docs.md](https://github.com/Aider-AI/aider/blob/main/aider/website/examples/update-docs.md)\n\n## Configuration\n\nAider supports configuration through environment variables and command-line arguments.\n\n| Configuration | Environment Variable | Default | Description |\n|--------------|---------------------|---------|-------------|\n| Model | `AIDER_MODEL` | gpt-4 | LLM model to use |\n| API Key | Provider-specific | None | Authentication for LLM |\n| Pretty Output | `AIDER_PRETTY` | 1 (enabled) | Colorized terminal output |\n| Auto Commits | `AIDER_AUTO_COMMITS` | 1 (enabled) | Automatic Git commits |\n| Show Diffs | `AIDER_SHOW_DIFFS` | 0 (disabled) | Display diffs on commit |\n| History File | `AIDER_HISTORY_FILE` | .aider.history | Chat history storage |\n\n资料来源：[aider/website/examples/update-docs.md](https://github.com/Aider-AI/aider/blob/main/aider/website/examples/update-docs.md#L15-L30)\n\n## Advanced Features\n\n### Linting and Testing\n\nAider can automatically lint and test code after making changes. It integrates with your existing linters and test suites to ensure code quality.\n\n```bash\n# Enable auto-linting\naider --lint\n\n# Enable auto-testing\naider --test\n\n# Both together\naider --lint --test\n```\n\n资料来源：[aider/website/index.html](https://github.com/Aider-AI/aider/blob/main/aider/website/index.html#L115-L125)\n\n### Voice-to-Code\n\nSpeak with Aider about your code using voice input. Request new features, test cases, or bug fixes vocally.\n\n```bash\naider --voice\n```\n\n资料来源：[aider/website/index.html](https://github.com/Aider-AI/aider/blob/main/aider/website/index.html#L107-L115)\n\n### Images and Web Pages\n\nAdd images and web page references to provide visual context for your requests.\n\n```bash\n# Add screenshot reference\n/add screenshot.png\n\n# Add documentation URL\n/add https://api.example.com/docs\n```\n\n资料来源：[aider/website/index.html](https://github.com/Aider-AI/aider/blob/main/aider/website/index.html#L115-L125)\n\n### Web Chat Integration\n\nFor LLMs without API access, Aider supports copy/paste workflows with web chat interfaces. The tool streamlines transferring code context and edits between your terminal and browser.\n\n资料来源：[aider/website/index.html](https://github.com/Aider-AI/aider/blob/main/aider/website/index.html#L125-L135)\n\n## Example Workflows\n\n### Editing Existing Code\n\n```bash\n$ aider ./README.md aider/main.py\nAdded README.md to the chat\nAdded aider/main.py to the chat\n\n#### the cmd line args in main() have been updated. update the readme to accurately describe them.\n```\n\nAider will analyze the code changes and automatically update documentation to match.\n\n资料来源：[aider/website/examples/update-docs.md](https://github.com/Aider-AI/aider/blob/main/aider/website/examples/update-docs.md)\n\n### Styling and UI Changes\n\n```bash\n#### add some space inside the border of the blockquote\n\n```html\nindex.html\n<<<<<<< ORIGINAL\n    <style>\n      .main-content blockquote {\n        border: 0.1rem solid #159957;\n        border-radius: 0.5rem;\n        background-color: #e0f2ef;\n      }\n=======\n    <style>\n      .main-content blockquote {\n        border: 0.1rem solid #159957;\n        border-radius: 0.5rem;\n        background-color: #e0f2ef;\n        padding: 1rem;\n      }\n>>>>>>> UPDATED\n```\n\n> Applied edit to index.html\n> Commit dd7dcb6 aider: Added padding inside the border of the blockquote.\n\n资料来源：[aider/website/examples/chat-transcript-css.md](https://github.com/Aider-AI/aider/blob/main/aider/website/examples/chat-transcript-css.md)\n\n### Complex Refactoring\n\nAider can handle complex multi-file refactoring tasks:\n\n```python\n# Update InputOutput class\nclass InputOutput:\n    def __init__(self, pretty, yes, input_history_file, chat_history_file, input=None, output=None):\n        self.input = input\n        self.output = output\n```\n\nAider will identify all affected files and apply changes systematically, committing each step with descriptive messages.\n\n资料来源：[aider/website/examples/complex-change.md](https://github.com/Aider-AI/aider/blob/main/aider/website/examples/complex-change.md)\n\n## Development Guidelines\n\nWhen contributing to Aider or using it for project development, follow these standards:\n\n| Standard | Tool | Configuration |\n|----------|------|---------------|\n| Code Style | PEP 8 | Max line length: 100 |\n| Import Sorting | isort | Configured per project |\n| Code Formatting | Black | Default settings |\n| Testing | pytest | `aider/tests/test_*.py` |\n\nAider does not use type hints in its codebase.\n\n资料来源：[CONTRIBUTING.md](https://github.com/Aider-AI/aider/blob/main/CONTRIBUTING.md)\n\n## Resources and Documentation\n\n| Resource | URL |\n|----------|-----|\n| Official Website | https://aider.chat/ |\n| Installation Guide | https://aider.chat/docs/install.html |\n| Usage Documentation | https://aider.chat/docs/usage.html |\n| LLM Configuration | https://aider.chat/docs/llms.html |\n| Configuration Options | https://aider.chat/docs/config.html |\n| GitHub Repository | https://github.com/Aider-AI/aider |\n| Discord Community | https://discord.gg/Y7X7bhMQFV |\n\n## Summary\n\nAider transforms the terminal into an AI-powered development environment. By combining natural language processing with Git integration and codebase awareness, it enables developers to:\n\n- Rapidly prototype and implement features\n- Refactor existing code with confidence\n- Maintain comprehensive change histories\n- Work with multiple programming languages and LLM providers\n\nThe tool's emphasis on Git-based versioning and its ability to work across 100+ programming languages make it a versatile addition to any developer's toolkit.\n\n---\n\n<a id='page-installation'></a>\n\n## Installation and Setup\n\n### 相关页面\n\n相关主题：[Introduction to Aider](#page-introduction)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [pyproject.toml](https://github.com/Aider-AI/aider/blob/main/pyproject.toml)\n- [requirements.txt](https://github.com/Aider-AI/aider/blob/main/requirements.txt)\n- [docker/Dockerfile](https://github.com/Aider-AI/aider/blob/main/docker/Dockerfile)\n- [aider/website/docs/install.md](https://github.com/Aider-AI/aider/blob/main/aider/website/docs/install.md)\n- [requirements/requirements-dev.txt](https://github.com/Aider-AI/aider/blob/main/requirements/requirements-dev.txt)\n- [requirements/requirements-help.txt](https://github.com/Aider-AI/aider/blob/main/requirements/requirements-help.txt)\n- [CONTRIBUTING.md](https://github.com/Aider-AI/aider/blob/main/CONTRIBUTING.md)\n</details>\n\n# Installation and Setup\n\n## Overview\n\nAider is an AI pair programming tool that integrates with Large Language Models (LLMs) to help developers write, edit, and manage code directly from the terminal. The installation and setup process is designed to be straightforward, supporting multiple installation methods to accommodate different user preferences and system configurations.\n\nThe project supports Python versions 3.9, 3.10, 3.11, and 3.12, making it compatible with most modern Python environments. 资料来源：[CONTRIBUTING.md:1]()\n\n## System Requirements\n\n### Python Environment\n\n| Requirement | Specification |\n|-------------|---------------|\n| Python Version | 3.9, 3.10, 3.11, 3.12 |\n| Package Manager | pip, uv, or conda |\n| Operating System | Linux, macOS, Windows (via WSL) |\n\n### Core Dependencies\n\nAider's core dependencies include:\n\n| Package | Purpose |\n|---------|---------|\n| aiohttp 3.13.3 | Async HTTP client/server |\n| litellm | LLM interface abstraction |\n| openai | OpenAI API integration |\n| gitpython 3.1.46 | Git repository integration |\n| prompt-toolkit 3.0.52 | Terminal UI components |\n| fastapi 0.135.1 | REST API support |\n| pytest 9.0.2 | Testing framework |\n\n资料来源：[requirements.txt:1-50]()\n\n## Installation Methods\n\n### Method 1: pip Installation\n\nThe standard installation method uses pip:\n\n```bash\npip install aider-aider\n```\n\n### Method 2: uv Package Manager\n\nFor faster dependency resolution, use uv:\n\n```bash\nuv pip install aider-aider\n```\n\n### Method 3: Docker Installation\n\nAider provides a Docker image for isolated execution. The Dockerfile sets up the complete environment:\n\n```dockerfile\nFROM python:3.12-slim\nWORKDIR /app\nCOPY . .\nRUN pip install --no-cache-dir -e .\nCMD [\"aider\"]\n```\n\n资料来源：[docker/Dockerfile:1-5]()\n\n### Method 4: Development Installation\n\nFor contributors setting up a development environment:\n\n```bash\n# Clone the repository\ngit clone https://github.com/Aider-AI/aider.git\ncd aider\n\n# Install dependencies\npip install -e .\n\n# Install development dependencies\npip install -r requirements/requirements-dev.txt\n```\n\n资料来源：[CONTRIBUTING.md:1-30]()\n\n## Dependency Groups\n\nAider uses modular dependency groups to support different feature sets:\n\n### Core Dependencies (requirements.txt)\n\nThe main requirements file includes essential packages for basic functionality:\n\n| Group | Key Packages |\n|-------|--------------|\n| LLM Integration | litellm, openai, anthropic, huggingface-hub |\n| Git Operations | gitpython, gitdb |\n| Terminal UI | prompt-toolkit, rich |\n| HTTP/Async | aiohttp, httpx, anyio |\n| Configuration | configargparse, diskcache |\n\n资料来源：[requirements.txt:1-100]()\n\n### Optional Dependency Groups\n\n| Group | Purpose | Location |\n|-------|---------|----------|\n| requirements-help.in | Help system features | Rich documentation output |\n| requirements-browser.in | Browser automation | Playwright for web testing |\n| requirements-playwright.in | Playwright testing | E2E test automation |\n\n资料来源：[requirements/requirements-help.txt:1-30](), [requirements/requirements-browser.txt:1-30](), [requirements/requirements-playwright.txt:1-20]()\n\n### Development Dependencies\n\nDevelopment setup requires additional tooling:\n\n```bash\n# Install all development dependencies\npip install -r requirements/requirements-dev.txt\n```\n\n| Package | Purpose |\n|---------|---------|\n| pytest 9.0.2 | Test runner |\n| pytest-cov 7.0.0 | Code coverage |\n| pytest-env 1.6.0 | Environment variable management |\n| black | Code formatting |\n| isort | Import sorting |\n| flake8 7.3.0 | Linting |\n| pre-commit | Git hook management |\n| uv 0.10.11 | Fast package resolver |\n\n资料来源：[requirements/requirements-dev.txt:1-80]()\n\n## Development Setup\n\n### Pre-commit Hooks\n\nThe project uses pre-commit hooks to maintain code quality. Install them after cloning:\n\n```bash\npip install pre-commit\npre-commit install\n```\n\nThe hooks automatically run formatting checks (isort, Black) and linting (flake8) before each commit.\n\n资料来源：[CONTRIBUTING.md:1-30]()\n\n### Code Style Standards\n\n| Standard | Configuration |\n|----------|---------------|\n| Style Guide | PEP 8 |\n| Max Line Length | 100 characters |\n| Import Sorting | isort |\n| Code Formatting | Black |\n\n### Running Tests\n\n```bash\n# Run all tests\npytest\n\n# Run with coverage\npytest --cov=aider\n\n# Run specific test file\npytest aider/tests/test_*.py\n```\n\nTest files are located in `aider/tests/` directory following the `test_*.py` naming convention.\n\n资料来源：[CONTRIBUTING.md:1-30]()\n\n## Installation Flow Diagram\n\n```mermaid\ngraph TD\n    A[Start Installation] --> B{Check Python Version}\n    B -->|3.9-3.12| C[Choose Installation Method]\n    B -->|Invalid| D[Show Error: Python 3.9+ required]\n    \n    C --> E[pip install]\n    C --> F[uv pip install]\n    C --> G[Docker]\n    C --> H[Development install]\n    \n    E --> I[Install core dependencies]\n    F --> I\n    G --> J[Build Docker image]\n    H --> K[Install with -e flag]\n    H --> L[Install dev dependencies]\n    \n    I --> M[Installation Complete]\n    J --> M\n    K --> L\n    L --> M\n```\n\n## Environment Configuration\n\n### Environment Variables\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| AIDER_AUTO_COMMITS | 1 | Enable auto commits |\n| AIDER_SHOW_DIFFS | 0 | Show diffs on commit |\n| AIDER_NORECORD | 0 | Disable command recording |\n\n### Configuration Files\n\nAider supports configuration via:\n\n1. `~/.aider.conf.yml` - User-level settings\n2. `.aider.conf.yml` in project root - Project-level settings\n3. Command-line arguments - Session-specific overrides\n\n## Troubleshooting Installation Issues\n\n### Common Issues\n\n| Issue | Solution |\n|-------|----------|\n| Python version mismatch | Verify with `python --version`, use pyenv or virtualenv |\n| Permission denied | Use `--user` flag or virtual environment |\n| Missing git | Install git and ensure it's in PATH |\n| SSL/TLS errors | Check corporate firewall or proxy settings |\n\n### Verification\n\nAfter installation, verify setup:\n\n```bash\naider --version\naider --help\n```\n\n## Summary\n\nAider's installation and setup process supports multiple methods to accommodate various user preferences:\n\n- **pip/uv**: Quick installation for end users\n- **Docker**: Isolated environment without local Python conflicts\n- **Development**: Full setup for contributors with testing and linting tools\n\nThe modular dependency system allows users to install only the features they need, keeping the base installation lightweight while providing optional support for advanced features like browser automation and help system enhancements.\n\n资料来源：[CONTRIBUTING.md:1-30](), [requirements.txt:1-50](), [docker/Dockerfile:1-5]()\n\n---\n\n<a id='page-quickstart'></a>\n\n## Quick Start Guide\n\n### 相关页面\n\n相关主题：[Introduction to Aider](#page-introduction)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [README.md](https://github.com/Aider-AI/aider/blob/main/README.md)\n- [aider/website/index.html](https://github.com/Aider-AI/aider/blob/main/aider/website/index.html)\n- [aider/website/_includes/get-started.md](https://github.com/Aider-AI/aider/blob/main/aider/website/_includes/get-started.md)\n- [aider/website/examples/complex-change.md](https://github.com/Aider-AI/aider/blob/main/aider/website/examples/complex-change.md)\n- [aider/website/examples/no-color.md](https://github.com/Aider-AI/aider/blob/main/aider/website/examples/no-color.md)\n- [CONTRIBUTING.md](https://github.com/Aider-AI/aider/blob/main/CONTRIBUTING.md)\n</details>\n\n# Quick Start Guide\n\nAider is an AI pair programming tool that integrates Large Language Models (LLMs) directly into your terminal workflow. This guide provides the essential steps to install, configure, and begin using Aider for code development and modification.\n\n## Installation\n\n### Prerequisites\n\n| Requirement | Details |\n|-------------|---------|\n| Python Version | 3.9, 3.10, 3.11, or 3.12 资料来源：[CONTRIBUTING.md:1]() |\n| Package Manager | pip |\n| LLM API Access | API key for your chosen provider |\n\n### Quick Installation Methods\n\n**Method 1: Automated Installer (Recommended)**\n\n```bash\npython -m pip install aider-install\naider-install\n```\n\n资料来源：[aider/website/index.html:1]()\n\n**Method 2: Direct pip Installation**\n\n```bash\npip install aider-chat\n```\n\n资料来源：[README.md:1]()\n\n### Supported LLM Providers\n\nAider supports multiple LLM providers including:\n\n| Provider | Model Examples |\n|----------|---------------|\n| OpenAI | o1, o3-mini, GPT-4o |\n| Anthropic | Claude 3.7 Sonnet |\n| DeepSeek | DeepSeek models |\n| Local Models | Almost any LLM via API or web interface |\n\n资料来源：[aider/website/index.html:1]()\n\n## Initial Setup\n\n### Step 1: Navigate to Your Project\n\nChange directory into the codebase you want to work on:\n\n```bash\ncd /to/your/project\n```\n\n资料来源：[aider/website/_includes/get-started.md:1]()\n\n### Step 2: Configure API Key\n\nYou can provide your API key via command line or environment variable:\n\n```bash\n# Via command line\naider --model sonnet --api-key anthropic=<your-key>\n\n# Via environment variable\nexport ANTHROPIC_API_KEY=<your-key>\naider --model sonnet\n```\n\n资料来源：[aider/website/index.html:1]()\n\n### Step 3: Launch Aider\n\nStart a coding session with your preferred model:\n\n```bash\n# DeepSeek\naider --model deepseek --api-key deepseek=<key>\n\n# Claude 3.7 Sonnet\naider --model sonnet --api-key anthropic=<key>\n\n# o3-mini\naider --model o3-mini --api-key openai=<key>\n```\n\n资料来源：[aider/website/_includes/get-started.md:1]()\n\n## Core Workflow\n\n```mermaid\ngraph TD\n    A[Launch Aider] --> B[Load Codebase]\n    B --> C[Chat with LLM]\n    C --> D[Review Changes]\n    D --> E{Accept?}\n    E -->|Yes| F[Auto-commit Changes]\n    E -->|No| G[Continue Editing]\n    F --> H[Git Integration]\n    G --> C\n    H --> I[Session Complete]\n```\n\n### Workflow Description\n\n1. **Launch**: Start Aider from your project directory\n2. **Load**: Aider automatically maps your codebase 资料来源：[aider/website/index.html:1]()\n3. **Chat**: Describe changes in natural language\n4. **Review**: Examine proposed modifications\n5. **Commit**: Aider automatically commits with sensible messages\n\n## Command Line Options\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `--model` | LLM model to use | Required |\n| `--api-key` | API key for the provider | Required |\n| `--no-auto-commits` | Disable auto commit | Disabled |\n| `--show-diffs` | Show diffs when committing | False |\n| `--yes` | Auto-confirm all prompts | False |\n| `--no-color` | Disable colored output | Auto-detect |\n\n资料来源：[aider/website/examples/update-docs.md:1]()\n\n## Input/Output Configuration\n\nAider uses the `InputOutput` class to handle terminal interaction. The class supports custom input/output streams for testing and special environments:\n\n```python\ndef __init__(\n    self,\n    pretty=True,\n    yes=False,\n    input_history_file=None,\n    chat_history_file=None,\n    input=None,\n    output=None,\n    user_input_color=\"blue\",\n    tool_output_color=None,\n    tool_error_color=\"red\",\n):\n```\n\n资料来源：[aider/website/examples/no-color.md:1]()\n\n### Color Output Behavior\n\nAider respects the `NO_COLOR` environment variable. If set, Aider disables colored output automatically:\n\n```bash\nexport NO_COLOR=1\naider --model sonnet\n```\n\n资料来源：[aider/website/examples/no-color.md:1]()\n\n## Git Integration\n\nAider provides seamless Git integration:\n\n```mermaid\ngraph LR\n    A[Make Changes] --> B[Auto-Commit]\n    B --> C[Sensible Commit Messages]\n    C --> D[Use Standard Git Tools]\n    D --> E[Diff, Undo, Manage]\n```\n\nKey features:\n- Automatic commit creation with descriptive messages\n- Full compatibility with standard Git workflows\n- Easy diffing and undoing of AI changes 资料来源：[aider/website/index.html:1]()\n\n## Interactive Session Example\n\nA typical Aider session looks like:\n\n```\n$ aider --model sonnet\n>>> Add a new function to calculate fibonacci numbers\n```\n\nAider will:\n1. Analyze your codebase\n2. Propose the necessary changes\n3. Show you the diff\n4. Apply changes upon confirmation\n5. Commit with a meaningful message\n\n资料来源：[aider/website/examples/complex-change.md:1]()\n\n## Next Steps\n\n| Topic | Link |\n|-------|------|\n| Installation Guide | [/docs/install.html]() |\n| Usage Guide | [/docs/usage.html]() |\n| Configuration Options | [/docs/config.html]() |\n| Connecting to LLMs | [/docs/llms.html]() |\n| Troubleshooting | [/docs/troubleshooting.html]() |\n| FAQ | [/docs/faq.html]() |\n\n资料来源：[aider/website/index.html:1]()\n\n---\n\n<a id='page-core-architecture'></a>\n\n## Core Architecture\n\n### 相关页面\n\n相关主题：[Main Application Flow](#page-main-flow), [Model Integration System](#page-model-integration)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [aider/main.py](https://github.com/Aider-AI/aider/blob/main/aider/main.py)\n- [aider/io.py](https://github.com/Aider-AI/aider/blob/main/aider/io.py)\n- [aider/coders/base_coder.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/base_coder.py)\n- [aider/repo.py](https://github.com/Aider-AI/aider/blob/main/aider/repo.py)\n- [aider/coders/__init__.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/__init__.py)\n- [aider/getinput.py](https://github.com/Aider-AI/aider/blob/main/aider/getinput.py)\n</details>\n\n# Core Architecture\n\n## Overview\n\nAider is an AI pair programming tool that integrates with Large Language Models (LLMs) to enable collaborative coding directly in the terminal. The core architecture is designed around a modular system that separates concerns between user interaction, repository management, code editing, and LLM communication.\n\nThe architecture follows a layered approach where the main entry point handles CLI parsing and orchestration, while specialized modules manage input/output operations, repository interactions, and code modification. This separation allows Aider to work with various LLM providers while maintaining a consistent interface for users.\n\n## System Architecture Diagram\n\n```mermaid\ngraph TD\n    A[CLI Entry Point] --> B[InputOutput Manager]\n    A --> C[Repository Manager]\n    A --> D[Coder Engine]\n    B --> E[prompt_toolkit]\n    C --> F[Git Operations]\n    D --> G[LLM Adapter]\n    G --> H[Anthropic/OpenAI/Local Models]\n    D --> I[File System Operations]\n```\n\n## Core Components\n\n### Entry Point and CLI Handling\n\nThe `main()` function in `aider/main.py` serves as the primary entry point, responsible for parsing command-line arguments, initializing core components, and managing the main application loop. This function coordinates the interaction between the InputOutput manager, repository handler, and coder engine.\n\n资料来源：[aider/main.py:1-100]()\n\nThe CLI argument parsing utilizes Python's `argparse` module to support various configuration options including model selection, API key specification, auto-commit behavior, and diff display settings. The main function accepts `input` and `output` keyword arguments, enabling programmatic usage and testability.\n\n### InputOutput System\n\nThe InputOutput class in `aider/io.py` provides a unified interface for all user interaction, handling console output formatting, user confirmation prompts, and input collection. This class abstracts away the complexity of terminal handling and color output.\n\n资料来源：[aider/io.py:1-80]()\n\nThe InputOutput system supports the following key features:\n\n| Feature | Description | Configuration |\n|---------|-------------|---------------|\n| Pretty Output | Formatted console output with colors | `pretty` parameter |\n| Auto-yes Mode | Skip confirmation prompts | `yes` parameter |\n| Color Configuration | Customizable output colors | `user_input_color`, `tool_output_color`, `tool_error_color` |\n| NO_COLOR Support | Respects environment variable | Automatic detection |\n| History Management | Input and chat history files | `input_history_file`, `chat_history_file` |\n\n#### Color Handling\n\nThe InputOutput class implements sophisticated color handling that respects the `NO_COLOR` environment variable. When `NO_COLOR` is set and non-empty, the system automatically disables colored output regardless of other configuration settings.\n\n```python\nno_color = os.environ.get(\"NO_COLOR\")\nif no_color is not None and no_color != \"\":\n    pretty = False\n```\n\n资料来源：[aider/io.py:40-45]()\n\nThis design follows the NO_COLOR standard and ensures compatibility with terminals and build systems that do not support ANSI color codes.\n\n### Repository Management\n\nThe repository module (`aider/repo.py`) handles all Git operations, providing Aider with the ability to track file changes, manage commits, and maintain a history of AI-assisted modifications. This integration is fundamental to Aider's workflow, enabling users to review, diff, and undo changes using familiar Git tools.\n\n资料来源：[aider/repo.py:1-100]()\n\n### Coder Engine Architecture\n\nThe coder system forms the core of Aider's code modification capabilities. The base coder class defines the interface and common functionality that all language-specific coders inherit. This abstraction allows Aider to work with different programming languages while maintaining consistent editing behavior.\n\n资料来源：[aider/coders/base_coder.py:1-150]()\n\n```mermaid\nclassDiagram\n    class BaseCoder {\n        +edit_file()\n        +run()\n        +commit()\n        +check_git()\n    }\n    class CoderA {\n        +run()\n    }\n    class CoderB {\n        +run()\n    }\n    BaseCoder <|-- CoderA\n    BaseCoder <|-- CoderB\n```\n\nThe coder engine communicates with LLMs through adapters that normalize the interface across different providers. This design enables Aider to support multiple LLM backends including Anthropic Claude, OpenAI GPT models, DeepSeek, and local models.\n\n## Data Flow\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant IO as InputOutput\n    participant Repo as Repository\n    participant Coder as Coder Engine\n    participant LLM as Language Model\n    \n    User->>IO: Submit request\n    IO->>Coder: Forward message\n    Coder->>Repo: Check git status\n    Repo-->>Coder: Return status\n    Coder->>LLM: Send context + request\n    LLM-->>Coder: Return response\n    Coder->>Repo: Apply changes\n    Repo-->>Coder: Commit result\n    Coder->>IO: Display result\n    IO-->>User: Show output\n```\n\n## Configuration and Initialization\n\nThe initialization sequence follows a specific order to ensure all components are properly configured before use:\n\n1. Parse CLI arguments and load configuration from environment variables\n2. Initialize InputOutput with appropriate settings\n3. Create repository manager and validate git status\n4. Instantiate coder engine with LLM adapter\n5. Begin interactive session\n\n| Step | Component | Key Responsibilities |\n|------|-----------|---------------------|\n| 1 | ArgumentParser | CLI parsing, config loading |\n| 2 | InputOutput | Console setup, color configuration |\n| 3 | Repo | Git initialization, file tracking |\n| 4 | Coder | LLM connection, edit management |\n| 5 | Session | Main loop, user interaction |\n\n## Environment Variable Configuration\n\nAider supports extensive configuration through environment variables, allowing customization of core behaviors:\n\n| Variable | Default | Purpose |\n|----------|---------|---------|\n| `NO_COLOR` | None | Disable all color output |\n| `AIDER_AUTO_COMMITS` | 1 | Enable auto-commit feature |\n| `AIDER_SHOW_DIFFS` | 0 | Display diffs on commit |\n| `AIDER_MODEL` | None | Default LLM model |\n| `AIDER_API_KEY` | None | API key for LLM provider |\n\n资料来源：[aider/main.py:80-120]()\n\n## Testing Architecture\n\nThe InputOutput system supports dependency injection for testing purposes. The `input` and `output` parameters allow tests to provide mock or StringIO-based streams, enabling comprehensive testing of user interaction flows without terminal dependencies.\n\n```python\ndef __init__(self, ..., input=None, output=None, ...):\n    self.input = input\n    self.output = output\n```\n\n资料来源：[aider/io.py:25-30]()\n\nThis design pattern facilitates unit testing and integration testing by decoupling the I/O operations from the main logic, allowing tests to simulate various input scenarios and capture output for verification.\n\n## Module Dependencies\n\n```mermaid\ngraph LR\n    A[main.py] --> B[io.py]\n    A --> C[repo.py]\n    A --> D[coders/__init__.py]\n    B --> E[prompt_toolkit]\n    D --> F[base_coder.py]\n    F --> G[llm adapters]\n```\n\nThe dependency structure ensures that core functionality is isolated in foundational modules while higher-level components build upon them. This architecture supports maintainability and enables independent testing of each component.\n\n---\n\n<a id='page-main-flow'></a>\n\n## Main Application Flow\n\n### 相关页面\n\n相关主题：[Core Architecture](#page-core-architecture)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [aider/main.py](https://github.com/Aider-AI/aider/blob/main/aider/main.py)\n- [aider/__main__.py](https://github.com/Aider-AI/aider/blob/main/aider/__main__.py)\n- [aider/commands.py](https://github.com/Aider-AI/aider/blob/main/aider/commands.py)\n- [aider/sendchat.py](https://github.com/Aider-AI/aider/blob/main/aider/sendchat.py)\n- [aider/getinput.py](https://github.com/Aider-AI/aider/blob/main/aider/getinput.py)\n</details>\n\n# Main Application Flow\n\n## Overview\n\nThe Main Application Flow encompasses the entire lifecycle of an Aider session, from initialization through user interaction to AI-assisted code editing. Aider is an AI pair programming tool that integrates with Large Language Models (LLMs) to help developers modify codebases through natural language commands.\n\nThe application flow is designed around a command-driven architecture where user input is parsed, executed, or sent to the LLM for processing. Aider supports multiple LLM providers including Anthropic (Claude), OpenAI, DeepSeek, and local models.\n\n## Application Entry Points\n\n### Primary Entry: `__main__.py`\n\nThe `aider/__main__.py` file serves as the package entry point when running `python -m aider`. This module delegates to the main function in `aider/main.py`.\n\n```python\n# aider/__main__.py delegates to main.py\n```\n\n### Main Function: `main.py`\n\nThe `main()` function in `aider/main.py` orchestrates the entire application lifecycle. Based on chat transcript examples, it accepts the following keyword arguments:\n\n| Parameter | Type | Purpose |\n|-----------|------|---------|\n| `input` | file-like object | Input source for REPL (default: sys.stdin) |\n| `output` | file-like object | Output destination (default: sys.stdout) |\n\n资料来源：[aider/main.py](https://github.com/Aider-AI/aider/blob/main/aider/main.py)\n\n## Core Components\n\n### InputOutput Class\n\nThe `InputOutput` class in `aider/getinput.py` manages all user interaction. It wraps prompt_toolkit's functionality and handles:\n\n- Pretty/colorized terminal output\n- User confirmation prompts (`yes` flag)\n- Chat history file management\n- Input history file management\n- Terminal input/output streams\n\n资料来源：[aider/getinput.py](https://github.com/Aider-AI/aider/blob/main/aider/getinput.py)\n\n### Command Processing\n\nCommands in Aider are prefixed with `/` and processed by the `commands.py` module. Available commands include:\n\n| Command | Description |\n|---------|-------------|\n| `/quit` or `/exit` | Exit the application |\n| `/help` | Display available commands |\n| `/commit` | Manually commit changes |\n| `/diff` | Show current changes |\n| `/undo` | Revert last AI change |\n\n资料来源：[aider/commands.py](https://github.com/Aider-AI/aider/blob/main/aider/commands.py)\n\n### Chat Transmission\n\nThe `sendchat.py` module handles communication with LLM APIs. It constructs requests, sends them to the configured model, and processes responses.\n\n资料来源：[aider/sendchat.py](https://github.com/Aider-AI/aider/blob/main/aider/sendchat.py)\n\n## Application Flow Diagram\n\n```mermaid\ngraph TD\n    Start([User launches Aider]) --> Init[Initialize Application]\n    Init --> LoadConfig[Load Configuration]\n    LoadConfig --> SetupIO[Setup InputOutput]\n    SetupIO --> CheckModel[Validate LLM Model]\n    CheckModel --> RepoMap[Build Repository Map]\n    RepoMap --> REPL[Enter REPL Loop]\n    \n    REPL --> ReadInput[Read User Input]\n    ReadInput --> IsCommand{Is Command?}\n    IsCommand -->|Yes| ExecCmd[Execute Command]\n    ExecCmd --> REPL\n    IsCommand -->|No| SendToLLM[Send to LLM]\n    \n    SendToLLM --> ReceiveResponse[Receive LLM Response]\n    ReceiveResponse --> ApplyChanges[Apply Code Changes]\n    ApplyChanges --> AutoCommit[Auto-commit Changes]\n    AutoCommit --> REPL\n    \n    ApplyChanges -->|Errors Found| LintTest[Run Lint/Tests]\n    LintTest --> FixIssues[Fix Detected Issues]\n    FixIssues --> AutoCommit\n    \n    ReadInput -->|Exit Command| End([Session Ended])\n```\n\n## Session Lifecycle\n\n### 1. Initialization Phase\n\n1. Parse command-line arguments and environment variables\n2. Initialize the `InputOutput` class with user preferences\n3. Configure the LLM model based on `--model` flag or `AIDER_MODEL` environment variable\n4. Set up API credentials from `--api-key` or respective environment variables\n\n### 2. Repository Preparation Phase\n\n1. Build a map of the codebase (repository map) for context\n2. Identify and load relevant files based on user specification\n3. Initialize git integration for change tracking\n\n### 3. Interactive REPL Phase\n\nThe core interaction loop operates as follows:\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant REPL\n    participant Commands\n    participant LLM\n    participant Git\n    \n    User->>REPL: Input command/message\n    REPL->>Commands: Check for /command\n    alt Is slash command\n        Commands->>Commands: Execute built-in\n        Commands->>Git: Optionally commit/diff\n    else Is chat message\n        REPL->>LLM: Send to model\n        LLM->>REPL: Return response\n        REPL->>Git: Auto-commit changes\n    end\n    REPL->>User: Display output\n```\n\n### 4. Automatic Commit Flow\n\nAider automatically commits changes after each AI-assisted modification:\n\n```mermaid\ngraph LR\n    A[AI Edits Code] --> B[Generate Commit Message]\n    B --> C[Commit to Git]\n    C --> D[Store in History]\n```\n\nThe commit behavior can be controlled via:\n- `--no-auto-commits` flag\n- `AIDER_AUTO_COMMITS` environment variable (0 to disable)\n\n资料来源：[README.md](https://github.com/Aider-AI/aider/blob/main/README.md)\n\n## Configuration and Environment\n\n### Supported Python Versions\n\nAider supports Python 3.9 through 3.12.\n\n资料来源：[CONTRIBUTING.md](https://github.com/Aider-AI/aider/blob/main/CONTRIBUTING.md)\n\n### Environment Variables\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `AIDER_MODEL` | gpt-4 | Default LLM model |\n| `AIDER_API_KEY` | - | API key for the model |\n| `AIDER_AUTO_COMMITS` | 1 | Enable auto-commits |\n| `AIDER_SHOW_DIFFS` | 0 | Show diffs on commit |\n| `AIDER_HISTORY_FILE` | .aider.history | Chat history file |\n| `AIDER_PRETTY` | 1 | Enable colored output |\n\n## Testing Integration\n\nAider integrates with linting and testing tools:\n\n```mermaid\ngraph TD\n    A[AI Makes Changes] --> B{Config Enabled?}\n    B -->|Yes| C[Run Linters]\n    C --> D{Issues Found?}\n    D -->|Yes| E[AI Fixes Issues]\n    E --> F[Run Tests]\n    D -->|No| F\n    F --> G{Tests Pass?}\n    G -->|No| H[AI Fixes Tests]\n    H --> F\n    G -->|Yes| I[Commit Changes]\n```\n\n资料来源：[aider/website/index.html](https://github.com/Aider-AI/aider/blob/main/aider/website/index.html)\n\n## Error Handling\n\nThe application handles various error scenarios:\n\n1. **API Errors**: Retry logic with user notification\n2. **Git Conflicts**: User confirmation for resolution\n3. **Invalid Commands**: Display help message\n4. **File Access Errors**: Clear error messages with suggestions\n\n## Data Flow\n\n```mermaid\ngraph LR\n    subgraph Input\n        CLI[CLI Args] --> Env[Env Variables]\n        Env --> Config[Configuration]\n    end\n    \n    subgraph Processing\n        Config --> Main[main.py]\n        Main --> IO[InputOutput]\n        IO --> REPL[REPL Loop]\n        REPL --> Cmd[commands.py]\n        REPL --> Chat[sendchat.py]\n    end\n    \n    subgraph Output\n        Chat --> Response[LLM Response]\n        Response --> Diff[Git Diff]\n        Diff --> Commit[Auto-commit]\n    end\n```\n\n## Key Module Responsibilities\n\n| Module | Responsibility |\n|--------|----------------|\n| `__main__.py` | Package entry point, calls main() |\n| `main.py` | Application orchestration, argument parsing |\n| `getinput.py` | User I/O, prompt_toolkit integration |\n| `commands.py` | Built-in command processing |\n| `sendchat.py` | LLM API communication |\n\n## Conclusion\n\nThe Main Application Flow demonstrates Aider's architecture as a well-structured CLI tool that bridges human programming intent with AI capabilities. The flow prioritizes user experience through automatic git integration, clear feedback, and seamless LLM interaction while maintaining testability through configurable input/output streams for testing purposes.\n\n---\n\n<a id='page-model-integration'></a>\n\n## Model Integration System\n\n### 相关页面\n\n相关主题：[Chat Communication Protocol](#page-chat-communication), [Core Architecture](#page-core-architecture)\n\n<details>\n<summary>Related Source Files</summary>\n\n以下源码文件用于生成本页说明：\n\n- [aider/llm.py](https://github.com/Aider-AI/aider/blob/main/aider/llm.py) *(Not available in context)*\n- [aider/models.py](https://github.com/Aider-AI/aider/blob/main/aider/models.py) *(Not available in context)*\n- [aider/sendchat.py](https://github.com/Aider-AI/aider/blob/main/aider/sendchat.py) *(Not available in context)*\n- [aider/openrouter.py](https://github.com/Aider-AI/aider/blob/main/aider/openrouter.py) *(Not available in context)*\n- [aider/resources/model-metadata.json](https://github.com/Aider-AI/aider/blob/main/aider/resources/model-metadata.json) *(Not available in context)*\n- [aider/resources/model-settings.yml](https://github.com/Aider-AI/aider/blob/main/aider/resources/model-settings.yml) *(Not available in context)*\n\n**Note:** The requested source files were not included in the provided context. This page is generated based on context from README.md, requirements files, and website documentation.\n</details>\n\n# Model Integration System\n\nThe Model Integration System is Aider's core abstraction layer for connecting to and interacting with Large Language Models (LLMs). It provides a unified interface that allows Aider to work with multiple LLM providers including OpenAI, Anthropic, DeepSeek, and OpenRouter, while abstracting away provider-specific implementation details.\n\n## Overview\n\nAider's architecture separates the concerns of LLM communication from the main application logic. The Model Integration System handles:\n\n- **Provider Abstraction**: Uniform API for different LLM backends\n- **Model Configuration**: Settings and metadata for supported models\n- **Chat Communication**: Sending prompts and receiving responses\n- **Token Management**: Tracking usage and costs\n- **Error Handling**: Provider-specific error recovery\n\n资料来源：[README.md](https://github.com/Aider-AI/aider/blob/main/README.md)\n\n## Architecture Overview\n\n```mermaid\ngraph TD\n    A[User Interface] --> B[Core Application]\n    B --> C[Model Integration Layer]\n    C --> D[LLM Provider Adapters]\n    \n    D --> E[OpenAI API]\n    D --> F[Anthropic API]\n    D --> G[DeepSeek API]\n    D --> H[OpenRouter Gateway]\n    \n    C --> I[Model Settings]\n    C --> J[Model Metadata]\n    \n    style C fill:#e1f5fe\n    style D fill:#fff3e0\n```\n\n## Supported Models\n\nBased on the project's documentation, Aider supports the following model families:\n\n| Provider | Models | API Type |\n|----------|--------|----------|\n| OpenAI | GPT-4o, o1, o3-mini, GPT-3.5-turbo | REST API |\n| Anthropic | Claude 3.7 Sonnet, Claude 3 Opus | REST API |\n| DeepSeek | DeepSeek models | REST API |\n| OpenRouter | 100+ third-party models | Unified Gateway |\n| Local Models | Various via OLLAMA | Local API |\n\n资料来源：[aider/website/index.html](https://github.com/Aider-AI/aider/blob/main/aider/website/index.html)\n\n## Core Components\n\n### Model Configuration\n\nModels are configured through command-line arguments and environment variables:\n\n```bash\n# Using model flag\naider --model sonnet --api-key anthropic=<key>\n\n# Using DeepSeek\naider --model deepseek --api-key deepseek=<key>\n\n# Using OpenAI\naider --model o3-mini --api-key openai=<key>\n```\n\n### Environment Variables\n\n| Variable | Purpose | Example |\n|----------|---------|---------|\n| `AIDER_MODEL` | Default model selection | `sonnet`, `gpt-4o` |\n| `ANTHROPIC_API_KEY` | Anthropic authentication | `sk-ant-...` |\n| `OPENAI_API_KEY` | OpenAI authentication | `sk-...` |\n| `DEEPSEEK_API_KEY` | DeepSeek authentication | `<key>` |\n| `OPENROUTER_API_KEY` | OpenRouter authentication | `sk-or-...` |\n\n资料来源：[aider/website/_includes/get-started.md](https://github.com/Aider-AI/aider/blob/main/aider/website/_includes/get-started.md)\n\n## Dependency Architecture\n\nThe Model Integration System relies on several key dependencies for LLM communication:\n\n```mermaid\ngraph LR\n    A[LLM Integration] --> B[OpenAI Python SDK]\n    A --> C[Anthropic SDK]\n    A --> D[llama-index-core]\n    A --> E[transformers]\n    A --> F[sentence-transformers]\n    A --> G[tiktoken]\n    \n    B --> H[grpcio]\n    C --> I[aiohttp]\n    D --> J[torch]\n    E --> K[huggingface-hub]\n```\n\n### Key Dependencies\n\n| Package | Version | Purpose |\n|---------|---------|---------|\n| `openai` | Latest | OpenAI API client |\n| `anthropic` | Latest | Anthropic Claude client |\n| `llama-index-core` | Latest | Indexing and retrieval |\n| `transformers` | 5.3.0 | HuggingFace model support |\n| `sentence-transformers` | Latest | Embedding generation |\n| `tiktoken` | 0.12.0 | Token counting |\n| `torch` | 2.10.0 | ML computation backend |\n\n资料来源：[requirements/requirements-help.txt](https://github.com/Aider-AI/aider/blob/main/requirements/requirements-help.txt)\n\n## Model Communication Flow\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant App as Aider Core\n    participant LLM as LLM Adapter\n    participant API as Provider API\n    \n    User->>App: User prompt\n    App->>LLM: Prepare request\n    LLM->>API: API call with model\n    API->>LLM: Response\n    LLM->>App: Parsed response\n    App->>User: Display result\n    \n    Note over LLM,API: Token usage tracked\n```\n\n## Configuration Files\n\n### Model Metadata\n\nModel metadata files contain information about supported models including:\n\n- **Context window size**: Maximum tokens the model can process\n- **Output limits**: Maximum response tokens\n- **Pricing information**: Cost per token\n- **Capability flags**: Tool use, vision support, etc.\n\n### Model Settings\n\nSettings files configure per-model behavior:\n\n- Temperature parameters\n- System prompt templates\n- Retry configurations\n- Timeout values\n\n资料来源：[scripts/my_models.py](https://github.com/Aider-AI/aider/blob/main/scripts/my_models.py)\n\n## Token Tracking\n\nThe system tracks token usage across sessions:\n\n```python\n# Example token statistics structure\nmodel_stats = {\n    \"claude-3-7-sonnet-20260219\": 125000,\n    \"gpt-4o\": 85000,\n    \"deepseek-chat\": 62000,\n}\n```\n\nUsage analytics record:\n- Model name\n- Total input tokens\n- Total output tokens\n- Percentage of overall usage\n\n## Integration Points\n\n### Main Application Integration\n\nThe model integration connects with:\n\n1. **Input/Output System** (`aider/getinput.py`): Handles user interaction\n2. **File Management** (`aider/main.py`): Reads code context\n3. **Git Integration** (`aider/git.py`): Commits changes automatically\n4. **Linting/Testing** (`aider/linter.py`): Validates code changes\n\n### IDE Integration\n\nAider can be used from within IDEs by adding comments to code that trigger model interactions.\n\n资料来源：[aider/website/examples/complex-change.md](https://github.com/Aider-AI/aider/blob/main/aider/website/examples/complex-change.md)\n\n## Supported Programming Languages\n\nThe Model Integration System works across 100+ programming languages:\n\n| Category | Languages |\n|----------|-----------|\n| Web | JavaScript, TypeScript, HTML, CSS |\n| Systems | Python, Rust, Go, C++, C |\n| Scripting | Ruby, PHP, Perl, Lua |\n| Functional | Haskell, Scala, Clojure, F# |\n| Other | Java, Kotlin, Swift, R, Julia |\n\n资料来源：[aider/website/index.html](https://github.com/Aider-AI/aider/blob/main/aider/website/index.html)\n\n## Error Handling\n\nThe system implements provider-specific error recovery:\n\n- Rate limiting detection and backoff\n- Authentication failure handling\n- Network timeout management\n- Model-specific error mapping\n\n## Future Extensibility\n\nThe architecture supports adding new providers through:\n\n1. Implementing the adapter interface\n2. Adding provider configuration\n3. Updating model metadata\n4. Registering in the model registry\n\nThis modular design allows Aider to quickly adopt new LLM providers as they become available.\n\n## Related Documentation\n\n- [Installation Guide](https://aider.chat/docs/install.html)\n- [Usage Guide](https://aider.chat/docs/usage.html)\n- [Connecting to LLMs](https://aider.chat/docs/llms.html)\n- [Configuration Options](https://aider.chat/docs/config.html)\n\n---\n\n<a id='page-chat-communication'></a>\n\n## Chat Communication Protocol\n\n### 相关页面\n\n相关主题：[Model Integration System](#page-model-integration), [Code Editing Strategies](#page-coder-strategies)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [aider/sendchat.py](https://github.com/Aider-AI/aider/blob/main/aider/sendchat.py)\n- [aider/mdstream.py](https://github.com/Aider-AI/aider/blob/main/aider/mdstream.py)\n- [aider/chat_chunks.py](https://github.com/Aider-AI/aider/blob/main/aider/chat_chunks.py)\n- [aider/coders/base_prompts.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/base_prompts.py)\n- [aider/coders/editblock_prompts.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/editblock_prompts.py)\n- [aider/coders/wholefile_func_coder.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/wholefile_func_coder.py)\n</details>\n\n# Chat Communication Protocol\n\n## Overview\n\nThe Chat Communication Protocol in Aider defines how the application exchanges messages with Large Language Models (LLMs) to enable AI pair programming. This protocol orchestrates the sending of prompts, streaming of responses, parsing of code edits, and handling of various message formats between the user, Aider's codebase, and the LLM API.\n\nAider supports multiple edit response formats to accommodate different LLM capabilities and user preferences:\n\n- **Edit blocks** (`editblock`) - Uses fenced code blocks with `<<<<<<< ORIGINAL` and `=======` separators\n- **Whole file** (`wholefile`) - Returns complete updated file contents\n- **Whole function** (`whole-func`) - Uses function call API for structured file updates\n- **Diff function** (`diff-func`) - Uses function call API with diff-style edits\n\n资料来源：[aider/coders/editblock_prompts.py]()\n\n## Architecture\n\n```mermaid\ngraph TD\n    subgraph \"User Interface Layer\"\n        CLI[Command Line Interface]\n        IO[InputOutput / getinput.py]\n    end\n    \n    subgraph \"Coder Layer\"\n        BASE[Coder Base Class]\n        EDIT[EditblockCoder]\n        WHOLE[WholeFileCoder]\n        FUNC[WholeFuncCoder]\n    end\n    \n    subgraph \"Communication Layer\"\n        SEND[sendchat.py]\n        STREAM[mdstream.py]\n        CHUNKS[chat_chunks.py]\n    end\n    \n    subgraph \"LLM Backend\"\n        API[LLM API Provider]\n    end\n    \n    CLI --> IO\n    CLI --> BASE\n    BASE --> SEND\n    SEND --> STREAM\n    SEND --> API\n    STREAM --> CHUNKS\n    CHUNKS --> BASE\n    CHUNKS --> EDIT\n    CHUNKS --> WHOLE\n    CHUNKS --> FUNC\n```\n\n## Core Components\n\n### Message Prompts System\n\nThe prompt system in Aider is built on a class hierarchy rooted in `CoderPrompts`. Prompts are modular, allowing different coder types to customize their system messages and conversation flows.\n\n#### Base Prompt Structure\n\n```python\nclass CoderPrompts:\n    main_system = \"\"\"Base system prompt for aider...\"\"\"\n    example_messages = []\n    system_reminder = \"\"\n    files_content_prefix = \"\"\"These are some files...\"\"\"\n```\n\n资料来源：[aider/coders/base_prompts.py:1-10]()\n\n### Edit Block Prompts\n\nThe `EditblockPrompts` class extends `CoderPrompts` to generate prompts specifically designed for models that return edits in diff format:\n\n```python\nclass EditblockPrompts(CoderPrompts):\n    # Defines how to format edit instructions to the LLM\n    # Uses fenced code blocks with ORIGINAL/UPDATED markers\n```\n\n资料来源：[aider/coders/editblock_prompts.py]()\n\n## Response Formats\n\n### Edit Block Format\n\nThe default format uses fenced code blocks with conflict-style markers:\n\n````markdown\n```python\ndemo.py\n<<<<<<< ORIGINAL\n    print(\"hello\")\n=======\n    print(\"goodbye\")\n>>>>>>> UPDATED\n```\n````\n\nThe parser extracts the filename from the language identifier, then identifies the `ORIGINAL` and `UPDATED` sections using the conflict markers.\n\n资料来源：[aider/website/_posts/2023-07-02-benchmarks.md]()\n\n### Whole File Format\n\nReturns complete file contents in a fenced code block:\n\n````\nHere is the updated copy of your file demo.py:\n\ndemo.py\n```python\ndef main():\n    print(\"goodbye\")\n```\n````\n\n资料来源：[aider/website/_posts/2023-07-02-benchmarks.md]()\n\n### Function Call Formats\n\n#### Whole Function Format\n\nUses the function call API with structured JSON:\n\n```json\n{\n    \"explanation\": \"Changed hello to goodbye.\",\n    \"files\": [\n        {\n            \"path\": \"demo.py\",\n            \"content\": \"def main():\\n    print(\\\"goodbye\\\")\\n\"\n        }\n    ]\n}\n```\n\n资料来源：[aider/website/_posts/2023-07-02-benchmarks.md]()\n\n#### Diff Function Format\n\nCombines diff-style edits with function call API for structured output:\n\n| Format Type | Input Method | Output Method | Best For |\n|-------------|--------------|---------------|----------|\n| `editblock` | Chat completions | Markdown diff | Most LLMs |\n| `wholefile` | Chat completions | Full file content | Claude |\n| `whole-func` | Function calls | Structured JSON | Advanced models |\n| `diff-func` | Function calls | JSON diff | Code-specific models |\n\n## Message Streaming\n\n### Markdown Stream Processing\n\nThe `mdstream.py` module handles streaming responses from LLM APIs, parsing them incrementally to support real-time display of responses.\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant CLI\n    participant SendChat\n    participant Stream\n    participant LLM as LLM API\n    \n    User->>CLI: Execute command\n    CLI->>SendChat: Send prompt\n    SendChat->>LLM: Stream request\n    LLM-->>SendChat: Token stream\n    SendChat->>Stream: Process tokens\n    Stream-->>CLI: Markdown chunks\n    CLI-->>User: Real-time display\n```\n\n资料来源：[aider/mdstream.py]()\n\n### Chat Chunk Processing\n\nThe `chat_chunks.py` module parses streamed content into discrete, actionable chunks that can be processed by the appropriate coder:\n\n| Chunk Type | Description | Parser Used |\n|------------|-------------|-------------|\n| `read` | File read requests | Text extraction |\n| `edit` | Code modifications | Diff parser |\n| `message` | User/assistant messages | Markdown renderer |\n| `error` | Error responses | Error formatter |\n\n资料来源：[aider/chat_chunks.py]()\n\n## Workflow: Edit Request and Application\n\n```mermaid\ngraph LR\n    A[User Request] --> B[Construct Prompt]\n    B --> C[Send to LLM]\n    C --> D[Stream Response]\n    D --> E[Parse Edit Blocks]\n    E --> F{Format Valid?}\n    F -->|Yes| G[Validate Edit]\n    F -->|No| H[Request Retry]\n    G --> I{Edit Safe?}\n    I -->|Yes| J[Apply Edit]\n    I -->|No| K[User Confirmation]\n    K --> J\n    J --> L[Commit Changes]\n    H --> C\n```\n\n### Edit Validation\n\nBefore applying edits, Aider validates:\n\n1. **Syntax validity** - The edited code is syntactically correct\n2. **Semantic consistency** - Imports and references remain valid\n3. **Safety checks** - Destructive operations are flagged for confirmation\n\n资料来源：[aider/coders/editblock_prompts.py]()\n\n## Configuration Options\n\n### Prompt Customization\n\n| Parameter | Default | Description |\n|-----------|---------|-------------|\n| `main_system` | Base aider system | Primary instructions to the LLM |\n| `system_reminder` | Context reminder | Reminders appended to system |\n| `example_messages` | Empty list | Few-shot examples |\n| `files_content_prefix` | File intro text | How to introduce file context |\n\n资料来源：[aider/coders/base_prompts.py:1-20]()\n\n### Response Format Selection\n\n```python\n# In coder initialization\nformat_type = \"editblock\"  # Options: editblock, wholefile, whole-func, diff-func\n```\n\n## Integration with LLM Providers\n\nThe communication protocol is provider-agnostic, supporting:\n\n- **OpenAI** (GPT-4, GPT-3.5, o3-mini)\n- **Anthropic** (Claude 3.7 Sonnet, Claude Opus)\n- **DeepSeek**\n- **Local models** via OpenAI-compatible APIs\n\nEach provider may have preferred response formats configured in their respective coder implementations.\n\n## Error Handling\n\n| Error Type | Cause | Recovery Action |\n|------------|-------|-----------------|\n| Parse failure | Malformed response | Retry with clarification |\n| Invalid edit | Syntax error in proposed change | Show error, request correction |\n| API timeout | Network or provider issue | Automatic retry with backoff |\n| Rate limit | Provider throttling | Wait and retry |\n\n## Security Considerations\n\n- **No code execution** - Aider never executes LLM-provided code directly\n- **Git tracking** - All changes are committed through git for audit trail\n- **Confirmation prompts** - Destructive or significant changes require user approval\n- **Input sanitization** - File paths and content are validated before processing\n\n## Summary\n\nThe Chat Communication Protocol is the backbone of Aider's interaction with LLMs. It defines:\n\n- How prompts are constructed from user input and codebase context\n- How responses are streamed and parsed in real-time\n- How different edit formats are handled across LLM providers\n- How edits are validated, applied, and committed safely\n\nThis protocol enables Aider to serve as a reliable AI pair programming partner, bridging human intent with precise code modifications across diverse development environments.\n\n---\n\n<a id='page-coder-strategies'></a>\n\n## Code Editing Strategies\n\n### 相关页面\n\n相关主题：[Edit Format Handling](#page-edit-formats), [Chat Communication Protocol](#page-chat-communication)\n\n<details>\n<summary>Related Source Files</summary>\n\nThe following source files were used to generate this page:\n\n- [aider/coders/editblock_coder.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/editblock_coder.py)\n- [aider/coders/wholefile_coder.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/wholefile_coder.py)\n- [aider/coders/udiff_coder.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/udiff_coder.py)\n- [aider/coders/patch_coder.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/patch_coder.py)\n- [aider/coders/base_coder.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/base_coder.py)\n- [aider/coders/search_replace.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/search_replace.py)\n</details>\n\n# Code Editing Strategies\n\n## Overview\n\nAider supports multiple code editing strategies that determine how AI model outputs are converted into file modifications. Each strategy has distinct characteristics suited for different use cases, model capabilities, and editing scenarios.\n\nThe editing system in aider is built around a modular architecture where different coder classes handle specific edit formats. The base functionality is defined in `base_coder.py`, with specialized implementations for each editing approach.\n\n## Architecture\n\n### Edit Strategy Class Hierarchy\n\n```mermaid\ngraph TD\n    A[base_coder.py<br>BaseCoder] --> B[wholefile_coder.py<br>WholeFileCoder]\n    A --> C[editblock_coder.py<br>EditBlockCoder]\n    A --> D[search_replace.py<br>SearchReplaceCoder]\n    A --> E[udiff_coder.py<br>UDiffCoder]\n    A --> F[patch_coder.py<br>PatchCoder]\n    \n    B --> G[Whole File Editing<br>Complete file replacement]\n    C --> H[Edit Block<br>ORIGINAL/UPDATE markers]\n    D --> I[Search/Replace<br>Pattern matching edits]\n    E --> J[Unified Diff<br>diff -u format]\n    F --> K[Patch<br>git apply style]\n```\n\n### Edit Flow\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant Coder as BaseCoder\n    participant Parser as Edit Parser\n    participant File as File System\n    \n    User->>Coder: Request code change\n    Coder->>Coder: Send to LLM with format instructions\n    LLM-->>Coder: Return edit in specified format\n    Coder->>Parser: Parse edit response\n    Parser->>Parser: Validate edit structure\n    Parser->>File: Apply changes\n    File-->>Coder: Confirmation\n    Coder-->>User: Display result\n```\n\n## Edit Strategies\n\n### 1. Edit Block Format\n\nThe edit block format uses `<<<<<<< ORIGINAL` and `=======` markers to delineate changes. This is the default and most widely supported format.\n\n**File:** `aider/coders/editblock_coder.py`\n\n```python\n# Example structure\n<<<<<<< ORIGINAL\n    print(\"hello\")\n=======\n    print(\"goodbye\")\n>>>>>>> UPDATED\n```\n\n**Characteristics:**\n- Most compatible with various LLM models\n- Explicit ORIGINAL and UPDATED sections\n- Works well for localized changes\n- Requires the model to include surrounding context\n\n**Configuration:**\n\n| Parameter | Description | Default |\n|-----------|-------------|---------|\n| `fencing` | Language for code fences | varies by model |\n| `max_fences` | Maximum number of fences per response | auto-detected |\n\n资料来源：[aider/coders/editblock_coder.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/editblock_coder.py)\n\n---\n\n### 2. Whole File Editing\n\nThe whole file strategy requests complete replacement of file contents rather than incremental changes.\n\n**File:** `aider/coders/wholefile_coder.py`\n\n**Characteristics:**\n- Model returns complete file content\n- No risk of partial edit mismatches\n- Higher token overhead for large files\n- Uses function call API when available\n\n**Response Format:**\n```json\n{\n    \"explanation\": \"Changed hello to goodbye.\",\n    \"files\": [\n        {\n            \"path\": \"demo.py\",\n            \"content\": \"def main():\\n    print(\\\"goodbye\\\")\\n\"\n        }\n    ]\n}\n```\n\n资料来源：[aider/coders/wholefile_coder.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/wholefile_coder.py)\n\n---\n\n### 3. Unified Diff Format\n\nThe unified diff format uses standard `diff -u` style output for specifying changes.\n\n**File:** `aider/coders/udiff_coder.py`\n\n```diff\n--- a/demo.py\n+++ b/demo.py\n@@ -1,3 +1,3 @@\n def main():\n-    print(\"hello\")\n+    print(\"goodbye\")\n```\n\n**Characteristics:**\n- Industry-standard diff format\n- Familiar to developers using version control\n- Clear addition and deletion markers\n- Includes context lines automatically\n\n资料来源：[aider/coders/udiff_coder.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/udiff_coder.py)\n\n---\n\n### 4. Patch Format\n\nThe patch format provides git-apply compatible patches for file modifications.\n\n**File:** `aider/coders/patch_coder.py`\n\n**Characteristics:**\n- Direct compatibility with `git apply`\n- Header includes file path information\n- Binary diffing support\n- Strip count configuration for nested paths\n\n资料来源：[aider/coders/patch_coder.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/patch_coder.py)\n\n---\n\n### 5. Search/Replace Format\n\nThe search/replace format uses explicit `search_for` and `replace_with` directives.\n\n**File:** `aider/coders/search_replace.py`\n\n```python\nsearch_for: print(\"hello\")\nreplace_with: print(\"goodbye\")\n```\n\n**Characteristics:**\n- Explicit intent specification\n- Works well for simple substitutions\n- No need for surrounding context\n- Model-friendly for targeted changes\n\n**API Parameters:**\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `edit_format` | string | Must be \"search_replace\" |\n| `search_replace` | object | Contains search_for and replace_with keys |\n| `pathname` | string | Target file path |\n\n资料来源：[aider/coders/search_replace.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/search_replace.py)\n\n---\n\n## Base Coder Functionality\n\n**File:** `aider/coders/base_coder.py`\n\nThe `BaseCoder` class provides common functionality inherited by all edit strategies:\n\n### Core Responsibilities\n\n```mermaid\ngraph LR\n    A[User Request] --> B[BaseCoder]\n    B --> C[LLM Communication]\n    B --> D[Edit Parsing]\n    B --> E[File Operations]\n    B --> F[Git Integration]\n    \n    C --> G[Send prompts with format instructions]\n    D --> H[Validate and extract edits]\n    E --> I[Read/write file system]\n    F --> J[Auto-commit changes]\n```\n\n### Common Methods\n\n| Method | Description |\n|--------|-------------|\n| `run()` | Main interaction loop with LLM |\n| `get_edits()` | Parse and apply edits from response |\n| `check_retry()` | Validate edit structure, retry on failure |\n| `commit()` | Git commit with generated message |\n\n资料来源：[aider/coders/base_coder.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/base_coder.py)\n\n## Edit Response Processing\n\n### Parsing Pipeline\n\n```mermaid\nflowchart TD\n    A[LLM Response] --> B{Edit Format Valid?}\n    B -->|Yes| C[Extract File Paths]\n    B -->|No| D[Request Retry]\n    C --> E{File Exists?}\n    D --> A\n    E -->|Yes| F[Apply Edits]\n    E -->|No| G[Create New File]\n    F --> H[Validate Syntax]\n    G --> H\n    H --> I[Git Commit]\n    H --> J[Error Report]\n```\n\n### Validation Steps\n\n1. **Format Check**: Verify correct marker usage (`<<<<<<<`, `=======`, `>>>>>>>`)\n2. **Path Verification**: Confirm target files exist or are valid for creation\n3. **Syntax Validation**: Run linters if configured\n4. **Test Execution**: Run tests if enabled\n\n### Error Handling\n\n| Error Type | Recovery Action |\n|------------|-----------------|\n| Malformed ORIGINAL/UPDATE blocks | Request retry with clarification |\n| File not found | Create file or prompt user |\n| Syntax error | Report to LLM for correction |\n| Test failure | Rollback and request fix |\n\n## Configuration\n\n### Edit Format Selection\n\n```bash\n# Command line selection\naider --edit-format edit\n\n# Environment variable\nAIDER_EDIT_FORMAT=editblock\n```\n\n### Supported Format Values\n\n| Format | Coder Class | Best For |\n|--------|-------------|----------|\n| `edit` or `editblock` | EditBlockCoder | General purpose |\n| `whole` or `wholefile` | WholeFileCoder | Complete replacements |\n| `udiff` | UDiffCoder | Standard diff workflows |\n| `patch` | PatchCoder | Git operations |\n| `search_replace` | SearchReplaceCoder | Simple substitutions |\n\n## Best Practices\n\n### Selecting an Edit Strategy\n\n| Scenario | Recommended Strategy |\n|----------|----------------------|\n| Small localized changes | Edit Block |\n| Complete file rewrites | Whole File |\n| Working with version control | Unified Diff |\n| Multiple small changes | Search/Replace |\n| Complex multi-file changes | Patch |\n\n### Optimization Tips\n\n1. **Token Efficiency**: Use edit blocks for small changes to minimize token usage\n2. **Context Windows**: Consider whole-file for files under 4KB\n3. **Reliability**: Edit blocks provide better error messages for malformed responses\n4. **Model Capabilities**: Some models perform better with specific formats\n\n## Summary\n\nAider's code editing system provides five distinct strategies, each optimized for different scenarios and model capabilities. The modular architecture allows seamless switching between formats while maintaining consistent git integration and error handling. Understanding these strategies enables developers to choose the most effective approach for their specific use case and model selection.\n\n---\n\n<a id='page-edit-formats'></a>\n\n## Edit Format Handling\n\n### 相关页面\n\n相关主题：[Code Editing Strategies](#page-coder-strategies)\n\n<details>\n<summary>Related Source Files</summary>\n\n以下源码文件用于生成本页说明：\n\n- [aider/coders/editblock_prompts.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/editblock_prompts.py)\n- [aider/coders/editblock_func_coder.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/editblock_func_coder.py)\n- [aider/coders/editblock_fenced_prompts.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/editblock_fenced_prompts.py)\n- [aider/website/_posts/2023-07-02-benchmarks.md](https://github.com/Aider-AI/aider/blob/main/aider/website/_posts/2023-07-02-benchmarks.md)\n- [aider/website/examples/semantic-search-replace.md](https://github.com/Aider-AI/aider/blob/main/aider/website/examples/semantic-search-replace.md)\n</details>\n\n# Edit Format Handling\n\nAider supports multiple edit formats that define how Large Language Models (LLMs) communicate code changes back to the tool. Each format specifies a structured protocol for representing file modifications, including search patterns to locate code and replacement content.\n\n## Overview\n\nThe edit format handling system is a core component of Aider's architecture that bridges communication between LLMs and the local filesystem. When an LLM proposes changes to code, it must express them using a specific format that Aider can parse, validate, and apply.\n\n```mermaid\ngraph LR\n    A[LLM Response] --> B[Edit Format Parser]\n    B --> C{Valid Format?}\n    C -->|Yes| D[Apply Edits to Files]\n    C -->|No| E[Error Handling]\n    D --> F[Git Commit]\n    E --> G[Request Retry]\n    G --> A\n```\n\n资料来源：[aider/website/_posts/2023-07-02-benchmarks.md:25-40]()\n\n## Supported Edit Formats\n\nAider supports several edit formats, each with different trade-offs in expressiveness, parsing complexity, and LLM compatibility.\n\n| Format | Description | Use Case |\n|--------|-------------|----------|\n| `search_replace` | Search/Replace block format | Default format, works with most LLMs |\n| `diff` | Unified diff format | Version control oriented changes |\n| `whole` | Replace entire file content | Simple file-level operations |\n| `diff-func` | Function call API format | Structured JSON-based edits |\n\n资料来源：[aider/website/_posts/2023-07-02-benchmarks.md:25-40]()\n\n## Search/Replace Block Format\n\nThe search/replace format is the primary edit mechanism in Aider. It uses special markers to delimit sections of code that should be replaced.\n\n### Block Structure\n\nEach search/replace block follows this pattern:\n\n```markdown\npath/to/file.py\n<<<<<<< SEARCH\nexisting code lines to find\n=======\nnew code lines to insert\n>>>>>>> REPLACE\n```\n\n资料来源：[aider/coders/editblock_prompts.py:1-25]()\n\n### Prompt Instructions\n\nThe system includes detailed instructions for LLMs on how to construct valid search/replace blocks. These instructions are embedded in the edit format prompts and include:\n\n1. **File Path Requirements**: The full file path must appear alone on a line before each block\n2. **Unique Matching**: Search sections must exactly match existing content, including whitespace and comments\n3. **Sequential Processing**: Search/replace blocks are processed in order, with each replacement affecting subsequent blocks\n4. **Multi-file Support**: Multiple files can be edited in a single response\n\n资料来源：[aider/coders/editblock_fenced_prompts.py:1-30]()\n\n### Validation Rules\n\nThe search section of each block must:\n\n- Match the original file content character-for-character\n- Include all whitespace and newlines exactly as they appear\n- Be unique within the file to prevent ambiguous replacements\n- Include sufficient context lines for uniqueness\n\n资料来源：[aider/coders/editblock_prompts.py:20-30]()\n\n## Function Call Format (diff-func)\n\nThe `diff-func` format uses structured function calls to express edits, providing a machine-readable alternative to text-based search/replace blocks.\n\n### Request Structure\n\n```json\n{\n  \"explanation\": \"Step by step plan for the changes\",\n  \"edits\": [\n    {\n      \"path\": \"demo.py\",\n      \"original_lines\": [\"    print(\\\"hello\\\")\"],\n      \"updated_lines\": [\"    print(\\\"goodbye\\\")\"]\n    }\n  ]\n}\n```\n\n资料来源：[aider/coders/editblock_func_coder.py:1-30]()\n\n### Edit Object Schema\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `path` | string | Yes | Path of file to edit |\n| `original_lines` | array of strings | Yes | Lines to search for in original file |\n| `updated_lines` | array of strings | Yes | New content to replace matched lines |\n\n资料来源：[aider/coders/editblock_func_coder.py:50-80]()\n\n### Deprecation Notice\n\nThe current implementation of `EditBlockFunctionCoder` is marked as deprecated:\n\n```python\ndef __init__(self, code_format, *args, **kwargs):\n    raise RuntimeError(\"Deprecated, needs to be refactored to support get_edits/apply_edits\")\n```\n\n资料来源：[aider/coders/editblock_func_coder.py:35-37]()\n\n## Edit Application Workflow\n\n```mermaid\nsequenceDiagram\n    participant LLM\n    participant Parser\n    participant Validator\n    participant FileSystem\n    participant Git\n    \n    LLM->>Parser: Send response with edits\n    Parser->>Parser: Extract edit blocks\n    Parser->>Validator: Validate search patterns\n    Validator->>FileSystem: Read target files\n    Validator->>Validator: Verify exact matches\n    Validator->>FileSystem: Apply replacements\n    FileSystem->>Git: Stage changes\n    Git->>Git: Create commit\n```\n\n## Error Handling\n\nWhen an edit cannot be applied, Aider provides detailed error messages to help the LLM retry with corrected edits.\n\n### Common Error Scenarios\n\n| Error Type | Cause | Recovery Action |\n|------------|-------|-----------------|\n| `Malformed ORIGINAL/UPDATE blocks` | Missing or misaligned markers | Retry with correctly formatted blocks |\n| `No exact match found` | Search content differs from file | Verify whitespace and content |\n| `Multiple matches found` | Search pattern not unique | Add more context lines |\n\n资料来源：[aider/website/examples/semantic-search-replace.md:1-20]()\n\n### Error Reporting Format\n\nAider reports errors through the IO subsystem:\n\n```python\nself.io.tool_error(\"Malformed ORIGINAL/UPDATE blocks, retrying...\")\nself.io.tool_error(Text(err))\n```\n\n资料来源：[aider/website/examples/semantic-search-replace.md:10-15]()\n\n## Integration with Commands\n\nThe edit format handling integrates with Aider's command system through the `Commands` class, which manages the coder lifecycle and edit format selection.\n\n```python\ncoder = Coder.create(\n    io=self.io,\n    from_coder=self.coder,\n    edit_format=edit_format,\n    summarize_from_coder=False,\n)\n```\n\n资料来源：[aider/commands.py:1-30]()\n\n## Best Practices\n\n### For LLM Generation\n\n1. Always include the full file path on its own line before each edit block\n2. Ensure search sections contain exact matches including all whitespace\n3. Use sufficient context lines to uniquely identify the target location\n4. Process files in a logical order when making multiple changes\n\n### For Users\n\n1. Use `/edit-format` command to switch between available formats\n2. Enable linting and testing to validate changes automatically\n3. Review git diffs before committing AI-generated changes\n\n资料来源：[README.md:1-50]()\n\n## Configuration\n\nEdit format behavior can be configured through Aider's settings:\n\n| Setting | Description | Default |\n|---------|-------------|---------|\n| `edit_format` | Preferred edit format | `search_replace` |\n| `auto_lint` | Run linter after edits | `true` |\n| `auto_test` | Run tests after edits | `false` |\n\n## Related Components\n\nThe edit format handling system depends on several core components:\n\n- **Base Coder** (`base_coder.py`): Defines the interface for all coder implementations\n- **Edit Block Prompts** (`editblock_prompts.py`): Contains LLM instructions for each format\n- **IO Subsystem** (`io.py`): Handles error reporting and user communication\n- **Git Integration**: Automatically commits applied changes\n\n资料来源：[aider/coders/editblock_prompts.py:1-50]()\n资料来源：[aider/coders/editblock_func_coder.py:1-80]()\n\n---\n\n<a id='page-git-integration'></a>\n\n## Git Integration\n\n# Aider Repository Analysis\n\n## Overview\n\nAider is an AI pair programming tool that runs in the terminal, allowing developers to collaborate with Large Language Models (LLMs) on code editing tasks. It integrates with git for version control and supports multiple LLM providers including DeepSeek, Claude, and OpenAI models.\n\n## Project Structure\n\n| Directory/File | Purpose |\n|----------------|---------|\n| `aider/` | Main Python package containing core application code |\n| `aider/coders/` | Code editing and generation modules |\n| `aider/website/` | Jekyll-based documentation site |\n| `requirements/` | Dependency specifications |\n| `README.md` | Project documentation and getting started |\n| `CONTRIBUTING.md` | Developer guidelines |\n\n## Key Source Files\n\n| File | Description |\n|------|-------------|\n| `aider/main.py` | Application entry point, argument parsing integration |\n| `aider/args.py` | Command-line argument definitions including git settings |\n| `aider/repo.py` | Git repository operations |\n| `aider/prompts.py` | System prompts for LLM interactions and commit message generation |\n| `aider/history.py` | Chat history management |\n| `aider/coders/base_coder.py` | Base class for code editing operations |\n\n## Git Integration\n\nAider provides comprehensive git integration with the following features:\n\n### Command-Line Options (from `aider/args.py:1-100`)\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| `--git` | BooleanOptional | True | Enable/disable git repo detection |\n| `--gitignore` | BooleanOptional | True | Add `.aider*` to `.gitignore` |\n| `--add-gitignore-files` | BooleanOptional | False | Include `.gitignore` files in editing scope |\n| `--aiderignore` | Path | `.aiderignore` | Specify aider ignore file |\n| `--subtree-only` | Boolean | False | Only consider files in current subtree |\n| `--auto-commits` | BooleanOptional | True | Auto commit LLM changes |\n| `--dirty-commits` | BooleanOptional | True | Commit dirty state |\n| `--show-diffs` | Boolean | False | Show diffs when committing |\n\n### Commit Message Format\n\nFrom `aider/prompts.py:10-26`, Aider generates Conventional Commits format messages:\n\n- Structure: `<type>: <description>`\n- Types: fix, feat, build, chore, ci, docs, style, refactor, perf, test\n- Imperative mood required\n- Maximum 72 characters\n\n## Development Standards\n\n### Python Compatibility\n- Versions: 3.9, 3.10, 3.11, 3.12\n- No type hints used in codebase\n\n### Code Style\n- PEP 8 compliance\n- Maximum line length: 100 characters\n- Tools: `isort` for imports, `Black` for formatting\n- Pre-commit hooks enforce style\n\n### Testing\n- Framework: pytest\n- Location: `aider/tests/`\n- Naming convention: `test_*.py`\n\n## Dependencies\n\nKey dependencies from `requirements/requirements-browser.txt`:\n\n- `gitpython==3.1.46` - Git operations\n- `streamlit` - Browser UI components\n- `pandas==2.3.3` - Data handling\n- `jinja2==3.1.6` - Templating\n\n## Installation\n\n```bash\npython -m pip install aider-install\naider-install\n```\n\n## Usage Example\n\n```bash\n# DeepSeek\naider --model deepseek --api-key deepseek=<key>\n\n# Claude 3.7 Sonnet  \naider --model sonnet --api-key anthropic=<key>\n\n# o3-mini\naider --model o3-mini --api-key openai=<key>\n\n---\n\n---\n\n## Doramagic 踩坑日志\n\n项目：Aider-AI/aider\n\n摘要：发现 21 个潜在踩坑项，其中 3 个为 high/blocking；最高优先级：安装坑 - 来源证据：Python 3.13 support。\n\n## 1. 安装坑 · 来源证据：Python 3.13 support\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：Python 3.13 support\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_d422c2c05bc34d938b82095b9b0b7131 | https://github.com/Aider-AI/aider/issues/3037 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 2. 配置坑 · 来源证据：benchmark.py uses `--read-model-settings` but main cli + docs say `--model-settings-file`\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：benchmark.py uses `--read-model-settings` but main cli + docs say `--model-settings-file`\n- 对用户的影响：可能影响升级、迁移或版本选择。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_04ccacbfaff740caaa5ac6f5280521c8 | https://github.com/Aider-AI/aider/issues/5131 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 3. 安全/权限坑 · 来源证据：Zed Editor Support\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Zed Editor Support\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_de9d553c32dc4238bb4601e547645020 | https://github.com/Aider-AI/aider/issues/851 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 4. 安装坑 · 来源证据：feat: Add --one-shot flag for sessionless single-prompt execution\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：feat: Add --one-shot flag for sessionless single-prompt execution\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_4434e2534a6d45e58141e326a1cd97f1 | https://github.com/Aider-AI/aider/issues/5143 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 5. 配置坑 · 可能修改宿主 AI 配置\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：项目面向 Claude/Cursor/Codex/Gemini/OpenCode 等宿主，或安装命令涉及用户配置目录。\n- 对用户的影响：安装可能改变本机 AI 工具行为，用户需要知道写入位置和回滚方法。\n- 建议检查：列出会写入的配置文件、目录和卸载/回滚步骤。\n- 防护动作：涉及宿主配置目录时必须给回滚路径，不能只给安装命令。\n- 证据：capability.host_targets | github_repo:638629097 | https://github.com/Aider-AI/aider | host_targets=claude, chatgpt\n\n## 6. 配置坑 · 来源证据：Uncaught NotImplementedError in pathlib.py line 1090\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Uncaught NotImplementedError in pathlib.py line 1090\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_4a2e6220201a4896920a22c45da17ae4 | https://github.com/Aider-AI/aider/issues/5145 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 7. 配置坑 · 来源证据：Uncaught OSError in _win32_console.py line 403\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Uncaught OSError in _win32_console.py line 403\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_f4f7880f667f4a52b7ad9b82e7a4acd2 | https://github.com/Aider-AI/aider/issues/5117 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 8. 配置坑 · 来源证据：Uncaught OSError in pathlib.py line 1222\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Uncaught OSError in pathlib.py line 1222\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_7f5383bfd86147d0929d2366e5b3044c | https://github.com/Aider-AI/aider/issues/5130 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 9. 配置坑 · 来源证据：Uncaught QueryError in repomap.py line 302\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Uncaught QueryError in repomap.py line 302\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_64f88b21f5fd4baa94c7e340b7006423 | https://github.com/Aider-AI/aider/issues/5133 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 10. 配置坑 · 来源证据：git repo corrupted\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：git repo corrupted\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_3cf7b9ede88e4598bacb2a1c5f7cd847 | https://github.com/Aider-AI/aider/issues/2734 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 11. 能力坑 · 能力判断依赖假设\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：README/documentation is current enough for a first validation pass.\n- 对用户的影响：假设不成立时，用户拿不到承诺的能力。\n- 建议检查：将假设转成下游验证清单。\n- 防护动作：假设必须转成验证项；没有验证结果前不能写成事实。\n- 证据：capability.assumptions | github_repo:638629097 | https://github.com/Aider-AI/aider | README/documentation is current enough for a first validation pass.\n\n## 12. 维护坑 · 维护活跃度未知\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：未记录 last_activity_observed。\n- 对用户的影响：新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。\n- 建议检查：补 GitHub 最近 commit、release、issue/PR 响应信号。\n- 防护动作：维护活跃度未知时，推荐强度不能标为高信任。\n- 证据：evidence.maintainer_signals | github_repo:638629097 | https://github.com/Aider-AI/aider | last_activity_observed missing\n\n## 13. 安全/权限坑 · 下游验证发现风险项\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：下游已经要求复核，不能在页面中弱化。\n- 建议检查：进入安全/权限治理复核队列。\n- 防护动作：下游风险存在时必须保持 review/recommendation 降级。\n- 证据：downstream_validation.risk_items | github_repo:638629097 | https://github.com/Aider-AI/aider | no_demo; severity=medium\n\n## 14. 安全/权限坑 · 存在评分风险\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：风险会影响是否适合普通用户安装。\n- 建议检查：把风险写入边界卡，并确认是否需要人工复核。\n- 防护动作：评分风险必须进入边界卡，不能只作为内部分数。\n- 证据：risks.scoring_risks | github_repo:638629097 | https://github.com/Aider-AI/aider | no_demo; severity=medium\n\n## 15. 安全/权限坑 · 来源证据：Proposal: optional pre-commit safety scan with Agent Threat Rules\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Proposal: optional pre-commit safety scan with Agent Threat Rules\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_4fa6fdcc672345afa8c3ff5a452863aa | https://github.com/Aider-AI/aider/issues/5121 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 16. 安全/权限坑 · 来源证据：Uncaught OSError in pathlib.py line 840\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Uncaught OSError in pathlib.py line 840\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_8e8437da35794c5bb2c53e2b08db3a70 | https://github.com/Aider-AI/aider/issues/5114 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 17. 安全/权限坑 · 来源证据：security: bump GitPython pin (CVE-2026-42215/42284/44243/44244)\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：security: bump GitPython pin (CVE-2026-42215/42284/44243/44244)\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_835507f71220443f8a484ae9e8888821 | https://github.com/Aider-AI/aider/issues/5139 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 18. 安全/权限坑 · 来源证据：security: bump Pillow pin (CVE-2026-42311)\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：security: bump Pillow pin (CVE-2026-42311)\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_842489bdf17244c29e0ea620f9499bde | https://github.com/Aider-AI/aider/issues/5140 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 19. 安全/权限坑 · 来源证据：security: bump urllib3 pin (CVE-2026-44431)\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：security: bump urllib3 pin (CVE-2026-44431)\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_76fb6fb4c31b436fbe62c89100c8084f | https://github.com/Aider-AI/aider/issues/5141 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 20. 维护坑 · issue/PR 响应质量未知\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：issue_or_pr_quality=unknown。\n- 对用户的影响：用户无法判断遇到问题后是否有人维护。\n- 建议检查：抽样最近 issue/PR，判断是否长期无人处理。\n- 防护动作：issue/PR 响应未知时，必须提示维护风险。\n- 证据：evidence.maintainer_signals | github_repo:638629097 | https://github.com/Aider-AI/aider | issue_or_pr_quality=unknown\n\n## 21. 维护坑 · 发布节奏不明确\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：release_recency=unknown。\n- 对用户的影响：安装命令和文档可能落后于代码，用户踩坑概率升高。\n- 建议检查：确认最近 release/tag 和 README 安装命令是否一致。\n- 防护动作：发布节奏未知或过期时，安装说明必须标注可能漂移。\n- 证据：evidence.maintainer_signals | github_repo:638629097 | https://github.com/Aider-AI/aider | release_recency=unknown\n\n<!-- canonical_name: Aider-AI/aider; human_manual_source: deepwiki_human_wiki -->\n",
      "markdown_key": "aider",
      "pages": "draft",
      "source_refs": [
        {
          "evidence_id": "github_repo:638629097",
          "kind": "repo",
          "supports_claim_ids": [
            "claim_identity",
            "claim_distribution",
            "claim_capability"
          ],
          "url": "https://github.com/Aider-AI/aider"
        },
        {
          "evidence_id": "art_6766e1d8cefb475098805860fea085d7",
          "kind": "docs",
          "supports_claim_ids": [
            "claim_identity",
            "claim_distribution",
            "claim_capability"
          ],
          "url": "https://github.com/Aider-AI/aider#readme"
        }
      ],
      "summary": "DeepWiki/Human Wiki 完整输出，末尾追加 Discovery Agent 踩坑日志。",
      "title": "aider 说明书",
      "toc": [
        "https://github.com/Aider-AI/aider 项目说明书",
        "目录",
        "Introduction to Aider",
        "Overview",
        "Core Features",
        "Example workflow",
        "Make changes via conversation",
        "Aider auto-commits with descriptive messages",
        "Doramagic 踩坑日志"
      ]
    }
  },
  "quality_gate": {
    "blocking_gaps": [],
    "category_confidence": "medium",
    "compile_status": "ready_for_review",
    "five_assets_present": true,
    "install_sandbox_verified": true,
    "missing_evidence": [],
    "next_action": "publish to Doramagic.ai project surfaces",
    "prompt_preview_boundary_ok": true,
    "publish_status": "publishable",
    "quick_start_verified": true,
    "repo_clone_verified": true,
    "repo_commit": "6435cb8b1e885d7275327d4b61206b1b1618dfe1",
    "repo_inspection_error": null,
    "repo_inspection_files": [
      "pyproject.toml",
      "README.md",
      "requirements.txt"
    ],
    "repo_inspection_verified": true,
    "review_reasons": [],
    "tag_count_ok": true,
    "unsupported_claims": []
  },
  "schema_version": "0.1",
  "user_assets": {
    "ai_context_pack": {
      "asset_id": "ai_context_pack",
      "filename": "AI_CONTEXT_PACK.md",
      "markdown": "# aider - Doramagic AI Context Pack\n\n> 定位：安装前体验与判断资产。它帮助宿主 AI 有一个好的开始，但不代表已经安装、执行或验证目标项目。\n\n## 充分原则\n\n- **充分原则，不是压缩原则**：AI Context Pack 应该充分到让宿主 AI 在开工前理解项目价值、能力边界、使用入口、风险和证据来源；它可以分层组织，但不以最短摘要为目标。\n- **压缩策略**：只压缩噪声和重复内容，不压缩会影响判断和开工质量的上下文。\n\n## 给宿主 AI 的使用方式\n\n你正在读取 Doramagic 为 aider 编译的 AI Context Pack。请把它当作开工前上下文：帮助用户理解适合谁、能做什么、如何开始、哪些必须安装后验证、风险在哪里。不要声称你已经安装、运行或执行了目标项目。\n\n## Claim 消费规则\n\n- **事实来源**：Repo Evidence + Claim/Evidence Graph；Human Wiki 只提供显著性、术语和叙事结构。\n- **事实最低状态**：`supported`\n- `supported`：可以作为项目事实使用，但回答中必须引用 claim_id 和证据路径。\n- `weak`：只能作为低置信度线索，必须要求用户继续核实。\n- `inferred`：只能用于风险提示或待确认问题，不能包装成项目事实。\n- `unverified`：不得作为事实使用，应明确说证据不足。\n- `contradicted`：必须展示冲突来源，不得替用户强行选择一个版本。\n\n## 它最适合谁\n\n- **正在使用 Claude/Codex/Cursor/Gemini 等宿主 AI 的开发者**：README 或插件配置提到多个宿主 AI。 证据：`README.md` Claim：`clm_0002` supported 0.86\n\n## 它能做什么\n\n- **命令行启动或安装流程**（需要安装后验证）：项目文档中存在可执行命令，真实使用需要在本地或宿主环境中运行这些命令。 证据：`CONTRIBUTING.md`, `aider/website/_includes/replit-pipx.md`, `aider/website/_posts/2024-09-26-architect.md`, `aider/website/_posts/2025-01-15-uv.md` 等 Claim：`clm_0001` supported 0.86\n\n## 怎么开始\n\n- `pip install pipx` 证据：`aider/website/_includes/replit-pipx.md` Claim：`clm_0003` unverified 0.25\n- `pip install -U aider-chat` 证据：`aider/website/_posts/2024-09-26-architect.md` Claim：`clm_0004` unverified 0.25\n- `curl -LsSf https://aider.chat/install.sh | sh` 证据：`aider/website/_posts/2025-01-15-uv.md` Claim：`clm_0005` unverified 0.25\n- `pip install aider-install` 证据：`aider/website/_posts/2025-01-15-uv.md` Claim：`clm_0006` unverified 0.25\n- `uv tool install --force --python python3.12 aider-chat` 证据：`aider/website/_posts/2025-01-15-uv.md` Claim：`clm_0007` unverified 0.25\n- `pip install -U boto3` 证据：`aider/website/docs/llms/bedrock.md` Claim：`clm_0008` supported 0.86\n- `curl -s https://api.githubcopilot.com/models \\` 证据：`aider/website/docs/llms/github.md` Claim：`clm_0009` supported 0.86\n- `git clone git@github.com:Aider-AI/aider.git` 证据：`aider/website/docs/faq.md` Claim：`clm_0010` supported 0.86\n- `uv tool install --force --python python3.12 --with pip aider-chat@latest` 证据：`aider/website/docs/install.md` Claim：`clm_0011` supported 0.86\n- `pipx install aider-chat` 证据：`aider/website/docs/install.md` Claim：`clm_0012` supported 0.86\n\n## 继续前判断卡\n\n- **当前建议**：先做角色匹配试用\n- **为什么**：这个项目更像角色库，核心风险是选错角色或把角色文案当执行能力；先用 Prompt Preview 试角色匹配，再决定是否沙盒导入。\n\n### 30 秒判断\n\n- **现在怎么做**：先做角色匹配试用\n- **最小安全下一步**：先用 Prompt Preview 试角色匹配；满意后再隔离导入\n- **先别相信**：角色质量和任务匹配不能直接相信。\n- **继续会触碰**：角色选择偏差、命令执行、本地环境或项目文件\n\n### 现在可以相信\n\n- **适合人群线索：正在使用 Claude/Codex/Cursor/Gemini 等宿主 AI 的开发者**（supported）：有 supported claim 或项目证据支撑，但仍不等于真实安装效果。 证据：`README.md` Claim：`clm_0002` supported 0.86\n- **能力存在：命令行启动或安装流程**（supported）：可以相信项目包含这类能力线索；是否适合你的具体任务仍要试用或安装后验证。 证据：`CONTRIBUTING.md`, `aider/website/_includes/replit-pipx.md`, `aider/website/_posts/2024-09-26-architect.md`, `aider/website/_posts/2025-01-15-uv.md` 等 Claim：`clm_0001` supported 0.86\n- **存在 Quick Start / 安装命令线索**（supported）：可以相信项目文档出现过启动或安装入口；不要因此直接在主力环境运行。 证据：`aider/website/docs/llms/bedrock.md` Claim：`clm_0008` supported 0.86\n\n### 现在还不能相信\n\n- **角色质量和任务匹配不能直接相信。**（unverified）：角色库证明有很多角色，不证明每个角色都适合你的具体任务，也不证明角色能产生高质量结果。\n- **不能把角色文案当成真实执行能力。**（unverified）：安装前只能判断角色描述和任务画像是否匹配，不能证明它能在宿主 AI 里完成任务。\n- **真实输出质量不能在安装前相信。**（unverified）：Prompt Preview 只能展示引导方式，不能证明真实项目中的结果质量。\n- **宿主 AI 版本兼容性不能在安装前相信。**（unverified）：Claude、Cursor、Codex、Gemini 等宿主加载规则和版本差异必须在真实环境验证。\n- **不会污染现有宿主 AI 行为，不能直接相信。**（inferred）：Skill、plugin、AGENTS/CLAUDE/GEMINI 指令可能改变宿主 AI 的默认行为。\n- **可安全回滚不能默认相信。**（unverified）：除非项目明确提供卸载和恢复说明，否则必须先在隔离环境验证。\n- **真实安装后是否与用户当前宿主 AI 版本兼容？**（unverified）：兼容性只能通过实际宿主环境验证。\n- **项目输出质量是否满足用户具体任务？**（unverified）：安装前预览只能展示流程和边界，不能替代真实评测。\n\n### 继续会触碰什么\n\n- **角色选择偏差**：用户对任务应该由哪个专家角色处理的判断。 原因：选错角色会让 AI 从错误专业视角回答，浪费时间或误导决策。\n- **命令执行**：包管理器、网络下载、本地插件目录、项目配置或用户主目录。 原因：运行第一条命令就可能产生环境改动；必须先判断是否值得跑。 证据：`CONTRIBUTING.md`, `aider/website/_includes/replit-pipx.md`, `aider/website/_posts/2024-09-26-architect.md`, `aider/website/_posts/2025-01-15-uv.md` 等\n- **本地环境或项目文件**：安装结果、插件缓存、项目配置或本地依赖目录。 原因：安装前无法证明写入范围和回滚方式，需要隔离验证。 证据：`CONTRIBUTING.md`, `aider/website/_includes/replit-pipx.md`, `aider/website/_posts/2024-09-26-architect.md`, `aider/website/_posts/2025-01-15-uv.md` 等\n- **宿主 AI 上下文**：AI Context Pack、Prompt Preview、Skill 路由、风险规则和项目事实。 原因：导入上下文会影响宿主 AI 后续判断，必须避免把未验证项包装成事实。\n\n### 最小安全下一步\n\n- **先跑 Prompt Preview**：先用交互式试用验证任务画像和角色匹配，不要先导入整套角色库。（适用：任何项目都适用，尤其是输出质量未知时。）\n- **只在隔离目录或测试账号试装**：避免安装命令污染主力宿主 AI、真实项目或用户主目录。（适用：存在命令执行、插件配置或本地写入线索时。）\n- **安装后只验证一个最小任务**：先验证加载、兼容、输出质量和回滚，再决定是否深用。（适用：准备从试用进入真实工作流时。）\n\n### 退出方式\n\n- **保留安装前状态**：记录原始宿主配置和项目状态，后续才能判断是否可恢复。\n- **保留原始角色选择记录**：如果输出偏题，可以回到任务画像阶段重新选择角色，而不是继续沿着错误角色推进。\n- **记录安装命令和写入路径**：没有明确卸载说明时，至少要知道哪些目录或配置需要手动清理。\n- **如果没有回滚路径，不进入主力环境**：不可回滚是继续前阻断项，不应靠信任或运气继续。\n\n## 哪些只能预览\n\n- 解释项目适合谁和能做什么\n- 基于项目文档演示典型对话流程\n- 帮助用户判断是否值得安装或继续研究\n\n## 哪些必须安装后验证\n\n- 真实安装 Skill、插件或 CLI\n- 执行脚本、修改本地文件或访问外部服务\n- 验证真实输出质量、性能和兼容性\n\n## 边界与风险判断卡\n\n- **把安装前预览误认为真实运行**：用户可能高估项目已经完成的配置、权限和兼容性验证。 处理方式：明确区分 prompt_preview_can_do 与 runtime_required。 Claim：`clm_0027` inferred 0.45\n- **命令执行会修改本地环境**：安装命令可能写入用户主目录、宿主插件目录或项目配置。 处理方式：先在隔离环境或测试账号中运行。 证据：`CONTRIBUTING.md`, `aider/website/_includes/replit-pipx.md`, `aider/website/_posts/2024-09-26-architect.md`, `aider/website/_posts/2025-01-15-uv.md` 等 Claim：`clm_0028` supported 0.86\n- **待确认**：真实安装后是否与用户当前宿主 AI 版本兼容？。原因：兼容性只能通过实际宿主环境验证。\n- **待确认**：项目输出质量是否满足用户具体任务？。原因：安装前预览只能展示流程和边界，不能替代真实评测。\n- **待确认**：安装命令是否需要网络、权限或全局写入？。原因：这影响企业环境和个人环境的安装风险。\n\n## 开工前工作上下文\n\n### 加载顺序\n\n- 先读取 how_to_use.host_ai_instruction，建立安装前判断资产的边界。\n- 读取 claim_graph_summary，确认事实来自 Claim/Evidence Graph，而不是 Human Wiki 叙事。\n- 再读取 intended_users、capabilities 和 quick_start_candidates，判断用户是否匹配。\n- 需要执行具体任务时，优先查 role_skill_index，再查 evidence_index。\n- 遇到真实安装、文件修改、网络访问、性能或兼容性问题时，转入 risk_card 和 boundaries.runtime_required。\n\n### 任务路由\n\n- **命令行启动或安装流程**：先说明这是安装后验证能力，再给出安装前检查清单。 边界：必须真实安装或运行后验证。 证据：`CONTRIBUTING.md`, `aider/website/_includes/replit-pipx.md`, `aider/website/_posts/2024-09-26-architect.md`, `aider/website/_posts/2025-01-15-uv.md` 等 Claim：`clm_0001` supported 0.86\n\n### 上下文规模\n\n- 文件总数：517\n- 重要文件覆盖：40/517\n- 证据索引条目：80\n- 角色 / Skill 条目：80\n\n### 证据不足时的处理\n\n- **missing_evidence**：说明证据不足，要求用户提供目标文件、README 段落或安装后验证记录；不要补全事实。\n- **out_of_scope_request**：说明该任务超出当前 AI Context Pack 证据范围，并建议用户先查看 Human Manual 或真实安装后验证。\n- **runtime_request**：给出安装前检查清单和命令来源，但不要替用户执行命令或声称已执行。\n- **source_conflict**：同时展示冲突来源，标记为待核实，不要强行选择一个版本。\n\n## Prompt Recipes\n\n### 适配判断\n\n- 目标：判断这个项目是否适合用户当前任务。\n- 预期输出：适配结论、关键理由、证据引用、安装前可预览内容、必须安装后验证内容、下一步建议。\n\n```text\n请基于 aider 的 AI Context Pack，先问我 3 个必要问题，然后判断它是否适合我的任务。回答必须包含：适合谁、能做什么、不能做什么、是否值得安装、证据来自哪里。所有项目事实必须引用 evidence_refs、source_paths 或 claim_id。\n```\n\n### 安装前体验\n\n- 目标：让用户在安装前感受核心工作流，同时避免把预览包装成真实能力或营销承诺。\n- 预期输出：一段带边界标签的体验剧本、安装后验证清单和谨慎建议；不含真实运行承诺或强营销表述。\n\n```text\n请把 aider 当作安装前体验资产，而不是已安装工具或真实运行环境。\n\n请严格输出四段：\n1. 先问我 3 个必要问题。\n2. 给出一段“体验剧本”：用 [安装前可预览]、[必须安装后验证]、[证据不足] 三种标签展示它可能如何引导工作流。\n3. 给出安装后验证清单：列出哪些能力只有真实安装、真实宿主加载、真实项目运行后才能确认。\n4. 给出谨慎建议：只能说“值得继续研究/试装”“先补充信息后再判断”或“不建议继续”，不得替项目背书。\n\n硬性边界：\n- 不要声称已经安装、运行、执行测试、修改文件或产生真实结果。\n- 不要写“自动适配”“确保通过”“完美适配”“强烈建议安装”等承诺性表达。\n- 如果描述安装后的工作方式，必须使用“如果安装成功且宿主正确加载 Skill，它可能会……”这种条件句。\n- 体验剧本只能写成“示例台词/假设流程”：使用“可能会询问/可能会建议/可能会展示”，不要写“已写入、已生成、已通过、正在运行、正在生成”。\n- Prompt Preview 不负责给安装命令；如用户准备试装，只能提示先阅读 Quick Start 和 Risk Card，并在隔离环境验证。\n- 所有项目事实必须来自 supported claim、evidence_refs 或 source_paths；inferred/unverified 只能作风险或待确认项。\n\n```\n\n### 角色 / Skill 选择\n\n- 目标：从项目里的角色或 Skill 中挑选最匹配的资产。\n- 预期输出：候选角色或 Skill 列表，每项包含适用场景、证据路径、风险边界和是否需要安装后验证。\n\n```text\n请读取 role_skill_index，根据我的目标任务推荐 3-5 个最相关的角色或 Skill。每个推荐都要说明适用场景、可能输出、风险边界和 evidence_refs。\n```\n\n### 风险预检\n\n- 目标：安装或引入前识别环境、权限、规则冲突和质量风险。\n- 预期输出：环境、权限、依赖、许可、宿主冲突、质量风险和未知项的检查清单。\n\n```text\n请基于 risk_card、boundaries 和 quick_start_candidates，给我一份安装前风险预检清单。不要替我执行命令，只说明我应该检查什么、为什么检查、失败会有什么影响。\n```\n\n### 宿主 AI 开工指令\n\n- 目标：把项目上下文转成一次对话开始前的宿主 AI 指令。\n- 预期输出：一段边界明确、证据引用明确、适合复制给宿主 AI 的开工前指令。\n\n```text\n请基于 aider 的 AI Context Pack，生成一段我可以粘贴给宿主 AI 的开工前指令。这段指令必须遵守 not_runtime=true，不能声称项目已经安装、运行或产生真实结果。\n```\n\n\n## 角色 / Skill 索引\n\n- 共索引 80 个角色 / Skill / 项目文档条目。\n\n- **Gemini**（project_doc）：You'll need a Gemini API key https://aistudio.google.com/app/u/2/apikey . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/llms/gemini.md`\n- **Installation**（project_doc）：How to install and get started pair programming with aider. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/install.md`\n- **Features**（project_doc）：AI Pair Programming in Your Terminal 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`README.md`\n- **Aider benchmark harness**（project_doc）：Aider uses benchmarks to quantitatively measure how well it works with various LLMs. This directory holds the harness and tools needed to run the benchmarking suite. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`benchmark/README.md`\n- **Readme**（project_doc）：These scm files are all adapted from the github repositories listed here: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/queries/tree-sitter-language-pack/README.md`\n- **Credits**（project_doc）：Aider uses modified versions of the tags.scm files from these open source tree-sitter language implementations: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/queries/tree-sitter-languages/README.md`\n- **Example chat transcripts**（project_doc）：Below are some chat transcripts showing what it's like to code with aider. In the chats, you'll see a variety of coding tasks like generating new code, editing existing code, debugging, exploring unfamiliar code, etc. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/examples/README.md`\n- **Contributing to the Project**（project_doc）：We welcome contributions in the form of bug reports, feature requests, and pull requests PRs . This document describes how you can contribute. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CONTRIBUTING.md`\n- **Install**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/_includes/install.md`\n- **The January GPT-4 Turbo is lazier than the last version**（project_doc）：{% if page.date %} {{ page.date date: \"%B %d, %Y\" }} {% endif %} 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/benchmarks-0125.md`\n- **Code editing benchmarks for OpenAI's \"1106\" models**（project_doc）：{% if page.date %} {{ page.date date: \"%B %d, %Y\" }} {% endif %} 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/benchmarks-1106.md`\n- **Speed benchmarks of GPT-4 Turbo and gpt-3.5-turbo-1106**（project_doc）：{% if page.date %} {{ page.date date: \"%B %d, %Y\" }} {% endif %} 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/benchmarks-speed-1106.md`\n- **GPT code editing benchmarks**（project_doc）：{% if page.date %} {{ page.date date: \"%B %d, %Y\" }} {% endif %} 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/benchmarks.md`\n- **Configuration**（project_doc）：Information on all of aider's settings and how to use them. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/config.md`\n- **Advanced model settings**（project_doc）：Configuring advanced settings for LLMs. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/config/adv-model-settings.md`\n- **YAML config file**（project_doc）：How to configure aider with a YAML config file. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/config/aider_conf.md`\n- **API Keys**（project_doc）：Setting API keys for API providers. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/config/api-keys.md`\n- **Config with .env**（project_doc）：Using a .env file to store LLM API keys for aider. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/config/dotenv.md`\n- **Editor configuration**（project_doc）：How to configure a custom editor for aider's /editor command 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/config/editor.md`\n- **Model Aliases**（project_doc）：Assign convenient short names to models. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/config/model-aliases.md`\n- **Options reference**（project_doc）：Details about all of aider's settings. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/config/options.md`\n- **Reasoning models**（project_doc）：How to configure reasoning model settings from secondary providers. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/config/reasoning.md`\n- **Improving GPT-4's codebase understanding with ctags**（project_doc）：{% if page.date %} {{ page.date date: \"%B %d, %Y\" }} {% endif %} 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/ctags.md`\n- **FAQ**（project_doc）：Frequently asked questions about aider. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/faq.md`\n- **Git integration**（project_doc）：Aider is tightly integrated with git. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/git.md`\n- **Aider Documentation**（project_doc）：Aider is AI pair programming in your terminal. This documentation will help you get the most out of aider. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/index.md`\n- **GitHub Codespaces**（project_doc）：You can use aider in GitHub Codespaces via the built-in Terminal pane. See below for an example, but you can just follow the main install instructions /docs/install.html inside your codespace terminal. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/install/codespaces.md`\n- **Aider with docker**（project_doc）：Aider is available as 2 docker images: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/install/docker.md`\n- **Optional steps**（project_doc）：The steps below are completely optional. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/install/optional.md`\n- **Replit**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/install/replit.md`\n- **Supported languages**（project_doc）：Aider supports pretty much all popular coding languages. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/languages.md`\n- **LLM code editing skill by model release date**（project_doc）：LLM code editing skill by model release date 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/leaderboards/by-release-date.md`\n- **Contributing results**（project_doc）：Contributions of benchmark results are welcome! See the benchmark README https://github.com/Aider-AI/aider/blob/main/benchmark/README.md for information on running aider's code editing benchmarks. Submit results by opening a PR with edits to the benchmark results data files https://github.com/Aider-AI/aider/blob/main/aider/website/ data/ . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/leaderboards/contrib.md`\n- **Code editing leaderboard**（project_doc）：Quantitative benchmark of basic LLM code editing skill. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/leaderboards/edit.md`\n- **Aider LLM Leaderboards**（project_doc）：Quantitative benchmarks of LLM code editing skill. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/leaderboards/index.md`\n- **Benchmark notes**（project_doc）：All pricing information is the cost to run the benchmark at the time it was run. Providers change their pricing and sometimes introduce entirely novel pricing structures. Pricing is provided on a best efforts basis, and may not always be current or fully accurate. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/leaderboards/notes.md`\n- **Refactoring leaderboard**（project_doc）：Quantitative benchmark of LLM code refactoring skill. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/leaderboards/refactor.md`\n- **Contributor Agreement**（project_doc）：Individual Contributor License Agreement 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/legal/contributor-agreement.md`\n- **Privacy policy**（project_doc）：Aider AI LLC /docs/faq.html what-is-aider-ai-llc “Aider,” “we,” “our,” and/or “us” values the privacy of individuals who use our website, programming tools, and related services collectively, our “Services” . This privacy policy the “Privacy Policy” explains how we collect, use, and disclose information from users of our Services. By using our Services, you agree to the collection, use, disclosure, and procedures th… 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/legal/privacy.md`\n- **Aider can connect to most LLMs**（project_doc）：Aider can connect to most LLMs for AI pair programming. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/llms.md`\n- **Anthropic**（project_doc）：To work with Anthropic's models, you need to provide your Anthropic API key https://docs.anthropic.com/claude/reference/getting-started-with-the-api either in the ANTHROPIC API KEY environment variable or via the --anthropic-api-key command line switch. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/llms/anthropic.md`\n- **Azure**（project_doc）：Aider can connect to the OpenAI models on Azure. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/llms/azure.md`\n- **Amazon Bedrock**（project_doc）：Aider can connect to models provided by Amazon Bedrock. To configure Aider to use the Amazon Bedrock API, you need to set up your AWS credentials. This can be done using the AWS CLI or by setting environment variables. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/llms/bedrock.md`\n- **Cohere**（project_doc）：Cohere offers free API access to their models. Their Command-R+ model works well with aider as a very basic coding assistant. You'll need a Cohere API key https://dashboard.cohere.com/welcome/login . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/llms/cohere.md`\n- **DeepSeek**（project_doc）：Aider can connect to the DeepSeek.com API. To work with DeepSeek's models, you need to set the DEEPSEEK API KEY environment variable with your DeepSeek API key https://platform.deepseek.com/api keys . The DeepSeek Chat V3 model has a top score on aider's code editing benchmark. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/llms/deepseek.md`\n- **GitHub Copilot**（project_doc）：Aider can connect to GitHub Copilot’s LLMs because Copilot exposes a standard OpenAI-style endpoint at: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/llms/github.md`\n- **GROQ**（project_doc）：Groq currently offers free API access to the models they host. The Llama 3 70B model works well with aider and is comparable to GPT-3.5 in code editing performance. You'll need a Groq API key https://console.groq.com/keys . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/llms/groq.md`\n- **LM Studio**（project_doc）：Aider can connect to models served by LM Studio. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/llms/lm-studio.md`\n- **Ollama**（project_doc）：Aider can connect to local Ollama models. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/llms/ollama.md`\n- **OpenAI compatible APIs**（project_doc）：Aider can connect to any LLM which is accessible via an OpenAI compatible API endpoint. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/llms/openai-compat.md`\n- **OpenAI**（project_doc）：To work with OpenAI's models, you need to provide your OpenAI API key https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key either in the OPENAI API KEY environment variable or via the --api-key openai= command line switch. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/llms/openai.md`\n- **OpenRouter**（project_doc）：Aider can connect to models provided by OpenRouter https://openrouter.ai/models?o=top-weekly : You'll need an OpenRouter API key https://openrouter.ai/keys . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/llms/openrouter.md`\n- **Other LLMs**（project_doc）：Aider uses the litellm https://docs.litellm.ai/docs/providers package to connect to hundreds of other models. You can use aider --model to use any supported model. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/llms/other.md`\n- **Vertex AI**（project_doc）：Aider can connect to models provided by Google Vertex AI. You will need to install the gcloud CLI https://cloud.google.com/sdk/docs/install and login https://cloud.google.com/sdk/docs/initializing with a GCP account or service account with permission to use the Vertex AI API. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/llms/vertex.md`\n- **Model warnings**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/llms/warnings.md`\n- **xAI**（project_doc）：You'll need a xAI API key https://console.x.ai. . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/llms/xai.md`\n- **More info**（project_doc）：See below for more info about aider, including some advanced topics. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/more-info.md`\n- **Analytics**（project_doc）：Opt-in, anonymous, no personal info. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/more/analytics.md`\n- **Edit formats**（project_doc）：Aider uses various \"edit formats\" to let LLMs edit source files. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/more/edit-formats.md`\n- **Infinite output**（project_doc）：Aider can handle \"infinite output\" from models that support prefill. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/more/infinite-output.md`\n- **Add --auto-accept-architect feature**（project_doc）：See how a new command-line option is added to automatically accept edits proposed by the architect model, with implementation. Aider also updates the project's HISTORY file. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/recordings/auto-accept-architect.md`\n- **Don't /drop read-only files added at launch**（project_doc）：Follow along as aider is modified to preserve read-only files specified at launch when using the /drop command. Aider does this implementation and adds test coverage. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/recordings/dont-drop-original-read-files.md`\n- **Screen recordings**（project_doc）：Screen recordings of aider building aider. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/recordings/index.md`\n- **Warn when users apply unsupported reasoning settings**（project_doc）：Watch the implementation of a warning system that alerts users when they try to apply reasoning settings to models that don't support them. Includes adding model metadata, confirmation dialogs, refactoring, and comprehensive test coverage. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/recordings/model-accepts-settings.md`\n- **Add language support via tree-sitter-language-pack**（project_doc）：Watch how aider adds support for tons of new programming languages by integrating with tree-sitter-language-pack. Demonstrates using aider to script downloading a collection of files, and using ad-hoc bash scripts to have aider modify a collection of files. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/recordings/tree-sitter-language-pack.md`\n- **Repository map**（project_doc）：Aider uses a map of your git repository to provide code context to LLMs. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/repomap.md`\n- **Scripting aider**（project_doc）：You can script aider via the command line or python. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/scripting.md`\n- **Troubleshooting**（project_doc）：How to troubleshoot problems with aider and get help. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/troubleshooting.md`\n- **Aider not found**（project_doc）：In some environments the aider command may not be available on your shell path. This can occur because of permissions/security settings in your OS, and often happens to Windows users. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/troubleshooting/aider-not-found.md`\n- **File editing problems**（project_doc）：Sometimes the LLM will reply with some code changes that don't get applied to your local files. In these cases, aider might say something like \"Failed to apply edit to filename \" or other error messages. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/troubleshooting/edit-errors.md`\n- **Dependency versions**（project_doc）：Aider expects to be installed with the correct versions of all of its required dependencies. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/troubleshooting/imports.md`\n- **Models and API keys**（project_doc）：Aider needs to know which LLM model you would like to work with and which keys to provide when accessing it via API. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/troubleshooting/models-and-keys.md`\n- **Using /help**（project_doc）：Type /help and aider will respond with helpful information. You can ask questions about using aider, customizing settings, troubleshooting, using LLMs, etc. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/troubleshooting/support.md`\n- **Token limits**（project_doc）：Every LLM has limits on how many tokens it can process for each request: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/troubleshooting/token-limits.md`\n- **Model warnings**（project_doc）： 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/troubleshooting/warnings.md`\n- **Unified diffs make GPT-4 Turbo 3X less lazy**（project_doc）：{% if page.date %} {{ page.date date: \"%B %d, %Y\" }}, by Paul Gauthier {% endif %} 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/unified-diffs.md`\n- **Usage**（project_doc）：How to use aider to pair program with AI and edit code in your local git repo. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/usage.md`\n- **Aider in your browser**（project_doc）：Aider can run in your browser, not just on the command line. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/usage/browser.md`\n- **Prompt caching**（project_doc）：Aider supports prompt caching for cost savings and faster coding. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/usage/caching.md`\n- **In-chat commands**（project_doc）：Control aider with in-chat commands like /add, /model, etc. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`aider/website/docs/usage/commands.md`\n\n## 证据索引\n\n- 共索引 80 条证据。\n\n- **Gemini**（documentation）：You'll need a Gemini API key https://aistudio.google.com/app/u/2/apikey . 证据：`aider/website/docs/llms/gemini.md`\n- **Installation**（documentation）：Get started quickly with aider-install 证据：`aider/website/docs/install.md`\n- **Features**（documentation）：AI Pair Programming in Your Terminal 证据：`README.md`\n- **Aider benchmark harness**（documentation）：Aider uses benchmarks to quantitatively measure how well it works with various LLMs. This directory holds the harness and tools needed to run the benchmarking suite. 证据：`benchmark/README.md`\n- **Readme**（documentation）：These scm files are all adapted from the github repositories listed here: 证据：`aider/queries/tree-sitter-language-pack/README.md`\n- **Credits**（documentation）：Aider uses modified versions of the tags.scm files from these open source tree-sitter language implementations: 证据：`aider/queries/tree-sitter-languages/README.md`\n- **Example chat transcripts**（documentation）：Below are some chat transcripts showing what it's like to code with aider. In the chats, you'll see a variety of coding tasks like generating new code, editing existing code, debugging, exploring unfamiliar code, etc. 证据：`aider/website/examples/README.md`\n- **Contributing to the Project**（documentation）：We welcome contributions in the form of bug reports, feature requests, and pull requests PRs . This document describes how you can contribute. 证据：`CONTRIBUTING.md`\n- **Install**（documentation）： 证据：`aider/website/_includes/install.md`\n- **The January GPT-4 Turbo is lazier than the last version**（documentation）：{% if page.date %} {{ page.date date: \"%B %d, %Y\" }} {% endif %} 证据：`aider/website/docs/benchmarks-0125.md`\n- **Code editing benchmarks for OpenAI's \"1106\" models**（documentation）：{% if page.date %} {{ page.date date: \"%B %d, %Y\" }} {% endif %} 证据：`aider/website/docs/benchmarks-1106.md`\n- **Speed benchmarks of GPT-4 Turbo and gpt-3.5-turbo-1106**（documentation）：{% if page.date %} {{ page.date date: \"%B %d, %Y\" }} {% endif %} 证据：`aider/website/docs/benchmarks-speed-1106.md`\n- **GPT code editing benchmarks**（documentation）：{% if page.date %} {{ page.date date: \"%B %d, %Y\" }} {% endif %} 证据：`aider/website/docs/benchmarks.md`\n- **Configuration**（documentation）：Aider has many options which can be set with command line switches. Most options can also be set in an .aider.conf.yml file which can be placed in your home directory or at the root of your git repo. Or by setting environment variables like AIDER xxx either in your shell or a .env file. 证据：`aider/website/docs/config.md`\n- **Advanced model settings**（documentation）：Context window size and token costs 证据：`aider/website/docs/config/adv-model-settings.md`\n- **YAML config file**（documentation）：Most of aider's options can be set in an .aider.conf.yml file. Aider will look for a this file in these locations: 证据：`aider/website/docs/config/aider_conf.md`\n- **API Keys**（documentation）：Aider lets you specify API keys in a few ways: 证据：`aider/website/docs/config/api-keys.md`\n- **Config with .env**（documentation）：You can use a .env file to store API keys and other settings for the models you use with aider. You can also set many general aider options in the .env file. 证据：`aider/website/docs/config/dotenv.md`\n- **Editor configuration**（documentation）：Aider allows you to configure your preferred text editor for use with the /editor command. The editor must be capable of running in \"blocking mode\", meaning the command line will wait until you close the editor before proceeding. 证据：`aider/website/docs/config/editor.md`\n- **Model Aliases**（documentation）：Model aliases allow you to create shorthand names for models you frequently use. This is particularly useful for models with long names or when you want to standardize model usage across your team. 证据：`aider/website/docs/config/model-aliases.md`\n- **Options reference**（documentation）：You can use aider --help to see all the available options, or review them below. 证据：`aider/website/docs/config/options.md`\n- **Reasoning models**（documentation）：! Thinking demo /assets/thinking.jpg 证据：`aider/website/docs/config/reasoning.md`\n- **Improving GPT-4's codebase understanding with ctags**（documentation）：{% if page.date %} {{ page.date date: \"%B %d, %Y\" }} {% endif %} 证据：`aider/website/docs/ctags.md`\n- **FAQ**（documentation）：How can I add ALL the files to the chat? 证据：`aider/website/docs/faq.md`\n- **Git integration**（documentation）：Aider works best with code that is part of a git repo. Aider is tightly integrated with git, which makes it easy to: 证据：`aider/website/docs/git.md`\n- **Aider Documentation**（documentation）：Aider is AI pair programming in your terminal. This documentation will help you get the most out of aider. 证据：`aider/website/docs/index.md`\n- **GitHub Codespaces**（documentation）：You can use aider in GitHub Codespaces via the built-in Terminal pane. See below for an example, but you can just follow the main install instructions /docs/install.html inside your codespace terminal. 证据：`aider/website/docs/install/codespaces.md`\n- **Aider with docker**（documentation）：Aider is available as 2 docker images: 证据：`aider/website/docs/install/docker.md`\n- **Optional steps**（documentation）：The steps below are completely optional. 证据：`aider/website/docs/install/optional.md`\n- **Replit**（documentation）：--- parent: Installation nav order: 900 --- Replit {% include replit-pipx.md %} 证据：`aider/website/docs/install/replit.md`\n- **Supported languages**（documentation）：Aider should work well with most popular coding languages. This is because top LLMs are fluent in most mainstream languages, and familiar with popular libraries, packages and frameworks. 证据：`aider/website/docs/languages.md`\n- **LLM code editing skill by model release date**（documentation）：LLM code editing skill by model release date 证据：`aider/website/docs/leaderboards/by-release-date.md`\n- **Contributing results**（documentation）：Contributions of benchmark results are welcome! See the benchmark README https://github.com/Aider-AI/aider/blob/main/benchmark/README.md for information on running aider's code editing benchmarks. Submit results by opening a PR with edits to the benchmark results data files https://github.com/Aider-AI/aider/blob/main/aider/website/ data/ . 证据：`aider/website/docs/leaderboards/contrib.md`\n- **Code editing leaderboard**（documentation）：{: .note :} This old aider code editing leaderboard edit.html has been replaced by the new, much more challenging polyglot leaderboard /docs/leaderboards/ . 证据：`aider/website/docs/leaderboards/edit.md`\n- **Aider LLM Leaderboards**（documentation）：Aider excels with LLMs skilled at writing and editing code, and uses benchmarks to evaluate an LLM's ability to follow instructions and edit code successfully without human intervention. Aider's polyglot benchmark https://aider.chat/2024/12/21/polyglot.html the-polyglot-benchmark tests LLMs on 225 challenging Exercism coding exercises across C++, Go, Java, JavaScript, Python, and Rust. 证据：`aider/website/docs/leaderboards/index.md`\n- **Benchmark notes**（documentation）：All pricing information is the cost to run the benchmark at the time it was run. Providers change their pricing and sometimes introduce entirely novel pricing structures. Pricing is provided on a best efforts basis, and may not always be current or fully accurate. 证据：`aider/website/docs/leaderboards/notes.md`\n- **Refactoring leaderboard**（documentation）：Aider's refactoring benchmark https://github.com/Aider-AI/refactor-benchmark asks the LLM to refactor 89 large methods from large python classes. This is a more challenging benchmark, which tests the model's ability to output long chunks of code without skipping sections or making mistakes. It was developed to provoke and measure GPT-4 Turbo's \"lazy coding\" habit /2023/12/21/unified-diffs.html . 证据：`aider/website/docs/leaderboards/refactor.md`\n- **Contributor Agreement**（documentation）：Individual Contributor License Agreement 证据：`aider/website/docs/legal/contributor-agreement.md`\n- **Privacy policy**（documentation）：Aider AI LLC /docs/faq.html what-is-aider-ai-llc “Aider,” “we,” “our,” and/or “us” values the privacy of individuals who use our website, programming tools, and related services collectively, our “Services” . This privacy policy the “Privacy Policy” explains how we collect, use, and disclose information from users of our Services. By using our Services, you agree to the collection, use, disclosure, and procedures this Privacy Policy describes. 证据：`aider/website/docs/legal/privacy.md`\n- **Aider can connect to most LLMs**（documentation）：Aider can connect to most LLMs {: .no toc } 证据：`aider/website/docs/llms.md`\n- **Anthropic**（documentation）：To work with Anthropic's models, you need to provide your Anthropic API key https://docs.anthropic.com/claude/reference/getting-started-with-the-api either in the ANTHROPIC API KEY environment variable or via the --anthropic-api-key command line switch. 证据：`aider/website/docs/llms/anthropic.md`\n- **Azure**（documentation）：Aider can connect to the OpenAI models on Azure. 证据：`aider/website/docs/llms/azure.md`\n- **Amazon Bedrock**（documentation）：Aider can connect to models provided by Amazon Bedrock. To configure Aider to use the Amazon Bedrock API, you need to set up your AWS credentials. This can be done using the AWS CLI or by setting environment variables. 证据：`aider/website/docs/llms/bedrock.md`\n- **Cohere**（documentation）：Cohere offers free API access to their models. Their Command-R+ model works well with aider as a very basic coding assistant. You'll need a Cohere API key https://dashboard.cohere.com/welcome/login . 证据：`aider/website/docs/llms/cohere.md`\n- **DeepSeek**（documentation）：Aider can connect to the DeepSeek.com API. To work with DeepSeek's models, you need to set the DEEPSEEK API KEY environment variable with your DeepSeek API key https://platform.deepseek.com/api keys . The DeepSeek Chat V3 model has a top score on aider's code editing benchmark. 证据：`aider/website/docs/llms/deepseek.md`\n- **GitHub Copilot**（documentation）：Aider can connect to GitHub Copilot’s LLMs because Copilot exposes a standard OpenAI-style endpoint at: 证据：`aider/website/docs/llms/github.md`\n- **GROQ**（documentation）：Groq currently offers free API access to the models they host. The Llama 3 70B model works well with aider and is comparable to GPT-3.5 in code editing performance. You'll need a Groq API key https://console.groq.com/keys . 证据：`aider/website/docs/llms/groq.md`\n- **LM Studio**（documentation）：Aider can connect to models served by LM Studio. 证据：`aider/website/docs/llms/lm-studio.md`\n- **Ollama**（documentation）：Aider can connect to local Ollama models. 证据：`aider/website/docs/llms/ollama.md`\n- **OpenAI compatible APIs**（documentation）：Aider can connect to any LLM which is accessible via an OpenAI compatible API endpoint. 证据：`aider/website/docs/llms/openai-compat.md`\n- **OpenAI**（documentation）：To work with OpenAI's models, you need to provide your OpenAI API key https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key either in the OPENAI API KEY environment variable or via the --api-key openai= command line switch. 证据：`aider/website/docs/llms/openai.md`\n- **OpenRouter**（documentation）：Aider can connect to models provided by OpenRouter https://openrouter.ai/models?o=top-weekly : You'll need an OpenRouter API key https://openrouter.ai/keys . 证据：`aider/website/docs/llms/openrouter.md`\n- **Other LLMs**（documentation）：Aider uses the litellm https://docs.litellm.ai/docs/providers package to connect to hundreds of other models. You can use aider --model to use any supported model. 证据：`aider/website/docs/llms/other.md`\n- **Vertex AI**（documentation）：Aider can connect to models provided by Google Vertex AI. You will need to install the gcloud CLI https://cloud.google.com/sdk/docs/install and login https://cloud.google.com/sdk/docs/initializing with a GCP account or service account with permission to use the Vertex AI API. 证据：`aider/website/docs/llms/vertex.md`\n- **Model warnings**（documentation）：--- parent: Connecting to LLMs nav order: 900 --- Model warnings {% include model-warnings.md %} 证据：`aider/website/docs/llms/warnings.md`\n- **xAI**（documentation）：You'll need a xAI API key https://console.x.ai. . 证据：`aider/website/docs/llms/xai.md`\n- **More info**（documentation）：See below for more info about aider, including some advanced topics. 证据：`aider/website/docs/more-info.md`\n- **Analytics**（documentation）：Aider can collect anonymous analytics to help improve aider's ability to work with LLMs, edit code and complete user requests. 证据：`aider/website/docs/more/analytics.md`\n- **Edit formats**（documentation）：Aider uses various \"edit formats\" to let LLMs edit source files. Different models work better or worse with different edit formats. Aider is configured to use the optimal format for most popular, common models. You can always force use of a specific edit format with the --edit-format switch. 证据：`aider/website/docs/more/edit-formats.md`\n- **Infinite output**（documentation）：LLM providers limit how much output a model can generate from a single request. This is usually called the output token limit. 证据：`aider/website/docs/more/infinite-output.md`\n- 其余 20 条证据见 `AI_CONTEXT_PACK.json` 或 `EVIDENCE_INDEX.json`。\n\n## 宿主 AI 必须遵守的规则\n\n- **把本资产当作开工前上下文，而不是运行环境。**：AI Context Pack 只包含证据化项目理解，不包含目标项目的可执行状态。 证据：`aider/website/docs/llms/gemini.md`, `aider/website/docs/install.md`, `README.md`\n- **回答用户时区分可预览内容与必须安装后才能验证的内容。**：安装前体验的消费者价值来自降低误装和误判，而不是伪装成真实运行。 证据：`aider/website/docs/llms/gemini.md`, `aider/website/docs/install.md`, `README.md`\n\n## 用户开工前应该回答的问题\n\n- 你准备在哪个宿主 AI 或本地环境中使用它？\n- 你只是想先体验工作流，还是准备真实安装？\n- 你最在意的是安装成本、输出质量、还是和现有规则的冲突？\n\n## 验收标准\n\n- 所有能力声明都能回指到 evidence_refs 中的文件路径。\n- AI_CONTEXT_PACK.md 没有把预览包装成真实运行。\n- 用户能在 3 分钟内看懂适合谁、能做什么、如何开始和风险边界。\n\n---\n\n## Doramagic Context Augmentation\n\n下面内容用于强化 Repomix/AI Context Pack 主体。Human Manual 只提供阅读骨架；踩坑日志会被转成宿主 AI 必须遵守的工作约束。\n\n## Human Manual 骨架\n\n使用规则：这里只是项目阅读路线和显著性信号，不是事实权威。具体事实仍必须回到 repo evidence / Claim Graph。\n\n宿主 AI 硬性规则：\n- 不得把页标题、章节顺序、摘要或 importance 当作项目事实证据。\n- 解释 Human Manual 骨架时，必须明确说它只是阅读路线/显著性信号。\n- 能力、安装、兼容性、运行状态和风险判断必须引用 repo evidence、source path 或 Claim Graph。\n\n- **Introduction to Aider**：importance `high`\n  - source_paths: aider/README.md, aider/__init__.py, aider/help.py, aider/prompts.py\n- **Installation and Setup**：importance `high`\n  - source_paths: pyproject.toml, requirements.txt, docker/Dockerfile, aider/website/docs/install.md\n- **Quick Start Guide**：importance `high`\n  - source_paths: aider/main.py, aider/args.py, aider/llm.py\n- **Core Architecture**：importance `high`\n  - source_paths: aider/main.py, aider/io.py, aider/coders/base_coder.py, aider/repo.py, aider/coders/__init__.py\n- **Main Application Flow**：importance `medium`\n  - source_paths: aider/main.py, aider/__main__.py, aider/commands.py, aider/sendchat.py\n- **Model Integration System**：importance `high`\n  - source_paths: aider/llm.py, aider/models.py, aider/sendchat.py, aider/openrouter.py, aider/resources/model-metadata.json\n- **Chat Communication Protocol**：importance `medium`\n  - source_paths: aider/sendchat.py, aider/mdstream.py, aider/chat_chunks.py, aider/coders/base_prompts.py\n- **Code Editing Strategies**：importance `high`\n  - source_paths: aider/coders/editblock_coder.py, aider/coders/wholefile_coder.py, aider/coders/udiff_coder.py, aider/coders/patch_coder.py, aider/coders/base_coder.py\n\n## Repo Inspection Evidence / 源码检查证据\n\n- repo_clone_verified: true\n- repo_inspection_verified: true\n- repo_commit: `6435cb8b1e885d7275327d4b61206b1b1618dfe1`\n- inspected_files: `pyproject.toml`, `README.md`, `requirements.txt`\n\n宿主 AI 硬性规则：\n- 没有 repo_clone_verified=true 时，不得声称已经读过源码。\n- 没有 repo_inspection_verified=true 时，不得把 README/docs/package 文件判断写成事实。\n- 没有 quick_start_verified=true 时，不得声称 Quick Start 已跑通。\n\n## Doramagic Pitfall Constraints / 踩坑约束\n\n这些规则来自 Doramagic 发现、验证或编译过程中的项目专属坑点。宿主 AI 必须把它们当作工作约束，而不是普通说明文字。\n\n### Constraint 1: 来源证据：Python 3.13 support\n\n- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：Python 3.13 support\n- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_d422c2c05bc34d938b82095b9b0b7131 | https://github.com/Aider-AI/aider/issues/3037 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 2: 来源证据：benchmark.py uses `--read-model-settings` but main cli + docs say `--model-settings-file`\n\n- Trigger: GitHub 社区证据显示该项目存在一个配置相关的待验证问题：benchmark.py uses `--read-model-settings` but main cli + docs say `--model-settings-file`\n- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- Why it matters: 可能影响升级、迁移或版本选择。\n- Evidence: community_evidence:github | cevd_04ccacbfaff740caaa5ac6f5280521c8 | https://github.com/Aider-AI/aider/issues/5131 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 3: 来源证据：Zed Editor Support\n\n- Trigger: GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Zed Editor Support\n- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- Why it matters: 可能影响授权、密钥配置或安全边界。\n- Evidence: community_evidence:github | cevd_de9d553c32dc4238bb4601e547645020 | https://github.com/Aider-AI/aider/issues/851 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 4: 来源证据：feat: Add --one-shot flag for sessionless single-prompt execution\n\n- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：feat: Add --one-shot flag for sessionless single-prompt execution\n- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_4434e2534a6d45e58141e326a1cd97f1 | https://github.com/Aider-AI/aider/issues/5143 | 来源类型 github_issue 暴露的待验证使用条件。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 5: 可能修改宿主 AI 配置\n\n- Trigger: 项目面向 Claude/Cursor/Codex/Gemini/OpenCode 等宿主，或安装命令涉及用户配置目录。\n- Host AI rule: 列出会写入的配置文件、目录和卸载/回滚步骤。\n- Why it matters: 安装可能改变本机 AI 工具行为，用户需要知道写入位置和回滚方法。\n- Evidence: capability.host_targets | github_repo:638629097 | https://github.com/Aider-AI/aider | host_targets=claude, chatgpt\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 6: 来源证据：Uncaught NotImplementedError in pathlib.py line 1090\n\n- Trigger: GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Uncaught NotImplementedError in pathlib.py line 1090\n- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_4a2e6220201a4896920a22c45da17ae4 | https://github.com/Aider-AI/aider/issues/5145 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 7: 来源证据：Uncaught OSError in _win32_console.py line 403\n\n- Trigger: GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Uncaught OSError in _win32_console.py line 403\n- Host AI rule: 来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_f4f7880f667f4a52b7ad9b82e7a4acd2 | https://github.com/Aider-AI/aider/issues/5117 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 8: 来源证据：Uncaught OSError in pathlib.py line 1222\n\n- Trigger: GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Uncaught OSError in pathlib.py line 1222\n- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_7f5383bfd86147d0929d2366e5b3044c | https://github.com/Aider-AI/aider/issues/5130 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 9: 来源证据：Uncaught QueryError in repomap.py line 302\n\n- Trigger: GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Uncaught QueryError in repomap.py line 302\n- Host AI rule: 来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_64f88b21f5fd4baa94c7e340b7006423 | https://github.com/Aider-AI/aider/issues/5133 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 10: 来源证据：git repo corrupted\n\n- Trigger: GitHub 社区证据显示该项目存在一个配置相关的待验证问题：git repo corrupted\n- Host AI rule: 来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_3cf7b9ede88e4598bacb2a1c5f7cd847 | https://github.com/Aider-AI/aider/issues/2734 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n",
      "summary": "给宿主 AI 的上下文和工作边界。",
      "title": "AI Context Pack / 带给我的 AI"
    },
    "boundary_risk_card": {
      "asset_id": "boundary_risk_card",
      "filename": "BOUNDARY_RISK_CARD.md",
      "markdown": "# Boundary & Risk Card / 安装前决策卡\n\n项目：Aider-AI/aider\n\n## Doramagic 试用结论\n\n当前结论：可以进入发布前推荐检查；首次使用仍应从最小权限、临时目录和可回滚配置开始。\n\n## 用户现在可以做\n\n- 可以先阅读 Human Manual，理解项目目的和主要工作流。\n- 可以复制 Prompt Preview 做安装前体验；这只验证交互感，不代表真实运行。\n- 可以把官方 Quick Start 命令放到隔离环境中验证，不要直接进主力环境。\n\n## 现在不要做\n\n- 不要把 Prompt Preview 当成项目实际运行结果。\n- 不要把 metadata-only validation 当成沙箱安装验证。\n- 不要把未验证能力写成“已支持、已跑通、可放心安装”。\n- 不要在首次试用时交出生产数据、私人文件、真实密钥或主力配置目录。\n\n## 安装前检查\n\n- 宿主 AI 是否匹配：claude, chatgpt\n- 官方安装入口状态：已发现官方入口\n- 是否在临时目录、临时宿主或容器中验证：必须是\n- 是否能回滚配置改动：必须能\n- 是否需要 API Key、网络访问、读写文件或修改宿主配置：未确认前按高风险处理\n- 是否记录了安装命令、实际输出和失败日志：必须记录\n\n## 当前阻塞项\n\n- 无阻塞项。\n\n## 项目专属踩坑\n\n- 来源证据：Python 3.13 support（high）：可能增加新用户试用和生产接入成本。 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 来源证据：benchmark.py uses `--read-model-settings` but main cli + docs say `--model-settings-file`（high）：可能影响升级、迁移或版本选择。 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 来源证据：Zed Editor Support（high）：可能影响授权、密钥配置或安全边界。 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 来源证据：feat: Add --one-shot flag for sessionless single-prompt execution（medium）：可能增加新用户试用和生产接入成本。 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 可能修改宿主 AI 配置（medium）：安装可能改变本机 AI 工具行为，用户需要知道写入位置和回滚方法。 建议检查：列出会写入的配置文件、目录和卸载/回滚步骤。\n\n## 风险与权限提示\n\n- no_demo: medium\n\n## 证据缺口\n\n- 暂未发现结构化证据缺口。\n",
      "summary": "安装、权限、验证和推荐前风险。",
      "title": "Boundary & Risk Card / 边界与风险卡"
    },
    "human_manual": {
      "asset_id": "human_manual",
      "filename": "HUMAN_MANUAL.md",
      "markdown": "# https://github.com/Aider-AI/aider 项目说明书\n\n生成时间：2026-05-16 09:51:38 UTC\n\n## 目录\n\n- [Introduction to Aider](#page-introduction)\n- [Installation and Setup](#page-installation)\n- [Quick Start Guide](#page-quickstart)\n- [Core Architecture](#page-core-architecture)\n- [Main Application Flow](#page-main-flow)\n- [Model Integration System](#page-model-integration)\n- [Chat Communication Protocol](#page-chat-communication)\n- [Code Editing Strategies](#page-coder-strategies)\n- [Edit Format Handling](#page-edit-formats)\n- [Git Integration](#page-git-integration)\n\n<a id='page-introduction'></a>\n\n## Introduction to Aider\n\n### 相关页面\n\n相关主题：[Installation and Setup](#page-installation), [Quick Start Guide](#page-quickstart)\n\n<details>\n<summary>Relevant Source Files</summary>\n\n以下源码文件用于生成本页说明：\n\n- [aider/README.md](https://github.com/Aider-AI/aider/blob/main/README.md)\n- [aider/website/index.html](https://github.com/Aider-AI/aider/blob/main/aider/website/index.html)\n- [aider/website/_includes/get-started.md](https://github.com/Aider-AI/aider/blob/main/aider/website/_includes/get-started.md)\n- [aider/website/examples/chat-transcript-css.md](https://github.com/Aider-AI/aider/blob/main/aider/website/examples/chat-transcript-css.md)\n- [aider/website/examples/complex-change.md](https://github.com/Aider-AI/aider/blob/main/aider/website/examples/complex-change.md)\n- [CONTRIBUTING.md](https://github.com/Aider-AI/aider/blob/main/CONTRIBUTING.md)\n</details>\n\n# Introduction to Aider\n\nAider is an AI pair programming tool that runs directly in your terminal. It enables developers to collaborate with Large Language Models (LLMs) to create new projects, modify existing codebases, and manage software development tasks through natural language commands.\n\n## Overview\n\nAider positions itself as an AI pair programmer, bridging the gap between human developers and artificial intelligence. Unlike traditional coding assistants that operate within IDEs, Aider operates through the command line, making it accessible and scriptable. The tool is designed to work seamlessly with Git, automatically committing changes with descriptive messages.\n\n| Attribute | Value |\n|-----------|-------|\n| Project Type | AI-assisted code editing tool |\n| Interface | Command-line terminal |\n| Primary Language | Python |\n| License | [MIT](https://github.com/Aider-AI/aider) |\n| Repository | [github.com/Aider-AI/aider](https://github.com/Aider-AI/aider) |\n\n资料来源：[aider/website/index.html](https://github.com/Aider-AI/aider/blob/main/aider/website/index.html)\n\n## Core Features\n\nAider provides a comprehensive set of features designed to streamline the development workflow.\n\n### Cloud and Local LLM Support\n\nAider connects to various LLM providers, with optimal support for:\n\n| Provider | Recommended Models |\n|----------|-------------------|\n| Anthropic | Claude 3.7 Sonnet |\n| DeepSeek | R1, Chat V3 |\n| OpenAI | o1, o3-mini, GPT-4o |\n| Local Models | Ollama, LM Studio compatible APIs |\n\nThe tool works best with LLM APIs but also supports interaction via web chat interfaces through copy/paste workflows.\n\n资料来源：[aider/website/index.html](https://github.com/Aider-AI/aider/blob/main/aider/website/index.html#L68-L85)\n\n### Multi-Language Support\n\nAider supports over 100 programming languages including:\n\n- Python, JavaScript, TypeScript\n- Rust, Go, Ruby\n- C++, PHP\n- HTML, CSS\n- And many more\n\n资料来源：[aider/website/index.html](https://github.com/Aider-AI/aider/blob/main/aider/website/index.html#L95-L105)\n\n### Git Integration\n\nAider automatically commits changes with sensible commit messages after each AI response. This integration allows developers to:\n\n- Track all AI-assisted changes\n- Use familiar Git tools to diff, manage, and undo changes\n- Maintain a complete history of modifications\n\n```bash\n# Example workflow\naider --model sonnet --api-key anthropic=<key>\n# Make changes via conversation\n# Aider auto-commits with descriptive messages\n```\n\n资料来源：[aider/website/index.html](https://github.com/Aider-AI/aider/blob/main/aider/website/index.html#L50-L60)\n\n### Codebase Mapping\n\nAider creates a comprehensive map of your entire codebase, enabling it to:\n\n- Understand project structure and dependencies\n- Make contextually appropriate changes in larger projects\n- Navigate and modify multiple files intelligently\n\n资料来源：[aider/website/index.html](https://github.com/Aider-AI/aider/blob/main/aider/website/index.html#L85-L95)\n\n## System Architecture\n\nThe architecture of Aider consists of several interconnected components that work together to provide the AI pair programming experience.\n\n```mermaid\ngraph TD\n    A[User Terminal] --> B[Aider CLI]\n    B --> C[InputOutput Module]\n    B --> D[LLM Connector]\n    D --> E[External LLM APIs]\n    B --> F[Git Manager]\n    B --> G[Codebase Mapper]\n    G --> H[Repository Files]\n    F --> H\n    C --> I[prompt_toolkit UI]\n    \n    style A fill:#e1f5fe\n    style E fill:#fff3e0\n    style H fill:#e8f5e9\n```\n\n### Component Overview\n\n| Component | Purpose |\n|-----------|---------|\n| CLI Entry Point | Parses arguments and initiates session |\n| InputOutput | Handles terminal I/O and UI rendering |\n| LLM Connector | Manages communication with LLM providers |\n| Git Manager | Handles version control operations |\n| Codebase Mapper | Analyzes and indexes project structure |\n\n资料来源：[aider/website/examples/complex-change.md](https://github.com/Aider-AI/aider/blob/main/aider/website/examples/complex-change.md)\n\n## Installation\n\nAider requires Python 3.9 through 3.12 and can be installed using pip or the official installer.\n\n### Quick Installation\n\n```bash\npython -m pip install aider-install\naider-install\n```\n\n### Direct pip Installation\n\n```bash\npip install aider-chat\n```\n\n### Manual Installation from Source\n\n```bash\ngit clone https://github.com/Aider-AI/aider.git\ncd aider\npip install -e .\n```\n\n资料来源：[aider/website/_includes/get-started.md](https://github.com/Aider-AI/aider/blob/main/aider/website/_includes/get-started.md)\n\n## Getting Started\n\n### Basic Usage\n\n1. Navigate to your project directory:\n\n```bash\ncd /to/your/project\n```\n\n2. Launch Aider with your preferred model:\n\n```bash\n# DeepSeek\naider --model deepseek --api-key deepseek=<key>\n\n# Claude 3.7 Sonnet\naider --model sonnet --api-key anthropic=<key>\n\n# OpenAI o3-mini\naider --model o3-mini --api-key openai=<key>\n```\n\n3. Start asking for changes:\n\n```bash\n# Create a new feature\n/add main.py\nPlease refactor the authenticate_user function to use JWT tokens\n\n# Modify existing code\n/add utils.py\nCan you add input validation to the parse_config function?\n```\n\n资料来源：[README.md](https://github.com/Aider-AI/aider/blob/main/README.md#L45-L75)\n\n### Interactive Workflow\n\n```mermaid\ngraph LR\n    A[Start Aider] --> B{Add files}\n    B --> C[Specify task]\n    C --> D[AI analyzes code]\n    D --> E[Proposes changes]\n    E --> F{User approves?}\n    F -->|Yes| G[Apply changes]\n    F -->|No| H[Provide feedback]\n    H --> C\n    G --> I[Auto-commit]\n    I --> J[Continue or exit]\n    J --> C\n```\n\n资料来源：[aider/website/examples/update-docs.md](https://github.com/Aider-AI/aider/blob/main/aider/website/examples/update-docs.md)\n\n## Configuration\n\nAider supports configuration through environment variables and command-line arguments.\n\n| Configuration | Environment Variable | Default | Description |\n|--------------|---------------------|---------|-------------|\n| Model | `AIDER_MODEL` | gpt-4 | LLM model to use |\n| API Key | Provider-specific | None | Authentication for LLM |\n| Pretty Output | `AIDER_PRETTY` | 1 (enabled) | Colorized terminal output |\n| Auto Commits | `AIDER_AUTO_COMMITS` | 1 (enabled) | Automatic Git commits |\n| Show Diffs | `AIDER_SHOW_DIFFS` | 0 (disabled) | Display diffs on commit |\n| History File | `AIDER_HISTORY_FILE` | .aider.history | Chat history storage |\n\n资料来源：[aider/website/examples/update-docs.md](https://github.com/Aider-AI/aider/blob/main/aider/website/examples/update-docs.md#L15-L30)\n\n## Advanced Features\n\n### Linting and Testing\n\nAider can automatically lint and test code after making changes. It integrates with your existing linters and test suites to ensure code quality.\n\n```bash\n# Enable auto-linting\naider --lint\n\n# Enable auto-testing\naider --test\n\n# Both together\naider --lint --test\n```\n\n资料来源：[aider/website/index.html](https://github.com/Aider-AI/aider/blob/main/aider/website/index.html#L115-L125)\n\n### Voice-to-Code\n\nSpeak with Aider about your code using voice input. Request new features, test cases, or bug fixes vocally.\n\n```bash\naider --voice\n```\n\n资料来源：[aider/website/index.html](https://github.com/Aider-AI/aider/blob/main/aider/website/index.html#L107-L115)\n\n### Images and Web Pages\n\nAdd images and web page references to provide visual context for your requests.\n\n```bash\n# Add screenshot reference\n/add screenshot.png\n\n# Add documentation URL\n/add https://api.example.com/docs\n```\n\n资料来源：[aider/website/index.html](https://github.com/Aider-AI/aider/blob/main/aider/website/index.html#L115-L125)\n\n### Web Chat Integration\n\nFor LLMs without API access, Aider supports copy/paste workflows with web chat interfaces. The tool streamlines transferring code context and edits between your terminal and browser.\n\n资料来源：[aider/website/index.html](https://github.com/Aider-AI/aider/blob/main/aider/website/index.html#L125-L135)\n\n## Example Workflows\n\n### Editing Existing Code\n\n```bash\n$ aider ./README.md aider/main.py\nAdded README.md to the chat\nAdded aider/main.py to the chat\n\n#### the cmd line args in main() have been updated. update the readme to accurately describe them.\n```\n\nAider will analyze the code changes and automatically update documentation to match.\n\n资料来源：[aider/website/examples/update-docs.md](https://github.com/Aider-AI/aider/blob/main/aider/website/examples/update-docs.md)\n\n### Styling and UI Changes\n\n```bash\n#### add some space inside the border of the blockquote\n\n```html\nindex.html\n<<<<<<< ORIGINAL\n    <style>\n      .main-content blockquote {\n        border: 0.1rem solid #159957;\n        border-radius: 0.5rem;\n        background-color: #e0f2ef;\n      }\n=======\n    <style>\n      .main-content blockquote {\n        border: 0.1rem solid #159957;\n        border-radius: 0.5rem;\n        background-color: #e0f2ef;\n        padding: 1rem;\n      }\n>>>>>>> UPDATED\n```\n\n> Applied edit to index.html\n> Commit dd7dcb6 aider: Added padding inside the border of the blockquote.\n\n资料来源：[aider/website/examples/chat-transcript-css.md](https://github.com/Aider-AI/aider/blob/main/aider/website/examples/chat-transcript-css.md)\n\n### Complex Refactoring\n\nAider can handle complex multi-file refactoring tasks:\n\n```python\n# Update InputOutput class\nclass InputOutput:\n    def __init__(self, pretty, yes, input_history_file, chat_history_file, input=None, output=None):\n        self.input = input\n        self.output = output\n```\n\nAider will identify all affected files and apply changes systematically, committing each step with descriptive messages.\n\n资料来源：[aider/website/examples/complex-change.md](https://github.com/Aider-AI/aider/blob/main/aider/website/examples/complex-change.md)\n\n## Development Guidelines\n\nWhen contributing to Aider or using it for project development, follow these standards:\n\n| Standard | Tool | Configuration |\n|----------|------|---------------|\n| Code Style | PEP 8 | Max line length: 100 |\n| Import Sorting | isort | Configured per project |\n| Code Formatting | Black | Default settings |\n| Testing | pytest | `aider/tests/test_*.py` |\n\nAider does not use type hints in its codebase.\n\n资料来源：[CONTRIBUTING.md](https://github.com/Aider-AI/aider/blob/main/CONTRIBUTING.md)\n\n## Resources and Documentation\n\n| Resource | URL |\n|----------|-----|\n| Official Website | https://aider.chat/ |\n| Installation Guide | https://aider.chat/docs/install.html |\n| Usage Documentation | https://aider.chat/docs/usage.html |\n| LLM Configuration | https://aider.chat/docs/llms.html |\n| Configuration Options | https://aider.chat/docs/config.html |\n| GitHub Repository | https://github.com/Aider-AI/aider |\n| Discord Community | https://discord.gg/Y7X7bhMQFV |\n\n## Summary\n\nAider transforms the terminal into an AI-powered development environment. By combining natural language processing with Git integration and codebase awareness, it enables developers to:\n\n- Rapidly prototype and implement features\n- Refactor existing code with confidence\n- Maintain comprehensive change histories\n- Work with multiple programming languages and LLM providers\n\nThe tool's emphasis on Git-based versioning and its ability to work across 100+ programming languages make it a versatile addition to any developer's toolkit.\n\n---\n\n<a id='page-installation'></a>\n\n## Installation and Setup\n\n### 相关页面\n\n相关主题：[Introduction to Aider](#page-introduction)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [pyproject.toml](https://github.com/Aider-AI/aider/blob/main/pyproject.toml)\n- [requirements.txt](https://github.com/Aider-AI/aider/blob/main/requirements.txt)\n- [docker/Dockerfile](https://github.com/Aider-AI/aider/blob/main/docker/Dockerfile)\n- [aider/website/docs/install.md](https://github.com/Aider-AI/aider/blob/main/aider/website/docs/install.md)\n- [requirements/requirements-dev.txt](https://github.com/Aider-AI/aider/blob/main/requirements/requirements-dev.txt)\n- [requirements/requirements-help.txt](https://github.com/Aider-AI/aider/blob/main/requirements/requirements-help.txt)\n- [CONTRIBUTING.md](https://github.com/Aider-AI/aider/blob/main/CONTRIBUTING.md)\n</details>\n\n# Installation and Setup\n\n## Overview\n\nAider is an AI pair programming tool that integrates with Large Language Models (LLMs) to help developers write, edit, and manage code directly from the terminal. The installation and setup process is designed to be straightforward, supporting multiple installation methods to accommodate different user preferences and system configurations.\n\nThe project supports Python versions 3.9, 3.10, 3.11, and 3.12, making it compatible with most modern Python environments. 资料来源：[CONTRIBUTING.md:1]()\n\n## System Requirements\n\n### Python Environment\n\n| Requirement | Specification |\n|-------------|---------------|\n| Python Version | 3.9, 3.10, 3.11, 3.12 |\n| Package Manager | pip, uv, or conda |\n| Operating System | Linux, macOS, Windows (via WSL) |\n\n### Core Dependencies\n\nAider's core dependencies include:\n\n| Package | Purpose |\n|---------|---------|\n| aiohttp 3.13.3 | Async HTTP client/server |\n| litellm | LLM interface abstraction |\n| openai | OpenAI API integration |\n| gitpython 3.1.46 | Git repository integration |\n| prompt-toolkit 3.0.52 | Terminal UI components |\n| fastapi 0.135.1 | REST API support |\n| pytest 9.0.2 | Testing framework |\n\n资料来源：[requirements.txt:1-50]()\n\n## Installation Methods\n\n### Method 1: pip Installation\n\nThe standard installation method uses pip:\n\n```bash\npip install aider-aider\n```\n\n### Method 2: uv Package Manager\n\nFor faster dependency resolution, use uv:\n\n```bash\nuv pip install aider-aider\n```\n\n### Method 3: Docker Installation\n\nAider provides a Docker image for isolated execution. The Dockerfile sets up the complete environment:\n\n```dockerfile\nFROM python:3.12-slim\nWORKDIR /app\nCOPY . .\nRUN pip install --no-cache-dir -e .\nCMD [\"aider\"]\n```\n\n资料来源：[docker/Dockerfile:1-5]()\n\n### Method 4: Development Installation\n\nFor contributors setting up a development environment:\n\n```bash\n# Clone the repository\ngit clone https://github.com/Aider-AI/aider.git\ncd aider\n\n# Install dependencies\npip install -e .\n\n# Install development dependencies\npip install -r requirements/requirements-dev.txt\n```\n\n资料来源：[CONTRIBUTING.md:1-30]()\n\n## Dependency Groups\n\nAider uses modular dependency groups to support different feature sets:\n\n### Core Dependencies (requirements.txt)\n\nThe main requirements file includes essential packages for basic functionality:\n\n| Group | Key Packages |\n|-------|--------------|\n| LLM Integration | litellm, openai, anthropic, huggingface-hub |\n| Git Operations | gitpython, gitdb |\n| Terminal UI | prompt-toolkit, rich |\n| HTTP/Async | aiohttp, httpx, anyio |\n| Configuration | configargparse, diskcache |\n\n资料来源：[requirements.txt:1-100]()\n\n### Optional Dependency Groups\n\n| Group | Purpose | Location |\n|-------|---------|----------|\n| requirements-help.in | Help system features | Rich documentation output |\n| requirements-browser.in | Browser automation | Playwright for web testing |\n| requirements-playwright.in | Playwright testing | E2E test automation |\n\n资料来源：[requirements/requirements-help.txt:1-30](), [requirements/requirements-browser.txt:1-30](), [requirements/requirements-playwright.txt:1-20]()\n\n### Development Dependencies\n\nDevelopment setup requires additional tooling:\n\n```bash\n# Install all development dependencies\npip install -r requirements/requirements-dev.txt\n```\n\n| Package | Purpose |\n|---------|---------|\n| pytest 9.0.2 | Test runner |\n| pytest-cov 7.0.0 | Code coverage |\n| pytest-env 1.6.0 | Environment variable management |\n| black | Code formatting |\n| isort | Import sorting |\n| flake8 7.3.0 | Linting |\n| pre-commit | Git hook management |\n| uv 0.10.11 | Fast package resolver |\n\n资料来源：[requirements/requirements-dev.txt:1-80]()\n\n## Development Setup\n\n### Pre-commit Hooks\n\nThe project uses pre-commit hooks to maintain code quality. Install them after cloning:\n\n```bash\npip install pre-commit\npre-commit install\n```\n\nThe hooks automatically run formatting checks (isort, Black) and linting (flake8) before each commit.\n\n资料来源：[CONTRIBUTING.md:1-30]()\n\n### Code Style Standards\n\n| Standard | Configuration |\n|----------|---------------|\n| Style Guide | PEP 8 |\n| Max Line Length | 100 characters |\n| Import Sorting | isort |\n| Code Formatting | Black |\n\n### Running Tests\n\n```bash\n# Run all tests\npytest\n\n# Run with coverage\npytest --cov=aider\n\n# Run specific test file\npytest aider/tests/test_*.py\n```\n\nTest files are located in `aider/tests/` directory following the `test_*.py` naming convention.\n\n资料来源：[CONTRIBUTING.md:1-30]()\n\n## Installation Flow Diagram\n\n```mermaid\ngraph TD\n    A[Start Installation] --> B{Check Python Version}\n    B -->|3.9-3.12| C[Choose Installation Method]\n    B -->|Invalid| D[Show Error: Python 3.9+ required]\n    \n    C --> E[pip install]\n    C --> F[uv pip install]\n    C --> G[Docker]\n    C --> H[Development install]\n    \n    E --> I[Install core dependencies]\n    F --> I\n    G --> J[Build Docker image]\n    H --> K[Install with -e flag]\n    H --> L[Install dev dependencies]\n    \n    I --> M[Installation Complete]\n    J --> M\n    K --> L\n    L --> M\n```\n\n## Environment Configuration\n\n### Environment Variables\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| AIDER_AUTO_COMMITS | 1 | Enable auto commits |\n| AIDER_SHOW_DIFFS | 0 | Show diffs on commit |\n| AIDER_NORECORD | 0 | Disable command recording |\n\n### Configuration Files\n\nAider supports configuration via:\n\n1. `~/.aider.conf.yml` - User-level settings\n2. `.aider.conf.yml` in project root - Project-level settings\n3. Command-line arguments - Session-specific overrides\n\n## Troubleshooting Installation Issues\n\n### Common Issues\n\n| Issue | Solution |\n|-------|----------|\n| Python version mismatch | Verify with `python --version`, use pyenv or virtualenv |\n| Permission denied | Use `--user` flag or virtual environment |\n| Missing git | Install git and ensure it's in PATH |\n| SSL/TLS errors | Check corporate firewall or proxy settings |\n\n### Verification\n\nAfter installation, verify setup:\n\n```bash\naider --version\naider --help\n```\n\n## Summary\n\nAider's installation and setup process supports multiple methods to accommodate various user preferences:\n\n- **pip/uv**: Quick installation for end users\n- **Docker**: Isolated environment without local Python conflicts\n- **Development**: Full setup for contributors with testing and linting tools\n\nThe modular dependency system allows users to install only the features they need, keeping the base installation lightweight while providing optional support for advanced features like browser automation and help system enhancements.\n\n资料来源：[CONTRIBUTING.md:1-30](), [requirements.txt:1-50](), [docker/Dockerfile:1-5]()\n\n---\n\n<a id='page-quickstart'></a>\n\n## Quick Start Guide\n\n### 相关页面\n\n相关主题：[Introduction to Aider](#page-introduction)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [README.md](https://github.com/Aider-AI/aider/blob/main/README.md)\n- [aider/website/index.html](https://github.com/Aider-AI/aider/blob/main/aider/website/index.html)\n- [aider/website/_includes/get-started.md](https://github.com/Aider-AI/aider/blob/main/aider/website/_includes/get-started.md)\n- [aider/website/examples/complex-change.md](https://github.com/Aider-AI/aider/blob/main/aider/website/examples/complex-change.md)\n- [aider/website/examples/no-color.md](https://github.com/Aider-AI/aider/blob/main/aider/website/examples/no-color.md)\n- [CONTRIBUTING.md](https://github.com/Aider-AI/aider/blob/main/CONTRIBUTING.md)\n</details>\n\n# Quick Start Guide\n\nAider is an AI pair programming tool that integrates Large Language Models (LLMs) directly into your terminal workflow. This guide provides the essential steps to install, configure, and begin using Aider for code development and modification.\n\n## Installation\n\n### Prerequisites\n\n| Requirement | Details |\n|-------------|---------|\n| Python Version | 3.9, 3.10, 3.11, or 3.12 资料来源：[CONTRIBUTING.md:1]() |\n| Package Manager | pip |\n| LLM API Access | API key for your chosen provider |\n\n### Quick Installation Methods\n\n**Method 1: Automated Installer (Recommended)**\n\n```bash\npython -m pip install aider-install\naider-install\n```\n\n资料来源：[aider/website/index.html:1]()\n\n**Method 2: Direct pip Installation**\n\n```bash\npip install aider-chat\n```\n\n资料来源：[README.md:1]()\n\n### Supported LLM Providers\n\nAider supports multiple LLM providers including:\n\n| Provider | Model Examples |\n|----------|---------------|\n| OpenAI | o1, o3-mini, GPT-4o |\n| Anthropic | Claude 3.7 Sonnet |\n| DeepSeek | DeepSeek models |\n| Local Models | Almost any LLM via API or web interface |\n\n资料来源：[aider/website/index.html:1]()\n\n## Initial Setup\n\n### Step 1: Navigate to Your Project\n\nChange directory into the codebase you want to work on:\n\n```bash\ncd /to/your/project\n```\n\n资料来源：[aider/website/_includes/get-started.md:1]()\n\n### Step 2: Configure API Key\n\nYou can provide your API key via command line or environment variable:\n\n```bash\n# Via command line\naider --model sonnet --api-key anthropic=<your-key>\n\n# Via environment variable\nexport ANTHROPIC_API_KEY=<your-key>\naider --model sonnet\n```\n\n资料来源：[aider/website/index.html:1]()\n\n### Step 3: Launch Aider\n\nStart a coding session with your preferred model:\n\n```bash\n# DeepSeek\naider --model deepseek --api-key deepseek=<key>\n\n# Claude 3.7 Sonnet\naider --model sonnet --api-key anthropic=<key>\n\n# o3-mini\naider --model o3-mini --api-key openai=<key>\n```\n\n资料来源：[aider/website/_includes/get-started.md:1]()\n\n## Core Workflow\n\n```mermaid\ngraph TD\n    A[Launch Aider] --> B[Load Codebase]\n    B --> C[Chat with LLM]\n    C --> D[Review Changes]\n    D --> E{Accept?}\n    E -->|Yes| F[Auto-commit Changes]\n    E -->|No| G[Continue Editing]\n    F --> H[Git Integration]\n    G --> C\n    H --> I[Session Complete]\n```\n\n### Workflow Description\n\n1. **Launch**: Start Aider from your project directory\n2. **Load**: Aider automatically maps your codebase 资料来源：[aider/website/index.html:1]()\n3. **Chat**: Describe changes in natural language\n4. **Review**: Examine proposed modifications\n5. **Commit**: Aider automatically commits with sensible messages\n\n## Command Line Options\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `--model` | LLM model to use | Required |\n| `--api-key` | API key for the provider | Required |\n| `--no-auto-commits` | Disable auto commit | Disabled |\n| `--show-diffs` | Show diffs when committing | False |\n| `--yes` | Auto-confirm all prompts | False |\n| `--no-color` | Disable colored output | Auto-detect |\n\n资料来源：[aider/website/examples/update-docs.md:1]()\n\n## Input/Output Configuration\n\nAider uses the `InputOutput` class to handle terminal interaction. The class supports custom input/output streams for testing and special environments:\n\n```python\ndef __init__(\n    self,\n    pretty=True,\n    yes=False,\n    input_history_file=None,\n    chat_history_file=None,\n    input=None,\n    output=None,\n    user_input_color=\"blue\",\n    tool_output_color=None,\n    tool_error_color=\"red\",\n):\n```\n\n资料来源：[aider/website/examples/no-color.md:1]()\n\n### Color Output Behavior\n\nAider respects the `NO_COLOR` environment variable. If set, Aider disables colored output automatically:\n\n```bash\nexport NO_COLOR=1\naider --model sonnet\n```\n\n资料来源：[aider/website/examples/no-color.md:1]()\n\n## Git Integration\n\nAider provides seamless Git integration:\n\n```mermaid\ngraph LR\n    A[Make Changes] --> B[Auto-Commit]\n    B --> C[Sensible Commit Messages]\n    C --> D[Use Standard Git Tools]\n    D --> E[Diff, Undo, Manage]\n```\n\nKey features:\n- Automatic commit creation with descriptive messages\n- Full compatibility with standard Git workflows\n- Easy diffing and undoing of AI changes 资料来源：[aider/website/index.html:1]()\n\n## Interactive Session Example\n\nA typical Aider session looks like:\n\n```\n$ aider --model sonnet\n>>> Add a new function to calculate fibonacci numbers\n```\n\nAider will:\n1. Analyze your codebase\n2. Propose the necessary changes\n3. Show you the diff\n4. Apply changes upon confirmation\n5. Commit with a meaningful message\n\n资料来源：[aider/website/examples/complex-change.md:1]()\n\n## Next Steps\n\n| Topic | Link |\n|-------|------|\n| Installation Guide | [/docs/install.html]() |\n| Usage Guide | [/docs/usage.html]() |\n| Configuration Options | [/docs/config.html]() |\n| Connecting to LLMs | [/docs/llms.html]() |\n| Troubleshooting | [/docs/troubleshooting.html]() |\n| FAQ | [/docs/faq.html]() |\n\n资料来源：[aider/website/index.html:1]()\n\n---\n\n<a id='page-core-architecture'></a>\n\n## Core Architecture\n\n### 相关页面\n\n相关主题：[Main Application Flow](#page-main-flow), [Model Integration System](#page-model-integration)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [aider/main.py](https://github.com/Aider-AI/aider/blob/main/aider/main.py)\n- [aider/io.py](https://github.com/Aider-AI/aider/blob/main/aider/io.py)\n- [aider/coders/base_coder.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/base_coder.py)\n- [aider/repo.py](https://github.com/Aider-AI/aider/blob/main/aider/repo.py)\n- [aider/coders/__init__.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/__init__.py)\n- [aider/getinput.py](https://github.com/Aider-AI/aider/blob/main/aider/getinput.py)\n</details>\n\n# Core Architecture\n\n## Overview\n\nAider is an AI pair programming tool that integrates with Large Language Models (LLMs) to enable collaborative coding directly in the terminal. The core architecture is designed around a modular system that separates concerns between user interaction, repository management, code editing, and LLM communication.\n\nThe architecture follows a layered approach where the main entry point handles CLI parsing and orchestration, while specialized modules manage input/output operations, repository interactions, and code modification. This separation allows Aider to work with various LLM providers while maintaining a consistent interface for users.\n\n## System Architecture Diagram\n\n```mermaid\ngraph TD\n    A[CLI Entry Point] --> B[InputOutput Manager]\n    A --> C[Repository Manager]\n    A --> D[Coder Engine]\n    B --> E[prompt_toolkit]\n    C --> F[Git Operations]\n    D --> G[LLM Adapter]\n    G --> H[Anthropic/OpenAI/Local Models]\n    D --> I[File System Operations]\n```\n\n## Core Components\n\n### Entry Point and CLI Handling\n\nThe `main()` function in `aider/main.py` serves as the primary entry point, responsible for parsing command-line arguments, initializing core components, and managing the main application loop. This function coordinates the interaction between the InputOutput manager, repository handler, and coder engine.\n\n资料来源：[aider/main.py:1-100]()\n\nThe CLI argument parsing utilizes Python's `argparse` module to support various configuration options including model selection, API key specification, auto-commit behavior, and diff display settings. The main function accepts `input` and `output` keyword arguments, enabling programmatic usage and testability.\n\n### InputOutput System\n\nThe InputOutput class in `aider/io.py` provides a unified interface for all user interaction, handling console output formatting, user confirmation prompts, and input collection. This class abstracts away the complexity of terminal handling and color output.\n\n资料来源：[aider/io.py:1-80]()\n\nThe InputOutput system supports the following key features:\n\n| Feature | Description | Configuration |\n|---------|-------------|---------------|\n| Pretty Output | Formatted console output with colors | `pretty` parameter |\n| Auto-yes Mode | Skip confirmation prompts | `yes` parameter |\n| Color Configuration | Customizable output colors | `user_input_color`, `tool_output_color`, `tool_error_color` |\n| NO_COLOR Support | Respects environment variable | Automatic detection |\n| History Management | Input and chat history files | `input_history_file`, `chat_history_file` |\n\n#### Color Handling\n\nThe InputOutput class implements sophisticated color handling that respects the `NO_COLOR` environment variable. When `NO_COLOR` is set and non-empty, the system automatically disables colored output regardless of other configuration settings.\n\n```python\nno_color = os.environ.get(\"NO_COLOR\")\nif no_color is not None and no_color != \"\":\n    pretty = False\n```\n\n资料来源：[aider/io.py:40-45]()\n\nThis design follows the NO_COLOR standard and ensures compatibility with terminals and build systems that do not support ANSI color codes.\n\n### Repository Management\n\nThe repository module (`aider/repo.py`) handles all Git operations, providing Aider with the ability to track file changes, manage commits, and maintain a history of AI-assisted modifications. This integration is fundamental to Aider's workflow, enabling users to review, diff, and undo changes using familiar Git tools.\n\n资料来源：[aider/repo.py:1-100]()\n\n### Coder Engine Architecture\n\nThe coder system forms the core of Aider's code modification capabilities. The base coder class defines the interface and common functionality that all language-specific coders inherit. This abstraction allows Aider to work with different programming languages while maintaining consistent editing behavior.\n\n资料来源：[aider/coders/base_coder.py:1-150]()\n\n```mermaid\nclassDiagram\n    class BaseCoder {\n        +edit_file()\n        +run()\n        +commit()\n        +check_git()\n    }\n    class CoderA {\n        +run()\n    }\n    class CoderB {\n        +run()\n    }\n    BaseCoder <|-- CoderA\n    BaseCoder <|-- CoderB\n```\n\nThe coder engine communicates with LLMs through adapters that normalize the interface across different providers. This design enables Aider to support multiple LLM backends including Anthropic Claude, OpenAI GPT models, DeepSeek, and local models.\n\n## Data Flow\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant IO as InputOutput\n    participant Repo as Repository\n    participant Coder as Coder Engine\n    participant LLM as Language Model\n    \n    User->>IO: Submit request\n    IO->>Coder: Forward message\n    Coder->>Repo: Check git status\n    Repo-->>Coder: Return status\n    Coder->>LLM: Send context + request\n    LLM-->>Coder: Return response\n    Coder->>Repo: Apply changes\n    Repo-->>Coder: Commit result\n    Coder->>IO: Display result\n    IO-->>User: Show output\n```\n\n## Configuration and Initialization\n\nThe initialization sequence follows a specific order to ensure all components are properly configured before use:\n\n1. Parse CLI arguments and load configuration from environment variables\n2. Initialize InputOutput with appropriate settings\n3. Create repository manager and validate git status\n4. Instantiate coder engine with LLM adapter\n5. Begin interactive session\n\n| Step | Component | Key Responsibilities |\n|------|-----------|---------------------|\n| 1 | ArgumentParser | CLI parsing, config loading |\n| 2 | InputOutput | Console setup, color configuration |\n| 3 | Repo | Git initialization, file tracking |\n| 4 | Coder | LLM connection, edit management |\n| 5 | Session | Main loop, user interaction |\n\n## Environment Variable Configuration\n\nAider supports extensive configuration through environment variables, allowing customization of core behaviors:\n\n| Variable | Default | Purpose |\n|----------|---------|---------|\n| `NO_COLOR` | None | Disable all color output |\n| `AIDER_AUTO_COMMITS` | 1 | Enable auto-commit feature |\n| `AIDER_SHOW_DIFFS` | 0 | Display diffs on commit |\n| `AIDER_MODEL` | None | Default LLM model |\n| `AIDER_API_KEY` | None | API key for LLM provider |\n\n资料来源：[aider/main.py:80-120]()\n\n## Testing Architecture\n\nThe InputOutput system supports dependency injection for testing purposes. The `input` and `output` parameters allow tests to provide mock or StringIO-based streams, enabling comprehensive testing of user interaction flows without terminal dependencies.\n\n```python\ndef __init__(self, ..., input=None, output=None, ...):\n    self.input = input\n    self.output = output\n```\n\n资料来源：[aider/io.py:25-30]()\n\nThis design pattern facilitates unit testing and integration testing by decoupling the I/O operations from the main logic, allowing tests to simulate various input scenarios and capture output for verification.\n\n## Module Dependencies\n\n```mermaid\ngraph LR\n    A[main.py] --> B[io.py]\n    A --> C[repo.py]\n    A --> D[coders/__init__.py]\n    B --> E[prompt_toolkit]\n    D --> F[base_coder.py]\n    F --> G[llm adapters]\n```\n\nThe dependency structure ensures that core functionality is isolated in foundational modules while higher-level components build upon them. This architecture supports maintainability and enables independent testing of each component.\n\n---\n\n<a id='page-main-flow'></a>\n\n## Main Application Flow\n\n### 相关页面\n\n相关主题：[Core Architecture](#page-core-architecture)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [aider/main.py](https://github.com/Aider-AI/aider/blob/main/aider/main.py)\n- [aider/__main__.py](https://github.com/Aider-AI/aider/blob/main/aider/__main__.py)\n- [aider/commands.py](https://github.com/Aider-AI/aider/blob/main/aider/commands.py)\n- [aider/sendchat.py](https://github.com/Aider-AI/aider/blob/main/aider/sendchat.py)\n- [aider/getinput.py](https://github.com/Aider-AI/aider/blob/main/aider/getinput.py)\n</details>\n\n# Main Application Flow\n\n## Overview\n\nThe Main Application Flow encompasses the entire lifecycle of an Aider session, from initialization through user interaction to AI-assisted code editing. Aider is an AI pair programming tool that integrates with Large Language Models (LLMs) to help developers modify codebases through natural language commands.\n\nThe application flow is designed around a command-driven architecture where user input is parsed, executed, or sent to the LLM for processing. Aider supports multiple LLM providers including Anthropic (Claude), OpenAI, DeepSeek, and local models.\n\n## Application Entry Points\n\n### Primary Entry: `__main__.py`\n\nThe `aider/__main__.py` file serves as the package entry point when running `python -m aider`. This module delegates to the main function in `aider/main.py`.\n\n```python\n# aider/__main__.py delegates to main.py\n```\n\n### Main Function: `main.py`\n\nThe `main()` function in `aider/main.py` orchestrates the entire application lifecycle. Based on chat transcript examples, it accepts the following keyword arguments:\n\n| Parameter | Type | Purpose |\n|-----------|------|---------|\n| `input` | file-like object | Input source for REPL (default: sys.stdin) |\n| `output` | file-like object | Output destination (default: sys.stdout) |\n\n资料来源：[aider/main.py](https://github.com/Aider-AI/aider/blob/main/aider/main.py)\n\n## Core Components\n\n### InputOutput Class\n\nThe `InputOutput` class in `aider/getinput.py` manages all user interaction. It wraps prompt_toolkit's functionality and handles:\n\n- Pretty/colorized terminal output\n- User confirmation prompts (`yes` flag)\n- Chat history file management\n- Input history file management\n- Terminal input/output streams\n\n资料来源：[aider/getinput.py](https://github.com/Aider-AI/aider/blob/main/aider/getinput.py)\n\n### Command Processing\n\nCommands in Aider are prefixed with `/` and processed by the `commands.py` module. Available commands include:\n\n| Command | Description |\n|---------|-------------|\n| `/quit` or `/exit` | Exit the application |\n| `/help` | Display available commands |\n| `/commit` | Manually commit changes |\n| `/diff` | Show current changes |\n| `/undo` | Revert last AI change |\n\n资料来源：[aider/commands.py](https://github.com/Aider-AI/aider/blob/main/aider/commands.py)\n\n### Chat Transmission\n\nThe `sendchat.py` module handles communication with LLM APIs. It constructs requests, sends them to the configured model, and processes responses.\n\n资料来源：[aider/sendchat.py](https://github.com/Aider-AI/aider/blob/main/aider/sendchat.py)\n\n## Application Flow Diagram\n\n```mermaid\ngraph TD\n    Start([User launches Aider]) --> Init[Initialize Application]\n    Init --> LoadConfig[Load Configuration]\n    LoadConfig --> SetupIO[Setup InputOutput]\n    SetupIO --> CheckModel[Validate LLM Model]\n    CheckModel --> RepoMap[Build Repository Map]\n    RepoMap --> REPL[Enter REPL Loop]\n    \n    REPL --> ReadInput[Read User Input]\n    ReadInput --> IsCommand{Is Command?}\n    IsCommand -->|Yes| ExecCmd[Execute Command]\n    ExecCmd --> REPL\n    IsCommand -->|No| SendToLLM[Send to LLM]\n    \n    SendToLLM --> ReceiveResponse[Receive LLM Response]\n    ReceiveResponse --> ApplyChanges[Apply Code Changes]\n    ApplyChanges --> AutoCommit[Auto-commit Changes]\n    AutoCommit --> REPL\n    \n    ApplyChanges -->|Errors Found| LintTest[Run Lint/Tests]\n    LintTest --> FixIssues[Fix Detected Issues]\n    FixIssues --> AutoCommit\n    \n    ReadInput -->|Exit Command| End([Session Ended])\n```\n\n## Session Lifecycle\n\n### 1. Initialization Phase\n\n1. Parse command-line arguments and environment variables\n2. Initialize the `InputOutput` class with user preferences\n3. Configure the LLM model based on `--model` flag or `AIDER_MODEL` environment variable\n4. Set up API credentials from `--api-key` or respective environment variables\n\n### 2. Repository Preparation Phase\n\n1. Build a map of the codebase (repository map) for context\n2. Identify and load relevant files based on user specification\n3. Initialize git integration for change tracking\n\n### 3. Interactive REPL Phase\n\nThe core interaction loop operates as follows:\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant REPL\n    participant Commands\n    participant LLM\n    participant Git\n    \n    User->>REPL: Input command/message\n    REPL->>Commands: Check for /command\n    alt Is slash command\n        Commands->>Commands: Execute built-in\n        Commands->>Git: Optionally commit/diff\n    else Is chat message\n        REPL->>LLM: Send to model\n        LLM->>REPL: Return response\n        REPL->>Git: Auto-commit changes\n    end\n    REPL->>User: Display output\n```\n\n### 4. Automatic Commit Flow\n\nAider automatically commits changes after each AI-assisted modification:\n\n```mermaid\ngraph LR\n    A[AI Edits Code] --> B[Generate Commit Message]\n    B --> C[Commit to Git]\n    C --> D[Store in History]\n```\n\nThe commit behavior can be controlled via:\n- `--no-auto-commits` flag\n- `AIDER_AUTO_COMMITS` environment variable (0 to disable)\n\n资料来源：[README.md](https://github.com/Aider-AI/aider/blob/main/README.md)\n\n## Configuration and Environment\n\n### Supported Python Versions\n\nAider supports Python 3.9 through 3.12.\n\n资料来源：[CONTRIBUTING.md](https://github.com/Aider-AI/aider/blob/main/CONTRIBUTING.md)\n\n### Environment Variables\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `AIDER_MODEL` | gpt-4 | Default LLM model |\n| `AIDER_API_KEY` | - | API key for the model |\n| `AIDER_AUTO_COMMITS` | 1 | Enable auto-commits |\n| `AIDER_SHOW_DIFFS` | 0 | Show diffs on commit |\n| `AIDER_HISTORY_FILE` | .aider.history | Chat history file |\n| `AIDER_PRETTY` | 1 | Enable colored output |\n\n## Testing Integration\n\nAider integrates with linting and testing tools:\n\n```mermaid\ngraph TD\n    A[AI Makes Changes] --> B{Config Enabled?}\n    B -->|Yes| C[Run Linters]\n    C --> D{Issues Found?}\n    D -->|Yes| E[AI Fixes Issues]\n    E --> F[Run Tests]\n    D -->|No| F\n    F --> G{Tests Pass?}\n    G -->|No| H[AI Fixes Tests]\n    H --> F\n    G -->|Yes| I[Commit Changes]\n```\n\n资料来源：[aider/website/index.html](https://github.com/Aider-AI/aider/blob/main/aider/website/index.html)\n\n## Error Handling\n\nThe application handles various error scenarios:\n\n1. **API Errors**: Retry logic with user notification\n2. **Git Conflicts**: User confirmation for resolution\n3. **Invalid Commands**: Display help message\n4. **File Access Errors**: Clear error messages with suggestions\n\n## Data Flow\n\n```mermaid\ngraph LR\n    subgraph Input\n        CLI[CLI Args] --> Env[Env Variables]\n        Env --> Config[Configuration]\n    end\n    \n    subgraph Processing\n        Config --> Main[main.py]\n        Main --> IO[InputOutput]\n        IO --> REPL[REPL Loop]\n        REPL --> Cmd[commands.py]\n        REPL --> Chat[sendchat.py]\n    end\n    \n    subgraph Output\n        Chat --> Response[LLM Response]\n        Response --> Diff[Git Diff]\n        Diff --> Commit[Auto-commit]\n    end\n```\n\n## Key Module Responsibilities\n\n| Module | Responsibility |\n|--------|----------------|\n| `__main__.py` | Package entry point, calls main() |\n| `main.py` | Application orchestration, argument parsing |\n| `getinput.py` | User I/O, prompt_toolkit integration |\n| `commands.py` | Built-in command processing |\n| `sendchat.py` | LLM API communication |\n\n## Conclusion\n\nThe Main Application Flow demonstrates Aider's architecture as a well-structured CLI tool that bridges human programming intent with AI capabilities. The flow prioritizes user experience through automatic git integration, clear feedback, and seamless LLM interaction while maintaining testability through configurable input/output streams for testing purposes.\n\n---\n\n<a id='page-model-integration'></a>\n\n## Model Integration System\n\n### 相关页面\n\n相关主题：[Chat Communication Protocol](#page-chat-communication), [Core Architecture](#page-core-architecture)\n\n<details>\n<summary>Related Source Files</summary>\n\n以下源码文件用于生成本页说明：\n\n- [aider/llm.py](https://github.com/Aider-AI/aider/blob/main/aider/llm.py) *(Not available in context)*\n- [aider/models.py](https://github.com/Aider-AI/aider/blob/main/aider/models.py) *(Not available in context)*\n- [aider/sendchat.py](https://github.com/Aider-AI/aider/blob/main/aider/sendchat.py) *(Not available in context)*\n- [aider/openrouter.py](https://github.com/Aider-AI/aider/blob/main/aider/openrouter.py) *(Not available in context)*\n- [aider/resources/model-metadata.json](https://github.com/Aider-AI/aider/blob/main/aider/resources/model-metadata.json) *(Not available in context)*\n- [aider/resources/model-settings.yml](https://github.com/Aider-AI/aider/blob/main/aider/resources/model-settings.yml) *(Not available in context)*\n\n**Note:** The requested source files were not included in the provided context. This page is generated based on context from README.md, requirements files, and website documentation.\n</details>\n\n# Model Integration System\n\nThe Model Integration System is Aider's core abstraction layer for connecting to and interacting with Large Language Models (LLMs). It provides a unified interface that allows Aider to work with multiple LLM providers including OpenAI, Anthropic, DeepSeek, and OpenRouter, while abstracting away provider-specific implementation details.\n\n## Overview\n\nAider's architecture separates the concerns of LLM communication from the main application logic. The Model Integration System handles:\n\n- **Provider Abstraction**: Uniform API for different LLM backends\n- **Model Configuration**: Settings and metadata for supported models\n- **Chat Communication**: Sending prompts and receiving responses\n- **Token Management**: Tracking usage and costs\n- **Error Handling**: Provider-specific error recovery\n\n资料来源：[README.md](https://github.com/Aider-AI/aider/blob/main/README.md)\n\n## Architecture Overview\n\n```mermaid\ngraph TD\n    A[User Interface] --> B[Core Application]\n    B --> C[Model Integration Layer]\n    C --> D[LLM Provider Adapters]\n    \n    D --> E[OpenAI API]\n    D --> F[Anthropic API]\n    D --> G[DeepSeek API]\n    D --> H[OpenRouter Gateway]\n    \n    C --> I[Model Settings]\n    C --> J[Model Metadata]\n    \n    style C fill:#e1f5fe\n    style D fill:#fff3e0\n```\n\n## Supported Models\n\nBased on the project's documentation, Aider supports the following model families:\n\n| Provider | Models | API Type |\n|----------|--------|----------|\n| OpenAI | GPT-4o, o1, o3-mini, GPT-3.5-turbo | REST API |\n| Anthropic | Claude 3.7 Sonnet, Claude 3 Opus | REST API |\n| DeepSeek | DeepSeek models | REST API |\n| OpenRouter | 100+ third-party models | Unified Gateway |\n| Local Models | Various via OLLAMA | Local API |\n\n资料来源：[aider/website/index.html](https://github.com/Aider-AI/aider/blob/main/aider/website/index.html)\n\n## Core Components\n\n### Model Configuration\n\nModels are configured through command-line arguments and environment variables:\n\n```bash\n# Using model flag\naider --model sonnet --api-key anthropic=<key>\n\n# Using DeepSeek\naider --model deepseek --api-key deepseek=<key>\n\n# Using OpenAI\naider --model o3-mini --api-key openai=<key>\n```\n\n### Environment Variables\n\n| Variable | Purpose | Example |\n|----------|---------|---------|\n| `AIDER_MODEL` | Default model selection | `sonnet`, `gpt-4o` |\n| `ANTHROPIC_API_KEY` | Anthropic authentication | `sk-ant-...` |\n| `OPENAI_API_KEY` | OpenAI authentication | `sk-...` |\n| `DEEPSEEK_API_KEY` | DeepSeek authentication | `<key>` |\n| `OPENROUTER_API_KEY` | OpenRouter authentication | `sk-or-...` |\n\n资料来源：[aider/website/_includes/get-started.md](https://github.com/Aider-AI/aider/blob/main/aider/website/_includes/get-started.md)\n\n## Dependency Architecture\n\nThe Model Integration System relies on several key dependencies for LLM communication:\n\n```mermaid\ngraph LR\n    A[LLM Integration] --> B[OpenAI Python SDK]\n    A --> C[Anthropic SDK]\n    A --> D[llama-index-core]\n    A --> E[transformers]\n    A --> F[sentence-transformers]\n    A --> G[tiktoken]\n    \n    B --> H[grpcio]\n    C --> I[aiohttp]\n    D --> J[torch]\n    E --> K[huggingface-hub]\n```\n\n### Key Dependencies\n\n| Package | Version | Purpose |\n|---------|---------|---------|\n| `openai` | Latest | OpenAI API client |\n| `anthropic` | Latest | Anthropic Claude client |\n| `llama-index-core` | Latest | Indexing and retrieval |\n| `transformers` | 5.3.0 | HuggingFace model support |\n| `sentence-transformers` | Latest | Embedding generation |\n| `tiktoken` | 0.12.0 | Token counting |\n| `torch` | 2.10.0 | ML computation backend |\n\n资料来源：[requirements/requirements-help.txt](https://github.com/Aider-AI/aider/blob/main/requirements/requirements-help.txt)\n\n## Model Communication Flow\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant App as Aider Core\n    participant LLM as LLM Adapter\n    participant API as Provider API\n    \n    User->>App: User prompt\n    App->>LLM: Prepare request\n    LLM->>API: API call with model\n    API->>LLM: Response\n    LLM->>App: Parsed response\n    App->>User: Display result\n    \n    Note over LLM,API: Token usage tracked\n```\n\n## Configuration Files\n\n### Model Metadata\n\nModel metadata files contain information about supported models including:\n\n- **Context window size**: Maximum tokens the model can process\n- **Output limits**: Maximum response tokens\n- **Pricing information**: Cost per token\n- **Capability flags**: Tool use, vision support, etc.\n\n### Model Settings\n\nSettings files configure per-model behavior:\n\n- Temperature parameters\n- System prompt templates\n- Retry configurations\n- Timeout values\n\n资料来源：[scripts/my_models.py](https://github.com/Aider-AI/aider/blob/main/scripts/my_models.py)\n\n## Token Tracking\n\nThe system tracks token usage across sessions:\n\n```python\n# Example token statistics structure\nmodel_stats = {\n    \"claude-3-7-sonnet-20260219\": 125000,\n    \"gpt-4o\": 85000,\n    \"deepseek-chat\": 62000,\n}\n```\n\nUsage analytics record:\n- Model name\n- Total input tokens\n- Total output tokens\n- Percentage of overall usage\n\n## Integration Points\n\n### Main Application Integration\n\nThe model integration connects with:\n\n1. **Input/Output System** (`aider/getinput.py`): Handles user interaction\n2. **File Management** (`aider/main.py`): Reads code context\n3. **Git Integration** (`aider/git.py`): Commits changes automatically\n4. **Linting/Testing** (`aider/linter.py`): Validates code changes\n\n### IDE Integration\n\nAider can be used from within IDEs by adding comments to code that trigger model interactions.\n\n资料来源：[aider/website/examples/complex-change.md](https://github.com/Aider-AI/aider/blob/main/aider/website/examples/complex-change.md)\n\n## Supported Programming Languages\n\nThe Model Integration System works across 100+ programming languages:\n\n| Category | Languages |\n|----------|-----------|\n| Web | JavaScript, TypeScript, HTML, CSS |\n| Systems | Python, Rust, Go, C++, C |\n| Scripting | Ruby, PHP, Perl, Lua |\n| Functional | Haskell, Scala, Clojure, F# |\n| Other | Java, Kotlin, Swift, R, Julia |\n\n资料来源：[aider/website/index.html](https://github.com/Aider-AI/aider/blob/main/aider/website/index.html)\n\n## Error Handling\n\nThe system implements provider-specific error recovery:\n\n- Rate limiting detection and backoff\n- Authentication failure handling\n- Network timeout management\n- Model-specific error mapping\n\n## Future Extensibility\n\nThe architecture supports adding new providers through:\n\n1. Implementing the adapter interface\n2. Adding provider configuration\n3. Updating model metadata\n4. Registering in the model registry\n\nThis modular design allows Aider to quickly adopt new LLM providers as they become available.\n\n## Related Documentation\n\n- [Installation Guide](https://aider.chat/docs/install.html)\n- [Usage Guide](https://aider.chat/docs/usage.html)\n- [Connecting to LLMs](https://aider.chat/docs/llms.html)\n- [Configuration Options](https://aider.chat/docs/config.html)\n\n---\n\n<a id='page-chat-communication'></a>\n\n## Chat Communication Protocol\n\n### 相关页面\n\n相关主题：[Model Integration System](#page-model-integration), [Code Editing Strategies](#page-coder-strategies)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [aider/sendchat.py](https://github.com/Aider-AI/aider/blob/main/aider/sendchat.py)\n- [aider/mdstream.py](https://github.com/Aider-AI/aider/blob/main/aider/mdstream.py)\n- [aider/chat_chunks.py](https://github.com/Aider-AI/aider/blob/main/aider/chat_chunks.py)\n- [aider/coders/base_prompts.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/base_prompts.py)\n- [aider/coders/editblock_prompts.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/editblock_prompts.py)\n- [aider/coders/wholefile_func_coder.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/wholefile_func_coder.py)\n</details>\n\n# Chat Communication Protocol\n\n## Overview\n\nThe Chat Communication Protocol in Aider defines how the application exchanges messages with Large Language Models (LLMs) to enable AI pair programming. This protocol orchestrates the sending of prompts, streaming of responses, parsing of code edits, and handling of various message formats between the user, Aider's codebase, and the LLM API.\n\nAider supports multiple edit response formats to accommodate different LLM capabilities and user preferences:\n\n- **Edit blocks** (`editblock`) - Uses fenced code blocks with `<<<<<<< ORIGINAL` and `=======` separators\n- **Whole file** (`wholefile`) - Returns complete updated file contents\n- **Whole function** (`whole-func`) - Uses function call API for structured file updates\n- **Diff function** (`diff-func`) - Uses function call API with diff-style edits\n\n资料来源：[aider/coders/editblock_prompts.py]()\n\n## Architecture\n\n```mermaid\ngraph TD\n    subgraph \"User Interface Layer\"\n        CLI[Command Line Interface]\n        IO[InputOutput / getinput.py]\n    end\n    \n    subgraph \"Coder Layer\"\n        BASE[Coder Base Class]\n        EDIT[EditblockCoder]\n        WHOLE[WholeFileCoder]\n        FUNC[WholeFuncCoder]\n    end\n    \n    subgraph \"Communication Layer\"\n        SEND[sendchat.py]\n        STREAM[mdstream.py]\n        CHUNKS[chat_chunks.py]\n    end\n    \n    subgraph \"LLM Backend\"\n        API[LLM API Provider]\n    end\n    \n    CLI --> IO\n    CLI --> BASE\n    BASE --> SEND\n    SEND --> STREAM\n    SEND --> API\n    STREAM --> CHUNKS\n    CHUNKS --> BASE\n    CHUNKS --> EDIT\n    CHUNKS --> WHOLE\n    CHUNKS --> FUNC\n```\n\n## Core Components\n\n### Message Prompts System\n\nThe prompt system in Aider is built on a class hierarchy rooted in `CoderPrompts`. Prompts are modular, allowing different coder types to customize their system messages and conversation flows.\n\n#### Base Prompt Structure\n\n```python\nclass CoderPrompts:\n    main_system = \"\"\"Base system prompt for aider...\"\"\"\n    example_messages = []\n    system_reminder = \"\"\n    files_content_prefix = \"\"\"These are some files...\"\"\"\n```\n\n资料来源：[aider/coders/base_prompts.py:1-10]()\n\n### Edit Block Prompts\n\nThe `EditblockPrompts` class extends `CoderPrompts` to generate prompts specifically designed for models that return edits in diff format:\n\n```python\nclass EditblockPrompts(CoderPrompts):\n    # Defines how to format edit instructions to the LLM\n    # Uses fenced code blocks with ORIGINAL/UPDATED markers\n```\n\n资料来源：[aider/coders/editblock_prompts.py]()\n\n## Response Formats\n\n### Edit Block Format\n\nThe default format uses fenced code blocks with conflict-style markers:\n\n````markdown\n```python\ndemo.py\n<<<<<<< ORIGINAL\n    print(\"hello\")\n=======\n    print(\"goodbye\")\n>>>>>>> UPDATED\n```\n````\n\nThe parser extracts the filename from the language identifier, then identifies the `ORIGINAL` and `UPDATED` sections using the conflict markers.\n\n资料来源：[aider/website/_posts/2023-07-02-benchmarks.md]()\n\n### Whole File Format\n\nReturns complete file contents in a fenced code block:\n\n````\nHere is the updated copy of your file demo.py:\n\ndemo.py\n```python\ndef main():\n    print(\"goodbye\")\n```\n````\n\n资料来源：[aider/website/_posts/2023-07-02-benchmarks.md]()\n\n### Function Call Formats\n\n#### Whole Function Format\n\nUses the function call API with structured JSON:\n\n```json\n{\n    \"explanation\": \"Changed hello to goodbye.\",\n    \"files\": [\n        {\n            \"path\": \"demo.py\",\n            \"content\": \"def main():\\n    print(\\\"goodbye\\\")\\n\"\n        }\n    ]\n}\n```\n\n资料来源：[aider/website/_posts/2023-07-02-benchmarks.md]()\n\n#### Diff Function Format\n\nCombines diff-style edits with function call API for structured output:\n\n| Format Type | Input Method | Output Method | Best For |\n|-------------|--------------|---------------|----------|\n| `editblock` | Chat completions | Markdown diff | Most LLMs |\n| `wholefile` | Chat completions | Full file content | Claude |\n| `whole-func` | Function calls | Structured JSON | Advanced models |\n| `diff-func` | Function calls | JSON diff | Code-specific models |\n\n## Message Streaming\n\n### Markdown Stream Processing\n\nThe `mdstream.py` module handles streaming responses from LLM APIs, parsing them incrementally to support real-time display of responses.\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant CLI\n    participant SendChat\n    participant Stream\n    participant LLM as LLM API\n    \n    User->>CLI: Execute command\n    CLI->>SendChat: Send prompt\n    SendChat->>LLM: Stream request\n    LLM-->>SendChat: Token stream\n    SendChat->>Stream: Process tokens\n    Stream-->>CLI: Markdown chunks\n    CLI-->>User: Real-time display\n```\n\n资料来源：[aider/mdstream.py]()\n\n### Chat Chunk Processing\n\nThe `chat_chunks.py` module parses streamed content into discrete, actionable chunks that can be processed by the appropriate coder:\n\n| Chunk Type | Description | Parser Used |\n|------------|-------------|-------------|\n| `read` | File read requests | Text extraction |\n| `edit` | Code modifications | Diff parser |\n| `message` | User/assistant messages | Markdown renderer |\n| `error` | Error responses | Error formatter |\n\n资料来源：[aider/chat_chunks.py]()\n\n## Workflow: Edit Request and Application\n\n```mermaid\ngraph LR\n    A[User Request] --> B[Construct Prompt]\n    B --> C[Send to LLM]\n    C --> D[Stream Response]\n    D --> E[Parse Edit Blocks]\n    E --> F{Format Valid?}\n    F -->|Yes| G[Validate Edit]\n    F -->|No| H[Request Retry]\n    G --> I{Edit Safe?}\n    I -->|Yes| J[Apply Edit]\n    I -->|No| K[User Confirmation]\n    K --> J\n    J --> L[Commit Changes]\n    H --> C\n```\n\n### Edit Validation\n\nBefore applying edits, Aider validates:\n\n1. **Syntax validity** - The edited code is syntactically correct\n2. **Semantic consistency** - Imports and references remain valid\n3. **Safety checks** - Destructive operations are flagged for confirmation\n\n资料来源：[aider/coders/editblock_prompts.py]()\n\n## Configuration Options\n\n### Prompt Customization\n\n| Parameter | Default | Description |\n|-----------|---------|-------------|\n| `main_system` | Base aider system | Primary instructions to the LLM |\n| `system_reminder` | Context reminder | Reminders appended to system |\n| `example_messages` | Empty list | Few-shot examples |\n| `files_content_prefix` | File intro text | How to introduce file context |\n\n资料来源：[aider/coders/base_prompts.py:1-20]()\n\n### Response Format Selection\n\n```python\n# In coder initialization\nformat_type = \"editblock\"  # Options: editblock, wholefile, whole-func, diff-func\n```\n\n## Integration with LLM Providers\n\nThe communication protocol is provider-agnostic, supporting:\n\n- **OpenAI** (GPT-4, GPT-3.5, o3-mini)\n- **Anthropic** (Claude 3.7 Sonnet, Claude Opus)\n- **DeepSeek**\n- **Local models** via OpenAI-compatible APIs\n\nEach provider may have preferred response formats configured in their respective coder implementations.\n\n## Error Handling\n\n| Error Type | Cause | Recovery Action |\n|------------|-------|-----------------|\n| Parse failure | Malformed response | Retry with clarification |\n| Invalid edit | Syntax error in proposed change | Show error, request correction |\n| API timeout | Network or provider issue | Automatic retry with backoff |\n| Rate limit | Provider throttling | Wait and retry |\n\n## Security Considerations\n\n- **No code execution** - Aider never executes LLM-provided code directly\n- **Git tracking** - All changes are committed through git for audit trail\n- **Confirmation prompts** - Destructive or significant changes require user approval\n- **Input sanitization** - File paths and content are validated before processing\n\n## Summary\n\nThe Chat Communication Protocol is the backbone of Aider's interaction with LLMs. It defines:\n\n- How prompts are constructed from user input and codebase context\n- How responses are streamed and parsed in real-time\n- How different edit formats are handled across LLM providers\n- How edits are validated, applied, and committed safely\n\nThis protocol enables Aider to serve as a reliable AI pair programming partner, bridging human intent with precise code modifications across diverse development environments.\n\n---\n\n<a id='page-coder-strategies'></a>\n\n## Code Editing Strategies\n\n### 相关页面\n\n相关主题：[Edit Format Handling](#page-edit-formats), [Chat Communication Protocol](#page-chat-communication)\n\n<details>\n<summary>Related Source Files</summary>\n\nThe following source files were used to generate this page:\n\n- [aider/coders/editblock_coder.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/editblock_coder.py)\n- [aider/coders/wholefile_coder.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/wholefile_coder.py)\n- [aider/coders/udiff_coder.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/udiff_coder.py)\n- [aider/coders/patch_coder.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/patch_coder.py)\n- [aider/coders/base_coder.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/base_coder.py)\n- [aider/coders/search_replace.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/search_replace.py)\n</details>\n\n# Code Editing Strategies\n\n## Overview\n\nAider supports multiple code editing strategies that determine how AI model outputs are converted into file modifications. Each strategy has distinct characteristics suited for different use cases, model capabilities, and editing scenarios.\n\nThe editing system in aider is built around a modular architecture where different coder classes handle specific edit formats. The base functionality is defined in `base_coder.py`, with specialized implementations for each editing approach.\n\n## Architecture\n\n### Edit Strategy Class Hierarchy\n\n```mermaid\ngraph TD\n    A[base_coder.py<br>BaseCoder] --> B[wholefile_coder.py<br>WholeFileCoder]\n    A --> C[editblock_coder.py<br>EditBlockCoder]\n    A --> D[search_replace.py<br>SearchReplaceCoder]\n    A --> E[udiff_coder.py<br>UDiffCoder]\n    A --> F[patch_coder.py<br>PatchCoder]\n    \n    B --> G[Whole File Editing<br>Complete file replacement]\n    C --> H[Edit Block<br>ORIGINAL/UPDATE markers]\n    D --> I[Search/Replace<br>Pattern matching edits]\n    E --> J[Unified Diff<br>diff -u format]\n    F --> K[Patch<br>git apply style]\n```\n\n### Edit Flow\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant Coder as BaseCoder\n    participant Parser as Edit Parser\n    participant File as File System\n    \n    User->>Coder: Request code change\n    Coder->>Coder: Send to LLM with format instructions\n    LLM-->>Coder: Return edit in specified format\n    Coder->>Parser: Parse edit response\n    Parser->>Parser: Validate edit structure\n    Parser->>File: Apply changes\n    File-->>Coder: Confirmation\n    Coder-->>User: Display result\n```\n\n## Edit Strategies\n\n### 1. Edit Block Format\n\nThe edit block format uses `<<<<<<< ORIGINAL` and `=======` markers to delineate changes. This is the default and most widely supported format.\n\n**File:** `aider/coders/editblock_coder.py`\n\n```python\n# Example structure\n<<<<<<< ORIGINAL\n    print(\"hello\")\n=======\n    print(\"goodbye\")\n>>>>>>> UPDATED\n```\n\n**Characteristics:**\n- Most compatible with various LLM models\n- Explicit ORIGINAL and UPDATED sections\n- Works well for localized changes\n- Requires the model to include surrounding context\n\n**Configuration:**\n\n| Parameter | Description | Default |\n|-----------|-------------|---------|\n| `fencing` | Language for code fences | varies by model |\n| `max_fences` | Maximum number of fences per response | auto-detected |\n\n资料来源：[aider/coders/editblock_coder.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/editblock_coder.py)\n\n---\n\n### 2. Whole File Editing\n\nThe whole file strategy requests complete replacement of file contents rather than incremental changes.\n\n**File:** `aider/coders/wholefile_coder.py`\n\n**Characteristics:**\n- Model returns complete file content\n- No risk of partial edit mismatches\n- Higher token overhead for large files\n- Uses function call API when available\n\n**Response Format:**\n```json\n{\n    \"explanation\": \"Changed hello to goodbye.\",\n    \"files\": [\n        {\n            \"path\": \"demo.py\",\n            \"content\": \"def main():\\n    print(\\\"goodbye\\\")\\n\"\n        }\n    ]\n}\n```\n\n资料来源：[aider/coders/wholefile_coder.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/wholefile_coder.py)\n\n---\n\n### 3. Unified Diff Format\n\nThe unified diff format uses standard `diff -u` style output for specifying changes.\n\n**File:** `aider/coders/udiff_coder.py`\n\n```diff\n--- a/demo.py\n+++ b/demo.py\n@@ -1,3 +1,3 @@\n def main():\n-    print(\"hello\")\n+    print(\"goodbye\")\n```\n\n**Characteristics:**\n- Industry-standard diff format\n- Familiar to developers using version control\n- Clear addition and deletion markers\n- Includes context lines automatically\n\n资料来源：[aider/coders/udiff_coder.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/udiff_coder.py)\n\n---\n\n### 4. Patch Format\n\nThe patch format provides git-apply compatible patches for file modifications.\n\n**File:** `aider/coders/patch_coder.py`\n\n**Characteristics:**\n- Direct compatibility with `git apply`\n- Header includes file path information\n- Binary diffing support\n- Strip count configuration for nested paths\n\n资料来源：[aider/coders/patch_coder.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/patch_coder.py)\n\n---\n\n### 5. Search/Replace Format\n\nThe search/replace format uses explicit `search_for` and `replace_with` directives.\n\n**File:** `aider/coders/search_replace.py`\n\n```python\nsearch_for: print(\"hello\")\nreplace_with: print(\"goodbye\")\n```\n\n**Characteristics:**\n- Explicit intent specification\n- Works well for simple substitutions\n- No need for surrounding context\n- Model-friendly for targeted changes\n\n**API Parameters:**\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `edit_format` | string | Must be \"search_replace\" |\n| `search_replace` | object | Contains search_for and replace_with keys |\n| `pathname` | string | Target file path |\n\n资料来源：[aider/coders/search_replace.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/search_replace.py)\n\n---\n\n## Base Coder Functionality\n\n**File:** `aider/coders/base_coder.py`\n\nThe `BaseCoder` class provides common functionality inherited by all edit strategies:\n\n### Core Responsibilities\n\n```mermaid\ngraph LR\n    A[User Request] --> B[BaseCoder]\n    B --> C[LLM Communication]\n    B --> D[Edit Parsing]\n    B --> E[File Operations]\n    B --> F[Git Integration]\n    \n    C --> G[Send prompts with format instructions]\n    D --> H[Validate and extract edits]\n    E --> I[Read/write file system]\n    F --> J[Auto-commit changes]\n```\n\n### Common Methods\n\n| Method | Description |\n|--------|-------------|\n| `run()` | Main interaction loop with LLM |\n| `get_edits()` | Parse and apply edits from response |\n| `check_retry()` | Validate edit structure, retry on failure |\n| `commit()` | Git commit with generated message |\n\n资料来源：[aider/coders/base_coder.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/base_coder.py)\n\n## Edit Response Processing\n\n### Parsing Pipeline\n\n```mermaid\nflowchart TD\n    A[LLM Response] --> B{Edit Format Valid?}\n    B -->|Yes| C[Extract File Paths]\n    B -->|No| D[Request Retry]\n    C --> E{File Exists?}\n    D --> A\n    E -->|Yes| F[Apply Edits]\n    E -->|No| G[Create New File]\n    F --> H[Validate Syntax]\n    G --> H\n    H --> I[Git Commit]\n    H --> J[Error Report]\n```\n\n### Validation Steps\n\n1. **Format Check**: Verify correct marker usage (`<<<<<<<`, `=======`, `>>>>>>>`)\n2. **Path Verification**: Confirm target files exist or are valid for creation\n3. **Syntax Validation**: Run linters if configured\n4. **Test Execution**: Run tests if enabled\n\n### Error Handling\n\n| Error Type | Recovery Action |\n|------------|-----------------|\n| Malformed ORIGINAL/UPDATE blocks | Request retry with clarification |\n| File not found | Create file or prompt user |\n| Syntax error | Report to LLM for correction |\n| Test failure | Rollback and request fix |\n\n## Configuration\n\n### Edit Format Selection\n\n```bash\n# Command line selection\naider --edit-format edit\n\n# Environment variable\nAIDER_EDIT_FORMAT=editblock\n```\n\n### Supported Format Values\n\n| Format | Coder Class | Best For |\n|--------|-------------|----------|\n| `edit` or `editblock` | EditBlockCoder | General purpose |\n| `whole` or `wholefile` | WholeFileCoder | Complete replacements |\n| `udiff` | UDiffCoder | Standard diff workflows |\n| `patch` | PatchCoder | Git operations |\n| `search_replace` | SearchReplaceCoder | Simple substitutions |\n\n## Best Practices\n\n### Selecting an Edit Strategy\n\n| Scenario | Recommended Strategy |\n|----------|----------------------|\n| Small localized changes | Edit Block |\n| Complete file rewrites | Whole File |\n| Working with version control | Unified Diff |\n| Multiple small changes | Search/Replace |\n| Complex multi-file changes | Patch |\n\n### Optimization Tips\n\n1. **Token Efficiency**: Use edit blocks for small changes to minimize token usage\n2. **Context Windows**: Consider whole-file for files under 4KB\n3. **Reliability**: Edit blocks provide better error messages for malformed responses\n4. **Model Capabilities**: Some models perform better with specific formats\n\n## Summary\n\nAider's code editing system provides five distinct strategies, each optimized for different scenarios and model capabilities. The modular architecture allows seamless switching between formats while maintaining consistent git integration and error handling. Understanding these strategies enables developers to choose the most effective approach for their specific use case and model selection.\n\n---\n\n<a id='page-edit-formats'></a>\n\n## Edit Format Handling\n\n### 相关页面\n\n相关主题：[Code Editing Strategies](#page-coder-strategies)\n\n<details>\n<summary>Related Source Files</summary>\n\n以下源码文件用于生成本页说明：\n\n- [aider/coders/editblock_prompts.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/editblock_prompts.py)\n- [aider/coders/editblock_func_coder.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/editblock_func_coder.py)\n- [aider/coders/editblock_fenced_prompts.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/editblock_fenced_prompts.py)\n- [aider/website/_posts/2023-07-02-benchmarks.md](https://github.com/Aider-AI/aider/blob/main/aider/website/_posts/2023-07-02-benchmarks.md)\n- [aider/website/examples/semantic-search-replace.md](https://github.com/Aider-AI/aider/blob/main/aider/website/examples/semantic-search-replace.md)\n</details>\n\n# Edit Format Handling\n\nAider supports multiple edit formats that define how Large Language Models (LLMs) communicate code changes back to the tool. Each format specifies a structured protocol for representing file modifications, including search patterns to locate code and replacement content.\n\n## Overview\n\nThe edit format handling system is a core component of Aider's architecture that bridges communication between LLMs and the local filesystem. When an LLM proposes changes to code, it must express them using a specific format that Aider can parse, validate, and apply.\n\n```mermaid\ngraph LR\n    A[LLM Response] --> B[Edit Format Parser]\n    B --> C{Valid Format?}\n    C -->|Yes| D[Apply Edits to Files]\n    C -->|No| E[Error Handling]\n    D --> F[Git Commit]\n    E --> G[Request Retry]\n    G --> A\n```\n\n资料来源：[aider/website/_posts/2023-07-02-benchmarks.md:25-40]()\n\n## Supported Edit Formats\n\nAider supports several edit formats, each with different trade-offs in expressiveness, parsing complexity, and LLM compatibility.\n\n| Format | Description | Use Case |\n|--------|-------------|----------|\n| `search_replace` | Search/Replace block format | Default format, works with most LLMs |\n| `diff` | Unified diff format | Version control oriented changes |\n| `whole` | Replace entire file content | Simple file-level operations |\n| `diff-func` | Function call API format | Structured JSON-based edits |\n\n资料来源：[aider/website/_posts/2023-07-02-benchmarks.md:25-40]()\n\n## Search/Replace Block Format\n\nThe search/replace format is the primary edit mechanism in Aider. It uses special markers to delimit sections of code that should be replaced.\n\n### Block Structure\n\nEach search/replace block follows this pattern:\n\n```markdown\npath/to/file.py\n<<<<<<< SEARCH\nexisting code lines to find\n=======\nnew code lines to insert\n>>>>>>> REPLACE\n```\n\n资料来源：[aider/coders/editblock_prompts.py:1-25]()\n\n### Prompt Instructions\n\nThe system includes detailed instructions for LLMs on how to construct valid search/replace blocks. These instructions are embedded in the edit format prompts and include:\n\n1. **File Path Requirements**: The full file path must appear alone on a line before each block\n2. **Unique Matching**: Search sections must exactly match existing content, including whitespace and comments\n3. **Sequential Processing**: Search/replace blocks are processed in order, with each replacement affecting subsequent blocks\n4. **Multi-file Support**: Multiple files can be edited in a single response\n\n资料来源：[aider/coders/editblock_fenced_prompts.py:1-30]()\n\n### Validation Rules\n\nThe search section of each block must:\n\n- Match the original file content character-for-character\n- Include all whitespace and newlines exactly as they appear\n- Be unique within the file to prevent ambiguous replacements\n- Include sufficient context lines for uniqueness\n\n资料来源：[aider/coders/editblock_prompts.py:20-30]()\n\n## Function Call Format (diff-func)\n\nThe `diff-func` format uses structured function calls to express edits, providing a machine-readable alternative to text-based search/replace blocks.\n\n### Request Structure\n\n```json\n{\n  \"explanation\": \"Step by step plan for the changes\",\n  \"edits\": [\n    {\n      \"path\": \"demo.py\",\n      \"original_lines\": [\"    print(\\\"hello\\\")\"],\n      \"updated_lines\": [\"    print(\\\"goodbye\\\")\"]\n    }\n  ]\n}\n```\n\n资料来源：[aider/coders/editblock_func_coder.py:1-30]()\n\n### Edit Object Schema\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `path` | string | Yes | Path of file to edit |\n| `original_lines` | array of strings | Yes | Lines to search for in original file |\n| `updated_lines` | array of strings | Yes | New content to replace matched lines |\n\n资料来源：[aider/coders/editblock_func_coder.py:50-80]()\n\n### Deprecation Notice\n\nThe current implementation of `EditBlockFunctionCoder` is marked as deprecated:\n\n```python\ndef __init__(self, code_format, *args, **kwargs):\n    raise RuntimeError(\"Deprecated, needs to be refactored to support get_edits/apply_edits\")\n```\n\n资料来源：[aider/coders/editblock_func_coder.py:35-37]()\n\n## Edit Application Workflow\n\n```mermaid\nsequenceDiagram\n    participant LLM\n    participant Parser\n    participant Validator\n    participant FileSystem\n    participant Git\n    \n    LLM->>Parser: Send response with edits\n    Parser->>Parser: Extract edit blocks\n    Parser->>Validator: Validate search patterns\n    Validator->>FileSystem: Read target files\n    Validator->>Validator: Verify exact matches\n    Validator->>FileSystem: Apply replacements\n    FileSystem->>Git: Stage changes\n    Git->>Git: Create commit\n```\n\n## Error Handling\n\nWhen an edit cannot be applied, Aider provides detailed error messages to help the LLM retry with corrected edits.\n\n### Common Error Scenarios\n\n| Error Type | Cause | Recovery Action |\n|------------|-------|-----------------|\n| `Malformed ORIGINAL/UPDATE blocks` | Missing or misaligned markers | Retry with correctly formatted blocks |\n| `No exact match found` | Search content differs from file | Verify whitespace and content |\n| `Multiple matches found` | Search pattern not unique | Add more context lines |\n\n资料来源：[aider/website/examples/semantic-search-replace.md:1-20]()\n\n### Error Reporting Format\n\nAider reports errors through the IO subsystem:\n\n```python\nself.io.tool_error(\"Malformed ORIGINAL/UPDATE blocks, retrying...\")\nself.io.tool_error(Text(err))\n```\n\n资料来源：[aider/website/examples/semantic-search-replace.md:10-15]()\n\n## Integration with Commands\n\nThe edit format handling integrates with Aider's command system through the `Commands` class, which manages the coder lifecycle and edit format selection.\n\n```python\ncoder = Coder.create(\n    io=self.io,\n    from_coder=self.coder,\n    edit_format=edit_format,\n    summarize_from_coder=False,\n)\n```\n\n资料来源：[aider/commands.py:1-30]()\n\n## Best Practices\n\n### For LLM Generation\n\n1. Always include the full file path on its own line before each edit block\n2. Ensure search sections contain exact matches including all whitespace\n3. Use sufficient context lines to uniquely identify the target location\n4. Process files in a logical order when making multiple changes\n\n### For Users\n\n1. Use `/edit-format` command to switch between available formats\n2. Enable linting and testing to validate changes automatically\n3. Review git diffs before committing AI-generated changes\n\n资料来源：[README.md:1-50]()\n\n## Configuration\n\nEdit format behavior can be configured through Aider's settings:\n\n| Setting | Description | Default |\n|---------|-------------|---------|\n| `edit_format` | Preferred edit format | `search_replace` |\n| `auto_lint` | Run linter after edits | `true` |\n| `auto_test` | Run tests after edits | `false` |\n\n## Related Components\n\nThe edit format handling system depends on several core components:\n\n- **Base Coder** (`base_coder.py`): Defines the interface for all coder implementations\n- **Edit Block Prompts** (`editblock_prompts.py`): Contains LLM instructions for each format\n- **IO Subsystem** (`io.py`): Handles error reporting and user communication\n- **Git Integration**: Automatically commits applied changes\n\n资料来源：[aider/coders/editblock_prompts.py:1-50]()\n资料来源：[aider/coders/editblock_func_coder.py:1-80]()\n\n---\n\n<a id='page-git-integration'></a>\n\n## Git Integration\n\n# Aider Repository Analysis\n\n## Overview\n\nAider is an AI pair programming tool that runs in the terminal, allowing developers to collaborate with Large Language Models (LLMs) on code editing tasks. It integrates with git for version control and supports multiple LLM providers including DeepSeek, Claude, and OpenAI models.\n\n## Project Structure\n\n| Directory/File | Purpose |\n|----------------|---------|\n| `aider/` | Main Python package containing core application code |\n| `aider/coders/` | Code editing and generation modules |\n| `aider/website/` | Jekyll-based documentation site |\n| `requirements/` | Dependency specifications |\n| `README.md` | Project documentation and getting started |\n| `CONTRIBUTING.md` | Developer guidelines |\n\n## Key Source Files\n\n| File | Description |\n|------|-------------|\n| `aider/main.py` | Application entry point, argument parsing integration |\n| `aider/args.py` | Command-line argument definitions including git settings |\n| `aider/repo.py` | Git repository operations |\n| `aider/prompts.py` | System prompts for LLM interactions and commit message generation |\n| `aider/history.py` | Chat history management |\n| `aider/coders/base_coder.py` | Base class for code editing operations |\n\n## Git Integration\n\nAider provides comprehensive git integration with the following features:\n\n### Command-Line Options (from `aider/args.py:1-100`)\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| `--git` | BooleanOptional | True | Enable/disable git repo detection |\n| `--gitignore` | BooleanOptional | True | Add `.aider*` to `.gitignore` |\n| `--add-gitignore-files` | BooleanOptional | False | Include `.gitignore` files in editing scope |\n| `--aiderignore` | Path | `.aiderignore` | Specify aider ignore file |\n| `--subtree-only` | Boolean | False | Only consider files in current subtree |\n| `--auto-commits` | BooleanOptional | True | Auto commit LLM changes |\n| `--dirty-commits` | BooleanOptional | True | Commit dirty state |\n| `--show-diffs` | Boolean | False | Show diffs when committing |\n\n### Commit Message Format\n\nFrom `aider/prompts.py:10-26`, Aider generates Conventional Commits format messages:\n\n- Structure: `<type>: <description>`\n- Types: fix, feat, build, chore, ci, docs, style, refactor, perf, test\n- Imperative mood required\n- Maximum 72 characters\n\n## Development Standards\n\n### Python Compatibility\n- Versions: 3.9, 3.10, 3.11, 3.12\n- No type hints used in codebase\n\n### Code Style\n- PEP 8 compliance\n- Maximum line length: 100 characters\n- Tools: `isort` for imports, `Black` for formatting\n- Pre-commit hooks enforce style\n\n### Testing\n- Framework: pytest\n- Location: `aider/tests/`\n- Naming convention: `test_*.py`\n\n## Dependencies\n\nKey dependencies from `requirements/requirements-browser.txt`:\n\n- `gitpython==3.1.46` - Git operations\n- `streamlit` - Browser UI components\n- `pandas==2.3.3` - Data handling\n- `jinja2==3.1.6` - Templating\n\n## Installation\n\n```bash\npython -m pip install aider-install\naider-install\n```\n\n## Usage Example\n\n```bash\n# DeepSeek\naider --model deepseek --api-key deepseek=<key>\n\n# Claude 3.7 Sonnet  \naider --model sonnet --api-key anthropic=<key>\n\n# o3-mini\naider --model o3-mini --api-key openai=<key>\n\n---\n\n---\n\n## Doramagic 踩坑日志\n\n项目：Aider-AI/aider\n\n摘要：发现 21 个潜在踩坑项，其中 3 个为 high/blocking；最高优先级：安装坑 - 来源证据：Python 3.13 support。\n\n## 1. 安装坑 · 来源证据：Python 3.13 support\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：Python 3.13 support\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_d422c2c05bc34d938b82095b9b0b7131 | https://github.com/Aider-AI/aider/issues/3037 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 2. 配置坑 · 来源证据：benchmark.py uses `--read-model-settings` but main cli + docs say `--model-settings-file`\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：benchmark.py uses `--read-model-settings` but main cli + docs say `--model-settings-file`\n- 对用户的影响：可能影响升级、迁移或版本选择。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_04ccacbfaff740caaa5ac6f5280521c8 | https://github.com/Aider-AI/aider/issues/5131 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 3. 安全/权限坑 · 来源证据：Zed Editor Support\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Zed Editor Support\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_de9d553c32dc4238bb4601e547645020 | https://github.com/Aider-AI/aider/issues/851 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 4. 安装坑 · 来源证据：feat: Add --one-shot flag for sessionless single-prompt execution\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：feat: Add --one-shot flag for sessionless single-prompt execution\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_4434e2534a6d45e58141e326a1cd97f1 | https://github.com/Aider-AI/aider/issues/5143 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 5. 配置坑 · 可能修改宿主 AI 配置\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：项目面向 Claude/Cursor/Codex/Gemini/OpenCode 等宿主，或安装命令涉及用户配置目录。\n- 对用户的影响：安装可能改变本机 AI 工具行为，用户需要知道写入位置和回滚方法。\n- 建议检查：列出会写入的配置文件、目录和卸载/回滚步骤。\n- 防护动作：涉及宿主配置目录时必须给回滚路径，不能只给安装命令。\n- 证据：capability.host_targets | github_repo:638629097 | https://github.com/Aider-AI/aider | host_targets=claude, chatgpt\n\n## 6. 配置坑 · 来源证据：Uncaught NotImplementedError in pathlib.py line 1090\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Uncaught NotImplementedError in pathlib.py line 1090\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_4a2e6220201a4896920a22c45da17ae4 | https://github.com/Aider-AI/aider/issues/5145 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 7. 配置坑 · 来源证据：Uncaught OSError in _win32_console.py line 403\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Uncaught OSError in _win32_console.py line 403\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_f4f7880f667f4a52b7ad9b82e7a4acd2 | https://github.com/Aider-AI/aider/issues/5117 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 8. 配置坑 · 来源证据：Uncaught OSError in pathlib.py line 1222\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Uncaught OSError in pathlib.py line 1222\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_7f5383bfd86147d0929d2366e5b3044c | https://github.com/Aider-AI/aider/issues/5130 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 9. 配置坑 · 来源证据：Uncaught QueryError in repomap.py line 302\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Uncaught QueryError in repomap.py line 302\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_64f88b21f5fd4baa94c7e340b7006423 | https://github.com/Aider-AI/aider/issues/5133 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 10. 配置坑 · 来源证据：git repo corrupted\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：git repo corrupted\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_3cf7b9ede88e4598bacb2a1c5f7cd847 | https://github.com/Aider-AI/aider/issues/2734 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 11. 能力坑 · 能力判断依赖假设\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：README/documentation is current enough for a first validation pass.\n- 对用户的影响：假设不成立时，用户拿不到承诺的能力。\n- 建议检查：将假设转成下游验证清单。\n- 防护动作：假设必须转成验证项；没有验证结果前不能写成事实。\n- 证据：capability.assumptions | github_repo:638629097 | https://github.com/Aider-AI/aider | README/documentation is current enough for a first validation pass.\n\n## 12. 维护坑 · 维护活跃度未知\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：未记录 last_activity_observed。\n- 对用户的影响：新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。\n- 建议检查：补 GitHub 最近 commit、release、issue/PR 响应信号。\n- 防护动作：维护活跃度未知时，推荐强度不能标为高信任。\n- 证据：evidence.maintainer_signals | github_repo:638629097 | https://github.com/Aider-AI/aider | last_activity_observed missing\n\n## 13. 安全/权限坑 · 下游验证发现风险项\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：下游已经要求复核，不能在页面中弱化。\n- 建议检查：进入安全/权限治理复核队列。\n- 防护动作：下游风险存在时必须保持 review/recommendation 降级。\n- 证据：downstream_validation.risk_items | github_repo:638629097 | https://github.com/Aider-AI/aider | no_demo; severity=medium\n\n## 14. 安全/权限坑 · 存在评分风险\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：风险会影响是否适合普通用户安装。\n- 建议检查：把风险写入边界卡，并确认是否需要人工复核。\n- 防护动作：评分风险必须进入边界卡，不能只作为内部分数。\n- 证据：risks.scoring_risks | github_repo:638629097 | https://github.com/Aider-AI/aider | no_demo; severity=medium\n\n## 15. 安全/权限坑 · 来源证据：Proposal: optional pre-commit safety scan with Agent Threat Rules\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Proposal: optional pre-commit safety scan with Agent Threat Rules\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_4fa6fdcc672345afa8c3ff5a452863aa | https://github.com/Aider-AI/aider/issues/5121 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 16. 安全/权限坑 · 来源证据：Uncaught OSError in pathlib.py line 840\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Uncaught OSError in pathlib.py line 840\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_8e8437da35794c5bb2c53e2b08db3a70 | https://github.com/Aider-AI/aider/issues/5114 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 17. 安全/权限坑 · 来源证据：security: bump GitPython pin (CVE-2026-42215/42284/44243/44244)\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：security: bump GitPython pin (CVE-2026-42215/42284/44243/44244)\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_835507f71220443f8a484ae9e8888821 | https://github.com/Aider-AI/aider/issues/5139 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 18. 安全/权限坑 · 来源证据：security: bump Pillow pin (CVE-2026-42311)\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：security: bump Pillow pin (CVE-2026-42311)\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_842489bdf17244c29e0ea620f9499bde | https://github.com/Aider-AI/aider/issues/5140 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 19. 安全/权限坑 · 来源证据：security: bump urllib3 pin (CVE-2026-44431)\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：security: bump urllib3 pin (CVE-2026-44431)\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_76fb6fb4c31b436fbe62c89100c8084f | https://github.com/Aider-AI/aider/issues/5141 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 20. 维护坑 · issue/PR 响应质量未知\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：issue_or_pr_quality=unknown。\n- 对用户的影响：用户无法判断遇到问题后是否有人维护。\n- 建议检查：抽样最近 issue/PR，判断是否长期无人处理。\n- 防护动作：issue/PR 响应未知时，必须提示维护风险。\n- 证据：evidence.maintainer_signals | github_repo:638629097 | https://github.com/Aider-AI/aider | issue_or_pr_quality=unknown\n\n## 21. 维护坑 · 发布节奏不明确\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：release_recency=unknown。\n- 对用户的影响：安装命令和文档可能落后于代码，用户踩坑概率升高。\n- 建议检查：确认最近 release/tag 和 README 安装命令是否一致。\n- 防护动作：发布节奏未知或过期时，安装说明必须标注可能漂移。\n- 证据：evidence.maintainer_signals | github_repo:638629097 | https://github.com/Aider-AI/aider | release_recency=unknown\n\n<!-- canonical_name: Aider-AI/aider; human_manual_source: deepwiki_human_wiki -->\n",
      "summary": "DeepWiki/Human Wiki 完整输出，末尾追加 Discovery Agent 踩坑日志。",
      "title": "Human Manual / 人类版说明书"
    },
    "pitfall_log": {
      "asset_id": "pitfall_log",
      "filename": "PITFALL_LOG.md",
      "markdown": "# Pitfall Log / 踩坑日志\n\n项目：Aider-AI/aider\n\n摘要：发现 21 个潜在踩坑项，其中 3 个为 high/blocking；最高优先级：安装坑 - 来源证据：Python 3.13 support。\n\n## 1. 安装坑 · 来源证据：Python 3.13 support\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：Python 3.13 support\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_d422c2c05bc34d938b82095b9b0b7131 | https://github.com/Aider-AI/aider/issues/3037 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 2. 配置坑 · 来源证据：benchmark.py uses `--read-model-settings` but main cli + docs say `--model-settings-file`\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：benchmark.py uses `--read-model-settings` but main cli + docs say `--model-settings-file`\n- 对用户的影响：可能影响升级、迁移或版本选择。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_04ccacbfaff740caaa5ac6f5280521c8 | https://github.com/Aider-AI/aider/issues/5131 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 3. 安全/权限坑 · 来源证据：Zed Editor Support\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Zed Editor Support\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_de9d553c32dc4238bb4601e547645020 | https://github.com/Aider-AI/aider/issues/851 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 4. 安装坑 · 来源证据：feat: Add --one-shot flag for sessionless single-prompt execution\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：feat: Add --one-shot flag for sessionless single-prompt execution\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_4434e2534a6d45e58141e326a1cd97f1 | https://github.com/Aider-AI/aider/issues/5143 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 5. 配置坑 · 可能修改宿主 AI 配置\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：项目面向 Claude/Cursor/Codex/Gemini/OpenCode 等宿主，或安装命令涉及用户配置目录。\n- 对用户的影响：安装可能改变本机 AI 工具行为，用户需要知道写入位置和回滚方法。\n- 建议检查：列出会写入的配置文件、目录和卸载/回滚步骤。\n- 防护动作：涉及宿主配置目录时必须给回滚路径，不能只给安装命令。\n- 证据：capability.host_targets | github_repo:638629097 | https://github.com/Aider-AI/aider | host_targets=claude, chatgpt\n\n## 6. 配置坑 · 来源证据：Uncaught NotImplementedError in pathlib.py line 1090\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Uncaught NotImplementedError in pathlib.py line 1090\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_4a2e6220201a4896920a22c45da17ae4 | https://github.com/Aider-AI/aider/issues/5145 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 7. 配置坑 · 来源证据：Uncaught OSError in _win32_console.py line 403\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Uncaught OSError in _win32_console.py line 403\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_f4f7880f667f4a52b7ad9b82e7a4acd2 | https://github.com/Aider-AI/aider/issues/5117 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 8. 配置坑 · 来源证据：Uncaught OSError in pathlib.py line 1222\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Uncaught OSError in pathlib.py line 1222\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_7f5383bfd86147d0929d2366e5b3044c | https://github.com/Aider-AI/aider/issues/5130 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 9. 配置坑 · 来源证据：Uncaught QueryError in repomap.py line 302\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Uncaught QueryError in repomap.py line 302\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_64f88b21f5fd4baa94c7e340b7006423 | https://github.com/Aider-AI/aider/issues/5133 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 10. 配置坑 · 来源证据：git repo corrupted\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：git repo corrupted\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_3cf7b9ede88e4598bacb2a1c5f7cd847 | https://github.com/Aider-AI/aider/issues/2734 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 11. 能力坑 · 能力判断依赖假设\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：README/documentation is current enough for a first validation pass.\n- 对用户的影响：假设不成立时，用户拿不到承诺的能力。\n- 建议检查：将假设转成下游验证清单。\n- 防护动作：假设必须转成验证项；没有验证结果前不能写成事实。\n- 证据：capability.assumptions | github_repo:638629097 | https://github.com/Aider-AI/aider | README/documentation is current enough for a first validation pass.\n\n## 12. 维护坑 · 维护活跃度未知\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：未记录 last_activity_observed。\n- 对用户的影响：新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。\n- 建议检查：补 GitHub 最近 commit、release、issue/PR 响应信号。\n- 防护动作：维护活跃度未知时，推荐强度不能标为高信任。\n- 证据：evidence.maintainer_signals | github_repo:638629097 | https://github.com/Aider-AI/aider | last_activity_observed missing\n\n## 13. 安全/权限坑 · 下游验证发现风险项\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：下游已经要求复核，不能在页面中弱化。\n- 建议检查：进入安全/权限治理复核队列。\n- 防护动作：下游风险存在时必须保持 review/recommendation 降级。\n- 证据：downstream_validation.risk_items | github_repo:638629097 | https://github.com/Aider-AI/aider | no_demo; severity=medium\n\n## 14. 安全/权限坑 · 存在评分风险\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：风险会影响是否适合普通用户安装。\n- 建议检查：把风险写入边界卡，并确认是否需要人工复核。\n- 防护动作：评分风险必须进入边界卡，不能只作为内部分数。\n- 证据：risks.scoring_risks | github_repo:638629097 | https://github.com/Aider-AI/aider | no_demo; severity=medium\n\n## 15. 安全/权限坑 · 来源证据：Proposal: optional pre-commit safety scan with Agent Threat Rules\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Proposal: optional pre-commit safety scan with Agent Threat Rules\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_4fa6fdcc672345afa8c3ff5a452863aa | https://github.com/Aider-AI/aider/issues/5121 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 16. 安全/权限坑 · 来源证据：Uncaught OSError in pathlib.py line 840\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Uncaught OSError in pathlib.py line 840\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_8e8437da35794c5bb2c53e2b08db3a70 | https://github.com/Aider-AI/aider/issues/5114 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 17. 安全/权限坑 · 来源证据：security: bump GitPython pin (CVE-2026-42215/42284/44243/44244)\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：security: bump GitPython pin (CVE-2026-42215/42284/44243/44244)\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_835507f71220443f8a484ae9e8888821 | https://github.com/Aider-AI/aider/issues/5139 | 来源讨论提到 python 相关条件，需在安装/试用前复核。\n\n## 18. 安全/权限坑 · 来源证据：security: bump Pillow pin (CVE-2026-42311)\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：security: bump Pillow pin (CVE-2026-42311)\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_842489bdf17244c29e0ea620f9499bde | https://github.com/Aider-AI/aider/issues/5140 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 19. 安全/权限坑 · 来源证据：security: bump urllib3 pin (CVE-2026-44431)\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：security: bump urllib3 pin (CVE-2026-44431)\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_76fb6fb4c31b436fbe62c89100c8084f | https://github.com/Aider-AI/aider/issues/5141 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 20. 维护坑 · issue/PR 响应质量未知\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：issue_or_pr_quality=unknown。\n- 对用户的影响：用户无法判断遇到问题后是否有人维护。\n- 建议检查：抽样最近 issue/PR，判断是否长期无人处理。\n- 防护动作：issue/PR 响应未知时，必须提示维护风险。\n- 证据：evidence.maintainer_signals | github_repo:638629097 | https://github.com/Aider-AI/aider | issue_or_pr_quality=unknown\n\n## 21. 维护坑 · 发布节奏不明确\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：release_recency=unknown。\n- 对用户的影响：安装命令和文档可能落后于代码，用户踩坑概率升高。\n- 建议检查：确认最近 release/tag 和 README 安装命令是否一致。\n- 防护动作：发布节奏未知或过期时，安装说明必须标注可能漂移。\n- 证据：evidence.maintainer_signals | github_repo:638629097 | https://github.com/Aider-AI/aider | release_recency=unknown\n",
      "summary": "用户实践前最可能遇到的身份、安装、配置、运行和安全坑。",
      "title": "Pitfall Log / 踩坑日志"
    },
    "prompt_preview": {
      "asset_id": "prompt_preview",
      "filename": "PROMPT_PREVIEW.md",
      "markdown": "# aider - Prompt Preview\n\n> Copy the prompt below into your AI host before installing anything.\n> Its purpose is to let you safely feel the project's workflow, not to claim the project has already run.\n\n## Copy this prompt\n\n```text\nYou are using an independent Doramagic capability pack for Aider-AI/aider.\n\nProject:\n- Name: aider\n- Repository: https://github.com/Aider-AI/aider\n- Summary: aider is AI pair programming in your terminal\n- Host target: claude, chatgpt\n\nGoal:\nHelp me evaluate this project for the following task without installing it yet: aider is AI pair programming in your terminal\n\nBefore taking action:\n1. Restate my task, success standard, and boundary.\n2. Identify whether the next step requires tools, browser access, network access, filesystem access, credentials, package installation, or host configuration.\n3. Use only the Doramagic Project Pack, the upstream repository, and the source-linked evidence listed below.\n4. If a real command, install step, API call, file write, or host integration is required, mark it as \"requires post-install verification\" and ask for approval first.\n5. If evidence is missing, say \"evidence is missing\" instead of filling the gap.\n\nPreviewable capabilities:\n- Capability 1: aider is AI pair programming in your terminal\n\nCapabilities that require post-install verification:\n- Capability 1: Use the source-backed project context to guide one small, checkable workflow step.\n\nCore service flow:\n1. page-introduction: Introduction to Aider. Produce one small intermediate artifact and wait for confirmation.\n2. page-installation: Installation and Setup. Produce one small intermediate artifact and wait for confirmation.\n3. page-quickstart: Quick Start Guide. Produce one small intermediate artifact and wait for confirmation.\n4. page-core-architecture: Core Architecture. Produce one small intermediate artifact and wait for confirmation.\n5. page-model-integration: Model Integration System. Produce one small intermediate artifact and wait for confirmation.\n\nSource-backed evidence to keep in mind:\n- https://github.com/Aider-AI/aider\n- https://github.com/Aider-AI/aider#readme\n- aider/README.md\n- aider/__init__.py\n- aider/help.py\n- aider/prompts.py\n- pyproject.toml\n- requirements.txt\n- docker/Dockerfile\n- aider/website/docs/install.md\n\nFirst response rules:\n1. Start Step 1 only.\n2. Explain the one service action you will perform first.\n3. Ask exactly three questions about my target workflow, success standard, and sandbox boundary.\n4. Stop and wait for my answers.\n\nStep 1 follow-up protocol:\n- After I answer the first three questions, stay in Step 1.\n- Produce six parts only: clarified task, success standard, boundary conditions, two or three options, tradeoffs for each option, and one recommendation.\n- End by asking whether I confirm the recommendation.\n- Do not move to Step 2 until I explicitly confirm.\n\nConversation rules:\n- Advance one step at a time and wait for confirmation after each small artifact.\n- Write outputs as recommendations or planned checks, not as completed execution.\n- Do not claim tests passed, files changed, commands ran, APIs were called, or the project was installed.\n- If the user asks for execution, first provide the sandbox setup, expected output, rollback, and approval checkpoint.\n```\n",
      "summary": "不安装项目也能感受能力节奏的安全试用 Prompt。",
      "title": "Prompt Preview / 安装前试用 Prompt"
    },
    "quick_start": {
      "asset_id": "quick_start",
      "filename": "QUICK_START.md",
      "markdown": "# Quick Start / 官方入口\n\n项目：Aider-AI/aider\n\n## 官方安装入口\n\n### Python / pip · 官方安装入口\n\n```bash\npip install aider-install\n```\n\n来源：https://github.com/Aider-AI/aider#readme\n\n## 来源\n\n- repo: https://github.com/Aider-AI/aider\n- docs: https://github.com/Aider-AI/aider#readme\n",
      "summary": "从项目官方 README 或安装文档提取的开工入口。",
      "title": "Quick Start / 官方入口"
    }
  },
  "validation_id": "dval_789198eeef554a67b7e85a05df2f099a"
}
