From 81f0072cb2e9b373baf1703895b9602603d77727 Mon Sep 17 00:00:00 2001 From: Ajax Davis Date: Mon, 1 Dec 2025 05:53:48 +1000 Subject: [PATCH] refactor: remove links, tags, and status fields from TPMJS spec MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These fields are redundant as they already exist in package.json: - links: Use package.json repository/homepage fields - tags: Use package.json keywords field - status: Not needed in tool metadata Changes: - Remove TpmjsLinksSchema type definition - Remove links, tags, and status from TpmjsRichSchema - Update validation logic to not check these fields - Update all documentation (spec page, publish page, HOW_TO_PUBLISH_A_TOOL.md) - Update example tool package.json - Simplify field reference tables 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- HOW_TO_PUBLISH_A_TOOL.md | 19 +--- apps/web/src/app/publish/page.tsx | 13 +-- apps/web/src/app/spec/page.tsx | 104 --------------------- packages/tools/createBlogPost/package.json | 7 -- packages/types/src/tpmjs.ts | 24 +---- 5 files changed, 4 insertions(+), 163 deletions(-) diff --git a/HOW_TO_PUBLISH_A_TOOL.md b/HOW_TO_PUBLISH_A_TOOL.md index 9a7b913..565cb8c 100644 --- a/HOW_TO_PUBLISH_A_TOOL.md +++ b/HOW_TO_PUBLISH_A_TOOL.md @@ -133,13 +133,6 @@ Complete metadata for maximum visibility: } ], "frameworks": ["vercel-ai", "langchain"], - "links": { - "documentation": "https://docs.example.com", - "repository": "https://github.com/yourname/tool", - "homepage": "https://yourwebsite.com" - }, - "tags": ["sentiment", "nlp", "emotions", "ai"], - "status": "stable", "aiAgent": { "useCase": "Use this tool when users need to analyze sentiment in text, detect emotions, or understand the tone of customer feedback, reviews, or social media posts.", "limitations": "Only supports English and Spanish. Maximum 10,000 characters per request.", @@ -307,13 +300,6 @@ Here's the complete `package.json` from the published example: "description": "A structured blog post object with frontmatter, content, and metadata including slug, wordCount, readingTime, and formattedOutput" }, "frameworks": ["vercel-ai", "langchain"], - "links": { - "documentation": "https://tpmjs.com/tools/createblogpost", - "repository": "https://github.com/ajaxdavis/tpmjs/tree/main/packages/tools/createBlogPost", - "homepage": "https://tpmjs.com" - }, - "tags": ["blog", "content", "markdown", "mdx", "writing", "seo"], - "status": "stable", "aiAgent": { "useCase": "Use this tool when users need to generate blog posts, articles, or structured content with proper frontmatter and metadata. Ideal for content management systems, static site generators, and documentation sites.", "limitations": "Does not include AI content generation - you must provide the content. Only formats and structures existing content.", @@ -349,9 +335,6 @@ Here's the complete `package.json` from the published example: |-------|------|-------------| | `env` | array | Required environment variables | | `frameworks` | array | Compatible frameworks | -| `links` | object | Related URLs | -| `tags` | array | Additional tags | -| `status` | string | `stable`, `beta`, or `experimental` | | `aiAgent` | object | AI agent integration info | ### Categories @@ -401,7 +384,7 @@ Higher scores = better visibility on tpmjs.com! 1. **Use descriptive names** - Make your package name clear and searchable 2. **Complete metadata** - Tier 3 (Rich) tools get 4x the base score -3. **Good documentation** - Link to docs in the `links.documentation` field +3. **Good documentation** - Add documentation URL to package.json homepage or repository fields 4. **Active maintenance** - Regular updates boost download counts 5. **AI-friendly descriptions** - Write the `aiAgent.useCase` field as guidance for AI agents diff --git a/apps/web/src/app/publish/page.tsx b/apps/web/src/app/publish/page.tsx index 882b98c..4625baf 100644 --- a/apps/web/src/app/publish/page.tsx +++ b/apps/web/src/app/publish/page.tsx @@ -170,13 +170,6 @@ export default function PublishPage(): React.ReactElement { } ], "frameworks": ["vercel-ai", "langchain"], - "links": { - "documentation": "https://docs.example.com", - "repository": "https://github.com/yourname/tool", - "homepage": "https://yourwebsite.com" - }, - "tags": ["sentiment", "nlp", "emotions"], - "status": "stable", "aiAgent": { "useCase": "Use when users need to analyze sentiment or detect emotions", "limitations": "English and Spanish only. Max 10,000 characters", @@ -305,9 +298,7 @@ npm publish --access public "type": "BlogPost", "description": "Structured blog post with frontmatter" }, - "frameworks": ["vercel-ai", "langchain"], - "tags": ["blog", "content", "markdown"], - "status": "stable" + "frameworks": ["vercel-ai", "langchain"] } }`} /> @@ -331,7 +322,7 @@ npm publish --access public { icon: '📚', title: 'Good documentation', - desc: 'Link to docs in the links.documentation field', + desc: 'Add documentation URL to package.json homepage or repository fields', }, { icon: '🔄', diff --git a/apps/web/src/app/spec/page.tsx b/apps/web/src/app/spec/page.tsx index 8d4d0ef..1984d61 100644 --- a/apps/web/src/app/spec/page.tsx +++ b/apps/web/src/app/spec/page.tsx @@ -327,56 +327,6 @@ export default function SpecPage(): React.ReactElement { -
-

- links -

-

- External links. Optional fields: -

-
    -
  • - documentation - Full - documentation URL -
  • -
  • - playground - Interactive demo URL -
  • -
  • - repository - Source code URL -
  • -
  • - homepage - Project website -
  • -
-
- -
-

- tags -

-

- Array of additional tags for searchability. Maximum 10 tags, each 2-30 - characters. -

-
- -
-

- status -

-

- Tool maturity level. One of: -

-
- {['experimental', 'beta', 'stable', 'deprecated'].map((status) => ( - - {status} - - ))} -
-
-

aiAgent @@ -422,13 +372,6 @@ export default function SpecPage(): React.ReactElement { } ], "frameworks": ["vercel-ai", "langchain"], - "links": { - "documentation": "https://docs.example.com", - "repository": "https://github.com/yourname/tool", - "homepage": "https://yourwebsite.com" - }, - "tags": ["sentiment", "nlp", "emotions", "ai"], - "status": "stable", "aiAgent": { "useCase": "Use when users need to analyze sentiment or detect emotions in text", "limitations": "English and Spanish only. Max 10,000 characters per request.", @@ -545,45 +488,6 @@ export default function SpecPage(): React.ReactElement { No Compatible AI frameworks - - - links - - object - - - Rich - - - No - External resource URLs - - - - tags - - array - - - Rich - - - No - Additional search tags (max 10) - - - - status - - string - - - Rich - - - No - Maturity level - aiAgent @@ -761,14 +665,6 @@ export default function SpecPage(): React.ReactElement { Invalid env: Each environment variable must have a name and description -
  • - Too many tags: Maximum 10 tags - allowed -
  • -
  • - Invalid URL: Links must be valid - HTTP(S) URLs -
  • diff --git a/packages/tools/createBlogPost/package.json b/packages/tools/createBlogPost/package.json index 0714f28..6998613 100644 --- a/packages/tools/createBlogPost/package.json +++ b/packages/tools/createBlogPost/package.json @@ -80,13 +80,6 @@ "description": "A structured blog post object with frontmatter, content, and metadata including slug, wordCount, readingTime, and formattedOutput" }, "frameworks": ["vercel-ai", "langchain"], - "links": { - "documentation": "https://tpmjs.com/tools/createblogpost", - "repository": "https://github.com/ajaxdavis/tpmjs/tree/main/packages/tools/createBlogPost", - "homepage": "https://tpmjs.com" - }, - "tags": ["blog", "content", "markdown", "mdx", "writing", "seo"], - "status": "stable", "aiAgent": { "useCase": "Use this tool when users need to generate blog posts, articles, or structured content with proper frontmatter and metadata. Ideal for content management systems, static site generators, and documentation sites.", "limitations": "Does not include AI content generation - you must provide the content. Only formats and structures existing content.", diff --git a/packages/types/src/tpmjs.ts b/packages/types/src/tpmjs.ts index 7c5d182..46e58ed 100644 --- a/packages/types/src/tpmjs.ts +++ b/packages/types/src/tpmjs.ts @@ -55,18 +55,6 @@ export const TpmjsEnvSchema = z.object({ export type TpmjsEnv = z.infer; -/** - * External links schema - */ -export const TpmjsLinksSchema = z.object({ - documentation: z.string().url().optional(), - playground: z.string().url().optional(), - repository: z.string().url().optional(), - homepage: z.string().url().optional(), -}); - -export type TpmjsLinks = z.infer; - /** * AI Agent guidance schema */ @@ -102,9 +90,6 @@ export const TpmjsRichSchema = TpmjsMinimalSchema.extend({ frameworks: z .array(z.enum(['vercel-ai', 'langchain', 'llamaindex', 'haystack', 'semantic-kernel'])) .optional(), - links: TpmjsLinksSchema.optional(), - tags: z.array(z.string().min(2).max(30)).max(10).optional(), - status: z.enum(['experimental', 'beta', 'stable', 'deprecated']).optional(), aiAgent: TpmjsAiAgentSchema.optional(), }); @@ -135,14 +120,7 @@ export function validateTpmjsField(tpmjs: unknown): ValidationResult { // Check if it has any rich-tier fields const data = richResult.data; const hasRichFields = - data.parameters || - data.returns || - data.env || - data.frameworks || - data.links || - data.tags || - data.status || - data.aiAgent; + data.parameters || data.returns || data.env || data.frameworks || data.aiAgent; return { valid: true,