{
  "schemaVersion": "1.0",
  "item": {
    "slug": "workflow-patterns",
    "name": "Workflow Patterns",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/wpank/workflow-patterns",
    "canonicalUrl": "https://clawhub.ai/wpank/workflow-patterns",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/workflow-patterns",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=workflow-patterns",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "references/tdd-quick-reference.md"
    ],
    "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. Then review README.md for any prerequisites, environment setup, or post-install checks. 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. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "slug": "workflow-patterns",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-11T03:56:20.200Z",
      "expiresAt": "2026-05-18T03:56:20.200Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=workflow-patterns",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=workflow-patterns",
        "contentDisposition": "attachment; filename=\"workflow-patterns-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "workflow-patterns"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/workflow-patterns"
    },
    "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/workflow-patterns",
    "agentPageUrl": "https://openagent3.xyz/skills/workflow-patterns/agent",
    "manifestUrl": "https://openagent3.xyz/skills/workflow-patterns/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/workflow-patterns/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. Then review README.md for any prerequisites, environment setup, or post-install checks. 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. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Workflow Patterns",
        "body": "Implement tasks systematically using TDD (Test-Driven Development) with phase checkpoints and verification protocols. Ensures quality at every step."
      },
      {
        "title": "OpenClaw / Moltbot / Clawbot",
        "body": "npx clawhub@latest install workflow-patterns"
      },
      {
        "title": "WHAT This Skill Does",
        "body": "Provides a structured approach to implementing tasks:\n\nTDD cycle (red → green → refactor) for each task\nQuality gates (tests, coverage, linting) before marking complete\nPhase checkpoints requiring user approval\nGit commits with rich metadata for traceability"
      },
      {
        "title": "WHEN to Use",
        "body": "Use for:\n\nImplementing features from a plan\nFollowing TDD methodology\nTasks requiring quality verification\nProjects with coverage requirements\nTeam workflows needing traceability\n\nSkip for:\n\nQuick fixes or trivial changes\nExploratory prototyping\nProjects without test infrastructure\n\nKeywords: TDD, implementation, testing, coverage, checkpoints, verification, red-green-refactor"
      },
      {
        "title": "The TDD Task Lifecycle",
        "body": "11 steps for each task:"
      },
      {
        "title": "Step 1: Select Next Task",
        "body": "Read the plan and identify the next pending [ ] task. Select tasks in order within the current phase. Do not skip ahead."
      },
      {
        "title": "Step 2: Mark as In Progress",
        "body": "Update the plan to mark the task as [~]:\n\n- [~] **Task 2.1**: Implement user validation"
      },
      {
        "title": "Step 3: RED — Write Failing Tests",
        "body": "Write tests that define expected behavior before implementation:\n\nCreate test file if needed\nCover happy path\nCover edge cases\nCover error conditions\nRun tests — they should FAIL\n\ndef test_validate_email_valid():\n    user = User(email=\"test@example.com\")\n    assert user.validate_email() is True\n\ndef test_validate_email_invalid():\n    user = User(email=\"invalid\")\n    assert user.validate_email() is False"
      },
      {
        "title": "Step 4: GREEN — Implement Minimum Code",
        "body": "Write the minimum code to make tests pass:\n\nFocus on making tests green, not perfection\nAvoid premature optimization\nKeep implementation simple\nRun tests — they should PASS"
      },
      {
        "title": "Step 5: REFACTOR — Improve Clarity",
        "body": "With green tests, improve the code:\n\nExtract common patterns\nImprove naming\nRemove duplication\nSimplify logic\nRun tests after each change — must stay GREEN"
      },
      {
        "title": "Step 6: Verify Coverage",
        "body": "Check test coverage meets the 80% target:\n\npytest --cov=module --cov-report=term-missing\n\nIf coverage is below 80%:\n\nIdentify uncovered lines\nAdd tests for missing paths\nRe-run coverage check"
      },
      {
        "title": "Step 7: Document Deviations",
        "body": "If implementation deviated from plan or added dependencies:\n\nUpdate tech-stack.md with new dependencies\nNote deviations in plan task comments\nUpdate spec if requirements changed"
      },
      {
        "title": "Step 8: Commit Implementation",
        "body": "Create focused commit:\n\ngit commit -m \"feat(user): implement email validation\n\n- Add validate_email method to User class\n- Handle empty and malformed emails\n- Add comprehensive test coverage\n\nTask: 2.1\""
      },
      {
        "title": "Step 9: Update Plan with SHA",
        "body": "Mark task complete with commit SHA:\n\n- [x] **Task 2.1**: Implement user validation `abc1234`"
      },
      {
        "title": "Step 10: Commit Plan Update",
        "body": "git commit -m \"docs: update plan - task 2.1 complete\""
      },
      {
        "title": "Step 11: Repeat",
        "body": "Continue to next task until phase is complete."
      },
      {
        "title": "Phase Completion Protocol",
        "body": "When all tasks in a phase are complete:"
      },
      {
        "title": "1. Identify Changed Files",
        "body": "git diff --name-only <last-checkpoint-sha>..HEAD"
      },
      {
        "title": "2. Ensure Test Coverage",
        "body": "For each modified file:\n\nVerify tests exist for new/changed code\nRun coverage for modified modules\nAdd tests if coverage < 80%"
      },
      {
        "title": "3. Run Full Test Suite",
        "body": "pytest -v --tb=short\n\nAll tests must pass."
      },
      {
        "title": "4. Generate Verification Checklist",
        "body": "## Phase 1 Verification\n\n- [ ] User can register with valid email\n- [ ] Invalid email shows appropriate error\n- [ ] Database stores user correctly"
      },
      {
        "title": "5. WAIT for User Approval",
        "body": "Present checklist:\n\nPhase 1 complete. Please verify:\n1. [x] Test suite passes (automated)\n2. [x] Coverage meets target (automated)\n3. [ ] Manual verification items (requires human)\n\nRespond with 'approved' to continue.\n\nDo NOT proceed without explicit approval."
      },
      {
        "title": "6. Create Checkpoint Commit",
        "body": "git commit -m \"checkpoint: phase 1 complete\n\nVerified:\n- All tests passing\n- Coverage: 87%\n- Manual verification approved\""
      },
      {
        "title": "7. Record Checkpoint SHA",
        "body": "Update plan checkpoints table:\n\n## Checkpoints\n\n| Phase   | SHA     | Date       | Status   |\n|---------|---------|------------|----------|\n| Phase 1 | def5678 | 2025-01-15 | verified |\n| Phase 2 |         |            | pending  |"
      },
      {
        "title": "Quality Gates",
        "body": "Before marking any task complete:\n\nGateRequirementTestsAll existing tests pass, new tests passCoverageNew code has 80%+ coverageLintingNo linter errorsTypesType checker passes (if applicable)SecurityNo secrets in code, input validation present"
      },
      {
        "title": "Git Commit Format",
        "body": "<type>(<scope>): <subject>\n\n<body>\n\nTask: <task-id>\n\nTypes:\n\nfeat — New feature\nfix — Bug fix\nrefactor — Code change without feature/fix\ntest — Adding tests\ndocs — Documentation\nchore — Maintenance"
      },
      {
        "title": "Scope Addition",
        "body": "Discovered requirement not in spec:\n\nDocument in spec as new requirement\nAdd tasks to plan\nNote addition in task comments"
      },
      {
        "title": "Scope Reduction",
        "body": "Feature deemed unnecessary:\n\nMark tasks as [-] (skipped) with reason\nUpdate spec scope section\nDocument decision rationale"
      },
      {
        "title": "Technical Deviation",
        "body": "Different approach than planned:\n\nNote deviation in task comment\nUpdate tech-stack.md if dependencies changed\nDocument why original approach was unsuitable\n\n- [x] **Task 2.1**: Implement validation `abc1234`\n  - DEVIATION: Used library instead of custom code\n  - Reason: Better edge case handling\n  - Impact: Added email-validator to dependencies"
      },
      {
        "title": "Tests Fail After GREEN",
        "body": "Do NOT proceed to REFACTOR\nIdentify which test started failing\nRevert to last known GREEN state\nRe-approach the implementation"
      },
      {
        "title": "Checkpoint Rejected",
        "body": "Note rejection reason in plan\nCreate tasks to address issues\nComplete remediation tasks\nRequest checkpoint approval again"
      },
      {
        "title": "Blocked by Dependency",
        "body": "Mark task as [!] with blocker description\nCheck if other tasks can proceed\nDocument expected resolution"
      },
      {
        "title": "Task Status Symbols",
        "body": "SymbolMeaning[ ]Pending[~]In progress[x]Complete[-]Skipped[!]Blocked"
      },
      {
        "title": "Best Practices",
        "body": "Never skip RED — Always write failing tests first\nSmall commits — One logical change per commit\nImmediate updates — Update plan right after task completion\nWait for approval — Never skip checkpoint verification\nCoverage discipline — Don't accept below target\nSequential phases — Complete phases in order\nDocument deviations — Note any changes from plan\nClean state — Each commit leaves code working"
      },
      {
        "title": "NEVER Do",
        "body": "NEVER skip the RED phase — writing tests first is non-negotiable in TDD\nNEVER proceed past checkpoints without approval — wait for explicit user confirmation\nNEVER commit code that doesn't pass tests — every commit must be a working state\nNEVER accept coverage below 80% — add tests until threshold is met\nNEVER hide deviations from the plan — document all changes from original spec\nNEVER skip phases or reorder them — phases are sequential for a reason\nNEVER forget to record commit SHAs — traceability requires linking tasks to commits"
      }
    ],
    "body": "Workflow Patterns\n\nImplement tasks systematically using TDD (Test-Driven Development) with phase checkpoints and verification protocols. Ensures quality at every step.\n\nInstallation\nOpenClaw / Moltbot / Clawbot\nnpx clawhub@latest install workflow-patterns\n\nWHAT This Skill Does\n\nProvides a structured approach to implementing tasks:\n\nTDD cycle (red → green → refactor) for each task\nQuality gates (tests, coverage, linting) before marking complete\nPhase checkpoints requiring user approval\nGit commits with rich metadata for traceability\nWHEN to Use\n\nUse for:\n\nImplementing features from a plan\nFollowing TDD methodology\nTasks requiring quality verification\nProjects with coverage requirements\nTeam workflows needing traceability\n\nSkip for:\n\nQuick fixes or trivial changes\nExploratory prototyping\nProjects without test infrastructure\n\nKeywords: TDD, implementation, testing, coverage, checkpoints, verification, red-green-refactor\n\nThe TDD Task Lifecycle\n\n11 steps for each task:\n\nStep 1: Select Next Task\n\nRead the plan and identify the next pending [ ] task. Select tasks in order within the current phase. Do not skip ahead.\n\nStep 2: Mark as In Progress\n\nUpdate the plan to mark the task as [~]:\n\n- [~] **Task 2.1**: Implement user validation\n\nStep 3: RED — Write Failing Tests\n\nWrite tests that define expected behavior before implementation:\n\nCreate test file if needed\nCover happy path\nCover edge cases\nCover error conditions\nRun tests — they should FAIL\ndef test_validate_email_valid():\n    user = User(email=\"test@example.com\")\n    assert user.validate_email() is True\n\ndef test_validate_email_invalid():\n    user = User(email=\"invalid\")\n    assert user.validate_email() is False\n\nStep 4: GREEN — Implement Minimum Code\n\nWrite the minimum code to make tests pass:\n\nFocus on making tests green, not perfection\nAvoid premature optimization\nKeep implementation simple\nRun tests — they should PASS\nStep 5: REFACTOR — Improve Clarity\n\nWith green tests, improve the code:\n\nExtract common patterns\nImprove naming\nRemove duplication\nSimplify logic\nRun tests after each change — must stay GREEN\nStep 6: Verify Coverage\n\nCheck test coverage meets the 80% target:\n\npytest --cov=module --cov-report=term-missing\n\n\nIf coverage is below 80%:\n\nIdentify uncovered lines\nAdd tests for missing paths\nRe-run coverage check\nStep 7: Document Deviations\n\nIf implementation deviated from plan or added dependencies:\n\nUpdate tech-stack.md with new dependencies\nNote deviations in plan task comments\nUpdate spec if requirements changed\nStep 8: Commit Implementation\n\nCreate focused commit:\n\ngit commit -m \"feat(user): implement email validation\n\n- Add validate_email method to User class\n- Handle empty and malformed emails\n- Add comprehensive test coverage\n\nTask: 2.1\"\n\nStep 9: Update Plan with SHA\n\nMark task complete with commit SHA:\n\n- [x] **Task 2.1**: Implement user validation `abc1234`\n\nStep 10: Commit Plan Update\ngit commit -m \"docs: update plan - task 2.1 complete\"\n\nStep 11: Repeat\n\nContinue to next task until phase is complete.\n\nPhase Completion Protocol\n\nWhen all tasks in a phase are complete:\n\n1. Identify Changed Files\ngit diff --name-only <last-checkpoint-sha>..HEAD\n\n2. Ensure Test Coverage\n\nFor each modified file:\n\nVerify tests exist for new/changed code\nRun coverage for modified modules\nAdd tests if coverage < 80%\n3. Run Full Test Suite\npytest -v --tb=short\n\n\nAll tests must pass.\n\n4. Generate Verification Checklist\n## Phase 1 Verification\n\n- [ ] User can register with valid email\n- [ ] Invalid email shows appropriate error\n- [ ] Database stores user correctly\n\n5. WAIT for User Approval\n\nPresent checklist:\n\nPhase 1 complete. Please verify:\n1. [x] Test suite passes (automated)\n2. [x] Coverage meets target (automated)\n3. [ ] Manual verification items (requires human)\n\nRespond with 'approved' to continue.\n\n\nDo NOT proceed without explicit approval.\n\n6. Create Checkpoint Commit\ngit commit -m \"checkpoint: phase 1 complete\n\nVerified:\n- All tests passing\n- Coverage: 87%\n- Manual verification approved\"\n\n7. Record Checkpoint SHA\n\nUpdate plan checkpoints table:\n\n## Checkpoints\n\n| Phase   | SHA     | Date       | Status   |\n|---------|---------|------------|----------|\n| Phase 1 | def5678 | 2025-01-15 | verified |\n| Phase 2 |         |            | pending  |\n\nQuality Gates\n\nBefore marking any task complete:\n\nGate\tRequirement\nTests\tAll existing tests pass, new tests pass\nCoverage\tNew code has 80%+ coverage\nLinting\tNo linter errors\nTypes\tType checker passes (if applicable)\nSecurity\tNo secrets in code, input validation present\nGit Commit Format\n<type>(<scope>): <subject>\n\n<body>\n\nTask: <task-id>\n\n\nTypes:\n\nfeat — New feature\nfix — Bug fix\nrefactor — Code change without feature/fix\ntest — Adding tests\ndocs — Documentation\nchore — Maintenance\nHandling Deviations\nScope Addition\n\nDiscovered requirement not in spec:\n\nDocument in spec as new requirement\nAdd tasks to plan\nNote addition in task comments\nScope Reduction\n\nFeature deemed unnecessary:\n\nMark tasks as [-] (skipped) with reason\nUpdate spec scope section\nDocument decision rationale\nTechnical Deviation\n\nDifferent approach than planned:\n\nNote deviation in task comment\nUpdate tech-stack.md if dependencies changed\nDocument why original approach was unsuitable\n- [x] **Task 2.1**: Implement validation `abc1234`\n  - DEVIATION: Used library instead of custom code\n  - Reason: Better edge case handling\n  - Impact: Added email-validator to dependencies\n\nError Recovery\nTests Fail After GREEN\nDo NOT proceed to REFACTOR\nIdentify which test started failing\nRevert to last known GREEN state\nRe-approach the implementation\nCheckpoint Rejected\nNote rejection reason in plan\nCreate tasks to address issues\nComplete remediation tasks\nRequest checkpoint approval again\nBlocked by Dependency\nMark task as [!] with blocker description\nCheck if other tasks can proceed\nDocument expected resolution\nTask Status Symbols\nSymbol\tMeaning\n[ ]\tPending\n[~]\tIn progress\n[x]\tComplete\n[-]\tSkipped\n[!]\tBlocked\nBest Practices\nNever skip RED — Always write failing tests first\nSmall commits — One logical change per commit\nImmediate updates — Update plan right after task completion\nWait for approval — Never skip checkpoint verification\nCoverage discipline — Don't accept below target\nSequential phases — Complete phases in order\nDocument deviations — Note any changes from plan\nClean state — Each commit leaves code working\nNEVER Do\nNEVER skip the RED phase — writing tests first is non-negotiable in TDD\nNEVER proceed past checkpoints without approval — wait for explicit user confirmation\nNEVER commit code that doesn't pass tests — every commit must be a working state\nNEVER accept coverage below 80% — add tests until threshold is met\nNEVER hide deviations from the plan — document all changes from original spec\nNEVER skip phases or reorder them — phases are sequential for a reason\nNEVER forget to record commit SHAs — traceability requires linking tasks to commits"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/wpank/workflow-patterns",
    "publisherUrl": "https://clawhub.ai/wpank/workflow-patterns",
    "owner": "wpank",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/workflow-patterns",
    "downloadUrl": "https://openagent3.xyz/downloads/workflow-patterns",
    "agentUrl": "https://openagent3.xyz/skills/workflow-patterns/agent",
    "manifestUrl": "https://openagent3.xyz/skills/workflow-patterns/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/workflow-patterns/agent.md"
  }
}