aircana 1.6.0.rc1 → 2.0.0.rc2

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.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec_status +191 -207
  3. data/CLAUDE.md +0 -7
  4. data/README.md +103 -9
  5. data/lib/aircana/cli/app.rb +0 -29
  6. data/lib/aircana/cli/commands/doctor_checks.rb +0 -12
  7. data/lib/aircana/cli/commands/dump_context.rb +2 -3
  8. data/lib/aircana/cli/commands/generate.rb +8 -6
  9. data/lib/aircana/configuration.rb +1 -2
  10. data/lib/aircana/contexts/confluence.rb +1 -3
  11. data/lib/aircana/contexts/manifest.rb +1 -10
  12. data/lib/aircana/contexts/web.rb +1 -3
  13. data/lib/aircana/generators/agents_generator.rb +1 -5
  14. data/lib/aircana/generators/{relevant_files_command_generator.rb → apply_feedback_command_generator.rb} +3 -13
  15. data/lib/aircana/generators/{write_plan_command_generator.rb → execute_command_generator.rb} +3 -3
  16. data/lib/aircana/generators/record_command_generator.rb +26 -0
  17. data/lib/aircana/generators/review_command_generator.rb +26 -0
  18. data/lib/aircana/generators.rb +0 -2
  19. data/lib/aircana/templates/agents/defaults/apply_feedback.erb +91 -0
  20. data/lib/aircana/templates/agents/defaults/executor.erb +84 -0
  21. data/lib/aircana/templates/agents/defaults/planner.erb +44 -18
  22. data/lib/aircana/templates/agents/defaults/reviewer.erb +94 -0
  23. data/lib/aircana/templates/commands/apply_feedback.erb +17 -0
  24. data/lib/aircana/templates/commands/execute.erb +15 -0
  25. data/lib/aircana/templates/commands/plan.erb +21 -14
  26. data/lib/aircana/templates/commands/review.erb +14 -0
  27. data/lib/aircana/version.rb +1 -1
  28. data/lib/aircana.rb +0 -2
  29. metadata +13 -13
  30. data/lib/aircana/cli/commands/add_directory.rb +0 -148
  31. data/lib/aircana/cli/commands/add_files.rb +0 -26
  32. data/lib/aircana/cli/commands/clear_files.rb +0 -16
  33. data/lib/aircana/cli/commands/files.rb +0 -65
  34. data/lib/aircana/contexts/relevant_files.rb +0 -78
  35. data/lib/aircana/generators/relevant_files_verbose_results_generator.rb +0 -34
  36. data/lib/aircana/templates/commands/add_relevant_files.erb +0 -3
  37. data/lib/aircana/templates/relevant_files_verbose_results.erb +0 -18
  38. /data/lib/aircana/templates/commands/{write_plan.erb → record.erb} +0 -0
@@ -1,78 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Aircana
4
- module Contexts
5
- class RelevantFiles
6
- class << self
7
- # TODO: Honor the provided verbose flag
8
- def print(_verbose: false)
9
- verbose_generator(default_stream: true).generate
10
- end
11
-
12
- def add(files)
13
- files = Array(files)
14
-
15
- return if files.empty?
16
-
17
- Aircana.create_dir_if_needed(Aircana.configuration.relevant_project_files_dir)
18
-
19
- files.each do |file|
20
- absolute_file_path = File.expand_path(file)
21
- link_path = "#{Aircana.configuration.relevant_project_files_dir}/#{File.basename(file)}"
22
-
23
- FileUtils.rm_f(link_path)
24
- File.symlink(absolute_file_path, link_path)
25
- end
26
-
27
- rewrite_verbose_file
28
- end
29
-
30
- def remove(files)
31
- files = Array(files)
32
-
33
- return if files.empty?
34
-
35
- Aircana.create_dir_if_needed(Aircana.configuration.relevant_project_files_dir)
36
-
37
- files.each do |file|
38
- link_path = "#{Aircana.configuration.relevant_project_files_dir}/#{File.basename(file)}"
39
- FileUtils.rm_f(link_path)
40
- end
41
-
42
- rewrite_verbose_file
43
- end
44
-
45
- def remove_all
46
- return unless directory_exists?
47
-
48
- Dir.glob("#{Aircana.configuration.relevant_project_files_dir}/*").each do |file|
49
- FileUtils.rm_f(file)
50
- end
51
-
52
- return unless Dir.empty?(Aircana.configuration.relevant_project_files_dir)
53
-
54
- Dir.rmdir(Aircana.configuration.relevant_project_files_dir)
55
- end
56
-
57
- private
58
-
59
- def rewrite_verbose_file
60
- verbose_generator.generate
61
-
62
- # TODO: If the verbose file uses too many tokens, warn and instead use only
63
- # the summary generatior or do something smart like summarize file contents
64
- end
65
-
66
- def verbose_generator(default_stream: false)
67
- Generators::RelevantFilesVerboseResultsGenerator.new(
68
- file_out: default_stream ? Aircana.configuration.stream : nil
69
- )
70
- end
71
-
72
- def directory_exists?
73
- Dir.exist?(Aircana.configuration.relevant_project_files_dir)
74
- end
75
- end
76
- end
77
- end
78
- end
@@ -1,34 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "../generators"
4
-
5
- module Aircana
6
- module Generators
7
- class RelevantFilesVerboseResultsGenerator < BaseGenerator
8
- def initialize(file_in: nil, file_out: nil)
9
- super(
10
- file_in: file_in || default_template_path,
11
- file_out: file_out || default_output_path
12
- )
13
- end
14
-
15
- private
16
-
17
- def locals
18
- super.merge({ relevant_files: })
19
- end
20
-
21
- def relevant_files
22
- Dir.glob("#{Aircana.configuration.relevant_project_files_dir}/*")
23
- end
24
-
25
- def default_template_path
26
- File.join(File.dirname(__FILE__), "..", "templates", "relevant_files_verbose_results.erb")
27
- end
28
-
29
- def default_output_path
30
- File.join(Aircana.configuration.relevant_project_files_dir, "relevant_files.md")
31
- end
32
- end
33
- end
34
- end
@@ -1,3 +0,0 @@
1
- <%= helpers.model_instructions(
2
- "Read `#{relevant_project_files_path}`, which contains critical context for the current task."
3
- ) %>
@@ -1,18 +0,0 @@
1
- # Relevant Files
2
- <%=
3
- helpers.model_instructions(
4
- <<~INSTRUCTIONS
5
- The following files are considered important for the current task.
6
-
7
- Use them for:
8
- - Understanding task context
9
- - Examples of how to structure your solutions
10
- INSTRUCTIONS
11
- )
12
- %>
13
- <% relevant_files.each do |file_path| %>
14
- ## File: <%= File.realpath(file_path) %>
15
- ```
16
- <%= File.read(file_path) %>
17
- ```
18
- <% end %>