developing-agent-forge 2.0.1 → 2.1.1
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 +25 -25
- package/README.zh-CN.md +30 -30
- package/dist/agents/developer.d.ts +6 -6
- package/dist/agents/developer.d.ts.map +1 -1
- package/dist/agents/developer.js +52 -30
- package/dist/agents/developer.js.map +1 -1
- package/dist/agents/index.d.ts +2 -2
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +1 -1
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/manager.d.ts +8 -6
- package/dist/agents/manager.d.ts.map +1 -1
- package/dist/agents/manager.js +99 -23
- 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 +6 -2
- package/dist/agents/reviewer.d.ts.map +1 -1
- package/dist/agents/reviewer.js +72 -9
- package/dist/agents/reviewer.js.map +1 -1
- package/dist/agents/trajectory-optimizer.d.ts +3 -3
- package/dist/agents/trajectory-optimizer.d.ts.map +1 -1
- package/dist/agents/trajectory-optimizer.js +28 -17
- package/dist/agents/trajectory-optimizer.js.map +1 -1
- package/dist/pipeline/index.d.ts +1 -1
- package/dist/pipeline/index.d.ts.map +1 -1
- package/dist/pipeline/index.js +1 -1
- package/dist/pipeline/index.js.map +1 -1
- package/dist/pipeline/pipelineskill.d.ts.map +1 -1
- package/dist/pipeline/pipelineskill.js +5 -6
- package/dist/pipeline/pipelineskill.js.map +1 -1
- package/dist/pipeline/project-devloop.d.ts +3 -3
- package/dist/pipeline/project-devloop.d.ts.map +1 -1
- package/dist/pipeline/project-devloop.js +19 -21
- package/dist/pipeline/project-devloop.js.map +1 -1
- package/dist/pipeline/task-devloop.d.ts +8 -2
- package/dist/pipeline/task-devloop.d.ts.map +1 -1
- package/dist/pipeline/task-devloop.js +44 -23
- package/dist/pipeline/task-devloop.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manager.js","sourceRoot":"","sources":["../../src/agents/manager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"manager.js","sourceRoot":"","sources":["../../src/agents/manager.ts"],"names":[],"mappings":"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"}
|
|
@@ -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,10 +1,14 @@
|
|
|
1
|
+
import type { RecordCallback } from "coding-agent-forge";
|
|
1
2
|
import { DevelopingAgent, type DevelopingAgentVariables } from "./types.js";
|
|
2
3
|
export type CodeReviewerVariables = DevelopingAgentVariables & {
|
|
3
|
-
|
|
4
|
-
currentTask: string;
|
|
4
|
+
taskBrief: string;
|
|
5
5
|
developerReport: string;
|
|
6
|
+
codeDesignMemory: string;
|
|
6
7
|
};
|
|
8
|
+
export type ReviewDecision = "ACCEPT" | "REVISE" | "REDIRECT";
|
|
7
9
|
export declare class CodeReviewerAgent extends DevelopingAgent<CodeReviewerVariables> {
|
|
10
|
+
runStreamed(variables: CodeReviewerVariables, onRecord?: RecordCallback): Promise<string>;
|
|
11
|
+
parseDecision(reviewerReport: string): ReviewDecision;
|
|
8
12
|
protected buildPrompt(variables: Readonly<CodeReviewerVariables>): string;
|
|
9
13
|
}
|
|
10
14
|
//# sourceMappingURL=reviewer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reviewer.d.ts","sourceRoot":"","sources":["../../src/agents/reviewer.ts"],"names":[],"mappings":"
|
|
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,30 +1,93 @@
|
|
|
1
|
+
import { ponytailReviewSkillPrompt } from "./polytail.js";
|
|
1
2
|
import { codingStyleSkillInstruction, goalInstruction } from "./prompts.js";
|
|
2
3
|
import { DevelopingAgent } from "./types.js";
|
|
4
|
+
const REVIEW_DECISION_PATTERN = /^(ACCEPT|REVISE|REDIRECT)/;
|
|
5
|
+
const MAX_FORMAT_CORRECTION_ATTEMPTS = 8;
|
|
3
6
|
export class CodeReviewerAgent extends DevelopingAgent {
|
|
7
|
+
async runStreamed(variables, onRecord) {
|
|
8
|
+
let reviewerReport = await super.runStreamed(variables, onRecord);
|
|
9
|
+
try {
|
|
10
|
+
this.parseDecision(reviewerReport);
|
|
11
|
+
return reviewerReport;
|
|
12
|
+
}
|
|
13
|
+
catch {
|
|
14
|
+
for (let attempt = 1; attempt <= MAX_FORMAT_CORRECTION_ATTEMPTS; attempt++) {
|
|
15
|
+
reviewerReport = (await this.thread.runStreamed(`
|
|
16
|
+
Previous review output did not follow the required format.
|
|
17
|
+
The output must start with exactly one of:
|
|
18
|
+
ACCEPT
|
|
19
|
+
REVISE
|
|
20
|
+
REDIRECT
|
|
21
|
+
|
|
22
|
+
Previous output:
|
|
23
|
+
${reviewerReport}
|
|
24
|
+
|
|
25
|
+
Please correct it.
|
|
26
|
+
`, onRecord)).trim();
|
|
27
|
+
try {
|
|
28
|
+
this.parseDecision(reviewerReport);
|
|
29
|
+
return reviewerReport;
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
if (attempt === MAX_FORMAT_CORRECTION_ATTEMPTS) {
|
|
33
|
+
throw new Error(`code-reviewer did not output a valid first-line decision after ${String(MAX_FORMAT_CORRECTION_ATTEMPTS)} correction attempts.`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
throw new Error("Unreachable code-reviewer format correction state.");
|
|
39
|
+
}
|
|
40
|
+
parseDecision(reviewerReport) {
|
|
41
|
+
const match = REVIEW_DECISION_PATTERN.exec(reviewerReport.trimStart());
|
|
42
|
+
if (match === null) {
|
|
43
|
+
throw new Error("Review report must start with ACCEPT, REVISE, or REDIRECT.");
|
|
44
|
+
}
|
|
45
|
+
return match[1];
|
|
46
|
+
}
|
|
4
47
|
buildPrompt(variables) {
|
|
5
48
|
const codingStyleSkillPath = this.workspaceRelativePath(variables.codingStyleSkillPath);
|
|
6
49
|
const targetPath = this.workspaceRelativePath(variables.targetPath);
|
|
7
50
|
const codingStyleSkillInstructionText = codingStyleSkillInstruction(codingStyleSkillPath);
|
|
8
51
|
const goalInstructionText = goalInstruction(variables.goal);
|
|
9
|
-
return
|
|
10
|
-
|
|
52
|
+
return `
|
|
53
|
+
${ponytailReviewSkillPrompt}
|
|
54
|
+
|
|
55
|
+
${codingStyleSkillInstructionText}
|
|
56
|
+
|
|
57
|
+
${goalInstructionText}
|
|
11
58
|
|
|
12
59
|
Work in the target repository at ${targetPath}/.
|
|
13
60
|
Review the current code. Read only.
|
|
14
61
|
|
|
15
|
-
|
|
62
|
+
Task Brief:
|
|
63
|
+
${variables.taskBrief}
|
|
16
64
|
|
|
17
|
-
|
|
18
|
-
${variables.
|
|
65
|
+
Related code design memory:
|
|
66
|
+
${variables.codeDesignMemory}
|
|
19
67
|
|
|
20
68
|
Developer report:
|
|
21
69
|
${variables.developerReport}
|
|
22
70
|
|
|
23
|
-
|
|
24
|
-
|
|
71
|
+
Review the Developer's result using the Task Brief, Developer report, and code design memory.
|
|
72
|
+
|
|
73
|
+
Focus on:
|
|
74
|
+
- whether the Objective is actually improved
|
|
75
|
+
- whether the evidence supports the Developer's claims
|
|
76
|
+
- whether the code quality and design remain healthy
|
|
77
|
+
- whether the change respects existing code relationships and design memory
|
|
78
|
+
- whether the next action should be revision, manager redirection, or acceptance
|
|
79
|
+
|
|
80
|
+
On the first non-empty line, output exactly one decision:
|
|
81
|
+
ACCEPT
|
|
82
|
+
REVISE
|
|
83
|
+
REDIRECT
|
|
84
|
+
|
|
85
|
+
Use ACCEPT when the result is good enough.
|
|
86
|
+
Use REVISE when the Developer can improve the result within the same task direction.
|
|
87
|
+
Use REDIRECT when the task direction, scope, dependency, or premise should be reconsidered by the Manager.
|
|
25
88
|
|
|
26
|
-
|
|
27
|
-
|
|
89
|
+
After the decision, give concise feedback unless ACCEPT. Also list any reusable memory candidates.
|
|
90
|
+
`;
|
|
28
91
|
}
|
|
29
92
|
}
|
|
30
93
|
//# sourceMappingURL=reviewer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reviewer.js","sourceRoot":"","sources":["../../src/agents/reviewer.ts"],"names":[],"mappings":"
|
|
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;;;CAGf,EACW,QAAQ,CACT,CACF,CAAC,IAAI,EAAE,CAAC;gBACT,IAAI,CAAC;oBACH,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;oBACnC,OAAO,cAAc,CAAC;gBACxB,CAAC;gBAAC,MAAM,CAAC;oBACP,IAAI,OAAO,KAAK,8BAA8B,EAAE,CAAC;wBAC/C,MAAM,IAAI,KAAK,CACb,kEAAkE,MAAM,CAAC,8BAA8B,CAAC,uBAAuB,CAChI,CAAC;oBACJ,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACxE,CAAC;IAED,aAAa,CAAC,cAAsB;QAClC,MAAM,KAAK,GAAG,uBAAuB,CAAC,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,CAAC,CAAC;QACvE,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;QAChF,CAAC;QACD,OAAO,KAAK,CAAC,CAAC,CAAmB,CAAC;IACpC,CAAC;IAES,WAAW,CAAC,SAA0C;QAC9D,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,OAAO;EACT,yBAAyB;;EAEzB,+BAA+B;;EAE/B,mBAAmB;;mCAEc,UAAU;;;;EAI3C,SAAS,CAAC,SAAS;;;EAGnB,SAAS,CAAC,gBAAgB;;;EAG1B,SAAS,CAAC,eAAe;;;;;;;;;;;;;;;;;;;;;CAqB1B,CAAC;IACA,CAAC;CACF"}
|
|
@@ -2,12 +2,12 @@ import { Agent } from "coding-agent-forge/agent";
|
|
|
2
2
|
import type { DevelopingAgentVariables } from "./types.js";
|
|
3
3
|
type ScanTrajectoryOptimizerVariables = DevelopingAgentVariables & {
|
|
4
4
|
phase: "scan";
|
|
5
|
-
|
|
5
|
+
taskBrief: string;
|
|
6
6
|
};
|
|
7
7
|
type OptimizeTrajectoryOptimizerVariables = DevelopingAgentVariables & {
|
|
8
8
|
phase: "optimize";
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
taskBrief: string;
|
|
10
|
+
taskRoundSummary: string;
|
|
11
11
|
metaskillPath: string;
|
|
12
12
|
};
|
|
13
13
|
export type TrajectoryOptimizerVariables = ScanTrajectoryOptimizerVariables | OptimizeTrajectoryOptimizerVariables;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trajectory-optimizer.d.ts","sourceRoot":"","sources":["../../src/agents/trajectory-optimizer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAGjD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAE3D,KAAK,gCAAgC,GAAG,wBAAwB,GAAG;IACjE,KAAK,EAAE,MAAM,CAAC;IACd,
|
|
1
|
+
{"version":3,"file":"trajectory-optimizer.d.ts","sourceRoot":"","sources":["../../src/agents/trajectory-optimizer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAGjD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAE3D,KAAK,gCAAgC,GAAG,wBAAwB,GAAG;IACjE,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,KAAK,oCAAoC,GAAG,wBAAwB,GAAG;IACrE,KAAK,EAAE,UAAU,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GACpC,gCAAgC,GAChC,oCAAoC,CAAC;AAEzC,qBAAa,wBAAyB,SAAQ,KAAK,CAAC,4BAA4B,CAAC;IAC/E,SAAS,CAAC,WAAW,CAAC,SAAS,EAAE,QAAQ,CAAC,4BAA4B,CAAC,GAAG,MAAM;CAwBjF"}
|
|
@@ -4,41 +4,52 @@ import { goalInstruction } from "./prompts.js";
|
|
|
4
4
|
export class TrajectoryOptimizerAgent extends Agent {
|
|
5
5
|
buildPrompt(variables) {
|
|
6
6
|
const goalInstructionText = goalInstruction(variables.goal);
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
switch (variables.phase) {
|
|
8
|
+
case "scan":
|
|
9
|
+
return buildScanPrompt(variables.targetPath, variables.codingStyleSkillPath, goalInstructionText, variables.taskBrief);
|
|
10
|
+
case "optimize": {
|
|
11
|
+
const metaskill = readFileSync(variables.metaskillPath, "utf8");
|
|
12
|
+
return buildOptimizePrompt(variables.targetPath, variables.codingStyleSkillPath, goalInstructionText, variables.taskBrief, variables.taskRoundSummary, metaskill);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function buildScanPrompt(targetPath, codingStyleSkillPath, goalInstructionText, taskBrief) {
|
|
18
|
+
return `
|
|
19
|
+
Work in the target repository at ${targetPath}/.
|
|
20
|
+
Scan the target repository at ${targetPath}/ and the skill at ${codingStyleSkillPath} before the Developer starts the Task Brief. Read only.
|
|
11
21
|
|
|
12
22
|
${goalInstructionText}
|
|
13
23
|
|
|
14
|
-
|
|
15
|
-
${
|
|
24
|
+
Task Brief:
|
|
25
|
+
${taskBrief}
|
|
16
26
|
|
|
17
27
|
Output a concise baseline of the repository state relevant to this task and the main guidance the skill should provide.
|
|
18
28
|
`;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Revise the skill at ${
|
|
29
|
+
}
|
|
30
|
+
function buildOptimizePrompt(targetPath, codingStyleSkillPath, goalInstructionText, taskBrief, taskRoundSummary, metaskill) {
|
|
31
|
+
return `
|
|
32
|
+
Revise the skill at ${codingStyleSkillPath} so it produces better development trajectories.
|
|
23
33
|
|
|
24
34
|
The metaskill below contains the design goals and tips of this skill:
|
|
25
35
|
|
|
26
36
|
${metaskill}
|
|
27
37
|
|
|
28
|
-
|
|
29
|
-
|
|
38
|
+
The sections below describe the task this skill just executed and what happened during that round.
|
|
39
|
+
|
|
40
|
+
Target repository at ${targetPath}/.
|
|
41
|
+
|
|
30
42
|
${goalInstructionText}
|
|
31
43
|
|
|
32
|
-
|
|
33
|
-
${
|
|
44
|
+
Task Brief:
|
|
45
|
+
${taskBrief}
|
|
34
46
|
|
|
35
|
-
|
|
36
|
-
${
|
|
47
|
+
Reality-aware task round summary:
|
|
48
|
+
${taskRoundSummary}
|
|
37
49
|
|
|
38
50
|
Evaluate whether the skill produced a good modification trajectory, then edit the skill directly. Focus on missing, misleading, or redundant guidance that affected task selection, coding, or review.
|
|
39
51
|
|
|
40
52
|
Output a concise optimizer report with the main skill changes.
|
|
41
53
|
`;
|
|
42
|
-
}
|
|
43
54
|
}
|
|
44
55
|
//# sourceMappingURL=trajectory-optimizer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trajectory-optimizer.js","sourceRoot":"","sources":["../../src/agents/trajectory-optimizer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAmB/C,MAAM,OAAO,wBAAyB,SAAQ,KAAmC;IACrE,WAAW,CAAC,SAAiD;QACrE,MAAM,mBAAmB,GAAG,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAE5D,
|
|
1
|
+
{"version":3,"file":"trajectory-optimizer.js","sourceRoot":"","sources":["../../src/agents/trajectory-optimizer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAmB/C,MAAM,OAAO,wBAAyB,SAAQ,KAAmC;IACrE,WAAW,CAAC,SAAiD;QACrE,MAAM,mBAAmB,GAAG,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAE5D,QAAQ,SAAS,CAAC,KAAK,EAAE,CAAC;YACxB,KAAK,MAAM;gBACT,OAAO,eAAe,CACpB,SAAS,CAAC,UAAU,EACpB,SAAS,CAAC,oBAAoB,EAC9B,mBAAmB,EACnB,SAAS,CAAC,SAAS,CACpB,CAAC;YACJ,KAAK,UAAU,CAAC,CAAC,CAAC;gBAChB,MAAM,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;gBAChE,OAAO,mBAAmB,CACxB,SAAS,CAAC,UAAU,EACpB,SAAS,CAAC,oBAAoB,EAC9B,mBAAmB,EACnB,SAAS,CAAC,SAAS,EACnB,SAAS,CAAC,gBAAgB,EAC1B,SAAS,CACV,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAED,SAAS,eAAe,CACtB,UAAkB,EAClB,oBAA4B,EAC5B,mBAA2B,EAC3B,SAAiB;IAEjB,OAAO;mCAC0B,UAAU;gCACb,UAAU,sBAAsB,oBAAoB;;EAElF,mBAAmB;;;EAGnB,SAAS;;;CAGV,CAAC;AACF,CAAC;AAED,SAAS,mBAAmB,CAC1B,UAAkB,EAClB,oBAA4B,EAC5B,mBAA2B,EAC3B,SAAiB,EACjB,gBAAwB,EACxB,SAAiB;IAEjB,OAAO;sBACa,oBAAoB;;;;EAIxC,SAAS;;;;uBAIY,UAAU;;EAE/B,mBAAmB;;;EAGnB,SAAS;;;EAGT,gBAAgB;;;;;CAKjB,CAAC;AACF,CAAC"}
|
package/dist/pipeline/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ProjectDevLoop, type ProjectDevLoopAgentVariablesByName, type ProjectDevLoopCallbacks, } from "./project-devloop.js";
|
|
2
|
-
export { TaskDevLoop, type TaskDevLoopAgentVariablesByName } from "./task-devloop.js";
|
|
2
|
+
export { TaskDevLoop, type TaskDevLoopAgentVariablesByName, type TaskDevLoopResult, } from "./task-devloop.js";
|
|
3
3
|
export { developing, developingArgsOptions, developingPipeline, type DevelopingOptions, } from "./pipeline.js";
|
|
4
4
|
export { developingSkill, developingSkillArgsOptions, developingSkillPipeline, type DevelopingSkillAgentVariables, type DevelopingSkillOptions, } from "./pipelineskill.js";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pipeline/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,KAAK,kCAAkC,EACvC,KAAK,uBAAuB,GAC7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pipeline/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,KAAK,kCAAkC,EACvC,KAAK,uBAAuB,GAC7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,WAAW,EACX,KAAK,+BAA+B,EACpC,KAAK,iBAAiB,GACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,UAAU,EACV,qBAAqB,EACrB,kBAAkB,EAClB,KAAK,iBAAiB,GACvB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,eAAe,EACf,0BAA0B,EAC1B,uBAAuB,EACvB,KAAK,6BAA6B,EAClC,KAAK,sBAAsB,GAC5B,MAAM,oBAAoB,CAAC"}
|
package/dist/pipeline/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ProjectDevLoop, } from "./project-devloop.js";
|
|
2
|
-
export { TaskDevLoop } from "./task-devloop.js";
|
|
2
|
+
export { TaskDevLoop, } from "./task-devloop.js";
|
|
3
3
|
export { developing, developingArgsOptions, developingPipeline, } from "./pipeline.js";
|
|
4
4
|
export { developingSkill, developingSkillArgsOptions, developingSkillPipeline, } from "./pipelineskill.js";
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/pipeline/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,GAGf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/pipeline/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,GAGf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,WAAW,GAGZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,UAAU,EACV,qBAAqB,EACrB,kBAAkB,GAEnB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,eAAe,EACf,0BAA0B,EAC1B,uBAAuB,GAGxB,MAAM,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipelineskill.d.ts","sourceRoot":"","sources":["../../src/pipeline/pipelineskill.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAGT,KAAK,eAAe,EAErB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AAGvE,OAAO,KAAK,EACV,kCAAkC,EAEnC,MAAM,sBAAsB,CAAC;AAE9B,MAAM,MAAM,6BAA6B,GAAG,kCAAkC,GAAG;IAC/E,sBAAsB,EAAE,4BAA4B,CAAC;CACtD,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMC,CAAC;AAEzC,MAAM,MAAM,sBAAsB,GAAG,eAAe,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAExF,wBAAsB,eAAe,CACnC,IAAI,EAAE,SAAS,CAAC,6BAA6B,CAAC,EAC9C,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"pipelineskill.d.ts","sourceRoot":"","sources":["../../src/pipeline/pipelineskill.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAGT,KAAK,eAAe,EAErB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AAGvE,OAAO,KAAK,EACV,kCAAkC,EAEnC,MAAM,sBAAsB,CAAC;AAE9B,MAAM,MAAM,6BAA6B,GAAG,kCAAkC,GAAG;IAC/E,sBAAsB,EAAE,4BAA4B,CAAC;CACtD,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMC,CAAC;AAEzC,MAAM,MAAM,sBAAsB,GAAG,eAAe,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAExF,wBAAsB,eAAe,CACnC,IAAI,EAAE,SAAS,CAAC,6BAA6B,CAAC,EAC9C,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,IAAI,CAAC,CAmDf;AAED,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAWlC,CAAC"}
|
|
@@ -20,25 +20,24 @@ export async function developingSkill(team, options) {
|
|
|
20
20
|
const developingOptions = {
|
|
21
21
|
...options,
|
|
22
22
|
callbacks: {
|
|
23
|
-
onTaskStart: async (agentVariables,
|
|
23
|
+
onTaskStart: async (agentVariables, taskBrief) => {
|
|
24
24
|
trajectoryOptimizer = await team.createAgent("trajectory-optimizer");
|
|
25
25
|
const repositoryScan = (await trajectoryOptimizer.runStreamed({
|
|
26
26
|
...agentVariables,
|
|
27
27
|
phase: "scan",
|
|
28
|
-
|
|
28
|
+
taskBrief,
|
|
29
29
|
}, logRecord)).trim();
|
|
30
30
|
console.log(`\n# Skill trajectory repository scan\n${repositoryScan}\n`);
|
|
31
31
|
},
|
|
32
|
-
onTaskFinish: async (agentVariables,
|
|
32
|
+
onTaskFinish: async (agentVariables, taskBrief, taskResult) => {
|
|
33
33
|
if (trajectoryOptimizer === undefined) {
|
|
34
34
|
throw new Error("Trajectory optimizer must scan the repository before optimizing.");
|
|
35
35
|
}
|
|
36
|
-
const taskDevReport = taskDevReports.join("\n\n");
|
|
37
36
|
const optimizerReport = (await trajectoryOptimizer.runStreamed({
|
|
38
37
|
...agentVariables,
|
|
39
38
|
phase: "optimize",
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
taskBrief,
|
|
40
|
+
taskRoundSummary: taskResult.taskRoundSummary,
|
|
42
41
|
metaskillPath,
|
|
43
42
|
}, logRecord)).trim();
|
|
44
43
|
console.log(`\n# Skill trajectory optimizer report\n${optimizerReport}\n`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipelineskill.js","sourceRoot":"","sources":["../../src/pipeline/pipelineskill.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,GAIf,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAU1E,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,gBAAgB,EAAE;QAChB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,4DAA4D;KAC1E;IACD,GAAG,qBAAqB;CACc,CAAC;AAIzC,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,IAA8C,EAC9C,OAA+B;IAE/B,MAAM,aAAa,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAChD,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,SAAS,GAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE;QACnD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC;IACnD,CAAC,CAAC;IACF,IAAI,mBAAoE,CAAC;IAEzE,MAAM,iBAAiB,GAAG;QACxB,GAAG,OAAO;QACV,SAAS,EAAE;YACT,WAAW,EAAE,KAAK,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"pipelineskill.js","sourceRoot":"","sources":["../../src/pipeline/pipelineskill.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,GAIf,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAU1E,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,gBAAgB,EAAE;QAChB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,4DAA4D;KAC1E;IACD,GAAG,qBAAqB;CACc,CAAC;AAIzC,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,IAA8C,EAC9C,OAA+B;IAE/B,MAAM,aAAa,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAChD,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,SAAS,GAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE;QACnD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC;IACnD,CAAC,CAAC;IACF,IAAI,mBAAoE,CAAC;IAEzE,MAAM,iBAAiB,GAAG;QACxB,GAAG,OAAO;QACV,SAAS,EAAE;YACT,WAAW,EAAE,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,EAAE;gBAC/C,mBAAmB,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC;gBACrE,MAAM,cAAc,GAAG,CACrB,MAAM,mBAAmB,CAAC,WAAW,CACnC;oBACE,GAAG,cAAc;oBACjB,KAAK,EAAE,MAAM;oBACb,SAAS;iBACV,EACD,SAAS,CACV,CACF,CAAC,IAAI,EAAE,CAAC;gBACT,OAAO,CAAC,GAAG,CAAC,yCAAyC,cAAc,IAAI,CAAC,CAAC;YAC3E,CAAC;YACD,YAAY,EAAE,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE;gBAC5D,IAAI,mBAAmB,KAAK,SAAS,EAAE,CAAC;oBACtC,MAAM,IAAI,KAAK,CAAC,kEAAkE,CAAC,CAAC;gBACtF,CAAC;gBAED,MAAM,eAAe,GAAG,CACtB,MAAM,mBAAmB,CAAC,WAAW,CACnC;oBACE,GAAG,cAAc;oBACjB,KAAK,EAAE,UAAU;oBACjB,SAAS;oBACT,gBAAgB,EAAE,UAAU,CAAC,gBAAgB;oBAC7C,aAAa;iBACd,EACD,SAAS,CACV,CACF,CAAC,IAAI,EAAE,CAAC;gBAET,OAAO,CAAC,GAAG,CAAC,0CAA0C,eAAe,IAAI,CAAC,CAAC;YAC7E,CAAC;SACyC;KAC7C,CAAC;IACF,MAAM,kBAAkB,CAAC,GAAG,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;AACxD,CAAC;AAED,MAAM,CAAC,MAAM,uBAAuB,GAAG,cAAc,CAAC;IACpD,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,qDAAqD;IAClE,WAAW,EAAE,0BAA0B;IACvC,cAAc;IACd,KAAK,CAAC,GAAG,CACP,IAA8C,EAC9C,OAA2D;QAE3D,MAAM,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { AgentTeam, RecordCallback } from "coding-agent-forge";
|
|
2
2
|
import { type MemoryAgentVariablesByName } from "memory-agent-forge";
|
|
3
3
|
import type { CodingManagerVariables, DevelopingAgentVariables } from "../agents/index.js";
|
|
4
|
-
import { type TaskDevLoopAgentVariablesByName } from "./task-devloop.js";
|
|
4
|
+
import { type TaskDevLoopAgentVariablesByName, type TaskDevLoopResult } from "./task-devloop.js";
|
|
5
5
|
export type ProjectDevLoopAgentVariablesByName = TaskDevLoopAgentVariablesByName & {
|
|
6
6
|
"coding-manager": CodingManagerVariables;
|
|
7
7
|
} & MemoryAgentVariablesByName;
|
|
8
8
|
export type ProjectDevLoopCallbacks = {
|
|
9
|
-
onTaskStart?: (agentVariables: DevelopingAgentVariables,
|
|
10
|
-
onTaskFinish?: (agentVariables: DevelopingAgentVariables,
|
|
9
|
+
onTaskStart?: (agentVariables: DevelopingAgentVariables, taskBrief: string) => Promise<void> | void;
|
|
10
|
+
onTaskFinish?: (agentVariables: DevelopingAgentVariables, taskBrief: string, taskResult: TaskDevLoopResult, thingsToRemember: string) => Promise<void> | void;
|
|
11
11
|
};
|
|
12
12
|
export declare class ProjectDevLoop {
|
|
13
13
|
develop(team: AgentTeam<ProjectDevLoopAgentVariablesByName>, targetPath: string, codingStyleSkillPath: string, goal: string, achiveDir: string, maxIterations: number, maxTaskDevLoopIterations: number, projectProgressMemoryPath: string, codeDesignMemoryPath: string, maxMemoryRounds: number, callbacks?: ProjectDevLoopCallbacks, logRecord?: RecordCallback): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-devloop.d.ts","sourceRoot":"","sources":["../../src/pipeline/project-devloop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAGL,KAAK,0BAA0B,EAChC,MAAM,oBAAoB,CAAC;AAI5B,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"project-devloop.d.ts","sourceRoot":"","sources":["../../src/pipeline/project-devloop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAGL,KAAK,0BAA0B,EAChC,MAAM,oBAAoB,CAAC;AAI5B,OAAO,KAAK,EAEV,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEL,KAAK,+BAA+B,EACpC,KAAK,iBAAiB,EACvB,MAAM,mBAAmB,CAAC;AAK3B,MAAM,MAAM,kCAAkC,GAAG,+BAA+B,GAAG;IACjF,gBAAgB,EAAE,sBAAsB,CAAC;CAC1C,GAAG,0BAA0B,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;CAqHjB"}
|