Class: RubyAiGemContext::Platforms::Codex

Inherits:
RubyAiGemContext::Platform show all
Defined in:
lib/ruby_ai_gem_context/platforms/codex.rb

Class Method Summary collapse

Methods inherited from RubyAiGemContext::Platform

backup, exists?, full_path, path, read, write

Class Method Details

.description ⇒ Object



15
16
17
# File 'lib/ruby_ai_gem_context/platforms/codex.rb', line 15

def description
  "OpenAI Codex / ChatGPT - Agents documentation"
end

.filename ⇒ Object



11
12
13
# File 'lib/ruby_ai_gem_context/platforms/codex.rb', line 11

def filename
  "AGENTS.md"
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
50
51
52
53
54
55
# File 'lib/ruby_ai_gem_context/platforms/codex.rb', line 19

def generation_prompt
  <<~PROMPT
    Generate an AGENTS.md file for this Ruby project. This file helps AI coding assistants (like ChatGPT, Codex, GitHub Copilot) understand this project.

    Structure the file with:

    # Project Name

    Brief description of what this project does and its purpose.

    ## Setup

    How to install and configure the project.

    ## Usage

    Common usage patterns with code examples.

    ## Architecture

    How the code is organized, key abstractions, design patterns.

    ## API Reference

    Key classes/modules and their public interfaces.

    ## Development

    How to contribute: running tests, code style, PR process.

    ## Examples

    Practical code examples showing common use cases.

    Focus on clarity and include runnable code examples where helpful.
  PROMPT
end

.name ⇒ Object



7
8
9
# File 'lib/ruby_ai_gem_context/platforms/codex.rb', line 7

def name
  "OpenAI Codex / ChatGPT"
end

.template ⇒ Object



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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# File 'lib/ruby_ai_gem_context/platforms/codex.rb', line 57

def template
  <<~TEMPLATE
    # Project Name

    Brief description of what this project does.

    ## Setup

    ```bash
    # Install
    gem install project-name
    # or add to Gemfile
    gem 'project-name'
    ```

    ## Usage

    ```ruby
    require 'project_name'

    # Basic usage example
    ```

    ## Architecture

    Describe the overall architecture:
    - Key modules and their responsibilities
    - Design patterns used
    - How components interact

    ## API Reference

    ### MainClass

    ```ruby
    # Constructor
    MainClass.new(options)

    # Key methods
    instance.method_name(args)
    ```

    ## Development

    ```bash
    # Install dependencies
    bundle install

    # Run tests
    bundle exec rspec

    # Run linter
    bundle exec rubocop
    ```

    ## Examples

    ### Example 1: Basic Usage

    ```ruby
    # Show a complete working example
    ```

    ### Example 2: Advanced Usage

    ```ruby
    # Show more complex usage
    ```
  TEMPLATE
end