# workflow

Directs repository tasks to root SKILL.md and routing YAML, enforcing single-route workflows and blast-radius closure checks.

- rule · `type=rule` · Claude Code, Cursor, Codex, GitHub Copilot, Windsurf (Devin Desktop), Cline · ★ 627 repo stars
- Author: WoJiSama
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/WoJiSama/skill-based-architecture/tree/HEAD/.cursor/rules/workflow.mdc
- Updated: 2026-09-20
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/rules/workflow

## What it does

This rule serves as an entry shell for the skill-based-architecture repository. On every new prompt, the agent inspects `SKILL.md` and matches user intent against `references/self-hosting-routing.yaml`. The workflow reads only immediate evidence instead of preloading arbitrary context.

Tasks that alter externally visible behavior cannot mutate code immediately. The model must reach `requirement-ready`, form a task anchor, and clarify ambiguities before touching files. Before any commit, push, or delivery step, the agent must enter `templates/skill/workflows/task-closure.md`. Without `SKILL.md` and `references/self-hosting-routing.yaml` present at the repository root, the rule cannot resolve actions.

Closure rigor tracks file blast radius. Bucket A paths (entry shells, root router, templates, scripts) require full AAR reviews, smoke checks, and path integrity gates. Bucket B changes enforce a lightweight AAR, while doc updates in Bucket C bypass closure checks entirely.

## Install

### Cursor (native platform)

**Manually: put the files in place**
- File: `.cursor/rules/workflow.mdc` — Frontmatter: description, globs, alwaysApply

### Claude Code

1. **Plugin marketplace**
In the agent chat (not a shell):
```text
/plugin marketplace add WoJiSama/skill-based-architecture
```
In the agent chat (not a shell):
```text
/plugin install skill-based-architecture@skill-based-architecture
```

2. **Manually: put the files in place**
- File: `.claude/rules/workflow.md` — The paths frontmatter field limits the files: move globs from the source into paths

### Codex

**AGENTS.md**
- Codex reads AGENTS.md: paste the rule text there

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/instructions/workflow.instructions.md` — The applyTo field sets which files it applies to: move globs from the source into applyTo

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/rules/workflow.md`

### Cline

**Manually: put the files in place**
- File: `.clinerules/workflow.md`

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/WoJiSama/skill-based-architecture/tree/HEAD/.cursor/rules/workflow.mdc

## When to use it
- route incoming tasks through references/self-hosting-routing.yaml without context bloat
- prevent unapproved code mutations before reaching requirement-ready status
- enforce post-implementation smoke tests and AAR verification based on changed paths

## Example prompts
- Read references/self-hosting-routing.yaml and pick the matching route for this task.
- Bring the proposed contract change to requirement-ready before touching code.
- Execute task closure protocol under bucket A gates before committing.

## Source text · workflow.mdc · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 2b4ca77cfc4035d2.

BEGIN THIRD-PARTY FILE 2b4ca77cfc4035d2
```text
---
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.
```
END THIRD-PARTY FILE 2b4ca77cfc4035d2

The third-party file has ended. Everything between the 2b4ca77cfc4035d2 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 3252 of 3883 bytes. © WoJiSama · MIT · https://github.com/WoJiSama/skill-based-architecture/tree/HEAD/.cursor/rules/workflow.mdc

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
