@intentsolutionsio/obsidian-project-documentation 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,329 @@
1
+ # Context Detection Rules
2
+
3
+ This document provides detailed rules for detecting project context from the working environment.
4
+
5
+ ## Project Name Detection
6
+
7
+ ### Priority 1: Explicit User Statement
8
+
9
+ Look for phrases like:
10
+
11
+ - "I'm working on [name]"
12
+ - "This is my [name] project"
13
+ - "Building a [name]"
14
+ - "Let's document my [name] project"
15
+
16
+ Extract the project name directly from these statements.
17
+
18
+ ### Priority 2: Git Repository Name
19
+
20
+ If the current directory is a git repository:
21
+
22
+ ```bash
23
+ # Check if git repo
24
+ git rev-parse --is-inside-work-tree 2>/dev/null
25
+
26
+ # Get repository name
27
+ basename $(git rev-parse --show-toplevel)
28
+ ```
29
+
30
+ **Transform to Title Case:**
31
+
32
+ - `my-arduino-project` → "My Arduino Project"
33
+ - `temperature_sensor` → "Temperature Sensor"
34
+ - `synthesizer-build` → "Synthesizer Build"
35
+
36
+ **Also check README.md first heading:**
37
+
38
+ ```bash
39
+ head -10 README.md | grep "^# " | sed 's/^# //'
40
+ ```
41
+
42
+ **Or package.json name/description:**
43
+
44
+ ```bash
45
+ cat package.json | grep -E '"name"|"description"'
46
+ ```
47
+
48
+ ### Priority 3: Directory Name
49
+
50
+ Use the current directory name or parent directory if current is generic:
51
+
52
+ ```bash
53
+ # Get current directory name
54
+ basename $(pwd)
55
+
56
+ # If current is generic (src, build, lib, etc.), use parent
57
+ CURRENT=$(basename $(pwd))
58
+ if [[ "$CURRENT" =~ ^(src|build|lib|dist|bin|test|tests)$ ]]; then
59
+ basename $(dirname $(pwd))
60
+ else
61
+ echo "$CURRENT"
62
+ fi
63
+ ```
64
+
65
+ ### Priority 4: Ask User
66
+
67
+ If none of the above provide a clear name, or if multiple candidates exist, ask:
68
+
69
+ "What would you like to name this project in your Obsidian vault?"
70
+
71
+ ## Area Classification
72
+
73
+ ### Hardware
74
+
75
+ **File Extensions:**
76
+
77
+ - `.ino` - Arduino sketches
78
+ - `.cpp`, `.h` - C++ (embedded context)
79
+ - `.pcb` - PCB design files
80
+ - `.sch` - Schematic files
81
+
82
+ **Configuration Files:**
83
+
84
+ - `platformio.ini` - PlatformIO projects
85
+ - `arduino_secrets.h` - Arduino projects
86
+ - `Makefile` (with avr-gcc, arm-none-eabi)
87
+
88
+ **Keywords in files/directories:**
89
+
90
+ - arduino, esp32, esp8266, teensy
91
+ - circuit, pcb, schematic, breadboard
92
+ - sensor, actuator, microcontroller
93
+ - i2c, spi, uart, serial
94
+
95
+ **Detection command:**
96
+
97
+ ```bash
98
+ find . -maxdepth 2 \( -name "*.ino" -o -name "platformio.ini" -o -name "*.pcb" \) 2>/dev/null
99
+ ```
100
+
101
+ ### Software
102
+
103
+ **File Extensions:**
104
+
105
+ - `.js`, `.ts` - JavaScript/TypeScript
106
+ - `.py` - Python
107
+ - `.go` - Go
108
+ - `.rs` - Rust
109
+ - `.java` - Java
110
+ - `.rb` - Ruby
111
+ - `.php` - PHP
112
+
113
+ **Configuration Files:**
114
+
115
+ - `package.json` - Node.js projects
116
+ - `requirements.txt`, `setup.py` - Python projects
117
+ - `Cargo.toml` - Rust projects
118
+ - `go.mod` - Go projects
119
+ - `pom.xml`, `build.gradle` - Java projects
120
+
121
+ **Keywords:**
122
+
123
+ - api, backend, frontend, database
124
+ - server, client, web, mobile
125
+ - framework, library, npm, pip
126
+
127
+ **Detection command:**
128
+
129
+ ```bash
130
+ find . -maxdepth 2 \( -name "package.json" -o -name "requirements.txt" -o -name "Cargo.toml" -o -name "*.py" -o -name "*.js" \) 2>/dev/null
131
+ ```
132
+
133
+ ### Woodworking
134
+
135
+ **File Extensions:**
136
+
137
+ - `.stl` - 3D model files
138
+ - `.obj` - 3D object files
139
+ - `.blend` - Blender files
140
+ - `.f3d` - Fusion 360 files
141
+ - `.skp` - SketchUp files
142
+
143
+ **Documentation Files:**
144
+
145
+ - `cut-list.md`, `cut-list.txt`
146
+ - `materials.md`, `materials.txt`
147
+ - `dimensions.md`
148
+
149
+ **Keywords:**
150
+
151
+ - joinery, dovetail, mortise, tenon
152
+ - finish, stain, polyurethane
153
+ - wood, lumber, hardwood, plywood
154
+ - table, saw, router, planer
155
+ - shop, workshop, woodshop
156
+
157
+ **Detection command:**
158
+
159
+ ```bash
160
+ find . -maxdepth 2 \( -name "*.stl" -o -name "*.blend" -o -name "*.f3d" -o -name "cut-list.md" \) 2>/dev/null
161
+ ```
162
+
163
+ ### Music Synthesis
164
+
165
+ **File Extensions:**
166
+
167
+ - `.pd` - Pure Data patches
168
+ - `.maxpat` - Max/MSP patches
169
+ - `.syx` - SysEx MIDI files
170
+ - `.fxp` - VST preset files
171
+ - `.amxd` - Ableton Max for Live devices
172
+
173
+ **Documentation Files:**
174
+
175
+ - `patch-notes.md`
176
+ - `tuning-table.txt`
177
+ - `modulation-matrix.md`
178
+
179
+ **Keywords:**
180
+
181
+ - oscillator, vco, vca, vcf
182
+ - filter, envelope, lfo, modulation
183
+ - modular, eurorack, synthesizer
184
+ - patch, voice, cv, gate
185
+ - midi, synthesis, synth
186
+
187
+ **Detection command:**
188
+
189
+ ```bash
190
+ find . -maxdepth 2 \( -name "*.pd" -o -name "*.maxpat" -o -name "*.syx" -o -name "patch-notes.md" \) 2>/dev/null
191
+ ```
192
+
193
+ ## Area Detection Algorithm
194
+
195
+ 1. Run all detection commands in parallel
196
+ 2. Count matches for each area
197
+ 3. If one area has significantly more matches (3+), classify as that area
198
+ 4. If Hardware AND Software both match, ask user (could be embedded software)
199
+ 5. If no clear winner or no matches, ask user to choose
200
+
201
+ Example:
202
+
203
+ ```bash
204
+ HW=$(find . -maxdepth 2 \( -name "*.ino" -o -name "platformio.ini" \) 2>/dev/null | wc -l)
205
+ SW=$(find . -maxdepth 2 \( -name "package.json" -o -name "*.py" -o -name "*.js" \) 2>/dev/null | wc -l)
206
+ WW=$(find . -maxdepth 2 \( -name "*.stl" -o -name "*.blend" \) 2>/dev/null | wc -l)
207
+ MS=$(find . -maxdepth 2 \( -name "*.pd" -o -name "*.maxpat" \) 2>/dev/null | wc -l)
208
+
209
+ if [ $HW -gt 0 ] && [ $HW -gt $SW ] && [ $HW -gt $WW ] && [ $HW -gt $MS ]; then
210
+ AREA="Hardware"
211
+ elif [ $SW -gt 0 ] && [ $SW -gt $HW ] && [ $SW -gt $WW ] && [ $SW -gt $MS ]; then
212
+ AREA="Software"
213
+ elif [ $WW -gt 0 ] && [ $WW -gt $HW ] && [ $WW -gt $SW ] && [ $WW -gt $MS ]; then
214
+ AREA="Woodworking"
215
+ elif [ $MS -gt 0 ] && [ $MS -gt $HW ] && [ $MS -gt $SW ] && [ $MS -gt $WW ]; then
216
+ AREA="Music Synthesis"
217
+ else
218
+ # Ask user
219
+ echo "Could not determine project area. Please choose: Hardware, Software, Woodworking, or Music Synthesis"
220
+ fi
221
+ ```
222
+
223
+ ## Description Extraction
224
+
225
+ ### From README.md
226
+
227
+ ```bash
228
+ # Get first paragraph after title
229
+ sed -n '/^# /,/^$/p' README.md | tail -n +2 | head -n 3
230
+ ```
231
+
232
+ ### From package.json
233
+
234
+ ```bash
235
+ cat package.json | grep '"description"' | sed 's/.*: "\(.*\)".*/\1/'
236
+ ```
237
+
238
+ ### From Conversation
239
+
240
+ Look for user statements about:
241
+
242
+ - "I'm building..."
243
+ - "This project is for..."
244
+ - "The goal is to..."
245
+ - "I'm trying to..."
246
+
247
+ Extract the sentence as the description.
248
+
249
+ ### Default
250
+
251
+ If no description found, leave blank in template for user to fill in.
252
+
253
+ ## Date Formatting
254
+
255
+ Always use ISO 8601 format: YYYY-MM-DD
256
+
257
+ ```bash
258
+ date +%Y-%m-%d
259
+ # Example: 2025-12-23
260
+ ```
261
+
262
+ ## Path Handling
263
+
264
+ ### Working Directory Detection
265
+
266
+ ```bash
267
+ pwd
268
+ # Example: /Users/alister/projects/my-arduino-project
269
+ ```
270
+
271
+ ### Vault Path
272
+
273
+ Always use the configured vault path from config.json. Convert to absolute path if needed:
274
+
275
+ ```bash
276
+ # If path starts with ~, expand it
277
+ VAULT_PATH="${VAULT_PATH/#\~/$HOME}"
278
+
279
+ # Ensure it exists
280
+ if [ ! -d "$VAULT_PATH" ]; then
281
+ echo "Error: Vault path does not exist: $VAULT_PATH"
282
+ fi
283
+ ```
284
+
285
+ ### File Paths
286
+
287
+ Use forward slashes for cross-platform compatibility. Use absolute paths when writing to vault:
288
+
289
+ ```bash
290
+ # Good
291
+ /Users/alister/Documents/ObsidianVault/Projects/My Project.md
292
+
293
+ # Also good (will expand)
294
+ ~/Documents/ObsidianVault/Projects/My Project.md
295
+
296
+ # Bad (relative paths from unknown location)
297
+ Projects/My Project.md
298
+ ```
299
+
300
+ ## Edge Cases
301
+
302
+ ### Multi-Area Projects
303
+
304
+ If project spans multiple areas (e.g., Hardware + Software for embedded project):
305
+
306
+ - Ask user which area to classify under
307
+ - Suggest creating separate notes if truly distinct
308
+ - Default to primary area if obvious (hardware with software support → Hardware)
309
+
310
+ ### Ambiguous Directory Names
311
+
312
+ If directory name is generic (test, demo, project1):
313
+
314
+ - Check parent directory
315
+ - Check git repo name
316
+ - Check README
317
+ - Ask user as last resort
318
+
319
+ ### No Git Repository
320
+
321
+ Totally fine! Use directory name and continue normally.
322
+
323
+ ### Nested Projects
324
+
325
+ If in a subdirectory of a larger project:
326
+
327
+ - Check if parent has .git
328
+ - Ask user if this is a sub-project or independent project
329
+ - Offer to create sub-project note or main project note
@@ -0,0 +1,42 @@
1
+ ---
2
+ title: {{title}}
3
+ area: {{area}}
4
+ phase: {{phase}}
5
+ started: {{date}}
6
+ updated: {{date}}
7
+ tags: [project, project/{{area_tag}}]
8
+ technologies: []
9
+ related: []
10
+ ---
11
+
12
+ # {{title}}
13
+
14
+ ## Overview
15
+
16
+ {{description}}
17
+
18
+ ## Related Projects
19
+
20
+ <!-- Agent-maintained: cross-project links with brief context. Do not edit manually. -->
21
+
22
+ ## Goals
23
+
24
+ - [ ] Primary goal
25
+ - [ ] Secondary goal
26
+ - [ ] Learning objectives
27
+
28
+ ## Resources
29
+
30
+ Materials/Components/Tools needed
31
+
32
+ ## Reference Links
33
+
34
+ External references, datasheets, articles, and documentation used in this project.
35
+
36
+ ## Updates
37
+
38
+ ### {{date}} {{time}}
39
+
40
+ This titled session is appended at the end of each working session. Notes of accomplishments, key decisions, and
41
+ next steps are written here. These sections provide a history of what happened in previous working sessions and
42
+ evidence of where to pick up again in the next working session.