rails_skills 0.3.0 → 0.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c1b6f8f02fc94e9e434f1920d1e48644527a8b6bc759cf6a3f98a8e58ae91e3c
4
- data.tar.gz: 57557d27a5b1d441d275504ff7198a0bf8e94c46a0f9a09b575b1eadd850e7da
3
+ metadata.gz: 5af04983ccd7bca43906c83a86f87b2335b3ebf8f623c7c076c643912e4a4de0
4
+ data.tar.gz: 3a0f8b103cf6a739d43563af198164be53f1ecd0695dd380550936437cdec0d5
5
5
  SHA512:
6
- metadata.gz: 6aa639bc11974b790c8072330b89746ce6ef1d0d6abe7f9e48b81babc3eee3094301c200bee533f5d23a615c4dccb1c7ca5082e5c97aa7d4503e5341f544b654
7
- data.tar.gz: 59c1921613d644ef07b1b567b23cfa0f990eeb700c1928e9903d9a609aee7f5af2277e40071301cd84d67c58121e881ad992b4b38a5d1510d548047309c5e97f
6
+ metadata.gz: 447433389c77cfa4db2c17fe6a23bb70816c45029bab1ee59e8bbea1bc428ad17beb9d6c840625c6fc05884ea07581798c4133a93f8286144ab80a7f51a9934a
7
+ data.tar.gz: 16ac56c48e06851a081221aedf2a8bb2ad2d93d60b7ff881977e9ead7b2d9123db5fe76252edbff7d7de0eb7ee983ee0f40326777ea64c6502bc564bc834485a
data/README.md CHANGED
@@ -4,12 +4,13 @@ A Ruby gem that organizes your knowledge base into AI skills shared between **yo
4
4
 
5
5
  # Structure
6
6
  It introduces additional layer on top of MVC - intelligence layer. This layer is optimised for reading by both humans and machines.
7
- Next structure is default:
7
+ The gem scaffolds three default categories but any folder under `skills/` is automatically discovered and symlinked:
8
8
  | Category | Purpose | Example |
9
9
  |----------|---------|---------|
10
- | **domains/** | Business domain knowledge | `domains/payments`, `domains/auth` |
10
+ | **services/** | Business service skills | `services/payments`, `services/auth` |
11
11
  | **stack/** | Technology stack skills | `stack/ruby`, `stack/postgres` |
12
- | **workflows/** | Development workflows | `workflows/commit`, `workflows/deploy` |
12
+ | **workflows/** | Development workflows and guides | `workflows/commit`, `workflows/deploy` |
13
+ | **your_folder/** | Any custom category you create | `your_folder/my_skill` |
13
14
 
14
15
  ## Usage
15
16
 
@@ -27,12 +28,12 @@ rails generate rails_skills:install
27
28
  ```
28
29
  your_rails_app/
29
30
  ├── skills/ # Shared AI skill files (canonical location)
30
- │ ├── domains/ # Domain-specific skills
31
+ │ ├── services/ # Domain-specific skills
31
32
  │ │ └── .keep
32
33
  │ ├── stack/ # Technology stack skills
33
34
  │ │ └── ruby/
34
35
  │ │ └── SKILL.md
35
- │ └── workflows/ # Workflow skills
36
+ │ └── workflows/ # Workflows and guides
36
37
  │ ├── commit/
37
38
  │ │ └── SKILL.md
38
39
  │ └── rails_skills/
@@ -58,9 +59,10 @@ Skills are organized by category in `skills/` but flattened when symlinked into
58
59
  ### Create a custom skill
59
60
 
60
61
  ```bash
61
- rails generate rails_skills:skill domains/payments
62
+ rails generate rails_skills:skill services/payments
62
63
  rails generate rails_skills:skill stack/postgres
63
64
  rails generate rails_skills:skill workflows/deploy --description="Deployment workflow"
65
+ rails generate rails_skills:skill my_folder/my_skill # custom folders work too
64
66
  ```
65
67
 
66
68
  Skills are created in `skills/` and automatically symlinked (flattened) into both `.claude/skills` and `.codex/skills`.
@@ -87,7 +89,7 @@ skills/stack/ruby → .claude/skills/stack/ruby (NOT discovered)
87
89
 
88
90
  ## How It Works
89
91
 
90
- 1. `skills/` is the single source of truth, organized by category (`domains/`, `stack/`, `workflows/`)
92
+ 1. `skills/` is the single source of truth any subfolder is a category
91
93
  2. Claude and Codex require a flat skills directory — nested paths are not loaded
92
94
  3. The gem creates flattened symlinks: `skills/stack/ruby` → `.claude/skills/ruby`
93
95
  4. Edit skills in `skills/` and both AI tools see the changes immediately
@@ -15,7 +15,7 @@ module RailsSkills
15
15
 
16
16
  def create_skills_directory
17
17
  empty_directory RailsSkills::SKILLS_DIR
18
- RailsSkills::CATEGORIES.each do |category|
18
+ RailsSkills::DEFAULT_CATEGORIES.each do |category|
19
19
  empty_directory "#{RailsSkills::SKILLS_DIR}/#{category}"
20
20
  end
21
21
  end
@@ -32,7 +32,14 @@ module RailsSkills
32
32
  end
33
33
 
34
34
  def create_skills_targets
35
- RailsSkills::SKILL_TARGETS.each { |target| empty_directory target }
35
+ RailsSkills::SKILL_TARGETS.each do |target|
36
+ dest = File.join(destination_root, target)
37
+ if File.symlink?(dest)
38
+ File.delete(dest)
39
+ say_status :remove, "#{target} (old symlink)", :yellow
40
+ end
41
+ empty_directory target
42
+ end
36
43
  end
37
44
 
38
45
  def copy_claude_settings
@@ -40,8 +47,8 @@ module RailsSkills
40
47
  end
41
48
 
42
49
  def install_default_skills
43
- # domains - empty with .keep
44
- install_skill_folder("domains")
50
+ # services - empty with .keep
51
+ install_skill_folder("services")
45
52
 
46
53
  # stack - ruby skill
47
54
  install_skill("stack/ruby")
@@ -53,10 +60,12 @@ module RailsSkills
53
60
 
54
61
  def link_skills
55
62
  skills_root = File.join(destination_root, RailsSkills::SKILLS_DIR)
63
+ return unless File.directory?(skills_root)
56
64
 
57
- RailsSkills::CATEGORIES.each do |category|
65
+ Dir.children(skills_root).sort.each do |category|
58
66
  category_dir = File.join(skills_root, category)
59
67
  next unless File.directory?(category_dir)
68
+ next if category.start_with?(".")
60
69
 
61
70
  Dir.children(category_dir).sort.each do |name|
62
71
  next unless File.directory?(File.join(category_dir, name))
@@ -85,7 +94,7 @@ module RailsSkills
85
94
  say ""
86
95
  say "Directory structure:", :yellow
87
96
  say " skills/"
88
- say " domains/ <- domain-specific skills"
97
+ say " services/ <- service-specific skills"
89
98
  say " stack/ <- technology stack skills (ruby)"
90
99
  say " workflows/ <- workflow skills (commit)"
91
100
  RailsSkills::SKILL_TARGETS.each do |target|
@@ -98,9 +107,10 @@ module RailsSkills
98
107
  say "Skills are flattened into #{RailsSkills::SKILL_TARGETS.join(' and ')}", :blue
99
108
  say ""
100
109
  say "Next steps:", :yellow
101
- say " rails g rails_skills:skill domains/my_domain # Create a domain skill"
110
+ say " rails g rails_skills:skill services/payments # Create a service skill"
102
111
  say " rails g rails_skills:skill stack/postgres # Create a stack skill"
103
112
  say " rails g rails_skills:skill workflows/deploy # Create a workflow skill"
113
+ say " rails g rails_skills:skill my_folder/my_skill # Custom folders work too"
104
114
  say ""
105
115
  end
106
116
 
@@ -7,7 +7,7 @@ description: Git commit workflow and conventions
7
7
 
8
8
  1. **Check status**: `git status`
9
9
  2. **Review changes**: `git diff`
10
- 3. **Analyze missing docs/skills** - If you see changes to domains listed in skills/domains - review the need to update the skill doc
10
+ 3. **Analyze missing docs/skills** - If you see changes to services listed in skills/services - review the need to update the skill doc
11
11
  3. **Stage files**: `git add <files>` (prefer specific files over `-A`)
12
12
  4. **Commit**: `git commit -m "type: message"`
13
13
  5. **Push**: Push only if explicitly asked so, use `git push origin {current branch}`
@@ -10,15 +10,16 @@ description: How to manage AI skills with the rails_skills gem
10
10
  | Command | Purpose |
11
11
  |---------|---------|
12
12
  | `rails g rails_skills:install` | Install skills directory and symlinks |
13
- | `rails g rails_skills:skill domains/NAME` | Create a domain skill |
13
+ | `rails g rails_skills:skill services/NAME` | Create a service skill |
14
14
  | `rails g rails_skills:skill stack/NAME` | Create a stack skill |
15
15
  | `rails g rails_skills:skill workflows/NAME` | Create a workflow skill |
16
+ | `rails g rails_skills:skill FOLDER/NAME` | Any custom folder works |
16
17
 
17
18
  ## Directory Structure
18
19
 
19
20
  ```
20
21
  skills/ # Canonical location — edit skills here
21
- domains/ # Business domain knowledge
22
+ services/ # Business service knowledge
22
23
  stack/ # Technology stack skills
23
24
  workflows/ # Development workflow skills
24
25
  .claude/skills/ # Flattened symlinks (auto-managed)
@@ -31,11 +32,14 @@ Skills are organized by category in `skills/` but flattened when symlinked. `ski
31
32
 
32
33
  ## Categories
33
34
 
35
+ Any folder under `skills/` is a category. The gem scaffolds three defaults but you can create your own:
36
+
34
37
  | Category | Use for | Examples |
35
38
  |----------|---------|----------|
36
- | **domains/** | Business logic, bounded contexts | `domains/payments`, `domains/auth`, `domains/billing` |
39
+ | **services/** | Business logic, bounded contexts | `services/payments`, `services/auth`, `services/billing` |
37
40
  | **stack/** | Languages, frameworks, databases | `stack/ruby`, `stack/postgres`, `stack/redis` |
38
41
  | **workflows/** | Dev processes, CI/CD, conventions | `workflows/commit`, `workflows/deploy`, `workflows/review` |
42
+ | **your_folder/** | Anything you need | `your_folder/my_skill` |
39
43
 
40
44
  ## Creating Skills
41
45
 
@@ -44,7 +48,7 @@ Skills are organized by category in `skills/` but flattened when symlinked. `ski
44
48
  rails g rails_skills:skill stack/postgres
45
49
 
46
50
  # With custom description
47
- rails g rails_skills:skill domains/payments --description="Payment processing patterns"
51
+ rails g rails_skills:skill services/payments --description="Payment processing patterns"
48
52
 
49
53
  # With references directory for supplementary files
50
54
  rails g rails_skills:skill stack/redis --with-references
@@ -81,6 +85,6 @@ Conventions and guidelines.
81
85
  1. One skill per concept — keep skills focused and single-purpose
82
86
  2. Use quick reference tables for scannable lookup
83
87
  3. Include real code examples over abstract descriptions
84
- 4. Put domain skills close to the business language your team uses
88
+ 4. Put service skills close to the business language your team uses
85
89
  5. Update skills when patterns evolve — they are living documentation
86
90
  6. Skills are shared between Claude and Codex — write for both audiences
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsSkills
4
- VERSION = "0.3.0"
4
+ VERSION = "0.4.0"
5
5
  end
data/lib/rails_skills.rb CHANGED
@@ -9,6 +9,6 @@ module RailsSkills
9
9
  SKILLS_DIR = "skills"
10
10
  CLAUDE_DIR = ".claude"
11
11
  CODEX_DIR = ".codex"
12
- CATEGORIES = %w[domains stack workflows].freeze
12
+ DEFAULT_CATEGORIES = %w[services stack workflows].freeze
13
13
  SKILL_TARGETS = ["#{CLAUDE_DIR}/skills", "#{CODEX_DIR}/skills"].freeze
14
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_skills
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergii Mostovyi
@@ -44,7 +44,7 @@ files:
44
44
  - lib/generators/rails_skills/rules_library/testing.md
45
45
  - lib/generators/rails_skills/skill/skill_generator.rb
46
46
  - lib/generators/rails_skills/skill/templates/SKILL.md.tt
47
- - lib/generators/rails_skills/skills_library/domains/.keep
47
+ - lib/generators/rails_skills/skills_library/services/.keep
48
48
  - lib/generators/rails_skills/skills_library/stack/ruby/SKILL.md
49
49
  - lib/generators/rails_skills/skills_library/workflows/commit/SKILL.md
50
50
  - lib/generators/rails_skills/skills_library/workflows/rails_skills/SKILL.md