opencode-auto-agent 1.0.0 → 1.1.0
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/README.md +1 -1
- package/bin/cli.js +2 -2
- package/package.json +1 -1
- package/src/commands/init.js +4 -4
- package/src/commands/run.js +1 -1
- package/src/lib/constants.js +1 -1
- package/templates/agents/developer.md +1 -1
- package/templates/agents/docs.md +1 -1
- package/templates/agents/orchestrator.md +4 -4
- package/templates/agents/planner.md +1 -1
- package/templates/agents/qa.md +1 -1
- package/templates/agents/reviewer.md +1 -1
package/README.md
CHANGED
package/bin/cli.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* opencode-auto-agent CLI
|
|
5
5
|
*
|
|
6
6
|
* Commands:
|
|
7
|
-
* init Scaffold .
|
|
7
|
+
* init Scaffold .opencode/ into the current repo
|
|
8
8
|
* run Start the orchestrator (Ralphy + OpenCode agents)
|
|
9
9
|
* setup <preset> Apply or switch a preset (java, springboot, nextjs, ...)
|
|
10
10
|
* doctor Validate configuration and tool availability
|
|
@@ -75,7 +75,7 @@ USAGE
|
|
|
75
75
|
npx ${name} <command> [options]
|
|
76
76
|
|
|
77
77
|
COMMANDS
|
|
78
|
-
init [--preset=<name>] Scaffold .
|
|
78
|
+
init [--preset=<name>] Scaffold .opencode/ into the current project
|
|
79
79
|
run [--engine=<name>] Start the orchestrator (Ralphy task loop)
|
|
80
80
|
setup <preset> Apply or switch a preset (java | springboot | nextjs)
|
|
81
81
|
doctor Validate config, tools, and agent definitions
|
package/package.json
CHANGED
package/src/commands/init.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* init command — scaffold .
|
|
2
|
+
* init command — scaffold .opencode/ into the target repository.
|
|
3
3
|
*
|
|
4
4
|
* Rules:
|
|
5
5
|
* 1. Never overwrite files that already exist (safe re-run).
|
|
@@ -121,14 +121,14 @@ function buildOpencodeConfig() {
|
|
|
121
121
|
return {
|
|
122
122
|
$schema: "https://opencode.ai/config.json",
|
|
123
123
|
instructions: [
|
|
124
|
-
".
|
|
125
|
-
".
|
|
124
|
+
".opencode/agents/orchestrator.md",
|
|
125
|
+
".opencode/rules/universal.md",
|
|
126
126
|
],
|
|
127
127
|
agent: {
|
|
128
128
|
orchestrator: {
|
|
129
129
|
description: "Primary orchestrator — routes tasks to specialist sub-agents",
|
|
130
130
|
mode: "primary",
|
|
131
|
-
prompt: "You are the orchestrator. Read .
|
|
131
|
+
prompt: "You are the orchestrator. Read .opencode/context/ for active context. Follow the workflow: plan -> implement -> test -> verify.",
|
|
132
132
|
tools: { "*": true },
|
|
133
133
|
permission: {
|
|
134
134
|
task: { "*": "allow" },
|
package/src/commands/run.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Flow:
|
|
5
5
|
* 1. Load config.json
|
|
6
6
|
* 2. Assemble runtime context (preset rules + base rules + docs)
|
|
7
|
-
* 3. Write assembled context to .
|
|
7
|
+
* 3. Write assembled context to .opencode/context/
|
|
8
8
|
* 4. Invoke Ralphy with --opencode engine against the PRD/task file
|
|
9
9
|
* 5. Ralphy drives OpenCode, which loads the orchestrator agent and delegates
|
|
10
10
|
*/
|
package/src/lib/constants.js
CHANGED
|
@@ -21,7 +21,7 @@ You are the **Developer** — you implement code changes according to the plan p
|
|
|
21
21
|
|
|
22
22
|
## Context Loading Rule
|
|
23
23
|
Before writing code, ALWAYS:
|
|
24
|
-
1. Read `.
|
|
24
|
+
1. Read `.opencode/context/runtime-context.md` for active preset and rules.
|
|
25
25
|
2. Read the plan provided by the orchestrator or planner.
|
|
26
26
|
3. Read existing files you will modify to understand current patterns.
|
|
27
27
|
4. Check the preset file for framework-specific conventions (naming, structure, patterns).
|
package/templates/agents/docs.md
CHANGED
|
@@ -20,7 +20,7 @@ You are the **Docs Agent** — you maintain project documentation so it stays ac
|
|
|
20
20
|
|
|
21
21
|
## Context Loading Rule
|
|
22
22
|
Before writing docs, ALWAYS:
|
|
23
|
-
1. Read `.
|
|
23
|
+
1. Read `.opencode/context/runtime-context.md` for docs path and conventions.
|
|
24
24
|
2. Read the plan and implementation summary to understand what changed.
|
|
25
25
|
3. Read existing documentation to avoid duplication.
|
|
26
26
|
4. Check the preset file for framework-specific documentation conventions.
|
|
@@ -14,7 +14,7 @@ permission:
|
|
|
14
14
|
You are the **Orchestrator** — the single entry point for all work in this project. You coordinate a team of specialist agents and ensure every task follows the defined workflow.
|
|
15
15
|
|
|
16
16
|
## Responsibilities
|
|
17
|
-
1. **Load context** — On every invocation, read `.
|
|
17
|
+
1. **Load context** — On every invocation, read `.opencode/context/runtime-context.md` first. This contains the active preset, rules, and project documentation summary.
|
|
18
18
|
2. **Read tasks** — Identify the current task from the PRD or task list being processed by Ralphy.
|
|
19
19
|
3. **Route to specialists** — Delegate work to the correct sub-agent:
|
|
20
20
|
- `@planner` for breaking objectives into steps
|
|
@@ -42,9 +42,9 @@ For each task:
|
|
|
42
42
|
|
|
43
43
|
## Context Loading Rule (CRITICAL)
|
|
44
44
|
Before doing ANY work, you MUST:
|
|
45
|
-
1. Read `.
|
|
46
|
-
2. Read `.
|
|
47
|
-
3. Read the active preset file from `.
|
|
45
|
+
1. Read `.opencode/context/runtime-context.md`
|
|
46
|
+
2. Read `.opencode/rules/universal.md`
|
|
47
|
+
3. Read the active preset file from `.opencode/presets/<preset>.md`
|
|
48
48
|
4. If `docsPath` is configured, scan that directory for relevant documentation
|
|
49
49
|
|
|
50
50
|
Only after loading context should you begin task routing.
|
|
@@ -22,7 +22,7 @@ You are the **Planner** — an architect who turns high-level objectives into co
|
|
|
22
22
|
|
|
23
23
|
## Context Loading Rule
|
|
24
24
|
Before planning, ALWAYS:
|
|
25
|
-
1. Read `.
|
|
25
|
+
1. Read `.opencode/context/runtime-context.md` for active preset and rules.
|
|
26
26
|
2. Read relevant source files to understand current state.
|
|
27
27
|
3. Check the preset file for framework-specific conventions.
|
|
28
28
|
|
package/templates/agents/qa.md
CHANGED
|
@@ -23,7 +23,7 @@ You are the **QA Agent** — you verify that implementation meets requirements,
|
|
|
23
23
|
|
|
24
24
|
## Context Loading Rule
|
|
25
25
|
Before testing, ALWAYS:
|
|
26
|
-
1. Read `.
|
|
26
|
+
1. Read `.opencode/context/runtime-context.md` for test commands and conventions.
|
|
27
27
|
2. Read the plan and acceptance criteria for the current task.
|
|
28
28
|
3. Check the preset file for framework-specific test expectations.
|
|
29
29
|
|
|
@@ -22,7 +22,7 @@ You are the **Reviewer** — you perform code review on changes made by the Deve
|
|
|
22
22
|
|
|
23
23
|
## Context Loading Rule
|
|
24
24
|
Before reviewing, ALWAYS:
|
|
25
|
-
1. Read `.
|
|
25
|
+
1. Read `.opencode/context/runtime-context.md` for project conventions.
|
|
26
26
|
2. Read the plan to understand intent behind changes.
|
|
27
27
|
3. Read the preset file for framework-specific review criteria.
|
|
28
28
|
|