Record ADR 0014 and the Rule set glossary term for issue #363: a link carries the whole ordered rule set in its own versioned envelope, validated all or nothing, and replaces the recipient's rules after confirmation without touching balances, declared days or the horizon. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0192He39ydEEMnJJQHagHvB2
2.7 KiB
status
| status |
|---|
| accepted |
Rule Sets Shared Through the URL Fragment
Accepted on 2026-11-15 for issue #363.
Users share their planning strategy with colleagues by sending a link whose fragment carries their whole rule set: every rule in order, disabled and optimization rules included. The link has its own versioned envelope, modelled on the stored { version, rules } list but versioned independently of it. TIME_WINDOW boundaries travel as calendar dates, so a recipient in another time zone keeps the same window. The envelope is compressed with raw deflate and encoded in base64url. The server stores nothing and never receives the fragment, so ADR 0011's stateless server holds. A link is a snapshot: later edits by the sender do not reach it. Opening it replaces the recipient's whole rule set after confirmation, and it never carries leave balances, declared non-working days, or a planning horizon, which belong to each person.
Considered Options
- Server-stored short links: rejected. They would need storage, expiry and abuse handling on a server that keeps no state, for a link of roughly 860 characters for the default rule set that messaging tools already accept.
- A query parameter: rejected. It is as long as the fragment and reaches server and proxy logs.
- Sharing a selection of rules merged into the recipient's list: rejected. The order is the rule priority, and inserting rules into someone else's order has no sensible default.
- Sharing a plan: deferred. Recomputing a plan from shared inputs depends on the calculation's Europe/Paris date and on the planner build, so a shared plan must be a read-only snapshot of the result, designed separately.
Consequences
The envelope is a public contract. Every published version must remain decodable, and any change to the rule format needs a migration for links already sent.
Anyone can craft a link, so an import is all or nothing. It requires canonical values, known fields only, at most 100 rules and a bounded decompressed size, and every rule, including disabled ones, must pass the planner's own rule checks. Otherwise nothing changes. The sender is refused a link when one of their rules fails those checks, and the refusal names the rule, so that nobody sends a link that cannot be opened. A confirmed import is saved even when the recipient's stored rules are unreadable, and edits stay saved for the rest of the session, because the guard against overwriting them exists to stop accidental writes and the person has just accepted the replacement.
Another open tab still holds the previous rules and can overwrite an import with its next edit, as it can overwrite any rule edit today.