Using Malini

Scratchpad

A repository's page is its scratchpad, a notepad for ideas, checklists and whatever else, where any note moves into a new workstream and Share internally hands it to your team as the README of a private repository.

Open as markdown

Ideas pile up faster than workstreams start. A repository's scratchpad is where they wait: one notepad per repository, on your Mac, no shape forced on it.

The page

Click a repository in the sidebar to open its page, on its scratchpad. The bar at the top names it as owner / name, and the name opens the repository on GitHub. Under it is one column of text, and the cursor is already in it.

The scratchpad is a rich text editor that types like Markdown.

  • #, ## and ### start headings, - a bullet list, 1. a numbered list, > a quote, and three backticks a code block.
  • **bold**, *italic*, ~~strike~~ and `code` mark words as you type them, and --- draws a rule.
  • / at the start of a line opens a menu of blocks: a heading, a checklist, a bullet or numbered list, a quote, a divider or a code block. Type to narrow it, and the arrow keys and Return pick one.
  • [] at the start of a line makes a checkbox. Click the box to tick it, and click it again to undo it. A ticked line dims, and a thin line crosses its words.
  • Return adds the next checkbox, Tab nests it under the one above, and Shift+Tab lifts it out. Return on an empty checkbox leaves the list.
  • ⌘Z undoes, two hundred steps back.

Every keystroke saves, so there is nothing to save.

Into a workstream

Any note can become a workstream. Hover a paragraph, a list item or a checkbox and press Move into a new workstream in the gutter on its left, or put the cursor in it and press ⌘Return. A heading takes the text under it, up to the next heading, and a list item takes its sub-items.

The note leaves the scratchpad and starts a workstream in the background, with the note as its first prompt. Nothing opens, so you can move the next one right away. ⌘Z puts the note back and keeps the workstream.

Hover the repository in the sidebar to open the same scratchpad in a card, and write in it without leaving the chat you are in. The card opens at the line you last read or edited on the page, and the page opens at the line you last used in the card. That line survives a restart.

Share internally

A scratchpad lives on your Mac until you turn on Share internally, in the repository page's top bar. Hover it to see where the scratchpad goes and who sees it. Once it is shared, the bar shows the people who edited it beside the switch. Sharing is per repository and off until you turn it on.

A shared scratchpad never goes into the repository itself. It goes to a private repository of its own, named after it with -malini-plan, such as acme/web-malini-plan, whether acme/web is public or private. So a private repository that turns public later takes no scratchpad with it.

  • Turning sharing on makes the plan repository when it is not there yet. In a repository of another person's account, only they can make it, so Malini asks them for you.
  • The scratchpad is the plan repository's README.md, on main, as Markdown: your checkboxes are - [ ] and - [x], nested two spaces deep, so GitHub renders the notes on the repository's front page. Each save is a commit, so the scratchpad's history is the repository's history.
  • Malini fetches, merges and pushes the file with git, line by line. Two people who edit different lines both keep their edit. Two people who edit the same line both keep their words, one under the other, and the next one to read it tidies. Nothing is lost.
  • Anyone can edit the file by hand on GitHub, and Malini reads it back as Markdown.

Only collaborators of the code repository see the scratchpad. When you can manage the plan repository, Malini keeps its people in step with the code repository: it invites new collaborators with the access they have there, removes people who left, and cancels invitations they no longer need. It checks at most every 10 minutes while sharing is on. Malini checks that the plan repository is still private before each sync, and turns sharing off once it is public or gone.

Malini syncs every 30 seconds while the scratchpad is on screen, every 10 minutes in the background, and after each edit. A change someone else pushed lands in your scratchpad, and a line at the bottom of the window says who edited it.

Turning sharing off stops it, and the plan repository keeps its file and history.

Ask the owner

When only the owner can make the plan repository, turning sharing on asks their Malini instead, and the switch reads Asked and their login, such as Asked casey. The ask is a hidden git ref in the code repository, refs/malini/plan-requests/<your login>, which names who asked and holds no notes. No clone, branch list or pull request shows it.

The owner's Malini looks for asks at launch, every 10 minutes and each time its window loads, in every GitHub repository it lists whose scratchpad is not shared. When they are an admin of that repository, a toast says who wants to share the scratchpad and who would see it, with Share and Not now.

  • Share turns sharing on, invites you, deletes the ask and opens the repository's page.
  • Not now keeps the toast away, and a dot beside their switch stays until they share.

Your Malini then accepts the invitation to that one plan repository by itself, turns sharing on and tells you the owner said yes. It accepts no other invitation. Turning your switch off while you wait takes the ask back. The owner sees nothing until they run Malini.

Where it lives

Scratchpads live in Malini's database on this Mac, each under its repository's full name. Until you turn on Share internally, they are not in git, they do not sync, and nothing about them leaves the Mac.