Rulewise
v0.1.0Warns developers which Sri Lankan laws apply to what they build.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
check_legal_risks
Check a planned or new feature for legal risks. Call this whenever the user plans or builds a feature for a product used in Sri Lanka, or made by a Sri Lankan company or person, even if they didn't ask about law. If the user hasn't said where the users or company are, ask them first; never guess the country. Send country codes and facts from get_fact_questions only (no idea text, no code). Returns warnings with severity (Must / Should / Check with a lawyer), the law and section, what to do, and the areas NOT covered.
| Parameter | Type | Description |
|---|---|---|
facts * | List of the facts that are true, from get_fact_questions | |
users_in * | ISO country codes where users are, as the user said, e.g. ['LK'] | |
company_in | ISO country code where the company (or maker) is, e.g. 'LK' | |
done | rule_id values of warnings the user says are already handled. Only when the user says so; they are listed as 'done', not verified. | |
processing_in | ISO country codes where data is stored or processed |
get_fact_questions
List the facts check_legal_risks understands, grouped, each with the question it answers. Call once before check_legal_risks.
get_rule
Get one rule in full, including the exact quote from the law and its official source link. Use it to show proof for a warning.
| Parameter | Type | Description |
|---|---|---|
rule_id * | string | rule_id from a check_legal_risks warning |
get_checklist
Get a law checklist for the product, for example the PDPA 2027 checklist: the rules of that law that apply to these facts, each with what to look for in the code (look_for) or ask the user (ask). Use it when the user asks whether their project is ready for the PDPA. Send country codes and facts only. Mark each item Found (with file and line), Missing or Can't tell from code; never give a score.
| Parameter | Type | Description |
|---|---|---|
facts * | List of the facts that are true, from get_fact_questions | |
users_in * | ISO country codes where users are, as the user said, e.g. ['LK'] | |
company_in | ISO country code where the company (or maker) is, e.g. 'LK' | |
law | string | Which checklist: 'pdpa' |
processing_in | ISO country codes where data is stored or processed |