ocak 0.5.0 → 0.6.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.
@@ -24,6 +24,15 @@ Only re-run tests if you had to resolve merge conflicts or edit files:
24
24
  <%- if lint_command -%>
25
25
  <%= lint_command %>
26
26
  <%- end -%>
27
+ <%- unless test_command || lint_command -%>
28
+ # No specific test/lint commands configured. Detect from project structure:
29
+ # - Gemfile → bundle exec rspec (or bundle exec rake test)
30
+ # - package.json → npm test
31
+ # - Cargo.toml → cargo test
32
+ # - go.mod → go test ./...
33
+ # - pyproject.toml / setup.py → pytest
34
+ # Read the project's CLAUDE.md for additional conventions.
35
+ <%- end -%>
27
36
  ```
28
37
 
29
38
  If anything fails after conflict resolution, STOP and report the failures. Do not create a PR with failing checks.
@@ -63,6 +72,9 @@ Closes #<issue-number>
63
72
  <%- if lint_command -%>
64
73
  - `<%= lint_command %>` — passed
65
74
  <%- end -%>
75
+ <%- unless test_command || lint_command -%>
76
+ - Stack auto-detected from project structure; commands detected at runtime
77
+ <%- end -%>
66
78
  EOF
67
79
  )"
68
80
  ```
@@ -33,6 +33,15 @@ gh issue view <number> --json title,body,labels
33
33
  <%- if test_command -%>
34
34
  - `<%= test_command %>`
35
35
  <%- end -%>
36
+ <%- unless lint_command || test_command -%>
37
+ - No specific commands configured. Detect from project structure:
38
+ - Gemfile → bundle exec rspec (or bundle exec rake test)
39
+ - package.json → npm test
40
+ - Cargo.toml → cargo test
41
+ - go.mod → go test ./...
42
+ - pyproject.toml / setup.py → pytest
43
+ - Read the project's CLAUDE.md for additional conventions.
44
+ <%- end -%>
36
45
 
37
46
  ### Phase 2: Self-Review
38
47
 
@@ -88,6 +97,15 @@ Run the complete check suite one last time:
88
97
  <%- if test_command -%>
89
98
  <%= test_command %>
90
99
  <%- end -%>
100
+ <%- unless lint_command || test_command -%>
101
+ # No specific commands configured. Detect from project structure:
102
+ # - Gemfile → bundle exec rspec (or bundle exec rake test)
103
+ # - package.json → npm test
104
+ # - Cargo.toml → cargo test
105
+ # - go.mod → go test ./...
106
+ # - pyproject.toml / setup.py → pytest
107
+ # Read the project's CLAUDE.md for additional conventions.
108
+ <%- end -%>
91
109
  ```
92
110
 
93
111
  ALL must pass. If anything fails, fix it. Maximum 3 fix cycles — if still failing after 3 attempts, stop and report what's broken.
@@ -10,3 +10,4 @@
10
10
  logs/pipeline/
11
11
  .ocak/logs/
12
12
  .ocak/reports/
13
+ .ocak/trusted
@@ -1,3 +1,7 @@
1
+ # WARNING: Commands configured in this file (test_command, lint_command, format_command,
2
+ # setup_command, security_commands) are executed with your user privileges. Treat this
3
+ # file like executable code — review it before running `ocak run` in an unfamiliar repo.
4
+
1
5
  # Ocak pipeline configuration
2
6
  # Generated by `ocak init` — customize as needed
3
7
 
@@ -27,6 +31,11 @@ stack:
27
31
  <%- end -%>
28
32
  <%- end -%>
29
33
 
34
+ # Multi-repo mode — process issues across multiple local repos
35
+ # Repo path mappings go in ~/.config/ocak/config.yml (machine-specific, not committed)
36
+ # multi_repo: true
37
+ # target_field: target_repo # YAML front-matter field in issue body
38
+
30
39
  # Issue backend — 'github' (default) or 'local'
31
40
  # Local mode stores issues as files in .ocak/issues/ (no gh CLI needed for issues).
32
41
  # Auto-detected: if .ocak/issues/ contains .md files, local mode is used automatically.
@@ -7,14 +7,15 @@ require 'shellwords'
7
7
 
8
8
  module Ocak
9
9
  class WorktreeManager
10
- def initialize(config:, logger: nil)
10
+ def initialize(config:, repo_dir: nil, logger: nil)
11
11
  @config = config
12
12
  @logger = logger
13
- @worktree_base = File.join(config.project_dir, config.worktree_dir)
13
+ @repo_dir = repo_dir || config.project_dir
14
+ @worktree_base = File.join(@repo_dir, config.worktree_dir)
14
15
  @mutex = Mutex.new
15
16
  end
16
17
 
17
- def create(issue_number, setup_command: nil)
18
+ def create(issue_number, setup_command: nil, target_repo: nil)
18
19
  @mutex.synchronize do
19
20
  raise ArgumentError, "Invalid issue number: #{issue_number}" unless issue_number.to_s.match?(/\A\d+\z/)
20
21
 
@@ -31,7 +32,7 @@ module Ocak
31
32
  raise WorktreeError, "Setup command failed: #{stderr}" unless status.success?
32
33
  end
33
34
 
34
- Worktree.new(path: path, branch: branch, issue_number: issue_number)
35
+ Worktree.new(path: path, branch: branch, issue_number: issue_number, target_repo: target_repo)
35
36
  end
36
37
  end
37
38
 
@@ -68,14 +69,14 @@ module Ocak
68
69
  removed
69
70
  end
70
71
 
71
- Worktree = Struct.new(:path, :branch, :issue_number, keyword_init: true) # rubocop:disable Style/RedundantStructKeywordInit
72
+ Worktree = Struct.new(:path, :branch, :issue_number, :target_repo, keyword_init: true) # rubocop:disable Style/RedundantStructKeywordInit
72
73
 
73
74
  class WorktreeError < StandardError; end
74
75
 
75
76
  private
76
77
 
77
78
  def git(*)
78
- Open3.capture3('git', *, chdir: @config.project_dir)
79
+ Open3.capture3('git', *, chdir: @repo_dir)
79
80
  end
80
81
 
81
82
  def parse_worktree_list(output)
data/lib/ocak.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ocak
4
- VERSION = '0.5.0'
4
+ VERSION = '0.6.0'
5
5
 
6
6
  def self.root
7
7
  File.expand_path('..', __dir__)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ocak
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Clay Harmon
@@ -55,16 +55,19 @@ files:
55
55
  - lib/ocak/commands/run.rb
56
56
  - lib/ocak/commands/status.rb
57
57
  - lib/ocak/config.rb
58
+ - lib/ocak/conflict_resolution.rb
58
59
  - lib/ocak/failure_reporting.rb
59
60
  - lib/ocak/git_utils.rb
60
61
  - lib/ocak/instance_builders.rb
61
62
  - lib/ocak/issue_backend.rb
62
63
  - lib/ocak/issue_fetcher.rb
64
+ - lib/ocak/issue_state_machine.rb
63
65
  - lib/ocak/local_issue_fetcher.rb
64
66
  - lib/ocak/local_merge_manager.rb
65
67
  - lib/ocak/logger.rb
66
68
  - lib/ocak/merge_manager.rb
67
69
  - lib/ocak/merge_orchestration.rb
70
+ - lib/ocak/merge_verification.rb
68
71
  - lib/ocak/monorepo_detector.rb
69
72
  - lib/ocak/parallel_execution.rb
70
73
  - lib/ocak/pipeline_executor.rb
@@ -82,6 +85,7 @@ files:
82
85
  - lib/ocak/step_comments.rb
83
86
  - lib/ocak/step_execution.rb
84
87
  - lib/ocak/stream_parser.rb
88
+ - lib/ocak/target_resolver.rb
85
89
  - lib/ocak/templates/agents/auditor.md.erb
86
90
  - lib/ocak/templates/agents/documenter.md.erb
87
91
  - lib/ocak/templates/agents/implementer.md.erb