Class: XAeonAgents::Agents::PlanGeneratorAgent

Inherits:
ComposableAgents::Cline::Agent
  • Object
show all
Includes:
XAeonAgents::AgentDefaults
Defined in:
lib/x_aeon_agents/agents/plan_generator_agent.rb

Overview

Agent responsible for producing detailed implementation plans from requirements

Instance Method Summary collapse

Methods included from XAeonAgents::AgentDefaults

#new_agent, prepended, singleton_session_id

Constructor Details

#initialize(**agent_params) ⇒ PlanGeneratorAgent

Constructor

Parameters:

  • agent_params (Hash{Symbol => Object})

    Extra agent parameters



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/x_aeon_agents/agents/plan_generator_agent.rb', line 30

def initialize(**agent_params)
  super(
    name: 'Planner',
    role: 'You are a Planner agent',
    objective: 'Produce a full and detailed implementation plan that can be used to implement some requirements.',
    constraints: <<~EO_CONSTRAINTS,
      - You are in read-only mode.
      - Do NOT modify or write any file.
      - You may only analyze and propose plans.
      - Do NOT execute the plan yourself.
    EO_CONSTRAINTS
    skills: %w[
      applying-ruby-conventions
      applying-test-conventions
      enforcing-project-rules
    ],
    **agent_params
  )
end

Instance Method Details

#input_artifacts_contractsHash{Symbol => Object}

Define input artifacts contracts

Returns:

  • (Hash{Symbol => Object})

    Set of input artifacts description, per artifact name



10
11
12
# File 'lib/x_aeon_agents/agents/plan_generator_agent.rb', line 10

def input_artifacts_contracts
  super.merge(requirements: 'The initial requirements for which you need to devise an implementation plan')
end

#output_artifacts_contractsHash{Symbol => Object}

Define output artifacts contracts

Returns:

  • (Hash{Symbol => Object})

    Set of output artifacts description, per artifact name



17
18
19
20
21
22
23
24
25
# File 'lib/x_aeon_agents/agents/plan_generator_agent.rb', line 17

def output_artifacts_contracts
  super.merge(
    plan: {
      description: 'The full and detailed implementation plan in Markdown format, ' \
        "that should implement the requirements given by the artifact named `#{artifact_ref(:requirements)}`",
      type: :markdown
    }
  )
end