Using archr
Annotations and comments
Two kinds of note, where they can go, and the list and thread they are read in.
There are two kinds of note, drawn and stored apart.
An annotation is part of the project and lasts.
It is magenta: ◆ on the project, a folder or a file, ✎ on lines.
Annotations are the map of the architecture the project is meant to have, written by you and committed with it.
A comment is part of a review and goes with it.
It is cyan: ● on the project, a folder or a file, ✱ on lines.
Where a note can go
A note is on the project, a folder, a file, a range of lines or a single token.
Lines are selected with V, or by dragging over them with the mouse.
In a review it can also be on lines the change removed.
A note can be on several places at once, such as "merge these two folders".
Mark each place with space, in the tree or the view, then press a or c.
Each place shows the note as its own, saying what else it is on.
Writing
| Key | Does |
|---|---|
a |
Write or edit an annotation |
c |
Write or edit a comment |
d |
Delete, after asking |
x |
Close a comment, or open it again |
These mean the same in every mode.
In the popup, Enter saves and ctrl+j starts a new line.
Tab moves between the notes already on that place, keeping what you typed in each.
ctrl+r switches a comment between its text and a reply to it.
ctrl+t switches a note between annotation and comment, which is how a comment is promoted to an annotation.
A note saved empty is deleted.
The list and the thread
i opens the list on what the cursor is on: the tree's row, or in the view the line under the cursor, else the file.
It lists what is on that place and everything inside it.
C opens it on the whole project.
In a review the list is grouped: comments waiting for you, then those with the agent, then closed ones, then annotations. Each takes one or two rows, with its latest reply.
Enter on one opens its thread, scrolled to the latest reply.
Enter again replies to a comment or edits an annotation, and ] [ go to the next and previous thread.
| Key | Does |
|---|---|
→ |
Show it in the code |
x |
Close a comment |
d |
Delete |
y |
Copy the text |
X |
Show or hide closed comments |
Z |
Close the review |
← q |
Close the list or thread |
Ids
Each note has an id of eight lowercase letters and digits, such as k7mq2xfa.
An id always has a digit and a letter after f, so text can tell it from a word or a git hash.
An id mentioned in any text is followed by where that note is, as k7mq2xfa (./cmd/serve/main.go).
In a thread, Tab picks one and Enter goes to it.
Who may change what
Agents read annotations and must respect them. They never edit annotations: they reply to a comment proposing the change, and you accept it or not.