agentleFS
bricerisingbricerising/enterprise-software-playbook/skills/workflow/SKILL.md

workflow

Skill8 starsChanged 10 months agoApache-2.0View on GitHub

Auto-select and orchestrate playbook skills end-to-end for feature, bug-fix, or refactor work. Use when the user gives a general request without naming a specific skill — workflow picks the right skills, sequences them, and keeps overhead proportional to the change size. NOT for creating a standalone task breakdown (use plan) or writing spec artifacts (use spec).

46 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use chat-sdk, experiment and 4 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • VercelSkill

    chat-sdk

    Build multi-platform chat bots with Chat SDK (`chat` npm package). Use when developers want to (1) Build a Slack, Teams, Google Chat, Discord, Telegram, GitHub, Linear, or WhatsApp bot, (2) Use Chat SDK to handle mentions, direct messages, subscribed threads, reactions, slash commands, cards, modals, files, or AI streaming, (3) Set up webhook routes or multi-adapter bots, (4) Send rich cards or streamed AI responses to chat platforms, (5) Build or maintain a custom adapter or state adapter. Triggers on "chat sdk", "chat bot", "slack bot", "teams bot", "google chat bot", "discord bot", "telegram bot", "whatsapp bot", "@chat-adapter", "@chat-adapter/state-", "custom adapter", "state adapter", "build adapter", and building bots that work across multiple chat platforms.

    Also in 4 projects that use this

  • sunnnybalaSkill

    experiment

    Design and run ML experiments on cloud GPUs. Generates experiment code, runs on Modal, tracks results in JSONL. Use when asked to "run experiments", "train a model", "test this hypothesis", or "benchmark this approach". Proactively invoke when the user has a refined research idea and needs to validate it experimentally.

    Also in 3 projects that use this

  • nicepkgSkill

    team

    根据任务快速组建临时 AI Agent 团队协作。自动从 .claude/agents/ 中选择最合适的成员组队。

    Also in 3 projects that use this

  • u9401066Skill

    project-init

    Initialize new projects using this template. Triggers: init, new, 新專案, 初始化, create project, 建立專案, bootstrap, scaffold project.

    Also in 3 projects that use this

  • ww-w-aiSkill

    loop

    Run a prompt or command on a recurring interval. Useful for monitoring, polling, or periodic checks.

    Also in 3 projects that use this

  • GitHubSkill

    refactor

    Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.

    Also in 4 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

20 rules. 0 are common, 11 are distinctive, and 9 are very specific to this project.

  • 0

    Common

    Most of the 38 edited versions we read keep these.

  • 11

    Distinctive

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Default loop: Define → Standardize → Harden → Verify.

    line 13
  2. Distinctive:

    Use workflow when: the user gives a general request ("add feature X", "fix this bug", "refactor module Y") without naming a specific skill.

    line 17
  3. Distinctive:

    Do NOT use workflow when: the user names a specific skill ("run plan", "write a spec", "do a review") — invoke that skill directly.

    line 18
  4. Distinctive:

    Do NOT use workflow for: one-shot questions about code, explanations, or small edits that don't need multi-skill orchestration.

    line 19
  5. Distinctive:

    Before pattern/tool selection, write a compact model:

    line 62
  6. Very specific:

    If work changes externally visible behavior (API/WS/event schema, boundary error semantics, auth rules), use spec first:

    line 79
  7. Very specific:

    update the relevant specs/*.md and/or apps/<service>/spec/ bundle

    line 80
  8. Very specific:

    update contracts (contracts/: OpenAPI/proto/WS docs)

    line 81
  9. Distinctive:

    write acceptance scenarios and failure-mode expectations

    line 82
  10. Very specific:

    If the primary pressure is cross-service (partial failures, sagas, event-driven, domain boundaries), use architecture.

    line 83
  11. Very specific:

    If the primary pressure is in-process design (construction/structure/behavior), use design.

    line 84
  12. Very specific:

    If the same boundary behavior repeats across services (timeouts, retries, error mapping, telemetry fields), use platform and extract a …

    line 91
  13. Very specific:

    If editing TypeScript, apply typescript while implementing (typed boundaries, explicit lifetimes, safe module structure).

    line 92
  14. Very specific:

    If the change touches I/O boundaries (HTTP/gRPC/DB/cache/queues/events/WS), apply these:

    line 96
  15. Very specific:

    Use testing for non-trivial changes:

    line 104
  16. Distinctive:

    avoid asserting implementation details

    line 107
  17. Distinctive:

    When context or time is constrained, these are the load-bearing steps:

    line 111
  18. Distinctive:

    Start with ecosystem signals, then check internal readiness.

    line 147
  19. Distinctive:

    Does not re-check scope classification after discovering the change is bigger than initially expected.

    line 180
  20. Distinctive:

    When you finish work, report:

    line 185

“Common” is measured: kept by at least 6 in 10 of the 38 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Workflow (Auto Router)

Overview

This skill is a workflow orchestrator: it routes work across the other skills in this repo so you can deliver cohesive enterprise web app changes without the user needing to micromanage “which skill to use”.

Default loop: Define → Standardize → Harden → Verify.

Chooser

  • Use workflow when: the user gives a general request ("add feature X", "fix this bug", "refactor module Y") without naming a specific skill. Workflow picks the right skills and sequences them.
  • Do NOT use workflow when: the user names a specific skill ("run plan", "write a spec", "do a review") — invoke that skill directly.
  • Do NOT use workflow for: one-shot questions about code, explanations, or small edits that don't need multi-skill orchestration.

Inputs / Outputs

Inputs: User request (unstructured), codebase. Outputs: Completed work via orchestrated skill chain; final output from the last skill (typically finish for non-trivial changes).

Workflow

0) Calibrate scope (keep overhead proportional)

Classify the request:

  • Tiny change: small UI copy tweaks, rename a local variable, fix a typo. No behavior/contract change.
  • Normal change: touches behavior, boundary semantics, or adds a feature.
  • Big change: cross-service work, migrations, or changes that affect multiple boundaries/teams.

For this repo, non-trivial = normal or big.

Rule: only create/expand specs and platform primitives when they reduce future drift for the expected scope.

Proportionality guide (what to skip per scope):

ScopeSkipAlways applyUse if relevant
Tinyplan, spec, architecture, design, platform, review, finishtypescript (if TS)testing (if behavior changed)
Normalarchitecture (unless cross-service), platform (unless 2+ services)plan, archobs, testing, finishspec (if contracts change), resilience/security/observability (if I/O touched)
Bignothingplan, archobs, spec, testing, finishall Harden + Standardize skills

Boundary cases (scope is about impact, not diff size):

Example changeScopeWhy
Changing a default timeout from 5s to 30sNormalBehavior change — affects consumer-visible latency and failure semantics
Adding a new field to a response payloadNormalContract change — consumers must handle the new shape
Renaming a variable across 30 filesTinyNo behavior change — diff is large but purely cosmetic
Adding rate limiting to a public endpointNormalConsumers may start seeing 429s — behavior and error semantics change
Extracting shared auth middleware to packages/sharedBigCross-service change — affects deployment and ownership boundaries

GATE: After classifying scope, verify the classification against these boundary cases. If the change touches consumer-visible behavior or contract semantics, it is at least Normal regardless of diff size.

0.5) Externalize the system model (for non-trivial changes)

Before pattern/tool selection, write a compact model:

  • Objective function: goal, constraints, and anti-goals.
  • System sketch: boundary (in/out), time horizon, actors/incentives, key flows, top bottlenecks.
  • Reversibility signal: what evidence would make you change direction.

Then, if the work involves choosing between 2+ viable approaches, the first Define-stage skill stress-tests the model with probes (later skills refine, never re-run). If the path is obvious, note probes: skipped — single viable approach and move on.

  • Normal scope: run Assumptions (facts vs assumptions, which to validate first), Second-Order Effects (what changes next week/quarter/year, new load/toil/coupling/failure modes, pre-mortem), and Opportunity Cost / Bias (what we're saying "no" to, sunk cost/familiarity/novelty check). Attach outputs to the decision table.
  • Big scope or high ambiguity: also run Feedback Loops (reinforcing/balancing loops, delays, accumulations — attach to system sketch).
  • Escalate to one template from ../references/structured-thinking-templates.md when: 3+ options with no clear winner, multiple stakeholders must align, rollback/incident needs formal learning capture, or big-scope probes surfaced unresolved ambiguity.

1) Define (what are we building?)

Pick the minimal “definition artifacts” needed:

  • For non-trivial changes, use plan early to produce an executable task list, trade-off table, and measurement ladder.
  • If work changes externally visible behavior (API/WS/event schema, boundary error semantics, auth rules), use spec first:
    • update the relevant specs/*.md and/or apps/<service>/spec/ bundle
    • update contracts (contracts/: OpenAPI/proto/WS docs)
    • write acceptance scenarios and failure-mode expectations
  • If the primary pressure is cross-service (partial failures, sagas, event-driven, domain boundaries), use architecture.
  • If the primary pressure is in-process design (construction/structure/behavior), use design.
  • For non-trivial changes, run archobs and wait for its report to complete before proceeding to architecture or design. Downstream skills depend on archobs output (risk scores, boundary leakage, cluster assignments) to make evidence-based decisions — do not continue until the report is available.

2) Standardize (make it consistent)

Prevent copy/paste drift:

  • If the same boundary behavior repeats across services (timeouts, retries, error mapping, telemetry fields), use platform and extract a small “golden path” primitive.
  • If editing TypeScript, apply typescript while implementing (typed boundaries, explicit lifetimes, safe module structure).

3) Harden (make it survive reality)

If the change touches I/O boundaries (HTTP/gRPC/DB/cache/queues/events/WS), apply these:

  • resilience: timeouts + cancellation, bounded retries (only when safe), idempotency/dedupe, breakers/bulkheads when needed.
  • security: authn/authz checks, strict input validation, secrets/PII safety, and SSRF/injection guardrails where applicable.
  • observability: log/trace/metric correlation, stable field contract, and local verification steps (log → trace → metrics).

4) Verify (prove behavior)

  • Use testing for non-trivial changes:
    • characterization tests before refactors
    • consumer-visible tests for new behavior and failure semantics
    • avoid asserting implementation details

Minimum viable execution

When context or time is constrained, these are the load-bearing steps:

  1. Classify scope (step 0) — everything else depends on this.
  2. Select skill sequence from proportionality guide — skip skills the table says to skip.
  3. Execute skills in order — respect sequential dependencies (e.g., spec before testing for contract changes).
  4. Run finish for non-trivial changes — verification + summary.

Steps that can be cut under pressure: system model externalization (0.5), structured-thinking probes, recipe lookup.

Common Compositions (Recipes)

These are typical skill sequences for common work types. Adapt based on scope.

New endpoint / handler: spec → typescript → security → resilience → observability → testing → finish

Bug fix (production issue): debug → (fix) → testing → finish

Refactor (in-process): archobs → design → testing → review → finish

New service: spec → architecture → platform → typescript → resilience → security → observability → testing → finish

Cross-service feature: archobs → plan → spec → architecture → platform → typescript → resilience → security → observability → testing → review → finish

Feature roadmap: archobs → forecast (internal) → plan

Full situational awareness: archobs → forecast (combined) → plan

Technology adoption assessment (outside-in): intel → forecast (external) → archobs → architecture → plan Start with ecosystem signals, then check internal readiness. Use when the question is "should we adopt X?" rather than "what should we build next?"

Conditional composition: When archobs reveals high coupling to external dependencies (files with high xnbr bridging to third-party code, or clusters labeled with external technology names), invoke forecast in combined mode (not just internal). Topics for the external engine are derived from archobs cluster labels and high-xnbr file paths.

Architecture health pass: archobs → plan (from suggestions) → design → testing → finish

Security hardening pass: security → testing → review (type: security) → finish

Clarifying Questions

  • What is the scope of the change (tiny/normal/big)?
  • Are there existing specs, plans, or ADRs that constrain the approach?
  • Which services, boundaries, or contracts are affected?
  • Are there deployment constraints (freeze windows, feature flags, rollback requirements)?
  • Is this greenfield or modifying existing behavior?

Guardrails

  • Don’t create “spec theater”: if the change is tiny, keep docs minimal and move on.
  • Don’t choose architecture/patterns before writing objective function + constraints + anti-goals.
  • Don’t skip specs for boundary/contract changes: pin behavior with contracts + tests.
  • Don’t introduce retries without idempotency.
  • Don’t add telemetry labels with unbounded/high-cardinality values.
  • Don’t define metrics without a named decision, owner, and review ritual.
  • Don’t “helpfully” change response shapes or error semantics unless the spec says so.

Common failure modes

  • Applies big-scope overhead to tiny changes ("spec theater") — a typo fix does not need a decision table.
  • Skips archobs for non-trivial changes because the change "seems simple" — archobs data is required for normal/big scope.
  • Runs skills with sequential dependencies in parallel (e.g., running testing before spec is updated for a contract change).
  • Does not re-check scope classification after discovering the change is bigger than initially expected.
  • Defaults to the longest recipe instead of the proportionality guide.

Output Template

When you finish work, report:

  • For non-trivial changes, run finish before reporting.
  • Skills applied: which ones you used and why (1 line each).
  • System model (non-trivial only): objective function + system sketch + reversal signal.
  • What changed: behavior + contract impacts + key files touched.
  • Decision + measurement (non-trivial only): chosen option, trade-offs, kill criteria, leading/lagging indicators, and review cadence/owner.
  • Verification: commands run and results (or why they couldn’t be run).
  • Follow-ups: optional next tasks (if any).

References

  • Machine-readable skill index (triggers, tags, related, overhead): specs/skills-manifest.json
  • Workflow taxonomy: specs/003-taxonomy-and-workflow.md
  • Change process: specs/004-change-process.md
  • Structured-thinking probes + templates: ../references/ (checklists for inline probes, templates for escalation)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.