Class: RubyAiGemContext::Platforms::LlmTxt
Class Method Summary
collapse
backup, exists?, full_path, path, read, write
Class Method Details
.description ⇒ Object
15
16
17
|
# File 'lib/ruby_ai_gem_context/platforms/llm_txt.rb', line 15
def description
"llm.txt - Universal LLM context file (like robots.txt for AI)"
end
|
.filename ⇒ Object
11
12
13
|
# File 'lib/ruby_ai_gem_context/platforms/llm_txt.rb', line 11
def filename
"llm.txt"
end
|
.generation_prompt ⇒ Object
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# File 'lib/ruby_ai_gem_context/platforms/llm_txt.rb', line 19
def generation_prompt
<<~PROMPT
Generate an llm.txt file for this Ruby project. The llm.txt format is like robots.txt but for LLMs - it helps AI systems understand what this project is and how to use it.
Format the file as:
# Project Name
> Brief one-line description
## About
Paragraph explaining what this project does, who it's for, and why it exists.
## Quick Start
The fastest way to get started with this project.
## Documentation
- Link to or description of where to find docs
- Key files to read to understand the project
## API
Key classes/methods and what they do.
## Examples
Short, practical code examples.
## License
License information.
Keep it concise and scannable. This is meant to be quickly parsed by AI systems.
PROMPT
end
|
.name ⇒ Object
7
8
9
|
# File 'lib/ruby_ai_gem_context/platforms/llm_txt.rb', line 7
def name
"llm.txt"
end
|
.template ⇒ Object
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
# File 'lib/ruby_ai_gem_context/platforms/llm_txt.rb', line 51
def template
<<~TEMPLATE
# Project Name
> One-line description of the project
## About
Longer description of what this project does, its purpose, and target audience.
## Quick Start
```bash
gem install project-name
```
```ruby
require 'project_name'
# Minimal usage example
```
## Documentation
- README.md - Overview and setup
- lib/ - Source code
- spec/ - Test examples
## API
- `MainModule` - Entry point
- `MainModule.method` - Key functionality
## Examples
```ruby
# Practical example
```
## License
MIT License - See LICENSE file
TEMPLATE
end
|