Skip to content

Commit 783aed1

Browse files
committed
Install SDD: next slice of per-file specs
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CSM4FVUbnP4PJJ9sawMfLb
1 parent 7dcd2ba commit 783aed1

21 files changed

Lines changed: 447 additions & 1 deletion
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
What the tests cover: the shared prompt box and the controls around it.
2+
3+
The control row:
4+
5+
- The full form shows the presets button, the driver and model choice naming the current driver, the options gear, and — only once the box has text — the submit control.
6+
- The compact navbar form keeps the driver and model choice and the options gear, and still starts an agent from what is typed.
7+
- Inside an agent the driver and model choice is dropped while the rest of the row stays usable.
8+
- An option's explanation matches what it actually does, and Browser is disabled with a stated reason when the chosen driver is not Claude Code.
9+
10+
Submitting:
11+
12+
- Submit is absent until the box has text, then enabled, and hands the text out as an ordinary task.
13+
- The editor's keyboard shortcut submits the same way.
14+
- What is typed is mirrored out to the host as it changes.
15+
16+
Presets:
17+
18+
- A preset that must open an agent of its own marks its submission as such; an ordinary preset does not. What is submitted is the preset's rendered prompt, not its menu label.
19+
- Emptying the box drops the preset and its new-agent rule, so the next message is an ordinary task in the same agent.
20+
21+
Carried drafts:
22+
23+
- The launcher restores a draft carried from another device, as an ordinary task, taking it exactly once.
24+
- The carried draft is really in the editor and not merely in what submitting would send.
25+
- A composer sitting inside an agent does not consume a carried draft.
26+
27+
Where the work runs:
28+
29+
- A selected device that is offline blocks starting by both button and keyboard, and names the device in the reason, with no automatic fallback.
30+
- An online selected device leaves starting enabled with no warning.
31+
32+
The in-agent options gear:
33+
34+
- A live agent drops the gear entirely rather than opening an empty menu.
35+
- An ended agent offers exactly the options a resume can still arm — the publish ladder, auto-merge and Browser — while the prompt-shaping options and the choice of where the work runs stay out.
36+
- Changing one of those options writes the shared preference the resumed leg resolves when it starts.
37+
38+
## Before modifying/creating SPEC.md files
39+
40+
You must always read and respect https://raw.githubusercontent.com/brillout/sdd/refs/heads/main/sdd.md
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
The single Notifications bell in the sidebar's utility footer, and the menu behind it. It makes the notification model legible by separating the two questions it used to blur: where a notification goes (Browser, Discord) and what the user wants to be notified about (Human Queue, New activity).
2+
3+
## Business logic — TL;DR
4+
5+
- **Two groups, one model** - "Deliver to" lists the delivery methods; "Notify me about" lists the categories. Every entry is a toggle stored in the user's preferences.
6+
- **The bell reflects reality, not intent** - it lights up (filled bell plus a dot) only when a method can actually deliver: Browser counts only once the browser has granted permission, Discord only once a webhook is configured. Otherwise it shows a crossed-out bell.
7+
- **Permission is asked at the moment of consent** - switching Browser on is what prompts the browser for notification permission; a browser that has blocked notifications shows the toggle disabled and says so.
8+
- **Both categories are optional** - "Human Queue" (an agent awaiting the user, or a pull request to review) defaults on as the baseline, but is a real toggle like any other; "New activity" (an agent started or finished) is the second category.
9+
10+
## Business logic
11+
12+
### The bell tells the truth about delivery
13+
14+
#### User story
15+
16+
The user wants one glance to answer "will The Framework actually reach me?" — not "did I once click a toggle".
17+
18+
#### Business logic
19+
20+
A delivery method counts as active only when it can deliver. Browser is active when the toggle is on and the browser has granted permission. Discord is active when the toggle is on and the daemon has a Discord webhook configured. The bell is filled and dotted when at least one method is active, and crossed out otherwise.
21+
22+
Whether a webhook exists is read from the daemon and shared with the settings page, so configuring the credential there settles the bell here too. Until that first read lands the setup is assumed capable, so a correctly configured dashboard does not flicker to "off" on load.
23+
24+
#### Rationale
25+
26+
A Discord toggle switched on without a webhook configured used to light the bell for a channel that delivered nothing.
27+
28+
### Each toggle explains itself
29+
30+
#### User story
31+
32+
The user opens the menu and should not have to guess what a method reaches them through or why it is unavailable.
33+
34+
#### Business logic
35+
36+
Every toggle carries a one-line description under its name. Browser says whether notifications are blocked in browser settings, whether the user still needs to allow them, or that it delivers desktop notifications while the dashboard is open. Discord either says it reaches the user with no dashboard open, or that it is not configured and points at Settings for the webhook. Human Queue and New activity each name the events they cover. A browser that does not support notifications at all simply omits the Browser method.
37+
38+
## Before modifying/creating SPEC.md files
39+
40+
You must always read and respect https://raw.githubusercontent.com/brillout/sdd/refs/heads/main/sdd.md
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
What the tests cover: the menu presents delivery methods ("Deliver to": Browser, Discord) and categories ("Notify me about": Human Queue, New activity) as separate groups, with Human Queue a real toggle rather than a fixed always-on row; toggling any of them writes that preference through, including turning Human Queue off from its on-by-default state.
2+
3+
Browser permission: switching Browser on while permission has not yet been decided prompts the browser for it, and a browser that has blocked notifications shows the "Blocked in your browser settings" hint.
4+
5+
The bell's state read-out: it reads "Notifications on" when a method that can actually deliver is enabled and plain "Notifications" otherwise — Discord enabled with no webhook configured does not light it and instead explains that a webhook must be added in Settings, while a configured webhook does light it.
6+
7+
## Before modifying/creating SPEC.md files
8+
9+
You must always read and respect https://raw.githubusercontent.com/brillout/sdd/refs/heads/main/sdd.md
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
The rich prompt editor: the box the user writes an agent's prompt in, with live markdown, typed triggers that pull in presets, macro tags, projects and files, and the send-key bindings.
2+
3+
## Glossary
4+
5+
- **chip** - an inserted reference or tag shown as one inline pill the user can select and delete in a single step. A chip is only a display: the prompt handed to the agent contains the plain text the chip stands for.
6+
- **macro tag** - one of the framework's repeated prompt tags, all written `<NAME>` (for example `<AWAIT>`, `<REVIEW_FILE>`).
7+
- **agent action** - a call the prompt can ask the agent to make, for example `showMultiSelect()`.
8+
9+
## User story
10+
11+
- The user writes what to build, and wants formatting, canned prompts, and references to repos and files without leaving the keyboard or memorising exact spellings.
12+
- The user wants to point an agent at a specific repo or file simply by mentioning it.
13+
14+
## Business logic — TL;DR
15+
16+
- **Four typed triggers** - `/` opens commands (presets, "New preset…", agent actions), `<` opens the macro tags, `@` opens the registered projects, `#` opens the open project's files. The placeholder spells all four out, so the editor teaches itself.
17+
- **Chips that mean plain text** - anything inserted from a menu shows as a chip but leaves the prompt text exactly as the agent will read it, so nothing downstream is affected by how it was typed.
18+
- **Mentioning is focusing** - picking a project or a file with `@` or `#` also adds it to the agent context; deleting that chip takes it back out, so the prompt and the Context list can never disagree.
19+
- **Presets load in place** - picking a preset replaces the editor's content with the preset's prompt, with no blocking confirmation; the surrounding form is told whether a typed draft was overwritten so it can point out that a single undo brings it back.
20+
- **Enter sends** - Enter and Ctrl/Cmd+Enter send; Shift+Enter inserts a line break. Enter yields wherever it already means something else: choosing from an open suggestion menu, a newline inside a code block, or confirming a text-input-method composition.
21+
- **Markdown while you type** - markdown shortcuts apply live and survive the round trip, and a single newline stays a line break so a preset's one-per-line block does not collapse into a paragraph.
22+
- **Grows with the prompt** - the box rests short and grows with its content up to a cap, then scrolls; a compact variant starts one line tall for the navbar's quick launch.
23+
- **Opening text is a draft, not a value** - text the editor is opened with is applied once, the moment the editor is ready, and never re-applied over what the user has since typed.
24+
25+
## Business logic
26+
27+
### Four typed triggers
28+
29+
#### User story
30+
31+
See `## User story`.
32+
33+
#### Business logic
34+
35+
Typing one of four characters opens a filtered menu:
36+
37+
- `/` — commands. It lists the built-in presets under their slash names, then the user's own custom presets (hinted "saved preset"), then the open project's shared custom presets (hinted "project preset"), then "New preset…" which opens the create dialog with the prompt the user has written so far, then the agent actions. "New preset…" appears only on surfaces that have a create dialog, so the navbar's compact launch does not offer it.
38+
- `<` — the macro tags. Typing a character that matches nothing, or a space, closes the menu, so a stray `<` in ordinary prose is not a trap.
39+
- `@` — the registered projects, at most eight at a time; with none registered the menu says so instead of showing an empty list.
40+
- `#` — the open project's tracked files, repo-relative, at most eight at a time; with no files indexed the menu says so.
41+
42+
Picking a preset loads its prompt; picking anything else inserts a chip followed by a space, ready to keep typing.
43+
44+
### Mentioning is focusing
45+
46+
#### User story
47+
48+
The user names a repo or a file in the prompt and expects the agent to actually be pointed at it — and expects removing that mention to undo it.
49+
50+
#### Business logic
51+
52+
Picking a project adds that project's checkout to the agent context; picking a file adds its repo-relative path. The editor keeps watch over which project and file chips are present: when one disappears — deleted by hand, or wiped out by loading a preset — the context entry it added is removed again.
53+
54+
#### Rationale
55+
56+
The chip was the only visible sign that the agent had been focused on that repo or file. A prompt that silently carried the focus after its chip was gone told the user something untrue.
57+
58+
### Presets load in place
59+
60+
#### User story
61+
62+
The user has typed a draft, then decides to start from a preset instead.
63+
64+
#### Business logic
65+
66+
Loading a preset replaces whatever is in the editor and does not ask for confirmation first. The editor reports back whether it overwrote a non-empty draft, so the surrounding form can note that undo brings the draft back — the replacement is grouped as a single undo step. Loading a built-in preset also passes along whether that preset must start an agent of its own rather than continue the open one.
67+
68+
### Enter sends
69+
70+
#### User story
71+
72+
The user expects the send key to behave the way it does in the coding-agent chat interfaces they already use.
73+
74+
#### Business logic
75+
76+
Enter alone sends the prompt, Shift+Enter inserts a line break, and Ctrl/Cmd+Enter sends from anywhere. Enter does not send while a suggestion menu is open (it picks the highlighted entry), inside a code block (it adds a line), or while a text input method is composing a character (it confirms the composition).
77+
78+
### Accessibility
79+
80+
#### User story
81+
82+
A user on a screen reader gets a properly announced, labelled, multi-line prompt field.
83+
84+
#### Business logic
85+
86+
The editing surface announces itself as a multi-line text box named "Prompt" and carries the placeholder as its announced placeholder; the visible placeholder text is decoration on top of that.
87+
88+
## Before modifying/creating SPEC.md files
89+
90+
You must always read and respect https://raw.githubusercontent.com/brillout/sdd/refs/heads/main/sdd.md
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
What the tests cover: the prompt editor's send keys. Plain Enter sends the prompt while Shift+Enter and Alt+Enter stay editing keys; Ctrl+Enter and Cmd+Enter send as well; Enter is left alone while a suggestion menu is open, which uses it to pick the highlighted entry, and sends again once the menu closes; Enter pressed while a text input method is composing a character never sends.
2+
3+
## Before modifying/creating SPEC.md files
4+
5+
You must always read and respect https://raw.githubusercontent.com/brillout/sdd/refs/heads/main/sdd.md
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
What the tests cover: which tabs the right sidebar offers, and when it is shown at all.
2+
3+
- **A fixed width** — the sidebar holds the same width for every tab, including when a document the agent published pulls it to the Views tab and when the user switches away again.
4+
- **No project, no sidebar.**
5+
- **The Browser tab** is offered for an agent running on this machine with the browser preview on, and never for an agent running on a GitHub Actions runner, even when the preview was requested.
6+
- **Hovering a tab** says what it holds.
7+
- **Every tab is earned** — with no PLAN/TODO documents there is no Docs tab, and when nothing else qualifies either the sidebar itself disappears; a live agent that published a document keeps the sidebar even when every read comes back empty. While the first read is still out the Docs tab stays, so switching projects does not blink the sidebar out and back in.
8+
- **When the launcher shows the documents in its main column**, the sidebar withholds the Docs tab and does not even read them, leaving the rest of the sidebar untouched — and shows no sidebar at all when documents were the only thing it had to offer.
9+
- **A tab that loses its content** does not leave an empty panel: even after the user picked that tab by hand, the sidebar falls back to the first tab that still has content.
10+
11+
## Before modifying/creating SPEC.md files
12+
13+
You must always read and respect https://raw.githubusercontent.com/brillout/sdd/refs/heads/main/sdd.md

0 commit comments

Comments
 (0)