@el-j/magic-helix-plugins 4.0.0-beta.1 → 4.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/dist/architecture/codeowners.md +123 -0
  2. package/dist/architecture/monorepo.md +146 -0
  3. package/dist/architecture/nx.md +122 -0
  4. package/dist/architecture/turborepo.md +114 -0
  5. package/dist/ci/github-actions.md +268 -0
  6. package/dist/ci/gitlab-ci.md +330 -0
  7. package/dist/containers/docker-multistage.md +120 -0
  8. package/dist/containers/kubernetes-deploy.md +210 -0
  9. package/dist/cpp/index.cjs +79 -0
  10. package/dist/cpp/index.mjs +209 -0
  11. package/dist/csharp/index.cjs +2 -2
  12. package/dist/csharp/{index.js → index.mjs} +17 -11
  13. package/dist/csharp/templates/framework-aspnetcore.md +205 -0
  14. package/dist/csharp/templates/framework-blazor.md +271 -0
  15. package/dist/csharp/templates/lang-csharp.md +162 -0
  16. package/dist/devops/docker-compose.md +111 -0
  17. package/dist/devops/docker-dockerfile.md +94 -0
  18. package/dist/devops/github-actions.md +160 -0
  19. package/dist/devops/gitlab-ci.md +210 -0
  20. package/dist/generic/lang-typescript.md +57 -0
  21. package/dist/generic/state-redux.md +21 -0
  22. package/dist/generic/state-rxjs.md +6 -0
  23. package/dist/generic/style-mui.md +23 -0
  24. package/dist/generic/style-tailwind.md +76 -0
  25. package/dist/generic/test-cypress.md +21 -0
  26. package/dist/generic/test-jest.md +20 -0
  27. package/dist/generic/test-playwright.md +21 -0
  28. package/dist/generic/test-vitest.md +131 -0
  29. package/dist/go/index.cjs +3 -3
  30. package/dist/go/{index.js → index.mjs} +18 -15
  31. package/dist/go/templates/lang-go.md +571 -0
  32. package/dist/index.cjs +1 -1
  33. package/dist/index.mjs +24 -0
  34. package/dist/java/index.cjs +2 -2
  35. package/dist/java/{index.js → index.mjs} +25 -19
  36. package/dist/java/templates/build-gradle.md +102 -0
  37. package/dist/java/templates/build-maven.md +86 -0
  38. package/dist/java/templates/framework-spring-boot.md +179 -0
  39. package/dist/java/templates/lang-java.md +78 -0
  40. package/dist/java/templates/lang-kotlin.md +88 -0
  41. package/dist/meta/magic-helix-meta.md +213 -0
  42. package/dist/meta/meta-debug.md +459 -0
  43. package/dist/meta/meta-implement.md +450 -0
  44. package/dist/meta/meta-roadmap.md +265 -0
  45. package/dist/nodejs/templates/angular-core.md +19 -0
  46. package/dist/nodejs/templates/lang-typescript.md +57 -0
  47. package/dist/nodejs/templates/nestjs-core.md +7 -0
  48. package/dist/nodejs/templates/react-core.md +677 -0
  49. package/dist/nodejs/templates/react-zustand.md +7 -0
  50. package/dist/nodejs/templates/state-redux.md +21 -0
  51. package/dist/nodejs/templates/state-rxjs.md +6 -0
  52. package/dist/nodejs/templates/style-primevue.md +6 -0
  53. package/dist/nodejs/templates/style-quasar.md +22 -0
  54. package/dist/nodejs/templates/style-tailwind.md +76 -0
  55. package/dist/nodejs/templates/test-cypress.md +21 -0
  56. package/dist/nodejs/templates/test-jest.md +20 -0
  57. package/dist/nodejs/templates/test-playwright.md +21 -0
  58. package/dist/nodejs/templates/test-vitest.md +131 -0
  59. package/dist/nodejs/templates/vue-core.md +108 -0
  60. package/dist/nodejs/templates/vue-pinia.md +5 -0
  61. package/dist/patterns/architecture/clean-architecture.md +469 -0
  62. package/dist/patterns/architecture/dependency-injection.md +517 -0
  63. package/dist/patterns/architecture/domain-driven-design.md +621 -0
  64. package/dist/patterns/architecture/layered-architecture.md +382 -0
  65. package/dist/patterns/architecture/repository-pattern.md +408 -0
  66. package/dist/patterns/domain-expertise/nextjs-rules.md +115 -0
  67. package/dist/patterns/domain-expertise/react-patterns.md +181 -0
  68. package/dist/patterns/domain-expertise/server-components.md +212 -0
  69. package/dist/patterns/domain-expertise/shadcn-ui.md +52 -0
  70. package/dist/patterns/domain-expertise/tailwind-patterns.md +52 -0
  71. package/dist/patterns/environment/container-awareness.md +17 -0
  72. package/dist/patterns/environment/ide-features.md +17 -0
  73. package/dist/patterns/environment/os-commands.md +17 -0
  74. package/dist/patterns/organization/heading-hierarchy.md +103 -0
  75. package/dist/patterns/organization/sequential-workflows.md +102 -0
  76. package/dist/patterns/organization/xml-rule-groups.md +64 -0
  77. package/dist/patterns/reasoning/agent-loop.md +151 -0
  78. package/dist/patterns/reasoning/confirmation-gates.md +141 -0
  79. package/dist/patterns/reasoning/dependency-analysis.md +132 -0
  80. package/dist/patterns/reasoning/one-tool-per-iteration.md +152 -0
  81. package/dist/patterns/reasoning/preview-before-action.md +194 -0
  82. package/dist/patterns/reasoning/reflection-checkpoints.md +166 -0
  83. package/dist/patterns/reasoning/result-verification.md +157 -0
  84. package/dist/patterns/reasoning/subtask-breakdown.md +131 -0
  85. package/dist/patterns/reasoning/thinking-tags.md +100 -0
  86. package/dist/patterns/role-definition/capability-declarations.md +72 -0
  87. package/dist/patterns/role-definition/expert-identity.md +45 -0
  88. package/dist/patterns/role-definition/scope-boundaries.md +61 -0
  89. package/dist/patterns/safety/code-safety-rules.md +17 -0
  90. package/dist/patterns/safety/credential-handling.md +17 -0
  91. package/dist/patterns/safety/destructive-warnings.md +17 -0
  92. package/dist/patterns/safety/refusal-messages.md +17 -0
  93. package/dist/patterns/tone/adaptive-tone.md +17 -0
  94. package/dist/patterns/tone/concise-communication.md +17 -0
  95. package/dist/patterns/tone/forbidden-phrases.md +17 -0
  96. package/dist/patterns/tool-guidelines/function-schemas.md +143 -0
  97. package/dist/patterns/tool-guidelines/parameter-examples.md +137 -0
  98. package/dist/patterns/tool-guidelines/usage-policies.md +105 -0
  99. package/dist/php/index.cjs +2 -2
  100. package/dist/php/{index.js → index.mjs} +12 -6
  101. package/dist/php/templates/framework-laravel.md +112 -0
  102. package/dist/php/templates/lang-php.md +94 -0
  103. package/dist/python/index.cjs +4 -4
  104. package/dist/python/{index.js → index.mjs} +10 -7
  105. package/dist/python/templates/lang-python.md +508 -0
  106. package/dist/ruby/index.cjs +2 -2
  107. package/dist/ruby/{index.js → index.mjs} +16 -10
  108. package/dist/ruby/templates/framework-rails.md +309 -0
  109. package/dist/ruby/templates/framework-sinatra.md +227 -0
  110. package/dist/ruby/templates/lang-ruby.md +216 -0
  111. package/dist/rust/index.cjs +3 -3
  112. package/dist/rust/{index.js → index.mjs} +24 -18
  113. package/dist/rust/templates/lang-rust.md +89 -0
  114. package/dist/swift/index.cjs +32 -0
  115. package/dist/swift/index.mjs +112 -0
  116. package/dist/swift/templates/framework-vapor.md +352 -0
  117. package/dist/swift/templates/lang-swift.md +291 -0
  118. package/package.json +31 -21
  119. package/dist/index.js +0 -20
  120. /package/dist/nodejs/{index.js → index.mjs} +0 -0
@@ -0,0 +1,100 @@
1
+ # Thinking Tags Pattern
2
+
3
+ ## Purpose
4
+ Encourage explicit pre-action analysis and planning. From **v0** pattern.
5
+
6
+ ## Template
7
+
8
+ ```markdown
9
+ Before executing any action, think through:
10
+
11
+ <thinking>
12
+ 1. **Understand**: {WHAT_USER_WANTS}
13
+ 2. **Analyze**: {CURRENT_STATE_AND_CONSTRAINTS}
14
+ 3. **Plan**: {APPROACH_TO_TAKE}
15
+ 4. **Anticipate**: {POTENTIAL_ISSUES}
16
+ </thinking>
17
+
18
+ Then proceed with execution.
19
+ ```
20
+
21
+ ## Examples
22
+
23
+ ### v0 (Component Generation)
24
+ ```markdown
25
+ Before generating code, think through the requirements:
26
+
27
+ <thinking>
28
+ 1. **Understand**: What component is needed?
29
+ - Is this a new component or modification?
30
+ - What props/state does it need?
31
+ - What's the visual hierarchy?
32
+
33
+ 2. **Analyze**: What are the constraints?
34
+ - Framework: Next.js App Router or Pages?
35
+ - Styling: Tailwind, CSS modules, or styled-components?
36
+ - Dependencies: What libraries are available?
37
+
38
+ 3. **Plan**: What's the implementation approach?
39
+ - Component structure (parent/children)
40
+ - Data flow (props down, events up)
41
+ - File organization (co-located vs separate)
42
+
43
+ 4. **Anticipate**: What could go wrong?
44
+ - Missing types (add proper TypeScript interfaces)
45
+ - Accessibility issues (add ARIA labels)
46
+ - Responsive design (include breakpoints)
47
+ </thinking>
48
+
49
+ Then generate the component code.
50
+ ```
51
+
52
+ ### Manus (Tool Selection)
53
+ ```markdown
54
+ Before calling a tool, analyze the situation:
55
+
56
+ <thinking>
57
+ 1. **Understand**: What information do I need?
58
+ - What's the user's end goal?
59
+ - What data is missing?
60
+ - What assumptions am I making?
61
+
62
+ 2. **Analyze**: What tools are available?
63
+ - Which tool provides the needed information?
64
+ - Are there dependencies between tools?
65
+ - Can I gather everything in one call?
66
+
67
+ 3. **Plan**: What's the optimal tool sequence?
68
+ - Start with broad context (file search)
69
+ - Then narrow down (read specific files)
70
+ - Validate with targeted checks (grep for patterns)
71
+
72
+ 4. **Anticipate**: What if the tool fails?
73
+ - File doesn't exist → search for similar names
74
+ - Permission denied → check alternate paths
75
+ - Timeout → break into smaller operations
76
+ </thinking>
77
+
78
+ Then proceed with tool call.
79
+ ```
80
+
81
+ ## Variables
82
+ - `{WHAT_USER_WANTS}`: Parsed intent from user message
83
+ - `{CURRENT_STATE_AND_CONSTRAINTS}`: Known facts and limitations
84
+ - `{APPROACH_TO_TAKE}`: High-level strategy
85
+ - `{POTENTIAL_ISSUES}`: Risk assessment
86
+
87
+ ## Best Practices
88
+ 1. Use `<thinking>` tags to separate planning from execution
89
+ 2. Keep each section concise (2-4 bullet points)
90
+ 3. Ask questions to surface uncertainties
91
+ 4. Reference specific context (files, variables, constraints)
92
+ 5. State assumptions explicitly
93
+ 6. Consider failure modes and fallbacks
94
+ 7. Benefits: Reduces errors, improves reasoning transparency, enables self-correction
95
+
96
+ ## Implementation Notes
97
+ - Some models (Claude, GPT-4) benefit from explicit thinking sections
98
+ - Can be hidden from user output (system-level reasoning)
99
+ - Useful for complex tasks (code generation, debugging, architecture decisions)
100
+ - Can be skipped for simple operations (basic calculations, lookups)
@@ -0,0 +1,72 @@
1
+ # Capability Declarations Pattern
2
+
3
+ ## Purpose
4
+ Enumerate specific tasks the AI can perform with concrete examples. From **ChatGPT 4o** and **Bolt.new** patterns.
5
+
6
+ ## Template
7
+
8
+ ```
9
+ ## Core Capabilities
10
+
11
+ ### [CAPABILITY_CATEGORY_1]
12
+ I can [ACTION_VERB] [OBJECT] by [METHOD].
13
+ Example: "[CONCRETE_EXAMPLE]"
14
+
15
+ ### [CAPABILITY_CATEGORY_2]
16
+ I can [ACTION_VERB] [OBJECT] by [METHOD].
17
+ Example: "[CONCRETE_EXAMPLE]"
18
+
19
+ ### [CAPABILITY_CATEGORY_3]
20
+ I can [ACTION_VERB] [OBJECT] by [METHOD].
21
+ Example: "[CONCRETE_EXAMPLE]"
22
+ ```
23
+
24
+ ## Examples
25
+
26
+ ### ChatGPT 4o (Multimodal Capabilities)
27
+ ```
28
+ ## Core Capabilities
29
+
30
+ ### Image Generation
31
+ I can create images using DALL-E 3 by translating natural language descriptions into detailed visual prompts.
32
+ Example: "Create a sunset over a cyberpunk city with neon reflections"
33
+
34
+ ### Code Analysis
35
+ I can review and explain code across 50+ languages by parsing structure, identifying patterns, and suggesting improvements.
36
+ Example: "Analyze this React component for performance bottlenecks"
37
+
38
+ ### Data Processing
39
+ I can analyze CSV/JSON data by computing statistics, generating visualizations, and identifying trends.
40
+ Example: "Summarize sales trends from this quarterly report"
41
+ ```
42
+
43
+ ### Bolt.new (Full-Stack Development)
44
+ ```
45
+ ## Core Capabilities
46
+
47
+ ### Application Scaffolding
48
+ I can generate complete full-stack applications by analyzing requirements and selecting appropriate frameworks.
49
+ Example: "Create a Next.js blog with MDX support and Tailwind CSS"
50
+
51
+ ### Live Preview
52
+ I can run code in a WebContainer by compiling and serving apps in your browser with hot reload.
53
+ Example: "Preview this React app with instant updates as you edit"
54
+
55
+ ### Dependency Management
56
+ I can install packages and configure build tools by detecting framework requirements and resolving version conflicts.
57
+ Example: "Add Prisma ORM with PostgreSQL adapter and generate migrations"
58
+ ```
59
+
60
+ ## Variables
61
+ - `{CAPABILITY_CATEGORY_X}`: Functional domain (e.g., "Code Generation", "Debugging")
62
+ - `{ACTION_VERB}`: What you do (e.g., "generate", "analyze", "refactor")
63
+ - `{OBJECT}`: What you operate on (e.g., "React components", "SQL queries")
64
+ - `{METHOD}`: How you do it (e.g., "using AST analysis", "by pattern matching")
65
+ - `{CONCRETE_EXAMPLE}`: Real user request demonstrating the capability
66
+
67
+ ## Best Practices
68
+ 1. Use action-oriented language ("I can..." not "I might be able to...")
69
+ 2. Include concrete examples users can copy/paste
70
+ 3. Specify technical methods (not just outcomes)
71
+ 4. Group related capabilities under clear categories
72
+ 5. Mention limitations within each capability (e.g., "up to 10MB files")
@@ -0,0 +1,45 @@
1
+ # Expert Identity Pattern
2
+
3
+ ## Purpose
4
+ Establish the AI agent's expertise domain, capabilities, and authority. From **v0** and **Claude Sonnet 3.7** patterns.
5
+
6
+ ## Template
7
+
8
+ ```
9
+ You are an expert [DOMAIN] specialist with deep knowledge in [SPECIFIC_AREAS].
10
+ Your expertise includes:
11
+ - [SKILL_1]
12
+ - [SKILL_2]
13
+ - [SKILL_3]
14
+
15
+ You excel at [PRIMARY_TASK] and have mastery of [TOOLS_OR_FRAMEWORKS].
16
+ ```
17
+
18
+ ## Examples
19
+
20
+ ### v0 (Next.js/React Expert)
21
+ ```
22
+ You are v0, an AI assistant created by Vercel to be an expert web developer.
23
+ You excel at writing React (in TSX), HTML, CSS, and Tailwind.
24
+ You have deep knowledge of Next.js App Router, Server Components, and modern web development best practices.
25
+ ```
26
+
27
+ ### Claude (Problem-Solving Expert)
28
+ ```
29
+ You are Claude, an AI assistant created by Anthropic to be helpful, harmless, and honest.
30
+ You excel at thoughtful, nuanced analysis and clear communication.
31
+ You have expertise across many domains while maintaining intellectual humility.
32
+ ```
33
+
34
+ ## Variables
35
+ - `{DOMAIN}`: Primary expertise area (e.g., "web development", "data science")
36
+ - `{SPECIFIC_AREAS}`: Comma-separated specializations
37
+ - `{SKILL_X}`: Concrete capabilities
38
+ - `{PRIMARY_TASK}`: Core function (e.g., "generating production-ready code")
39
+ - `{TOOLS_OR_FRAMEWORKS}`: Technology stack
40
+
41
+ ## Best Practices
42
+ 1. Be specific about technical domains
43
+ 2. List concrete capabilities, not vague claims
44
+ 3. Mention version-specific knowledge (e.g., "Next.js 14 App Router")
45
+ 4. Align expertise with actual training data
@@ -0,0 +1,61 @@
1
+ # Scope Boundaries Pattern
2
+
3
+ ## Purpose
4
+ Define what the AI agent will and won't do. From **same.new** and **Cline** patterns.
5
+
6
+ ## Template
7
+
8
+ ```
9
+ ## What I Can Do
10
+ - [CAPABILITY_1]
11
+ - [CAPABILITY_2]
12
+ - [CAPABILITY_3]
13
+
14
+ ## What I Won't Do
15
+ - [LIMITATION_1]
16
+ - [LIMITATION_2]
17
+ - [LIMITATION_3]
18
+
19
+ ## When to Ask for Help
20
+ If you need [OUT_OF_SCOPE_TASK], I will [FALLBACK_BEHAVIOR].
21
+ ```
22
+
23
+ ## Examples
24
+
25
+ ### same.new (Code Execution Boundary)
26
+ ```
27
+ ## What I Can Do
28
+ - Write, preview, and modify code in real-time
29
+ - Install npm packages and configure build tools
30
+ - Generate complete application structures
31
+
32
+ ## What I Won't Do
33
+ - Execute arbitrary shell commands without confirmation
34
+ - Make destructive filesystem changes without preview
35
+ - Access external APIs without explicit user consent
36
+ ```
37
+
38
+ ### Cline (Autonomous vs Manual)
39
+ ```
40
+ ## What I Can Do
41
+ - Read and edit files directly
42
+ - Run terminal commands with your approval
43
+ - Search and analyze your codebase
44
+
45
+ ## What I Won't Do
46
+ - Make changes without showing you a preview first
47
+ - Run commands that require sudo without explicit confirmation
48
+ - Access files outside your project directory
49
+ ```
50
+
51
+ ## Variables
52
+ - `{CAPABILITY_X}`: Permitted actions
53
+ - `{LIMITATION_X}`: Prohibited actions
54
+ - `{OUT_OF_SCOPE_TASK}`: Example boundary case
55
+ - `{FALLBACK_BEHAVIOR}`: How to handle out-of-scope requests
56
+
57
+ ## Best Practices
58
+ 1. Be explicit about destructive operations (delete, overwrite)
59
+ 2. Clarify data access boundaries (local vs remote)
60
+ 3. State confirmation requirements for risky actions
61
+ 4. Explain what happens when limits are reached
@@ -0,0 +1,17 @@
1
+ # $(basename "$file" .md | tr '-' ' ' | sed 's/\b\(.\)/\u\1/g') Pattern
2
+
3
+ ## Purpose
4
+ [Pattern description from integration document]
5
+
6
+ ## Template
7
+ ```markdown
8
+ [Key structure and variables]
9
+ ```
10
+
11
+ ## Examples
12
+ [Concrete examples from v0, Claude, ChatGPT, Cline, etc.]
13
+
14
+ ## Best Practices
15
+ 1. [Guideline 1]
16
+ 2. [Guideline 2]
17
+ 3. Benefits: [Key advantages]
@@ -0,0 +1,17 @@
1
+ # $(basename "$file" .md | tr '-' ' ' | sed 's/\b\(.\)/\u\1/g') Pattern
2
+
3
+ ## Purpose
4
+ [Pattern description from integration document]
5
+
6
+ ## Template
7
+ ```markdown
8
+ [Key structure and variables]
9
+ ```
10
+
11
+ ## Examples
12
+ [Concrete examples from v0, Claude, ChatGPT, Cline, etc.]
13
+
14
+ ## Best Practices
15
+ 1. [Guideline 1]
16
+ 2. [Guideline 2]
17
+ 3. Benefits: [Key advantages]
@@ -0,0 +1,17 @@
1
+ # $(basename "$file" .md | tr '-' ' ' | sed 's/\b\(.\)/\u\1/g') Pattern
2
+
3
+ ## Purpose
4
+ [Pattern description from integration document]
5
+
6
+ ## Template
7
+ ```markdown
8
+ [Key structure and variables]
9
+ ```
10
+
11
+ ## Examples
12
+ [Concrete examples from v0, Claude, ChatGPT, Cline, etc.]
13
+
14
+ ## Best Practices
15
+ 1. [Guideline 1]
16
+ 2. [Guideline 2]
17
+ 3. Benefits: [Key advantages]
@@ -0,0 +1,17 @@
1
+ # $(basename "$file" .md | tr '-' ' ' | sed 's/\b\(.\)/\u\1/g') Pattern
2
+
3
+ ## Purpose
4
+ [Pattern description from integration document]
5
+
6
+ ## Template
7
+ ```markdown
8
+ [Key structure and variables]
9
+ ```
10
+
11
+ ## Examples
12
+ [Concrete examples from v0, Claude, ChatGPT, Cline, etc.]
13
+
14
+ ## Best Practices
15
+ 1. [Guideline 1]
16
+ 2. [Guideline 2]
17
+ 3. Benefits: [Key advantages]
@@ -0,0 +1,17 @@
1
+ # $(basename "$file" .md | tr '-' ' ' | sed 's/\b\(.\)/\u\1/g') Pattern
2
+
3
+ ## Purpose
4
+ [Pattern description from integration document]
5
+
6
+ ## Template
7
+ ```markdown
8
+ [Key structure and variables]
9
+ ```
10
+
11
+ ## Examples
12
+ [Concrete examples from v0, Claude, ChatGPT, Cline, etc.]
13
+
14
+ ## Best Practices
15
+ 1. [Guideline 1]
16
+ 2. [Guideline 2]
17
+ 3. Benefits: [Key advantages]
@@ -0,0 +1,17 @@
1
+ # $(basename "$file" .md | tr '-' ' ' | sed 's/\b\(.\)/\u\1/g') Pattern
2
+
3
+ ## Purpose
4
+ [Pattern description from integration document]
5
+
6
+ ## Template
7
+ ```markdown
8
+ [Key structure and variables]
9
+ ```
10
+
11
+ ## Examples
12
+ [Concrete examples from v0, Claude, ChatGPT, Cline, etc.]
13
+
14
+ ## Best Practices
15
+ 1. [Guideline 1]
16
+ 2. [Guideline 2]
17
+ 3. Benefits: [Key advantages]
@@ -0,0 +1,17 @@
1
+ # $(basename "$file" .md | tr '-' ' ' | sed 's/\b\(.\)/\u\1/g') Pattern
2
+
3
+ ## Purpose
4
+ [Pattern description from integration document]
5
+
6
+ ## Template
7
+ ```markdown
8
+ [Key structure and variables]
9
+ ```
10
+
11
+ ## Examples
12
+ [Concrete examples from v0, Claude, ChatGPT, Cline, etc.]
13
+
14
+ ## Best Practices
15
+ 1. [Guideline 1]
16
+ 2. [Guideline 2]
17
+ 3. Benefits: [Key advantages]
@@ -0,0 +1,143 @@
1
+ # Function Schemas Pattern
2
+
3
+ ## Purpose
4
+ Document tool/function interfaces with inline JSON schemas. From **ChatGPT 4o** pattern.
5
+
6
+ ## Template
7
+
8
+ ```markdown
9
+ ## {TOOL_NAME}
10
+
11
+ **Purpose**: {WHAT_IT_DOES}
12
+
13
+ **Parameters**:
14
+ ```json
15
+ {
16
+ "parameter1": {
17
+ "type": "{TYPE}",
18
+ "description": "{DESCRIPTION}",
19
+ "required": {BOOLEAN}
20
+ },
21
+ "parameter2": {
22
+ "type": "{TYPE}",
23
+ "description": "{DESCRIPTION}",
24
+ "required": {BOOLEAN}
25
+ }
26
+ }
27
+ ```
28
+
29
+ **Returns**: {RETURN_TYPE} - {RETURN_DESCRIPTION}
30
+
31
+ **Example**:
32
+ ```
33
+ {EXAMPLE_USAGE}
34
+ ```
35
+ ```
36
+
37
+ ## Examples
38
+
39
+ ### ChatGPT (DALL-E Image Generation)
40
+ ```markdown
41
+ ## generate_image
42
+
43
+ **Purpose**: Creates images using DALL-E 3 based on text descriptions.
44
+
45
+ **Parameters**:
46
+ ```json
47
+ {
48
+ "prompt": {
49
+ "type": "string",
50
+ "description": "Detailed description of the image to generate. Should be specific and vivid.",
51
+ "required": true
52
+ },
53
+ "size": {
54
+ "type": "string",
55
+ "enum": ["1024x1024", "1792x1024", "1024x1792"],
56
+ "description": "Image dimensions. Use landscape for wide scenes, portrait for tall subjects.",
57
+ "required": false,
58
+ "default": "1024x1024"
59
+ },
60
+ "quality": {
61
+ "type": "string",
62
+ "enum": ["standard", "hd"],
63
+ "description": "Image quality level. HD provides more detail but takes longer.",
64
+ "required": false,
65
+ "default": "standard"
66
+ }
67
+ }
68
+ ```
69
+
70
+ **Returns**: `ImageResult` - Object containing image URL and revised prompt
71
+
72
+ **Example**:
73
+ ```
74
+ generate_image({
75
+ prompt: "A serene Japanese garden with a koi pond, cherry blossoms, and a wooden bridge at sunset",
76
+ size: "1792x1024",
77
+ quality: "hd"
78
+ })
79
+ ```
80
+ ```
81
+
82
+ ### Cline (File Reading)
83
+ ```markdown
84
+ ## read_file
85
+
86
+ **Purpose**: Reads contents of a file within specified line range.
87
+
88
+ **Parameters**:
89
+ ```json
90
+ {
91
+ "filePath": {
92
+ "type": "string",
93
+ "description": "Absolute path to the file. Must exist in workspace.",
94
+ "required": true
95
+ },
96
+ "startLine": {
97
+ "type": "number",
98
+ "description": "Line number to start reading from (1-indexed).",
99
+ "required": true
100
+ },
101
+ "endLine": {
102
+ "type": "number",
103
+ "description": "Line number to end reading at (inclusive, 1-indexed).",
104
+ "required": true
105
+ }
106
+ }
107
+ ```
108
+
109
+ **Returns**: `string` - File contents between startLine and endLine
110
+
111
+ **Example**:
112
+ ```
113
+ read_file({
114
+ filePath: "/Users/me/project/src/app.ts",
115
+ startLine: 10,
116
+ endLine: 50
117
+ })
118
+ ```
119
+
120
+ **Best Practices**:
121
+ - Read large ranges (20-50 lines) to minimize API calls
122
+ - Prefer one large read over many small reads
123
+ - Use parallel reads when examining multiple files
124
+ ```
125
+
126
+ ## Variables
127
+ - `{TOOL_NAME}`: Function/tool identifier
128
+ - `{WHAT_IT_DOES}`: Single-sentence purpose
129
+ - `{TYPE}`: JSON type (string, number, boolean, object, array)
130
+ - `{DESCRIPTION}`: Parameter explanation
131
+ - `{BOOLEAN}`: true/false for required field
132
+ - `{RETURN_TYPE}`: Return value type
133
+ - `{RETURN_DESCRIPTION}`: What the function returns
134
+ - `{EXAMPLE_USAGE}`: Concrete function call
135
+
136
+ ## Best Practices
137
+ 1. Use JSON schema format for precise typing
138
+ 2. Include enums for restricted values
139
+ 3. Specify default values when applicable
140
+ 4. Add "Best Practices" section for complex tools
141
+ 5. Show realistic examples (not placeholder values)
142
+ 6. Document error cases and edge behavior
143
+ 7. Benefits: Type safety, autocomplete support, clear contracts
@@ -0,0 +1,137 @@
1
+ # Parameter Examples Pattern
2
+
3
+ ## Purpose
4
+ Provide concrete examples for tool parameters with realistic values. From **v0** and **Cline** patterns.
5
+
6
+ ## Template
7
+
8
+ ```markdown
9
+ ## {TOOL_NAME} Parameter Examples
10
+
11
+ ### {PARAMETER_NAME}
12
+ - **Type**: `{TYPE}`
13
+ - **Description**: {DESCRIPTION}
14
+
15
+ **Examples**:
16
+ ```
17
+ ✅ GOOD: {GOOD_EXAMPLE_1}
18
+ ✅ GOOD: {GOOD_EXAMPLE_2}
19
+ ❌ BAD: {BAD_EXAMPLE_1} (Reason: {WHY_BAD})
20
+ ❌ BAD: {BAD_EXAMPLE_2} (Reason: {WHY_BAD})
21
+ ```
22
+ ```
23
+
24
+ ## Examples
25
+
26
+ ### v0 (Component Generation)
27
+ ```markdown
28
+ ## create_component Parameter Examples
29
+
30
+ ### componentName
31
+ - **Type**: `string`
32
+ - **Description**: Name of React component to generate
33
+
34
+ **Examples**:
35
+ ```
36
+ ✅ GOOD: "UserProfile"
37
+ ✅ GOOD: "ProductCard"
38
+ ✅ GOOD: "NavigationMenu"
39
+ ❌ BAD: "userprofile" (Reason: Use PascalCase for components)
40
+ ❌ BAD: "user-profile" (Reason: Hyphens not allowed in JSX names)
41
+ ❌ BAD: "div" (Reason: Conflicts with HTML element)
42
+ ```
43
+
44
+ ### styling
45
+ - **Type**: `"tailwind" | "css-modules" | "styled-components"`
46
+ - **Description**: CSS approach to use
47
+
48
+ **Examples**:
49
+ ```
50
+ ✅ GOOD: "tailwind"
51
+ ✅ GOOD: "css-modules"
52
+ ❌ BAD: "scss" (Reason: Not in enum, use "css-modules" instead)
53
+ ❌ BAD: null (Reason: Required parameter, must specify)
54
+ ```
55
+ ```
56
+
57
+ ### Cline (File Editing)
58
+ ```markdown
59
+ ## replace_string_in_file Parameter Examples
60
+
61
+ ### oldString
62
+ - **Type**: `string`
63
+ - **Description**: Exact literal text to replace, including 3-5 lines of context
64
+
65
+ **Examples**:
66
+ ```
67
+ ✅ GOOD:
68
+ ```
69
+ function calculateTotal() {
70
+ const subtotal = items.reduce((sum, item) => sum + item.price, 0);
71
+ const tax = subtotal * 0.1;
72
+ return subtotal + tax;
73
+ }
74
+ ```
75
+ (Includes function signature and full body for unique match)
76
+
77
+ ❌ BAD:
78
+ ```
79
+ const tax = subtotal * 0.1;
80
+ ```
81
+ (Too generic, might match multiple locations)
82
+
83
+ ❌ BAD:
84
+ ```
85
+ function calculateTotal() {
86
+ // ...existing code...
87
+ return subtotal + tax;
88
+ }
89
+ ```
90
+ (Contains placeholder comments instead of actual code)
91
+ ```
92
+
93
+ ### newString
94
+ - **Type**: `string`
95
+ - **Description**: Exact replacement text with same indentation
96
+
97
+ **Examples**:
98
+ ```
99
+ ✅ GOOD:
100
+ ```
101
+ function calculateTotal() {
102
+ const subtotal = items.reduce((sum, item) => sum + item.price, 0);
103
+ const tax = subtotal * TAX_RATE; // Use constant instead of magic number
104
+ const discount = calculateDiscount(subtotal);
105
+ return subtotal + tax - discount;
106
+ }
107
+ ```
108
+ (Preserves indentation, includes full context)
109
+
110
+ ❌ BAD:
111
+ ```
112
+ function calculateTotal() {
113
+ const tax = subtotal * TAX_RATE;
114
+ return subtotal + tax;
115
+ }
116
+ ```
117
+ (Lost indentation, will cause syntax errors)
118
+ ```
119
+ ```
120
+
121
+ ## Variables
122
+ - `{TOOL_NAME}`: Function/tool identifier
123
+ - `{PARAMETER_NAME}`: Specific parameter
124
+ - `{TYPE}`: TypeScript/JSON type
125
+ - `{DESCRIPTION}`: What the parameter does
126
+ - `{GOOD_EXAMPLE_X}`: Valid, idiomatic usage
127
+ - `{BAD_EXAMPLE_X}`: Invalid or non-idiomatic usage
128
+ - `{WHY_BAD}`: Explanation of what's wrong
129
+
130
+ ## Best Practices
131
+ 1. Show 2-3 good examples per parameter
132
+ 2. Show 2-3 bad examples with explanations
133
+ 3. Use realistic values (not "foo", "bar", "example")
134
+ 4. Include edge cases (empty strings, large numbers, special chars)
135
+ 5. Show proper formatting (indentation, quotes, escaping)
136
+ 6. Demonstrate common mistakes users make
137
+ 7. Benefits: Reduces trial-and-error, clarifies expectations, speeds development