Skip to content

Add enlarge-shape tool specification with golden examples#243

Merged
IanMayo merged 16 commits intomainfrom
claude/speckit-start-057-SEg6u
Mar 6, 2026
Merged

Add enlarge-shape tool specification with golden examples#243
IanMayo merged 16 commits intomainfrom
claude/speckit-start-057-SEg6u

Conversation

@IanMayo
Copy link
Copy Markdown
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 7 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
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 6, 2026

🚀 Preview Deployments

Code Server (Full VS Code Extension)

🖥️ Open Code Server

Browser-based VS Code with the Debrief extension and sample data pre-installed.

Web Shell (Standalone App)

📱 Open Web Shell

Use this for Playwright testing and demos - runs outside Storybook.

Storybook (Component Library)

📚 Open Storybook

Browse all components, stories, and documentation.


All Links
Environment Code Server Web Shell Storybook
This PR Open IDE Open App Open Storybook
Main branch Open App Open Storybook

Updated on commit 9ea0986

claude added 5 commits March 6, 2026 10:56
- Add return type annotations (-> None, -> dict) to all test methods and
  fixtures to satisfy ANN201/ANN001 ruff rules
- Add `from __future__ import annotations` for forward-ref support
- Fix eslint curly rule: add braces to single-line if on line 95
- Fix eslint strict-boolean-expressions: use `!= null` instead of truthy
  checks for `props.center` and `props.origin`

https://claude.ai/code/session_01V1LKePNSwuEXTXvjhArDuq
geometry.get("coordinates") can return None; add early return guard
to satisfy pyright's type narrowing.

https://claude.ai/code/session_01V1LKePNSwuEXTXvjhArDuq
@IanMayo IanMayo temporarily deployed to debrief-preview-pr-243 March 6, 2026 11:30 Inactive
@IanMayo IanMayo merged commit 23aa945 into main Mar 6, 2026
9 checks passed
@IanMayo IanMayo deleted the claude/speckit-start-057-SEg6u branch March 6, 2026 11:52
github-actions Bot pushed a commit that referenced this pull request Mar 6, 2026
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