subroutine document
The 2 commands under subroutine document, each with its arguments and options.
subroutine document [OPTIONS] COMMAND [ARGS]...
Also answers to subroutine doc.
Write down what you concluded.
subroutine document create
subroutine document create [OPTIONS] {title}
Write a document — a decision, a finding, a design, a dead end.
A decision, a finding and a dead end are in force the moment you write them, so they start as 'active'; a specification or a design starts as 'draft'. Pass '--status draft' for a decision you are still thinking about.
Examples:
subroutine document create "Why we dropped the queue" --type decision
cat notes.md | subroutine document create "Review findings" --type finding
A comment is what happened; a document is what you concluded. If the next person to look would need to read it, it is a document.
Arguments
title(str, required): What it concludes, in one line.
Options
--body(str): The reasoning. Or pipe it in.--type(str): note, spec, design, decision, finding, dead_end.--status(str): A status key. A decision starts 'active'; use 'draft' if not.--project(str): File it under this project, by key.--parent(str): File it under this document, by its number.--tag(str, repeatable): Label it. Repeatable, and the same tags tasks use.--json(flag): Print the result as JSON.--no-body(flag): Leave the document's text out of the result.
subroutine document edit
subroutine document edit [OPTIONS] [which]
Revise a document you have already written.
Examples:
subroutine document edit 42
subroutine document edit 42 --title "What we settled, and why"
cat revised.md | subroutine document edit 42
With nothing to change, this opens the document in your editor.
A conclusion that cannot be revised is a record of what you concluded once — so this is what keeps the instance the place the *current* answer lives.
Arguments
which(str): Which document, by its number.
Options
--body(str): Replace the text. Or pipe it in.--title(str): Say what it concludes, in one line.--type(str): note, spec, design, decision, finding, dead_end.--status(str): A status key, e.g. superseded.--project(str): File it under this project, by key.--tag(str, repeatable): Label it. Repeatable, and the same tags tasks use.--json(flag): Print the result as JSON.--no-body(flag): Leave the document's text out of the result.