Logo

GitLab

Sign in

朱子纯 / erp-workflow-plugin

  • Back to Dashboard
  • Project
  • Activity
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • Snippets
  • erp-workflow-plugin
  • hooks
  • hooks.json
  • fix(hooks): 恢复 Stop 钩子自动续跑编码流程(Workflow 重写时被误删) ...
    095364cd
    cb9da34e 转 coding.mjs Workflow 时把 auto-continue Stop 钩子连同 17 个旧
    coding 子技能一起删了,导致逐 REQ 手动编码会话每个 REQ 完就停下问 continue。
    本提交恢复该机制:
    
    - hooks/scripts/auto-continue.sh(Stop):回合中途结束默认 block 并喂「继续
      推进」,使各 REQ 子任务连跑、用户无需手敲 continue;仅当 transcript 出现
      [ERP-HALT] 或连续空转达上限(8)/无 >4000B 增长时放行停下。
    - hooks/scripts/reset-stall-counter.sh(PostToolUse):有工具调用即清零空转
      计数,真推进时无限续跑。
    - hooks/hooks.json:接线 Stop + PostToolUse(不含已删的 log-cross-module.sh)。
    - coding-start 步骤5「Workflow 已启动」横幅补 [ERP-HALT]:Workflow 转后台后
      主循环干净停下等通知,不被钩子误推去重启 coding-start。
    - .gitattributes:强制 *.sh / hooks.json 用 LF,避免 autocrlf 把 CRLF 注入
      shebang 与钩子输出的 JSON。
    
    钩子在会话启动时加载,需重启已运行会话才生效(开发仓即运行源,无需 commit
    即生效,commit 仅为持久化)。
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
    yanghl authored
    2026-06-11 13:14:39 +0800  
    Browse Dir »
hooks.json 394 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "",
        "hooks": [
          { "type": "command", "command": "\"${CLAUDE_PLUGIN_ROOT}\"/hooks/scripts/reset-stall-counter.sh" }
        ]
      }
    ],
    "Stop": [
      {
        "hooks": [
          { "type": "command", "command": "\"${CLAUDE_PLUGIN_ROOT}\"/hooks/scripts/auto-continue.sh" }
        ]
      }
    ]
  }
}