Rules
Every rule is one sentence
When something happens, if it passes, up to a limit, do this. Type it in the dashboard or ask your agent. Lurk shows you what Habitly would have paid last month before anyone earns a thing.
Build a ruleOnly a person on your team takes a rule live.
Preview resultOn the last 30 days: 412 users would have earned 12,360 Points.
Change somethingGo liveOnly an owner or admin
The four parts of a rule
Any trigger, any condition, any limit, any action. New integrations add new parts, and the sentence stays the same.
- When
Something happens
- An event arrives: checkin.done
- A user starts a trade
- A user uses a unit
- A unit reaches a number: Streak reaches 7
- A user joins an audience
- A time comes: every Monday 09:00
- If
It passes the checks
- A property matches: plan is pro
- They're in an audience: Returning users
- They hold a unit: the Consistent badge
- They have a balance: 500+ Points
- Some are left: Streak freezes
- Inside a window: weekdays 06:00–10:00
- Limit
Up to a point
- Once ever, per user
- So many per period: 3 a day
- Once per thing: once per friend
- A budget: 5,000 Points a week
- First come: the first 100 users
- Do
Something changes
- Add to a unit: +10 Points, the Consistent badge
- Take from a unit: −200 Points
- Set a unit: Streak to 0
- Set a property: plan = pro
- Tell someone: a webhook, an email, a push
Build a rule
Pick a part for each clause. The sentence and the preview change with you.
Morning early bonusPreview
Whena user checks inIfbefore 10:00Limit3 a dayDogive 10 Points
On the last 30 days, 1,104 users would have earned 95,855 Points.
A preview only reads past events. Nobody earns until it's live.
Happy with it? Make it yours, either way.
A rule's life
Draft, preview, live. Pause any time.
Every rule starts as a draft and runs on sample events and your last 30 days before it goes live. Your team and your agent draft and preview. Only an owner or admin says yes.
- Preview runs on scenarios and real past events, and nobody earns
- Pause for a day; Activity keeps every skipped event
- Needs attention when a rule can't deliver, with the reason
Lurky wrote it from “Give 10 Points for every check-in”.
Points given each day, Sep 30 to Oct 8.
Limits, skips and undo
Every rule leaves a receipt
When a rule acts, there's a receipt. When it doesn't, there's a skip with the reason. Mistakes get undone with a new receipt that reverses the old one, so the history always adds up.
- Limits per user, per thing, per period, or a budget for everyone
- Open “Why” on any line for each check, passed or failed
- Activity is never edited or deleted
- Maya checked in at 07:52 Before 10:00 ✓ · 1 of 3 used today ✓+10
- Maya checked in a fourth time Limit 3 per user per day: 3 of 3 usedSkipped
- Jake checked in at 11:40 Before 10:00 ✗ · it was 11:40Skipped
- Leo got Weekend double by mistake Rule was meant for Returning users only+20
- Rachel undid Leo's Weekend double A new receipt that reverses the old one. Nothing was deleted.−20
Combine rules into levels, seasons and tiers
Rules listen to each other's results, so a few simple sentences add up to levels, seasons and tiers.
Rules that chain
“When Streak reaches 7, give the Consistent badge.” A unit reaching a number is a trigger, so one rule's change starts the next.
Budgets
Cap a rule at 5,000 Points a week across everyone. When the budget runs out, Lurk skips with a reason.
Audiences in If
Returning users, Lapsing, Pro plan, Beta testers. Groups that keep themselves up to date.
Time windows
Happy hours, weekday mornings, a weekend double. Each user's own time zone.
Trades are rules too
A trade is a rule a user starts: take 200 Points, give a Streak freeze. A store is a set of them.
See points and perksTell someone
A webhook to your server, an email, a push to the user. Lurk mirrors roles out to your integrations by itself.
Example rules
A few sentences from the example products in our docs. If you can say it like this, Lurk runs it.
Habitlyhabit app
When a user checks in before 10:00 3 days in a row, give 30 Points and the Consistent badge, once a week.
Night Marketcommunity
When a user answers in #help and it's marked solved, give 20 Kudos, up to 100 Kudos a day.
Pixel Harborgame
When a player's XP reaches 100 + 20 × level, add 1 Level and set XP back to 0.
LoopSaaS
When a team finishes any 3 of 5 setup steps, give 200 Credits and the Launched badge, once per team.
Habitlystore
When a user starts the Streak freeze trade and Freezes are left, take 200 Points and give a Streak freeze.
Habitlyreferral
When a referred friend finishes their first week, give 100 Points to both of them, once per friend.
Night Marketcommunity
When a user posts after midnight 7 nights in a row, give the Night owl role. Discord shows it as @Night owl.
Sam's channelstream
When a viewer in Lapsing watches a stream, give 50 Hearts and a Summer draw ticket, once ever.
Pixel Harborgame
When a player wins 3 matches in a row, give 50 Coins and the Hot streak badge, once a day.
What rules change, and who writes them
Rules move units, views read the receipts, and your agent drafts the next one.
Questions people ask
Do I need to write code to make a rule?
No. Type the sentence in the dashboard, ask Lurky, or pick a template. Your agent writes the same rule over MCP, and developers send it as JSON to the API.
What does preview actually do?
It runs the rule on sample scenarios and on your real events from the last 30 days, then tells you who would have earned what. Nobody earns anything in a preview.
Can my agent take a rule live?
No. Agents and API keys draft and preview. Going live needs a yes from an owner or admin on your team, and you choose which.
What happens if a rule gives too much?
Pause it in one click, then undo the receipts you don't want. Each undo is a new receipt that reverses the old one, and a limit or a budget stops it happening again.
Write your first rule
Write your first rule in a sentence, preview it on last month, and take it live when you're happy.