Skip to content

Commit d066635

Browse files
{"schema":"maestro/commit/1","summary":"align docs taxonomy cleanup","authority":"manual"}
1 parent 58465bf commit d066635

13 files changed

Lines changed: 162 additions & 95 deletions

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ First-run onboarding checklist:
136136
- Voxit uses request buttons to guide you through the permission prompts in sequence (Microphone → Accessibility → Input Monitoring); grant each permission and re-check when prompted.
137137
- Verify paste flow after permission grant and restart the app if needed.
138138

139-
For the full guided sequence, see [First Run](docs/runbook/first-run.md).
139+
For the full guided sequence, see
140+
[First-Run Onboarding](docs/runbook/first-run-onboarding.md).
140141

141142
The app saves updates to the same `config.toml` path when settings are changed.
142143

@@ -172,10 +173,9 @@ The app saves updates to the same `config.toml` path when settings are changed.
172173

173174
### Docs
174175

175-
- [Documentation Index](docs/index.md) routes to spec, runbook, reference, and decision docs.
176+
- [Documentation Index](docs/index.md) routes to spec, runbook, and reference docs.
176177
- [Runtime Spec](docs/spec/runtime.md) is the normative runtime contract.
177-
- [First Run](docs/runbook/first-run.md) covers sign-in, permission grants, and paste validation.
178-
- [Repository Layout](docs/reference/repository-layout.md) maps the current repo surfaces.
178+
- [Workspace Layout](docs/reference/workspace-layout.md) maps the current repo surfaces.
179179

180180
## Support Me
181181

docs/decisions/index.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

docs/index.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,17 @@ workflows. The split below is by question type, not by human-versus-agent audien
99

1010
- Read `README.md` first when you need the repository scope, platform target, or
1111
top-level runtime summary.
12+
- Use `cargo make` whenever an equivalent repo task exists. When task details matter,
13+
inspect `Makefile.toml` directly.
1214
- Read `docs/policy.md` for document contracts, placement rules, and naming rules.
13-
- Use `cargo make` whenever an equivalent repo task exists. Inspect `Makefile.toml`
14-
directly when task names or execution entrypoints matter.
15+
- Read `Makefile.toml` when the task depends on repo task names or execution entrypoints.
1516
- Then choose one primary lane:
1617
- `docs/spec/index.md` when the question is "what must be true?"
1718
- `docs/runbook/index.md` when the question is "which sequence should I execute?"
1819
- `docs/reference/index.md` when the question is "how is it currently organized or
1920
implemented?"
20-
- `docs/decisions/index.md` when the question is "why is it shaped this way?"
21+
- Use `docs/plans/` only when a planning tool or execution workflow explicitly points to
22+
a saved plan artifact there.
2123

2224
## Routing matrix
2325

@@ -27,17 +29,16 @@ workflows. The split below is by question type, not by human-versus-agent audien
2729
-> `docs/runbook/`
2830
- Need current repository layout, ownership boundaries, or implementation surface maps ->
2931
`docs/reference/`
30-
- Need durable rationale, tradeoffs, or historical consequences -> `docs/decisions/`
3132
- Need repo task names or automation entrypoints -> `Makefile.toml`
3233
- Need documentation placement or authoring rules -> `docs/policy.md`
34+
- Need a planning-tool artifact or saved execution plan -> `docs/plans/`
3335

3436
## Retrieval rules
3537

3638
- Optimize for agent routing and execution, not narrative flow.
3739
- Keep one authoritative document per topic. Link instead of copying.
38-
- Runtime and behavior authority lives in code plus `docs/spec/`. Runbook, reference,
39-
and decision docs explain usage, current state, and rationale, but do not override the
40-
governing spec.
40+
- Keep runtime authority explicit: application and package crates plus `docs/spec/`
41+
outrank runbook, reference, and plan artifacts.
4142
- Start each document with a short routing header that says what the document is for,
4243
when to read it, and what it does not cover.
4344
- Keep links explicit and stable.

docs/plans/.gitkeep

Whitespace-only changes.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Audio Input Device Selection Design
2+
3+
## Scope
4+
5+
Document the implemented behavior for choosing and persisting the microphone used for recording, including fallback and UX constraints.
6+
7+
## UX
8+
9+
- The runtime control panel shows a microphone section with:
10+
- A **Refresh microphones** button to re-enumerate available input devices.
11+
- A **Input device** combo box rendered from discovered devices and a **System default** option.
12+
- Combo text conventions:
13+
- `System default` corresponds to no explicit device override.
14+
- Discovered item labels follow `name (id)`.
15+
- If the selected ID is no longer in the list, the fallback label uses `Device #<id>` or the persisted `audio.input_device_name`.
16+
- Changing selection updates config immediately and persists it.
17+
- Recording status should expose fallback when it happens:
18+
- e.g., `Selected microphone unavailable. Falling back to default: <name>.`
19+
20+
## Config contract
21+
22+
- Keys under `[audio]`:
23+
- `audio.input_device_id` (number, `0` => use system default).
24+
- `audio.input_device_name` (string, best-effort human-readable label).
25+
- Default state:
26+
- `audio.input_device_id = 0`.
27+
- `audio.input_device_name = ""`.
28+
- Persistence:
29+
- Both keys are serialized in config writes.
30+
- On load, missing/invalid keys fall back to defaults.
31+
- Resolution rules:
32+
- If `audio.input_device_id == 0`, recording uses the platform default microphone.
33+
- If non-zero, app attempts that ID.
34+
35+
## Fallback and constraints
36+
37+
- If configured `audio.input_device_id` is invalid, disconnected, or lacks input scope at session start:
38+
- selection falls back to default input device.
39+
- recording proceeds with `fallback_to_default = true`.
40+
- status/logging reports the fallback.
41+
- If the device enumeration call fails or returns empty:
42+
- combo still supports **System default** path.
43+
- no devices can be shown/selected from the list.
44+
- Non-macOS paths currently do not support mic capture and are not in-scope for picker functionality.
45+
46+
## Acceptance criteria
47+
48+
- Picker always presents **System default** and any available input-capable device list.
49+
- Selection persists and survives restart via `audio.input_device_name` + `audio.input_device_id`.
50+
- Session start is deterministic when configured devices are unavailable.
51+
- Fallback behavior is transparent in status/log output.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Audio Input Device Selection Implementation Plan
2+
3+
## Goal
4+
5+
Deliver and document the implemented microphone picker behavior, aligned to current code paths and config contract.
6+
7+
## High-level execution steps
8+
9+
1. Confirm configuration parsing and serialization for audio keys
10+
- Ensure `audio.input_device_id` and `audio.input_device_name` are preserved in `AudioConfig`.
11+
- Keep defaults as:
12+
- `input_device_id = 0`
13+
- `input_device_name = ""`
14+
- Keep parse/serialize behavior unchanged except for explicit persistence of these keys.
15+
16+
2. Confirm audio module selection path
17+
- Keep `list_input_devices()` returning all input-capable devices (sorted for deterministic order).
18+
- Keep `resolve_input_device()` behavior:
19+
- `None` => default input.
20+
- explicit ID => selected if still input-capable.
21+
- explicit invalid/missing ID => system default with `fallback_to_default = true`.
22+
- Keep `start_recording_with_stream()` returning `InputDeviceSelection`.
23+
24+
3. Wire app startup and picker state sync
25+
- Refresh microphone list on startup and before user interaction via `refresh_input_devices()`.
26+
- Keep `sync_input_device_name()` behavior so persisted names are repaired to current label when possible.
27+
- Keep `selected_input_device_label()` as canonical display formatting.
28+
29+
4. Implement picker UI behavior
30+
- Keep `Refresh microphones` action tied to `refresh_input_devices()`.
31+
- Keep combo options:
32+
- `System default` mapped to `0`.
33+
- discovered device ids mapped to list entries.
34+
- On selection change:
35+
- write `config.audio.input_device_id`.
36+
- write `config.audio.input_device_name` for UI readability.
37+
- call `persist_config()`.
38+
39+
5. Apply startup-time fallback into recording flow
40+
- In `start_recording()`, pass optional configured id using `configured_input_device_id()`.
41+
- When `InputDeviceSelection` reports fallback:
42+
- prepend fallback notice in status text.
43+
- keep recorder + realtime session on fallback path.
44+
- Continue to proceed with Pass2/Pass3 flow once recorder starts.
45+
46+
6. Preserve diagnostics and constraints
47+
- Keep user-facing status updates for:
48+
- empty/failed refreshes,
49+
- fallback-to-default behavior,
50+
- non-macOS unsupported recording path.
51+
- Keep behavior aligned with non-breaking UI contract and existing restart/reload behavior.
52+
53+
## Validation scope (manual, no test rewrite)
54+
55+
- Update docs/plans only; no code edits in this slice.
56+
- Verify the two key names are referenced as `audio.input_device_name` and `audio.input_device_id`.

docs/policy.md

Lines changed: 17 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,43 +8,42 @@ The split below is by question type, not by reader type.
88

99
## Primary taxonomy
1010

11+
This repository standardizes on three primary documentation lanes:
12+
1113
| Lane | Location | Answers | Holds |
1214
| --- | --- | --- | --- |
1315
| Spec | `docs/spec/` | What must be true? | Contracts, schemas, invariants, required behavior |
1416
| Runbook | `docs/runbook/` | Which sequence should I execute? | Operational procedures, onboarding steps, validation flows, recovery steps |
1517
| Reference | `docs/reference/` | How is it currently organized or implemented? | Repository layout, surface maps, current implementation boundaries |
16-
| Decisions | `docs/decisions/` | Why is it shaped this way? | Durable rationale, tradeoffs, and consequences |
18+
19+
## Artifact lanes
20+
21+
- `docs/plans/` is allowed for plan artifacts that are explicitly produced or consumed by
22+
a planning workflow.
23+
- `docs/plans/` is not a primary documentation lane and is not authoritative for runtime
24+
behavior, repository policy, or operator procedures.
1725

1826
## Placement rules
1927

2028
- If a document defines correctness, it belongs in `docs/spec/`.
2129
- If a document defines operator actions, it belongs in `docs/runbook/`.
2230
- If a document describes current structure, ownership, or implementation boundaries, it
2331
belongs in `docs/reference/`.
24-
- If a document records durable rationale or tradeoffs, it belongs in
25-
`docs/decisions/`.
26-
- If a document drifts across lanes, split it instead of stretching one file to answer
27-
several question types.
2832
- Do not duplicate authoritative content across lanes. Link to the source of truth.
29-
- Do not add `docs/plans/` back. Transient planning artifacts are not part of the
30-
durable docs tree in this repository.
3133

3234
## Naming rules
3335

34-
- Directory names express document lane.
36+
- Directory names express document type.
3537
- File names express stable topic.
3638
- Use lowercase kebab-case for document file names.
37-
- Keep primary-lane file names short and topic-first.
38-
- Do not encode temporary versions such as `v1`, `draft2`, or dates into primary-lane
39-
file names.
39+
- Do not encode temporary versions such as `v0`, `v1`, or `draft2` into stable file
40+
names.
4041
- Do not repeat the directory class in the file name when the topic is already clear.
4142
Prefer `runtime.md` under `docs/spec/` over `runtime-spec.md`.
42-
- Prefer names like `runtime.md`, `first-run.md`, and `repository-layout.md`.
43-
- Keep `index.md` reserved for lane routers.
4443

4544
## Document headers
4645

47-
Every primary-lane document should start with a short routing header.
46+
Every document should start with a short routing header.
4847

4948
Spec header:
5049

@@ -58,9 +57,9 @@ Runbook header:
5857

5958
- `Goal`
6059
- `Read this when`
61-
- `Inputs` or `Preconditions`
60+
- `Preconditions` or `Inputs`
6261
- `Depends on`
63-
- `Outputs` or `Verification`
62+
- `Verification` or `Outputs`
6463

6564
Reference header:
6665

@@ -69,28 +68,18 @@ Reference header:
6968
- `Not this document`
7069
- `Covers`
7170

72-
Decision header:
73-
74-
- `Status`
75-
- `Date`
76-
- `Question`
77-
- `Decision`
78-
- `Consequences`
79-
8071
## Canonical entry points
8172

8273
- Unified router: `docs/index.md`
8374
- Normative router: `docs/spec/index.md`
8475
- Procedural router: `docs/runbook/index.md`
8576
- Current-state router: `docs/reference/index.md`
86-
- Rationale router: `docs/decisions/index.md`
8777
- Repo task and automation entrypoints: `Makefile.toml`
8878

8979
## Update workflow
9080

9181
- Behavior or schema change: update the relevant spec.
9282
- Procedure change: update the relevant runbook.
9383
- Structural or ownership change: update the relevant reference doc.
94-
- Tradeoff or rationale change: update the relevant decision doc.
95-
- If a document starts carrying normative content from another lane, move that content
96-
into the authoritative lane and link to it.
84+
- If a document drifts across lanes, split it instead of stretching one document to do
85+
several jobs.

docs/reference/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ Question this index answers: "how is it currently organized or implemented?"
1515

1616
- You need a normative contract.
1717
- You need an execution sequence or operator runbook.
18-
- You need durable design rationale rather than current-state description.
18+
- You need saved plan artifacts.
1919

2020
## Current reference docs
2121

22-
- [`repository-layout.md`](./repository-layout.md) for the repository surface map and
22+
- [`workspace-layout.md`](./workspace-layout.md) for the repository surface map and
2323
directory ownership boundaries.
Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
# Repository Layout
1+
# Workspace Layout
22

33
Purpose: Describe the current top-level repository surfaces and which concerns each one
44
owns.
55

66
Read this when: You need to know where the app entrypoint, shared packages, repo task
77
definitions, or documentation topics currently live.
88

9-
Not this document: The normative runtime contract, the first-run operator sequence, or
10-
the design rationale behind specific product choices.
9+
Not this document: The normative runtime contract or the onboarding sequence.
1110

12-
Covers: The repository surface map, ownership boundaries, and the role of `apps/`,
11+
Covers: The workspace surface map, ownership boundaries, and the role of `apps/`,
1312
`packages/`, `docs/`, `scripts/`, and repository root policy files.
1413

1514
## Top-level surfaces
@@ -23,7 +22,7 @@ Covers: The repository surface map, ownership boundaries, and the role of `apps/
2322
- `docs/spec/` holds normative runtime and behavior contracts.
2423
- `docs/runbook/` holds operator procedures such as onboarding and validation flows.
2524
- `docs/reference/` holds current repository and implementation surface maps.
26-
- `docs/decisions/` holds durable rationale and tradeoffs behind current design choices.
25+
- `docs/plans/` holds saved plan artifacts rather than governing repository policy.
2726
- `Makefile.toml` holds repo-native task names for lint, test, format, and checks.
2827
- `scripts/` holds repository helper scripts such as local macOS packaging helpers.
2928
- `.github/workflows/` holds CI and release automation.
@@ -32,8 +31,8 @@ Covers: The repository surface map, ownership boundaries, and the role of `apps/
3231

3332
- Runtime authority stays in the application and package crates plus the governing specs
3433
under `docs/spec/`.
35-
- `docs/runbook/`, `docs/reference/`, and `docs/decisions/` must not override runtime
36-
or configuration authority.
34+
- `docs/runbook/` and `docs/reference/` must not override runtime or configuration
35+
authority.
3736
- `Makefile.toml` is the source of truth for named repository tasks.
38-
- Decision docs explain why the system is shaped a certain way; the spec still defines
39-
what must be true at runtime.
37+
- `docs/plans/` can capture design or execution artifacts, but those files do not become
38+
policy until their conclusions are promoted into spec, runbook, or reference docs.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# First Run
1+
# First-Run Onboarding
22

33
Goal: Bring a fresh macOS Voxit install to the point where sign-in, permissions, and
44
paste work end to end.
@@ -69,7 +69,7 @@ $HOME/Library/Application Support/voxit/config.toml
6969

7070
## 6. Failure handling
7171

72-
- If sign-in stalls, reopen the auth surface and retry with the visible-window path.
72+
- If sign-in stalls, reopen the auth surface and retry with the visible window path.
7373
- If a permission does not update, grant it in macOS System Settings and then re-check
7474
from Voxit.
7575
- If paste fails, verify Accessibility and Input Monitoring first before debugging the

0 commit comments

Comments
 (0)