Skip to content

docs: add TDD workflow to AGENTS.md - #151

Merged
c2j merged 2 commits into
mainfrom
docs/tdd-agents
Aug 29, 2026
Merged

c2j merged 2 commits into
mainfrom
docs/tdd-agents

Conversation

@c2j

@c2j c2j commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Add a test-driven development (Red → Green → Refactor) discipline section to AGENTS.md.

Codifies for coding agents:

  • Never / Ask first / Always rules — never skip, delete, or weaken existing tests; ask before touching human tests / snapshots
  • Red → Green → Refactor loop, with characterization tests for legacy paths
  • Seam-creation priorities for testability
  • Testing layer guidance (unit / integration / doc / CLI / invariants / snapshots)
  • Completion standards + self-check questions

修订说明(round 2):本 PR 初版声称命令「verified against this repo's actual toolchain」,实测并不成立——见下方「Round 2 修订」。命令现已逐条对照本仓库的 Cargo.toml / pom.xml.github/workflows/ 核对。


Round 2 修订

  • 「Cargo workspace」措辞为假:单 package codeweb,靠 feature 切分。原正文说 workspace,命令块却用单 crate 的 cargo fmt -- --check,文件内部自相矛盾。已改写。
  • rust-toolchain.toml 不存在:已移除引用。
  • insta 未引入:改为固定 fixture / golden。
  • 门禁对齐 ci.ymlfmt--allcargo test 补 CI 实际使用的 --skip test_path_mapping_applied --skip test_serve_,并说明这两组是环境性跳过,裸跑失败不是改坏了。

批次层面

  • 补上第 13 个仓库 flux-gauss#106(原批次遗漏)。
  • 12 个 PR 合并后,umbrella 仓库 GaussDB_Heptadecagon 需要一个 submodule 指针 bump PR(目前不存在)。
  • 中期建议:把约 85% 的共性样板抽到 umbrella 的 docs/tdd-policy.md,各仓库只留实测过的命令块 + 一个 drift 检查,避免下次修一行要开 13 个 PR。

c2j added 2 commits August 28, 2026 18:54
- 本仓库是单 crate(根 Cargo.toml 只有 [package] codeweb,无 [workspace],
  靠 feature 切分):修正「Cargo workspace」措辞——原正文说 workspace,
  但命令块用的是单 crate 的 cargo fmt -- --check,自相矛盾
- 移除对不存在的 rust-toolchain.toml 的引用
- 移除未引入的 insta 引用
- 门禁对齐 .github/workflows/ci.yml:fmt 补 --all;cargo test 补 CI 实际使用的
  --skip test_path_mapping_applied --skip test_serve_,并说明这两组是环境性跳过,
  裸跑失败不是改坏了
@c2j
c2j merged commit 475c94f into main Aug 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant