ai_summary 0.1.0

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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 97bfb3890682e94993a167e56d5ffa52bf0cdb2347044aba91efea2cfa0d1d15
4
+ data.tar.gz: 445b4005da4c7ebcabd1da0061fb98d6afad91984e4b563e0bc22b7795559982
5
+ SHA512:
6
+ metadata.gz: 2e0f73fed38f2ac74d0ca1767422919ebba0c6c79912758a70018a47389beea3200bc397e364419aa56761a3997dd427012bab7692c7670e2872702e10e8510b
7
+ data.tar.gz: acc257e654a4c93f327bbbf2266734f5675e5fa1226d1150161508849ef20d2417d80971b1490e64e5e43aecdae4c425f91a45ec6d0031c6040cafd3f721583e
@@ -0,0 +1,60 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="AutoImportSettings">
4
+ <option name="autoReloadType" value="SELECTIVE" />
5
+ </component>
6
+ <component name="ChangeListManager">
7
+ <list default="true" id="34d5e5cf-2804-4d8f-a534-bf8fd82f58ab" name="Changes" comment="" />
8
+ <option name="SHOW_DIALOG" value="false" />
9
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
10
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
11
+ <option name="LAST_RESOLUTION" value="IGNORE" />
12
+ </component>
13
+ <component name="ProblemsViewState">
14
+ <option name="selectedTabId" value="CurrentFile" />
15
+ </component>
16
+ <component name="ProjectColorInfo"><![CDATA[{
17
+ "associatedIndex": 3
18
+ }]]></component>
19
+ <component name="ProjectId" id="30HOYw0CzPfd6UVL8dI2mGUJ0fS" />
20
+ <component name="ProjectViewState">
21
+ <option name="hideEmptyMiddlePackages" value="true" />
22
+ <option name="showLibraryContents" value="true" />
23
+ </component>
24
+ <component name="PropertiesComponent"><![CDATA[{
25
+ "keyToString": {
26
+ "ModuleVcsDetector.initialDetectionPerformed": "true",
27
+ "RunOnceActivity.ShowReadmeOnStart": "true",
28
+ "com.intellij.lang.ruby.rbs.tools.collection.workspace.sync.RbsCollectionUpdateProjectActivity#LAST_UPDATE_TIMESTAMP": "1753281142507",
29
+ "node.js.detected.package.eslint": "true",
30
+ "node.js.detected.package.tslint": "true",
31
+ "node.js.selected.package.eslint": "(autodetect)",
32
+ "node.js.selected.package.tslint": "(autodetect)",
33
+ "nodejs_package_manager_path": "npm",
34
+ "ruby.structure.view.model.defaults.configured": "true",
35
+ "vue.rearranger.settings.migration": "true"
36
+ }
37
+ }]]></component>
38
+ <component name="SharedIndexes">
39
+ <attachedChunks>
40
+ <set>
41
+ <option value="bundled-js-predefined-d6986cc7102b-b26f3e71634d-JavaScript-RM-251.26094.122" />
42
+ </set>
43
+ </attachedChunks>
44
+ </component>
45
+ <component name="SpringUtil" SPRING_PRE_LOADER_OPTION="true" RAKE_SPRING_PRE_LOADER_OPTION="true" RAILS_SPRING_PRE_LOADER_OPTION="true" />
46
+ <component name="TaskManager">
47
+ <task active="true" id="Default" summary="Default task">
48
+ <changelist id="34d5e5cf-2804-4d8f-a534-bf8fd82f58ab" name="Changes" comment="" />
49
+ <created>1753281082472</created>
50
+ <option name="number" value="Default" />
51
+ <option name="presentableId" value="Default" />
52
+ <updated>1753281082472</updated>
53
+ <workItem from="1753281097573" duration="753000" />
54
+ </task>
55
+ <servers />
56
+ </component>
57
+ <component name="TypeScriptGeneratedFilesManager">
58
+ <option name="version" value="3" />
59
+ </component>
60
+ </project>
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2025-07-23
4
+
5
+ - Initial release
@@ -0,0 +1,132 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, caste, color, religion, or sexual
10
+ identity and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the overall
26
+ community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or advances of
31
+ any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email address,
35
+ without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official email address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ [INSERT CONTACT METHOD].
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series of
86
+ actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or permanent
93
+ ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within the
113
+ community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.1, available at
119
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120
+
121
+ Community Impact Guidelines were inspired by
122
+ [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123
+
124
+ For answers to common questions about this code of conduct, see the FAQ at
125
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126
+ [https://www.contributor-covenant.org/translations][translations].
127
+
128
+ [homepage]: https://www.contributor-covenant.org
129
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130
+ [Mozilla CoC]: https://github.com/mozilla/diversity
131
+ [FAQ]: https://www.contributor-covenant.org/faq
132
+ [translations]: https://www.contributor-covenant.org/translations
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 andersmarkc
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,77 @@
1
+ # AiSummary
2
+
3
+ **AI-powered summary generator for Ruby on Rails applications.**
4
+ `AiSummary` scans your Rails project and creates a structured summary of your models, database tables, associations, controllers, and routes. It’s designed to help AI tools (like ChatGPT or GitHub Copilot) better understand your codebase for debugging, refactoring, onboarding, or generating code.
5
+
6
+ ---
7
+
8
+ ## ✨ Features
9
+
10
+ - Lists all models and their database columns
11
+ - Extracts ActiveRecord associations (`has_many`, `belongs_to`, etc.)
12
+ - Summarizes all controllers and public methods
13
+ - Extracts and maps all routes to their controller actions
14
+ - Outputs a clean `.txt` file (YAML and JSON output planned)
15
+ - Useful for documentation, developer onboarding, and AI integration
16
+
17
+ ---
18
+
19
+ ## 📦 Installation
20
+
21
+ After it's released to [RubyGems.org](https://rubygems.org/gems/ai_summary), add it to your Gemfile:
22
+ bundle add ai_summary
23
+ Or install it manually:
24
+ gem install ai_summary
25
+ If you want to use the gem directly from GitHub before release:
26
+ gem 'ai_summary', git: 'https://github.com/andersmarkc/ai_summary'
27
+ Then run:
28
+ bundle install
29
+
30
+ ## 🚀 Usage
31
+ Run via Rails runner:
32
+ bundle exec rails runner 'AiSummary::SummaryGenerator.generate'
33
+ Or inside a Rails console:
34
+ AiSummary::SummaryGenerator.generate
35
+ By default, this will generate a rails_summary.txt file in your project root.
36
+
37
+ ## 📂 Output Example
38
+ # MODELS
39
+ User (table: users)
40
+ - id: integer
41
+ - email: string
42
+ - created_at: datetime
43
+ - has_many :orders
44
+
45
+ Order (table: orders)
46
+ - id: integer
47
+ - user_id: integer
48
+ - total_price: decimal
49
+ - belongs_to :user
50
+
51
+ # CONTROLLERS
52
+ UsersController
53
+ - index
54
+ - show
55
+
56
+ OrdersController
57
+ - create
58
+ - update
59
+
60
+ # ROUTES
61
+ GET /users => users#index
62
+ GET /users/:id => users#show
63
+ POST /orders => orders#create
64
+ PATCH /orders/:id => orders#update
65
+
66
+
67
+ ## 🤝 Contributing
68
+ Bug reports and pull requests are welcome on GitHub at
69
+ https://github.com/andersmarkc/ai_summary
70
+
71
+ This project is intended to be a safe, welcoming space for collaboration. Contributors are expected to follow the Code of Conduct.
72
+
73
+ ## 📜 License
74
+ The gem is available as open source under the terms of the MIT License.
75
+
76
+
77
+
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task default: :spec
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AiSummary
4
+ VERSION = "0.1.0"
5
+ end
data/lib/ai_summary.rb ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "ai_summary/version"
4
+
5
+ module AiSummary
6
+ class Error < StandardError; end
7
+ # Your code goes here...
8
+ end
@@ -0,0 +1,4 @@
1
+ module AiSummary
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,140 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ai_summary
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Anders Mark Jonassen
8
+ bindir: exe
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: rails
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - "~>"
17
+ - !ruby/object:Gem::Version
18
+ version: '6.1'
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - "~>"
24
+ - !ruby/object:Gem::Version
25
+ version: '6.1'
26
+ - !ruby/object:Gem::Dependency
27
+ name: activerecord
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - "~>"
31
+ - !ruby/object:Gem::Version
32
+ version: '6.1'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '6.1'
40
+ - !ruby/object:Gem::Dependency
41
+ name: activesupport
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '6.1'
47
+ type: :runtime
48
+ prerelease: false
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '6.1'
54
+ - !ruby/object:Gem::Dependency
55
+ name: rspec
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '3.12'
61
+ type: :development
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '3.12'
68
+ - !ruby/object:Gem::Dependency
69
+ name: rake
70
+ requirement: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '13.0'
75
+ type: :development
76
+ prerelease: false
77
+ version_requirements: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: '13.0'
82
+ - !ruby/object:Gem::Dependency
83
+ name: bundler
84
+ requirement: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: '2.4'
89
+ type: :development
90
+ prerelease: false
91
+ version_requirements: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '2.4'
96
+ description: AI Summary is a Ruby gem that inspects your Rails project and generates
97
+ a developer-friendly summary of your models, tables, controllers, routes, and more.
98
+ Designed to help AI tools understand your application structure for better code
99
+ suggestions, onboarding, debugging, or documentation.
100
+ email:
101
+ - andersmarkc@gmail.com
102
+ executables: []
103
+ extensions: []
104
+ extra_rdoc_files: []
105
+ files:
106
+ - ".idea/workspace.xml"
107
+ - CHANGELOG.md
108
+ - CODE_OF_CONDUCT.md
109
+ - LICENSE.txt
110
+ - README.md
111
+ - Rakefile
112
+ - lib/ai_summary.rb
113
+ - lib/ai_summary/version.rb
114
+ - sig/ai_summary.rbs
115
+ homepage: https://github.com/andersmarkc/ai_summary
116
+ licenses:
117
+ - MIT
118
+ metadata:
119
+ allowed_push_host: https://rubygems.org
120
+ homepage_uri: https://github.com/andersmarkc/ai_summary
121
+ source_code_uri: https://github.com/andersmarkc/ai_summary
122
+ changelog_uri: https://github.com/andersmarkc/ai_summary/blob/main/CHANGELOG.md
123
+ rdoc_options: []
124
+ require_paths:
125
+ - lib
126
+ required_ruby_version: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - ">="
129
+ - !ruby/object:Gem::Version
130
+ version: 3.2.0
131
+ required_rubygems_version: !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - ">="
134
+ - !ruby/object:Gem::Version
135
+ version: '0'
136
+ requirements: []
137
+ rubygems_version: 3.6.7
138
+ specification_version: 4
139
+ summary: Generate a structured summary of your Rails codebase for AI-assisted workflows.
140
+ test_files: []