developing-agent-forge 2.1.1 → 2.1.3
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 +10 -8
- package/README.zh-CN.md +15 -13
- package/dist/agents/developer.js +5 -1
- package/dist/agents/developer.js.map +1 -1
- package/dist/agents/manager.d.ts +2 -0
- package/dist/agents/manager.d.ts.map +1 -1
- package/dist/agents/manager.js +13 -5
- package/dist/agents/manager.js.map +1 -1
- package/dist/agents/reviewer.d.ts.map +1 -1
- package/dist/agents/reviewer.js +7 -2
- package/dist/agents/reviewer.js.map +1 -1
- package/dist/pipeline/project-devloop.d.ts.map +1 -1
- package/dist/pipeline/project-devloop.js +9 -0
- package/dist/pipeline/project-devloop.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -119,7 +119,8 @@ Each iteration does the following:
|
|
|
119
119
|
3. `code-reviewer` reads the Task Brief, Developer report, and recalled code-design memory, then returns `ACCEPT`, `REVISE`, or `REDIRECT`. If its output does not start with one of those decisions, the reviewer agent asks the same thread to correct the format.
|
|
120
120
|
4. `REVISE` sends feedback back to `developer`; `REDIRECT` returns control to `coding-manager`; `ACCEPT` finishes the task.
|
|
121
121
|
5. After the review loop ends, the pipeline archives the full transcript, writes `task_round_summary.md` with the Task Brief, final decision, and Developer/Reviewer report text, asks the memory update prompts what should be remembered, and stores that content through `memory-agent-forge`.
|
|
122
|
-
6.
|
|
122
|
+
6. On the next project iteration, `coding-manager` receives the previous `task_round_summary.md` content as `lastTaskRoundSummary` during recall and task selection, so a `REDIRECT` can directly guide the next Task Brief.
|
|
123
|
+
7. The pipeline stops when `coding-manager` returns `FINISHED` or `--max-iterations` is reached.
|
|
123
124
|
|
|
124
125
|
## Developing-Skill And Trajectory Feedback
|
|
125
126
|
|
|
@@ -152,7 +153,7 @@ The pipeline maintains:
|
|
|
152
153
|
| Path | Purpose |
|
|
153
154
|
| ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
|
|
154
155
|
| [`pipeline/pipeline.ts`](src/pipeline/pipeline.ts) | CLI argument parsing and the base `developing` pipeline wrapper. |
|
|
155
|
-
| [`pipeline/project-devloop.ts`](src/pipeline/project-devloop.ts) | Outer project workflow, archive creation, memory recall/update, and per-agent
|
|
156
|
+
| [`pipeline/project-devloop.ts`](src/pipeline/project-devloop.ts) | Outer project workflow, archive creation, memory recall/update, last task summary handoff, and per-agent coordination. |
|
|
156
157
|
| [`pipeline/task-devloop.ts`](src/pipeline/task-devloop.ts) | Inner developer/reviewer loop for one selected task. |
|
|
157
158
|
| [`pipeline/pipelineskill.ts`](src/pipeline/pipelineskill.ts) | `developing-skill` wrapper that adds trajectory optimization callbacks around the base loop. |
|
|
158
159
|
| [`agents/factory.ts`](src/agents/factory.ts) | Registers the developing coding manager, developer, and reviewer agents. |
|
|
@@ -164,9 +165,10 @@ The pipeline maintains:
|
|
|
164
165
|
|
|
165
166
|
## Troubleshooting
|
|
166
167
|
|
|
167
|
-
| Problem | Likely cause
|
|
168
|
-
| --------------------------------------- |
|
|
169
|
-
| The loop stops with `FINISHED` | `coding-manager` decided no further developing task is needed.
|
|
170
|
-
| A task keeps returning `REVISE` | The inner developer/reviewer loop has not reached `ACCEPT`.
|
|
171
|
-
| A
|
|
172
|
-
|
|
|
168
|
+
| Problem | Likely cause | Fix |
|
|
169
|
+
| --------------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
|
|
170
|
+
| The loop stops with `FINISHED` | `coding-manager` decided no further developing task is needed. | Inspect the memory directory and the latest archive. |
|
|
171
|
+
| A task keeps returning `REVISE` | The inner developer/reviewer loop has not reached `ACCEPT`. | Read the Developer reports and Reviewer feedback in the timestamped archive folder. |
|
|
172
|
+
| A task returns `REDIRECT` | The reviewer decided the task direction or premise should change. | Inspect `task_round_summary.md`; its contents are passed into the next manager selection round. |
|
|
173
|
+
| A new goal keeps inheriting old context | One of the memory directories still contains old task state. | Update `--goal-path`; if needed, edit or delete stale memory files before rerunning the wrapper. |
|
|
174
|
+
| The archive option looks misspelled | The current CLI option name is `--achive-dir`. | Use the current option name until the CLI changes. |
|
package/README.zh-CN.md
CHANGED
|
@@ -119,7 +119,8 @@ npm run developing -- \
|
|
|
119
119
|
3. `code-reviewer` 阅读 Task Brief、Developer report 和召回的 code-design memory,返回 `ACCEPT`、`REVISE` 或 `REDIRECT`。如果输出不是以这三个决策之一开头,reviewer agent 会要求同一个 thread 修正格式。
|
|
120
120
|
4. `REVISE` 会把反馈送回 `developer`;`REDIRECT` 会把控制权交回 `coding-manager`;`ACCEPT` 表示当前 task 完成。
|
|
121
121
|
5. review 循环结束后,pipeline 归档完整 transcript,写出包含 Task Brief、最终决策和 Developer/Reviewer report 正文的 `task_round_summary.md`,让 memory update prompts 输出有什么需要记下,并通过 `memory-agent-forge` 写入记忆。
|
|
122
|
-
6.
|
|
122
|
+
6. 下一轮 project iteration 里,`coding-manager` 的 recall 和 task selection 会收到上一轮 `task_round_summary.md` 正文作为 `lastTaskRoundSummary`,所以 `REDIRECT` 可以直接影响下一次 Task Brief。
|
|
123
|
+
7. 当 `coding-manager` 返回 `FINISHED` 或达到 `--max-iterations` 时停止。
|
|
123
124
|
|
|
124
125
|
## developing-skill 和 Trajectory Feedback
|
|
125
126
|
|
|
@@ -149,18 +150,18 @@ pipeline 会维护:
|
|
|
149
150
|
|
|
150
151
|
## 重要文件
|
|
151
152
|
|
|
152
|
-
| 路径 | 作用
|
|
153
|
-
| ---------------------------------------------------------------------- |
|
|
154
|
-
| [`pipeline/pipeline.ts`](src/pipeline/pipeline.ts) | CLI 参数解析和基础 `developing` pipeline 包装。
|
|
155
|
-
| [`pipeline/project-devloop.ts`](src/pipeline/project-devloop.ts) | 外层 project workflow、archive 创建、memory recall/update
|
|
156
|
-
| [`pipeline/task-devloop.ts`](src/pipeline/task-devloop.ts) | 针对一个 selected task 的内层 developer/reviewer 循环。
|
|
157
|
-
| [`pipeline/pipelineskill.ts`](src/pipeline/pipelineskill.ts) | 给基础开发循环增加 trajectory optimization callbacks 的 `developing-skill` 包装。
|
|
158
|
-
| [`agents/factory.ts`](src/agents/factory.ts) | 注册 developing coding manager、developer 和 reviewer agents。
|
|
159
|
-
| [`agents/types.ts`](src/agents/types.ts) | 共享的 workspace-aware base class 和变量定义。
|
|
160
|
-
| [`agents/manager.ts`](src/agents/manager.ts) | 判断需要回忆什么、选择外层任务、校验 select 输出格式,并输出有什么需要记下。
|
|
161
|
-
| [`agents/developer.ts`](src/agents/developer.ts) | 使用共享 coding-style skill 修改目标 repo。
|
|
162
|
-
| [`agents/reviewer.ts`](src/agents/reviewer.ts) | 执行只读代码审阅 gate、校验 review 输出格式,并返回 `ACCEPT`、`REVISE` 或 `REDIRECT`。
|
|
163
|
-
| [`agents/trajectory-optimizer.ts`](src/agents/trajectory-optimizer.ts) | 扫描开发轨迹,并为 `developing-skill` 提出 coding-style skill 优化建议。
|
|
153
|
+
| 路径 | 作用 |
|
|
154
|
+
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
155
|
+
| [`pipeline/pipeline.ts`](src/pipeline/pipeline.ts) | CLI 参数解析和基础 `developing` pipeline 包装。 |
|
|
156
|
+
| [`pipeline/project-devloop.ts`](src/pipeline/project-devloop.ts) | 外层 project workflow、archive 创建、memory recall/update、上一轮 task summary 传递和各 agent 之间的交接。 |
|
|
157
|
+
| [`pipeline/task-devloop.ts`](src/pipeline/task-devloop.ts) | 针对一个 selected task 的内层 developer/reviewer 循环。 |
|
|
158
|
+
| [`pipeline/pipelineskill.ts`](src/pipeline/pipelineskill.ts) | 给基础开发循环增加 trajectory optimization callbacks 的 `developing-skill` 包装。 |
|
|
159
|
+
| [`agents/factory.ts`](src/agents/factory.ts) | 注册 developing coding manager、developer 和 reviewer agents。 |
|
|
160
|
+
| [`agents/types.ts`](src/agents/types.ts) | 共享的 workspace-aware base class 和变量定义。 |
|
|
161
|
+
| [`agents/manager.ts`](src/agents/manager.ts) | 判断需要回忆什么、选择外层任务、校验 select 输出格式,并输出有什么需要记下。 |
|
|
162
|
+
| [`agents/developer.ts`](src/agents/developer.ts) | 使用共享 coding-style skill 修改目标 repo。 |
|
|
163
|
+
| [`agents/reviewer.ts`](src/agents/reviewer.ts) | 执行只读代码审阅 gate、校验 review 输出格式,并返回 `ACCEPT`、`REVISE` 或 `REDIRECT`。 |
|
|
164
|
+
| [`agents/trajectory-optimizer.ts`](src/agents/trajectory-optimizer.ts) | 扫描开发轨迹,并为 `developing-skill` 提出 coding-style skill 优化建议。 |
|
|
164
165
|
|
|
165
166
|
## 常见问题
|
|
166
167
|
|
|
@@ -168,5 +169,6 @@ pipeline 会维护:
|
|
|
168
169
|
| ------------------------- | ----------------------------------------------------- | -------------------------------------------------------------------------- |
|
|
169
170
|
| Loop 以 `FINISHED` 停止 | `coding-manager` 判断不需要继续选择 developing task。 | 检查 memory 目录和最新 archive。 |
|
|
170
171
|
| 某个任务持续返回 `REVISE` | 内层 developer/reviewer 循环尚未达到 `ACCEPT`。 | 阅读按时间戳归档的 Developer reports 和 Reviewer feedback。 |
|
|
172
|
+
| 某个任务返回 `REDIRECT` | reviewer 判断当前任务方向或前提需要改变。 | 查看 `task_round_summary.md`;它的正文会传入下一轮 manager 任务选择。 |
|
|
171
173
|
| 新 goal 仍然继承旧上下文 | 某个 memory 目录里还保留旧任务状态。 | 更新 `--goal-path`;必要时编辑或删除过时 memory 文件,再重新运行 wrapper。 |
|
|
172
174
|
| Archive 参数看起来拼错 | 当前 CLI 参数名就是 `--achive-dir`。 | 在 CLI 改名前继续使用当前参数名。 |
|
package/dist/agents/developer.js
CHANGED
|
@@ -55,6 +55,7 @@ ${reviewerReport}
|
|
|
55
55
|
Improve the repository according to the Task Brief. If a reviewer report is present, update the code according to that report.
|
|
56
56
|
|
|
57
57
|
Use your own judgment to inspect, edit, and verify. If you make no changes, explain why no change is appropriate on disk.
|
|
58
|
+
Make sure your report matches the actual on-disk repository state after your work.
|
|
58
59
|
|
|
59
60
|
Output a concise developer report with:
|
|
60
61
|
- what you changed
|
|
@@ -62,7 +63,9 @@ Output a concise developer report with:
|
|
|
62
63
|
- what commands you ran
|
|
63
64
|
- why the result addresses the Objective
|
|
64
65
|
- any blockers or uncertainty
|
|
65
|
-
|
|
66
|
+
|
|
67
|
+
List any code relationships or design lessons that should be remembered separately under:
|
|
68
|
+
## Memory Candidates
|
|
66
69
|
`;
|
|
67
70
|
}
|
|
68
71
|
function buildUpdatePrompt(codingStyleSkillInstructionText, goalInstructionText, targetPath, taskBrief, codeDesignMemory, taskRoundSummary) {
|
|
@@ -83,6 +86,7 @@ ${taskRoundSummary}
|
|
|
83
86
|
Scan the target repository at ${targetPath}/ and consider what reusable code logic relationships and design reasons should be remembered after this task.
|
|
84
87
|
|
|
85
88
|
Remember only reusable code/design memory: module relationships, architecture constraints, invariants, interface design, review rules, and pitfalls. Do not store long transcripts, one-off command output, runtime noise, or project progress state.
|
|
89
|
+
When reviewer memory candidates and developer memory candidates conflict, prefer reviewer candidates for code quality, design constraints, and pitfalls.
|
|
86
90
|
`;
|
|
87
91
|
}
|
|
88
92
|
//# sourceMappingURL=developer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"developer.js","sourceRoot":"","sources":["../../src/agents/developer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,2BAA2B,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAiC,MAAM,YAAY,CAAC;AA0B5E,MAAM,OAAO,cAAe,SAAQ,eAAmC;IAC3D,WAAW,CAAC,SAAuC;QAC3D,MAAM,oBAAoB,GAAG,IAAI,CAAC,qBAAqB,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;QACxF,MAAM,UAAU,GAAG,IAAI,CAAC,qBAAqB,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QACpE,MAAM,+BAA+B,GAAG,2BAA2B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UAAU;;;CAGzC,CAAC;AACF,CAAC;AAED,SAAS,kBAAkB,CACzB,+BAAuC,EACvC,mBAA2B,EAC3B,UAAkB,EAClB,SAAiB,EACjB,gBAAwB,EACxB,cAAsB;IAEtB,OAAO;EACP,mBAAmB;;EAEnB,+BAA+B;;EAE/B,mBAAmB;;;EAGnB,gBAAgB;;mCAEiB,UAAU;;;EAG3C,SAAS;;;EAGT,cAAc;;;;;;;;;;;;;;;;CAgBf,CAAC;AACF,CAAC;AAED,SAAS,iBAAiB,CACxB,+BAAuC,EACvC,mBAA2B,EAC3B,UAAkB,EAClB,SAAiB,EACjB,gBAAwB,EACxB,gBAAwB;IAExB,OAAO;EACP,+BAA+B;;EAE/B,mBAAmB;;;EAGnB,SAAS;;;EAGT,gBAAgB;;;EAGhB,gBAAgB;;gCAEc,UAAU;;;;CAIzC,CAAC;AACF,CAAC"}
|
package/dist/agents/manager.d.ts
CHANGED
|
@@ -2,10 +2,12 @@ import type { RecordCallback } from "coding-agent-forge";
|
|
|
2
2
|
import { DevelopingAgent, type DevelopingAgentVariables } from "./types.js";
|
|
3
3
|
type RecallCodingManagerVariables = DevelopingAgentVariables & {
|
|
4
4
|
phase: "recall";
|
|
5
|
+
lastTaskRoundSummary?: string;
|
|
5
6
|
};
|
|
6
7
|
type SelectCodingManagerVariables = DevelopingAgentVariables & {
|
|
7
8
|
projectProgressMemory: string;
|
|
8
9
|
phase: "select";
|
|
10
|
+
lastTaskRoundSummary?: string;
|
|
9
11
|
};
|
|
10
12
|
type UpdateCodingManagerVariables = DevelopingAgentVariables & {
|
|
11
13
|
projectProgressMemory: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/agents/manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,EAAE,eAAe,EAAE,KAAK,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAE5E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
|
|
|
1
1
|
import { codingStyleSkillInstruction, goalInstruction } from "./prompts.js";
|
|
2
2
|
import { DevelopingAgent } from "./types.js";
|
|
3
3
|
const MANAGER_DECISION_PATTERN = /^(FINISHED|# Task Brief)/;
|
|
4
|
-
const MAX_FORMAT_CORRECTION_ATTEMPTS =
|
|
4
|
+
const MAX_FORMAT_CORRECTION_ATTEMPTS = 3;
|
|
5
5
|
export class CodingManagerAgent extends DevelopingAgent {
|
|
6
6
|
async runStreamed(variables, onRecord) {
|
|
7
7
|
let managerOutput = await super.runStreamed(variables, onRecord);
|
|
@@ -50,28 +50,34 @@ Please correct it.
|
|
|
50
50
|
const targetPath = this.workspaceRelativePath(variables.targetPath);
|
|
51
51
|
const codingStyleSkillInstructionText = codingStyleSkillInstruction(codingStyleSkillPath);
|
|
52
52
|
const goalInstructionText = goalInstruction(variables.goal);
|
|
53
|
+
const lastTaskRoundSummary = "lastTaskRoundSummary" in variables && variables.lastTaskRoundSummary
|
|
54
|
+
? `Last task round summary:
|
|
55
|
+
${variables.lastTaskRoundSummary}`
|
|
56
|
+
: "";
|
|
53
57
|
switch (variables.phase) {
|
|
54
58
|
case "recall":
|
|
55
|
-
return buildRecallPrompt(codingStyleSkillInstructionText, goalInstructionText, targetPath);
|
|
59
|
+
return buildRecallPrompt(codingStyleSkillInstructionText, goalInstructionText, targetPath, lastTaskRoundSummary);
|
|
56
60
|
case "select":
|
|
57
|
-
return buildSelectPrompt(codingStyleSkillInstructionText, goalInstructionText, targetPath, variables.projectProgressMemory);
|
|
61
|
+
return buildSelectPrompt(codingStyleSkillInstructionText, goalInstructionText, targetPath, variables.projectProgressMemory, lastTaskRoundSummary);
|
|
58
62
|
case "update":
|
|
59
63
|
return buildUpdatePrompt(codingStyleSkillInstructionText, goalInstructionText, targetPath, variables.projectProgressMemory, variables.taskBrief, variables.taskRoundSummary);
|
|
60
64
|
}
|
|
61
65
|
}
|
|
62
66
|
}
|
|
63
|
-
function buildRecallPrompt(codingStyleSkillInstructionText, goalInstructionText, targetPath) {
|
|
67
|
+
function buildRecallPrompt(codingStyleSkillInstructionText, goalInstructionText, targetPath, lastTaskRoundSummary) {
|
|
64
68
|
return `
|
|
65
69
|
${codingStyleSkillInstructionText}
|
|
66
70
|
|
|
67
71
|
${goalInstructionText}
|
|
68
72
|
|
|
73
|
+
${lastTaskRoundSummary}
|
|
74
|
+
|
|
69
75
|
Scan the target repository at ${targetPath}/ and decide what project progress memory helps select the next task for the current goal.
|
|
70
76
|
|
|
71
77
|
Output concise project progress memory recall guidance.
|
|
72
78
|
`;
|
|
73
79
|
}
|
|
74
|
-
function buildSelectPrompt(codingStyleSkillInstructionText, goalInstructionText, targetPath, projectProgressMemory) {
|
|
80
|
+
function buildSelectPrompt(codingStyleSkillInstructionText, goalInstructionText, targetPath, projectProgressMemory, lastTaskRoundSummary) {
|
|
75
81
|
return `
|
|
76
82
|
${codingStyleSkillInstructionText}
|
|
77
83
|
|
|
@@ -80,6 +86,8 @@ ${goalInstructionText}
|
|
|
80
86
|
Related project progress memory:
|
|
81
87
|
${projectProgressMemory}
|
|
82
88
|
|
|
89
|
+
${lastTaskRoundSummary}
|
|
90
|
+
|
|
83
91
|
Scan the target repository at ${targetPath}/ and read the project progress memory related to the current goal.
|
|
84
92
|
Select the next developing task for the target repository.
|
|
85
93
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manager.js","sourceRoot":"","sources":["../../src/agents/manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAiC,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"manager.js","sourceRoot":"","sources":["../../src/agents/manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAiC,MAAM,YAAY,CAAC;AA0B5E,MAAM,wBAAwB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AAS,EAAE,QAAQ,CAAC,qBAAqB,CAAC,GAAG,MAAM;
|
|
1
|
+
{"version":3,"file":"reviewer.d.ts","sourceRoot":"","sources":["../../src/agents/reviewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGzD,OAAO,EAAE,eAAe,EAAE,KAAK,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAE5E,MAAM,MAAM,qBAAqB,GAAG,wBAAwB,GAAG;IAC7D,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC;AAI9D,qBAAa,iBAAkB,SAAQ,eAAe,CAAC,qBAAqB,CAAC;IAC5D,WAAW,CACxB,SAAS,EAAE,qBAAqB,EAChC,QAAQ,CAAC,EAAE,cAAc,GACxB,OAAO,CAAC,MAAM,CAAC;IAuClB,aAAa,CAAC,cAAc,EAAE,MAAM,GAAG,cAAc;IAQrD,SAAS,CAAC,WAAW,CAAC,SAAS,EAAE,QAAQ,CAAC,qBAAqB,CAAC,GAAG,MAAM;CAmD1E"}
|
package/dist/agents/reviewer.js
CHANGED
|
@@ -2,7 +2,7 @@ import { ponytailReviewSkillPrompt } from "./polytail.js";
|
|
|
2
2
|
import { codingStyleSkillInstruction, goalInstruction } from "./prompts.js";
|
|
3
3
|
import { DevelopingAgent } from "./types.js";
|
|
4
4
|
const REVIEW_DECISION_PATTERN = /^(ACCEPT|REVISE|REDIRECT)/;
|
|
5
|
-
const MAX_FORMAT_CORRECTION_ATTEMPTS =
|
|
5
|
+
const MAX_FORMAT_CORRECTION_ATTEMPTS = 3;
|
|
6
6
|
export class CodeReviewerAgent extends DevelopingAgent {
|
|
7
7
|
async runStreamed(variables, onRecord) {
|
|
8
8
|
let reviewerReport = await super.runStreamed(variables, onRecord);
|
|
@@ -86,7 +86,12 @@ Use ACCEPT when the result is good enough.
|
|
|
86
86
|
Use REVISE when the Developer can improve the result within the same task direction.
|
|
87
87
|
Use REDIRECT when the task direction, scope, dependency, or premise should be reconsidered by the Manager.
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
For REVISE, give the smallest actionable feedback for the same task direction.
|
|
90
|
+
For REDIRECT, explain the manager-level reason in one short paragraph.
|
|
91
|
+
|
|
92
|
+
After the decision, give concise feedback unless ACCEPT.
|
|
93
|
+
List any reusable memory candidates separately under:
|
|
94
|
+
## Memory Candidates
|
|
90
95
|
`;
|
|
91
96
|
}
|
|
92
97
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reviewer.js","sourceRoot":"","sources":["../../src/agents/reviewer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAiC,MAAM,YAAY,CAAC;AAS5E,MAAM,uBAAuB,GAAG,2BAA2B,CAAC;AAC5D,MAAM,8BAA8B,GAAG,CAAC,CAAC;AAEzC,MAAM,OAAO,iBAAkB,SAAQ,eAAsC;IAClE,KAAK,CAAC,WAAW,CACxB,SAAgC,EAChC,QAAyB;QAEzB,IAAI,cAAc,GAAG,MAAM,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAClE,IAAI,CAAC;YACH,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;YACnC,OAAO,cAAc,CAAC;QACxB,CAAC;QAAC,MAAM,CAAC;YACP,KAAK,IAAI,OAAO,GAAG,CAAC,EAAE,OAAO,IAAI,8BAA8B,EAAE,OAAO,EAAE,EAAE,CAAC;gBAC3E,cAAc,GAAG,CACf,MAAM,IAAI,CAAC,MAAM,CAAC,WAAW,CAC3B;;;;;;;;EAQV,cAAc;;;C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CAAC;AAE/B,MAAM,MAAM,uBAAuB,GAAG;IACpC,WAAW,CAAC,EAAE,CACZ,cAAc,EAAE,wBAAwB,EACxC,SAAS,EAAE,MAAM,KACd,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,CACb,cAAc,EAAE,wBAAwB,EACxC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,iBAAiB,EAC7B,gBAAgB,EAAE,MAAM,KACrB,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CAC3B,CAAC;AAEF,qBAAa,cAAc;IACnB,OAAO,CACX,IAAI,EAAE,SAAS,CAAC,kCAAkC,CAAC,EACnD,UAAU,EAAE,MAAM,EAClB,oBAAoB,EAAE,MAAM,EAC5B,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,MAAM,EACrB,wBAAwB,EAAE,MAAM,EAChC,yBAAyB,EAAE,MAAM,EACjC,oBAAoB,EAAE,MAAM,EAC5B,eAAe,EAAE,MAAM,EACvB,SAAS,CAAC,EAAE,uBAAuB,EACnC,SAAS,CAAC,EAAE,cAAc,GACzB,OAAO,CAAC,IAAI,CAAC;CA6HjB"}
|
|
@@ -13,6 +13,7 @@ export class ProjectDevLoop {
|
|
|
13
13
|
await mkdir(achiveDir, { recursive: true });
|
|
14
14
|
const memoryStore = new Memory(defaultMemoryAgentNames);
|
|
15
15
|
const taskDevLoop = new TaskDevLoop();
|
|
16
|
+
let lastTaskRoundSummary;
|
|
16
17
|
for (let iteration = 1; iteration <= maxIterations; iteration++) {
|
|
17
18
|
console.log(`\n# Project dev loop iteration ${String(iteration)}\n`);
|
|
18
19
|
const archiveDir = path.join(achiveDir, new Date().toISOString().replace(/[:.]/g, "-"));
|
|
@@ -21,6 +22,7 @@ export class ProjectDevLoop {
|
|
|
21
22
|
const projectProgressMemoryGuidance = (await codingManager.runStreamed({
|
|
22
23
|
...agentVariables,
|
|
23
24
|
phase: "recall",
|
|
25
|
+
...(lastTaskRoundSummary === undefined ? {} : { lastTaskRoundSummary }),
|
|
24
26
|
}, logRecord)).trim();
|
|
25
27
|
await writeFile(path.join(archiveDir, "project_devloop_memory_recall_guidance.md"), projectProgressMemoryGuidance, "utf8");
|
|
26
28
|
const projectProgressMemory = (await memoryStore.recall(team, MEMORY_DOMAIN_HINT, projectProgressMemoryPath, maxMemoryRounds, projectProgressMemoryGuidance, logRecord))
|
|
@@ -31,6 +33,7 @@ export class ProjectDevLoop {
|
|
|
31
33
|
...agentVariables,
|
|
32
34
|
projectProgressMemory,
|
|
33
35
|
phase: "select",
|
|
36
|
+
...(lastTaskRoundSummary === undefined ? {} : { lastTaskRoundSummary }),
|
|
34
37
|
}, logRecord)).trim();
|
|
35
38
|
await writeFile(path.join(archiveDir, "task_brief.md"), taskBrief, "utf8");
|
|
36
39
|
const managerDecision = codingManager.parseDecision(taskBrief);
|
|
@@ -40,6 +43,12 @@ export class ProjectDevLoop {
|
|
|
40
43
|
}
|
|
41
44
|
await callbacks?.onTaskStart?.(agentVariables, taskBrief);
|
|
42
45
|
const taskResult = await taskDevLoop.develop(team, agentVariables.targetPath, agentVariables.codingStyleSkillPath, agentVariables.goal, archiveDir, maxTaskDevLoopIterations, taskBrief, codeDesignMemoryPath, maxMemoryRounds, logRecord);
|
|
46
|
+
if (taskResult.finalDecision === "REDIRECT" || taskResult.finalDecision === "FAILED") {
|
|
47
|
+
lastTaskRoundSummary = taskResult.taskRoundSummary;
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
lastTaskRoundSummary = undefined;
|
|
51
|
+
}
|
|
43
52
|
const thingsToRemember = (await codingManager.runStreamed({
|
|
44
53
|
...agentVariables,
|
|
45
54
|
projectProgressMemory,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-devloop.js","sourceRoot":"","sources":["../../src/pipeline/project-devloop.ts"],"names":[],"mappings":"AACA,OAAO,EACL,MAAM,EACN,uBAAuB,GAExB,M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