Files
AstrBot/openspec/config.yaml
LIghtJUNction 49988912e1 refactor(openspec): restructure protocol specifications
Major changes:
- Add A2A protocol (Google Agent-to-Agent)
- Add ACP protocol (Agent Communication)
- Add MCP protocol (Model Context Protocol)
- Add LSP protocol (Language Server Protocol)
- Add environment variables spec (env.md)
- Add path spec with XDG and Linux server support (path.md)
- Update ABP protocol to plugin-as-service model
- Delete legacy OpenSpec change proposals

New protocol specs:
- a2a.md: Cross-platform agent interoperability
- acp.md: Local agent control (IDE integration)
- mcp.md: AI model to tools/data connection
- lsp.md: Editor language features
- abp.md: AstrBot plugin protocol
- env.md: Environment variable conventions
- path.md: XDG + Linux server paths
2026-03-26 22:58:22 +08:00

45 lines
1.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
schema: spec-driven
# 项目上下文
context: |
技术栈: Python 3.12, anyio (异步), ~~FastAPI~~, pytest, ruff, uv , rust
领域: 多平台 LLM 聊天机器人框架 (QQ, Telegram, Discord 等)
架构: 基于协议的系统 (LSP, MCP, ACP, ABP)
# artifact 规则
rules:
tasks:
- 任务拆分为最大2小时块
- 新功能必须编写测试
- 提交前运行 ruff 和 pytest
code:
- 使用绝对导入,前缀 `astrbot.`
- 必须有类型标注(尽量避免 Any
- 注释使用英文
commits:
- 使用 conventional commits (feat:, fix:, docs:, refactor:, test:, chore:)
# 项目最高旨意
directives:
architecture: |
新架构放在 _internal 包中,避免分支冲突。
协议系统: LSP (客户端), MCP (客户端+服务端), ACP (客户端+服务端), ABP (客户端+服务端)。
Runtime 协调协议Gateway 提供 FastAPI 后端。
Stars 是插件 - Galaxy 是加载插件的中间层。
async_library: |
使用 anyio 作为异步库(不是 asyncio
coverage: |
必须提高覆盖率测试。
type_checking: |
代码必须通过 `uvx ty check` (astral 的 pyright)。
避免使用 Any 和 cast。
code_style: |
代码必须通过 `ruff check .` 和 `ruff format .`。
execution: |
运行 Python 脚本必须使用 `uv run`,不要用裸 python。
goal: |
最终目标:实现 ABP 协议
代码美观
类型标注完美
将现有功能迁移到新架构