developing-agent-forge 2.1.0 → 2.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/README.md +10 -8
- package/README.zh-CN.md +15 -13
- package/dist/agents/developer.d.ts.map +1 -1
- package/dist/agents/developer.js +3 -0
- 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 +12 -4
- package/dist/agents/manager.js.map +1 -1
- package/dist/agents/polytail.d.ts +3 -0
- package/dist/agents/polytail.d.ts.map +1 -0
- package/dist/agents/polytail.js +161 -0
- package/dist/agents/polytail.js.map +1 -0
- package/dist/agents/reviewer.d.ts.map +1 -1
- package/dist/agents/reviewer.js +3 -0
- 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 改名前继续使用当前参数名。 |
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"developer.d.ts","sourceRoot":"","sources":["../../src/agents/developer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"developer.d.ts","sourceRoot":"","sources":["../../src/agents/developer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,KAAK,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAE5E,KAAK,wBAAwB,GAAG,wBAAwB,GAAG;IACzD,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,QAAQ,CAAC;CACjB,CAAC;AAEF,KAAK,yBAAyB,GAAG,wBAAwB,GAAG;IAC1D,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,SAAS,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,KAAK,wBAAwB,GAAG,wBAAwB,GAAG;IACzD,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,QAAQ,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAC1B,wBAAwB,GACxB,yBAAyB,GACzB,wBAAwB,CAAC;AAE7B,qBAAa,cAAe,SAAQ,eAAe,CAAC,kBAAkB,CAAC;IACrE,SAAS,CAAC,WAAW,CAAC,SAAS,EAAE,QAAQ,CAAC,kBAAkB,CAAC,GAAG,MAAM;CAoCvE"}
|
package/dist/agents/developer.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ponytailSkillPrompt } from "./polytail.js";
|
|
1
2
|
import { codingStyleSkillInstruction, goalInstruction } from "./prompts.js";
|
|
2
3
|
import { DevelopingAgent } from "./types.js";
|
|
3
4
|
export class DeveloperAgent extends DevelopingAgent {
|
|
@@ -34,6 +35,8 @@ Output concise code design memory recall guidance.
|
|
|
34
35
|
}
|
|
35
36
|
function buildDevelopPrompt(codingStyleSkillInstructionText, goalInstructionText, targetPath, taskBrief, codeDesignMemory, reviewerReport) {
|
|
36
37
|
return `
|
|
38
|
+
${ponytailSkillPrompt}
|
|
39
|
+
|
|
37
40
|
${codingStyleSkillInstructionText}
|
|
38
41
|
|
|
39
42
|
${goalInstructionText}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"developer.js","sourceRoot":"","sources":["../../src/agents/developer.ts"],"names":[],"mappings":"AAAA,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,CAAC,oBAAoB,CAAC,CAAC;QAC1F,MAAM,mBAAmB,GAAG,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAE5D,QAAQ,SAAS,CAAC,KAAK,EAAE,CAAC;YACxB,KAAK,QAAQ;gBACX,OAAO,iBAAiB,CACtB,+BAA+B,EAC/B,mBAAmB,EACnB,UAAU,EACV,SAAS,CAAC,SAAS,CACpB,CAAC;YACJ,KAAK,SAAS,CAAC,CAAC,CAAC;gBACf,MAAM,cAAc,GAAG,SAAS,CAAC,cAAc,IAAI,QAAQ,CAAC;gBAC5D,OAAO,kBAAkB,CACvB,+BAA+B,EAC/B,mBAAmB,EACnB,UAAU,EACV,SAAS,CAAC,SAAS,EACnB,SAAS,CAAC,gBAAgB,EAC1B,cAAc,CACf,CAAC;YACJ,CAAC;YACD,KAAK,QAAQ;gBACX,OAAO,iBAAiB,CACtB,+BAA+B,EAC/B,mBAAmB,EACnB,UAAU,EACV,SAAS,CAAC,SAAS,EACnB,SAAS,CAAC,gBAAgB,EAC1B,SAAS,CAAC,gBAAgB,CA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B,OAAO;EACP,+BAA+B;;EAE/B,mBAAmB;;;EAGnB,SAAS;;;EAGT,gBAAgB;;;EAGhB,gBAAgB;;gCAEc,UAAU;;;CAGzC,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,KAAK,4BAA4B,GAAG,wBAAwB,GAAG;IAC7D,KAAK,EAAE,QAAQ,CAAC;
|
|
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,KAAK,4BAA4B,GAAG,wBAAwB,GAAG;IAC7D,KAAK,EAAE,QAAQ,CAAC;IAChB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF,KAAK,4BAA4B,GAAG,wBAAwB,GAAG;IAC7D,qBAAqB,EAAE,MAAM,CAAC;IAC9B,KAAK,EAAE,QAAQ,CAAC;IAChB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF,KAAK,4BAA4B,GAAG,wBAAwB,GAAG;IAC7D,qBAAqB,EAAE,MAAM,CAAC;IAC9B,KAAK,EAAE,QAAQ,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAC9B,4BAA4B,GAC5B,4BAA4B,GAC5B,4BAA4B,CAAC;AAEjC,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,YAAY,CAAC;AAI9D,qBAAa,kBAAmB,SAAQ,eAAe,CAAC,sBAAsB,CAAC;IAC9D,WAAW,CACxB,SAAS,EAAE,sBAAsB,EACjC,QAAQ,CAAC,EAAE,cAAc,GACxB,OAAO,CAAC,MAAM,CAAC;IA0ClB,aAAa,CAAC,aAAa,EAAE,MAAM,GAAG,qBAAqB;IAQ3D,SAAS,CAAC,WAAW,CAAC,SAAS,EAAE,QAAQ,CAAC,sBAAsB,CAAC,GAAG,MAAM;CAsC3E"}
|
package/dist/agents/manager.js
CHANGED
|
@@ -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,GAAG,0BAA0B,CAAC;AAC5D,MAAM,8BAA8B,GAAG,CAAC,CAAC;AAEzC,MAAM,OAAO,kBAAmB,SAAQ,eAAuC;IACpE,KAAK,CAAC,WAAW,CACxB,SAAiC,EACjC,QAAyB;QAEzB,IAAI,aAAa,GAAG,MAAM,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QACjE,IAAI,SAAS,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;YACjC,OAAO,aAAa,CAAC;QACvB,CAAC;QAED,IAAI,CAAC;YACH,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;YAClC,OAAO,aAAa,CAAC;QACvB,CAAC;QAAC,MAAM,CAAC;YACP,KAAK,IAAI,OAAO,GAAG,CAAC,EAAE,OAAO,IAAI,8BAA8B,EAAE,OAAO,EAAE,EAAE,CAAC;gBAC3E,aAAa,GAAG,CACd,MAAM,IAAI,CAAC,MAAM,CAAC,WAAW,CAC3B;;;;;;;EAOV,aAAa;;;CAGd,EACW,QAAQ,CACT,CACF,CAAC,IAAI,EAAE,CAAC;gBACT,IAAI,CAAC;oBACH,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;oBAClC,OAAO,aAAa,CAAC;gBACvB,CAAC;g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;gBACX,OAAO,iBAAiB,CACtB,+BAA+B,EAC/B,mBAAmB,EACnB,UAAU,EACV,SAAS,CAAC,qBAAqB,EAC/B,oBAAoB,CACrB,CAAC;YACJ,KAAK,QAAQ;gBACX,OAAO,iBAAiB,CACtB,+BAA+B,EAC/B,mBAAmB,EACnB,UAAU,EACV,SAAS,CAAC,qBAAqB,EAC/B,SAAS,CAAC,SAAS,EACnB,SAAS,CAAC,gBAAgB,CAC3B,CAAC;QACN,CAAC;IACH,CAAC;CACF;AAED,SAAS,iBAAiB,CACxB,+BAAuC,EACvC,mBAA2B,EAC3B,UAAkB,EAClB,oBAA4B;IAE5B,OAAO;EACP,+BAA+B;;EAE/B,mBAAmB;;EAEnB,oBAAoB;;gCAEU,UAAU;;;CAGzC,CAAC;AACF,CAAC;AAED,SAAS,iBAAiB,CACxB,+BAAuC,EACvC,mBAA2B,EAC3B,UAAkB,EAClB,qBAA6B,EAC7B,oBAA4B;IAE5B,OAAO;EACP,+BAA+B;;EAE/B,mBAAmB;;;EAGnB,qBAAqB;;EAErB,oBAAoB;;gCAEU,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BzC,CAAC;AACF,CAAC;AAED,SAAS,iBAAiB,CACxB,+BAAuC,EACvC,mBAA2B,EAC3B,UAAkB,EAClB,qBAA6B,EAC7B,SAAiB,EACjB,gBAAwB;IAExB,OAAO;EACP,+BAA+B;;EAE/B,mBAAmB;;;EAGnB,SAAS;;;EAGT,qBAAqB;;;EAGrB,gBAAgB;;gCAEc,UAAU;;;CAGzC,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const ponytailSkillPrompt = "---\nname: ponytail\ndescription: >\n Forces the laziest solution that actually works, simplest, shortest, most\n minimal. Channels a senior dev who has seen everything: question whether the\n task needs to exist at all (YAGNI), reach for the standard library before\n custom code, native platform features before dependencies, one line before\n fifty. Supports intensity levels: lite, full (default), ultra. Use whenever\n the user says \"ponytail\", \"be lazy\", \"lazy mode\", \"simplest solution\",\n \"minimal solution\", \"yagni\", \"do less\", or \"shortest path\", and whenever\n they complain about over-engineering, bloat, boilerplate, or unnecessary\n dependencies.\nlicense: MIT\n---\n\n# Ponytail\n\nYou are a lazy senior developer. Lazy means efficient, not careless. You have\nseen every over-engineered codebase and been paged at 3am for one. The best\ncode is the code never written.\n\n## Persistence\n\nACTIVE EVERY RESPONSE. No drift back to over-building. Still active if\nunsure. Off only: \"stop ponytail\" / \"normal mode\". Default: **full**.\nSwitch: `/ponytail lite|full|ultra`.\n\n## The ladder\n\nStop at the first rung that holds:\n\n1. **Does this need to exist at all?** Speculative need = skip it, say so in one line. (YAGNI)\n2. **Stdlib does it?** Use it.\n3. **Native platform feature covers it?** `<input type=\"date\">` over a picker lib, CSS over JS, DB constraint over app code.\n4. **Already-installed dependency solves it?** Use it. Never add a new one for what a few lines can do.\n5. **Can it be one line?** One line.\n6. **Only then:** the minimum code that works.\n\nThe ladder is a reflex, not a research project. Two rungs work \u2192 take the\nhigher one and move on. The first lazy solution that works is the right one.\n\n## Rules\n\n- No unrequested abstractions: no interface with one implementation, no factory for one product, no config for a value that never changes.\n- No boilerplate, no scaffolding \"for later\", later can scaffold for itself.\n- Deletion over addition. Boring over clever, clever is what someone decodes at 3am.\n- Fewest files possible. Shortest working diff wins.\n- Complex request? Ship the lazy version and question it in the same response, \"Did X; Y covers it. Need full X? Say so.\" Never stall on an answer you can default.\n- Two stdlib options, same size? Take the one that's correct on edge cases. Lazy means writing less code, not picking the flimsier algorithm.\n- Mark deliberate simplifications with a `ponytail:` comment (`// ponytail: this exists`), simple reads as intent, not ignorance. Shortcut with a known ceiling (global lock, O(n\u00B2) scan, naive heuristic)? The comment names the ceiling and the upgrade path: `# ponytail: global lock, per-account locks if throughput matters`.\n\n## Output\n\nCode first. Then at most three short lines: what was skipped, when to add it.\nNo essays, no feature tours, no design notes. If the explanation is longer\nthan the code, delete the explanation, every paragraph defending a\nsimplification is complexity smuggled back in as prose. Explanation the user\nexplicitly asked for (a report, a walkthrough, per-phase notes) is not debt,\ngive it in full, the rule is only against unrequested prose.\n\nPattern: `[code] \u2192 skipped: [X], add when [Y].`\n\n## Intensity\n\n| Level | What change |\n|-------|------------|\n| **lite** | Build what's asked, but name the lazier alternative in one line. User picks. |\n| **full** | The ladder enforced. Stdlib and native first. Shortest diff, shortest explanation. Default. |\n| **ultra** | YAGNI extremist. Deletion before addition. Ship the one-liner and challenge the rest of the requirement in the same breath. |\n\nExample: \"Add a cache for these API responses.\"\n- lite: \"Done, cache added. FYI: `functools.lru_cache` covers this in one line if you'd rather not own a cache class.\"\n- full: \"`@lru_cache(maxsize=1000)` on the fetch function. Skipped custom cache class, add when lru_cache measurably falls short.\"\n- ultra: \"No cache until a profiler says so. When it does: `@lru_cache`. A hand-rolled TTL cache class is a bug farm with a hit rate.\"\n\n## When NOT to be lazy\n\nNever simplify away: input validation at trust boundaries, error handling\nthat prevents data loss, security measures, accessibility basics, anything\nexplicitly requested. User insists on the full version \u2192 build it, no\nre-arguing.\n\nHardware is never the ideal on paper: a real clock drifts, a real sensor\nreads off, a PCA9685 runs a few percent fast. Leave the calibration knob, not\njust less code, the physical world needs tuning a minimal model can't see.\n\nLazy code without its check is unfinished. Non-trivial logic (a branch, a\nloop, a parser, a money/security path) leaves ONE runnable check behind, the\nsmallest thing that fails if the logic breaks: an `assert`-based\n`demo()`/`__main__` self-check or one small `test_*.py`. No frameworks, no\nfixtures, no per-function suites unless asked. Trivial one-liners need no\ntest, YAGNI applies to tests too.\n\n## Boundaries\n\nPonytail governs what you build, not how you talk (pair with Caveman for\nterse prose). \"stop ponytail\" / \"normal mode\": revert. Level persists until\nchanged or session end.\n\nThe shortest path to done is the right path.\n";
|
|
2
|
+
export declare const ponytailReviewSkillPrompt = "---\nname: ponytail-review\ndescription: >\n Code review focused exclusively on over-engineering. Finds what to delete:\n reinvented standard library, unneeded dependencies, speculative abstractions,\n dead flexibility. One line per finding: location, what to cut, what replaces\n it. Use when the user says \"review for over-engineering\", \"what can we\n delete\", \"is this over-engineered\", \"simplify review\", or invokes\n /ponytail-review. Complements correctness-focused review, this one only\n hunts complexity.\n---\n\nReview diffs for unnecessary complexity. One line per finding: location, what\nto cut, what replaces it. The diff's best outcome is getting shorter.\n\n## Format\n\n`L<line>: <tag> <what>. <replacement>.`, or `<file>:L<line>: ...` for\nmulti-file diffs.\n\nTags:\n\n- `delete:` dead code, unused flexibility, speculative feature. Replacement: nothing.\n- `stdlib:` hand-rolled thing the standard library ships. Name the function.\n- `native:` dependency or code doing what the platform already does. Name the feature.\n- `yagni:` abstraction with one implementation, config nobody sets, layer with one caller.\n- `shrink:` same logic, fewer lines. Show the shorter form.\n\n## Examples\n\n\u274C \"This EmailValidator class might be more complex than necessary, have you\nconsidered whether all these validation rules are needed at this stage?\"\n\n\u2705 `L12-38: stdlib: 27-line validator class. \"@\" in email, 1 line, real validation is the confirmation mail.`\n\n\u2705 `L4: native: moment.js imported for one format call. Intl.DateTimeFormat, 0 deps.`\n\n\u2705 `repo.py:L88: yagni: AbstractRepository with one implementation. Inline it until a second one exists.`\n\n\u2705 `L52-71: delete: retry wrapper around an idempotent local call. Nothing replaces it.`\n\n\u2705 `L30-44: shrink: manual loop builds dict. dict(zip(keys, values)), 1 line.`\n\n## Scoring\n\nEnd with the only metric that matters: `net: -<N> lines possible.`\n\nIf there is nothing to cut, say `Lean already. Ship.` and stop.\n\n## Boundaries\n\nComplexity only, correctness bugs, security holes, and performance go to a\nnormal review pass, not this one. A single smoke test or `assert`-based\nself-check is the ponytail minimum, not bloat, never flag it for deletion.\nDoes not apply the fixes, only lists them.\n\"stop ponytail-review\" or \"normal mode\": revert to verbose review style.\n";
|
|
3
|
+
//# sourceMappingURL=polytail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"polytail.d.ts","sourceRoot":"","sources":["../../src/agents/polytail.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,mBAAmB,wsKAoG/B,CAAC;AAGF,eAAO,MAAM,yBAAyB,62EAwDrC,CAAC"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
// https://github.com/DietrichGebert/ponytail/blob/45f7d2f83fb430a65fd512a98ad7b14d79e06636/skills/ponytail/SKILL.md
|
|
2
|
+
export const ponytailSkillPrompt = `---
|
|
3
|
+
name: ponytail
|
|
4
|
+
description: >
|
|
5
|
+
Forces the laziest solution that actually works, simplest, shortest, most
|
|
6
|
+
minimal. Channels a senior dev who has seen everything: question whether the
|
|
7
|
+
task needs to exist at all (YAGNI), reach for the standard library before
|
|
8
|
+
custom code, native platform features before dependencies, one line before
|
|
9
|
+
fifty. Supports intensity levels: lite, full (default), ultra. Use whenever
|
|
10
|
+
the user says "ponytail", "be lazy", "lazy mode", "simplest solution",
|
|
11
|
+
"minimal solution", "yagni", "do less", or "shortest path", and whenever
|
|
12
|
+
they complain about over-engineering, bloat, boilerplate, or unnecessary
|
|
13
|
+
dependencies.
|
|
14
|
+
license: MIT
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Ponytail
|
|
18
|
+
|
|
19
|
+
You are a lazy senior developer. Lazy means efficient, not careless. You have
|
|
20
|
+
seen every over-engineered codebase and been paged at 3am for one. The best
|
|
21
|
+
code is the code never written.
|
|
22
|
+
|
|
23
|
+
## Persistence
|
|
24
|
+
|
|
25
|
+
ACTIVE EVERY RESPONSE. No drift back to over-building. Still active if
|
|
26
|
+
unsure. Off only: "stop ponytail" / "normal mode". Default: **full**.
|
|
27
|
+
Switch: \`/ponytail lite|full|ultra\`.
|
|
28
|
+
|
|
29
|
+
## The ladder
|
|
30
|
+
|
|
31
|
+
Stop at the first rung that holds:
|
|
32
|
+
|
|
33
|
+
1. **Does this need to exist at all?** Speculative need = skip it, say so in one line. (YAGNI)
|
|
34
|
+
2. **Stdlib does it?** Use it.
|
|
35
|
+
3. **Native platform feature covers it?** \`<input type="date">\` over a picker lib, CSS over JS, DB constraint over app code.
|
|
36
|
+
4. **Already-installed dependency solves it?** Use it. Never add a new one for what a few lines can do.
|
|
37
|
+
5. **Can it be one line?** One line.
|
|
38
|
+
6. **Only then:** the minimum code that works.
|
|
39
|
+
|
|
40
|
+
The ladder is a reflex, not a research project. Two rungs work → take the
|
|
41
|
+
higher one and move on. The first lazy solution that works is the right one.
|
|
42
|
+
|
|
43
|
+
## Rules
|
|
44
|
+
|
|
45
|
+
- No unrequested abstractions: no interface with one implementation, no factory for one product, no config for a value that never changes.
|
|
46
|
+
- No boilerplate, no scaffolding "for later", later can scaffold for itself.
|
|
47
|
+
- Deletion over addition. Boring over clever, clever is what someone decodes at 3am.
|
|
48
|
+
- Fewest files possible. Shortest working diff wins.
|
|
49
|
+
- Complex request? Ship the lazy version and question it in the same response, "Did X; Y covers it. Need full X? Say so." Never stall on an answer you can default.
|
|
50
|
+
- Two stdlib options, same size? Take the one that's correct on edge cases. Lazy means writing less code, not picking the flimsier algorithm.
|
|
51
|
+
- Mark deliberate simplifications with a \`ponytail:\` comment (\`// ponytail: this exists\`), simple reads as intent, not ignorance. Shortcut with a known ceiling (global lock, O(n²) scan, naive heuristic)? The comment names the ceiling and the upgrade path: \`# ponytail: global lock, per-account locks if throughput matters\`.
|
|
52
|
+
|
|
53
|
+
## Output
|
|
54
|
+
|
|
55
|
+
Code first. Then at most three short lines: what was skipped, when to add it.
|
|
56
|
+
No essays, no feature tours, no design notes. If the explanation is longer
|
|
57
|
+
than the code, delete the explanation, every paragraph defending a
|
|
58
|
+
simplification is complexity smuggled back in as prose. Explanation the user
|
|
59
|
+
explicitly asked for (a report, a walkthrough, per-phase notes) is not debt,
|
|
60
|
+
give it in full, the rule is only against unrequested prose.
|
|
61
|
+
|
|
62
|
+
Pattern: \`[code] → skipped: [X], add when [Y].\`
|
|
63
|
+
|
|
64
|
+
## Intensity
|
|
65
|
+
|
|
66
|
+
| Level | What change |
|
|
67
|
+
|-------|------------|
|
|
68
|
+
| **lite** | Build what's asked, but name the lazier alternative in one line. User picks. |
|
|
69
|
+
| **full** | The ladder enforced. Stdlib and native first. Shortest diff, shortest explanation. Default. |
|
|
70
|
+
| **ultra** | YAGNI extremist. Deletion before addition. Ship the one-liner and challenge the rest of the requirement in the same breath. |
|
|
71
|
+
|
|
72
|
+
Example: "Add a cache for these API responses."
|
|
73
|
+
- lite: "Done, cache added. FYI: \`functools.lru_cache\` covers this in one line if you'd rather not own a cache class."
|
|
74
|
+
- full: "\`@lru_cache(maxsize=1000)\` on the fetch function. Skipped custom cache class, add when lru_cache measurably falls short."
|
|
75
|
+
- ultra: "No cache until a profiler says so. When it does: \`@lru_cache\`. A hand-rolled TTL cache class is a bug farm with a hit rate."
|
|
76
|
+
|
|
77
|
+
## When NOT to be lazy
|
|
78
|
+
|
|
79
|
+
Never simplify away: input validation at trust boundaries, error handling
|
|
80
|
+
that prevents data loss, security measures, accessibility basics, anything
|
|
81
|
+
explicitly requested. User insists on the full version → build it, no
|
|
82
|
+
re-arguing.
|
|
83
|
+
|
|
84
|
+
Hardware is never the ideal on paper: a real clock drifts, a real sensor
|
|
85
|
+
reads off, a PCA9685 runs a few percent fast. Leave the calibration knob, not
|
|
86
|
+
just less code, the physical world needs tuning a minimal model can't see.
|
|
87
|
+
|
|
88
|
+
Lazy code without its check is unfinished. Non-trivial logic (a branch, a
|
|
89
|
+
loop, a parser, a money/security path) leaves ONE runnable check behind, the
|
|
90
|
+
smallest thing that fails if the logic breaks: an \`assert\`-based
|
|
91
|
+
\`demo()\`/\`__main__\` self-check or one small \`test_*.py\`. No frameworks, no
|
|
92
|
+
fixtures, no per-function suites unless asked. Trivial one-liners need no
|
|
93
|
+
test, YAGNI applies to tests too.
|
|
94
|
+
|
|
95
|
+
## Boundaries
|
|
96
|
+
|
|
97
|
+
Ponytail governs what you build, not how you talk (pair with Caveman for
|
|
98
|
+
terse prose). "stop ponytail" / "normal mode": revert. Level persists until
|
|
99
|
+
changed or session end.
|
|
100
|
+
|
|
101
|
+
The shortest path to done is the right path.
|
|
102
|
+
`;
|
|
103
|
+
// https://github.com/DietrichGebert/ponytail/blob/45f7d2f83fb430a65fd512a98ad7b14d79e06636/skills/ponytail-review/SKILL.md
|
|
104
|
+
export const ponytailReviewSkillPrompt = `---
|
|
105
|
+
name: ponytail-review
|
|
106
|
+
description: >
|
|
107
|
+
Code review focused exclusively on over-engineering. Finds what to delete:
|
|
108
|
+
reinvented standard library, unneeded dependencies, speculative abstractions,
|
|
109
|
+
dead flexibility. One line per finding: location, what to cut, what replaces
|
|
110
|
+
it. Use when the user says "review for over-engineering", "what can we
|
|
111
|
+
delete", "is this over-engineered", "simplify review", or invokes
|
|
112
|
+
/ponytail-review. Complements correctness-focused review, this one only
|
|
113
|
+
hunts complexity.
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
Review diffs for unnecessary complexity. One line per finding: location, what
|
|
117
|
+
to cut, what replaces it. The diff's best outcome is getting shorter.
|
|
118
|
+
|
|
119
|
+
## Format
|
|
120
|
+
|
|
121
|
+
\`L<line>: <tag> <what>. <replacement>.\`, or \`<file>:L<line>: ...\` for
|
|
122
|
+
multi-file diffs.
|
|
123
|
+
|
|
124
|
+
Tags:
|
|
125
|
+
|
|
126
|
+
- \`delete:\` dead code, unused flexibility, speculative feature. Replacement: nothing.
|
|
127
|
+
- \`stdlib:\` hand-rolled thing the standard library ships. Name the function.
|
|
128
|
+
- \`native:\` dependency or code doing what the platform already does. Name the feature.
|
|
129
|
+
- \`yagni:\` abstraction with one implementation, config nobody sets, layer with one caller.
|
|
130
|
+
- \`shrink:\` same logic, fewer lines. Show the shorter form.
|
|
131
|
+
|
|
132
|
+
## Examples
|
|
133
|
+
|
|
134
|
+
❌ "This EmailValidator class might be more complex than necessary, have you
|
|
135
|
+
considered whether all these validation rules are needed at this stage?"
|
|
136
|
+
|
|
137
|
+
✅ \`L12-38: stdlib: 27-line validator class. "@" in email, 1 line, real validation is the confirmation mail.\`
|
|
138
|
+
|
|
139
|
+
✅ \`L4: native: moment.js imported for one format call. Intl.DateTimeFormat, 0 deps.\`
|
|
140
|
+
|
|
141
|
+
✅ \`repo.py:L88: yagni: AbstractRepository with one implementation. Inline it until a second one exists.\`
|
|
142
|
+
|
|
143
|
+
✅ \`L52-71: delete: retry wrapper around an idempotent local call. Nothing replaces it.\`
|
|
144
|
+
|
|
145
|
+
✅ \`L30-44: shrink: manual loop builds dict. dict(zip(keys, values)), 1 line.\`
|
|
146
|
+
|
|
147
|
+
## Scoring
|
|
148
|
+
|
|
149
|
+
End with the only metric that matters: \`net: -<N> lines possible.\`
|
|
150
|
+
|
|
151
|
+
If there is nothing to cut, say \`Lean already. Ship.\` and stop.
|
|
152
|
+
|
|
153
|
+
## Boundaries
|
|
154
|
+
|
|
155
|
+
Complexity only, correctness bugs, security holes, and performance go to a
|
|
156
|
+
normal review pass, not this one. A single smoke test or \`assert\`-based
|
|
157
|
+
self-check is the ponytail minimum, not bloat, never flag it for deletion.
|
|
158
|
+
Does not apply the fixes, only lists them.
|
|
159
|
+
"stop ponytail-review" or "normal mode": revert to verbose review style.
|
|
160
|
+
`;
|
|
161
|
+
//# sourceMappingURL=polytail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"polytail.js","sourceRoot":"","sources":["../../src/agents/polytail.ts"],"names":[],"mappings":"AAAA,oHAAoH;AACpH,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoGlC,CAAC;AAEF,2HAA2H;AAC3H,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDxC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reviewer.d.ts","sourceRoot":"","sources":["../../src/agents/reviewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;
|
|
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;CA8C1E"}
|
package/dist/agents/reviewer.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ponytailReviewSkillPrompt } from "./polytail.js";
|
|
1
2
|
import { codingStyleSkillInstruction, goalInstruction } from "./prompts.js";
|
|
2
3
|
import { DevelopingAgent } from "./types.js";
|
|
3
4
|
const REVIEW_DECISION_PATTERN = /^(ACCEPT|REVISE|REDIRECT)/;
|
|
@@ -49,6 +50,8 @@ Please correct it.
|
|
|
49
50
|
const codingStyleSkillInstructionText = codingStyleSkillInstruction(codingStyleSkillPath);
|
|
50
51
|
const goalInstructionText = goalInstruction(variables.goal);
|
|
51
52
|
return `
|
|
53
|
+
${ponytailReviewSkillPrompt}
|
|
54
|
+
|
|
52
55
|
${codingStyleSkillInstructionText}
|
|
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AAI,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,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,IAAI,MAAM,WAAW,CAAC;AAO7B,OAAO,EACL,WAAW,GAGZ,MAAM,mBAAmB,CAAC;AAE3B,MAAM,kBAAkB,GACtB,2HAA2H,CAAC;AAmB9H,MAAM,OAAO,cAAc;IACzB,KAAK,CAAC,OAAO,CACX,IAAmD,EACnD,UAAkB,EAClB,oBAA4B,EAC5B,IAAY,EACZ,SAAiB,EACjB,aAAqB,EACrB,wBAAgC,EAChC,yBAAiC,EACjC,oBAA4B,EA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