Skip to content

feat(schemas): add LinkML schemas for REP annotation types#49

Merged
IanMayo merged 6 commits intomainfrom
claude/docs-backlog-item-007-8LxfW
Jan 18, 2026
Merged

feat(schemas): add LinkML schemas for REP annotation types#49
IanMayo merged 6 commits intomainfrom
claude/docs-backlog-item-007-8LxfW

Conversation

@IanMayo
Copy link
Member

@IanMayo IanMayo commented Jan 18, 2026

Summary

  • Add LinkML schemas for 6 REP annotation types (prerequisite for item 007)
  • Create idea file documenting REP special comments feature (item 007)
  • Use spatial-friendly geometries (Polygon for Circle, LineString for Vector)

Annotation Types Added

Type Geometry Purpose
NarrativeEntry Point (optional) Timestamped log entries
CircleAnnotation Polygon Circular regions with center+radius
RectangleAnnotation Polygon Rectangular regions
LineAnnotation LineString Line segments
TextAnnotation Point Text labels at position
VectorAnnotation LineString Vectors with origin+range+bearing

Design Decision

Circle and Vector use spatial-operation-friendly geometries:

  • Circle: Polygon (8 vertices) with center and radius in properties
  • Vector: LineString (2 points) with origin, range, bearing in properties

This enables standard GeoJSON spatial operations (overlap, containment) while preserving precise reconstruction data.

Test plan

  • Verify LinkML YAML syntax is valid
  • Run schema generation (Pydantic, TypeScript, JSON Schema)
  • Validate fixtures against generated models
  • Run existing schema tests

🤖 Generated with Claude Code

claude and others added 6 commits January 17, 2026 10:41
Create detailed background documentation for backlog item 007 which
covers implementing REP file special comments (NARRATIVE, CIRCLE, etc.).

The idea file documents:
- Problem: REP parser currently skips annotation comments
- REP special comment format specification
- Proposed implementation approach
- GeoJSON mapping for each annotation type
- Success criteria and constraints
- Dependency on item 015 (annotation schemas)

Updates BACKLOG.md to link item 007 to the new idea file.
Implements backlog item 015 - prerequisite schemas for REP special comments.

New annotation types:
- NarrativeEntry: timestamped log/narrative entries with optional geometry
- CircleAnnotation: circular regions (Point + radius)
- RectangleAnnotation: rectangular regions (Polygon)
- LineAnnotation: line segments (LineString)
- TextAnnotation: text labels at a position (Point)
- VectorAnnotation: vectors from origin (Point + range/bearing)

Changes:
- Add annotations.yaml with 6 annotation type schemas
- Extend FeatureKindEnum with new discriminator values
- Update debrief.yaml to import annotations module
- Update generate.py to generate per-entity JSON schemas
- Add valid/invalid fixtures for each annotation type
- Update test_golden.py with new entity mappings

This enables item 007 (REP file special comments parsing) to proceed.
Design change based on architectural review:

CircleAnnotation:
- Changed geometry from Point to Polygon (8 vertices at 45-degree intervals)
- Added center property [lon, lat] for precise reconstruction
- Radius preserved in properties for smooth rendering regeneration
- Enables standard spatial operations (overlap, containment, intersection)

VectorAnnotation:
- Changed geometry from Point to LineString (origin to endpoint)
- Added origin property [lon, lat] for precise reconstruction
- Range and bearing preserved for exact vector reconstruction
- Makes vector's "line of effect" directly queryable

This approach stores features in spatial-operation-friendly formats while
preserving the precise mathematical definitions for smooth rendering.
@IanMayo IanMayo merged commit dc5d70f into main Jan 18, 2026
8 checks passed
@IanMayo IanMayo deleted the claude/docs-backlog-item-007-8LxfW branch January 18, 2026 15:54
IanMayo pushed a commit that referenced this pull request Jan 18, 2026
Update spec with clarification from session 2026-01-18:
- Annotation schemas are in shared/schemas/src/linkml/annotations.yaml
- Schemas completed in PR #49 (no longer a blocking dependency)
- Updated FR-004, SC-003, Assumptions, and Dependencies sections
IanMayo pushed a commit that referenced this pull request Feb 6, 2026
…ec campaign

The actual execution of scanning debrief/debrief, classifying trigger types,
capturing golden I/O, and authoring language-neutral specs for all migrateable
tools. Builds on #49 (documentation model) and #50 (workflow infrastructure).
SRD at docs/tool-migration/TOOL-LIBRARY-SRD.md.

https://claude.ai/code/session_01N8R1tC59VnDHfmfTftVwrx
IanMayo pushed a commit that referenced this pull request Feb 7, 2026
New backlog item for a language-neutral tool spec that measures range
and bearing from a selected track-position to the closest-in-time
point on another track. Uses snap-to-nearest semantics and follows
the #49 tool documentation model. Depends on nested child selection
from #53.

https://claude.ai/code/session_01G2imkCCcHUWD5SiDMH9E7M
IanMayo pushed a commit that referenced this pull request Feb 7, 2026
Batch addition of language-neutral tool specs for provenance-ready
operations:
- #56 Move shape (direction + distance, default East/5km)
- #57 Enlarge shape (origin + scale, default centroid/3x)
- #58 Flip shape horizontal
- #59 Flip shape vertical
- #60 Resample track (interval, default 1 min)
- #61 Generate courses and speeds for track

All follow #49 tool documentation model. Approved — extend calc
tool library and enable scientist self-service.

https://claude.ai/code/session_01G2imkCCcHUWD5SiDMH9E7M
IanMayo pushed a commit that referenced this pull request Feb 11, 2026
Python (services/calc):
- move_shape.py: @tool-decorated Vincenty great-circle translation
- Handles CIRCLE (center), RECTANGLE, LINE, TEXT, VECTOR (origin/range/bearing)
- 18 pytest tests: all annotation kinds, edge cases, antimeridian wrap

TypeScript (apps/vscode + apps/web-shell):
- moveShape.ts: MCPToolDefinition + execute function mirroring Python
- Registered in web-shell toolService for in-browser execution

Spec (shared/tools/shape/manipulation):
- move-shape.1.0.md: 9-section tool spec following #49 template
- 2 golden I/O example pairs (circle + vector)

https://claude.ai/code/session_01MpdSixienRVLdfZofZ8GcQ
IanMayo pushed a commit that referenced this pull request Feb 13, 2026
Creates language-neutral spec for shape scaling tool following #49
tool documentation model. Includes user scenarios, 19 functional
requirements, golden I/O expectations, and quality checklist.
Updates BACKLOG.md: status approved → specified.

https://claude.ai/code/session_01V1LKePNSwuEXTXvjhArDuq
IanMayo pushed a commit that referenced this pull request Feb 13, 2026
Creates language-neutral spec for shape scaling tool following #49
tool documentation model. Includes user scenarios, 19 functional
requirements, golden I/O expectations, and quality checklist.
Updates BACKLOG.md: status approved → specified.

https://claude.ai/code/session_01V1LKePNSwuEXTXvjhArDuq
IanMayo pushed a commit that referenced this pull request Feb 13, 2026
Creates language-neutral spec for shape scaling tool following #49
tool documentation model. Includes user scenarios, 19 functional
requirements, golden I/O expectations, and quality checklist.
Updates BACKLOG.md: status approved → specified.

https://claude.ai/code/session_01V1LKePNSwuEXTXvjhArDuq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants