Skip to content

feat(opencode): agent-specific instructions array#10695

Open
marchellodev wants to merge 1 commit intoanomalyco:devfrom
marchellodev:agent-specific-instructions-array
Open

feat(opencode): agent-specific instructions array#10695
marchellodev wants to merge 1 commit intoanomalyco:devfrom
marchellodev:agent-specific-instructions-array

Conversation

@marchellodev
Copy link

What does this PR do?

Adds ability to specify agent.<name>.instructions array that behaves like global instructions array, but only for that agent.

Example:

{
  "agent": {
    "build": {
      "instructions": [
        "~/.config/opencode/prompts/build-only.md"
      ]
    }
  }
}

Closes #10688

How did you verify your code works?

Added unit tests:

  • test/agent/agent.test.ts - Test that instructions can be set from agent config
  • test/session/system.test.ts (new file) - Tests for SystemPrompt.agent() function

All 41 tests pass.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on my searches, I found one potentially related PR:

feat(agent): support appending to agent prompts via config (PR #7310)

  • This PR deals with agent-specific prompt configuration, which is similar in scope to the current PR that adds agent-specific instructions array

This PR appears to address a related but slightly different feature - appending to agent prompts via config - while PR #10695 adds the ability to specify an instructions array per agent. They may share similar implementation patterns or config structure, making it worth reviewing for any overlap or consistency concerns.

Otherwise, no exact duplicate PRs were found for the agent-specific instructions array feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Agent-specific instructions array

1 participant

Comments