Add enlarge-shape tool specification with golden examples#243
Open
Add enlarge-shape tool specification with golden examples#243
Conversation
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
e9d3c1a to
60c874f
Compare
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 casesplan.md— Implementation plan with project structure, constitution compliance check, and complexity assessmentresearch.md— Technical research decisions covering scaling algorithm (linear interpolation vs. Vincenty), centroid computation (arithmetic mean), vector annotation handling, and result type namingdata-model.md— Entity definitions for ScaleParameters, FeatureCollection input, ToolResponse output, and provenance annotationsquickstart.md— Step-by-step guide for implementing the tool spec with scaling formula and validation procedurestasks.md— Detailed task breakdown across 7 phases (Setup, Foundation, 4 User Stories, Completion, Polish) with 31 actionable tasks, dependency graph, and parallel execution opportunitiesSupporting Materials:
checklists/requirements.md— Specification quality validation checklist (all items passing)media/planning-post.md— Blog post announcing the featuremedia/linkedin-planning.md— LinkedIn summary for planning phaseBACKLOG.md Update:
Notable Implementation Details
rangeandbearingproperties to maintain semantic meaningmutation/shape/scaledfollowing feat(schemas): add LinkML schemas for REP annotation types #49 naming conventionsThe 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