diff --git a/plugins/devloop/README.md b/plugins/devloop/README.md index 5916513..e0338c0 100644 --- a/plugins/devloop/README.md +++ b/plugins/devloop/README.md @@ -33,6 +33,10 @@ A Claude Code plugin that drives a task/issue to a merge-ready PR through an ite Create `.claude/devloop.local.md` in your project root. +Notes: + +- If your repo contains a pre-commit hook script (e.g. `./.husky/pre-commit`), the validator step will run it to help catch CI failures earlier. + Minimal template: ```markdown diff --git a/plugins/devloop/README.zh-CN.md b/plugins/devloop/README.zh-CN.md index 90d6896..01e3ff5 100644 --- a/plugins/devloop/README.zh-CN.md +++ b/plugins/devloop/README.zh-CN.md @@ -33,6 +33,10 @@ 在你的项目根目录创建 `.claude/devloop.local.md`。 +说明: + +- 如果你的仓库包含 pre-commit 的 hook 脚本(例如 `./.husky/pre-commit`),验证阶段会运行该脚本,用于提前发现可能导致 CI 失败的问题。 + 最小模板: ```markdown diff --git a/plugins/devloop/agents/devloop-validator.md b/plugins/devloop/agents/devloop-validator.md index 5145f40..88337ed 100644 --- a/plugins/devloop/agents/devloop-validator.md +++ b/plugins/devloop/agents/devloop-validator.md @@ -12,6 +12,10 @@ You are a specialized Sub-Agent focused on validation. Your goal is to ensure th 1. **Identify Tests**: Determine which existing tests are relevant to the changes, or identify what manual verification commands (e.g., build, lint) should be run. 2. **Execution**: Run the relevant tests and verification commands. + - If the repo contains a pre-commit hook script, run it to catch common CI failures earlier: + - If `./.husky/pre-commit` exists, run `./.husky/pre-commit` + - Else if `.git/hooks/pre-commit` exists, run `.git/hooks/pre-commit` + - If no hook script exists, report that you skipped this step. 3. **Analysis**: Interpret the results. Distinguish between failures caused by the new changes and pre-existing issues. 4. **Reporting**: Provide a clear report of test results, including any failures and logs.