RulesCraft
Creator: sagasys technology group
RulesCraft is a VS Code extension for editing Oracle Policy Modeling (OPM / OPA) rule documents using embedded WordCraft and GridCraft editors, with local Oracle compilation and validation.
Proof of concept - early alpha. Use at your own risk. This is experimental software, not production-ready or an Oracle-supported replacement for Policy Modeling. Editing, saving, formatting, validation, or navigation may fail or behave unexpectedly. Work on copies, keep independent backups, and review saved documents and compiler results in OPM before relying on them. No warranty or guarantee of correctness is provided.
Basic functionality
- Edit DOCX rules in WordCraft and XLSX rules in GridCraft inside VS Code. When another tool changes or replaces a rule document on disk, both editors refresh automatically if you have no unsaved edits. They also recheck after opening and when you return to the tab, so a missed file event does not leave old contents displayed. Unsaved edits are kept, not replaced; refresh failures show an error.
- Apply existing OPM paragraph and cell styles. Making a paragraph a Conclusion or Alternative conclusion (Alt+C, the chooser, or a Word paste) clears any other formatting on it, such as highlight, underline, italic, colour, font size or a manual indent, so every conclusion looks the same: bold, in the font and size the template's conclusion style sets. Rule tags, links and tracked changes are kept, and one undo brings the old formatting back. Toggle Comment (toolbar, or Alt+F12) works like the OPM ribbon's: it switches the selected conclusions, condition levels, rule names and rule types to their "Comment - " styles, or back if any of them is already commented. Selecting whole paragraphs toggles just those paragraphs, not the one the selection ends at. Alt+T (or the Rule tags style) inserts a
[Tag] at the start of the paragraph, styled grey with "OPM - ruletags Char", the character style Word itself uses for a tag, so it looks the same in Microsoft Word. Oracle reads a tag from its brackets, so the style only changes how it looks. Tags added by RulesCraft before 0.1.79 looked like plain text in Word; WordCraft fixes them when it opens the document, and the next save keeps the fix.
- Save documents and validate them with your locally installed Oracle compiler.
- Build an OPM project and revisit errors through build output and VS Code Problems.
- Find cached attribute usages, with proof-first results, formatted previews, drill-down into referenced attributes and relationships, and navigation to the source. Each CONDITION result is titled by the rule it's a condition for (that rule's conclusion), with the line that uses the attribute shown underneath.
- Inspect an OPA session: load compiled rules and JSON inputs, run inference, browse the complete model, find source usages, try temporary value overrides, and compare decision reports.
- Debugger Find attribute usage reuses the workspace's selected project when debugging its default output ZIP, or the source project detected beside a selected ZIP. A manually selected source project stays with the session even if a lookup fails. An unrelated ZIP still asks for its source rather than guessing.
- RulesCraft's standard report views are Focus, Outline, Facts and Rule logic. Optional interpretations supplied through the companion API are labelled Externally supplied · references checked, never as Oracle's own explanation; they disappear when their report becomes stale. RulesCraft itself has no interpretation-generation controls.
- New decision reports always start in Outline. Select Rule logic to see ALL required (AND), ANY sufficient (OR) and NOT, with comparisons, concluded values and OTHERWISE branches from the selected ZIP. This built-in view needs no companion or supplied interpretation. It lists candidate proving rules, not a guessed fired rule. Exact report-value links supply case context without claiming a comparison/group was evaluated. Missing evidence is not false; quantifiers, temporal scopes and unsupported constructs remain explicitly structural. The build identity and any limits are shown; unavailable logic has an explicit reason. Out-of-date reports hide their logic until updated.
- Decision report tabs use compact, numbered titles such as Why 1: the person is ready (maximum 36 characters). Long attribute names keep their beginning and ending around an ellipsis. Numbers remain stable within the session; session-coloured icons still distinguish sessions. The full attribute heading and session/instance context remain inside the report. Other VS Code tabs and workspace settings are unchanged.
- In the project dashboard's Search tab, select OPM rule tags only to search leading
[rule tag] labels in saved Word paragraphs (including table cells), without matching the surrounding rule text. Enter the label without brackets; case, whole-word and regular-expression options still apply. Results open at the full tagged paragraph. This does not require a build and is not a compiled-metadata or attribute-custom-property search; Excel cells are not included in tags-only mode.
- Logic is presented as readable-width candidate cards, with bounded AND/OR/NOT groups and reported values beside their evidence links. Expand deeper groups as needed; Details and limits holds build metadata and routine counts. Missing/ambiguous evidence and nonzero omissions remain explicit. Labels and border patterns distinguish operators without relying on colour.
- Conclusion headings show the sentence without a "Conclude:" prefix. Explore proving rules on a condition loads its candidate rules from the same ZIP only when expanded; continue through further conditions to drill deeper. Reopening a condition reuses the loaded structure. Inputs/unsupported items explain why no proving rule is available; scoped constructs do not guess an instance. Cycles, the 12-level exploration limit and the 64-condition per-report limit are explicit. This does not re-run Oracle or claim which candidate fired.
- Edit the project's data model: explore every entity and attribute the rules know about, set public names, override data types, choose how Oracle parses true/false sentences, adjust their generated wording, and add attributes and relationships no rule uses yet.
- Create a DOCX rule document using your locally installed OPM Word template.
- Newly generated rule workbooks use familiar OPM green/yellow/blue cell styles, Verdana 8, thin borders, bold headings and bold-italic Else. Existing workbooks retain their own formatting; opening them does not recolor them.
- While authoring Word or Excel rules, click Function Reference in either toolbar (or run RulesCraft: Function Reference). A shared reference opens beside your document with offline search across all 159 English (US) syntax entries in Oracle's reference: functions, connectors, constants and operators. Filter by category, select a result, and Copy name or a syntax variant; the tool never inserts into or changes your document. Notes are original short summaries with links to Oracle's detailed documentation. Replace placeholders before pasting, check your project's regional argument separator, and validate with Oracle; listing a function does not imply experimental native-compiler support. Close the reference tab when finished; Escape also closes it. The index was reviewed on 2026-11-08, not downloaded or refreshed on every search.
- Right-click an existing DOCX/XLSX file inside an OPM project in Explorer and choose RulesCraft: Include in Project or Exclude from Project. Include moves it into Rules; exclude moves it into Excluded Rules, outside the compiled rule sources. Subfolders are preserved, including when you include it again. Files are never overwritten or deleted. Confirm the destination; save/discard unsaved edits and close Word/Excel first. Clean VS Code editor tabs close before the move. Both actions appear for rule documents; an action that does not apply explains why. Build again afterward: existing compiled ZIPs and running sessions are not changed automatically.
- Run RulesCraft: New OPM Project to create an empty project using your installed Oracle .NET APIs, without Microsoft Word. Confirm a new folder name, English language/region (en-US or en-GB) and a Windows time-zone ID (UTC is offered). Oracle reopens and compiles it before the folder appears; existing destinations and locations inside existing OPM projects are refused. The verified ZIP is included, but no rules or cases are generated. You can then open the new folder in a separate VS Code window.
- Open an
.xprj project dashboard with Overview, Validation, Search, Inclusions, and Settings tabs.
- Save and validate open rule documents in that project. Configuration opens Workspace settings by default.
- Optionally connect to an Intelligent Advisor Hub, browse accessible workspaces and deployments, and upload a freshly built project snapshot as a new inactive or explicitly active version.
- From the consuming project, run RulesCraft: Import Project as Inclusion and select the source
.xprj. RulesCraft compiles its snapshot automatically: no ZIP preparation, Hub URL or version prompts. Local imports use https://sagasys.invalid/opa-hub, a deliberately non-real placeholder; no Hub is contacted. The first import is version 1. To refresh it, open the previously exported consuming copy and import the same source project again: that inclusion's version increments by 1, even if its source is unchanged. There is no global counter, and preview/cancellation does not change any saved version. Review the changes and confirm export to a new folder outside existing OPM projects. Both originals stay untouched. Supports one non-nested inclusion with matching language/region; unrelated existing inclusions, Hub-managed replacements and local modifications/conflicts are refused. In-place updates/removal and Hub downloads remain unsupported. Test affected cases on the exported copy before use.
Requirements
- Windows with VS Code 1.85 or later.
- A local Oracle Policy Modeling installation; development/testing used 26B.
- A local OPM project with an
.xprj file and rule documents.
Microsoft Word and Excel are not required for the implemented editing/build workflow. Oracle software and private policy documents are not included.
Companion workbook analysis API
The extension's existing API v1 additionally exposes workbookAnalysis: { apiVersion: 1, analyze(bytes: Uint8Array) }. It returns { sourceHash, sheets }: the SHA-256 of exactly those bytes and worksheets containing one-based cell coordinates, text, named styles, optional formulas/date flags, merged ranges, and blocks with inclusive firstRow, lastRow, firstColumn, lastColumn bounds.
Blocks are inferred from contiguous OPM condition/conclusion heading styles and following OPM condition/conclusion/else rows, independently within each column region. They are hints, not compiler-validated rule ranges or proof of equivalent behavior. The API reads no project, editor state, or .xgen cache, does not compile or write files, and throws on unreadable workbooks. A companion such as XLSX Compare can analyze both historical buffers without confusing them with current project compilation results. Canonical compiler-resolved attribute identities are not exposed by this API.
Optional Hub deployment (experimental)
Nothing contacts a Hub on startup or after a build. In a trusted workspace:
The .xprj dashboard's Overview has an optional Deploy to Intelligent Advisor card with Manage connections, Test connection, Deploy inactive version..., Deploy active version..., and Reconcile upload. Deploy there always builds the project displayed on that page, not another selected project. The same actions remain available in the Command Palette.
On wide windows, the deployment card sits beside Data model across the remaining two columns; on narrower windows it moves below at full width. The card offers Upload for review (inactive) and Deploy and activate, with a short explanation of each. Manage connections is always visible; expand Test and recover for the other tools and an explanation of reconciliation.
New-deployment creation is deferred until Oracle's project-default behavior is verified. Workspace selection belongs to that future creation flow, not to adding versions to existing deployments. No guessed compatibility mode or enabled-service setting is sent.
- Run RulesCraft: Manage Hub Connections to add named profiles (for example Development, Test and Production) using their HTTPS Hub addresses. Profiles are kept in VS Code's local extension state, not project settings.
- Use Set credentials there, or enter them when testing the connection. Both the API client ID and secret use masked VS Code prompts. Choose Session only (lost on extension/window reload) or explicitly Remember credentials in VS Code SecretStorage. Forget credentials removes both saved and session credentials. Editing a target address forgets its old credentials.
- Use RulesCraft: Test Hub Connection or RulesCraft: List Hub Deployments to test access or browse existing deployments and their workspaces. Choosing a connection starts the requested Hub operation without an extra connection popup. Authentication success alone does not establish deployment permissions.
- Save your project editors and run RulesCraft: Deploy Inactive Hub Version. Choose a connection, type the exact existing deployment name, then enter a version description. After a successful deployment, the name is remembered for that VS Code workspace and connection and prefilled next time; accept or edit it. There is no workspace picker: the existing deployment keeps its workspace and configuration. The description prompt shows the Hub, deployment, workspace and requested effect. Pressing Enter on the description builds and uploads the project snapshot, with no final confirmation popup. Escape cancels before building. The description includes a unique RulesCraft correlation tag.
- The completion notification reports the new version and INACTIVE status, with Open Hub. Alternatively, RulesCraft: Deploy Active Hub Version (or Deploy active version... on the project page) creates and activates the new version in the same request. Its description prompt says This replaces the live version; submitting it starts deployment without another confirmation. There is no automatic rollback: cancellation or a lost response does not undo activation. The inactive action never requests activation. There is no automatic deployment, standalone activation of an older version, deployment creation/deletion, or other Hub administration.
The ordinary output\<project>.zip is NOT the deployment artifact. Oracle's OPMBuild -snapshot produces a different ZIP, containing project source, rule documents, assets, compiled rules and any bundled project data. Review your project before approving upload; snapshot packaging is not a secrets scanner. Deployment builds do not write to your project, its output folder or caches.
This first version supports Hub-managed / locally managed OAuth API clients, not ordinary Hub logins or OCI identity-domain-managed clients. The client needs Manager permission for the chosen collection (called Deploy Admin in the REST workspace role schema). Locally managed clients may also be used on an OCI-backed Hub. Only advertised API 12.2.43 is currently supported. The compiled artifact and Hub must report full four-part numeric versions in the same major/minor family (for example 12.2). Older OPM releases may deploy to a newer Hub; a compiler newer than the Hub is refused. Oracle determines final snapshot compatibility. Unknown versions, other project kinds and connected data-source deployments are refused. This is a conservative version gate, not a guarantee of Hub acceptance.
HTTPS certificate validation stays enabled; redirects are refused. Tokens remain in the extension host's memory and are discarded after the command. No credential, token or HTTP operation is exposed to webviews or companion extensions. Direct HTTPS is used; VS Code-specific proxy settings are not applied.
If an upload is interrupted, do not immediately retry. RulesCraft never retries the upload POST. An active deployment may already have changed live behavior. It first tries read-only reconciliation using the unique description tag and prior version numbers. An unresolved intent remains in local extension storage across reloads, blocks another upload through that profile (including other VS Code windows), and prevents editing/removing its target. Run RulesCraft: Reconcile Hub Upload. If no single matching version with the requested active/inactive status is found, the profile stays blocked; clear the local record only after independently checking the outcome in Hub and waiting for any in-flight request. Clearing the record does not retry, activate or delete anything in Hub.
Deployments without an active/latest version can be listed with null version fields. Unsupported object shapes identify the affected field without exposing server response contents.
Verification: HTTP/authentication, UI confirmations and recovery have automated mocked tests. Oracle 26B's installed example has been compiled locally to verify snapshot structure and embedded runtime identity. A user-approved, unauthenticated Hub discovery request verified the advertised API-version format. The user reported a successful deployment with 0.1.96; this is not comprehensive live coverage of other environments or recovery paths.
Install and get started
Session input JSON pickers remember the most recently selected folder for this workspace, including when loading another input in an open session. Only the folder path is saved, not the JSON contents; cancelling keeps the previous folder.
When a trusted workspace starts with no editor tabs open, RulesCraft opens the selected project's dashboard (or the only detected project). Existing/restored tabs are left alone. This happens only at startup, not when you close the last tab later; multiple unselected projects are never guessed between.
- In VS Code, open Extensions, select ... > Install from VSIX..., and choose the supplied RulesCraft VSIX. Reload VS Code if prompted.
- Open the folder containing a copy of your OPM project. Trust the workspace only if you trust its contents.
- When the folder has an OPM project (
.xprj) at its root or one folder down, RulesCraft asks once whether to use it (or which one, if there are several) for builds, the data model and new rule documents. Don't Ask Again applies to this workspace only. The choice is remembered by VS Code for this workspace; nothing is written into the project. The status bar shows the project in use (with a warning if it was moved or renamed); select it to change the project, open the project dashboard, run the setup check, or ask about projects again. RulesCraft: Select OPM Project lists the projects found, can search all subfolders, and can browse for one. A project set by hand in Workspace settings (opaCraft.projectFile) always wins. Rule documents use the project in their own folder (or the nearest parent folder) first.
RulesCraft: Run Setup Check (also on the status bar menu and the dashboard's Settings tab) checks the project, Oracle Policy Modeling's OPMBuild.exe and its version (any version), the Oracle libraries beside it, Java for the session inspector, and the Word template. Each result has a fix: choose a project, locate OPMBuild.exe (or use another installed version that was found), or locate java.exe. Oracle and Java locations are saved to your User settings, because they belong to the machine.
Open its .xprj file to show the dashboard. The Overview groups the workflow into Check your edits, Build saved rules, and Explore a decision, with Open data model beside them. The Search tab finds text anywhere in the project's Word and Excel rule documents, which VS Code's own search can't read: paragraphs in every style (comments and headings too), tables, Word comments, headers, footers, notes and text boxes, cell values, formulas, cell comments and sheet names. It searches as you type, with Match case, Whole word and Regular expression; curly and straight quotes match each other. Results are grouped by document with their paragraph (¶) or cell; select one to open the document at that paragraph or cell (a comment opens at the paragraph it is on; header, footer, note and text box text opens the document). It reads the saved files and says which open documents have unsaved edits it couldn't see. Under Settings > Configure workspace, check Oracle Build Path points to your installed OPMBuild.exe. The default is C:\Program Files (x86)\Oracle\Policy Modeling\26B\bin\OPMBuild.exe.
- Open a DOCX or XLSX rule file. If necessary, use Reopen Editor With... > WordCraft / GridCraft. WordCraft and GridCraft open only for editing a local file: a comparison (Git changes, pull requests, Compare Selected) or a version from history shows a short note instead.
- Save your edits, validate the document, or use the dashboard's Save all and validate action. Build OPM compiles saved files in a disposable copy and, when the build succeeds, saves the compiled rulebase to the project's
output folder (output\<project>.zip, replacing the previous one) so it is ready for the session inspector. Turn off opaCraft.saveBuildOutput to build without saving the ZIP. Like compiling in Oracle Policy Modeling, validating a saved document refreshes its rule cache in bin, and Build OPM refreshes the caches of every document it compiled (even if other documents failed). Usage searches and the Proving rule panel read these caches. Validating unsaved edits writes the cache for those edits; after you save, the Proving rule panel notes the document is newer than its cache until you validate or build again.
- Check attribute links. When a document validates without errors, RulesCraft also checks every attribute it uses. An attribute that no rule proves and that has no public name can never get a value, which is almost always a typo in the rule text or a missing public name. The chip beside Validate Document shows ✓ All linked or ▲ N unlinked, and each use gets a warning card beside its paragraph saying whether the attribute is missing from the data model or declared there without a public name, and whether other documents use it. The text the rule wrote is highlighted in the card. When a linked attribute of the same entity has almost the same text (a few characters apart, as with "property begin date" and "property's begin date"), the card shows it as a suggestion with a Copy button; RulesCraft never changes the rule text. Click a card to go to its paragraph, press F8 / Shift+F8 for the next or previous one, or use Find usage, Data model (selects the attribute in the data model editor, opening it if needed) and Copy. Not a bug stops reporting an attribute in this project (stored in VS Code, not in the project); the rail's N dismissed list has Restore. Each use is also listed as a warning in the Problems panel until the next validation or until you close the document; select its
unlinked-attribute code to go to the card. Show all links (or the chip when everything is linked) lists every attribute the document uses, grouped by how it gets a value: unlinked, proven in other documents (named), base-level inputs (public name), entity identifiers, or proven in this document. Select one to go to its first use. Unlinked attributes are warnings: the document still validates and saves. The check reads the other documents' rule caches in bin, so when another document has been saved since it was last compiled, findings are held back (– Links not checked, with the documents named in its tooltip) until you validate those documents or build the project. It does not run while the document has compile errors. Save all and validate on the project page counts documents with unlinked attributes. In GridCraft, a clean validation lists unlinked attributes after any errors as ▲ Unlinked entries with their cell (select one to go to it; suggestions are in its tooltip). Oracle reads unquoted text in a cell as an attribute, so a value typed without quotes (abc for the text "abc") compiles without an error but is always unknown; the entry says so and shows the quoted form, the status line says how the link check went, and the Problems panel lists them too. Attributes dismissed as Not a bug in WordCraft are not reported in workbooks either.
The Command Palette also provides RulesCraft: Select OPM Project, Open Rule Document in VS Code, Add New Rule Document, Open Data Model, and Build Policy Model.
OPA session debugger
Install Java 8 or later (a JRE is enough). If java is not on PATH, set opaCraft.javaPath to its executable in Workspace settings. Oracle engine JARs are loaded from the folder containing your configured Oracle Build Path; Oracle software is never bundled.
Press Ctrl+F1 in the project dashboard, WordCraft or GridCraft to open the session inspector. Alternatively, choose Open session inspector on the dashboard or RulesCraft: Debug OPA Session from the Command Palette. It uses the project's output\<project>.zip without asking; build first if it is missing. To select a different compiled ZIP, use the quieter Debug with another ZIP... dashboard link or RulesCraft: Debug with Another ZIP command. With no selected project, the normal command still asks for a ZIP.
Choose Load input JSON or Empty session after selecting the compiled rulebase. An empty session starts with one case and unknown input attributes, without needing a JSON file; rules still infer whatever they can. For a JSON file with several cases, choose the case. The session opens in a new editor tab and runs straight away. Change input… switches to another file; Empty session replaces the current inputs after confirmation if there are edits or overrides. Inputs use Oracle's batch format: an object containing cases and optionally outcomes, including nested entities, @id references, and temporal value/date objects. Oracle parses and maps the inputs.
Case labels include their @id. Select another case and Run case to switch; subsequent runs use Re-run case.
Manual inputs and instances. Use Session ▾ → Review or edit input JSON to enter input attributes, then re-run. Right-click a forward containment relationship in the explorer or Relationships panel and choose Add instance...; its entity and parent are already selected, so you only enter a unique instance ID. Right-click a supplied instance and choose Add child instance... to choose a child entity type, or Delete instance... to remove that instance and its supplied descendants. Shift+F10 or the keyboard's context-menu key opens the same menus. Add parents before children; new attributes start unknown. Global and engine-inferred instances cannot be deleted or manually created, and unavailable actions explain why. Deletion refuses dangling non-containment references: remove those references from the input JSON and re-run first. Instance editing requires exact @id mappings and an up-to-date run; unsupported or ambiguous input structures show a reason instead of guessing. Changing instances re-runs the case and clears temporary overrides after confirmation. All edits stay in memory. Export input JSON explicitly saves the whole input batch, including manual instances and JSON edits, to a .json file outside the source OPM project; temporary value overrides are not included. Original files are never automatically overwritten.
Several sessions at once. Run Debug OPA Session again to open another session in its own tab, each with its own Oracle session. A session's tab is named after its input file (without .json) and, for a file with several cases, the case's @id (or Case N): for example claims_jan · A-1. A second session on the same input and case is called claims_jan · A-1 (2), keeping its number while it is open. Tabs a session opens end with its name, such as Why: the person is eligible · claims_jan · A-1, and are renamed when the session moves to another input or case; a decision report's context line starts with its session too. Each session also has its own colour, one of eight (no red): its tab icon is a filled square in that colour, the tabs it opens (decision reports, rule loops, cached usages) have outlined icons in the same colour, and its pages have a stripe across the top and a chip with the session's name. A ninth session reuses the least used colour with a hollow icon. The name always identifies the session; the colour only makes it quicker to spot. All of these tabs open in the current editor group instead of splitting the editor. To open one beside the session instead, choose Explain value to the Side (or Explain relationship to the Side) from the row menu, or press Ctrl+Enter or Alt+click on Explain value, Explain relationship, Find attribute usage or Go to data model; you can also drag a tab to another group.
Once inputs are loaded, a single slim row heads the tab and stays there while you scroll: the Model / Changes / Rule activity / Loops views, a status pill, an overrides count when you have overrides, Re-run case (or Ctrl+Shift+Enter; Cancel while running) and Session ▾. The pill shows the last run's result ("Run 3 · 25 ms", or "Error: 2 rule errors" in words), and a newer message for a few seconds; errors stay until the next run. Only notices that need you, such as rules changed since the build (Rebuild & re-run) or a rule loop that didn't settle, appear under the row. Session ▾ (or clicking the pill or the overrides count) opens the Session drawer with everything else: the input file, Change input… and the case; the compiled rulebase; the loop guard; the run summary (model totals, the full status line and run diagnostics); overrides and Reset all overrides & re-run; the input JSON editor; and Messages, the session's last 30 messages with their times. Esc closes the drawer. A run never opens it. Each session runs its own Java process, so many open sessions use more memory, and only one Rebuild & re-run can build a project at a time.
Navigate the Entity explorer: it shows only containment relationships (each entity instance under the instance that contains it), so it is a finite tree. Each instance's containment relationships are indented beneath it along a guide line, which is emphasised for the selected instance. Every instance starts collapsed, with its relationship and related-instance counts as a summary. Expand all and Collapse all above the search change the whole explorer (not while a search is showing its matches); use the chevron beside an instance (or Left/Right on the focused instance) to expand or collapse all of its relationships. Going to an instance (Back / Forward, a relationship target, a search result) expands just the path to it. A re-run of the same case keeps what you expanded; a new input or case starts collapsed again. Click an instance to see its attributes; its inferred and other non-containment relationships are listed under Relationships below the attributes, with clickable targets. Relationships that Oracle uses to create inferred entity instances are marked and listed first: Inferred from on the inferred entity (for example a budget's person, CE benefit, other program assistance, or LTC detail) and Creates instances on the creating entity (for example the person's budgets). Instance labels use Oracle's identifying (debug-name) attribute when available, otherwise the instance ID. Find an instance searches names, relationships, attributes, and values across the model; Filter this instance and Show independently filter the selected instance's attributes, and the filter also narrows its Relationships (by relationship text or a target's name). Every search and filter in the inspector and decision reports matches each word you type, in any order and ignoring case and apostrophes: "expected code" finds "the budget's expected role code". Back / Forward, relationship targets, and parent links help you retrace your exploration and reveal the instance in the explorer; entity types with no instances appear in a collapsed group. Drag the divider beside the explorer (or focus it and use the arrow keys) to resize it; double-click it to reset the width, which is remembered for future sessions. Find attribute usage on a containment relationship only reads the rule documents that actually reference it, so even widely used relationships return quickly. For an inferred entity, the results also include, as PROOF usages, the rules that create its instances through each Inferred from relationship (for example "the program's budget … exists if"), labelled Creates instances through …. Entities that rules create come first, marked Inferred, then everything else, each in alphabetical order. The searches and the Show filter stay as you move between instances, with a Filtered: N of M attributes line and Clear search and filter; ‹ › beside the instance steps through the same entity, so a kept search compares a value across instances. They clear for a new case or input file.
Attribute labels include data-type icons (Boolean, Text, Number, Currency, Date, Datetime, and Time of day), with type names available on hover and to screen readers. Relationship groups start collapsed and show Input, Inferred, or Unset badges in both the navigator and relationship details; unknown targets remain separately identified. Search expands matching paths, and manual expansions persist while exploring the current run. Double-click a row, or focus it and press Enter, for its full value. Temporal values show their map rather than a count or a sampled value: the value cell reads like "Beginning: No → 2026-01-01: Yes → End of time: No" (long series show the first two points, the last point and the total), and details show a From / Until / Value table in which each value applies from its From date up to, but not including, Until. Dates are ISO; Oracle's far-future 9999 dates read End of time. Series of more than 25 points show the first 8 and last 5 rows with Show omitted points controls (50 at a time), and Value on date answers what applied on any date. Attribute filtering also matches timeline dates and values. Row actions live in a menu: right-click a row, press Shift+F10 or the context-menu key, or use the ⋯ button in the State column. The menu offers Details, Explain value, Override value..., Clear override (when overridden), Edit input JSON... (for inputs), and Find attribute usage. Relationships marked Inferred also offer Explain relationship, in their right-click menu and their Relationships section; it opens a decision report tab explaining why Oracle inferred the relationship's targets, which refreshes with overrides and re-runs like attribute reports. Input and unset relationships have no rule to explain. Up/Down moves between rows. The attribute inspector stays beside the table on wide screens and becomes a dismissible floating panel in narrower editors. Escape or Close returns focus to the attribute.
Right-click an attribute or relationship and choose Go to data model to open the project's data model editor with it selected, for example to give it a public name or change how an attribute's text is parsed. RulesCraft finds the project beside the rulebase's output folder (or uses the one chosen for Find attribute usage), and matches by entity and text (a relationship also by its reverse text, its public name, or, for a direction with neither, its data model ID); if the data model doesn't have exactly one match, it says so instead of guessing. Right-click an attribute or relationship and choose Find attribute usage to search its source rule documents using the existing usage previews. Keyboard users can use Shift+F10 or the context-menu key; details and relationship sections also offer a usage button. Select the matching source project when prompted. Its saved OPM cache must match the compiled rulebase. Usages open in their own tab in the same editor group; the session inspector stays usable while that tab is open. In the usage tab, Open rule above the preview (like the decision report's proving-rule panel) opens the selected usage's source document at that rule; double-clicking a usage or pressing Enter does the same. Attributes and relationships referenced by the previewed rule are dotted-underlined: click one (or focus it and press Enter) for Find usages of ..., which replaces the tab's list in place with a breadcrumb trail and Back (Alt+Left), and, for attributes, Why? Decision report. Why? Decision report in the tab header explains the attribute being browsed. Reports are generated from this inspector's current run, inputs, and overrides; if several instances have the attribute, choose one. Run the case first; a report cannot start while the inspector is busy. Drilling is also available from usage tabs opened in WordCraft and GridCraft, without the Why action.
Copy an attribute's or relationship's text to use it in a rule document: press Ctrl+C on its row (in the attribute table, relationships, Changes, Rule activity or a decision report line), or choose Copy attribute text / Copy relationship text from its menu. The attribute inspector, a decision report's value popover and the usage view's title also have a Copy button. RulesCraft copies Oracle's base sentence (for example "the person's age"), never the line with its values, and confirms in the status bar once the text is on the clipboard. Where Oracle doesn't supply that sentence the copy action is unavailable rather than copying an internal ID. For an attribute that isn't true/false, the row menu also has Copy value, which copies its value as the table shows it (for example 1234.5 or a code); for an unknown, uncertain or changing (temporal) value it is unavailable, and its tooltip says why.
Choose Override value... from the row menu to try a temporary value on an input or inferred attribute in that instance, then re-run inference in the live Oracle session, without reloading the JSON or recreating inferred instances. Typed controls support single values, unknown, uncertain, and temporal change points. Active overrides are marked; remove an individual override or Reset all overrides & re-run to restore the original assignments and normal inference. Unknown clears an assigned value, so Oracle may infer it again; overrides Oracle cannot retain fail explicitly and roll back without replacing the previous results. Overrides survive same-case re-runs and Rebuild & re-run (step 11) but clear when inputs or the selected case change, or when you run after the compiled rulebase changed outside the inspector. No input JSON or rule document is rewritten.
Each Explain value (or Why? from a usage tab) opens an independent VS Code editor tab, titled Why: ... · , next to the session inspector in the same editor group. Keep multiple reports open, drag tabs between editor groups for side-by-side comparison, and navigate other instances without replacing them. Return to session inspector takes you back to the model. Applying or removing overrides, resetting all overrides, re-running edited inputs or another case, and Rebuild & re-run mark every open report Out of date: its old content is hidden behind a banner, and the inspector's status line says how many reports are affected. Nothing is regenerated until you choose Update report in that tab, which explains the same attribute or relationship of the same instance in the current run, with its evidence values, temporal timelines, search indexes, run context, override count and proving rules. Each report follows its original attribute and exact engine instance identity, not an instance's list position or debug name; after new inputs or another case it updates only when an instance with the same identity exists. The selected view, search text, display toggles and your place in the report are kept. If the instance is no longer in the run or the report can't be generated, the tab says why and stays out of date. Closing a pending report cancels its generation; completed tabs remain readable after the inspector closes (they can no longer be updated) and are discarded when closed or VS Code reloads.
Every new decision report starts in Outline, regardless of the previous view. Switch between Focus / Outline / Facts / Rule logic while reading; your current place carries over between the report-text views. Focus shows one conclusion with its numbered Because reasons: click a reason (or Enter/Right) to drill in, and use the path, Back, or Alt+Left to return; "Shown elsewhere" reasons jump to their explanation. Outline is a compact keyboard tree (arrow keys, Home/End, Expand all/Collapse all) that highlights the path to the selected line. Facts lists each distinct fact at the ends of the explanation once, with how often it appears; open one to see which conclusions it supports and Show in Focus. Rule logic shows the compiled candidate structure and loads further proving rules on demand through Explore proving rules. Find in report highlights matches in Focus, Outline and Facts and steps through them with Enter/Shift+Enter; it also matches the dates and values of temporal timelines. Oracle appends a temporal value's whole map to report sentences (for example "...({No, Yes from 01/01/2026, No from 01/01/9999})"); RulesCraft moves it out of the sentence (long inline maps become "{timeline, N points}") into a muted summary after the line and a Value over time section (in Focus with the conclusion, in Outline and Facts above the proving rule) holding the same table and date lookup as the inspector. When Oracle reports the line for a date range, the summary describes that range ("Relevant 2026-01-01–2026-01-31: Yes · timeline, 3 points") and the matching rows are tagged Relevant and never collapsed. Oracle substitutes each entity instance's identifying value (its debug name) into report text, for example "Waiver Care Facility#LTC:48563's benefit month is ..."; turn off Instance names in the toolbar to read the generic rule wording instead ("The budget's benefit month is ..."). Values stay as calculated, the switch is instant (no re-run), search follows the wording on screen, and the choice is remembered for new reports. The Proving rule panel shows the rule that concludes the selected attribute or relationship, laid out like its source document (Excel rule tables are drawn as the workbook displays each cell: its font, OPM style fill colour, alignment and wrapping, read from the saved workbook, falling back to the cell's named OPM style): in Focus it sits below the conclusion; in Outline and Facts it sits beside the list (above it in narrow tabs). It reads only the documents the compiled rulebase lists as concluding that item, so it usually appears in about a second without a full usage search. Like usage previews, it shows the whole rule, including or/both/any/either connector lines and commented-out lines; lines that Oracle's compilation cache leaves out are restored from the saved document when its rule text still matches. Full view lets a large rule fill the report tab without a height limit (Escape or Exit full view returns to the report). Open rule opens the source document at that rule, a notice warns when the document was saved after its rule cache was last refreshed, and Hide/Show collapses the panel. With Evidence values on (the default, remembered for new reports), each phrase in the proving rule that names an attribute or relationship from this explanation gets a value chip, such as true or $1,200.00; when several instances contribute (for example inside a function over incomes), the chip summarizes them ("3 values ▾") and opens a list of each instance's value (keyboard: Enter, arrow keys, Escape), and choosing a row jumps to that fact in the report. Values come from the decision report, not from re-evaluating the rule. When an item has several concluding rules, the one whose phrases match the most report evidence is listed first and marked Best evidence match; this is a ranking, not a claim about which rule fired, and the other rules are collapsed behind Show rule. Temporal evidence never collapses to one sampled value: the chip shows the series ("No → Yes · 2 points ▾") or its size ("Timeline · 25 points ▾") and opens the value's timeline, and when several instances contribute ("3 timelines ▾") it lists them first so you can open each one. When the rule tests a true/false phrase directly as a condition, its chip also shows whether the value meets that condition: the value is green when it does and red when it doesn't, on a white chip that stays readable over OPM level shading (hover for "Meets/Fails the condition"). This follows the rule's compiled logic, so a negative check such as "the person is not a resident" is met by false. Phrases inside comparisons or functions, conclusions, unknown or temporal values, and phrases where instances disagree are not colored; for several instances, the value list marks each instance individually. Turn Evidence values off to read the plain rule. Inputs and other unconcluded items say so instead. Rule text comes from the project's OPM rule caches (bin\<path under Rules>.xgen). Validating a saved document rewrites its cache, and Build OPM (including Rebuild & re-run) rewrites the caches of every document it compiles, just as compiling in Policy Modeling does; open reports then read their proving rules again. The source project is the inspector's usage project, or the single .xprj beside the rulebase's output folder; otherwise choose it once with Choose source project.... When the entity has several instances, ‹ › and the instance list at the top of a report switch it to another instance in the same tab, keeping your view and place (Alt+Up, Alt+Down, Alt+I). The list says where the value ≠ differs or = same value; Ctrl+click opens an instance beside the report.
Right-clicking a decision-report line (or pressing Shift+F10) opens a small actions menu rather than starting a search immediately. Choose Find attribute usage, or Override value... for an attribute with an exact instance identity. Override opens the existing typed editor in the session inspector for that instance; applying it re-runs the live session and marks its open reports out of date. Relationships can't be overridden from a report. Overrides are disabled on out-of-date reports until you update them, while usage search remains available when the inspector is open and idle.
Go to instance answers "which entity is this rule talking about?". A report line about a specific instance offers Go to instance: first in its menu: the session inspector comes forward on the Model view with that instance selected in the explorer and, for an attribute line, its attribute row focused. Relationship lines also offer Go to related: for each target instance (up to seven, then Go to related: all N... opens the full list). In the value lists of a proving rule's evidence (for example "1 true · 1 false" or "3 instances"), each instance row has a Go to button, and a single instance's timeline offers Go to instance. Navigation uses Oracle's exact engine instance names, never list positions or display names; lines without an exact identity offer no go-to, and out-of-date reports must be updated first. If the instance is no longer in the current run, the tab says so.
Review or edit input JSON, or Edit input JSON in an input attribute's details, also supports what-if changes. Loaded JSON is pretty-printed with two-space indentation for readability; it is not reformatted while you type. Editing inputs hides outdated model results until re-run; malformed inputs disable Run and show an error. Replacing edited session inputs or active overrides requires confirmation. Edits remain in memory and never overwrite the original JSON. Use Cancel to stop a run/report/usage search; errors remain visible.
Re-run after rule changes. When a rule document in this session's source project validates without errors, the inspector shows a banner naming the changed documents and offering Rebuild & re-run; validation itself never builds or re-runs anything. Accepting saves unsaved project documents (after confirmation; Rebuild Saved Files skips saving), builds the project with OPMBuild into output\<project>.zip, switches the inspector to that rulebase if you had picked another ZIP, and re-thinks the same inputs, case, and overrides in a fresh live session. Open decision reports are marked out of date, as after an override; Update report regenerates them with the new rules. If you run Build OPM yourself, sessions using that project or ZIP offer Re-run with new rules without building again. A failed or cancelled build leaves the session and banner unchanged; validation errors withdraw a document from the banner; Dismiss clears it. Overrides on instances that no longer exist fail explicitly; reset them and re-run.
See what changed. After an override, a reset, a same-input re-run or Rebuild & re-run, the status line summarises the net effect (for example "Override applied · 152 values changed in 24 instances · 20 instances added, 4 removed") and View changes opens the Changes tab beside Model. Changes starts from the cause: the value you overrode or reset, or, for a rebuild, the documents rebuilt and each rule whose compiled logic differs from the previous build (by its conclusion and document). Below it, entity chips show where the changes landed and filter the list; changes are grouped by entity and instance, each showing its old → new value, with unknown values marked. Oracle recalculates and recreates inferred instances on every re-run, so RulesCraft compares the models before and after: values recomputed to the same result are not listed, and recreated instances are matched by their entity, identifying (debug-name) value and containing instance, with a ? marker where two instances share an identity. Instances that genuinely appeared or disappeared are listed separately. Group: Attribute lists each changed attribute or relationship once, with the instances it changed in, so a change repeated across many people or budgets reads as one pattern. Each row shows the item's type icon; relationships sit under their own heading and show their list size (none, unknown or a count) with the members added or removed. Compare with: Since initial run shows how far the session has moved from the case as first run. Press Enter on a change for its decision report, or use the row menu (right-click, Shift+F10 or ⋯) for Show in Model and Find attribute usage. In Model, changed values have a gutter and their previous value, Show: Changed in last run filters to them, and F7 / Shift+F7 step through the changes. Comparisons stay in memory and reset when inputs, case or rulebase change.
Rule activity. The Rule activity tab shows which rules did the work in the last think, by what they conclude: each row names the attribute or relationship, its entity and rule document, a bar, the time in milliseconds, its share of the think, and how many times it was evaluated across all instances. Rank by Time or Evaluations, filter by text, or switch to Not evaluated for rules this case never needed. Timings come from Oracle's own profiler for that think only and vary between runs, so compare rules relative to each other; after an override or rebuild the figures cover the re-think, which re-evaluates rules broadly while Changes shows the actual impact. Press Enter to open the concluding rule in its document, or use the row menu for Find attribute usage.
Rule loops. Oracle repeats the rules of a rule loop (rules that depend on each other in a circle) until a pass changes nothing. The Loops tab lists the rulebase's loops, with each one's size. Record runs the case again in a separate Oracle session, with the same inputs and overrides; your session is unchanged. Choose First N passes to watch a loop from its start, or Last N passes before the pass limit for a loop that never settles. Anything shortened to fit, such as an attribute name in the Map or a drop-down, shows in full when you hover over it.
Loop guard. A loop that never stabilises fails the run in OPM, can take long enough to time out, or can make OPM run out of memory. The Loop guard panel under Run case decides what happens instead. Its summary line always says what a run will do, for example Loop limit: 3,000 passes (Oracle's default) · fails like OPM · records the last 50; ◆ Guard on shows when you've changed it.
- Stop any rule loop after N passes. Oracle's default is 3,000. A lower limit stops a runaway loop sooner.
- When a loop reaches the limit: Fail the run, like OPM (the default: no results are shown), or Stop the loop and show partial results.
- Record the last N passes (50 by default) of a loop that reaches the limit, in the same run. Its banner then offers Open loop N straight away, with no second run to the limit.
- Make these the defaults for this project keeps the guard in VS Code (never in project files); the defaults come from the
opaCraft.loopGuard.* settings.
- A loop still running at 85% of the run's time limit (
opaCraft.buildTimeoutMs) is stopped too, so the session isn't closed.
When a loop fails the run, the banner names it and offers Open loop N, Show partial results anyway (one run that keeps partial results) and Dismiss. After a runaway, the next run of the same build suggests Turn on loop guard (300 passes); it is never turned on without you.
Partial results are always marked, never only by colour:
- A ⏸ Partial results pill (dashed) names the stopped loop and its pass.
- Values the stopped loop concludes are tagged ⏸ Not final: they are where it stopped, not results.
- Values the rules could derive from them are tagged ◌ May be affected. RulesCraft works this out from the rules, not from the run, so it can mark values that weren't actually affected. When it can't tell (the loop creates instances or concludes relationships), every inferred value is marked.
- The same tags appear in Changes and decision reports; reports from a partial run say so at the top; Show > Not final / may be affected lists them.
If the run takes too long or Oracle runs out of memory, RulesCraft closes the Oracle session but keeps your inputs and overrides, and re-applies them on the next run. The banner offers Run with a loop guard of 300 passes, and Change the time limit… or Change the memory limit…. The memory limit is opaCraft.sessionMaxHeapMb (empty means Java's default, a quarter of the computer's memory).
Open loop opens the loop in its own editor tab:
- The header says whether it stabilised (and after how many passes), didn't stabilise (Oracle stopped it at its limit), or was still changing when the recording stopped.
- The stepper moves through the recorded passes: ◀ ▶, the pass number, or the strip of bars, one per pass, with its height showing how many values changed. ◆ marks where values start repeating, ✕ Oracle's stop and ✓ the pass that changed nothing.
- Values lists every value that changed in the loop, with its status (↻ ×2 from pass 48 for a value that repeats every 2 passes, Unsettled, or Settled @ 6), its value when recording started, the passes around the current one, and its final value. Changed values are marked Δ, and unchanged ones show ″. Drag a column's right edge to make it wider or narrower (arrow keys work too; double-click resets). The pass columns share one width, and the widths are kept for every loop.
- Rules lists the loop's rules in Oracle's order, with what each changed in the pass, Open rule and Find usage. Values and Rules can both show Only this round trip. The Values tab's Changed this iteration and Repeating & unsettled filters show what changed in a pass and what repeats.
- Why (Enter on a value or a change) shows what Oracle recorded as the reasons for a change, with the values as Oracle saw them in that pass. Focus lists the reasons one per line: a reason that changed in the loop opens its own Why, and the trail of reasons you followed stays at the top. Outline shows Oracle's whole tree, where ↶ from pass N and ↶ set earlier in this pass follow a reason to where it was set. Follow back follows the reason that changed in the loop, step by step, until it reaches a value set before the recording, a value from outside the loop, or the same value again (the cycle). When two reasons changed, it stops and asks which to follow. Back and Forward (Alt+Left, Alt+Right) retrace your steps. The Why pane also offers Open rule, Show in Model, Explain value for the live run, Find attribute usage, Watch and Hold…. Under them, Values by pass shows every instance of the attribute at the start, in the passes around the current one and at the end; choose an instance or a pass number to move there, or click a value for both.
- Run to jumps to the next pass that meets up to 3 conditions, such as "the count becomes 0", "the pass changes fewer than 10 values" or "this feedback link changes". Matches are marked under the strip.
- Watch (W) pins up to 6 values as lanes under the stepper, lined up with the strip pass for pass: a line for numbers, filled or outlined blocks for true or false, and a mark at each change for other values. ▷ Play (P) steps through the passes at the speed beside it, from 1 pass every 10 seconds to 25 a second (remembered), and stops at the end, at a Run-to match, or when a watched value marked ◉ changes.
- The loop tab opens on the Map. It starts with what the loop did and which fed-back values changed last, then lists every fed-back value with its links (▸ or the right arrow key opens them). ● means the value changed in the current pass, ○ that it didn't, and ◌ that the recording has nothing on it. Selecting a value, link or rule shows it in the Focus strip and carries across the tabs. M goes to the Map and keeps the focus; Esc clears it. The Focus strip and each round-trip step show the values in the current pass, before → after where they changed. Drag the dividers to resize the summary, the list, the diagram and the Map (arrow keys work too; double-click resets). Selecting an attribute anywhere in the tab, including a Map step or diagram box, opens its Why. To debug a value at one pass, select it and step through the passes, or use the pass numbers at the top of Why: the panel follows. Show in Model and Explain value (final) leave the loop for the session.
- The Map's list is wiring: every row is a connection, whether or not it was active. Rows are grouped by what each did in this recording: ≈ In the repeating cycle or ≈ Last to settle, Downstream, Fed in once, Start-up only, Steady input, Changed, no effect, Never changed and Can't tell (a relationship Oracle kept no record of). Relationships count like any value: Oracle records when they change, but not why, so Why points to the rule. ≈ means inferred from the recording: only Hold… shows what drives a loop.
- Whole loop draws every rule up to 24 rules. On a larger loop it lists the links between entities, those with changes first; select one to filter the wiring list to it (Esc or × Clear filter clears it).
- Map shows the loop's rules in Oracle's order. A link above the line means a rule reads what an earlier rule concluded. A dashed feedback link below the line means a rule uses a value that a later rule (or itself) concludes: these are why Oracle runs the loop again. Links whose value changed in the current pass are drawn thicker and labelled. Small loops are drawn whole. Larger ones show the cycles through the selected value, up to 5 (one per back edge, ◀ ▶ to step through them), or the cycle round the selected back edge; the chain from Follow back is marked on it. Keeping the loop going lists the back edges that carried changes into the last passes, and the full list can be searched and sorted.
- Hold… (H) is an experiment. It records the case again, in a separate Oracle session, with one or more values held fixed from the start: at their value in a pass, at another recorded value, or at a value you type. The result says whether the loop then settled, and RulesCraft compares it with the original. A value of an instance the rules create can only be set once it exists, so Oracle runs the case, sets it, and runs it again; the result says so. Instances the rules create are found by their identifying value, and RulesCraft refuses to hold or compare a value when two instances share it. Experiments keeps the last 8, with Run again, Edit and run…, Pin and Override in session…, which opens the inspector's override editor without applying anything.
- Compare (C) shows another recording of the loop beside this one: an experiment, another run of the loop in this recording, or the recording made before the last re-record. B's changes hang below the strip, each pass cell shows B's value underneath (= or ≠), and a Compare column says when each value first differed.
- Explain iterations (rule loop N), in the menus of the inspector's values, its Changes list, its Rule activity rows and decision report lines, opens the loop that concludes a value, on that value. Those values are tagged ↻ loop N once RulesCraft has read the rulebase's loops (after each run). If the loops aren't recorded yet, it records the first 50 passes first.
Keyboard:
- ] and [ move to the next or previous pass.
- Ctrl+] and Ctrl+[ move to the selected value's next or previous change.
- F7 and Shift+F7 step through every change.
- F8 and Shift+F8 (or Alt+] and Alt+[) move to the next or previous Run-to match. R opens Run to.
- G jumps to a pass number.
- P plays or pauses, W watches, H holds, C compares and M shows the Map for the selected value.
- In the Why pane: F and O switch between Focus and Outline, and Shift+B follows back.
- 1 to 6 switch views.
- Arrow keys move around the Values grid.
Oracle records a loop from the end of its first pass, so pass 1 itself isn't shown. When you re-run the case, an open loop tab is marked as an earlier run, and Re-record records it again with the same settings. Companion extensions that read RulesCraft's debug sessions also see each open loop tab's loop, pass, selected value and experiments.
This is a session inspector, not a rule breakpoint/single-step debugger. Each inspector keeps one local Java process and a live Oracle session: overrides, same-input re-runs, and decision reports use that session. Changing inputs or cases creates a new session; changing the compiled ZIP requires a fresh run, or Rebuild & re-run, which keeps inputs, case, overrides, and open reports. A rebuilt or newly picked ZIP is loaded into the running Java process rather than restarting it, which roughly halves the time to re-run after a rebuild on large rulebases. Cancellation, timeout, or helper failure stops the process; run the inputs again to start a new session without the discarded overrides. Closing the inspector stops its process. All model attributes are evaluated, not just the input file's requested outcomes. Decision reports expand each attribute/instance/temporal-context explanation only once; later occurrences are marked "Shown elsewhere" without repeating the subtree. Different instances and temporal contexts remain distinct. Generation and display retain safety limits of 100,000 Oracle traversal steps, 20,000 displayed lines and 100 levels; the traversal visits hidden, silent and already-explained items too, so it needs several times more steps than the lines shown. Large real rulebases stay well within these limits (their widest conclusions need about 25,000 steps and 7,600 lines and generate in under a second), so the Truncated notice appears only for genuinely oversized reports, which then show completed reasons and an explicit partial-report notice instead of failing the entire session. Report generation uses Oracle's traversal callbacks and its internal text-formatting reporter (verified with OPM 26B); incompatible Oracle versions produce an explicit error. Unknown relationships show their known targets, not an assumed complete list. The selected compiled ZIP may be older than source edits; no automatic build occurs. External services, connectors, decision-service dependencies, and custom Java extensions are not configured by this version; related Oracle errors remain explicit. Case data stays local, temporary request/results are removed after each operation, and closing the panel discards its in-memory data.
Decision reports offer Show rule tags beside Instance names. It starts off and remembers your choice for new reports. In Focus, Outline and Facts it shows the tags Oracle attached to each line, without changing rules or rerunning the case. Long tags wrap and remain readable; lines without tags have no annotation. Grouped Facts show only tags shared by every occurrence, with differing tags alongside their expanded occurrence paths. The option is disabled in Rule logic and Explain.
Viewing project inclusions
Open the consuming project's .xprj dashboard and select Inclusions. Each card shows the inclusion's name, baseline version, recorded Hub URL and update timestamp when present. Local imports are labelled offline provenance; the placeholder URL is not contacted, and the original source project's path is not stored in this metadata. Existing Hub references are shown as recorded, not independently verified. The view reads project XML only: it does not inspect inclusion packages, build rules or check for newer versions.
Refresh rereads the open project's XML; changes made in its text editor update the list automatically. Unsaved XML is clearly labelled, and malformed or ambiguous metadata produces an error rather than an empty list. Import project as inclusion... starts the existing verified-copy import workflow for this exact consuming project; save the XML and trust the workspace first. After importing, open the exported consuming-project copy to see the inclusion. The original project remains unchanged.
Data model editor
Open it with Open data model on the project dashboard or RulesCraft: Open Data Model. RulesCraft loads the model with Oracle Policy Modeling's own .NET model API on a copy of the project (about 10 seconds for a large project), so it lists every entity and attribute the rules know about, whether or not it is in projectDataModel.xml yet.
- Explore. The left pane has health lenses (Unlinked: used, never set, the project-wide version of the rule documents' link check: attributes rules use that no rule proves and nothing names, leaving out entity identifiers; inputs without a public name, unproven data model attributes without one (attributes a rule proves need no public name), attributes with several parses, unused attributes, attributes only in rule text, pending changes) and the entity tree. Click an entity's chevron, or press → and ←, to expand or collapse the entities it contains; a collapsed entity shows how many are hidden, and Expand all and Collapse all sit beside the Entities heading. A lens and an entity narrow the list together, shown as removable chips. Search matches attributes, public names and relationships (their text in both directions, public names and entities), even with no entity selected, and matches each word in any order, ignoring case and apostrophes: "expected code" finds "the budget's expected role code". Long lists show 300 rows at a time. Drag the edge of the left pane to widen it (or focus it and use the arrow keys); double-click resets it, and the width is remembered.
- Public names. Click + Add public name on a row, press Enter or F2, or use the inspector. Hovering or selecting an unnamed row shows a suggested name (the sentence without "the" and the entity's possessive, in camelCase, never one the entity already uses); Enter accepts it and moves to the next unnamed row. Oracle decides which names are valid: each name you type is checked with Oracle's own rule, and names already in the project are never flagged.
- Data types. Click a row's type icon or press T to override the type the rules decide. Oracle checks every rule that concludes or tests the attribute when you review the changes.
- Parses. Oracle's parser can read a true/false sentence in several ways, depending on which words it takes as the verb: "the budget should determine share of cost based on family size" can be read with should determine, share, cost or based as the verb. The inspector's Parse dropdown lists every reading, led by the negative sentence it produces with the inserted words marked, plus its verb and question. Oracle's suggested reading and the saved one are tagged. Press 1–9 on a row to choose directly. The Attributes with several parses lens lists every attribute with more than one reading.
- Wording. The inspector shows Oracle's generated question, statement, negative and uncertain or unknown forms. Override replaces one form with your own text; Reset to generated removes the override.
- Copy text. Press Ctrl+C on an attribute or relationship row to copy its text, ready to use in a rule document; the Details pane also has a Copy button for the attribute and, for true/false attributes, for each wording form (statement, negative, question). RulesCraft confirms each copy in the status bar once the text is on the clipboard. Ctrl+C on selected text or in a text field copies as usual.
- Relationship names. Relationship rows (shown under an entity, or by a search) can be selected. Press Enter or F2, or click the names, to set the public names of both directions; Enter keeps them and Esc cancels. Renames go through Review & Save like attribute edits. A relationship that exists only in rule text (Rules only) can't be named here; add it to the data model in OPM first.
- Relationship types. Select a relationship and use Relationship type in Details, or press T on its row. Choose one-to-one, one-to-many, many-to-one or many-to-many, shown in the source-to-target direction. The change stays pending until Review & Save, where Oracle validates it and the previous model is backed up. Revert to saved relationship type or Discard cancels the pending change. Containment allows one or many children per parent, but never multiple parents per child; Global has only one instance. Relationships that exist only in rule text cannot be edited here. Cardinality changes can affect rules and integrations: rebuild and test your cases afterward.
- Row menu. Right-click an attribute row (or press Shift+F10 or the Menu key) for Copy attribute text, Find attribute usage and Delete attribute; relationship rows offer Copy relationship text. Text boxes keep VS Code's usual Cut, Copy and Paste.
- Delete attribute. Deleting removes the attribute from
projectDataModel.xml when you Review & Save; until then the row is struck through and Undo (in the message) or Restore (in Details) brings it back. If rules still use it, it stays in the rulebase as rule text only, without its public name or data type. Deleting an attribute that has a public name asks you to confirm, like a rename, because input files or integrations may use the name. Attributes that come only from rule text have nothing to delete, and an entity's identifying attribute can't be deleted. Oracle's own delete does the work, on a copy, and the save checks that only the deleted attributes disappeared.
- New attributes and relationships. + New attribute declares an attribute no rule uses yet: pick the entity, finish the sentence, and Oracle's parser shows how it reads, offering every parse when there are several. + New relationship connects two entities, set as two sentences ("Each person has one/many budgets"), with text and a public name for each direction.
- New entities. + New entity creates an entity under an existing declared parent (including one brought in by an inclusion). Enter the entity text, containment text from parent to children, reverse text, and a text identifier, with optional public names. For example: “the form” under Vehicle, “the vehicle forms”, “the form's vehicle”, and “the form code”. Creation is pending until Review & Save; Oracle validates it on a copy and the save changes only
projectDataModel.xml, with backup. Save/reload before adding attributes or children to the new entity. Entity renaming/deletion and changing an existing identifier remain unsupported.
- Review & Save. Every change is pending until you save. Review & Save lists them (Add, Change, Parse, Wording), then runs Oracle's full validation on a fresh copy of the project with the changes applied and confirms that
projectDataModel.xml has not changed on disk since it was loaded. Problems the project already had are not counted. Renaming a public name that is already in use asks for confirmation. Save applies the changes through Oracle's model API on another copy, checks that Oracle changed only the edited entities, attributes and relationships in the file, keeps a backup of the previous file outside the project, then replaces projectDataModel.xml. Compare with backup opens the two in VS Code's diff view and Build OPM builds with the new model. Reload reloads the model and keeps pending changes, matched by entity and sentence. Discard drops them.
The editor adapts when its tab is narrower, for example beside another editor or on a laptop. The public name always stays visible. When there is less room, the lenses and entities move into a drawer opened with ☰ Entities, which shows the current lens or entity. The Data model and Rules columns move into Details, with ⋯ in the header pointing there. On narrow tabs, Details sits under the list with a one-line summary of the selected attribute and can be collapsed, and each row shows the public name and role on a second line. Press I on a row to go straight to its public name in Details.
Press ? for keyboard shortcuts. Closing the editor discards unsaved changes.
Important alpha limitations
Experimental TypeScript compiler comparison
Enable RulesCraft: Native Compiler Comparison (opaCraft.nativeCompilerComparison) to run the experimental TypeScript compiler alongside Oracle during Build OPM and WordCraft/GridCraft validation. It is off by default. Oracle remains authoritative for errors, save decisions, rulebase ZIPs and rule caches; native output is never published.
Build comparison appears in RulesCraft output. Editor validation opens RulesCraft Native Compiler output with the native result and exact document/paragraph diagnostics. Comparison uses clean project snapshots instead of the warm Oracle helper, so it may be slower. Native validation examines the whole saved project, with the document being validated replaced by its current editor bytes; other unsaved documents are not included.
The native subset is en-US/UTC, Global-only DOCX rules using declared public Boolean/text/number attributes. It supports conditional Boolean conclusions, text/number assignments (attribute = expression with optional if), nested conditions, comparisons (=, <>, <, <=, >, >=) and arithmetic (+, -, *, /, parentheses and unary minus). Conditional number/text assignments use Oracle's verified default of zero/empty text when the condition is false. Verified simple-present singular be/have Boolean wording metadata is supported; custom sentence overrides and other unverified forms remain explicit blockers.
Rule-introduced Global attributes are also supported for ordinary the person is/has ... if conclusions and the person's ... = expression assignments. The compiler discovers conclusions across all documents before compiling rules, so a later document can supply a referenced attribute. Number/text types must resolve from supported literals or typed references/arithmetic; conflicting types, unanchored reference cycles, and undeclared inputs are refused. These attributes have internal identities, not invented public input names. Empty declared models can compile when the rules supply resolved conclusions. Broader wording, condition-only implicit attributes and new table-only attributes are not yet supported.
Automatic declared types (type="auto" in OPM's model) now resolve to Boolean, Number or Text from supported whole-project assignments, comparisons, Boolean conditions, and ordered table values/conditions. Constraints flow in both directions through references, including inputs used only in conditions. Public names are preserved; no model files are rewritten. Automatic Boolean declarations now accept the verified singular simple-present be/have parse forms when they exactly reconstruct the declared sentence, including negative-only conditions and Oracle's parsed question/negative/report wording. Parse metadata alone does not assign a default type. Unused or ambiguous automatic attributes, conflicting uses, other parse forms and other data types prevent native output. Oracle's generic report wording for automatic Booleans without stored parse metadata is unchanged.
Conditional Word rule tables can now conclude a declared Global number/text attribute using ordered value/condition rows and an explicit final otherwise value. Use the standard two-column table with a merged conclusion header (WordCraft's Add Rule Table starter), existing OPM styles, and nested condition paragraphs. Overlapping true conditions use the first matching row, with unknown/uncertain behavior checked against Oracle. Standalone otherwise paragraphs and separate rules repeatedly concluding the same attribute remain errors, not last-rule-wins assignments. Boolean table conclusions, legends, nested tables, vertical merges and other unverified layouts remain unsupported. Native metadata records table/row/cell/paragraph source identities.
Compatibility diagnostics are grouped by category and document, with paragraph locations. XLSX, inclusions, additional entities and unsupported rule/model constructs are reported explicitly, not skipped. A compiled structure match compares attribute types and identity-normalized rule expressions; it does not prove execution or policy equivalence. No case results are compared automatically.
- Save/validate from the dashboard includes only open WordCraft/GridCraft documents inside that project's folder, not every rule document.
- The attribute link check covers attributes, not relationships. It never changes the document or the project. GridCraft shows findings as a list without the Data model, Not a bug or Show all links actions.
- Attribute usage search reads the project's
bin XGEN rule cache. Validating a saved document refreshes its cache, and Build OPM refreshes the caches of every document it compiles, just as compiling in Policy Modeling does. Unsaved edits are not reflected until saved and validated or built.
- With Oracle Build Path configured, usage search loads Oracle's dependency model on an isolated project snapshot, then reconstructs previews only for candidate documents. Oracle DLLs are resolved beside the configured
OPMBuild.exe; no separate dependency path or Java installation is needed. This currently uses internal Oracle 26B APIs and reports incompatible installations explicitly. The snapshot protects project files from Oracle's implicit metadata writes. Without a configured compiler path, search reports that it used the slower full-cache scan.
- Faster searches, validation and builds (on by default). RulesCraft keeps the project loaded in a background Oracle process (
opaCraft.oracleHost). Usage searches (including those from the session inspector), Validate Document (also from the project's Save all and validate) and Build OPM (including the session debugger's Rebuild & re-run) use that process, so a rebuild recompiles only the rule documents you changed instead of running a full OPMBuild.exe build in a fresh copy of the project. Turn the setting off to go back to a full build and a fresh project snapshot each time. A value you set for the earlier opaCraft.experimental.oracleHost still applies until you set opaCraft.oracleHost. The process starts loading the project in the background as soon as you open one of its rule documents or its project page, which takes about 10 seconds for a project of about 270 rule documents; anything you run meanwhile waits for it. After that, an attribute or session-item search takes about a second or less, a validation a fraction of a second, and a build about a second, or a few seconds after a rule document changed. Through this process, results come from caches Oracle compiles from your saved documents in a private temporary copy of the project, not from the project's bin folder, so they include saved edits you have not validated or built. A build saves the rulebase and refreshes the caches in bin as a normal build does, and its Problems point at the rule document, with the paragraph or cell, where Oracle reports one. The process needs roughly half a gigabyte of memory for a project of about 270 rule documents, stops after 20 idle minutes or when VS Code closes, and deletes its copy when it stops. Apart from a build's rulebase and caches, it never writes to your project.
- Usage identities include the entity's canonical reference or declared name plus the attribute's base text. Numeric model IDs and document-local attribute IDs are not used to join attributes across documents. Oracle's escaped source control characters are preserved when reading caches; DTDs and external XML entities remain disabled.
- Previews reconstruct cached rule formatting; they are not exact reproductions of all Word/Excel layout features. Word previews render on a document page using the source DOCX's own paragraph styles (fonts, sizes, indents, OPM level shading), rebuild rule tables from cached cell positions, and underline the matched attribute.
styles.xml is read without modifying the document; if it cannot be read, the standard OPM template styles are used. Direct (non-style) formatting and table column widths are approximated.
- Existing OPM styles are required; arbitrary Office features and complete round-trip fidelity are not guaranteed.
- In WordCraft, Ctrl+C, Ctrl+X and Ctrl+V use the system clipboard, so you can paste text copied in other programs. The ribbon's and the right-click menu's Paste, Ctrl+Shift+V and Paste Special (Ctrl+Alt+V) can't read the system clipboard yet and paste only text you copied in WordCraft.
- Copying from Microsoft Word and pressing Ctrl+V in WordCraft keeps tables (including merged cells), bold and other formatting. Paragraphs keep their Word style when the document has a paragraph style of the same name, so rule tables come across with their OPM conclusion and condition styles. Paragraphs in a style the document doesn't have keep Word's formatting instead; the status bar says which styles those were. Copies from other programs still paste as plain text.
- After an OPM Alt shortcut (Alt+C, Alt+B, Alt+Z...), the next key you type goes into the document; WordCraft's ribbon key tips no longer open and swallow it.
- Ctrl+Shift+P opens VS Code's Command Palette from WordCraft and GridCraft. The embedded editors keep most other keys for themselves, so this key no longer opens WordCraft's Font Size; use the font size box on the ribbon instead.
- In GridCraft, Ctrl+V pastes what is on the system clipboard, including text copied in other programs (VS Code reads the clipboard for the workbook). The ribbon's and the right-click menu's Paste, Ctrl+Shift+V and Paste Special (Ctrl+Alt+V) still paste only what you copied in GridCraft. Pausing while you type in a cell no longer ends the edit when VS Code saves its recovery backup.
- GridCraft's native Format Painter destination interaction is not wired up; use Paste Special > Formats instead.
- Settings retain their original
opaCraft.* identifiers. Use Workspace scope for project-specific configuration.
- The data model editor writes only
projectDataModel.xml, and only on Save. It does not yet edit default values, validation, value lists or silent/invisible flags, rename/delete entities, or delete relationships. Find usage in Details opens the usage list for the selected attribute, as in rule documents.
- The project dashboard does not rewrite
.xprj XML. Use Open project XML or Reopen Editor With... > Text Editor for direct edits.
Graphics troubleshooting
WordCraft needs a usable WebGPU or WebGL2 device inside VS Code. A graphics driver reset, remote-desktop setup, acceleration settings, or context exhaustion can interrupt an editor even when just one document is open.
If graphics fail before the document loads, use Retry editor or Try WebGL2 in the error panel. For a persistent alternative, set opaCraft.wordRenderer to webgl in Workspace settings, then close and reopen WordCraft. The default auto retains automatic backend selection. Changing the setting does not reload open documents.
If the graphics context is lost during editing, try Save / Ctrl+S and wait for confirmation before closing or restarting. RulesCraft does not automatically reload the editor or discard edits; saving/recovery may not be possible after a GPU failure. Keep independent backups. Diagnostic details appear under View > Output > RulesCraft Graphics. Do not disable hardware acceleration as a blanket fix: the embedded editor still needs a working graphics backend.
Credits
RulesCraft embeds patched WordCraft 0.15.0 and GridCraft 0.16.0 runtimes. Their MIT and Apache-2.0 license files are included in the runtime archives. Bundled dependency notices are provided in THIRD-PARTY-NOTICES.txt.
RulesCraft is an independent proof of concept by sagasys technology group. It is not affiliated with or endorsed by Oracle or the upstream editor projects.
| |