Situace
Relace něco rozhodne uprostřed úlohy: kompromis, odmítnutí, konvenci. Rozhodnutí žije v konverzaci, takže další worker je buď odvodí znovu, odporuje mu, nebo čte celý přepis, aby je našel.
Scénář
setup: active-task
given:
- 'an active task scoped to lib'
steps:
- id: decide
run: ['decision', 'add', 'refuse tabs in the parser', '--why', 'two encodings for one token']
note: 'what was decided, why, and which task decided it; superseded by a later entry, never edited'
expect:
exit: 0
stdout_contains: ['recorded: refuse tabs in the parser']
- id: read-back
run: ['decision', 'list']
note: 'the decisions of this branch, newest first'
expect:
exit: 0
stdout_contains: ['refuse tabs in the parser', 'Why: two encodings']
- id: find-it
run: ['search', 'tabs']
note: 'a literal scan over the durable records, no index'
expect:
exit: 0
stdout_contains: ['decision', 'match']
- id: what-happened
run: ['history']
note: 'the ledger names the event and the task'
expect:
exit: 0
stdout_contains: ['decision.recorded', 'task.started']
then:
- 'a decision is one line of state with an author, a task and a reason'
- 'nothing has to be re-explained to the next session'Výsledek
Rozhodnutí je záznam jmenující úlohu, která jej učinila, a proč; decision list jej čte zpět, search jej najde podle slova a ledger říká, kdy se stalo. Pozdější rozhodnutí jej nahradí tím, že jej jmenuje; nic se neupravuje.