Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions plugins/devloop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Comment on lines +36 to +38
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Major inconsistency between PR objectives and implementation.

The PR objectives state that the validator should "run pre-commit checks (when configured and available)" by detecting .pre-commit-config.yaml and executing the pre-commit tool. However, the implementation actually runs git hook scripts at ./.husky/pre-commit or .git/hooks/pre-commit, which are different:

  • Expected (per PR objectives): Detect .pre-commit-config.yaml → run pre-commit run --all-files → handle when pre-commit is not installed
  • Actual (per implementation): Check for ./.husky/pre-commit or .git/hooks/pre-commit scripts → run the script if it exists → skip if neither exists

The pre-commit framework (Python-based) and arbitrary git hook scripts are not the same thing. Many repositories use .git/hooks/pre-commit or Husky hooks without using the pre-commit tool at all.

Additionally, the documentation only mentions ./.husky/pre-commit as an example but omits that .git/hooks/pre-commit is also checked as a fallback.

📝 Suggested documentation improvement

If the implementation is correct and you intend to run arbitrary hook scripts:

-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.
+If your repo contains a pre-commit hook script (e.g., `./.husky/pre-commit` or `.git/hooks/pre-commit`), the validator step will run it to help catch CI failures earlier.

If the PR objectives are correct and you intend to run the pre-commit tool:

-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.
+If your repo contains a `.pre-commit-config.yaml` configuration file, the validator step will run `pre-commit` checks to help catch CI failures earlier.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
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.
Notes:
- If your repo contains a pre-commit hook script (e.g., `./.husky/pre-commit` or `.git/hooks/pre-commit`), the validator step will run it to help catch CI failures earlier.
Suggested change
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.
Notes:
- If your repo contains a `.pre-commit-config.yaml` configuration file, the validator step will run `pre-commit` checks to help catch CI failures earlier.
🤖 Prompt for AI Agents
In `@plugins/devloop/README.md` around lines 36 - 38, The README and
implementation disagree: the code currently documents/checks for
./.husky/pre-commit and .git/hooks/pre-commit hook scripts but the PR goal was
to detect .pre-commit-config.yaml and run the Python pre-commit tool (pre-commit
run --all-files) while handling missing pre-commit; update either the docs or
the implementation to match: if you want to support the pre-commit framework,
modify the validator to detect .pre-commit-config.yaml and invoke "pre-commit
run --all-files" (gracefully handle when pre-commit is not installed) and remove
or clearly document hook-script fallback, or if you intend to run arbitrary hook
scripts, update README to explicitly state both ./ .husky/pre-commit and
.git/hooks/pre-commit are checked and clarify the behavior when those scripts
are present versus when .pre-commit-config.yaml exists.


Minimal template:

```markdown
Expand Down
4 changes: 4 additions & 0 deletions plugins/devloop/README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@

在你的项目根目录创建 `.claude/devloop.local.md`。

说明:

- 如果你的仓库包含 pre-commit 的 hook 脚本(例如 `./.husky/pre-commit`),验证阶段会运行该脚本,用于提前发现可能导致 CI 失败的问题。

最小模板:

```markdown
Expand Down
4 changes: 4 additions & 0 deletions plugins/devloop/agents/devloop-validator.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down