@lmzhen/dsh-evolution-feedback 0.1.0-rc.62 → 0.1.0-rc.64
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/lib/index.js +18 -17
- package/package.json +6 -6
package/lib/index.js
CHANGED
|
@@ -65,7 +65,7 @@ function evolutionIoAdapter(provider) {
|
|
|
65
65
|
* changes semantically: the bundle digest is the fail-closed signal for
|
|
66
66
|
* review workers, so a stale id across deployments must be distinguishable.
|
|
67
67
|
*/
|
|
68
|
-
const PROMPT_BUNDLE_ID = "dsh-evolution@
|
|
68
|
+
const PROMPT_BUNDLE_ID = "dsh-evolution@6";
|
|
69
69
|
const MEMORY_REVIEW_PROMPT = `[Auto-review — Memory]
|
|
70
70
|
Review the conversation above and consider saving to memory if appropriate.
|
|
71
71
|
|
|
@@ -170,7 +170,7 @@ Right target shape: class-level skills with rich SKILL.md + references/, templat
|
|
|
170
170
|
|
|
171
171
|
Hard rules:
|
|
172
172
|
1. NEVER hard-delete a skill. Archive (moving to .archive/) is the maximum destructive action; archives are recoverable, deletion is not.
|
|
173
|
-
2. Do not touch bundled, hub-installed, pinned, or scheduled-task-referenced (referenced) skills. Referenced skills
|
|
173
|
+
2. Do not touch bundled, hub-installed, pinned, or scheduled-task-referenced (referenced) skills. Referenced skills are fully protected — never consolidated, never pruned (there is no scheduled-task reference-rewriting pass; a referenced skill stays in place by design).
|
|
174
174
|
3. Do not archive recently-created or never-used skills without strong evidence. "use=0" is NOT evidence either way — it only means the trigger has not come up yet. Never archive a never-used skill unless it is at least 30 days old AND its content is genuinely obsolete or fully absorbed elsewhere.
|
|
175
175
|
4. Do NOT reject consolidation on the grounds that "each skill has a distinct trigger". The right bar is: would a human maintainer write this as N separate skills, or one skill with N labeled subsections? When the answer is the latter, merge.
|
|
176
176
|
5. Judge overlap on CONTENT, not on usage counters.
|
|
@@ -189,15 +189,7 @@ How to work:
|
|
|
189
189
|
4. Flag skills whose NAME is too narrow (contains a PR number, a feature codename, a specific error string, an 'audit'/'diagnosis'/'salvage' session artifact) — they almost always belong as a subsection or support file under a class-level umbrella.
|
|
190
190
|
5. Iterate. After one consolidation round, scan the remaining set and look for the NEXT umbrella opportunity. Don't stop after 3 merges.
|
|
191
191
|
|
|
192
|
-
Your
|
|
193
|
-
- skill_manage action=list / review — read the current landscape.
|
|
194
|
-
- skill_manage action=patch — add sections to the umbrella.
|
|
195
|
-
- skill_manage action=create — create a new umbrella SKILL.md.
|
|
196
|
-
- skill_manage action=write_file — add a references/, templates/, or scripts/ file under an existing skill (the skill must already exist).
|
|
197
|
-
- skill_manage action=delete — archive a skill. MUST pass absorbed_into=<umbrella> when you've merged its content into another skill, or absorbed_into="" when you're truly pruning with no forwarding target.
|
|
198
|
-
- skill_manage action=consolidate — merge source bodies into a target and archive the sources when patching by hand is error-prone.
|
|
199
|
-
- skill_manage action=restore — bring one archived skill back (recoverability is the archive's contract).
|
|
200
|
-
- For moving support files, keep it inside the skill tree: support files move via reading and writing through skill_manage write_file/remove_file.
|
|
192
|
+
You are a NOMINATOR, not an executor: this channel has NO tools. Your single deliverable is the structured YAML block below. Never narrate actions you did not take ("merged", "patched", "archived") — you are proposing, and the deterministic engine executes only names from the candidate pool it gave you. (A future execution view would expose skill_manage; today it does not.)
|
|
201
193
|
|
|
202
194
|
'keep' is a legitimate decision ONLY when the skill is already a class-level umbrella and none of the proposed merges would improve discoverability. 'This is narrow but distinct from its siblings' is NOT a reason to keep — it's a reason to move it under an umbrella as a subsection or support file.
|
|
203
195
|
|
|
@@ -205,7 +197,7 @@ Expected output: real umbrella-ification. Process every obvious cluster. If you
|
|
|
205
197
|
|
|
206
198
|
Keep the umbrella body tight and scannable: exact commands, verbatim paths, ~100-200 lines; never invent flags or APIs.
|
|
207
199
|
|
|
208
|
-
When done, write a human summary
|
|
200
|
+
When done, write a human summary THEN the structured machine-readable block. The block is the contract: every skill you would move to .archive/ MUST appear in exactly one of the two lists. Return ONLY the YAML block after the summary — no post-block prose. Format EXACTLY:
|
|
209
201
|
|
|
210
202
|
## Structured summary (required)
|
|
211
203
|
\`\`\`yaml
|
|
@@ -218,7 +210,7 @@ prunings:
|
|
|
218
210
|
reason: <one short sentence — why archived with no merge target>
|
|
219
211
|
\`\`\`
|
|
220
212
|
|
|
221
|
-
Every skill you
|
|
213
|
+
Every skill you would move to .archive/ MUST appear in exactly one of the two lists. If you consolidated X into umbrella Y (patched Y, wrote a references file to Y, or created Y with X's content absorbed), X goes under consolidations with into: Y. If you archived X with no absorption — truly stale, irrelevant, or obsolete — X goes under prunings. Leave a list empty (consolidations: []) if none. Do not omit the block. The block comes AFTER your human-readable summary of clusters processed, patches made, and decisions left alone.`;
|
|
222
214
|
const COMPLETION_SKILL_REVIEW_PROMPT = `[Auto-review — Skills · task complete]
|
|
223
215
|
Your current task now appears complete. Before wrapping up, review the approach and update the skill library via skill_manage.
|
|
224
216
|
|
|
@@ -235,18 +227,25 @@ Do NOT modify output files or re-run the task. If you are still mid-task, ignore
|
|
|
235
227
|
const SKILLS_GUIDANCE = `Skills guidance:
|
|
236
228
|
• After completing a complex task (5+ tool calls), fixing a tricky error, or discovering a non-trivial workflow, save the approach as a skill with skill_manage so you can reuse it next time.
|
|
237
229
|
• When using a skill and finding it outdated, incomplete, or wrong, patch it immediately with skill_manage (action='patch') — don't wait to be asked. Skills that aren't maintained become liabilities.`;
|
|
230
|
+
const PLAN_CHANNEL_NOTE = `
|
|
231
|
+
|
|
232
|
+
CHANNEL (subagent): this review channel mounts only the read-only \`skill\` tool — you have NO \`skill_manage\`, NO \`memory\`. Your deliverable is the structured JSON plan below (outputSchema). Describe the patches/creates you RECOMMEND in the plan; never narrate actions you took.`;
|
|
233
|
+
/** Subagent-channel variant: same review policy, channel-limited deliverable (M-2). */
|
|
234
|
+
const SKILL_REVIEW_PLAN_PROMPT = `${SKILL_REVIEW_PROMPT}${PLAN_CHANNEL_NOTE}`;
|
|
235
|
+
/** Subagent-channel variant of the combined review (M-2). */
|
|
236
|
+
const COMBINED_REVIEW_PLAN_PROMPT = `${COMBINED_REVIEW_PROMPT}${PLAN_CHANNEL_NOTE}`;
|
|
238
237
|
function sha256(text) {
|
|
239
238
|
return createHash("sha256").update(text).digest("hex");
|
|
240
239
|
}
|
|
241
240
|
function createPromptBundle(prompts) {
|
|
242
241
|
const canonical = JSON.stringify({
|
|
243
242
|
id: PROMPT_BUNDLE_ID,
|
|
244
|
-
version:
|
|
243
|
+
version: 6,
|
|
245
244
|
prompts: Object.fromEntries(Object.entries(prompts).sort())
|
|
246
245
|
});
|
|
247
246
|
return Object.freeze({
|
|
248
247
|
id: PROMPT_BUNDLE_ID,
|
|
249
|
-
version:
|
|
248
|
+
version: 6,
|
|
250
249
|
prompts: Object.freeze({ ...prompts }),
|
|
251
250
|
sha256: sha256(canonical)
|
|
252
251
|
});
|
|
@@ -255,6 +254,8 @@ createPromptBundle({
|
|
|
255
254
|
memory: MEMORY_REVIEW_PROMPT,
|
|
256
255
|
skill: SKILL_REVIEW_PROMPT,
|
|
257
256
|
combined: COMBINED_REVIEW_PROMPT,
|
|
257
|
+
skillPlan: SKILL_REVIEW_PLAN_PROMPT,
|
|
258
|
+
combinedPlan: COMBINED_REVIEW_PLAN_PROMPT,
|
|
258
259
|
curator: CURATOR_PROMPT,
|
|
259
260
|
completion: COMPLETION_SKILL_REVIEW_PROMPT,
|
|
260
261
|
skillsGuidance: SKILLS_GUIDANCE
|
|
@@ -354,8 +355,8 @@ function parseState(raw) {
|
|
|
354
355
|
try {
|
|
355
356
|
const parsed = JSON.parse(raw);
|
|
356
357
|
return {
|
|
357
|
-
skills: typeof parsed.skills === "object" ? parsed.skills : {},
|
|
358
|
-
sessions: typeof parsed.sessions === "object" ? parsed.sessions : {}
|
|
358
|
+
skills: typeof parsed.skills === "object" && !Array.isArray(parsed.skills) ? parsed.skills : {},
|
|
359
|
+
sessions: typeof parsed.sessions === "object" && !Array.isArray(parsed.sessions) ? parsed.sessions : {}
|
|
359
360
|
};
|
|
360
361
|
} catch {
|
|
361
362
|
return {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-evolution-feedback",
|
|
3
3
|
"description": "Feedback-to-quality scoring for self-evolution (community build)",
|
|
4
|
-
"version": "0.1.0-rc.
|
|
4
|
+
"version": "0.1.0-rc.64",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
|
|
39
39
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
40
|
-
"@lmzhen/dsh-evolution-io": "^0.1.0-rc.
|
|
41
|
-
"@lmzhen/dsh-skill-usage": "^0.1.0-rc.
|
|
40
|
+
"@lmzhen/dsh-evolution-io": "^0.1.0-rc.64",
|
|
41
|
+
"@lmzhen/dsh-skill-usage": "^0.1.0-rc.64"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
|
|
45
|
-
"@lmzhen/dsh-evolution-io": "^0.1.0-rc.
|
|
46
|
-
"@lmzhen/dsh-evolution-io-node": "^0.1.0-rc.
|
|
47
|
-
"@lmzhen/dsh-skill-usage": "^0.1.0-rc.
|
|
45
|
+
"@lmzhen/dsh-evolution-io": "^0.1.0-rc.64",
|
|
46
|
+
"@lmzhen/dsh-evolution-io-node": "^0.1.0-rc.64",
|
|
47
|
+
"@lmzhen/dsh-skill-usage": "^0.1.0-rc.64"
|
|
48
48
|
}
|
|
49
49
|
}
|