Skip to content

AISEE-LAB/aisee-plugin

Repository files navigation

Aisee

规范先行,交接更稳,知识复利。

English · 简体中文

网站 · GitHub · Workflow · Best Practices · Plugin Marketplace · PyPI

PyPI Python CI GitHub stars License

Aisee Plugin

AiseeAI-Enhanced Software Engineering 的缩写。

Aisee Plugin 是一个面向 OpenSpec 工作流的 AI 软件工程插件。它帮助团队把模糊想法整理成可审查的需求、UI 内容规格、技术架构上下文、OpenSpec changes、项目记忆、团队知识 guardrails、实现交接 brief、验证检查和归档门禁。

Aisee 不替代 OpenSpec。OpenSpec 仍然是规范状态机和 baseline 事实源。Aisee 在 OpenSpec 周围补充结构化 skills、project memory、team knowledge、JSON context tooling 和工程交接规则。

OpenSpec Boundary

Aisee 不替代 OpenSpec,也不维护第二套 schema 状态机。只有在处理 OpenSpec change、context pack 或 schema pack 检查时,Aisee 才读取当前 schema 声明;project memory 和 team knowledge 始终只是 guidance / guardrails。

当 Aisee 处理 OpenSpec artifacts 时,它只做 parser / checker / projector;openspec validate / openspec archive 仍由 OpenSpec 负责。

为什么需要 Aisee?

AI coding assistant 很有用,但当需求、UI 说明、技术约束和实现证据长期停留在聊天记录里时,项目很容易上下文漂移。

Aisee 的目标是让这些上下文显式化:

  • 在实现前澄清业务需求;
  • 分离需求、UI 内容、技术架构和 change planning;
  • 创建和补齐 OpenSpec changes,并按当前 schema 读取必要 artifacts;
  • 保持 OpenSpec 作为唯一持久规范事实源;
  • 为实现、验证和审查生成机器可读的 context pack;
  • 用 skill/template 约束文档内编号,减少临时发明和重复命名;
  • 检查 artifacts、tasks、source-map、测试和 review evidence 是否闭环。

敏捷开发模型

Aisee 当前采用面向版本 / 迭代的敏捷模型:

  • SRS、UI Content、Design Spec、Architecture 都是 planning docs,用于当前版本 / 迭代的输入;
  • 普通 planning docs 使用统一 YAML frontmatter 合同做身份、状态和来源索引,但不会提升为 OpenSpec baseline 事实源;
  • aisee:change-plan 把一次迭代拆成 one or more 可独立交付的 OpenSpec changes;
  • 当前 change 的 proposal、source-map、specs、contracts、tasks 才是实现前的正式细化承诺;
  • openspec archive 后,baseline specs 接管当前事实;
  • 小范围、边界明确、低风险工作可以跳过重前置文档,直接进入合适的轻量 schema。

工作流定位

用户意图
  ↓
Aisee skills
  生成 planning docs,澄清需求、UI 内容、架构和 change 边界
  ↓
aisee:change-plan
  一次迭代 -> one or more OpenSpec changes
  ↓
OpenSpec
  管理 active changes、baseline specs、validate、apply 和 archive
  ↓
Aisee CLI
  读取 OpenSpec/Aisee metadata,输出 JSON context packs
  ↓
Compound Engineering 或其它 coding agent
  实现、审查、测试并产出 evidence
  ↓
Aisee verify / archive guard
  检查当前 change 是否可以进入归档

核心边界:

OpenSpec = 规范状态机和 baseline 事实源
Aisee = 规划、上下文、schema、追踪和工作流 guardrails
Aisee CLI = JSON context bus,不是第二份事实源
Compound Engineering = 可选的执行 / 审查 / 测试消费方

Skill 分层

plugins/aisee-plugin/.codex-plugin/plugin.json 继续通过 skills: "./skills/" 暴露全部公开 skill,但默认 happy path 只包含 9 个核心迭代 skill,另有项目入口定位与接入 / 治理 skill。完整分类合同见 Skill Taxonomy

项目接入 / 治理:

  • aisee:orient
  • aisee:init

核心迭代主流程:

  • aisee:srs
  • aisee:ui-content
  • aisee:architecture
  • aisee:change-plan
  • aisee:change-author
  • aisee-schema-pack
  • aisee:implementation-bridge
  • aisee:verify
  • aisee:archive-guard

按需扩展:

  • 可选扩展:aisee:design-specaisee:design-assetsaisee:svg-assetsaisee:image-objectaisee:spec-migrate
  • 知识循环:aisee:reflectaisee:memoryaisee:knowledgeaisee:knowledge-curate
  • 硬件 / 实验域:hw:srshw:architecturehw:inithw:change-plan

功能特性

  • 结构化需求澄清aisee:srs 通过对话澄清业务需求,并生成规划级 SRS。
  • UI 内容规格aisee:ui-content 将已确认需求转换为页面内容、状态、流程、权限可见性和平台差异,不写视觉设计。
  • 技术架构上下文aisee:architecture 记录技术事实、约束、可复用能力、全局工程约定和 artifact hints。
  • Schema-aware change planningaisee:change-plan 将已确认输入映射为可独立交付的 OpenSpec changes。
  • OpenSpec schema pack:提供 app、device、docsite、infra、security、quick-fix、quick-research、collaboration 等 schema。
  • Context packsaisee context pack 为实现、验证和 review 生成 JSON 上下文。
  • 项目记忆aisee memory 受控检索和写入当前仓库长期 guidance,不替代 OpenSpec 事实源。
  • 团队知识 Guardrailsaisee knowledge 基于 pack/card 协议按需检索少量已审查工程经验,不把知识库变成第二份规范事实源。
  • 轻量上下文路由aisee context packsource-map.md 存在时解析来源、编号、候选路径和 evidence 入口。
  • 验证与归档门禁aisee:verifyaisee:archive-guard 在 archive 前诊断缺口和风险。
  • Harness 设计:通过 CLI contract tests 和规范化 skill eval cases 保持工作流稳定。

环境要求

  • Python 3.10+
  • Git
  • Node.js 和 OpenSpec CLI

OpenSpec 需要单独安装:

npm install -g @fission-ai/openspec@latest

Compound Engineering 是可选依赖。Aisee 可以通过 aisee doctor --json 检查关键 Compound skills 是否可用。

安装

推荐使用 pipx 安装 CLI:

pipx install aisee-plugin

也可以使用 pip

python -m pip install aisee-plugin

开发或本地修改时可以从源码安装:

git clone https://github.com/AISEE-LAB/aisee-plugin
cd aisee-plugin
python -m pip install -e .

也可以先构建 wheel,再安装本地包:

python -m pip install build
python -m build
python -m pip install dist/aisee_plugin-*.whl

检查 CLI:

aisee --version
aisee doctor --json

也可以不安装,直接运行仓库内入口:

./bin/aisee doctor --json

插件使用

PyPI / pipx 只安装 aisee CLI。Aisee skills、references、schema packs、team knowledge templates 和 plugin metadata 通过 GitHub-backed Codex marketplace 分发。

在 Codex 中添加 marketplace 并安装插件:

codex plugin marketplace add AISEE-LAB/aisee-plugin --ref main
codex plugin add aisee-plugin@aisee-plugin

检查 CLI 与插件内容状态:

aisee plugin inspect --json
aisee doctor --json

CLI 读取插件内容时默认只检查 Codex 安装位置。需要对接其它 agent runtime 时,可设置 AISEE_AGENT_RUNTIME=claude|cursor|agents;设置为 none 可关闭已安装插件内容发现。

插件内容、schema pack 和 team knowledge 模板通过 Codex marketplace 插件或外部仓库获取;team knowledge onboarding 使用 aisee knowledge init-repoaisee knowledge configure

源码仓库也包含多个 agent runtime 的插件元数据:

plugins/aisee-plugin/.codex-plugin/plugin.json
plugins/aisee-plugin/.claude-plugin/plugin.json
plugins/aisee-plugin/.cursor-plugin/plugin.json

Codex plugin metadata 会直接声明 skills 目录:

{
  "skills": "./skills/"
}

快速开始

在需要使用 OpenSpec 的项目内运行:

aisee doctor --json
aisee bootstrap --plan --json
aisee plugin inspect --json

如果项目还没有初始化 OpenSpec:

aisee openspec ensure --json

该命令使用保守默认值桥接 OpenSpec 初始化:

openspec init . --tools none --profile core
openspec config profile core
openspec update .

Schema packs 来自 marketplace-installed plugin。aisee schemas list/check 只报告项目已安装 schema 状态或开发期源码 schema 状态;不会由 CLI 自动安装 schema。

再次检查项目状态:

aisee doctor --json

文档

典型流程

1. aisee:srs / aisee:ui-content / aisee:architecture(按需)
2. aisee:change-plan
3. /opsx:new "<change>" --schema <schema>
4. aisee:change-author
5. openspec validate <change>
6. aisee:implementation-bridge
7. implementation / review / test
8. openspec archive <change>

对小范围、边界明确、低风险工作,也可以直接走:

```text
quick-fix / quick-research / 其它轻量 schema
  -> change-author
  -> implementation-bridge
  -> implementation / review / test
  -> archive

实现前后可按需触发只读 Aisee reviewer lens:`aisee-change-architect`、`aisee-spec-reviewer`、`aisee-implementation-reviewer`。触发时机和边界见 [Aisee Workflow](docs/workflow.md),复用优先规则见 [Aisee Best Practices](docs/best-practices.md)。

对于已有项目,可使用 `aisee:spec-migrate` 从代码、测试、文档、路由和已验证行为中整理 OpenSpec baseline specs。

## 主要 Skills

| Skill | 作用 |
| --- | --- |
| `aisee:orient` | 判断当前项目阶段和用户意图,路由到合适的 Aisee skill / workflow。 |
| `aisee:init` | 初始化或审计 `AGENTS.md`、`openspec/project.md`、Aisee docs、memory 和 Codex hooks。 |
| `aisee:srs` | 澄清软件需求并生成规划级 SRS。 |
| `aisee:ui-content` | 生成页面、元素、状态、流程、权限和平台差异等 UI 内容规格。 |
| `aisee:architecture` | 捕获软件架构上下文、技术约束、可复用能力和 artifact hints。 |
| `aisee:change-plan` | 规划独立 OpenSpec changes 并选择 schema。 |
| `aisee-schema-pack` | 通过 marketplace plugin 提供并维护 OpenSpec schema packs。 |
| `aisee:implementation-bridge` | 生成单个 change 的实现交接 brief 和 context pack 摘要。 |
| `aisee:spec-migrate` | 为已有项目整理 OpenSpec baseline specs。 |
| `aisee:design-spec` | 生成设计规范,不重复 UI 内容规格。 |
| `aisee:design-assets` | 生成或提取视觉参考和设计素材。 |
| `aisee:svg-assets` | 生成、矢量化、优化和校验 SVG assets。 |
| `aisee:image-object` | 对象级图片分割、mask、去背景和导出工作流。 |
| `aisee:reflect` | 沉淀可复用项目经验和工作流改进。 |
| `aisee:memory` | 引导项目记忆 CLI 的 inspect/search/add/update-index 使用。 |
| `aisee:knowledge` | 引导团队知识 CLI 的初始化、配置、同步、检索和 promote 流程。 |
| `aisee:knowledge-curate` | 批量审查项目内 reusable knowledge candidates,产出可人工提交到 team knowledge 的 card drafts。 |

硬件相关 skills 已保留,但仍在整合到 Aisee 主工作流中:

```text
hw-init
hw-srs
hw-architecture
hw-change-plan

Schema Packs

Schema pack 源位置:

plugins/aisee-plugin/skills/aisee-schema-pack/assets/schema-pack/

当前包含:

Schema 适用场景
aisee-app-spec-driven App / 软件变更,包含 source-map、contracts、specs 和 tasks。
aisee-device-spec-driven 设备、固件、runtime、生产和验证相关变更。
aisee-docsite-driven 文档站变更。
infra-change 基础设施变更。
security-audit 安全审计工作流。
quick-fix 小型、边界清晰的修复。
quick-research 技术调研和建议。
opsx-collab-pr-loop 协作和 PR loop 工作流。

检查项目 schema 状态:

aisee schemas list --json
aisee schemas check --json --fail-on-blocker
aisee schemas format --check --json

CLI Reference

aisee doctor --json
aisee bootstrap --plan --json
aisee openspec ensure --json
aisee plugin inspect --json
aisee schemas list --json
aisee schemas check --json
aisee context pack --change <change> --for ce-work --json
aisee context pack --change <change> --for ce-work --project-memory --json
aisee context pack --change <change> --for ce-work --knowledge --json
aisee context pack --change <change> --for aisee-verify --json
aisee memory inspect --json
aisee memory list --json
aisee memory search --query "<task>" --json
aisee memory add --type pref --title "<title>" --summary "<summary>" --body "<body>" --json
aisee memory update-index --json
aisee knowledge inspect --json
aisee knowledge doctor --json
aisee knowledge check --json
aisee knowledge check --team-path .aisee/team-knowledge --json
aisee knowledge install --json
aisee knowledge update --json
aisee knowledge query --phase implementation --surface cli --query "public CLI JSON" --json
aisee knowledge query --from-change <change> --for ce-work --json
aisee knowledge index --json
aisee knowledge index --team-path .aisee/team-knowledge --json
aisee knowledge promote-batch --curation <path> --team-path .aisee/team-knowledge --pack web-app --json

CLI 关键规则:

  • JSON 输出只是上下文视图,不是事实源。
  • aisee memory 管理当前仓库项目记忆;aisee/cache/memory-index.json 是可删除、可重建 cache。
  • aisee/cache/knowledge-index.json 也是可删除、可重建的 cache;team knowledge 的持久来源是已 pin 的 pack/card 文件。
  • aisee knowledge promote-batch 只写本地 team knowledge worktree,不自动 commit、push 或创建 PR。
  • OpenSpec artifacts 和 source-map.md 是 context pack 的正式输入。
  • bootstrap --plan 是只读计划,不做大而全初始化写入。
  • aisee openspec ensure 只桥接 OpenSpec 初始化、profile 设置和 instruction files 刷新,不替代 aisee:init
  • aisee knowledge query 只返回少量 guardrails;默认只读 pack manifest 和 card frontmatter,--debug 才包含命中 card 的正文摘要。

项目记忆

项目记忆用于当前仓库长期有效、但不属于 OpenSpec baseline 的工程 guidance,例如稳定偏好、架构决策摘要、有时效的上下文快照和技术栈约束。

常用命令:

aisee memory inspect --json
aisee memory search --query "commit style" --json
aisee memory search --query "test command" --type stack --include-body --json
aisee memory add --type pref --title "提交信息语言" --summary "本项目提交信息默认使用中文。" --body "本项目 commit message 默认使用中文,并遵循 AGENTS.md。" --source-ref AGENTS.md --priority high --json
aisee memory update-index --json
aisee context pack --change <change> --for ce-work --project-memory --json

使用原则:

  • aisee:memory 负责引导这些 CLI 的日常使用;aisee:reflect 仍负责会话复盘和候选生成。
  • 默认检索只返回少量 active metadata;需要正文时显式使用 --include-body
  • 新写入只进入 canonical aisee/memory/;legacy .memory/ 只作为 fallback 读取。
  • hooks 只读,只提示 inspect/search 和少量高优先级摘要,不能自动写 memory。
  • 项目记忆是 guidance;若与 OpenSpec artifacts、source-map.mdtasks.md 冲突,以 OpenSpec 相关产物为准。

团队知识 Guardrails

团队知识是实验性功能,用于跨项目复用工程经验,但不替代 OpenSpec、source-map.md、contracts、tasks 或 baseline specs。

业务项目可以在 aisee/knowledge.yaml 中 pin 独立知识仓库、本地路径、ref 和 packs:

repo: git@example.com:org/aisee-team-knowledge.git
path: .aisee/team-knowledge
ref: v0.1.0
packs:
  - web-app
retrieval:
  max_cards: 3
  include_project_candidates: true

常用命令:

aisee knowledge init-repo --dest ../aisee-team-knowledge --initial-pack web-app --json
aisee knowledge configure --path ../aisee-team-knowledge --enable-pack web-app --json
aisee knowledge inspect --json
aisee knowledge doctor --json
aisee knowledge check --json
aisee knowledge install --json
aisee knowledge update --json
aisee knowledge query --phase implementation --surface cli --query "public CLI JSON" --json
aisee knowledge query --from-change <change> --for ce-work --json
aisee context pack --change <change> --for ce-work --knowledge --json
aisee knowledge promote-batch --curation <path> --team-path ../aisee-team-knowledge --pack web-app --json

使用原则:

  • aisee:knowledge 负责引导这些 CLI 的日常使用,降低初始化、同步、检索和 promote 的门槛。
  • installupdatepromote-batch 是实验性能力;team knowledge 示例来自 marketplace plugin 或外部仓库。PR 自动化和 MCP 服务仍未稳定。
  • 通过 CLI 查询,不让 AI 直接扫描 knowledge/cards/**/*.md
  • 只返回少量带边界的 matches,作为实现、review 或 verify 的提醒。
  • 项目内 aisee/docs/reflect/knowledge-candidates/ 仍是候选区,不自动进入 team knowledge。
  • aisee:knowledge-curate 只生成审查报告和 card drafts;写入 team repo、创建分支、提交、合并或 PR 必须再次获得用户明确授权。

仓库结构

.agents/plugins/marketplace.json
                     Codex marketplace listing
plugins/aisee-plugin/
  .codex-plugin/     Codex plugin metadata
  .claude-plugin/    Claude plugin metadata
  .cursor-plugin/    Cursor plugin metadata
  skills/            Aisee skills 和 skill assets
  references/        跨 skill contracts 和 references
bin/                 本地 CLI 入口
src/aisee_cli/       Aisee Python CLI
docs/                用户 workflow、最佳实践、架构和发布文档
docs/architecture/   架构文档
docs/plans/          开发计划
docs/reviews/        审计和 review 记录
scripts/             开发和发布辅助脚本
tests/               CLI 与 harness 测试

开发

运行测试:

python -m pytest

校验 skill eval JSON:

python -m pytest tests/test_skill_eval_schema.py

查看 CLI help:

python -m aisee_cli.__main__ --help

检查和同步版本号:

python scripts/check_versions.py
python scripts/sync_versions.py

构建 wheel:

python -m build

运行发布 smoke test:

python scripts/smoke_release.py

发布候选版本建议在本机具备 pipx 时运行隔离安装验证:

python scripts/smoke_release.py --with-pipx

设计原则

  • OpenSpec 是 canonical specification source。
  • 不在 Aisee docs、CLI cache 或聊天总结中创建平行事实源。
  • Skill 保持单一职责:需求、UI 内容、架构、change planning、implementation bridge、verify、archive guard。
  • 处理 OpenSpec change 时读取当前 schema 声明,不硬编码 app artifact 假设。
  • SKILL.md 保持精简,长规则放到 references 或 architecture docs。
  • 硬件和嵌入式流程作为专用扩展处理,不强行套入 app schema。

相关项目

Roadmap

持续兼容治理

  • 继续按 Compatibility Policy 维护 CLI JSON、project memory、team knowledge、context packs、marketplace plugin content 和 skill contracts;新增或破坏公开契约时同步补测试、迁移说明和 release notes。
  • 用真实项目 dogfood 验证 memory 检索、context pack 交接和 knowledge guardrails,不为了覆盖 schema 类型扩展抽象流程。

后续

  • 完善 project memory 的冲突提示、过期策略和低上下文注入规则。
  • 收敛 team knowledge 的远程同步、promote workflow、生命周期管理和可选 MCP 包装。

License

MIT。详见 LICENSE

About

AI software engineering toolkit for OpenSpec and Compound Engineering workflows.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors