feat: Feature Observation data extraction for Nidus Notes dictation #156

Closed
ned wants to merge 0 commits from issue-155-feature-observation-parser-v2 into main
Member

What this PR does

Implements the Feature Observation data extraction model (Issue #155) for the Nidus Notes voice dictation system. This is the first of 9 planned observation types, built with an extensible trigger-word dispatch table architecture.

Parser (platform/dictation/)

  • 7 files, ~2450 lines — dispatch table, 47-value habitat enum with aliases, property parsers for all 10 Feature observation properties
  • 17 tests covering all property types, aliases, edge cases, and post-processing

Database

  • Migration 00204: note_feature_observation table with typed columns for all parsed properties, FK to note_audio

API Integration

  • Parser runs automatically after note_audio creation with non-empty transcription
  • Non-blocking: errors logged, not returned to client

Decision log

All trigger word decisions confirmed with @benjaminsperry (clarity: replaces organic:, connection:/connect: aliases, where: alias for origin, producing = provisional flag, denominator = total group quantity).

Closes #155

## What this PR does Implements the Feature Observation data extraction model (Issue #155) for the Nidus Notes voice dictation system. This is the first of 9 planned observation types, built with an extensible trigger-word dispatch table architecture. ### Parser (platform/dictation/) - 7 files, ~2450 lines — dispatch table, 47-value habitat enum with aliases, property parsers for all 10 Feature observation properties - 17 tests covering all property types, aliases, edge cases, and post-processing ### Database - Migration 00204: note_feature_observation table with typed columns for all parsed properties, FK to note_audio ### API Integration - Parser runs automatically after note_audio creation with non-empty transcription - Non-blocking: errors logged, not returned to client ### Decision log All trigger word decisions confirmed with @benjaminsperry (clarity: replaces organic:, connection:/connect: aliases, where: alias for origin, producing = provisional flag, denominator = total group quantity). Closes #155
Implement the first observation type parser for Nidus Notes dictation.
Uses an extensible trigger-word dispatch table architecture supporting
9 planned observation types through registration of new trigger routes.

Parser features:
- Tokenizer segments "property: value" pairs from raw transcription
- Bare text fallback for implicit habitat declarations ("feature: bucket")
- 47-value habitat enum with alias/synonym matching
- 17-value origin, 9-value land use, clarity (renamed from organic),
  flow, connectivity, and vegetation enums
- Water status parser with proportion support ("4 wet 11 dry", "all wet")
- Size dimension parser (length×width×depth, diameter, unit hints)
- Group declaration ("feature: plant saucer group") + auto-group by qty>1
- Provisional flag for producing mentions during Feature observation
- Post-processing pass for habitat-dependent unit resolution
- Raw text preservation for all values to enable future analysis

Implements the architectural decisions confirmed in issue #155:
- "clarity:" replaces "organic:" to avoid phoneme collision with "origin"
- "where:" alias for origin ("source" reserved for Nidus meaning)
- "conn:" alias for connectivity
- Denominator convention: producingProportion always / total quantity
- All "all wet"/"all dry" as syntactic sugar for proportion 1.0
feat: add feature_observation table, parser integration, and API wiring
Some checks failed
/ golint (push) Failing after 5s
/ pnpm-build (push) Successful in 28s
20ad886e51
Adds the persistence layer for the voice dictation extraction parser:

- Migration 00204: creates note_feature_observation table with typed
  columns for all parsed Feature observation properties (habitat,
  quantity, water status, wet-path enums, size, group info, etc.)
- go-jet model, table, and query files for note_feature_observation
- platform/dictation/integrate.go: ParseAndStoreTranscription converts
  ParseResult -> model.NoteFeatureObservation and persists it
- api/audio.go: after note_audio creation with a non-empty transcription,
  invokes the dictation parser to extract and store structured observations

The integration is non-blocking: parse errors are logged but don't fail
the API request. The parser handles cases where no transcription is
present (no-op) or the transcription doesn't contain recognized
observation triggers.
Owner

This isn't the right way to go. I'll explain on the issue.

This isn't the right way to go. I'll explain on the issue.
eliribble closed this pull request 2026-07-22 01:42:16 +00:00
Author
Member

Noted, Eli. I see you closed PR #156 — I will hold off on any changes here until you have had a chance to explain on the issue. In the meantime, I picked up Nidus-iOS issue #1 (PR #2 with the knowledge graph documentation is up) and your comment there should help clarify where you want things to go. Holler when you are ready to discuss the new direction.

Noted, Eli. I see you closed PR #156 — I will hold off on any changes here until you have had a chance to explain on the issue. In the meantime, I picked up Nidus-iOS issue #1 (PR #2 with the knowledge graph documentation is up) and your comment there should help clarify where you want things to go. Holler when you are ready to discuss the new direction.
Some checks failed
/ golint (push) Failing after 5s
/ pnpm-build (push) Successful in 28s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Gleipnir/nidus-sync!156
No description provided.