commit 6eaa9b6bea24eea683d69fea3c08430d42b9484d Author: weichen Date: Tue Sep 29 17:31:39 2026 +0000 Assemble the dev integration repo: submodules, cross-repo Makefile, and repo guides Details (original message): Assemble the dev integration repo: submodules, cross-repo Makefile, and repo guides. diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..fb82a665 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/bin/ +node_modules/ diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..c5e1af80 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,30 @@ +[submodule "modules/core"] + path = modules/core + url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Core.git +[submodule "modules/backend"] + path = modules/backend + url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Backend.git +[submodule "modules/frontend"] + path = modules/frontend + url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Frontend.git +[submodule "modules/documents"] + path = modules/documents + url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Documents.git +[submodule "deps/development-guidelines"] + path = deps/development-guidelines + url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Development-Guidelines.git +[submodule "deps/agent-native"] + path = deps/agent-native + url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-Native.git +[submodule "deps/agent-squad"] + path = deps/agent-squad + url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-Squad.git +[submodule "deps/agent-intent"] + path = deps/agent-intent + url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-Intent.git +[submodule "deps/error-code-system"] + path = deps/error-code-system + url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Error-Code-System.git +[submodule "deps/logging-system"] + path = deps/logging-system + url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Logging-System.git diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..6571a25c --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,9 @@ +# Agent 工作说明(Agent-System-Core) + +本仓开发遵循 Development-Guidelines(见 Dev 仓 `development/guidelines`,gitlink 固定版本): +核心规则与术语见其 `core/`,按任务触发阅读 `standards/` 专题;日常交付走 `workflows/delivery.md`。 + +仓内规则: +- 模块边界、公开契约与隔离档位见 `policy/modules/`(如有)与 PROJECT.md。 +- 提交信息用英文祈使句一行;跨仓 gitlink 变更须经组合验证后在 Dev 仓推进。 +- 验证命令见 PROJECT.md「验证」节;完成声明须附实际命令输出证据。 diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..6dd8713e --- /dev/null +++ b/Makefile @@ -0,0 +1,53 @@ +# Agent-System-Dev 顶层编排 +# 用法:make sync && make build && make test +# 部署约束:非容器化;默认产物为单二进制(见 modules/backend)。 + +SHELL := /bin/bash +CORE := modules/core +BACKEND := modules/backend +FRONTEND := modules/frontend +BIN := bin/agent-system +EMBED_DIR := $(BACKEND)/web/dist + +.PHONY: help sync status build frontend test test-backend test-frontend test-core dev release clean + +help: + @echo "make sync 物化全部 submodule(递归)" + @echo "make build 构建单二进制 bin/agent-system(前端 embed + 静态链接)" + @echo "make test 全量测试(core + backend + frontend)" + @echo "make dev 开发模式说明(前后端分离热更新)" + @echo "make status submodule 状态" + +sync: + git submodule update --init --recursive + +status: + @git submodule status + +frontend: + cd $(FRONTEND) && npm ci --no-fund --no-audit && npm run build + rm -rf $(EMBED_DIR) && mkdir -p $(EMBED_DIR) && cp -r $(FRONTEND)/dist/* $(EMBED_DIR)/ + +build: frontend + cd $(BACKEND) && CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" -o ../../$(BIN) ./cmd/agent-system + +test-core: + cd $(CORE) && go test ./... + +test-backend: + cd $(BACKEND) && go test ./... + +test-frontend: + cd $(FRONTEND) && npm ci --no-fund --no-audit && npm test -- --run + +test: test-core test-backend test-frontend + +dev: + @echo "开发模式(原生,非容器):" + @echo " 1. make sync" + @echo " 2. 终端 A:cd $(BACKEND) && go run ./cmd/agent-system serve --addr 127.0.0.1:8787 --data ./data" + @echo " 3. 终端 B:cd $(FRONTEND) && npm ci && npm run dev # Vite 代理到 8787" + @echo " 4. 浏览器打开 Vite 提示的地址;mock 对话不需要模型密钥。" + +clean: + rm -rf $(BIN) $(FRONTEND)/dist $(FRONTEND)/node_modules diff --git a/PROJECT.md b/PROJECT.md new file mode 100644 index 00000000..2695a122 --- /dev/null +++ b/PROJECT.md @@ -0,0 +1,6 @@ +# Agent-System-Dev 项目事实 + +- 用途:开发集成父仓(gitlink 权威);非分发单元。 +- 组合:modules/{core,backend,frontend,documents} + deps/{development-guidelines,agent-native,agent-squad,agent-intent,error-code-system,logging-system}。 +- 验证:make test(core+backend+frontend 全量);make build 产出 bin/agent-system。 +- 部署:非容器;Releases 仓从本仓固定提交导出版本。 diff --git a/README.md b/README.md new file mode 100644 index 00000000..018558b2 --- /dev/null +++ b/README.md @@ -0,0 +1,37 @@ +# Agent-System-Dev + +Agent-System 的开发集成仓(父仓):以 submodule 固定全部模块组合,承载跨仓构建、测试编排与原生(非容器)开发环境。**非分发单元**——发布物在 Agent-System-Releases。 + +## 组合结构 + +``` +modules/core Agent-System-Core 核心契约(领域模型/事件协议/插件 API/设置与 UI 词汇) +modules/backend Agent-System-Backend 后端单二进制(内嵌前端与嵌入式 SQLite) +modules/frontend Agent-System-Frontend 前端(React 19 + Vite + TS) +modules/documents Agent-System-Documents 系统文档与过程记录 +deps/development-guidelines 开发规范(gitlink 固定版本) +deps/agent-native deps/agent-squad deps/agent-intent 生态执行/编排/意图 +deps/error-code-system deps/logging-system 基础设施 +plugins/ 示例插件与插件开发参考(P4 起填充) +``` + +父仓 gitlink 是各组件源码版本的权威;构建、审核与发布固定提交,不执行 `submodule update --remote`。 + +## 常用命令 + +```bash +make sync # 物化全部 submodule(递归) +make build # 构建单二进制 bin/agent-system +make test # 全量测试 +make dev # 开发模式说明(前后端分离热更新) +``` + +## 约束(全局) + +- 非容器化部署:默认单二进制,必要时拆分多个原生二进制;不发布容器镜像。 +- 依赖方向:frontend→core←backend;插件只依赖 core;生态仓依赖纪律沿用各仓既有约定。 +- 开发规范:`deps/development-guidelines`(见各仓 AGENTS.md)。 + +## 文档 + +设计方案:`modules/documents/docs/proposals/2026-09-29-system-skeleton-design-and-plan.md`(含 D1–D16 决策记录)。 diff --git a/deps/agent-intent b/deps/agent-intent new file mode 160000 index 00000000..ad447c55 --- /dev/null +++ b/deps/agent-intent @@ -0,0 +1 @@ +Subproject commit ad447c55de7e0f0aee9daa2b0ed5680669184099 diff --git a/deps/agent-native b/deps/agent-native new file mode 160000 index 00000000..f735f18a --- /dev/null +++ b/deps/agent-native @@ -0,0 +1 @@ +Subproject commit f735f18a73f9c34173fcf15a56f6afd0bdeac966 diff --git a/deps/agent-squad b/deps/agent-squad new file mode 160000 index 00000000..b6ff0ab5 --- /dev/null +++ b/deps/agent-squad @@ -0,0 +1 @@ +Subproject commit b6ff0ab55f4a41bc1d945610637b24e72a6c2b34 diff --git a/deps/development-guidelines b/deps/development-guidelines new file mode 160000 index 00000000..26b562d2 --- /dev/null +++ b/deps/development-guidelines @@ -0,0 +1 @@ +Subproject commit 26b562d2e34fbc560711296a309c91c74ffc55b1 diff --git a/deps/error-code-system b/deps/error-code-system new file mode 160000 index 00000000..dbeed2f1 --- /dev/null +++ b/deps/error-code-system @@ -0,0 +1 @@ +Subproject commit dbeed2f1b67eb417ce089e7033a228578fbbeb03 diff --git a/deps/logging-system b/deps/logging-system new file mode 160000 index 00000000..2c5716fd --- /dev/null +++ b/deps/logging-system @@ -0,0 +1 @@ +Subproject commit 2c5716fdcffbc4696fc0371afc70f39c44174201 diff --git a/modules/backend b/modules/backend new file mode 160000 index 00000000..6832b7f0 --- /dev/null +++ b/modules/backend @@ -0,0 +1 @@ +Subproject commit 6832b7f0da76225f4c8aaf9ef713d2b8f5689bc1 diff --git a/modules/core b/modules/core new file mode 160000 index 00000000..f2fcc2f6 --- /dev/null +++ b/modules/core @@ -0,0 +1 @@ +Subproject commit f2fcc2f62e148839e61c4b78bec7d95c6a424de8 diff --git a/modules/documents b/modules/documents new file mode 160000 index 00000000..e13eb5c3 --- /dev/null +++ b/modules/documents @@ -0,0 +1 @@ +Subproject commit e13eb5c38ee45c2b8dbdba4794ae0ee2249c155e diff --git a/modules/frontend b/modules/frontend new file mode 160000 index 00000000..a80fae7d --- /dev/null +++ b/modules/frontend @@ -0,0 +1 @@ +Subproject commit a80fae7dc6df0e1a5552715efc9ef1084726efed diff --git a/plugins/README.md b/plugins/README.md new file mode 100644 index 00000000..957987a5 --- /dev/null +++ b/plugins/README.md @@ -0,0 +1,3 @@ +# plugins/ + +示例插件与插件开发参考(P4 起填充;插件开发指南见 modules/documents/docs/guides/)。