Guide for developers and AI agents working on the 3D Pen project.
- Obsidian — for navigating the knowledge vault
- Git — version control
- GitHub CLI (
gh) — for PR workflows
- KiCad 8+ — schematic capture and PCB layout
- Fusion 360 — mechanical CAD and simulation
- nRF Connect SDK — firmware development (Zephyr RTOS)
- PyTorch — ML model training
- Rust + Tauri — host application
# Clone
git clone https://github.com/Bunty9/3d-pen.git
cd 3d-pen
# Open the vault in Obsidian
# File → Open Vault → select the docs/ folder
# Navigate from Home.md or 01-Project/3d-pen-MOC.mdThe docs/ directory is an Obsidian vault. All project knowledge lives here.
| Folder | Purpose | Who Writes |
|---|---|---|
00-Inbox/ |
Raw unprocessed notes, conversation dumps | Anyone |
01-Project/ |
Vision, requirements, architecture, design specs | Orchestrator, integration-agent |
02-Research/hardware/ |
Flex PCB, sensors, charging, mechanical design | hardware-agent |
02-Research/embedded/ |
MCU, firmware, wireless protocols, power | embedded-agent |
02-Research/ml/ |
Sensor fusion, training pipeline, inference | ml-agent |
02-Research/software/ |
HID protocol, device drivers, canvas rendering | software-agent |
03-SOPs/ |
Standard operating procedures | Orchestrator |
04-Tools/ |
Tool evaluation documents | Domain agents |
05-Plans/ |
Phase plans, roadmaps | Orchestrator |
06-Decisions/ |
Architecture decision records (ADRs) | integration-agent, review-agent |
07-References/ |
Curated papers, datasheets, links | research-agent |
08-Templates/ |
Note templates for each document type | Orchestrator |
09-Assets/ |
Images, sketches, renders | Anyone |
Every vault note must have YAML frontmatter:
---
title: "Note Title"
domain: "hardware" # hardware | embedded | ml | software | meta
status: "draft" # draft | review | final
created: "2026-02-21"
updated: "2026-02-21"
author: "hardware-agent" # agent name or human name
tags:
- research
- hardware
- sensors
related:
- "[[other-note]]"
---- Use
[[wikilinks]]for internal references - Use
[[path/to/note|Display Name]]for cross-folder links - Never use raw file paths in note content
- External URLs go in the
## Referencessection at the bottom
- Lowercase, hyphen-separated:
sensor-selection.md,flex-pcb-design.md - No spaces, no special characters
- Descriptive names that indicate the note's primary topic
- Vision — understand the product concept
- Requirements — functional and non-functional requirements
- Architecture — system design and data flow
- Hardware Design Spec — physical geometry and materials
- SOP-0001: Vault Contribution — rules for writing notes
- SOP-0002: Multi-Agent Orchestration — agent roles and write scopes
| Agent ID | Domain | Exclusive Write Scope | Tools |
|---|---|---|---|
hardware-agent |
Hardware | 02-Research/hardware/, 04-Tools/tools-hardware.md |
KiCad, LTspice, Fusion 360 |
embedded-agent |
Embedded | 02-Research/embedded/, 04-Tools/tools-embedded.md |
Zephyr, nRF Connect SDK |
ml-agent |
ML | 02-Research/ml/, 04-Tools/tools-ml.md |
PyTorch, ONNX Runtime |
software-agent |
Software | 02-Research/software/, 04-Tools/tools-software.md |
HIDAPI, Tauri, libusb |
integration-agent |
Cross-domain | 01-Project/architecture.md, 01-Project/requirements.md |
— |
review-agent |
Quality | 06-Decisions/ |
— |
orchestrator |
Meta | Home.md, 01-Project/3d-pen-MOC.md, 03-SOPs/, 05-Plans/ |
— |
Before working on a domain task, load the relevant context bundle from CLAUDE.md:
- Hardware Context — pen geometry, component selections, flex PCB constraints
- Embedded Context — MCU specs, wireless protocol math, firmware architecture
- ML Context — model architecture, dataset info, inference latency targets
- Software Context — HID protocol, virtual device creation, canvas rendering
- Copy
08-Templates/_research-note.mdas your starting template - Fill in all frontmatter fields (domain, status, author, tags)
- Write all sections: Summary, Context, Key Findings, Relevance, Open Questions, Recommendations, References
- Include at least 3 references with URLs
- Update
01-Project/3d-pen-MOC.mdwith a link to your new note - Commit with format:
docs({domain}): {description}
docs(hardware): add flex PCB bend radius analysis
docs(embedded): update MCU selection with nRF5340 comparison
docs(ml): add REWI architecture deep-dive
docs(project): update requirements with latency budget
docs(meta): update MOC with new research links
- Schematic capture in KiCad 8
- Flex PCB layout following IPC-2223 bend radius rules
- Component placement must follow the zone map in
hardware-design-spec.md - DFM check with JLCPCB flex PCB capabilities
- Mechanical CAD in Fusion 360 (pen shell, inner shell, nib section)
- Firmware in C using Zephyr RTOS via nRF Connect SDK
- Build with
west build, flash withwest flash - Primary reference: Nordic nRF Desktop application
- DMA-driven ADC for sensor acquisition
- ESB wireless protocol at 2Mbps
- PyTorch for model training
- DVC for data versioning
- OnHW dataset as initial training data (100Hz, needs upsampling for 8kHz)
- ONNX Runtime for desktop inference
- Target: <10ms inference latency
- Host app in Rust + Tauri
- HIDAPI for USB dongle communication
- Virtual HID device per OS (uhid on Linux, VHF on Windows, IOHIDUserDevice on macOS)
- Pointer Events API for canvas rendering
# Check vault health (broken wikilinks)
grep -r '\[\[' docs/ | grep -v node_modules | grep -oP '\[\[([^\]]+)\]\]' | sort -u
# Count documents by domain
find docs/02-Research -name '*.md' | wc -l
# Check frontmatter completeness
grep -rL '^---' docs/02-Research/
# View git history for a domain
git log --oneline -- docs/02-Research/hardware/
# Search across all research notes
grep -ri "ICM-42688" docs/02-Research/The project supports AI-assisted development via MCP servers:
- embedded-debugger-mcp — Flash firmware, read registers, RTT logging on physical hardware
- mcp-gdb — Source-level debugging via GDB
- MCP Inspector — Visual testing of MCP servers
See docs/02-Research/embedded/open-source-firmware.md for configuration details.