Compare commits
3
Commits
cde1632421
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9fd5ad9457 | ||
|
|
7728a1d908 | ||
|
|
035bf497c8 |
No files matched your search
@@ -53,8 +53,8 @@ Code](https://code.claude.com/docs/en/skills) and
|
||||
- [grice-maxims](grice-maxims/SKILL.md) — say what's needed and no
|
||||
more, only what you can back up, in an order easy to follow.
|
||||
- [journalism-101](journalism-101/SKILL.md) — lead with the news;
|
||||
don't bury the lede, and don't write about the document ("This
|
||||
page...").
|
||||
don't bury the lede, don't write about the document ("This
|
||||
page..."), and write for readers who weren't in the conversation.
|
||||
- [hypertext-links](hypertext-links/SKILL.md) — link text says where
|
||||
the link goes; no bare URLs, no "click here".
|
||||
- [citation-needed](citation-needed/SKILL.md) — back a challenged claim
|
||||
@@ -76,6 +76,9 @@ Code](https://code.claude.com/docs/en/skills) and
|
||||
came from, after Keyhive's certflow diagrams: solid lines for who
|
||||
delegated, dashed for provenance; reach computed, traced on hover,
|
||||
and faded on revoke.
|
||||
- [tab-dump-topics](tab-dump-topics/SKILL.md) — an office hours tab
|
||||
dump, regrouped by topic in meeting order under timestamped
|
||||
headings, from the transcript.
|
||||
- [obsidian-markdown](obsidian-markdown/SKILL.md) — the workspace is
|
||||
an Obsidian vault: one line per paragraph, relative links, no file
|
||||
symlinks you expect Obsidian to show.
|
||||
|
||||
@@ -56,10 +56,10 @@ JSDoc placement rules (from the
|
||||
no docstrings; a string literal is the honest equivalent) rather than
|
||||
copying it or reading the script's own source. Helpers inside still get
|
||||
their own JSDoc.
|
||||
- **Write for the reader, not the conversation:** Comments say what the
|
||||
code is and why, in the reader's terms. No traces of how it came to be
|
||||
(design discussions, who asked, "for now", analogies used while
|
||||
deciding), and nothing the code or its shebang already says.
|
||||
- **Write for the reader, not the conversation:** comments say what the
|
||||
code is and why; no "for now", no traces of the design discussion
|
||||
(see journalism-101, "Write for readers who weren't there"), and
|
||||
nothing the code or its shebang already says.
|
||||
- **External design constraints:** If a module is constrained by external
|
||||
contracts, standards, or off-repo design docs, add a short JSDoc note with a
|
||||
`@see` link to the authoritative source at the relevant entry point(s).
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: journalism-101
|
||||
description: >-
|
||||
Journalism 101: lead with the news, don't bury the lede, and don't write about the document ("This page...", "This doc covers...", "In this section we..."). Use when writing or revising the opening of any doc, page, README, issue, PR description, email, report, or reply; when someone says "bury the lede", "lede", "inverted pyramid", "navel-gazing", or "no newspaper story starts with 'This newspaper story'". Not for link text (that's hypertext-links) or trimming words in general (that's grice-maxims).
|
||||
Journalism 101: lead with the news, don't bury the lede, don't write about the document ("This page...", "This doc covers...", "In this section we..."), and write for readers who weren't in the conversation that produced it. Use when writing or revising the opening of any doc, page, README, issue, PR description, email, report, or reply; when someone says "bury the lede", "lede", "inverted pyramid", "navel-gazing", "chit-chat", "who's the audience?", or "no newspaper story starts with 'This newspaper story'". Not for link text (that's hypertext-links) or trimming words in general (that's grice-maxims).
|
||||
---
|
||||
|
||||
# Journalism 101
|
||||
@@ -24,6 +24,13 @@ No newspaper story starts with "This newspaper story...". The reader knows what
|
||||
|
||||
The same goes for "This document describes...", "This section covers...", "In this README, we...", and "The purpose of this issue is...". In a heading or a link, too: name the subject, not the container.
|
||||
|
||||
## Write for readers who weren't there
|
||||
|
||||
A story reports what happened, not the interviews that turned it up. Docs, comments, commit messages, and issues likewise: the reader wasn't in the conversation that produced them, so leave no trace of it. No design discussions, no who asked, no "for now", no analogies used while deciding. No answers to questions only the conversation raised, and no rebuttals of a draft the reader never saw.
|
||||
|
||||
- Chat leaking in: "Any Linux with systemd and Nix will do; it needn't be NixOS."
|
||||
- For the reader: "Install Nix if it isn't there yet."
|
||||
|
||||
## Sources
|
||||
|
||||
- [Inverted pyramid (journalism)](https://en.wikipedia.org/wiki/Inverted_pyramid_(journalism)), Wikipedia: most important first, details in descending order.
|
||||
|
||||
@@ -101,6 +101,8 @@ before writing or refactoring a Python script; don't invent conventions.
|
||||
Known checker bug: it flags `sqlite3.connect(':memory:')` as DPY010,
|
||||
but an in-memory database is private to the process, not I/O; leave
|
||||
that call in place.
|
||||
- Beyond the checker: passing it is the floor. A script that grows
|
||||
past one job needs the shape below too; see the next section.
|
||||
- Calibration: Python can't enforce a capability boundary (name mangling
|
||||
and introspection get around any wrapper), so for a small script,
|
||||
attenuation that lives mostly in names is fine. An example: a read-only
|
||||
@@ -108,6 +110,45 @@ before writing or refactoring a Python script; don't invent conventions.
|
||||
note the gap honestly and move on. Robustness against adversaries
|
||||
means leaving Python (e.g. for Hardened JavaScript).
|
||||
|
||||
## Python: each part an object, its constructor its authority list
|
||||
|
||||
A script that passes the checker can still hold every power in one
|
||||
`main` full of nested functions. Factor it so each part's constructor
|
||||
says what it can touch, and a reviewer needn't read its body:
|
||||
|
||||
- **`_script_io()` only snapshots.** Pass standard authorities as they
|
||||
are: `gpiod.request_lines`, `socket.socket`,
|
||||
`asyncio.create_subprocess_exec`, `dict(os.environ)`. No bespoke
|
||||
wrappers (`socket_from_fd`, a `urlopen` that builds the request), and
|
||||
nothing that can fail: `socket.socket(fileno=3)`, or deciding from
|
||||
`LISTEN_FDS`, happens in `main`.
|
||||
- **`main` only wires.** Nested functions closing over powers are
|
||||
objects waiting to be named: give each a class, in a module of its
|
||||
own, constructed with just the powers it uses:
|
||||
`HatLines(request_lines, chip)`, `Brain(ask_client, button)`.
|
||||
- **A class, not a function returning functions.**
|
||||
`open_lines(...) -> (fd, read_edges, set_led)` is an object with its
|
||||
methods scattered; make it a class with `fileno()`, `read_edges()`,
|
||||
`set_led()`.
|
||||
- **Powers in `__` attributes:** `self.__client`, not `self._client`.
|
||||
Name mangling enforces nothing (see Calibration), but it marks which
|
||||
attributes are authority, and keeps neighbors from reaching in by habit.
|
||||
- **Bind designation to authority once.** A `Command(exec, program,
|
||||
*leading_args)` runs one program with its URL fixed, so the part that
|
||||
holds it can't point it elsewhere; `poster(open_connection, url)`
|
||||
reaches one HTTP server.
|
||||
- **An event loop, not threads.** asyncio: no locks, no shared state
|
||||
polled from threads, and a race written as one:
|
||||
`asyncio.wait({work, press}, return_when=FIRST_COMPLETED)`.
|
||||
Subprocesses through `create_subprocess_exec`, sockets through
|
||||
`start_unix_server` and `open_connection`, a device's fd through
|
||||
`loop.add_reader`.
|
||||
- **Top-level imports bring data, not powers.** `from asyncio.subprocess
|
||||
import PIPE`, or a library's data types (`gpiod.LineSettings`), are
|
||||
fine at the top; the powers come in through `main`. Importing a module
|
||||
that holds powers isn't fatal while they go unused, but importing just
|
||||
the names used is cleaner.
|
||||
|
||||
## how this shows up in review
|
||||
|
||||
- `crypto.getRandomValues()` called inside an exported function →
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
---
|
||||
name: tab-dump-topics
|
||||
description: Organize an office-hours tab dump into topics, in the order the pages came up, under headings that start with a timestamp. Use when asked to refine, sort, or organize a tab dump, or the opening post of an office hours discussion on GitHub (dckc/vattr97, Agoric/agoric-sdk, rchain-community) once notes, a transcript, or a recording are posted. Not for writing the meeting summary itself.
|
||||
---
|
||||
|
||||
# Tab dump by topic
|
||||
|
||||
A tab dump is the browser tabs from a meeting, pasted as markdown links in tab order. Tab order is not meeting order: tabs opened to prepare come first but get shown late, and a page shown twice appears once. The transcript says when each page came up.
|
||||
|
||||
## Steps
|
||||
|
||||
1. Fetch the discussion: `gh api graphql` for the body and comments. The notes, often a later comment, link the transcript and recording wherever they live. A Google Drive share link downloads with `https://drive.google.com/uc?export=download&id=<id>`.
|
||||
2. Match each tab to the moment it came up. Cues: the speaker names it ("Metagov", "the picture book slides", "issue 81"), reads its text aloud, or says "let me show you" / "scroll down" near its topic. Transcription garbles names ("Ladara" for Edera, "Rolo" for rholo, "Crescendo bot" for kriscendobot), so match on sound.
|
||||
3. Where the transcript is silent, use tab order: tabs opened during the meeting are in the order opened, so a tab between two placed ones goes between them.
|
||||
4. Group tabs into topics, few and broad: one per thread of conversation, not per sub-point. A tangent that serves the thread stays in it (the picture book's "keys, not driver's licenses" slide went with hosting on Edera). A thread mentioned early and taken up in depth later is one topic, at the later time. A topic with no tabs gets no heading.
|
||||
5. Head each topic `### m:ss Title` (or `h:mm:ss`), the time the topic starts, not when its first tab appeared. The title states the point ("Edera, not Cloudflare"), not the subject ("Cloudflare").
|
||||
6. Rename the `## Tab Dump` heading to `## Topics and Tabs`. Front matter goes under it, before the first topic: pages that frame the meeting rather than belong to a topic, such as the Discussions index.
|
||||
7. End with `### Misc`, untimed: small talk (a health update), tools used along the way (the bookmark library searched to find a link), and pages that were open but not discussed.
|
||||
8. Keep each link as pasted: the tab title is the link text. Add a few words after a link only where it doesn't explain itself (a `localhost` URL).
|
||||
9. A page shown in two topics goes under both.
|
||||
10. Replace a placeholder like `_notes, recording to appear_` with a link to the notes comment: `see [notes and recording below](#discussioncomment-NNN)`.
|
||||
|
||||
Draft into `.tmp/` at the workspace root and report placements that rest on tab order alone; editing the discussion is Dan's call.
|
||||
|
||||
## Example
|
||||
|
||||
From [Dec 3 office hours](https://github.com/dckc/vattr97/discussions/90):
|
||||
|
||||
```markdown
|
||||
### 10:15 Fiscal sponsorship: Metagov is a 501(c)(3)
|
||||
|
||||
[Metagov](https://metagov.org/)
|
||||
|
||||
[Metagov Inc - Nonprofit Explorer - ProPublica](https://projects.propublica.org/nonprofits/organizations/853442527)
|
||||
```
|
||||
|
||||
## Office hours, and where tab dumps come from
|
||||
|
||||
Dan runs office hours as a series: open questions and discussion, mostly on object capabilities as patterns of cooperation without vulnerability. Each episode is a GitHub Discussion in an Office Hours category: Agoric/agoric-sdk (Wednesdays; episodes with recordings carry the `video-recording` label), dckc/vattr97 for Oros, and rchain-community. Every episode has at least a tab dump of the links discussed, copied with the TabCopy browser extension; notes and a recording usually follow. So the tab dump is the one record every episode has, and organizing it by topic makes it the index into the notes and recording.
|
||||
|
||||
## Sources
|
||||
|
||||
- [Office Hours: Patterns of Cooperation without Vulnerability](https://www.madmode.com/2023/office-hours.html) (MadMode, 2023-11-18): the series, and tab dumps via TabCopy.
|
||||
- [Oct 1 office hours](https://github.com/dckc/vattr97/discussions/30): the tab dump with topic headings, before timestamps.
|
||||
Reference in new issue
Block a user