Skip to main content
Install Relativities before running the synthetic examples. rslc plan keeps one person’s answers in a journey file and prints the next question as a card. The planner asks only for inputs that still change a result. Rate with missing answers shows the result that each rater gives.

Start a journey

Save the shared renters example, a rater from the synthetic carrier Example Mutual:
Start a journey for the rater:
  • journey.json is the journey file. Each later command reads it and writes it back.
  • --rater renters=renters gives the rater an ID and names the folder that holds rater.rsl.
  • The first line of a card holds its kind, the path of the input, and the question.
  • ready lists each rater that is settled.

Answer a card

Pass the path of the card and the answer as JSON:
A number card shows the smallest and the largest answer. The help line comes from the rater’s help annotation.
A choice card lists each answer as its JSON value, then its label. A text answer keeps its JSON quotes, so wrap it in single quotes for the shell:
The planner leaves construction out. Each rural row of the building table holds the same factor.
dog_has_bitten is a follow-up input. The planner asks it only after has_dog is true.
Five answers settle the rater. It declares seven inputs.

Read the premium

The journey file holds the answers under facts. Rate them with rslc.journey.Journey:
The annual premium is $241. Results lists each field of an evaluation.

Plan for several raters

A journey takes one --rater for each rater. Save a second, smaller rater as basic/rater.rsl:
basic/rater.rsl
Start a journey for both raters, and give each a title:
asked by names the raters that declare the input, when some raters leave it out. still settled if skipped counts the other raters whose result ignores the answer. The two raters share the paths Policy.contents and Policy.has_dog, so one answer serves both.

Put a card off

A person who lacks an answer puts the card off. Skip the path of the card:
Renters waits on the skipped answer, so the planner first asks what Renters Basic needs.
Renters Basic is ready after two answers. The remaining cards belong to Renters. A skipped card comes back after the other cards, marked (skipped before):
To print the current card again, run rslc plan next. It leaves the journey as it is:

Search the answers of a card

To find an answer in a long list, search the card’s path:
Each query word matches the start of a word in a label. A search card holds a list too long to print, and this command finds its answers.

Decline a document

The renters rater names a document with two annotations. gives says who has a declarations page, and found_on says that the page prints contents. The planner offers the document as a card:
A host that reads documents saves the answers it finds as facts. To go on with the questions, dismiss the document:

Drive a journey from Python

Journey.plan returns the same plan as rslc plan --json, for facts that your program holds:
  • answer returns a copy of the facts with one more answer.
  • after names the card answered last, so the planner stays in its section.
  • step["next"] is None when the plan has zero open cards. step["standings"] then gives the state of each rater.