Interactive Form & Process Decision Router
Objective
Turn multi-rule office policies (purchasing, travel, IT access, facilities) into a clean, clickable 3-question single-file HTML helper (preview live in Claude Artifacts or Gemini Canvas, or save as form-helper.html and double-click in Chrome or Edge) after proving every edge case in a Truth Table first.
Logic & Truth-Table Rules
- Build a Complete Truth Table Before Writing Code: Map every combination of user choices (
Category x Condition / Dollar Tier x Special Rule -> Exact Form, Approver(s), and Turnaround) in a plain table first. - Catch Boundary & Edge-Case Gaps: Explicitly test exact tier cutoff numbers (such as an exact dollar threshold where two rules meet) and combined conditions (such as an add-on form that applies across every tier, or a non-urgent request submitted after business hours). Flag any ambiguous policy boundary as
[Confirm Boundary with Policy Owner]. - Never Guess Missing Forms or Phone Extensions: Only cite form IDs, approvers, and hotline extensions stated in the source policy.
- Resettable, Accessible 3-Question Layout: Keep the interactive helper uncluttered (max 3 clicks to an answer, visible Start Over button, plain-English result card showing exact Form ID, Required Attachments, Approvers, Turnaround Timeline, and Policy Citation).
Step 1: Truth Table & Edge-Case Audit
Inspect the pasted routing policy and output:
- A complete Truth Table listing every valid path and exact output (
Form,Attachments,Approvers,Timeline) - Every boundary overlap or missing edge case flagged clearly (such as exact threshold amounts, stacked rules that apply across tiers, and after-hours vs. business-hours gaps)
STOP after Step 1 and ask the user to confirm how each boundary edge case should route before generating the clickable HTML helper in Step 2.
Step 2: Single-File Interactive HTML Decision Helper & Self-Check Loop
Before presenting the finished HTML helper and test script, run an internal self-check pass and fix any gap yourself:
- Trace every rule branch in the page logic line-by-line against the approved Step 1 Truth Table (checking exact
<vs.<=cutoff boundaries). - Verify stacked add-on rules (such as an extra attachment or form required across tiers) trigger on every applicable tier rather than only one branch.
- Verify non-urgent or after-hours requests follow the exact routine vs. urgent routing rules in the Truth Table, and confirm the Start Over button resets all selections cleanly.
Generate one clean, self-contained HTML file featuring:
- Step-by-step 3-question clickable cards (Category -> Detail/Amount -> Special Trigger like New Vendor or Urgency)
- Clear Result Card showing: Use This Form, Attach These Items, Who Approves, Expected Turnaround, and Policy Section
- A
"Start Over"button plus a collapsible"View Full Policy Rules"reference table at the bottom
Step 3: 5-Scenario Test Script
Provide 5 tricky test cases (including boundary numbers and combined rules) the user must click through by hand to prove the interactive helper routes every scenario accurately.
Optional Tool & Connector Handoff (Agent / Cowork Mode)
- If running inside an approved agent workspace with a SharePoint, Microsoft Forms, or Power Apps Connector (App Keycard), link the verified Result Cards to official internal form URLs and flag the Policy Owner whenever the source routing SOP changes.
- If the organization runs several intake routers (HR, IT, Travel, Purchasing), offer to pair with
skill-packagerto save the Truth Table and Result Card layout into a custom teamSKILL.md.
Step 4: Manual Verification Checklist
- Click through all 5 boundary test cases in a desktop browser and confirm every result matches the Truth Table
- Confirm any stacked add-on rule triggers across all applicable tiers
- Verify the policy owner's name and Last Verified date appear in the footer before sharing internally