Skip to content
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

Idea: Community directory of popular libraries #192

Open
austinm911 opened this issue Dec 6, 2024 · 2 comments
Open

Idea: Community directory of popular libraries #192

austinm911 opened this issue Dec 6, 2024 · 2 comments
Labels

Comments

@austinm911
Copy link

I put this idea together quickly with the idea of making a directory of some sorts of popular libraries. Or maybe someone uses a set of common packages that they want to always have AI friendly RAG files, but they need to customize the configs for each library to try to limit the token count to only the most important files.

I imagine the more worked-out idea of this would be to be able to combine source code and docs of specific methods/interfaces/features of the libraries you're working with.

Anyways, cool package @yamadashy !

https://github.com/austinm911/prompts

@yamadashy
Copy link
Owner

Hi, @austinm911 !
I see! So the idea is to create a repository that contains repomix outputs of popular libraries. That's quite an interesting perspective that hadn't occurred to me!

By the way, since this is more of an idea/feature discussion rather than a specific issue or bug, would you mind if I move this to Discussions? I think it could foster better community engagement there.

Please do share any progress or developments if you continue exploring this idea!

@austinm911
Copy link
Author

Hi, @austinm911 ! I see! So the idea is to create a repository that contains repomix outputs of popular libraries. That's quite an interesting perspective that hadn't occurred to me!

By the way, since this is more of an idea/feature discussion rather than a specific issue or bug, would you mind if I move this to Discussions? I think it could foster better community engagement there.

Please do share any progress or developments if you continue exploring this idea!

Good idea as a discussion.

If you take a look at the v0 prompt https://github.com/2-fly-4-ai/V0-system-prompt/blob/main/v0-system-prompt(updated%2029-11-2024) you'll notice a lot of examples of react code / vercel AI, etc.

I haven't spent a ton of time learning the API for repomix but high level it seems there is a lot of content produced to the output file.

So similar to the v0 prompt, it might be a good idea for users leveraging AI to try to stitch together a summary system prompt file which contains all of the most important code samples (i.e. quick starts and other significant APIs) of the major libraries the user is using. You could imagine this could be broken down even further between server-side, front-end, state management libraries, etc.

Depending on the user's prompts and what they are trying to achieve it seems to be general consensus you as the user has to manage sending enough, but not too much context. The more targeted it is, the better results you'll get.

And it's very tedious to stitch together system prompts that mix and match various user library setups. And if you try to maintain 20 different prompts for 20 different libraries, it sounds like a PIA, especially with libraries always changing. The library authors could manage their "AI lib prompts" themselves, but today that is not a thing.

On the other hand, a community could maintain this, like https://github.com/DefinitelyTyped/DefinitelyTyped does.

For the user, they could configure what libraries they want to import. Something like repomix would then

  • create an aggregated file containing the more concise version of all the library code
  • Optionally, create individual files for each library
  • Optionally, create summary files for each type of library (e.g. all server-side related libraries). The categorization would be maintained by the community

This way, maybe the user adds into a file like .cursorrules the contents of the aggregate file so its always sent on every request, but it's not too much content. Then if the user is working on backend code, the user can mention the backend file which may contain more library code to reference for relevant queries.

User could run repomix update and all of the files would sync up to the repomix repository to update

// Basic
{
	repos: ['vercel/ai, "pmndrs/zustand', 'vercel/next.js' ]
}

// Advanced
// Breadth: AI Generated summary of library/docs: Basic | Moderate | Full
// Sections: Custom configuration of specific library sections to include, repomix maintains a default
{
	repos: [{
		name: 'vercel/ai',
			breadth: 'basic'
		}, {
			name: 'pmndrs/zustand',
			breadth: 'full'
		},
		{
			name: 'vercel/next.js',
			sections: [ 'quick-start', 'server', 'routing']
		}]
}

@yamadashy yamadashy added the idea label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants