x_aeon_agents 1.3.0 → 2.0.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: 3ad694c34995a4a2ae110fbc5d9692b4fecd0ced12fd9307042d100d9eb21fef
4
- data.tar.gz: 1b1ae0dfcfb2c133219969af207b216d60c42d2de08d45d05daadbab7a602041
3
+ metadata.gz: e3d6851438a928d374ce8f950e86122553eeb9f27e5e2f9c2dd149fa51f52fe7
4
+ data.tar.gz: 8a6bfdb35ae71c18033e6a8eb9111567e3dc7d3b900d7e66bf6e76411763c0e3
5
5
  SHA512:
6
- metadata.gz: d5aab40193178b7db1c9e8414fe0da5036c23fe526538a9e30fa24802b187309824cb402cbd938fd62398b6a7230e9f95e80784f904e3ff00a2ef872b65fb228
7
- data.tar.gz: cc5e14027141ed92f1e1e19866c360b252f055e6ed1962870cfcc4a9da34f8a9e7c1ff32f16415717661e08c4830ebfd6e76e0f9d1daf45422d09c29e56c8fa7
6
+ metadata.gz: df4b5684cf386d5886638caf8e1ea316f8e87d09f52ea744872af01fc238d356ce0b16412715ab9826797d17d299f7e983b1769b9101822df74f1a1f56f9cb7d
7
+ data.tar.gz: 75b83097f7230170cd275a6253ec00f8245ebe0b8984099990c821b7ef0a2d1a4796639f39a21fc69074dda1b61b35cf4d75d1d1b1e917d7bb07df4bb0bdbda0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # [v2.0.0](https://github.com/Muriel-Salvan/x_aeon_agents/compare/v1.3.0...v2.0.0) (2026-10-15 22:46:39)
2
+
3
+ ### Breaking changes
4
+
5
+ * [Make PR base ref configurable for requirement and issue implementation](https://github.com/Muriel-Salvan/x_aeon_agents/commit/8a16c8f4c3c7705239a763248a4e2fb0e2150c01)
6
+
1
7
  # [v1.3.0](https://github.com/Muriel-Salvan/x_aeon_agents/compare/v1.2.0...v1.3.0) (2026-10-13 14:54:19)
2
8
 
3
9
  ### Features
data/README.md CHANGED
@@ -195,7 +195,7 @@ Each of these secrets can alternatively be retrieved by custom code declared in
195
195
  - 📝 **AI commit messages** — analyze staged changes and generate a meaningful message, with flexible staging strategies (`all`, `if_empty`, `none`)
196
196
  - 🚀 **Automated Pull Request creation** — push the branch to GitHub and open a PR against a configurable base ref with an AI-written description
197
197
  - 🐛 **GitHub issue implementation** — turn an issue (and its comments) into working code, committing changes and opening a PR automatically
198
- - 🛠️ **Arbitrary requirement implementation** — pass free-form requirements to a Developer agent that plans, codes and tests the changes, optionally committing and opening a PR
198
+ - 🛠️ **Arbitrary requirement implementation** — pass free-form requirements to a Developer agent that plans, codes and tests the changes, optionally committing and opening a PR against a configurable base ref
199
199
  - 📚 **README generation** — build a full README from the codebase with 10 toggleable sections (about, quick start, requirements, features, public API, documentation, how-it-works, development, contributing, license)
200
200
  - 🔍 **Git diff interpretation** — summarize the working-tree changes and the intent behind them relative to any base ref
201
201
  - 💬 **One-shot prompts** — send a single prompt to the AI agent and print the response
@@ -16,12 +16,13 @@ module XAeonAgents
16
16
  # Constructor
17
17
  #
18
18
  # @param commit [Boolean] Should we commit files at every step?
19
- # @param pull_request [Boolean] Should we create a Github Pull Request with this implementation?
19
+ # @param pr_base_ref [String, nil] The git ref (branch name) of the base of the Github Pull Request to
20
+ # create with this implementation, or nil to not create any Pull Request
20
21
  # @param agent_params [Hash{Symbol => Object}] Extra agent parameters
21
- def initialize(commit: false, pull_request: false, **agent_params)
22
+ def initialize(commit: false, pr_base_ref: nil, **agent_params)
22
23
  super(name: 'Developer', **agent_params)
23
24
  @commit = commit
24
- @pull_request = pull_request
25
+ @pr_base_ref = pr_base_ref
25
26
  end
26
27
 
27
28
  # Execute the agent to generate some output artifacts based on some input artifacts.
@@ -34,7 +35,8 @@ module XAeonAgents
34
35
  task(:setup_requirements, name: 'Setup requirements', intent: 'Initialize requirements from the current commit') do
35
36
  @artifacts.merge!(
36
37
  requirements:,
37
- base_sha: Helpers.git.gcommit('HEAD').sha
38
+ base_sha: Helpers.git.gcommit('HEAD').sha,
39
+ pr_base_ref: @pr_base_ref
38
40
  )
39
41
  end
40
42
 
@@ -208,7 +210,7 @@ module XAeonAgents
208
210
  )
209
211
  logger.info "Documenter changes: #{Helpers.git.status_info.changed.keys.join(', ')}"
210
212
 
211
- if @commit || @pull_request
213
+ if @commit || @pr_base_ref
212
214
  task(
213
215
  new_agent(
214
216
  CommitterAgent,
@@ -220,7 +222,7 @@ module XAeonAgents
220
222
  )
221
223
  end
222
224
 
223
- if @pull_request
225
+ if @pr_base_ref
224
226
  task(
225
227
  new_agent(
226
228
  PullRequestCreatorAgent,
@@ -14,12 +14,13 @@ module XAeonAgents
14
14
  # Constructor
15
15
  #
16
16
  # @param commit [Boolean] Whether to commit changes automatically
17
- # @param pull_request [Boolean] Whether to create a pull request automatically
17
+ # @param pr_base_ref [String, nil] The git ref (branch name) of the base of the Pull Request to create,
18
+ # or nil to not create any Pull Request
18
19
  # @param agent_params [Hash{Symbol => Object}] Extra agent parameters
19
- def initialize(commit: false, pull_request: false, **agent_params)
20
+ def initialize(commit: false, pr_base_ref: nil, **agent_params)
20
21
  super(name: 'Issue implementer', **agent_params)
21
22
  @commit = commit
22
- @pull_request = pull_request
23
+ @pr_base_ref = pr_base_ref
23
24
  end
24
25
 
25
26
  # Execute the agent to implement a GitHub issue.
@@ -35,7 +36,7 @@ module XAeonAgents
35
36
  issue = Helpers.github.issue(Helpers.github_repo, github_issue_number)
36
37
  issue_comments = Helpers.github.issue_comments(Helpers.github_repo, github_issue_number)
37
38
  task(
38
- new_agent(DeveloperAgent, commit: @commit, pull_request: @pull_request),
39
+ new_agent(DeveloperAgent, commit: @commit, pr_base_ref: @pr_base_ref),
39
40
  requirements: build_requirements(issue, issue_comments),
40
41
  intent: 'Develop the gathered requirements'
41
42
  )
@@ -9,7 +9,7 @@ module XAeonAgents
9
9
  # @return [Hash{Symbol => Object}] Set of input artifacts description, per artifact name
10
10
  def input_artifacts_contracts
11
11
  {
12
- base_sha: 'The git ref of the base of the feature branch',
12
+ pr_base_ref: 'The git ref (branch name) of the base to create the Pull Request against',
13
13
  requirements: {
14
14
  description: 'The initial requirements',
15
15
  optional: true
@@ -28,10 +28,10 @@ module XAeonAgents
28
28
 
29
29
  # Execute the agent to generate some output artifacts based on some input artifacts.
30
30
  #
31
- # @param base_sha [String] The git reference of the base of the branch.
31
+ # @param pr_base_ref [String] The git ref (branch name) used as base of the Pull Request.
32
32
  # @param requirements [String, nil] The initial requirements, or nil if none.
33
33
  # @return [Hash{Symbol => Object}] Output artifacts content
34
- def run(base_sha:, requirements: nil)
34
+ def run(pr_base_ref:, requirements: nil)
35
35
  super
36
36
  raise 'Unable to find the Github repository' unless Helpers.github_repo
37
37
 
@@ -56,7 +56,7 @@ module XAeonAgents
56
56
  if @artifacts[:existing_pr_url].nil?
57
57
  # Create new PR
58
58
  git_diff_interpreter_agent = new_agent(GitDiffInterpreterAgent)
59
- task(git_diff_interpreter_agent, intent: 'Analyze changes in the whole branch', git_ref_base: base_sha)
59
+ task(git_diff_interpreter_agent, intent: 'Analyze changes in the whole branch', git_ref_base: pr_base_ref)
60
60
  task(:create_pr, name: 'Create Pull Request', intent: "Create a Pull Request for the branch #{head_branch} on repo #{repo_name}") do
61
61
  sections = [@artifacts[:change_intent].strip]
62
62
  sections << <<~EO_SECTION if requirements
@@ -135,7 +135,7 @@ module XAeonAgents
135
135
  EO_SECTION
136
136
  new_pr = Helpers.github.create_pull_request(
137
137
  repo_name,
138
- base_sha,
138
+ pr_base_ref,
139
139
  head_branch,
140
140
  @artifacts[:one_line_summary].strip,
141
141
  sections.map(&:strip).join("\n\n")
@@ -100,7 +100,14 @@ module XAeonAgents
100
100
  @artifacts[:plan] = 'No implementation plan'
101
101
  @artifacts[:files_diffs] = 'No changes'
102
102
  else
103
- task(new_agent(DeveloperAgent, commit: true, pull_request: true), intent: 'Develop new requirements devise from review comments')
103
+ task(
104
+ new_agent(
105
+ DeveloperAgent,
106
+ commit: true,
107
+ pr_base_ref: Helpers.github.pull_request(Helpers.github_repo, @artifacts[:pr_number]).base.ref
108
+ ),
109
+ intent: 'Develop new requirements devise from review comments'
110
+ )
104
111
  end
105
112
 
106
113
  @artifacts[:open_comments_to_agents].each.with_index do |comment, comment_idx|
@@ -103,7 +103,7 @@ module XAeonAgents
103
103
  # Push changes on Github and create a Pull Request.
104
104
  def create_pr
105
105
  agent_kwargs = {
106
- base_sha: options[:base]
106
+ pr_base_ref: options[:base]
107
107
  }
108
108
  agent_kwargs[:requirements] = options[:requirements] if options[:requirements]
109
109
  Agents::PullRequestCreatorAgent.new(session_id: options[:session_id]).run(**agent_kwargs)
@@ -210,21 +210,25 @@ module XAeonAgents
210
210
  long_desc <<~LONGDESC
211
211
  Reads the content (and comments) of a GitHub issue and delegates the
212
212
  implementation to the Developer agent. The agent commits changes and
213
- opens a Pull Request automatically.
213
+ opens a Pull Request against the base given with the --pr-base option
214
+ (defaults to main).
214
215
 
215
216
  Examples:
216
217
 
217
218
  $ xaa implement-issue 15
218
219
 
220
+ $ xaa implement-issue 15 --pr-base master
221
+
219
222
  $ xaa implement-issue 15 --session-id my-session
220
223
  LONGDESC
224
+ option :pr_base, type: :string, default: 'main', desc: 'Base git ref of the GitHub Pull Request to create'
221
225
  # Implements a GitHub issue using AI.
222
226
  #
223
227
  # @param github_issue_number [Integer] The GitHub issue number to implement
224
228
  def implement_issue(github_issue_number)
225
229
  Agents::IssueImplementerAgent.new(
226
230
  commit: true,
227
- pull_request: true,
231
+ pr_base_ref: options[:pr_base],
228
232
  session_id: options[:session_id]
229
233
  ).run(github_issue_number: Integer(github_issue_number))
230
234
  end
@@ -238,21 +242,24 @@ module XAeonAgents
238
242
  Pass free-form requirements to the Developer agent, which will analyze
239
243
  the codebase and produce the requested changes.
240
244
 
245
+ The --pr-base option gives the base ref of the Pull Request to create:
246
+ omit the option to not create any Pull Request.
247
+
241
248
  Examples:
242
249
 
243
250
  $ xaa implement "Add authentication middleware"
244
251
 
245
- $ xaa implement "Refactor the database layer" --commit --pr --session-id my-session
252
+ $ xaa implement "Refactor the database layer" --commit --pr-base main --session-id my-session
246
253
  LONGDESC
247
254
  option :commit, type: :boolean, default: false, desc: 'Commit files at every step'
248
- option :pr, type: :boolean, default: false, desc: 'Create a GitHub Pull Request for the changes'
255
+ option :pr_base, type: :string, default: nil, desc: 'Base git ref of the GitHub Pull Request to create (omit for no Pull Request)'
249
256
  # Implements arbitrary requirements using AI.
250
257
  #
251
258
  # @param requirements [String] Free-form requirements describing the desired changes
252
259
  def implement(requirements)
253
260
  Agents::DeveloperAgent.new(
254
261
  commit: options[:commit],
255
- pull_request: options[:pr],
262
+ pr_base_ref: options[:pr_base],
256
263
  session_id: options[:session_id]
257
264
  ).run(requirements:)
258
265
  end
@@ -2,5 +2,5 @@ module XAeonAgents
2
2
  # @!group Global API
3
3
 
4
4
  # Gem version
5
- VERSION = '1.3.0'
5
+ VERSION = '2.0.0'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: x_aeon_agents
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Muriel Salvan