{
  "schemaVersion": "1.0",
  "item": {
    "slug": "jz-workflow-enforcer",
    "name": "Agent Workflow Enforcer",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/jzOcb/jz-workflow-enforcer",
    "canonicalUrl": "https://clawhub.ai/jzOcb/jz-workflow-enforcer",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/jz-workflow-enforcer",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=jz-workflow-enforcer",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "claude-skill.md",
      "scripts/gate.py"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/jz-workflow-enforcer"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/jz-workflow-enforcer",
    "agentPageUrl": "https://openagent3.xyz/skills/jz-workflow-enforcer/agent",
    "manifestUrl": "https://openagent3.xyz/skills/jz-workflow-enforcer/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/jz-workflow-enforcer/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Agent Workflow Enforcer",
        "body": "核心原则：用代码控制流程，不靠 AI 记忆。"
      },
      {
        "title": "为什么需要这个？",
        "body": "AI Agent 会\"忘\"规则：\n\nContext 压缩后，早期指令被淡化\n写在 prompt 里的规则是\"建议\"，Agent 可以不听\n分段任务时风格不一致\n\n解决方案：把规则写进流程，没过检查点 = 不能继续。"
      },
      {
        "title": "机制一：Gate 门禁",
        "body": "任务开始前，强制运行检查脚本：\n\npython3 {baseDir}/scripts/gate.py <task_type> [options]"
      },
      {
        "title": "支持的任务类型",
        "body": "类型说明content内容创作（文章、推文、配图）code代码修改deploy部署操作custom自定义（读取 gate-config.yaml）"
      },
      {
        "title": "示例",
        "body": "# 内容创作门禁\npython3 {baseDir}/scripts/gate.py content --platform x --account your-account\n\n# 代码修改门禁\npython3 {baseDir}/scripts/gate.py code --scope \"核心文件\""
      },
      {
        "title": "输出",
        "body": "═══════════════════════════════════════\n🚧 Gate Check: content\n═══════════════════════════════════════\n\n📋 Checklist (必须全部确认):\n[ ] 1. 已读相关 SKILL.md\n[ ] 2. 已确认目标账号/平台\n[ ] 3. 已检查 style-context（如适用）\n\n⚠️ 没有完成以上检查 = 不能继续执行\n═══════════════════════════════════════\n\n规则：Gate 输出后，Agent 必须逐项确认才能继续。"
      },
      {
        "title": "机制二：强制输出格式",
        "body": "在 AGENTS.md 或 system prompt 中添加：\n\n## 强制输出格式\n\n### 内容创作任务\n\n第一条回复必须包含：\n\n📋 Content Checklist\n□ 已跑 gate\n□ 已读相关 skill\n□ 已确认账号: [账号]\n\n**没有这个块 = 不能开始任务。**\n\n### 任务完成时\n\n必须包含：\n\n📋 Pre-publish Checklist\n□ 格式检查: ✅\n□ 风格检查: ✅\n□ 输出位置: [路径/链接]\n\n**任何一项 ❌ = 不能发布。**\n\n原理：Agent 可能忘了读文件，但格式要求写死在流程里，它不会忘输出格式。"
      },
      {
        "title": "机制三：Style Context 持久化",
        "body": "分段任务时，第一批完成后创建 style-context.yaml：\n\npython3 {baseDir}/scripts/create_style_context.py \\\n  --project \"项目名\" \\\n  --style \"风格名\" \\\n  --output ./style-context.yaml"
      },
      {
        "title": "模板",
        "body": "# style-context.yaml\nproject: project-name\ncreated: 2026-02-25\n\nstyle:\n  name: style-name\n  description: \"风格描述\"\n  \n  colors:\n    primary: \"#XXXXXX\"\n    background: \"#XXXXXX\"\n    \n  elements:\n    - \"元素1\"\n    - \"元素2\"\n    \n  avoid:\n    - \"避免1\"\n    - \"避免2\"\n\nprompt_template: |\n  [完整的 prompt 模板]\n\nexisting_outputs:\n  file1.png: \"描述\"\n  file2.md: \"描述\""
      },
      {
        "title": "后续批次规则",
        "body": "在 AGENTS.md 中添加：\n\n## 分段任务规则\n\n检测到分段任务时：\n1. 先检查 style-context.yaml 是否存在\n2. **存在** → 读取，按记录的风格继续\n3. **不存在** → 不能继续，先创建\n\n**没有 style-context = 不能继续分段任务。**"
      },
      {
        "title": "机制四：自动学习（可选）",
        "body": "当用户修改 Agent 输出时，检测差异并学习：\n\npython3 {baseDir}/scripts/detect_learning.py \"原文\" \"修改后\"\n\n输出：\n\n{\n  \"detected\": true,\n  \"original\": \"进行分析\",\n  \"corrected\": \"分析\",\n  \"suggested_rule\": \"避免「进行+动词」冗余结构\"\n}\n\n确认后写入 learnings.jsonl，下次自动应用。"
      },
      {
        "title": "1. 安装",
        "body": "# OpenClaw\nnpx clawhub@latest install agent-workflow-enforcer\n\n# 手动\ngit clone https://github.com/example/agent-workflow-enforcer ~/skills/agent-workflow-enforcer"
      },
      {
        "title": "2. 配置 AGENTS.md",
        "body": "把以下内容加到你的 AGENTS.md：\n\n## 🚧 Workflow Enforcer\n\n### Gate 门禁\n任务开始前运行：`python3 ~/skills/agent-workflow-enforcer/scripts/gate.py <type>`\n\n### 强制输出格式\n- 任务开始：必须输出 Checklist 块\n- 任务完成：必须输出 Pre-publish 块\n- **没有格式块 = 任务不完整**\n\n### 分段任务\n- 有 style-context.yaml → 读取后继续\n- 没有 → 先创建"
      },
      {
        "title": "3. 测试",
        "body": "python3 ~/skills/agent-workflow-enforcer/scripts/gate.py content --platform x"
      },
      {
        "title": "文件结构",
        "body": "agent-workflow-enforcer/\n├── SKILL.md              # 本文件\n├── scripts/\n│   ├── gate.py           # 门禁脚本\n│   ├── create_style_context.py\n│   └── detect_learning.py\n├── templates/\n│   ├── style-context.yaml\n│   ├── gate-config.yaml\n│   └── agents-snippet.md  # AGENTS.md 代码片段\n└── examples/\n    └── content-workflow/"
      },
      {
        "title": "核心原则",
        "body": "规则写在 prompt 里 = 建议\nAgent 可以不听。\n规则写在输出格式里 = 强制\n没有格式块 = 回复不完整。\n规则写在 gate 脚本里 = 硬门禁\n没跑脚本 = 后续不执行。\n\n不是靠 AI \"记住\"，是靠流程卡死。"
      },
      {
        "title": "License",
        "body": "MIT"
      }
    ],
    "body": "Agent Workflow Enforcer\n\n核心原则：用代码控制流程，不靠 AI 记忆。\n\n为什么需要这个？\n\nAI Agent 会\"忘\"规则：\n\nContext 压缩后，早期指令被淡化\n写在 prompt 里的规则是\"建议\"，Agent 可以不听\n分段任务时风格不一致\n\n解决方案：把规则写进流程，没过检查点 = 不能继续。\n\n机制一：Gate 门禁\n\n任务开始前，强制运行检查脚本：\n\npython3 {baseDir}/scripts/gate.py <task_type> [options]\n\n支持的任务类型\n类型\t说明\ncontent\t内容创作（文章、推文、配图）\ncode\t代码修改\ndeploy\t部署操作\ncustom\t自定义（读取 gate-config.yaml）\n示例\n# 内容创作门禁\npython3 {baseDir}/scripts/gate.py content --platform x --account your-account\n\n# 代码修改门禁\npython3 {baseDir}/scripts/gate.py code --scope \"核心文件\"\n\n输出\n═══════════════════════════════════════\n🚧 Gate Check: content\n═══════════════════════════════════════\n\n📋 Checklist (必须全部确认):\n[ ] 1. 已读相关 SKILL.md\n[ ] 2. 已确认目标账号/平台\n[ ] 3. 已检查 style-context（如适用）\n\n⚠️ 没有完成以上检查 = 不能继续执行\n═══════════════════════════════════════\n\n\n规则：Gate 输出后，Agent 必须逐项确认才能继续。\n\n机制二：强制输出格式\n\n在 AGENTS.md 或 system prompt 中添加：\n\n## 强制输出格式\n\n### 内容创作任务\n\n第一条回复必须包含：\n\n📋 Content Checklist\n□ 已跑 gate\n□ 已读相关 skill\n□ 已确认账号: [账号]\n\n**没有这个块 = 不能开始任务。**\n\n### 任务完成时\n\n必须包含：\n\n📋 Pre-publish Checklist\n□ 格式检查: ✅\n□ 风格检查: ✅\n□ 输出位置: [路径/链接]\n\n**任何一项 ❌ = 不能发布。**\n\n\n原理：Agent 可能忘了读文件，但格式要求写死在流程里，它不会忘输出格式。\n\n机制三：Style Context 持久化\n\n分段任务时，第一批完成后创建 style-context.yaml：\n\npython3 {baseDir}/scripts/create_style_context.py \\\n  --project \"项目名\" \\\n  --style \"风格名\" \\\n  --output ./style-context.yaml\n\n模板\n# style-context.yaml\nproject: project-name\ncreated: 2026-02-25\n\nstyle:\n  name: style-name\n  description: \"风格描述\"\n  \n  colors:\n    primary: \"#XXXXXX\"\n    background: \"#XXXXXX\"\n    \n  elements:\n    - \"元素1\"\n    - \"元素2\"\n    \n  avoid:\n    - \"避免1\"\n    - \"避免2\"\n\nprompt_template: |\n  [完整的 prompt 模板]\n\nexisting_outputs:\n  file1.png: \"描述\"\n  file2.md: \"描述\"\n\n后续批次规则\n\n在 AGENTS.md 中添加：\n\n## 分段任务规则\n\n检测到分段任务时：\n1. 先检查 style-context.yaml 是否存在\n2. **存在** → 读取，按记录的风格继续\n3. **不存在** → 不能继续，先创建\n\n**没有 style-context = 不能继续分段任务。**\n\n机制四：自动学习（可选）\n\n当用户修改 Agent 输出时，检测差异并学习：\n\npython3 {baseDir}/scripts/detect_learning.py \"原文\" \"修改后\"\n\n\n输出：\n\n{\n  \"detected\": true,\n  \"original\": \"进行分析\",\n  \"corrected\": \"分析\",\n  \"suggested_rule\": \"避免「进行+动词」冗余结构\"\n}\n\n\n确认后写入 learnings.jsonl，下次自动应用。\n\n快速开始\n1. 安装\n# OpenClaw\nnpx clawhub@latest install agent-workflow-enforcer\n\n# 手动\ngit clone https://github.com/example/agent-workflow-enforcer ~/skills/agent-workflow-enforcer\n\n2. 配置 AGENTS.md\n\n把以下内容加到你的 AGENTS.md：\n\n## 🚧 Workflow Enforcer\n\n### Gate 门禁\n任务开始前运行：`python3 ~/skills/agent-workflow-enforcer/scripts/gate.py <type>`\n\n### 强制输出格式\n- 任务开始：必须输出 Checklist 块\n- 任务完成：必须输出 Pre-publish 块\n- **没有格式块 = 任务不完整**\n\n### 分段任务\n- 有 style-context.yaml → 读取后继续\n- 没有 → 先创建\n\n3. 测试\npython3 ~/skills/agent-workflow-enforcer/scripts/gate.py content --platform x\n\n文件结构\nagent-workflow-enforcer/\n├── SKILL.md              # 本文件\n├── scripts/\n│   ├── gate.py           # 门禁脚本\n│   ├── create_style_context.py\n│   └── detect_learning.py\n├── templates/\n│   ├── style-context.yaml\n│   ├── gate-config.yaml\n│   └── agents-snippet.md  # AGENTS.md 代码片段\n└── examples/\n    └── content-workflow/\n\n核心原则\n\n规则写在 prompt 里 = 建议 Agent 可以不听。\n\n规则写在输出格式里 = 强制 没有格式块 = 回复不完整。\n\n规则写在 gate 脚本里 = 硬门禁 没跑脚本 = 后续不执行。\n\n不是靠 AI \"记住\"，是靠流程卡死。\n\nLicense\n\nMIT"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/jzOcb/jz-workflow-enforcer",
    "publisherUrl": "https://clawhub.ai/jzOcb/jz-workflow-enforcer",
    "owner": "jzOcb",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/jz-workflow-enforcer",
    "downloadUrl": "https://openagent3.xyz/downloads/jz-workflow-enforcer",
    "agentUrl": "https://openagent3.xyz/skills/jz-workflow-enforcer/agent",
    "manifestUrl": "https://openagent3.xyz/skills/jz-workflow-enforcer/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/jz-workflow-enforcer/agent.md"
  }
}