diff --git a/.agents/plan/20261117-apps-to-containers.md b/.agents/plan/20261117-apps-to-containers.md new file mode 100644 index 0000000..ba44916 --- /dev/null +++ b/.agents/plan/20261117-apps-to-containers.md @@ -0,0 +1,23 @@ +# apps → containers 目录重命名 + +> 日期:2026-11-17 +> +> **plan 一旦定稿就不修改。** +> +> 状态:**已确认执行**(2026-11-17) + +## 1. 目标 + +将 `example-project/apps/` 整体迁到 `containers/`,并同步 harness 占位符默认值与安装器探测,使新装项目默认为 `containers/backend|frontend`。 + +## 2. 映射 + +| 旧 | 新 | +|---|---| +| `containers/backend` | `containers/backend` | +| `containers/frontend` | `containers/frontend` | +| `containers/` | `containers/` | + +## 3. 验证 + +`PATH_MODE=relative ./agile-team-sdd/install.sh example-project --force` + `./.agents/verify.sh` diff --git a/.agents/plan/20261117-example-project-layout-and-facts.md b/.agents/plan/20261117-example-project-layout-and-facts.md index fedf898..4511f3d 100644 --- a/.agents/plan/20261117-example-project-layout-and-facts.md +++ b/.agents/plan/20261117-example-project-layout-and-facts.md @@ -106,11 +106,11 @@ example-project/ | 文件 | 改什么 | |---|---| -| `e2e-run.sh` | `apps/backend`、`apps/frontend` | -| `.gitignore` | `apps/frontend/dist/`、`apps/backend/.../application.yml` 等 | +| `e2e-run.sh` | `containers/backend`、`containers/frontend` | +| `.gitignore` | `containers/frontend/dist/`、`containers/backend/.../application.yml` 等 | | `AGENTS.md` / `README.md` | 拓扑、命令、文档树 | -| `docs/README.md`、`docs/standards/*`、`docs/test-cases/**` | `designs`→`facts`,`backend`→`apps/backend` | -| 活着的 features / 非历史约束的说明 | `frontend/` → `apps/frontend/` | +| `docs/README.md`、`docs/standards/*`、`docs/test-cases/**` | `designs`→`facts`,`backend`→`containers/backend` | +| 活着的 features / 非历史约束的说明 | `frontend/` → `containers/frontend/` | | 历史 plans | 路径字符串批量替换(定稿不改语义) | 不改:Java/Vue 源码包结构、端口、Maven/npm 工程内部路径。 @@ -118,8 +118,8 @@ example-project/ ### Phase A 验证 ```bash -test -d example-project/apps/backend -test -d example-project/apps/frontend +test -d example-project/containers/backend +test -d example-project/containers/frontend test -d example-project/docs/facts/business test ! -e example-project/tools test -x example-project/.overnight-runner/overnight-runner @@ -136,11 +136,11 @@ grep -R 'docs/designs' example-project --include='*.md' --include='*.sh' | grep | 模块 | 改动 | |---|---| -| `agile-team-sdd/placeholders.md` | `BACKEND_DIR`/`FRONTEND_DIR` 默认改为 `apps/backend`、`apps/frontend`;`DESIGNS_DIR` → **`FACTS_DIR`**(`docs/facts`);新增 `BUSINESS_FACTS_DIR`(`docs/facts/business`);派生文档路径随之改 | +| `agile-team-sdd/placeholders.md` | `BACKEND_DIR`/`FRONTEND_DIR` 默认改为 `containers/backend`、`containers/frontend`;`DESIGNS_DIR` → **`FACTS_DIR`**(`docs/facts`);新增 `BUSINESS_FACTS_DIR`(`docs/facts/business`);派生文档路径随之改 | | `agile-team-sdd/install.sh` | 同上默认值与替换字典;残留检查覆盖新名 | | `agile-team-sdd/skills/*-template/` | 所有 `{{DESIGNS_DIR}}` / `docs/designs` 文案改为 facts;`ba-gen-facts` 等输出目录对齐 | | `agile-team-sdd/{SKILL,README,catalog}.json/md` | 表格与示例树 | -| `harness-installer/` | 模板 `docs/designs` → `docs/facts` + `facts/business/`;探测逻辑优先 `apps/backend`、`apps/frontend`(兼容旧根目录) | +| `harness-installer/` | 模板 `docs/designs` → `docs/facts` + `facts/business/`;探测逻辑优先 `containers/backend`、`containers/frontend`(兼容旧根目录) | | `overnight-runner/scripts/install.sh` | `TARGET_TOOLS`:`tools/overnight-runner` → `.overnight-runner`;文档与完成提示 | | `overnight-runner/{README,SKILL,docs/design}.md` | 布局图 | | 根 `AGENTS.md` / `README.md` / `team-workflow-guide/index.html` | 流程与路径表 | @@ -167,8 +167,8 @@ PATH_MODE=relative agile-team-sdd/install.sh example-project --force --dry-run ## 6. 非目标 -- 不引入真实 submodule(只留 `apps/` 扩展位)。 -- 不把 `e2e/` 迁入 `apps/`。 +- 不引入真实 submodule(只留 `containers/` 扩展位)。 +- 不把 `e2e/` 迁入 `containers/`。 - 不改 overnight-runner 运行时状态机 / 决策逻辑。 ## 7. 文档同步检查 diff --git a/.agents/skills/modify-example/SKILL.md b/.agents/skills/modify-example/SKILL.md index c98e2ea..54650a1 100644 --- a/.agents/skills/modify-example/SKILL.md +++ b/.agents/skills/modify-example/SKILL.md @@ -33,7 +33,7 @@ description: 先改 example-project 样例,再把约定回写刷新 harness | example 改动 | 通常要回写 | |---|---| -| `apps/`、根布局、脚本路径 | `harness-installer` 探测默认值、`agile-team-sdd` 占位符默认值、文档树 | +| `containers/`、根布局、脚本路径 | `harness-installer` 探测默认值、`agile-team-sdd` 占位符默认值、文档树 | | `docs/features` 约定(编码文件夹、spec/plan、`_chores`) | `harness-installer/templates/docs/`、`ba-write-spec` / `dev-plan`、catalog、`placeholders.md` | | `docs/facts` 等事实目录 | 模板骨架、相关 skill、`team-workflow-guide` | | `.overnight-runner/` 布局 | `overnight-runner/scripts/install.sh` + README/SKILL | diff --git a/.agents/skills/work-in-example/SKILL.md b/.agents/skills/work-in-example/SKILL.md index 0912354..86721e9 100644 --- a/.agents/skills/work-in-example/SKILL.md +++ b/.agents/skills/work-in-example/SKILL.md @@ -34,7 +34,7 @@ example 业务 Plan 写在 `example-project/docs/features/.../plan.md` 或 `_cho ### 1. 锚定上下文 -- 路径、命令、自测都以 `example-project/` 为根(如 `apps/backend`、`docs/features/`、`.overnight-runner/`) +- 路径、命令、自测都以 `example-project/` 为根(如 `containers/backend`、`docs/features/`、`.overnight-runner/`) - 读 `example-project/AGENTS.md` 与相关 docs,按其规范执行 - 需要安装态 skill 时,以 `example-project/.agents/skills/` 为准 @@ -50,7 +50,7 @@ example 业务 Plan 写在 `example-project/docs/features/.../plan.md` 或 `_cho | 信号 | 例子 | |---|---| -| 目录/命名约定变了 | feature 文件夹编码规则、`spec.md`/`plan.md` 布局、`apps/`、`.overnight-runner/` | +| 目录/命名约定变了 | feature 文件夹编码规则、`spec.md`/`plan.md` 布局、`containers/`、`.overnight-runner/` | | 文档骨架变了 | `docs/` 下新目录、facts/business、`_chores` 语义 | | 流程/检查清单变了 | `example-project/AGENTS.md` 与模板 `AGENTS.md.template` 明显不一致 | | 安装默认值会错 | 新默认路径、端口、测试命令,现有 `placeholders.md` / `install.sh` 对不上 | diff --git a/agile-team-sdd/SKILL.md b/agile-team-sdd/SKILL.md index e46fdce..dabe4da 100644 --- a/agile-team-sdd/SKILL.md +++ b/agile-team-sdd/SKILL.md @@ -137,7 +137,7 @@ description: 安装 Agile Team SDD 技能套件(17 个 skill,覆盖 BA/TL/ ├── AGENTS.md ← {{AGENTS_FILE}} ├── .agents/skills/ ← {{SKILLS_DIR}} ├── .mcp.json ← {{MCP_CONFIG_FILE}} -├── apps/ +├── containers/ │ ├── backend/ ← {{BACKEND_DIR}} │ └── frontend/ ← {{FRONTEND_DIR}} ├── e2e/ ← {{E2E_DIR}} diff --git a/agile-team-sdd/install.sh b/agile-team-sdd/install.sh index 2640ce8..0d9a7f2 100755 --- a/agile-team-sdd/install.sh +++ b/agile-team-sdd/install.sh @@ -78,8 +78,8 @@ PROJECT_NAME="${PROJECT_NAME:-$(basename "$PROJECT_ROOT")}" # ── 目录与文件 ─────────────────────────────────────────────────────── SKILLS_DIR="${SKILLS_DIR:-.agents/skills}" -BACKEND_DIR="${BACKEND_DIR:-apps/backend}" -FRONTEND_DIR="${FRONTEND_DIR:-apps/frontend}" +BACKEND_DIR="${BACKEND_DIR:-containers/backend}" +FRONTEND_DIR="${FRONTEND_DIR:-containers/frontend}" E2E_DIR="${E2E_DIR:-e2e}" DOCS_DIR="${DOCS_DIR:-docs}" AGENTS_FILE="${AGENTS_FILE:-AGENTS.md}" diff --git a/agile-team-sdd/placeholders.md b/agile-team-sdd/placeholders.md index 14f2fc4..04677c2 100644 --- a/agile-team-sdd/placeholders.md +++ b/agile-team-sdd/placeholders.md @@ -16,8 +16,8 @@ | `{{AGENTS_FILE}}` | 工程规范文件 | `AGENTS.md` | `AGENTS_FILE` | | `{{SKILLS_DIR}}` | skills 安装目录 | `.agents/skills` | `SKILLS_DIR` | | `{{MCP_CONFIG_FILE}}` | MCP 配置文件 | `.mcp.json` | `MCP_CONFIG_FILE` | -| `{{BACKEND_DIR}}` | 后端模块目录 | `apps/backend` | `BACKEND_DIR` | -| `{{FRONTEND_DIR}}` | 前端模块目录 | `apps/frontend` | `FRONTEND_DIR` | +| `{{BACKEND_DIR}}` | 后端模块目录 | `containers/backend` | `BACKEND_DIR` | +| `{{FRONTEND_DIR}}` | 前端模块目录 | `containers/frontend` | `FRONTEND_DIR` | | `{{E2E_DIR}}` | E2E 测试目录 | `e2e` | `E2E_DIR` | | `{{DOCS_DIR}}` | 文档根目录 | `docs` | `DOCS_DIR` | | `{{FEATURES_DIR}}` | 需求与方案根目录(feature 文件夹) | `docs/features` | `FEATURES_DIR` | diff --git a/example-project/.agents/skills/dev-build/SKILL.md b/example-project/.agents/skills/dev-build/SKILL.md index 460006b..673d0a0 100644 --- a/example-project/.agents/skills/dev-build/SKILL.md +++ b/example-project/.agents/skills/dev-build/SKILL.md @@ -9,25 +9,25 @@ description: 遵循四层 DDD 架构实现功能。当为 example-project 编写 ## 后端 -- `apps/backend/adapter/rest/` — Controller:仅做协议转换,不含业务逻辑 -- `apps/backend/application/service/` — AppService:用例编排,`@Transactional` -- `apps/backend/domain/` — 聚合、值对象、领域服务:业务不变量 -- `apps/backend/infrastructure/` — 持久化、安全、配置 +- `containers/backend/adapter/rest/` — Controller:仅做协议转换,不含业务逻辑 +- `containers/backend/application/service/` — AppService:用例编排,`@Transactional` +- `containers/backend/domain/` — 聚合、值对象、领域服务:业务不变量 +- `containers/backend/infrastructure/` — 持久化、安全、配置 层依赖关系:adapter → application → domain ← infrastructure ## 前端 - Vue 3 Composition API + `