diff --git a/.github/tests/test_install_script.py b/.github/tests/test_install_script.py index c48b6cd..b794c24 100644 --- a/.github/tests/test_install_script.py +++ b/.github/tests/test_install_script.py @@ -94,8 +94,7 @@ def test_installs_regular_skill_and_github_workflow_directories(self) -> None: self.assertTrue((target / ".github/agents/product-wiki-query.md").is_file()) self.assertTrue((target / ".github/scripts/validate_spec_output.py").is_file()) self.assertFalse((target / ".github/tests").exists()) - self.assertTrue((target / ".github/aicodingflow-tests/test_validate_spec_output.py").is_file()) - self.assertFalse((target / ".github/aicodingflow-tests/test_install_script.py").exists()) + self.assertFalse((target / ".github/aicodingflow-tests").exists()) self.assertTrue((target / ".github/workflows/create-spec-from-issue.yml").is_file()) def test_does_not_install_aicodingflow_repository_ci_workflow(self) -> None: diff --git a/README.md b/README.md index b6c9047..ba6fe2f 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ cd AICodingFlow ./install.sh --target /path/to/target-repo --dry-run ``` -安装脚本依赖 `bash`、`git`、`rsync`;使用一行安装命令时还需要 `curl`。它会同步 `.agents/skills/`、`.github/scripts/`、`.github/aicodingflow-tests/` 和受管 workflow,不会同步 AICodingFlow 仓库自用的 `.github/tests/` 与 `.github/workflows/ci.yml`。 +安装脚本依赖 `bash`、`git`、`rsync`;使用一行安装命令时还需要 `curl`。它会同步 `.agents/skills/`、`.agents/contracts/`、`.github/agents/`、`.github/scripts/` 和受管 workflow,不会同步 AICodingFlow 上游测试目录 `.github/aicodingflow-tests/`、仓库自用 `.github/tests/` 与 `.github/workflows/ci.yml`。 安装后,在目标仓库配置: @@ -99,7 +99,7 @@ issue -> triage/spec -> implement -> pr -> review -> comments -> merge .github/agents/ # GitHub Copilot custom agents .github/workflows/ # GitHub Actions workflow .github/scripts/ # workflow 使用的 Python helper -.github/aicodingflow-tests/ # 随安装脚本交付的 workflow/script unittest 和 fixtures +.github/aicodingflow-tests/ # AICodingFlow 上游 workflow/script unittest 和 fixtures,不随默认安装同步 .github/tests/ # AICodingFlow 本仓库自用 unittest .github/issue-triage/ # issue triage 配置 docs/ # 详细文档 diff --git a/docs/product/raw/project-installer.md b/docs/product/raw/project-installer.md index 0478493..c17e3e2 100644 --- a/docs/product/raw/project-installer.md +++ b/docs/product/raw/project-installer.md @@ -21,9 +21,9 @@ skills。 安装会同步以下 AICodingFlow 管理的目录到目标项目: - `.agents/skills/` +- `.agents/contracts/` - `.github/agents/` - `.github/scripts/` -- `.github/aicodingflow-tests/` - `.github/workflows/` 普通 skills 可以复制或更新。仓库本地 companion skills,也就是 @@ -31,14 +31,13 @@ skills。 skills 会保留。此类 companion guidance 应由维护者或对应 `update-*` self-improvement 流程在有证据时创建和更新。 -`.github/agents`、`.github/scripts`、`.github/aicodingflow-tests` 和 `.github/workflows` 会按 AICodingFlow +`.github/agents`、`.github/scripts` 和 `.github/workflows` 会按 AICodingFlow 源目录同步。目标项目 `.github` 下不属于这些同步目录的文件不会被删除,例如目标项目自己的 -Dependabot 配置、`.github/tests` 或其他 GitHub 设置文件。 +Dependabot 配置、`.github/tests`、`.github/aicodingflow-tests` 或其他 GitHub 设置文件。 -`.github/aicodingflow-tests` 是 AICodingFlow 上游托管的 workflow/script 测试目录,未来安装 -或同步可能覆盖其中内容。目标项目自己的测试应放在项目原有测试结构中;如果测试属于 -`.github` 相关逻辑,优先使用 `.github/tests/`,不要直接修改 -`.github/aicodingflow-tests/`。 +`.github/aicodingflow-tests` 是 AICodingFlow 上游托管的 workflow/script 测试目录, +默认不会安装到目标项目。目标项目自己的测试应放在项目原有测试结构中;如果测试属于 +`.github` 相关逻辑,优先使用 `.github/tests/`。 AICodingFlow 源仓库中的 `.github/workflows/ci.yml` 是参考最小 CI,不会由安装脚本同步到 目标项目。目标项目应保留自己的 CI 编排,并在 CI 成功路径中 dispatch 已安装的 diff --git a/docs/product/wiki/concepts/project-installer.md b/docs/product/wiki/concepts/project-installer.md index a1a0b9c..d6b4e13 100644 --- a/docs/product/wiki/concepts/project-installer.md +++ b/docs/product/wiki/concepts/project-installer.md @@ -24,10 +24,10 @@ sources: ## 同步边界 -- 同步范围包括 `.agents/skills/`、`.agents/contracts/`、`.github/agents/`、`.github/scripts/`、`.github/aicodingflow-tests/` 和 `.github/workflows/`。 +- 同步范围包括 `.agents/skills/`、`.agents/contracts/`、`.github/agents/`、`.github/scripts/` 和 `.github/workflows/`。 - `.agents/skills/*-repo/SKILL.md` 不由安装脚本安装;目标项目已有 repo-local companion skills 会保留。 - 目标项目 `.github` 下不属于同步目录的文件不会被删除。 -- `.github/aicodingflow-tests/` 是上游托管测试目录,目标项目自己的 `.github` 相关测试应优先放在 `.github/tests/`。 +- `.github/aicodingflow-tests/` 是上游托管测试目录,默认不会安装到目标项目;目标项目自己的 `.github` 相关测试应优先放在 `.github/tests/`。 - AICodingFlow 源仓库中的 `.github/workflows/ci.yml` 是参考最小 CI,不会同步到目标项目;目标项目应保留自己的 CI 编排,并在 CI 成功路径中 dispatch 已安装的 `review-pr.yml`。 - 安装脚本不初始化 issue triage 配置;首次接入时可后续手动运行 `$bootstrap-issue-config`。 diff --git a/docs/product/wiki/log.md b/docs/product/wiki/log.md index 3622b1d..99046f5 100644 --- a/docs/product/wiki/log.md +++ b/docs/product/wiki/log.md @@ -79,7 +79,7 @@ - 新增 [Agent 目录布局摘要](summaries/agent-directory-layout.md) 与 [Agent 目录布局](concepts/agent-directory-layout.md),记录 `.agents/` 共享入口、Claude/Codex/Cursor 本地入口和 Windows symlink 规则。 - 更新 [index.md](index.md),链接新增 summary 与 concept。 -- 校准 [项目安装脚本摘要](summaries/project-installer.md) 与 [项目安装脚本](concepts/project-installer.md):安装同步目录包含 `.github/aicodingflow-tests/`,目标项目自有 `.github` 测试应优先放在 `.github/tests/`。 +- 校准 [项目安装脚本摘要](summaries/project-installer.md) 与 [项目安装脚本](concepts/project-installer.md):默认安装不再同步 `.github/aicodingflow-tests/`;该目录保留为 AICodingFlow 上游测试资产,目标项目自有 `.github` 测试应优先放在 `.github/tests/`。 ## 待确认 / 开放问题 diff --git a/docs/product/wiki/summaries/project-installer.md b/docs/product/wiki/summaries/project-installer.md index f37529c..591bb62 100644 --- a/docs/product/wiki/summaries/project-installer.md +++ b/docs/product/wiki/summaries/project-installer.md @@ -26,11 +26,11 @@ AICodingFlow 提供仓库级安装脚本 `install.sh`,用于把 workflow autom ## 同步范围 -- 安装同步 `.agents/skills/`、`.github/agents/`、`.github/scripts/`、`.github/aicodingflow-tests/` 和 `.github/workflows/`。 +- 安装同步 `.agents/skills/`、`.agents/contracts/`、`.github/agents/`、`.github/scripts/` 和 `.github/workflows/`。 - 普通 skills 可以复制或更新。 - `.agents/skills/*-repo/SKILL.md` 这类仓库本地 companion skills 不会安装到目标项目;目标项目已有 companion skills 会保留。 - 目标项目 `.github` 下不属于同步目录的文件不会被删除。 -- `.github/aicodingflow-tests/` 是 AICodingFlow 上游托管的 workflow/script 测试目录,目标项目自己的 `.github` 相关测试应优先放在 `.github/tests/`。 +- `.github/aicodingflow-tests/` 是 AICodingFlow 上游托管的 workflow/script 测试目录,默认不会安装到目标项目;目标项目自己的 `.github` 相关测试应优先放在 `.github/tests/`。 - AICodingFlow 源仓库中的 `.github/workflows/ci.yml` 是参考最小 CI,不会同步到目标项目;目标项目应保留自己的 CI 编排,并在 CI 成功路径中 dispatch 已安装的 `review-pr.yml`。 - AICodingFlow 源仓库自己的 `test_install_script.py` 不会安装到目标项目。 diff --git a/install.sh b/install.sh index 75fd4c6..8d333a7 100755 --- a/install.sh +++ b/install.sh @@ -122,7 +122,7 @@ sync_skills() { sync_github_dirs() { local dirname src dest - for dirname in agents scripts aicodingflow-tests workflows; do + for dirname in agents scripts workflows; do src="$script_dir/.github/$dirname" [ -d "$src" ] || continue dest="$target_dir/.github/$dirname"