MOD-020-S02

Rules Engine

This submodule implements the rules engine step needed to test a proposed output or action against explicit rules, limits, eligibility conditions, dependencies, and prohibitions. It returns an inspectable intermediate result for Constraint Checking.

Workbook component extraction

Focused task

This submodule implements the rules engine step needed to test a proposed output or action against explicit rules, limits, eligibility conditions, dependencies, and prohibitions. It returns an inspectable intermediate result for Constraint Checking.

This component belongs to MOD-020 — Constraint Checking. It is not an independent pattern.

Prompt overview

Complete only the rules engine task within Constraint Checking. Work from the authorised candidate output and constraint set. This submodule implements the rules engine step needed to test a proposed output or action against explicit rules, limits, eligibility conditions, dependencies, and prohibitions. It returns an inspectable intermediate result for Constraint Checking. Return a clearly labelled result for validation and hand-off.

Prompt templates

Replace every placeholder with authorised project information. Inspect sources, assumptions, output and human decisions before acting.

Frontier model prompt

GOAL
Help <INSERT PERSON OR TEAM HERE> achieve <INSERT PROJECT GOAL HERE> by completing the "rules engine" component of MOD-020 Constraint Checking.

AIM
Produce <INSERT REQUIRED COMPONENT RESULT HERE> by completing one bounded task: the rules engine implements the rules engine step needed to test a proposed output or action against explicit rules, limits, eligibility conditions, dependencies, and prohibitions. It returns an inspectable intermediate result for Constraint Checking. This supports Constraint Checking but does not perform or approve the complete workflow.

ROLE
Act as an experienced critical analysis and quality-assurance specialist. Work from the supplied material and authorised sources. Do not invent facts, records, quotations, references, permissions or results. Clearly separate source evidence, interpretation, assumptions and recommendations.

CONTEXT AND INPUTS
- Project or artefact: <INSERT PROJECT, DOCUMENT OR ARTEFACT NAME HERE>
- Intended audience or user: <INSERT AUDIENCE HERE>
- Project goal: <INSERT PROJECT GOAL HERE>
- Material to analyse or process: <INSERT OR ATTACH SOURCE MATERIAL HERE>
- Required module inputs (proposed output, and constraint set): <INSERT EACH REQUIRED INPUT HERE>
- Authoritative evidence or records: <INSERT APPROVED SOURCES HERE>
- Constraints, exclusions and permissions: <INSERT CONSTRAINTS HERE>
- Success criteria: <INSERT MEASURES OF A GOOD RESULT HERE>
- Prior module output, if any: <INSERT PRIOR OUTPUT OR WRITE NONE HERE>
- Intended next module or human recipient: <INSERT NEXT STEP OR RECIPIENT HERE>

TASK
1. Check whether the supplied inputs are sufficient, relevant, authorised and internally consistent. List missing or conflicting items before continuing.
2. Plan and complete only the "rules engine" component. The rules engine performs the bounded rules engine function within the parent module and returns an inspectable intermediate result for Constraint Checking.
3. Apply the module's core operation: test a proposed output or action against explicit rules, limits, eligibility conditions, dependencies, and prohibitions.
4. Where useful, compare reasonable options, explain trade-offs, and identify dependencies. Related module connections recorded in the catalogue are: MOD-026 Recommendation and Ranking; MOD-008 Plain-Language Explanation; MOD-003 Source and Record Ingestion; MOD-013 Source Linking and Citation Grounding; MOD-042 Output Quality Evaluation; MOD-044 Human Review and Approval.
5. Preserve provenance by linking every material claim or transformed item to <INSERT SOURCE IDENTIFIER, PAGE, SECTION, TIMESTAMP OR RECORD ID HERE>.
6. Test the result against <INSERT QUALITY, SAFETY, PRIVACY OR ACCEPTANCE CRITERIA HERE>. Mark uncertainty and do not silently fill gaps.
7. Prepare a clear hand-off that can contribute to these expected module outputs: pass/fail findings, exceptions, and unresolved constraints.

OUTPUT FORMAT
Return the answer under exactly these headings:
1. Goal and scope
2. Input sufficiency check
3. Missing or conflicting information
4. rules engine result
5. Evidence and provenance map
6. Options, trade-offs and dependencies
7. Assumptions, uncertainties and risks
8. Hand-off package for <INSERT NEXT MODULE OR PERSON HERE>
9. Validation checklist
10. Human decision required

HUMAN REVIEW
A named person sets the acceptance threshold and verifies the result using these checks: authoritative-source check; test cases; human escalation for ambiguity. The accountable reviewer is <INSERT REVIEWER NAME OR ROLE HERE>. Do not treat the work as approved until that person records <INSERT APPROVAL, CORRECTION OR ESCALATION DECISION HERE>.

Local model prompt

GOAL
Complete one clearly bounded step for <INSERT PROJECT GOAL HERE>: the "rules engine" component of MOD-020 Constraint Checking.

ROLE
Act as a careful critical analysis and quality-assurance specialist. Use only the text and data pasted into this prompt. Do not browse, call tools, invent missing information, or complete other module components.

WHAT TO INSERT
- Project or document name: <INSERT NAME HERE>
- Short project goal: <INSERT GOAL HERE>
- Audience: <INSERT AUDIENCE HERE>
- Source text or data: <INSERT SOURCE MATERIAL HERE>
- Required inputs (proposed output, and constraint set): <INSERT EACH INPUT HERE>
- Rules or constraints: <INSERT RULES, LIMITS OR REQUIRED FORMAT HERE>
- Required result: <INSERT WHAT THE USER NEEDS FROM THIS COMPONENT HERE>
- Source labels: <INSERT PAGE, SECTION, TIMESTAMP OR RECORD IDS HERE>

TASK
1. Restate the goal in one sentence.
2. List the inputs actually supplied. If anything needed is absent, write "MISSING INPUT" and name it. Do not guess.
3. Perform only this component task: This submodule implements the rules engine step needed to test a proposed output or action against explicit rules, limits, eligibility conditions, dependencies, and prohibitions. It returns an inspectable intermediate result for Constraint Checking.
4. Keep names, numbers, quotations and source labels exactly as supplied.
5. Check the result against <INSERT SIMPLE ACCEPTANCE CHECKS HERE>.
6. Prepare a short result that can support these expected module outputs: pass/fail findings, exceptions, and unresolved constraints.

OUTPUT FORMAT
Use exactly this structure:
GOAL: <one sentence>
INPUTS USED: <bulleted list>
MISSING INPUTS: <bulleted list or NONE>
RULES ENGINE RESULT: <the completed bounded result>
SOURCE LINKS: <source label for each important item>
UNCERTAINTIES: <bulleted list or NONE>
HAND-OFF: <what the next person or module receives>
CHECK: <PASS, FAIL or NEEDS REVIEW, followed by one short reason>
HUMAN REVIEW: <INSERT REVIEWER NAME OR ROLE HERE must approve, correct or escalate>

STOP CONDITIONS
Stop and ask for more information if the source is missing, contradictory, unreadable, unauthorised, or too large for the available context. A named person sets the acceptance threshold and verifies the result using these checks: authoritative-source check; test cases; human escalation for ambiguity.