Skip to content

Comments

Add enlarge-shape tool specification with golden examples#243

Open
IanMayo wants to merge 10 commits intomainfrom
claude/speckit-start-057-SEg6u
Open

Add enlarge-shape tool specification with golden examples#243
IanMayo wants to merge 10 commits intomainfrom
claude/speckit-start-057-SEg6u

Conversation

@IanMayo
Copy link
Member

@IanMayo IanMayo commented Feb 13, 2026

Summary

This PR adds a complete language-neutral tool specification for the enlarge-shape feature (057), following the #49 tool documentation model. The deliverable includes specification documents, research artifacts, implementation planning, and supporting media content.

Key Changes

Specification Documents (specs/057-enlarge-shape/):

  • spec.md — Feature specification with 4 user stories (scale from centroid, custom origin, no-op, shrink), functional requirements, and edge cases
  • plan.md — Implementation plan with project structure, constitution compliance check, and complexity assessment
  • research.md — Technical research decisions covering scaling algorithm (linear interpolation vs. Vincenty), centroid computation (arithmetic mean), vector annotation handling, and result type naming
  • data-model.md — Entity definitions for ScaleParameters, FeatureCollection input, ToolResponse output, and provenance annotations
  • quickstart.md — Step-by-step guide for implementing the tool spec with scaling formula and validation procedures
  • tasks.md — Detailed task breakdown across 7 phases (Setup, Foundation, 4 User Stories, Completion, Polish) with 31 actionable tasks, dependency graph, and parallel execution opportunities

Supporting Materials:

  • checklists/requirements.md — Specification quality validation checklist (all items passing)
  • media/planning-post.md — Blog post announcing the feature
  • media/linkedin-planning.md — LinkedIn summary for planning phase

BACKLOG.md Update:

Notable Implementation Details

  • Scaling Algorithm: Uses simple linear interpolation of lat/lon coordinate differences (not Vincenty great-circle math) — adequate for local-scale annotation shapes with <0.1% error at mid-latitudes
  • Centroid Computation: Arithmetic mean of vertices (not area centroid) — simpler, consistent across geometry types (Polygon, LineString, Point)
  • Vector Handling: Scales geometry coordinates and origin point, but preserves range and bearing properties to maintain semantic meaning
  • Result Type: mutation/shape/scaled following feat(schemas): add LinkML schemas for REP annotation types #49 naming conventions
  • Golden Examples: Tasks.md specifies 3 I/O pairs (basic-polygon, custom-origin, noop) to be created during implementation phases
  • Parallel Execution: User stories 1-4 can execute in parallel after Phase 2 (Foundation) completes, enabling efficient delivery

The specification is ready for implementation. All 9 required sections (metadata, MCP, inputs, outputs, algorithm, edge cases, examples, changelog, references) are defined in tasks.md with clear acceptance criteria.

https://claude.ai/code/session_01V1LKePNSwuEXTXvjhArDuq

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
Phase 0: research.md — scaling algorithm decisions (linear interpolation,
arithmetic mean centroid, scale factor 0 behavior, result type naming).

Phase 1: data-model.md (I/O entities), quickstart.md (implementation guide),
plan.md (technical context, constitution check, project structure).

Phase 2: media/planning-post.md, media/linkedin-planning.md.

https://claude.ai/code/session_01V1LKePNSwuEXTXvjhArDuq
7 phases, 31 tasks: setup (4), foundation (3), US1-basic-polygon (4),
US2-custom-origin (4), US3/US4-noop-shrink (4), completion (5),
polish with evidence + media + PR (7).

Phases 3-5 (user stories) can run in parallel after Phase 2.

https://claude.ai/code/session_01V1LKePNSwuEXTXvjhArDuq
Declares scale_factor with choices [0.25, 0.5, 1.5, 2.0, 3.0, 5.0]
following the move-shape distance_km pattern. Presets enable frontend
context menus while still accepting any non-negative numeric value.

Adds FR-020 and research decision R6.

https://claude.ai/code/session_01V1LKePNSwuEXTXvjhArDuq
@IanMayo IanMayo force-pushed the claude/speckit-start-057-SEg6u branch from e9d3c1a to 60c874f Compare February 13, 2026 17:37
IanMayo and others added 6 commits February 13, 2026 17:52
Delivers the complete language-neutral tool specification and 3 validated
golden I/O example pairs for the shape scaling tool:

- enlarge-shape.1.0.md: all 9 sections (Metadata, MCP, Inputs, Outputs,
  Algorithm, Edge Cases, Examples, Changelog, References)
- basic-polygon golden pair: rectangle scaled 3x from centroid
- custom-origin golden pair: rectangle scaled 2x from explicit vertex
- noop golden pair: circle with factor 1.0 (identity transform)
- Evidence: spec validation, test summary, usage example walkthrough
- Media: shipped blog post and LinkedIn summary

All JSON files validated, coordinates verified against scaling formula.

https://claude.ai/code/session_01V1LKePNSwuEXTXvjhArDuq
Python implementation (debrief-calc):
- enlarge_shape.py: @tool-decorated function with centroid computation,
  per-kind scaling (CIRCLE, RECTANGLE, LINE, TEXT, VECTOR), scale_factor
  presets [0.25, 0.5, 1.5, 2.0, 3.0, 5.0]
- test_enlarge_shape.py: 22 tests (all passing) covering centroid
  computation, coordinate scaling, all 3 golden examples, per-kind
  handling, and edge cases

TypeScript implementation (VS Code extension):
- enlargeShape.ts: execute() function + MCPToolDefinition with matching
  algorithm and parameter handling

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