X-Labs · Project update

A first working version of the legal engine

X-Protocols already refuses to turn "we do not hold that" into "no". We built a separate engine that applies the same refusal to Bosnian law, and asked it how much annual leave a worker gets. It answers with the floor the statute fixes, the three documents that decide the rest, and the facts nobody supplied.

On this page
Written by
Aldin Smajkan
Type
Project update
Published
15 September 2026
Last revised
16 September 2026
Version
3
Project
Temporal legal state for Bosnia and Herzegovina

What this answers: what an engine can honestly say when the law sets a boundary and leaves the number to documents nobody publishes. This is the engine underneath the reading bench. The register and the question box do a different job — they place a text in time — and you can try those at Ask in your own words.

Ask a lawyer how many days of annual leave you get. They will not give you a number. They will ask where you work, what you do, how long you have been there, how old you are, and whether a collective agreement covers your job. Then they will ask to see your contract.

The law itself works the same way, and says so. The Federation Labour Law sets a floor of 20 working days. It allows more than 30 where a collective agreement provides for it. Then it hands the actual figure to three documents: the collective agreement, the employer's rulebook, and the contract of employment. None of those is in any gazette. The last one is not public at all.

So a system that answers "23 days" is not being helpful. It is making up the contents of three documents it has never read.

The same rule the business engine already follows

X-Protocols has one hard rule. If a business has not published something, the answer is "we do not hold that". It is never "no". Those are different facts and mixing them up is how an AI assistant ends up telling a customer that a shop does not do something it does every day.

Law has the same trap and a worse cost. So we built a second engine that applies the same rule to legal text, and gives back the same four answers:

  • resolved - the provisions read settle it.
  • partial - the law fixes a bound, and something it names decides the rest.
  • needs_context - the question cannot be read until you say something more.
  • not_covered - we hold nothing that reaches this.

The question, run

This is the real output, produced by the code, not written by hand. It is long. That is the finding: the honest answer to a simple question does not fit on one line.

text text
QUESTION   How many days of annual leave am I entitled to?
TOPIC      annual_leave_duration
WHERE      Federation of Bosnia and Herzegovina
ON         2026-09-15
SUPPLIED   nothing

VERDICT    partial
           The statute fixes a bound and hands the rest to documents it names.

BOUND      at least 20 working days of annual leave in a calendar year
           Zakon o radu FBiH, Art. 47(1) “Minimalni godišnji odmor”
           Art. 47(1) (verbatim, final sentence only): “Izuzetno godišnji
           odmor može da traje i duže od 30 radnih dana, ukoliko je to uređeno
           kolektivnim ugovorom, a prema prirodi posla i uvjetima rada.”
           [article number derived] The heading digits were lost in text
           extraction. Articles 51 (Zaštita prava na godišnji odmor), 52
           (Korištenje godišnjeg odmora), 53 (Plaćeno odsustvo) and 54
           (Neplaćeno odsustvo) came through legibly and the headings run in
           unbroken sequence, which fixes 47 to 50. Recorded so the derivation
           can be checked rather than trusted.

BOUND      ordinarily no more than 30 working days
           Zakon o radu FBiH, Art. 47(1) “Minimalni godišnji odmor”

BOUND      at least 24 working days, which is four more than the general floor
           -- ONLY IF age is under 18, which the question did not say
           condition: the paragraph sets a separate minimum for a maloljetni
           radnik.
           Zakon o radu FBiH, Art. 47(2) “Minimalni godišnji odmor”
           [article number derived] Numbering derived with Article 47(1); see
           the note there.

BOUND      the full annual entitlement, once six months of continuous work
           have been completed -- ONLY IF length_of_service is six months or
           more, which the question did not say
           condition: the article makes six months of continuous work the
           point at which the right to the full annual leave is acquired, for
           a first job or after a break between employments longer than
           fifteen days.
           Zakon o radu FBiH, Art. 48
           [article number derived] Numbering derived with Article 47(1); see
           the note there.

BOUND      at least one working day of leave for each completed month of work
           -- ONLY IF length_of_service is under six months, which the
           question did not say
           condition: the article provides the per-month entitlement until six
           months of continuous work are completed.
           Zakon o radu FBiH, Art. 48

ELSEWHERE  longer than 30 working days, where the nature of the work and the
           working conditions warrant it
           decided by: kolektivni ugovor
           Zakon o radu FBiH, Art. 47(1) “Minimalni godišnji odmor”

ELSEWHERE  any duration of annual leave above the statutory minimum
           decided by: kolektivni ugovor, pravilnik o radu, ugovor o radu
           Zakon o radu FBiH, Art. 49(1)
           [article number derived] Numbering derived with Article 47(1); see
           the note there.

READING    Every BOUND, RULED OUT and ELSEWHERE line above is our reading of
           the provision cited under it, not a quotation of it. Only text
           marked verbatim is the source's own wording.

NOT GIVEN  facts the question did not supply, and what each decides:
           the worker's age -- under 18 raises the floor from 20 to 24 working
           days, under Article 47(2).
           the employer -- which pravilnik o radu and which collective
           agreement bind her. Neither is in any gazette surveyed.
           length of continuous service -- which of Article 48's two floors
           applies: the full year's entitlement after six months of continuous
           work, or one working day per completed month before that.
           sector or industry -- which branch collective agreement, if any,
           reaches her employment.

SILENT ON  how many children the worker has
           Nothing in Articles 47 to 52 makes the number of a worker's
           children relevant to the length of annual leave. That is a silence
           in the part of this act that was read. It is NOT a finding that it
           makes no difference: a collective agreement or an employer rulebook
           may well make it one, and those are exactly the documents this
           engine cannot see.

AS OF      Not established. The corpus holds one text of Zakon o radu FBiH: an
           unofficial consolidation of Službene novine FBiH 26/16, Službene
           novine FBiH 89/18, retrieved 2026-09-15. It records neither when
           that text entered into force nor when it began to apply, which BiH
           drafting practice keeps as two separate dates. So whether this was
           the text in force on 2026-09-15 is not a question v1 can answer,
           and nothing above should be read as saying it is.

SOURCE     Zakon o radu Federacije Bosne i Hercegovine
           unofficial consolidation -- not an act, not citable in procedure
           The header of the fetched PDF reads “prečišćena neslužbena
           verzija”. It is published by the Federal Tax Administration, a body
           that enforces this act and has no power to consolidate it
           officially. The label is honest, and it is also the finding: the
           artefact most useful to a reader is the one carrying no authority.
           published in: Službene novine FBiH 26/16; Službene novine FBiH
           89/18
           retrieved 2026-09-15 from
           https://www.pufbih.ba/v1/public/upload/zakoni/f0787-zakon-o-radu-precisceni-tekst.pdf
           read: Articles 47 to 52 only. The rest of the act has not been
           read.

Five more questions

The same engine, five more questions, so that the four answers all get used:

questionanswer
Leave in the Federation, nothing else saidpartial
Leave in the Federation, worker is under 18partial, and the floor moves to 24 days
Leave, but the question does not say whereneeds_context
Leave in Republika Srpskanot_covered
Can I give up my leave for money?resolved
What must a law say about when it starts to apply?resolved

Two of the six fail on purpose. A set of examples where everything works only proves the examples were chosen to work.

The one that says not_covered is the important one. Republika Srpska has its own labour law, which we have not read. The engine could easily answer from the Federation act and sound right. It refuses, and it tells you what it does hold instead.

It is a separate engine, and the build keeps it separate

The business engine serves people who pay for it. This one serves a research question that may be abandoned. Neither can be allowed to break the other.

So the legal engine imports nothing from the rest of the product, reaches no database, makes no network call, and uses no model. It is a plain function: the same question gives the same answer, on any machine, forever. Two tests fail the build if either engine ever starts importing the other.

What it cannot do yet

Every answer ends with the same refusal:

AS OF. Not established.

Bosnian drafting rules require a law to state two separate dates: when it comes into force, and when it starts to apply. Article 21(3) even gives the sentence for saying both. No source we surveyed publishes those dates in a form a machine can read.

So the engine holds one copy of each law and does not know when that copy was the law. It says this in its own output, every time, rather than letting the existence of an answer suggest the date was checked. Closing that gap is the next piece of work, and it is the project rather than a detail of it.

Two more limits worth stating plainly. The copy of the Labour Law we read is an unofficial consolidation, published by an administration that enforces the act and has no power to consolidate it officially. And for four of the seven articles, the numbering was worked out from the legible headings around them, because the text extraction lost the digits. The engine prints that derivation next to every one of those citations, because a derivation nobody can see is the same thing as a guess.

Try it, and what to send back

The engine is behind a form at the reading bench. It ships filled in with the example above, so nothing has to be typed to see it run. It holds no law, stores nothing and fetches nothing: the text is whatever you paste into it.

The bench is an instrument and it asks for about thirty fields, which is the right shape for somebody testing the engine and the wrong shape for somebody with a problem. That person should start at Ask in your own words, which asks for a sentence and answers with citations. The two are not the same machine: the bench reasons about a provision you supply, and the question box places an act in time. Neither of them reads law it was not given.

The first evaluation round is open, and the ask is twenty questions you expect it to get wrong.

Status

Nothing is being sold, nothing is being offered, and this is not legal advice. The project stage is still "researching". Whether it becomes a pilot is not a decision made by the person who enjoyed building it.

Sources

Every source below was retrieved on the date shown. A source read in March and the same source read in September are not necessarily the same document.

  1. Zakon o radu Federacije BiH, unofficial consolidated PDF published by the Federal Tax AdministrationRetrieved 15 September 2026Consolidation of Službene novine FBiH 26/16 and 89/18; the header reads "prečišćena neslužbena verzija". Articles 47 to 52 were read and are the whole of what this engine holds about leave.
  2. Jedinstvena pravila za izradu pravnih propisa u institucijama BiH, Službeni glasnik BiH 11/05Retrieved 15 September 2026Copy hosted by the Indirect Taxation Authority, not by the gazette. Articles 16 to 22 were read.

Corrections

This article was changed after publication. It keeps its address and its identity; what follows is what changed and when.

  • 16 September 2026Added an orientation line at the top naming the question this article answers, and pointed it at the question box at /labs/ask, which did not exist when this was written. No claim, source, date or commitment was changed, added or removed.
  • 15 September 2026The Status section ended by naming republication as an open blocker. It is not open: Article 8(1)(b) of the state copyright act places official legal texts outside copyright, and the working-through is published separately. The paragraph is replaced with what a reader can now do instead - the bench, and the evaluation round. No engine output, quotation, citation or verdict was changed.

More from this project

  • Research proposal 15 September 2026revised 16 September 2026, version 7

    What a legal rule said on a given date, in Bosnia and Herzegovina

    A proposal, and the survey of official sources that argues against most of it. Bosnian drafting rules require two separate dates on every act; outside Brčko a consolidated current text is not an official act; and the practical question people ask is answered not by a number but by naming which documents and which facts are still missing.

  • Methodology 15 September 2026revised 16 September 2026, version 3

    Twenty questions you expect it to get wrong

    The first evaluation round for the legal engine, and the rules it will be judged by. We are not asking whether people like it. We are asking people who read law for a living to send the questions they expect it to fail, and we will publish how many of them it failed and in which of five ways.

  • Research note 15 September 2026revised 16 September 2026, version 3

    May Bosnian legal text be republished?

    Official texts of Bosnian legislation carry no copyright, so the text of a law may be republished. The constraint that remains is the database maker's right, which protects somebody's collection even when every document in it is free - and that is what decides how a corpus here has to be built.

Everything published by X-Labs