xiaobai-workflow-enforcer

Xiaobai Workflow Enforcer - Mandatory workflows for AI Agents. Design before code. Test before implement. Verify before claim. Inspired by Superpowers (161K stars).

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "xiaobai-workflow-enforcer" with this command: npx skills add aptratcn/xiaobai-workflow-enforcer

Xiaobai Workflow Enforcer 🔒

Mandatory workflows for AI Agents. Not suggestions, not "when appropriate" — mandatory.

Inspired by Superpowers (161K stars) which proved that enforced workflows transform chaotic AI outputs into reliable engineering.

Core Philosophy

Superpowers PrincipleXiaobai Implementation
Test-Driven DevelopmentEVR + TDD skill
Systematic over ad-hocWorkflow Checkpoint
Complexity reductionSimplicity Check
Evidence over claimsVerification Gate

Mandatory Workflows

Workflow 1: Pre-Action Design Gate 🔒

Trigger: Before any multi-step task or code creation

Mandatory Steps:

  1. STOP. Don't write code yet.
  2. Ask clarifying questions (minimum 3)
  3. Present design/spec in chunks
  4. Get user sign-off on design
  5. Save design document
❌ Wrong:
User: Build me a scraper
Agent: [Writes code]

✅ Right:
User: Build me a scraper
Agent: Before I code, let me understand:
       1. What site are we scraping?
       2. What data do you need?
       3. How often should it run?
       4. Any rate limits to consider?
       [After answers, presents design]
       Does this design match what you need?

Workflow 2: Implementation Planning 🔒

Trigger: After design approval, before implementation

Mandatory Steps:

  1. Break into 2-5 minute tasks
  2. Each task has: file path, exact code, verification step
  3. Present plan for approval
  4. Save plan to checkpoint file
Plan Format:

## Task 1: Create scraper module (3 min)
- File: src/scraper.py
- Code: [exact code or pseudocode]
- Verify: `python -c "import scraper"`

## Task 2: Add rate limiting (2 min)
- File: src/scraper.py
- Code: [exact changes]
- Verify: Run with test request, check delay

...

Workflow 3: Test-First Gate 🔒

Trigger: Before implementing any function

Mandatory Steps:

  1. Write test first
  2. Run test, confirm it FAILS (RED)
  3. Write minimal code to pass
  4. Run test, confirm it PASSES (GREEN)
  5. Refactor if needed
  6. Commit only after GREEN
❌ Wrong:
[Writes function]
[Tests it manually]
"It works"

✅ Right:
1. Write test_function()
2. Run: pytest test_module.py
3. See: FAILED (expected)
4. Write function()
5. Run: pytest test_module.py
6. See: PASSED
7. Commit

Workflow 4: Execution Gate 🔒

Trigger: During task execution

Mandatory Steps:

  1. Read task from plan
  2. Execute exactly as planned
  3. Verify (run command, check output)
  4. Update checkpoint
  5. Only then move to next task
Checkpoint Update:
- Task 1: DONE (verified: scraper.py imports successfully)
- Task 2: IN_PROGRESS
- Tasks 3-5: PENDING

Workflow 5: Verification Gate 🔒

Trigger: Before claiming "done" or "complete"

Mandatory Steps:

  1. Run verification command
  2. Show output to user
  3. Confirm evidence matches claim
  4. Only then say "done"
❌ Wrong:
"Scraper is done!"

✅ Right:
"Scraper implementation complete.

Verification:
- Module imports: ✅
- Test suite passes: ✅ (5/5)
- Sample scrape works: ✅

Evidence:
[Output from test run]

Would you like me to proceed with deployment?"

Workflow Enforcement Protocol

Before Any Action

1. Is this a multi-step task?
   → Yes → Trigger Workflow 1 (Design Gate)

2. Is there a plan?
   → No → Trigger Workflow 2 (Planning)

3. Does this involve code?
   → Yes → Trigger Workflow 3 (Test-First)

4. Is task in progress?
   → Yes → Trigger Workflow 4 (Execution Gate)

5. About to say "done"?
   → Yes → Trigger Workflow 5 (Verification Gate)

Blockers That Must Stop Progress

ConditionAction
No design docDon't code, ask questions first
No planDon't execute, create plan first
No testDon't write function, write test first
Test failingDon't continue, fix the code
No verificationDon't say "done", verify first

Integration with Other Xiaobai Skills

  • EVR Framework — Verification gate implementation
  • Workflow Checkpoint — Plan and progress tracking
  • Skill Quality Eval — Measure workflow compliance
  • Self-Improve — Learn from workflow violations

Anti-Patterns (What This Skill Prevents)

Anti-PatternWhy It's BadWorkflow Fix
Jumping to codeSolves wrong problemDesign Gate
No planChaotic executionPlanning Gate
Write-then-testTests that pass triviallyTest-First Gate
Skipping verificationSilent failuresVerification Gate
Claiming done prematurelyUser finds out laterExecution Gate

Quick Reference Card

Before Coding:    DESIGN → APPROVE → PLAN → APPROVE
While Coding:     TEST(RED) → CODE → TEST(GREEN) → REFACTOR
After Coding:     VERIFY → EVIDENCE → REPORT
Always:           CHECKPOINT after each step

License

MIT

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Test Driven Development

Test-driven development with red-green-refactor loop and de-sloppify pattern. Use when user wants to build features or fix bugs using TDD, mentions "red-gree...

Registry Source
3810Profile unavailable
Coding

AppDev Skill - 通用应用软件开发工作流

通用应用软件开发完整工作流(HarmonyOS版)。支持从需求到部署的全流程开发管理。 包含:产品功能设计、代码生成、TDD开发、调试诊断、编译验证、版本管理。 适用于各类HarmonyOS应用的快速开发。 当用户需要开发HarmonyOS应用、生成代码、管理开发进度、进行TDD开发时触发。 关键词:开发应用、生...

Registry SourceRecently Updated
2350Profile unavailable
Coding

Anti-Slop

This skill should be used when the user asks to "check for slop", "anti slop review", "quality check", "is this AI garbage", "review for originality", "check...

Registry SourceRecently Updated
1280Profile unavailable
Coding

Sprint Contract

Multi-agent development workflow with Sprint Contracts and independent QA evaluation. Use when building features, fixing complex bugs, or any task that invol...

Registry Source
1360Profile unavailable