К основному содержанию
правило CX Codex

workflow — правило для Claude Code: что делает и как установить

Правило workflow маршрутизирует задачи к корневому SKILL.md и YAML-файлу роутинга, запуская регламентированные воркфлоу и проверки перед сдачей кода.

MIT ★ 627 обновлён 2026-09-20

Установить в Cursor · Вручную: положить файлы Все способы и платформы ↓
.cursor/rules/workflow.mdc
Открыть на GitHub

Что делает workflow

Правило выступает совместимой оболочкой для мета-скилла skill-based-architecture. При старте любой задачи агент обязан сначала прочитать SKILL.md, а затем сопоставить намерение с единственным маршрутом в references/self-hosting-routing.yaml. Контекст не раздувается заранее: воркфлоу подтягивает знания только тогда, когда очередное решение требует конкретных свидетельств.

Перед внесением изменений в код агент обязан довести формулировку до состояния requirement-ready и зафиксировать якорь задачи (Task Anchor). Запрещено менять поведение системы на лету без предварительного плана. Любая финальная операция вроде коммита или публикации проходит через процедуру templates/skill/workflows/task-closure.md. Без файлов SKILL.md и references/self-hosting-routing.yaml в корне проекта правило теряет практический смысл.

Глубина проверок закрытия зависит от радиуса изменений: для ключевых оболочек и скриптов (корзина A) запускаются дымовые тесты и разбор AAR, для рядовых шаблонов (корзина B) нужен только облегчённый AAR, а правки документации (корзина C) закрываются без дополнительных проверок.

Какие задачи решает

  • направить агента по строгому маршруту через references/self-hosting-routing.yaml
  • исключить преждевременное изменение кода без согласованного состояния requirement-ready
  • проконтролировать обязательный AAR и тесты перед коммитом по радиусу затронутых файлов

Примеры запросов агенту

  • Определи маршрут для этой задачи через references/self-hosting-routing.yaml и следуй его воркфлоу.
  • Подготовь фиксацию задачи и доведи требования до requirement-ready перед правкой файлов.
  • Выполни протокол task closure для корзины A перед отправкой коммита.

Как установить workflow

Вручную: положить файлы

.cursor/rules/workflow.mdc

Во frontmatter: description, globs, alwaysApply

По шагам, с командами для каждой платформы: Cursor rules: файлы .mdc, четыре режима и замена .cursorrules

Вопросы о workflow

Как установить workflow в Claude Code?

Для установки выполните команды /plugin marketplace add WoJiSama/skill-based-architecture, а затем /plugin install skill-based-architecture@skill-based-architecture. Также можно разместить файл правила по пути .claude/rules/workflow.md.

Что делает правило workflow?

Оно связывает сессию с корневым SKILL.md, выбирает один точный сценарий в реестре маршрутов и обязывает агента валидировать правки перед коммитом.

Как классифицируются файлы при закрытии задачи?

Файлы делятся на корзины: системные скрипты и точки входа (корзина A) требуют полного AAR и дымовых тестов, шаблоны (корзина B) требуют краткий AAR, а правки документации (корзина C) завершаются без отчётов.

Исходный текст

workflow.mdc · MIT
---
description: Compatibility shell — routes tasks to skill-based-architecture's self-hosted SKILL.md at repo root.
globs: ["**/*"]
alwaysApply: true
---

# Cursor Workflow Rule

This repo is the **skill-based-architecture** meta-skill itself. Formal docs live at repo root. Read [SKILL.md](../../SKILL.md) first — it is the router.

<!-- SELF_ROUTING_BLOCK_START -->
## Quick Routing (survives context truncation)

Task routes live in `references/self-hosting-routing.yaml`.

For every new task:
1. Read `SKILL.md`.
2. Read `references/self-hosting-routing.yaml`.
3. Match exactly one route by `labels`, `trigger_examples`, and task intent; if none matches, use `other`.
4. Follow only that route's `workflow`; the route does not preload project knowledge.
5. Let the workflow inspect the smallest evidence that can decide the next action, then pull later knowledge only when that unresolved decision requires it.
<!-- SELF_ROUTING_BLOCK_END -->

## Auto-Triggers

- **New task in same session** → always re-match the route above. After a route change, read the new workflow; after compaction, recover only the current workflow and decision-relevant evidence. Only one clear read-only or fixed-contract maintenance action/check with no new desired behavior executes directly. A request that adds or changes user-visible behavior, a business flow/state, or an external contract first reaches `requirement-ready`; if meaning is incomplete, return current understanding, real risk/conflict, and the minimum normative question without an implementation Plan. Then establish a Task Anchor, prove the current owner and Current -> Target until `implementation-ready`, and only afterward derive a concise harness-native Plan before mutation. Present only useful alignment, do not repeat visible steps in chat, write user-facing messages in the user's natural language, and explain any internal term in one plain sentence where it appears; run the compact Anchor Checkpoint before each main step. This is Session recitation, not planning-file persistence. Can't tell if context compacted? Re-read the current workflow.
- Before any requested commit/push/MR/deploy/publish delivery, enter `templates/skill/workflows/task-closure.md`; `Ready for Delivery` is not completion, and Closure remains open until the requested artifact is verified.
- Closure checks fire by **blast-radius bucket** (path-based classification of files changed):
  - **A** (entry shells / SKILL.md / routing yaml / scripts / `*.tpl`) → full AAR + smoke-test + path-integrity gates
  - **B** (template rules/workflows non-example, references linked from SKILL.md, `workflows/full-migration.md`) → lightweight AAR only
  - **C** (README, examples, docs, UPSTREAM-CHANGES, references not linked from SKILL.md) → skip closure entirely
  - Multiple files in one task → take the max bucket. Path not in any list → default B. Trivial edit (typo / whitespace) in an A-bucket file still = full closure (bucket measures *what could break*, not *what changed*).
  - Pure Q&A / code explanation / read-only investigation / advice with no file changes → exempt; no AAR, no smoke-test.
  - Full path lists + canonical bucket rules: `references/protocols.md` § Task Closure Protocol.
- When adding to `templates/` → apply the "would two real projects disagree?" admission test (`templates/ANTI-TEMPLATES.md`)

## Red Flags — STOP

- "Just this once I'll skip the AAR" → stop. See `templates/skill/workflows/task-closure.md` § Rationalizations to Reject.
- "I'll inline this in SKILL.md instead of linking a reference" → stop. SKILL.md stays within dual budget (description ≤ 25 + body ≤ 90 lines); content goes to `references/` or `templates/`.
- "Let me pre-fill a gotchas example so the template feels complete" → stop. `templates/ANTI-TEMPLATES.md` forbids project-specific content in templates.

© WoJiSama · MIT · WoJiSama/skill-based-architecture

Похожие правила IDE

Все правила IDE по теме «Настройка агента: память, контекст, субагенты» →
gsd-ns-project open-gsd Скилл gsd-ns-project маршрутизации задач проекта и управления вехами для Claude Code распределяет запросы по профильным инструментам жизненного цикла разработки. CX Codex +1 573установок gstack garrytan Скилл gstack для Claude Code подбирает под запрос один из скиллов набора: планирование, ревью, QA, релиз, документация, безопасность, дизайн. CX Codex +1 24 900установок smb-router официальный anthropics Скилл smb-router для Claude Code, Codex, Cursor и других платформ, который разбирает запрос владельца малого бизнеса и направляет к нужному скиллу или команде. CX Codex +1 1 700установок cheese paulnsorensen Скилл cheese для Claude Code принимает идею, путь, PR, баг или вопрос и выбирает рабочий скилл по намерению. Он передаёт запрос нужному скиллу, не выполняя работу сам. CX Codex +1 817установок flow-next-flow Gordon Mickel Скилл flow-next-flow для Claude Code и Codex, который маршрутизирует работу между этапами: захват, уточнение, планирование, разработка, QA, создание PR и слияние. Запускается автоматически или в режиме --auto для беспилотных прогонов. CX Codex +1 ★ 730звёзд репо partnerships-kickoff Maya-Beth Finotti Скилл partnerships-kickoff для Claude Code направляет задачу партнёрского проекта к одному из 30 скиллов коллекции и ведёт общий файл контекста между сессиями. CX Codex +1 17 200установок

Из того же набора3

Ещё в каталоге

Спонсоры проекта

Компании, которые помогают держать аналитику открытой