docs: teach the SemanticAnnotation object form (unit, intrinsicDomain)#58
Open
zl190 wants to merge 1 commit into
Open
docs: teach the SemanticAnnotation object form (unit, intrinsicDomain)#58zl190 wants to merge 1 commit into
zl190 wants to merge 1 commit into
Conversation
semantic_types accepts Record<string, string | SemanticAnnotation>, and unit / intrinsicDomain gate the currency and percent axis formatting. The skill, MCP tool schema, and docs only showed the bare-string form, so agents never find the annotation object and charts fall back to plain number formatting (verified against 0.2.2, Vega-Lite backend). - SKILL.md: fix the interface signature, adjust the Price/Percentage bullets, add an 'Annotation objects' section, extend the checklist - flint-mcp schemas.ts: describe the annotation object form - README: 70+ -> 40+ semantic types (registry ships 44) - api-reference.md: note the formatting unit / intrinsicDomain enable - sync the bundled MCP skill asset Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Author
|
@microsoft-github-policy-service agree |
This was referenced Jul 18, 2026
There was a problem hiding this comment.
Pull request overview
This PR updates Flint’s authoring guidance and MCP tool schema documentation to clearly teach that semantic_types supports both bare semantic type strings and SemanticAnnotation objects, and that unit / intrinsicDomain are the inputs that unlock currency and percent axis formatting (rather than relying on semantic type strings alone).
Changes:
- Documented
semantic_typesasRecord<string, string | SemanticAnnotation>across the agent skill docs and bundled skill asset, including a new “Annotation objects” section with concrete examples and effects. - Expanded the MCP tool schema description for
semantic_typesto mention the annotation object form and its formatting impact. - Updated top-level docs/README wording to reflect the current semantic type registry size and to mention
unit/intrinsicDomainannotations.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Updates feature text to reflect current semantic type count and introduces unit / intrinsicDomain as formatting annotations. |
| packages/flint-mcp/src/tools/schemas.ts | Extends the semantic_types schema description to document annotation objects and examples. |
| packages/flint-mcp/assets/flint-chart-author.SKILL.md | Syncs the bundled skill doc with the updated SemanticAnnotation guidance and checklist. |
| docs/api-reference.md | Adds a concise note that unit / intrinsicDomain drive axis formatting behavior. |
| agent-skills/flint-chart-author/SKILL.md | Updates authoring guidance to include annotation objects, their effects, and validation checklist updates. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
What
semantic_typesacceptsRecord<string, string | SemanticAnnotation>, andunit/intrinsicDomainare what gate currency and percent axis formatting. But the skill, the MCP tool schema, and the docs all show only the bare-string form — so agents (the primary authors) never find the annotation object, and charts fall back to plain number formatting.Verified against
flint-chart@0.2.2(Vega-Lite backend):"revenue": "Price",.12~g(plain numbers)"revenue": { "semanticType": "Price", "unit": "USD" }'$' + format(datum.value, ',.2f')"share": { "semanticType": "Percentage", "intrinsicDomain": [0, 1] }.0~%+domainMax: 1"rating": { "semanticType": "Score", "intrinsicDomain": [1, 5] }scale.domain: [1, 5]Changes
agent-skills/flint-chart-author/SKILL.md— typesemantic_typesasRecord<string, string | SemanticAnnotation>to matchtypes.ts; adjust the twoPrice/Percentagebullets that imply bare strings already produce this formatting; add an "Annotation objects" section with the verified effects and when to use them; extend the validation checklist.packages/flint-mcp/src/tools/schemas.ts— describe the annotation object form in thesemantic_typesschema, so MCP agents can find it from the tool schema alone.packages/flint-mcp/assets/flint-chart-author.SKILL.md— synced (enforced byserver.test.ts).README.md— "70+ semantic types" → "40+" (the registry currently ships 44). If "70+" counts planned types, happy to revert this hunk.docs/api-reference.md— short note on the formattingunit/intrinsicDomainenable.Verification
npm run typecheck— cleannpm run test— 423 + 50 passing (includes the bundled-skill sync test)Happy to adjust wording or scope.
🤖 Generated with Claude Code