agentleFS
fusebase-devfusebase-dev/fusebase-flow/.agents/skills/business-logic-guardian/SKILL.md

business-logic-guardian

Skill9 starsChanged 29 days agoMITView on GitHub

Use ONLY when a business-logic doc exists — docs/<app>/business-logic-index.md (AI-default retrieval index), docs/<app>/business-logic.md (human narrative), or docs/en/business-logic.md (the app-business-docs canonical for Fusebase CLI teams) — before fixes/improvements that touch business behavior. Treats the documented business logic as a guard layer — the fix must not silently break documented behavior. Pairs with FR-20 zoom-out. If none of these docs exist, this skill does nothing (silent no-op) — do NOT auto-create any of them. Not for net-new features with no documented logic.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If several exist: index first, narratives supplementary.

    line 37
  2. Very specific:

    Existence gate (FIRST STEP): Check ALL § Doc-path resolution paths: docs/<app>/business-logic-index.md, docs/<app>/business-logic.md, …

    line 60
  3. Distinctive:

    Every activation that reaches step 3 MUST emit this block after step 4's code verification, in chat and verbatim into the gate/ticket note …

    line 81
  4. Distinctive:

    Do not activate/create the doc when absent.

    line 111
  5. Distinctive:

    Do not trust the doc over the code (verify).

    line 112
  6. Distinctive:

    Do not silently change documented behavior without flagging it.

    line 113

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Business Logic Guardian

Style: Mode-B-lite. Artifact-gated — inert unless a business-logic doc exists at ANY path in § Doc-path resolution.

Purpose

Protect documented business logic during fixes and improvements. The business-logic doc is a fast navigation/verify layer: confirm a change does not silently break documented behavior before committing. Complements FR-20 (zoom-out) and FR-10 (reproduce-before-fix).

Consumes whichever business-logic doc exists. Per FR-23 (flow-skills/documentation-budget/SKILL.md), the AI-default authoring format is the retrieval index templates/business-logic-index.md (tables + source paths); the narrative templates/business-logic.md is the explicit human-readable option. This skill reads either as the guard layer.

Doc-path resolution (the gate checks ALL of these)

DocPathRole
Retrieval index (AI-default, FR-23)docs/<app>/business-logic-index.mdprimary guard layer when present
Flow narrative (human option)docs/<app>/business-logic.mdguard layer; supplementary if index exists
CLI-edition narrative (app-business-docs canonical)docs/en/business-logic.mdguard layer for Fusebase CLI teams using the provider skill

If several exist: index first, narratives supplementary. The gate no-ops only when none of the three exists.

When to invoke

  • Any doc in § Doc-path resolution exists — docs/<app>/business-logic-index.md (AI-default), docs/<app>/business-logic.md, or docs/en/business-logic.md (app-business-docs canonical) — AND a fix/improvement touches business behavior. If several exist, the index is the primary guard layer; narratives are supplementary.
  • Operator says "don't break the business logic", "does this change behavior".
  • During Implement / post-gate fixes on an app that has documented logic.

Do not invoke when

  • None of the § Doc-path resolution paths exists (docs/<app>/business-logic-index.md, docs/<app>/business-logic.md, docs/en/business-logic.md) → silent no-op; do not create any of them (author deliberately via app-business-docs — which writes docs/en/business-logic.md — or the FR-23 business-logic-index template).
  • Net-new feature with no documented logic yet.
  • Pure cosmetic edits.

Required inputs

InputWhere it livesIf missing
Business logic docany § Doc-path resolution path: docs/<app>/business-logic-index.md / docs/<app>/business-logic.md / docs/en/business-logic.mdSTOP — no-op only if ALL three absent. Author via app-business-docs (→ docs/en/business-logic.md) or the FR-23 index template if wanted.
The change in progresscurrent diff/plannothing to check; exit

Procedure

  1. Existence gate (FIRST STEP). Check ALL § Doc-path resolution paths: docs/<app>/business-logic-index.md, docs/<app>/business-logic.md, docs/en/business-logic.md. None exists → exit silently; do not create any. At least one exists → it is the guard layer (index primary).
  2. Read the documented business logic / main flows / edge cases.
  3. Impact-check. Does the change alter, remove, or contradict any documented behavior or edge case?
  4. Verify against code — the doc is the navigation layer; confirm the actual code path matches before trusting the doc (code is source of truth).
  5. Compute and emit the Required output block below using the impact answer and code verification.
  6. Flag any documented behavior the change would break; recommend preserving it or, if the change is intentional, updating the doc (via app-business-docs) in the same change.
  7. Ambiguity → ask operator (FR-19).

Worked example

Change: allow editing approved invoices; BL-7 says approved invoices are immutable. Code check: src/invoices/service.ts:updateInvoice() enforces the lock.

Business logic: Drift
Guard source:   docs/billing/business-logic-index.md — BL-7
Code check:     src/invoices/service.ts:updateInvoice() — matches doc
Action:         preserve behavior

Required output — business-logic impact verdict (4 lines)

Every activation that reaches step 3 MUST emit this block after step 4's code verification, in chat and verbatim into the gate/ticket note when one is written. An impact-check claim without the block is unverifiable and does not count as a check.

Business logic: <Preserved | Drift | Blocked (intent unclear, FR-11)>
Guard source:   <business-logic doc path + rule/flow/edge-case identifier>
Code check:     <source path/symbol — matches doc | doc stale | behavior differs>
Action:         <proceed | preserve behavior | update doc in same change | question for operator (FR-19)>

Output artifacts

ArtifactLocationMode
Business-logic impact verdict block (4 lines, above)chat / gate noteMode A / Mode-B-lite

Failure cases

FailureDetectionResponse
Artifact absentstep 1silent no-op (correct)
Change breaks documented behaviorstep 3flag; preserve or update-doc-in-same-change
Doc disagrees with codestep 4trust code; note the doc is stale; suggest refresh

Escalation path

  • Intentional behavior change → update whichever guard doc is in use in the same change (narratives via app-business-docs, which maintains docs/en/business-logic.md; the index via the FR-23 business-logic-index template).
  • Conflict with a locked decision → ask operator (FR-11/FR-19).

Anti-patterns

  • Do not activate/create the doc when absent.
  • Do not trust the doc over the code (verify).
  • Do not silently change documented behavior without flagging it.

Clean-room note

Original Fusebase Flow content. See docs/source-map.md. No third-party code, prompts, or skill files copied.

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.