Skip to content

Commit c874d62

Browse files
authored
Merge pull request #5 from Denys/audio-dev-dashboard-unified-agent
Add Field mapping workflow and audio development dashboards
2 parents d605c89 + cba9b40 commit c874d62

63 files changed

Lines changed: 18894 additions & 444 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agent/skills/dvpe-development/README.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ stored as `.dvpe` JSON files and can be exported to C++ firmware for Daisy Field
1414
Without a structured design workflow, two problems repeat every time:
1515

1616
- **Wrong block selected** — e.g., `reverb` instead of `reverb_sc`, or `filter` instead of `svf`.
17-
The DVPE block library has 108+ blocks with specific `definitionId` strings. Guessing the ID
18-
produces broken `.dvpe` files that won't load.
17+
The live DVPE block library is exported with `py -3 execution\dvpe_cli.py blocks export`.
18+
Guessing the ID produces broken `.dvpe` files that won't load.
1919
- **Unvalidated signal flow** — connections drawn between incompatible port types (`audio` vs `cv`
2020
vs `trigger`) only become obvious after attempting to generate C++.
2121
- **Hardware mismatches** — generating a Field patch with an encoder block (Field has no encoder),
@@ -125,11 +125,11 @@ You can refine any diagram before advancing. Gate does not self-advance.
125125

126126
For every Audio Flow node, Claude:
127127

128-
1. Looks up the `definitionId` in the Block Catalog (108+ blocks)
129-
2. Verifies the block exists in `BlockRegistry.ts`
128+
1. Runs `py -3 execution\dvpe_cli.py blocks export`
129+
2. Verifies the block exists in `.tmp/block_library.json`
130130
3. Flags any unmapped node with the nearest available alternative
131-
4. Generates `.dvpe` JSON following SCHEMA.md rules
132-
5. Validates the schema checklist (6 common mistakes) before declaring done
131+
4. Generates `.dvpe` JSON using the current block and port IDs
132+
5. Runs `py -3 execution\dvpe_cli.py patch validate <file.dvpe>` before declaring done
133133

134134
Output is saved to `_block_diagrams_code/{patch_name}.dvpe`.
135135

@@ -203,9 +203,9 @@ After Claude presents all 3 Mermaid diagrams, your options:
203203
OLED visualization, correct LED indexing, and other FieldUX requirements. Always pass it
204204
through `/daisy-qae` before flashing to hardware.
205205

206-
- **Don't guess `definitionId` strings.** The Block Catalog in SKILL.md lists all 108+
207-
verified IDs. Using a made-up ID (like `"reverb"` instead of `"reverb_sc"`) produces a
208-
`.dvpe` that fails to load silently.
206+
- **Don't guess `definitionId` strings.** Treat the SKILL.md catalog as a quick reference only.
207+
Run `py -3 execution\dvpe_cli.py blocks export` and validate generated files with
208+
`py -3 execution\dvpe_cli.py patch validate <file.dvpe>`.
209209

210210
- **Don't skip Diagram A for "simple patches."** Simple patches still run on real hardware.
211211
The block diagram catches platform mismatches (Field vs Pod), MIDI assumptions, and OLED
@@ -215,7 +215,8 @@ After Claude presents all 3 Mermaid diagrams, your options:
215215

216216
## Block Catalog Quick Reference
217217

218-
Full catalog with all `definitionId` strings is in SKILL.md. Key blocks by use case:
218+
This is a quick reference. The current catalog is `.tmp/block_library.json` after running
219+
`py -3 execution\dvpe_cli.py blocks export`. Key blocks by use case:
219220

220221
### Synthesis Starting Points
221222

@@ -334,22 +335,23 @@ the DVPE workflow.
334335
```
335336
.claude/skills/dvpe-development/
336337
├── README.md ← This file
337-
├── SKILL.md ← Mermaid-First Rule + 4 modes + Block Catalog + Platform Reference
338+
├── SKILL.md ← Mermaid-First Rule + 4 modes + CLI validation rule + quick reference
338339
└── EXAMPLES.md ← 3 complete workflow traces + anti-pattern table
339340
```
340341

341342
---
342343

343344
## Extending the Skill
344345

345-
### Adding a new block to the catalog
346+
### Adding a new block
346347

347348
When a new block is added to `dvpe_CLD/src/core/blocks/definitions/`:
348349

349350
1. Find its `id` property in the `.ts` definition file
350-
2. Add it to the Block Catalog in SKILL.md under the appropriate category
351-
3. Note LGPL status if applicable
352-
4. Add to EXAMPLES.md if it introduces a new usage pattern
351+
2. Run `py -3 execution\dvpe_cli.py blocks export`
352+
3. Run `py -3 execution\dvpe_cli.py skill check`
353+
4. Update the SKILL.md quick reference only if it is useful for humans
354+
5. Add to EXAMPLES.md if it introduces a new usage pattern
353355

354356
### Adding a new platform
355357

@@ -374,4 +376,4 @@ If a 4th diagram type becomes useful (e.g., memory layout for delay-heavy patche
374376
*Part of the DVPE project.*
375377
*See also: `daisy-qae` skill for production firmware quality assurance.*
376378
*Block definitions: `dvpe_CLD/src/core/blocks/definitions/`*
377-
*Schema: `_block_diagrams_code/SCHEMA.md`*
379+
*Validation CLI: `execution/dvpe_cli.py`*

.agent/skills/dvpe-development/SKILL.md

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,24 @@ override the rule. The diagrams take 5 minutes and prevent wrong block connectio
3434

3535
---
3636

37+
## Runtime Validation Rule
38+
39+
The block catalog below is a human quick reference only. Before trusting a
40+
`definitionId`, port ID, generated `.dvpe`, or fixture, validate against the
41+
live repo CLI:
42+
43+
```powershell
44+
py -3 execution\dvpe_cli.py blocks export
45+
py -3 execution\dvpe_cli.py patch validate <file.dvpe>
46+
py -3 execution\dvpe_cli.py skill check
47+
```
48+
49+
The exported `.tmp/block_library.json` and `patch validate` output are the
50+
current source of truth. If this document disagrees with the CLI, follow the
51+
CLI and update the skill.
52+
53+
---
54+
3755
## When to Use
3856

3957
Trigger this skill when the user:
@@ -144,7 +162,7 @@ OUT[audio_output] → block definitionId = "audio_output"
144162

145163
For every node in the Audio Flow diagram:
146164

147-
1. Find matching `definitionId` in the Block Catalog below
165+
1. Run `py -3 execution\dvpe_cli.py blocks export` and find matching `definitionId`
148166
2. If found → include in .dvpe blocks array
149167
3. If NOT found → flag it:
150168
- Suggest nearest available block
@@ -172,7 +190,13 @@ Follow the schema exactly (see Schema Quick Reference below).
172190

173191
### Step 3 — Schema Validation Checklist
174192

175-
Before declaring MODE 2 done, verify:
193+
Before declaring MODE 2 done, run:
194+
195+
```powershell
196+
py -3 execution\dvpe_cli.py patch validate _block_diagrams_code\{patch_name}.dvpe
197+
```
198+
199+
Also verify:
176200

177201
- [ ] Top-level `"version": "1.0.0"` present
178202
- [ ] All blocks wrapped inside `"patch": { "blocks": [...] }` (not top-level)
@@ -256,7 +280,11 @@ Step 5: Handoff to /daisy-qae
256280

257281
## Block Catalog
258282

259-
Complete `definitionId` reference. Source of truth: `dvpe_CLD/src/core/blocks/BlockRegistry.ts`
283+
Human quick reference only. The live source of truth is:
284+
285+
```powershell
286+
py -3 execution\dvpe_cli.py blocks export
287+
```
260288

261289
`*` = LGPL module — requires `USE_DAISYSP_LGPL = 1` in Makefile
262290

@@ -311,8 +339,8 @@ Complete `definitionId` reference. Source of truth: `dvpe_CLD/src/core/blocks/Bl
311339
| `distortion` | Hard distortion |
312340
| `bitcrush` | Bit crusher (bit depth reduction) |
313341
| `decimator` | Sample rate decimator |
314-
| `soft_clip` | Soft clipping waveshaper |
315-
| `hard_clip` | Hard clipping waveshaper |
342+
| `softclip` | Soft clipping waveshaper |
343+
| `hardclip` | Hard clipping waveshaper |
316344
| `wavefolder` | Wavefolder |
317345
| `fold` | Simple fold distortion |
318346
| `rectifier` | Half/full wave rectifier |
@@ -353,7 +381,7 @@ Complete `definitionId` reference. Source of truth: `dvpe_CLD/src/core/blocks/Bl
353381
| `sample_hold` | Sample and hold |
354382
| `envelope_follower` | Envelope follower |
355383
| `gate_length` | Gate duration control |
356-
| `fsm4` | 4-state finite state machine |
384+
| `fsm_4` | 4-state finite state machine |
357385

358386
### Dynamics
359387

@@ -631,8 +659,8 @@ These requests violate the Mermaid-first rule. Redirect to the correct stage.
631659
- `dvpe_CLD/src/core/blocks/BlockRegistry.ts` — authoritative block ID list
632660
- `dvpe_CLD/src/core/blocks/definitions/` — individual block definition files
633661
- `dvpe_CLD/src/codegen/CodeGenerator.ts` — C++ generation logic
634-
- `_block_diagrams_code/SCHEMA.md`complete schema documentation
635-
- `_block_diagrams_code/template.dvpe`minimal valid .dvpe example
662+
- `execution/dvpe_cli.py`live block export, `.dvpe` validation, fixture generation, and skill drift checks
663+
- `.tmp/block_library.json`generated block reference after `py -3 execution\dvpe_cli.py blocks export`
636664

637665
### Directives
638666

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
node_modules/
33
**/node_modules/
44
package-lock.json
5+
!dvpe_CLD/package-lock.json
56

67
# === Build Outputs ===
78
dist/

0 commit comments

Comments
 (0)