--- name: workflow-management description: Use PROACTIVELY when discovering, creating, renaming, or removing workflow definitions. MUST BE USED when adding a new user-facing flow that needs testing, or when the user asks for workflow changes. Owns the four-file workflow contract (registry + spec + bug file + fix-loop binding). last_updated: 2026-04-18 --- # Workflow Management Workflows are the unit of testable user-facing behavior. Each workflow touches four files that together form one system; this skill owns the rules for creating, maintaining, and retiring them. ## The four-file workflow contract | Role | File | Owner skill | |---|---|---| | Registry (how to test) | `.claude/workflows.md` — one entry per workflow | this skill | | Behavioral spec (what it should do) | `docs/system/.md` | this skill | | Bug tracker (per-workflow) | `.claude/bugs/workflows/.md` | `test-first` + `fix-loop` | | Fix-loop rhythm | `.claude/skills/fix-loop/SKILL.md` | `fix-loop` | All four live inside the vault-synced allowlist (see `docs-governance`), so vault/Obsidian always sees the full state. ## When to create a workflow Signals that something should become a workflow: 1. **User-facing flows** — sign up, log in, create/edit/delete, checkout, upload. 2. **Integration points** — API calls, webhook handlers, third-party service interactions. 3. **Background processes** — job queues, scheduled tasks, sync operations. 4. **Admin operations** — user management, configuration, deployments. 5. **Critical paths** — anything where failure means the user can't complete their goal. Rule of thumb: *if it broke, would a user notice?* If yes, it's a workflow. ## Creating a workflow — three steps ### 1. Add an entry to `.claude/workflows.md` ```markdown ## - **Description:** One-line user-facing summary. - **Test methods:** chrome-mcp | playwright | curl | bash | test-suite - **URL:** (if browser-based) - **Steps:** 1. First thing that happens 2. Next thing 3. Expected result - **What to check:** - Expected behavior A - Expected behavior B - No errors in console/logs - **Test actions:** - Specific commands or UI actions to exercise the flow - **Verification command:** `npm test` or a workflow-specific command - **Baseline success:** What "passing" looks like, one sentence - **Skip if:** When this test isn't relevant (e.g. "dev server not running") - **Escalate if:** When to stop and ask the user (e.g. "auth provider changed") ``` ### 2. Create the behavioral spec at `docs/system/.md` ```markdown # Workflow: ## What it does Describe the flow from the user's perspective. ## Steps 1. User does X 2. System responds with Y 3. User sees Z ## Rules - Must complete within