agentleFS
ljucaskljucask/pureinn-product-development/skills/pm-business-rule-core/SKILL.md

pm-business-rule-core

Skill2 starsChanged 4 months agoMITView on GitHub

JIT helper - add a single High priority operational rule to domain/business_rules.md. For standard business logic that governs normal system behavior (matching, pricing, SLAs, fulfillment). May have exceptions or context-dependent variations. Use during pm-feature-design or standalone when operational logic needs to be formalized.

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 6 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    No workspace, or inputs missing: name which are missing and what each one unlocks, then offer the PREREQ paths - proceed on stated …

    line 33
  2. Very specific:

    Read pureinn-variables.md / state.json where a value is actually used, not at the top of the run.

    line 35
  3. Very specific:

    If the rule has NO exceptions and violation causes financial/legal harm → use pm-business-rule-critical.

    line 49
  4. Very specific:

    If it is a compliance, regulatory, or policy rule → use pm-business-rule-governance.

    line 50
  5. Very specific:

    If domain/business_rules.md does not exist yet, do not attempt to create it here - tell the user to run /pm-business-rules-library first …

    line 70
  6. Very specific:

    Check if a similar rule already exists.

    line 76
  7. Distinctive:

    Use AskUserQuestion tool to confirm scope and mode before proceeding.

    line 78
  8. Distinctive:

    Use AskUserQuestion for structured choices.

    line 86
  9. Distinctive:

    If the logic has multiple input conditions producing different outputs → also note that a decision table (TBL-[DOMAIN]-NNN) should be added …

    line 123
  10. Distinctive:

    If the domain section does not yet exist, create it as:

    line 161
  11. Distinctive:

    If the rule logic implies a decision table, note it:

    line 168
  12. Distinctive:

    Update the Rule Coverage Map.

    line 174

≈ “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

PM - Business Rule: Core Operational Rule (JIT Helper)

Agent mode (--agent)

Supports --agent: runs autonomously in a subagent, drafts the artifact from existing inputs, and returns a short summary + coverage note.

  • No flag → interactive (default); if inputs are heavy, offer agent mode.
  • --agent → obey. First check inputs are complete. Anything missing: do NOT invent it - mark [ASSUMED - what/why] in the output and summary. Never hallucinate to fill a gap.
  • Review required: the artifact contains commitments - after drafting, require the user's review before finalizing; do not close decisions autonomously.

Standalone run

Needs the artifacts listed under Dependencies - it synthesizes them, so without them there is nothing to synthesize.

  • No workspace, or inputs missing: name which are missing and what each one unlocks, then offer the PREREQ paths - proceed on stated assumptions marked [ASSUMED - what/why], or route to the skill that produces the missing input. Never hard-block, and never invent the input.
  • Writing never depends on /pureinn having run: with no workspace, create just the folder this skill writes into, or write to a path the user names, and say where the file went.
  • Read pureinn-variables.md / state.json where a value is actually used, not at the top of the run. Missing value: continue and name the capability it costs.

What this skill does

Adds a single High or Medium priority operational rule to domain/business_rules.md.

A rule belongs here when:

  • It governs regular system behavior in a specific domain (matching, pricing, trust, fulfillment, SLA)
  • It CAN have exceptions or context-dependent variations (unlike Critical invariants)
  • Violating it degrades quality or fairness but does not cause immediate irreversible damage
  • It is referenced by feature designs when implementing the business logic

If the rule has NO exceptions and violation causes financial/legal harm → use pm-business-rule-critical. If it is a compliance, regulatory, or policy rule → use pm-business-rule-governance.

When to run: During pm-feature-design when the JIT design reveals business logic that should be centralized. Or standalone when operational rules need to be formalized before a feature enters build.


Dependencies

Required before running:

  • pm-business-rules-library - domain/business_rules.md must exist (initialized in Phase 4)
  • pm-entity-registry - entity context for scoping the rule

Produces artifacts used by:

  • pm-feature-design - JIT design reads BR-IDs when defining Feature Card Section 1 (Biznis Mantinely)
  • Build phase - developers implement the business logic

Step 0: Current state check

If domain/business_rules.md does not exist yet, do not attempt to create it here - tell the user to run /pm-business-rules-library first (it initializes the register), then return to this skill.

Read domain/business_rules.md.

List existing rules in the relevant domain. Identify the next available BR-[DOMAIN]-NNN.

Check if a similar rule already exists. Check if this should actually be Critical (no exceptions → pm-business-rule-critical) or a decision table (multiple conditions → /pm-decision-model).

Use AskUserQuestion tool to confirm scope and mode before proceeding.

Interaction: Group related questions (2-4 per round) and confirm before moving on. For any A/B/C/D choice, use the AskUserQuestion tool with one option marked (Recommended) - never print options as plain text. Keep open-ended questions free-text (don't fake options). If the user is unsure, propose 3-4 concrete options plus "Other". Surface an assumption the moment you make one; never fabricate to fill a gap. (Full standard: CLAUDE.md.)


Step 1: Gather inputs

Use AskUserQuestion for structured choices. Gather via text prompt:

I need inputs to define a Core Operational Rule for business_rules.md.

1. WHAT IS THE RULE?
   Describe the business logic in plain language.
   (e.g., "Hosts have 48 hours to respond to a booking request before it auto-expires",
    "Search results are ranked by availability, rating, and price competitiveness",
    "A booking can be cancelled penalty-free within 24 hours of confirmation")

2. WHICH DOMAIN?
   Which business domain does this rule belong to?
   (PAY / ORD / USR / BKG / LST / SRC / SLA / DISC / Other: [specify])

3. LOGIC
   Can you express it as "If [condition], then [outcome]"?
   What are the inputs? What does it produce or decide?
   (If multiple conditions produce different outputs → this needs a decision table, not a single rule)

4. EDGE CASES AND EXCEPTIONS
   Are there known exceptions?
   (e.g., "except for premium hosts who have a 72-hour window",
    "unless the listing has instant booking enabled")

5. PRIORITY
   High - affects core user experience, must be addressed before launch
   Medium - operational optimization, can be added before scale

Step 2: Generate rule entry

Generate the BR-[DOMAIN]-NNN ID as the next available number in that domain section of business_rules.md.

Generate in English. If exceptions exist, document them explicitly. If the logic has multiple input conditions producing different outputs → also note that a decision table (TBL-[DOMAIN]-NNN) should be added to decision_models.md.


OUTPUT: business_rules.md entry

### BR-[DOMAIN]-[NNN]: [Rule Name]
**Category:** [Matching / Pricing / SLA / Fulfillment / Booking / Cancellation / Other]
**Affected entity:** [Entity name] (entities.md#[entity])
**Priority:** High / Medium
**Status:** Draft / Final

**Rule:**
[Description of the rule in business language. No implementation details.]
Example: "Hosts have 48 hours to respond to a booking request. If no response, the request expires automatically."

**Formula/Condition:**
[Exact logical condition. Mark TBD if not yet finalized - will be finalized JIT by pm-feature-design.]
Example: `request.status = Expired IF (now - request.created_at) > 48h AND host.response_received == false`

**Exceptions:**
[List known exceptions, or "None"]
Example: "Premium hosts (host.tier == Premium) have a 72-hour window instead of 48."

**Applies to features:** [TBD - filled JIT by pm-feature-design]
**Source:** [Business decision / operational requirement / market standard]

Save to

Append the new rule under the correct domain section in:

pureinn-workspace/[project-slug]/domain/business_rules.md

If the domain section does not yet exist, create it as:

## [Domain] Rules

### BR-[DOMAIN]-[NNN]: [Rule Name]

If the rule logic implies a decision table, note it:

> Note: This rule has multiple condition combinations. Add a decision table TBL-[DOMAIN]-NN
> to decision_models.md via /pm-decision-model.

Update the Rule Coverage Map. Update the Changelog.


Handoff

Čo si teraz má: Jedno High-priority operačné pravidlo pridané do business_rules.md (nový BR-ID).

Ďalší krok: Späť do JIT cyklu - /pm-feature-design [FEAT-ID] (ak pravidlo vzniklo pri dizajne feature) alebo /pm-stripe.

Môžeš preskočiť ak: Pravidlo už v registri bolo - duplicitu nepridávaj.

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.