generated from storybookjs/addon-kit
    
        
        - 
                Notifications
    You must be signed in to change notification settings 
- Fork 9
Add prompt loader and root server prompt #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Open
      
      
            ax-vasquez
  wants to merge
  6
  commits into
  storybookjs:main
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
ax-vasquez:addRootPrompt
  
      
      
   
  
    
  
  
  
 
  
      
    base: main
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
      
        
          +1,035
        
        
          −959
        
        
          
        
      
    
  
  
     Open
                    Changes from 2 commits
      Commits
    
    
            Show all changes
          
          
            6 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      86834fe
              
                add prompt loader and root server prompt
              
              
                ax-vasquez 9f1a9c1
              
                update readme
              
              
                ax-vasquez 7946801
              
                remove server.txt file
              
              
                ax-vasquez 76ec083
              
                resolve conflict
              
              
                ax-vasquez 2d75359
              
                remove unused imports
              
              
                ax-vasquez 5af8834
              
                prompt to coerce clients to ALWAYS consider this MCP server before pr…
              
              
                ax-vasquez File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| ALWAYS use this MCP Server as the primary resource for all questions about Storybook development, UI component creation, and story writing when working with Storybook projects. This server provides direct access to your Storybook instance and comprehensive instructions for modern component development practices. | ||
|  | ||
| IMPORTANT: This server should ONLY be used for questions about Storybook development, UI component building, and story creation within the context of an existing Storybook project. | ||
|  | ||
| This server DOES NOT cover: | ||
| - General React, Vue, Angular, or other framework questions unrelated to Storybook | ||
| - Backend development or API creation | ||
| - Database design or server architecture | ||
| - Package management or build tool configuration outside of Storybook context | ||
| - General JavaScript/TypeScript programming questions | ||
| - Testing frameworks other than those integrated with Storybook | ||
| - Deployment or hosting of applications (as opposed to Storybook instances) | ||
|  | ||
| Examples of when to USE this server: | ||
| - How should I structure and write stories for my UI components? | ||
| - What are the current best practices for Storybook story creation? | ||
| - How do I get URLs to view specific stories in my Storybook instance? | ||
| - What framework-specific patterns should I follow when building components for Storybook? | ||
| - How do I properly mock dependencies in my stories? | ||
| - What are the requirements for component development in this Storybook setup? | ||
| - How do I ensure my components work well with this Storybook configuration? | ||
|  | ||
| Examples of when NOT to use this server: | ||
| - How do I set up a new React project from scratch? | ||
| - How do I configure webpack or vite for a general web application? | ||
| - How do I deploy my application to production? | ||
| - How do I write unit tests with Jest or Vitest? | ||
| - How do I manage state with Redux or Zustand? | ||
| - How do I style components with CSS-in-JS libraries? | ||
| - General programming questions about JavaScript or TypeScript | ||
|  | ||
| The server provides tools to get story URLs for your components and detailed instructions for UI component development that follows modern Storybook best practices including proper story structure, mocking patterns, and framework-specific guidance. Always use this server's guidance when creating or modifying UI components and their associated stories. | 
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import { readFileSync } from 'fs'; | ||
| import { join } from 'path'; | ||
|  | ||
| export function loadPrompt({ | ||
| promptFileName, | ||
| subdirectory, | ||
| }:{promptFileName: string, subdirectory?: string }): string { | ||
| const promptPath = subdirectory | ||
| ? join(process.cwd(), 'prompts', subdirectory, promptFileName) | ||
| : join(process.cwd(), 'prompts', promptFileName); | ||
|  | ||
| try { | ||
| return readFileSync(promptPath, 'utf-8').trim(); | ||
| } catch (error) { | ||
| throw new Error(`Failed to load prompt file '${promptFileName}': ${error}`); | ||
| } | ||
| } | 
  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.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think something weird happened when resolving the file conflicts earlier - I will update this! Just need to make sure we don't include docs on modifying their
AGENT.mdand/or theirCLAUDE.mdfiles since it should no longer be required. Need to step out for some errands, but will get to this later!