@claushaas/ergon-cli 0.1.2
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.
- package/LICENSE +1 -0
- package/README.md +20 -0
- package/dist/commands/approve.d.ts +14 -0
- package/dist/commands/approve.d.ts.map +1 -0
- package/dist/commands/approve.js +60 -0
- package/dist/commands/approve.js.map +1 -0
- package/dist/commands/cancel.d.ts +7 -0
- package/dist/commands/cancel.d.ts.map +1 -0
- package/dist/commands/cancel.js +27 -0
- package/dist/commands/cancel.js.map +1 -0
- package/dist/commands/init.d.ts +10 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +16 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/library.d.ts +7 -0
- package/dist/commands/library.d.ts.map +1 -0
- package/dist/commands/library.js +12 -0
- package/dist/commands/library.js.map +1 -0
- package/dist/commands/run.d.ts +18 -0
- package/dist/commands/run.d.ts.map +1 -0
- package/dist/commands/run.js +82 -0
- package/dist/commands/run.js.map +1 -0
- package/dist/commands/template.d.ts +13 -0
- package/dist/commands/template.d.ts.map +1 -0
- package/dist/commands/template.js +42 -0
- package/dist/commands/template.js.map +1 -0
- package/dist/commands/worker.d.ts +15 -0
- package/dist/commands/worker.d.ts.map +1 -0
- package/dist/commands/worker.js +108 -0
- package/dist/commands/worker.js.map +1 -0
- package/dist/commands/workflow.d.ts +8 -0
- package/dist/commands/workflow.d.ts.map +1 -0
- package/dist/commands/workflow.js +34 -0
- package/dist/commands/workflow.js.map +1 -0
- package/dist/config/index.d.ts +17 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +76 -0
- package/dist/config/index.js.map +1 -0
- package/dist/help.d.ts +3 -0
- package/dist/help.d.ts.map +1 -0
- package/dist/help.js +45 -0
- package/dist/help.js.map +1 -0
- package/dist/library/agents/coder.yaml +27 -0
- package/dist/library/agents/pr-writer.yaml +28 -0
- package/dist/library/agents/repo-analyzer.yaml +31 -0
- package/dist/library/agents/repo-planner.yaml +35 -0
- package/dist/library/schemas/agent.analysis.v1.json +51 -0
- package/dist/library/schemas/agent.patch.v1.json +57 -0
- package/dist/library/schemas/agent.plan.v1.json +71 -0
- package/dist/library/schemas/agent.pr.v1.json +54 -0
- package/dist/library/workflows/code.bump_deps.yaml +268 -0
- package/dist/library/workflows/code.codegen.yaml +256 -0
- package/dist/library/workflows/code.docs_update.yaml +252 -0
- package/dist/library/workflows/code.hotfix.yaml +264 -0
- package/dist/library/workflows/code.refactor.yaml +256 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +86 -0
- package/dist/main.js.map +1 -0
- package/dist/output/format.d.ts +2 -0
- package/dist/output/format.d.ts.map +1 -0
- package/dist/output/format.js +4 -0
- package/dist/output/format.js.map +1 -0
- package/dist/project.d.ts +42 -0
- package/dist/project.d.ts.map +1 -0
- package/dist/project.js +229 -0
- package/dist/project.js.map +1 -0
- package/dist/utils.d.ts +7 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +39 -0
- package/dist/utils.js.map +1 -0
- package/package.json +47 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { loadProjectLibraryMetadata, resolveProjectPaths, } from '../project.js';
|
|
3
|
+
function readStringEnv(name) {
|
|
4
|
+
const value = process.env[name]?.trim();
|
|
5
|
+
return value ? value : undefined;
|
|
6
|
+
}
|
|
7
|
+
function splitArgs(value) {
|
|
8
|
+
return value?.split(/\s+/).filter((entry) => entry.length > 0);
|
|
9
|
+
}
|
|
10
|
+
export function loadCliConfig(cwd = process.cwd()) {
|
|
11
|
+
const ergonRootDir = readStringEnv('ERGON_ROOT_DIR');
|
|
12
|
+
const ergonDbPath = readStringEnv('ERGON_DB_PATH');
|
|
13
|
+
const claudeCodeCommand = readStringEnv('CLAUDE_CODE_COMMAND');
|
|
14
|
+
const claudeCodeArgs = readStringEnv('CLAUDE_CODE_ARGS');
|
|
15
|
+
const codexCommand = readStringEnv('CODEX_COMMAND');
|
|
16
|
+
const codexArgs = readStringEnv('CODEX_ARGS');
|
|
17
|
+
const ollamaBaseUrl = readStringEnv('OLLAMA_BASE_URL');
|
|
18
|
+
const ollamaModel = readStringEnv('OLLAMA_MODEL');
|
|
19
|
+
const openClawCommand = readStringEnv('OPENCLAW_COMMAND');
|
|
20
|
+
const openClawArgs = readStringEnv('OPENCLAW_ARGS');
|
|
21
|
+
const openRouterApiKey = readStringEnv('OPENROUTER_API_KEY');
|
|
22
|
+
const openRouterAppName = readStringEnv('OPENROUTER_APP_NAME');
|
|
23
|
+
const openRouterBaseUrl = readStringEnv('OPENROUTER_BASE_URL');
|
|
24
|
+
const openRouterModel = readStringEnv('OPENROUTER_MODEL');
|
|
25
|
+
const openRouterSiteUrl = readStringEnv('OPENROUTER_SITE_URL');
|
|
26
|
+
const project = resolveProjectPaths(cwd, ergonRootDir);
|
|
27
|
+
return {
|
|
28
|
+
configPath: project.configPath,
|
|
29
|
+
dbPath: path.resolve(project.rootDir, ergonDbPath ?? '.ergon/storage/ergon.db'),
|
|
30
|
+
embeddedLibraryDir: project.embeddedLibraryDir,
|
|
31
|
+
embeddedWorkflowsDir: project.embeddedWorkflowsDir,
|
|
32
|
+
ergonDir: project.ergonDir,
|
|
33
|
+
initialized: project.initialized,
|
|
34
|
+
libraryDir: project.libraryDir,
|
|
35
|
+
projectMetadata: loadProjectLibraryMetadata(project),
|
|
36
|
+
providerConfigs: {
|
|
37
|
+
'claude-code': claudeCodeCommand || claudeCodeArgs
|
|
38
|
+
? {
|
|
39
|
+
args: splitArgs(claudeCodeArgs),
|
|
40
|
+
command: claudeCodeCommand,
|
|
41
|
+
}
|
|
42
|
+
: undefined,
|
|
43
|
+
codex: codexCommand || codexArgs
|
|
44
|
+
? {
|
|
45
|
+
args: splitArgs(codexArgs),
|
|
46
|
+
command: codexCommand,
|
|
47
|
+
}
|
|
48
|
+
: undefined,
|
|
49
|
+
ollama: ollamaBaseUrl || ollamaModel
|
|
50
|
+
? {
|
|
51
|
+
baseUrl: ollamaBaseUrl,
|
|
52
|
+
defaultModel: ollamaModel,
|
|
53
|
+
}
|
|
54
|
+
: undefined,
|
|
55
|
+
openclaw: openClawCommand || openClawArgs
|
|
56
|
+
? {
|
|
57
|
+
args: splitArgs(openClawArgs),
|
|
58
|
+
command: openClawCommand,
|
|
59
|
+
}
|
|
60
|
+
: undefined,
|
|
61
|
+
openrouter: openRouterApiKey
|
|
62
|
+
? {
|
|
63
|
+
apiKey: openRouterApiKey,
|
|
64
|
+
appName: openRouterAppName,
|
|
65
|
+
baseUrl: openRouterBaseUrl,
|
|
66
|
+
defaultModel: openRouterModel,
|
|
67
|
+
siteUrl: openRouterSiteUrl,
|
|
68
|
+
}
|
|
69
|
+
: undefined,
|
|
70
|
+
},
|
|
71
|
+
rootDir: project.rootDir,
|
|
72
|
+
storageDir: project.storageDir,
|
|
73
|
+
workflowsDir: project.workflowsDir,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EACN,0BAA0B,EAE1B,mBAAmB,GACnB,MAAM,eAAe,CAAC;AAiBvB,SAAS,aAAa,CAAC,IAAY;IAClC,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC;IACxC,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAClC,CAAC;AAED,SAAS,SAAS,CAAC,KAAyB;IAC3C,OAAO,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAChE,C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":"AAEA,wBAAgB,cAAc,IAAI,MAAM,CAuCvC;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C"}
|
package/dist/help.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { getCliVersion } from './project.js';
|
|
2
|
+
export function getCliHelpText() {
|
|
3
|
+
return `Ergon Flow CLI
|
|
4
|
+
|
|
5
|
+
Install:
|
|
6
|
+
pnpm add -g @claushaas/ergon-cli
|
|
7
|
+
|
|
8
|
+
Usage:
|
|
9
|
+
ergon init [--root <path>]
|
|
10
|
+
ergon library sync [--force] [--root <path>]
|
|
11
|
+
ergon template list
|
|
12
|
+
ergon workflow list
|
|
13
|
+
ergon run <workflow_id> [--inputs <json-or-path>]
|
|
14
|
+
ergon run-status <run_id>
|
|
15
|
+
ergon worker start [runtime flags]
|
|
16
|
+
ergon approve <run_id> <step_id> --decision approve|reject
|
|
17
|
+
ergon cancel <run_id>
|
|
18
|
+
|
|
19
|
+
Bootstrap:
|
|
20
|
+
"ergon init" creates ./.ergon, copies the embedded library into
|
|
21
|
+
./.ergon/library, and configures local storage at ./.ergon/storage/ergon.db.
|
|
22
|
+
|
|
23
|
+
Initialization rules:
|
|
24
|
+
"template list", "--help", and "--version" work before initialization.
|
|
25
|
+
Stateful commands require an initialized .ergon project.
|
|
26
|
+
|
|
27
|
+
Provider configuration:
|
|
28
|
+
ERGON_ROOT_DIR
|
|
29
|
+
ERGON_DB_PATH
|
|
30
|
+
OPENROUTER_API_KEY
|
|
31
|
+
OPENROUTER_BASE_URL
|
|
32
|
+
OPENROUTER_MODEL
|
|
33
|
+
OLLAMA_BASE_URL
|
|
34
|
+
OLLAMA_MODEL
|
|
35
|
+
CODEX_COMMAND
|
|
36
|
+
CODEX_ARGS
|
|
37
|
+
CLAUDE_CODE_COMMAND
|
|
38
|
+
CLAUDE_CODE_ARGS
|
|
39
|
+
OPENCLAW_COMMAND
|
|
40
|
+
OPENCLAW_ARGS`;
|
|
41
|
+
}
|
|
42
|
+
export function getCliVersionText() {
|
|
43
|
+
return getCliVersion();
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=help.js.map
|
package/dist/help.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help.js","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,UAAU,cAAc;IAC7B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAqCQ,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,iBAAiB;IAChC,OAAO,aAAa,EAAE,CAAC;AACxB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
|
|
2
|
+
id: coder
|
|
3
|
+
kind: model
|
|
4
|
+
provider: openrouter
|
|
5
|
+
model: deepseek/deepseek-v3.2-speciale
|
|
6
|
+
|
|
7
|
+
capabilities:
|
|
8
|
+
- code_patch
|
|
9
|
+
- diff_generation
|
|
10
|
+
- long_context
|
|
11
|
+
|
|
12
|
+
settings:
|
|
13
|
+
temperature: 0.1
|
|
14
|
+
max_tokens: 32000
|
|
15
|
+
reasoning: true
|
|
16
|
+
|
|
17
|
+
execution:
|
|
18
|
+
retries: 2
|
|
19
|
+
timeout_seconds: 600
|
|
20
|
+
|
|
21
|
+
output:
|
|
22
|
+
schema: agent.patch.v1
|
|
23
|
+
|
|
24
|
+
notes: |
|
|
25
|
+
Primary coding agent responsible for generating unified diff patches.
|
|
26
|
+
This agent receives implementation plans and produces code modifications
|
|
27
|
+
as structured patch artifacts conforming to the agent.patch.v1 schema.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
id: pr-writer
|
|
2
|
+
kind: model
|
|
3
|
+
provider: openrouter
|
|
4
|
+
model: deepseek/deepseek-v3.2
|
|
5
|
+
|
|
6
|
+
capabilities:
|
|
7
|
+
- pr_description
|
|
8
|
+
- change_summary
|
|
9
|
+
- commit_context
|
|
10
|
+
|
|
11
|
+
settings:
|
|
12
|
+
temperature: 0.2
|
|
13
|
+
max_tokens: 16000
|
|
14
|
+
reasoning: true
|
|
15
|
+
|
|
16
|
+
execution:
|
|
17
|
+
retries: 2
|
|
18
|
+
timeout_seconds: 300
|
|
19
|
+
|
|
20
|
+
output:
|
|
21
|
+
schema: agent.pr.v1
|
|
22
|
+
|
|
23
|
+
notes: |
|
|
24
|
+
Agent responsible for producing structured pull request metadata after
|
|
25
|
+
code changes are generated. It receives context such as patch summary,
|
|
26
|
+
implementation plan, and analysis results, and produces a complete
|
|
27
|
+
pull request artifact including title, body, labels, reviewers, and
|
|
28
|
+
branch metadata conforming to the agent.pr.v1 schema.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
id: repo-analyzer
|
|
2
|
+
kind: model
|
|
3
|
+
provider: openrouter
|
|
4
|
+
model: deepseek/deepseek-v3.2
|
|
5
|
+
|
|
6
|
+
capabilities:
|
|
7
|
+
- repository_analysis
|
|
8
|
+
- architecture_understanding
|
|
9
|
+
- dependency_mapping
|
|
10
|
+
- codebase_summarization
|
|
11
|
+
|
|
12
|
+
settings:
|
|
13
|
+
temperature: 0.2
|
|
14
|
+
max_tokens: 32000
|
|
15
|
+
reasoning: true
|
|
16
|
+
|
|
17
|
+
execution:
|
|
18
|
+
retries: 2
|
|
19
|
+
timeout_seconds: 600
|
|
20
|
+
|
|
21
|
+
output:
|
|
22
|
+
schema: agent.analysis.v1
|
|
23
|
+
|
|
24
|
+
notes: |
|
|
25
|
+
Agent responsible for analyzing a repository before planning or coding steps.
|
|
26
|
+
It inspects project structure, identifies relevant modules, dependencies,
|
|
27
|
+
architectural patterns, and potential impact areas for the requested change.
|
|
28
|
+
|
|
29
|
+
The output must conform to the agent.analysis.v1 schema and should highlight
|
|
30
|
+
affected components, relevant files, risks, and a clear summary that will
|
|
31
|
+
guide the planning phase of the workflow.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
id: repo-planner
|
|
2
|
+
kind: model
|
|
3
|
+
provider: openrouter
|
|
4
|
+
model: deepseek/deepseek-v3.2
|
|
5
|
+
|
|
6
|
+
capabilities:
|
|
7
|
+
- implementation_planning
|
|
8
|
+
- architecture_planning
|
|
9
|
+
- change_scoping
|
|
10
|
+
- dependency_awareness
|
|
11
|
+
|
|
12
|
+
settings:
|
|
13
|
+
temperature: 0.2
|
|
14
|
+
max_tokens: 32000
|
|
15
|
+
reasoning: true
|
|
16
|
+
|
|
17
|
+
execution:
|
|
18
|
+
retries: 2
|
|
19
|
+
timeout_seconds: 600
|
|
20
|
+
|
|
21
|
+
output:
|
|
22
|
+
schema: agent.plan.v1
|
|
23
|
+
|
|
24
|
+
notes: |
|
|
25
|
+
Agent responsible for transforming repository analysis into a concrete
|
|
26
|
+
implementation plan. It receives the output from repo-analyzer and
|
|
27
|
+
produces a structured plan describing how the change should be
|
|
28
|
+
implemented.
|
|
29
|
+
|
|
30
|
+
The plan must define the implementation strategy, the ordered steps
|
|
31
|
+
required to implement the change, the files expected to be affected,
|
|
32
|
+
potential risks, and a testing strategy.
|
|
33
|
+
|
|
34
|
+
The output must conform to the agent.plan.v1 schema and will be used
|
|
35
|
+
directly by coding agents to generate patches.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "agent.analysis.v1",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"additionalProperties": false,
|
|
5
|
+
"description": "Structured analysis produced by an agent step before planning or implementation.",
|
|
6
|
+
"properties": {
|
|
7
|
+
"affected_components": {
|
|
8
|
+
"description": "List of components, modules, or areas affected.",
|
|
9
|
+
"items": {
|
|
10
|
+
"type": "string"
|
|
11
|
+
},
|
|
12
|
+
"type": "array"
|
|
13
|
+
},
|
|
14
|
+
"diagnosis": {
|
|
15
|
+
"description": "Detailed explanation of the current state or problem.",
|
|
16
|
+
"type": "string"
|
|
17
|
+
},
|
|
18
|
+
"files": {
|
|
19
|
+
"description": "List of relevant files identified during analysis.",
|
|
20
|
+
"items": {
|
|
21
|
+
"type": "string"
|
|
22
|
+
},
|
|
23
|
+
"type": "array"
|
|
24
|
+
},
|
|
25
|
+
"notes": {
|
|
26
|
+
"description": "Additional observations useful for later steps.",
|
|
27
|
+
"items": {
|
|
28
|
+
"type": "string"
|
|
29
|
+
},
|
|
30
|
+
"type": "array"
|
|
31
|
+
},
|
|
32
|
+
"risks": {
|
|
33
|
+
"description": "Potential risks identified during the analysis.",
|
|
34
|
+
"items": {
|
|
35
|
+
"type": "string"
|
|
36
|
+
},
|
|
37
|
+
"type": "array"
|
|
38
|
+
},
|
|
39
|
+
"root_cause": {
|
|
40
|
+
"description": "Identified root cause when applicable.",
|
|
41
|
+
"type": "string"
|
|
42
|
+
},
|
|
43
|
+
"summary": {
|
|
44
|
+
"description": "High level summary of the analysis.",
|
|
45
|
+
"type": "string"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"required": ["summary"],
|
|
49
|
+
"title": "Agent Analysis Artifact",
|
|
50
|
+
"type": "object"
|
|
51
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "agent.patch.v1",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"additionalProperties": false,
|
|
5
|
+
"description": "Structured patch produced by a coding agent representing file modifications.",
|
|
6
|
+
"properties": {
|
|
7
|
+
"breaking_changes": {
|
|
8
|
+
"default": false,
|
|
9
|
+
"description": "Indicates if the patch introduces breaking changes.",
|
|
10
|
+
"type": "boolean"
|
|
11
|
+
},
|
|
12
|
+
"files_added": {
|
|
13
|
+
"description": "List of newly created files.",
|
|
14
|
+
"items": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
"type": "array"
|
|
18
|
+
},
|
|
19
|
+
"files_deleted": {
|
|
20
|
+
"description": "List of removed files.",
|
|
21
|
+
"items": {
|
|
22
|
+
"type": "string"
|
|
23
|
+
},
|
|
24
|
+
"type": "array"
|
|
25
|
+
},
|
|
26
|
+
"files_modified": {
|
|
27
|
+
"description": "List of files modified by the patch.",
|
|
28
|
+
"items": {
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
"type": "array"
|
|
32
|
+
},
|
|
33
|
+
"notes": {
|
|
34
|
+
"description": "Additional implementation notes.",
|
|
35
|
+
"items": {
|
|
36
|
+
"type": "string"
|
|
37
|
+
},
|
|
38
|
+
"type": "array"
|
|
39
|
+
},
|
|
40
|
+
"patch": {
|
|
41
|
+
"description": "Unified diff patch representing the code changes.",
|
|
42
|
+
"type": "string"
|
|
43
|
+
},
|
|
44
|
+
"summary": {
|
|
45
|
+
"description": "Short description of the changes implemented.",
|
|
46
|
+
"type": "string"
|
|
47
|
+
},
|
|
48
|
+
"tests_added": {
|
|
49
|
+
"default": false,
|
|
50
|
+
"description": "Indicates whether tests were added or updated.",
|
|
51
|
+
"type": "boolean"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"required": ["summary", "patch"],
|
|
55
|
+
"title": "Agent Patch Artifact",
|
|
56
|
+
"type": "object"
|
|
57
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "agent.plan.v1",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"additionalProperties": false,
|
|
5
|
+
"description": "Structured implementation plan produced after analysis and before code modification steps.",
|
|
6
|
+
"properties": {
|
|
7
|
+
"affected_files": {
|
|
8
|
+
"description": "List of all files expected to be affected by the change.",
|
|
9
|
+
"items": {
|
|
10
|
+
"type": "string"
|
|
11
|
+
},
|
|
12
|
+
"type": "array"
|
|
13
|
+
},
|
|
14
|
+
"approach": {
|
|
15
|
+
"description": "Detailed explanation of the technical approach that will be used to implement the solution.",
|
|
16
|
+
"type": "string"
|
|
17
|
+
},
|
|
18
|
+
"notes": {
|
|
19
|
+
"description": "Additional notes that may help later steps such as coding or review.",
|
|
20
|
+
"items": {
|
|
21
|
+
"type": "string"
|
|
22
|
+
},
|
|
23
|
+
"type": "array"
|
|
24
|
+
},
|
|
25
|
+
"risks": {
|
|
26
|
+
"description": "Potential risks associated with the planned implementation.",
|
|
27
|
+
"items": {
|
|
28
|
+
"type": "string"
|
|
29
|
+
},
|
|
30
|
+
"type": "array"
|
|
31
|
+
},
|
|
32
|
+
"steps": {
|
|
33
|
+
"description": "Ordered list of implementation steps that will be executed.",
|
|
34
|
+
"items": {
|
|
35
|
+
"additionalProperties": false,
|
|
36
|
+
"properties": {
|
|
37
|
+
"description": {
|
|
38
|
+
"description": "Description of the step to be executed.",
|
|
39
|
+
"type": "string"
|
|
40
|
+
},
|
|
41
|
+
"files": {
|
|
42
|
+
"description": "Files expected to be modified or created in this step.",
|
|
43
|
+
"items": {
|
|
44
|
+
"type": "string"
|
|
45
|
+
},
|
|
46
|
+
"type": "array"
|
|
47
|
+
},
|
|
48
|
+
"type": {
|
|
49
|
+
"description": "Type of step being performed.",
|
|
50
|
+
"enum": ["modify", "create", "delete", "refactor", "test", "docs"],
|
|
51
|
+
"type": "string"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"required": ["description"],
|
|
55
|
+
"type": "object"
|
|
56
|
+
},
|
|
57
|
+
"type": "array"
|
|
58
|
+
},
|
|
59
|
+
"summary": {
|
|
60
|
+
"description": "Short summary of the implementation strategy.",
|
|
61
|
+
"type": "string"
|
|
62
|
+
},
|
|
63
|
+
"tests_strategy": {
|
|
64
|
+
"description": "Explanation of how the changes should be tested or validated.",
|
|
65
|
+
"type": "string"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"required": ["summary", "approach", "steps"],
|
|
69
|
+
"title": "Agent Plan Artifact",
|
|
70
|
+
"type": "object"
|
|
71
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "agent.pr.v1",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"additionalProperties": false,
|
|
5
|
+
"description": "Structured pull request metadata produced by an agent after generating or applying a patch.",
|
|
6
|
+
"properties": {
|
|
7
|
+
"base_branch": {
|
|
8
|
+
"description": "Base branch where the pull request should be opened (e.g., main or develop).",
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"body": {
|
|
12
|
+
"description": "Full pull request description including context, explanation of changes, and testing notes.",
|
|
13
|
+
"type": "string"
|
|
14
|
+
},
|
|
15
|
+
"breaking_changes": {
|
|
16
|
+
"default": false,
|
|
17
|
+
"description": "Indicates whether the pull request introduces breaking changes.",
|
|
18
|
+
"type": "boolean"
|
|
19
|
+
},
|
|
20
|
+
"head_branch": {
|
|
21
|
+
"description": "Branch containing the changes produced by the workflow.",
|
|
22
|
+
"type": "string"
|
|
23
|
+
},
|
|
24
|
+
"labels": {
|
|
25
|
+
"description": "Optional labels that should be applied to the pull request.",
|
|
26
|
+
"items": {
|
|
27
|
+
"type": "string"
|
|
28
|
+
},
|
|
29
|
+
"type": "array"
|
|
30
|
+
},
|
|
31
|
+
"migration_notes": {
|
|
32
|
+
"description": "Optional notes explaining required migrations or upgrade steps.",
|
|
33
|
+
"type": "string"
|
|
34
|
+
},
|
|
35
|
+
"reviewers": {
|
|
36
|
+
"description": "Suggested reviewers for the pull request.",
|
|
37
|
+
"items": {
|
|
38
|
+
"type": "string"
|
|
39
|
+
},
|
|
40
|
+
"type": "array"
|
|
41
|
+
},
|
|
42
|
+
"summary": {
|
|
43
|
+
"description": "Short summary of the change suitable for dashboards or notifications.",
|
|
44
|
+
"type": "string"
|
|
45
|
+
},
|
|
46
|
+
"title": {
|
|
47
|
+
"description": "Title of the pull request.",
|
|
48
|
+
"type": "string"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"required": ["title", "body"],
|
|
52
|
+
"title": "Agent Pull Request Artifact",
|
|
53
|
+
"type": "object"
|
|
54
|
+
}
|