@lmzhen/dsh-evolution-feedback 0.1.0 → 0.2.0-rc.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.
Files changed (2) hide show
  1. package/lib/index.js +8 -5
  2. package/package.json +6 -6
package/lib/index.js CHANGED
@@ -250,7 +250,7 @@ async function readEvolutionTimeline(io, path) {
250
250
  * changes semantically: the bundle digest is the fail-closed signal for
251
251
  * review workers, so a stale id across deployments must be distinguishable.
252
252
  */
253
- const PROMPT_BUNDLE_ID = "dsh-evolution@7";
253
+ const PROMPT_BUNDLE_ID = "dsh-evolution@9";
254
254
  const MEMORY_REVIEW_PROMPT = `[Auto-review — Memory]
255
255
  Review the conversation above and consider saving to memory if appropriate.
256
256
 
@@ -281,7 +281,8 @@ Preference order — prefer the earliest action that fits, but do pick one when
281
281
  • templates/<name>.<ext> — starter files meant to be copied and modified (boilerplate configs, scaffolding, a known-good example the agent can reproduce with modifications).
282
282
  • scripts/<name>.<ext> — statically re-runnable actions the skill can invoke directly (verification scripts, fixture generators, deterministic probes, anything the agent should run rather than hand-type each time).
283
283
  Add support files via skill_manage action=write_file with file_path starting 'references/', 'templates/', or 'scripts/'. The umbrella's SKILL.md should gain a one-line pointer to any new support file so future agents know it exists.
284
- 4. CREATE A NEW CLASS-LEVEL UMBRELLA SKILL when no existing skill covers the class. The name MUST be at the class level. The name MUST NOT be a specific PR number, error string, feature codename, library-alone name, or 'fix-X / debug-Y / audit-Z-today' session artifact. If the proposed name only makes sense for today's task, it's wrong fall back to (1), (2), or (3).
284
+ 4. RESTRUCTURE a loaded skill whose body grew log-like rc/sha/date-dense sections, session-detail spirals, or a fat body with no support files. Use skill_manage action=restructure with restructure: [{"heading": "<the exact ## heading text>", "to_file": "references/<topic>.md"}] the ENTIRE ## section (from that heading to the next heading) moves into the support file and its position becomes a pointer line. The skill's name and directory never change. Only propose headings that exist verbatim in the body; never invent one, and never restructure a healthy small skill.
285
+ 5. CREATE A NEW CLASS-LEVEL UMBRELLA SKILL when no existing skill covers the class. The name MUST be at the class level. The name MUST NOT be a specific PR number, error string, feature codename, library-alone name, or 'fix-X / debug-Y / audit-Z-today' session artifact. If the proposed name only makes sense for today's task, it's wrong — fall back to (1), (2), or (3).
285
286
 
286
287
  User-preference embedding (important): when the user expressed a style/format/workflow preference, the update belongs in the SKILL.md body, not just in memory. Memory captures 'who the user is and what the current situation and state of your operations are'; skills capture 'how to do this class of task for this user'. When they complain about how you handled a task, the skill that governs that task needs to carry the lesson.
287
288
 
@@ -326,7 +327,8 @@ Preference order for skills — pick the earliest that fits:
326
327
  1. UPDATE A CURRENTLY-LOADED SKILL. Check what skills were loaded or read in the conversation. If one of them covers the learning, PATCH it first. It was in play; it's the right place.
327
328
  2. UPDATE AN EXISTING UMBRELLA. Patch it.
328
329
  3. ADD A SUPPORT FILE under an existing umbrella via skill_manage action=write_file. Three kinds: references/<topic>.md for session-specific detail OR condensed knowledge banks (quoted research, API docs excerpts, domain notes) written concise and task-focused; templates/<name>.<ext> for starter files meant to be copied and modified; scripts/<name>.<ext> for statically re-runnable actions (verification, fixture generators, probes). Add a one-line pointer in SKILL.md so future agents find them.
329
- 4. CREATE A NEW CLASS-LEVEL UMBRELLA when nothing exists. Name at the class level NOT a PR number, error string, codename, library-alone name, or 'fix-X / debug-Y' session artifact. If the name only fits today's task, fall back to (1), (2), or (3).
330
+ 4. RESTRUCTURE a loaded skill whose body grew log-like (rc/sha/date-dense sections, session-detail spirals, fat body with no support files) via skill_manage action=restructure with restructure: [{"heading": "<the exact ## heading text>", "to_file": "references/<topic>.md"}] the ENTIRE ## section moves into the support file and its position becomes a pointer line; the skill's name and directory never change. Only propose headings that exist verbatim in the body.
331
+ 5. CREATE A NEW CLASS-LEVEL UMBRELLA when nothing exists. Name at the class level — NOT a PR number, error string, codename, library-alone name, or 'fix-X / debug-Y' session artifact. If the name only fits today's task, fall back to (1), (2), or (3).
330
332
 
331
333
  Two-tier deposition discipline (DSH addition): classify before writing — PATTERN (symptom → mechanism → fix → verification) goes in the SKILL.md body; LOG (commit SHAs, npm/profile states, this release's change list, this session's narrative) goes in a references/ file. Body density IS reuse rate; a pattern fits in 2-8 physical lines.
332
334
 
@@ -392,6 +394,7 @@ When done, write a human summary THEN the structured machine-readable block. The
392
394
  \`\`\`yaml
393
395
  consolidations:
394
396
  - from: <old-skill-name>
397
+ mode: reference # optional — ONLY for a 'demote': source is narrow-but-valuable session detail, write it as references/<source>.md under the umbrella instead of appending to the body. Default is append. Place this line BEFORE into:. NEVER use reference when the source body links its own references/ templates/ scripts/ files.
395
398
  into: <umbrella-skill-name>
396
399
  reason: <one short sentence — why merged, not just 'similar'>
397
400
  prunings:
@@ -429,12 +432,12 @@ function sha256(text) {
429
432
  function createPromptBundle(prompts) {
430
433
  const canonical = JSON.stringify({
431
434
  id: PROMPT_BUNDLE_ID,
432
- version: 7,
435
+ version: 9,
433
436
  prompts: Object.fromEntries(Object.entries(prompts).sort())
434
437
  });
435
438
  return Object.freeze({
436
439
  id: PROMPT_BUNDLE_ID,
437
- version: 7,
440
+ version: 9,
438
441
  prompts: Object.freeze({ ...prompts }),
439
442
  sha256: sha256(canonical)
440
443
  });
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",
4
+ "version": "0.2.0-rc.1",
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",
41
- "@lmzhen/dsh-skill-usage": "^0.1.0"
40
+ "@lmzhen/dsh-evolution-io": "^0.2.0-rc.1",
41
+ "@lmzhen/dsh-skill-usage": "^0.2.0-rc.1"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
45
- "@lmzhen/dsh-evolution-io": "^0.1.0",
46
- "@lmzhen/dsh-evolution-io-node": "^0.1.0",
47
- "@lmzhen/dsh-skill-usage": "^0.1.0"
45
+ "@lmzhen/dsh-evolution-io": "^0.2.0-rc.1",
46
+ "@lmzhen/dsh-evolution-io-node": "^0.2.0-rc.1",
47
+ "@lmzhen/dsh-skill-usage": "^0.2.0-rc.1"
48
48
  }
49
49
  }