CodingSystemPrompt
public final class CodingSystemPrompt
源码Source
io/agentscope/harness/coding/prompt/CodingSystemPrompt.java:37–444Coding 系统提示词,承载智能体的部署、调度与服务化运行。位于 io.agentscope.harness.coding.prompt 包。核心成员包括 build。
Constructs the system prompt for the coding agent.
Mirrors agent/prompt.py from open-swe-main. The prompt is assembled from sections:
working environment, task overview, repo setup, file management, task execution, tool usage,
coding standards, core behavior, dependency, communication, and external untrusted comments.
Key differences from the Python version:
-
GitHub API access uses
github_api_requesttool (notGH_TOKEN=dummy gh) -
linearCtxmay benull(Linear integration deferred)
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public static String build(String workingDir, String linearCtx)static | 构建并返回最终实例。 Builds the full system prompt for the coding agent. |
public static String build(String workingDir, String linearCtx, Path defaultPromptOverride)static | 构建并返回最终实例。 Builds the full system prompt. |
方法详情Method Detail
build
public static String build(String workingDir, String linearCtx)
static
构建并返回最终实例。
Builds the full system prompt for the coding agent.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
workingDir | String | working 目录(类型 `String`)。The working dir. |
linearCtx | String | linear Ctx(类型 `String`)。The linear ctx. |
String返回字符串结果。Returns a string.
源码Source
io/agentscope/harness/coding/prompt/CodingSystemPrompt.java:42–44build
public static String build(String workingDir, String linearCtx, Path defaultPromptOverride)
static
构建并返回最终实例。
Builds the full system prompt.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
workingDir | String | working 目录(类型 `String`)。sandbox working directory |
linearCtx | String | linear Ctx(类型 `String`)。optional Linear ticket context (may be null — Linear deferred) |
defaultPromptOverride | Path | 默认提示词 Override(类型 `Path`)。optional path to a `default_prompt.md` override file |
String返回字符串结果。Returns a string.
源码Source
io/agentscope/harness/coding/prompt/CodingSystemPrompt.java:53–75