每日备份 2026-06-10 12:57:13

This commit is contained in:
root-backup committed 2026-06-10 12:57:14 +08:00
1 parent fda2ccb8c2
commit 3d2e638c6a
244 files changed
+58890 -3

No files matched your search

@@ -0,0 +1,66 @@
# Domain Config for: [skill-name]
Fill this template when extracting domain from a target skill. Use the extracted values to parameterize LEARNINGS.md, ERRORS.md, FEATURE_REQUESTS.md, and EVOLUTION.md.
## Capability & Scenario Analysis (before extraction)
**Capabilities** (what the skill does):
- Primary outputs:
- Secondary/edge capabilities:
- Dependencies:
**Scenarios** (when and how it is used):
- User personas:
- Typical tasks:
- Input/output patterns:
**Evolution directions** (what can improve):
- User feedback patterns:
- Failure modes:
- Recurring corrections → domain rules:
---
## Domain
- **Name**: (human-readable domain name, e.g., 洗稿能手, 电脑加速)
- **Use cases**: (comma-separated scenarios, e.g., 科普、汇报、直播)
- **Areas**: (domain-specific areas for filtering, e.g., 文案 | 口播 | 短视频脚本)
- **Language**: (target language for generated files: zh | en)
## Learning Triggers (user feedback phrases)
Phrases that indicate user correction or style mismatch → log to LEARNINGS.md:
- "phrase1"
- "phrase2"
- "phrase3"
## Error Triggers (failure modes)
Situations that indicate operation failure → log to ERRORS.md:
- failure1
- failure2
- failure3
## Promotion Targets
Files to promote learnings to when they prove broadly applicable:
- **专属进化规则**: [skill-name]-专属进化规则.md
- **最佳实践 / 安全规范**: [skill-name]-最佳实践.md (or [skill-name]-安全规范.md)
## Domain Categories (optional)
If the skill needs categories beyond correction | insight | knowledge_gap | best_practice:
- category1
- category2
## Notes
- Use kebab-case for skill-name in file paths
- Areas should partition the skill's output/workflow scope
- Add 3+ learning triggers and 2+ error triggers for effective capture
- Storage: same as self-improving-agent — `.learnings/` directly (LEARNINGS.md, ERRORS.md, FEATURE_REQUESTS.md)
@@ -0,0 +1,50 @@
# Errors Log
{DOMAIN_DESCRIPTION}
**Areas**: {DOMAIN_AREAS}
**Statuses**: pending | in_progress | resolved | wont_fix
## Error Entry Format
Append entries in this format:
```markdown
## [ERR-YYYYMMDD-XXX] operation_or_error_type
**Logged**: ISO-8601 timestamp
**Priority**: high
**Status**: pending
**Area**: {DOMAIN_AREAS_EXAMPLE}
### Summary
Brief description of what failed
### Error
```
Actual error message or output
```
### Context
- Operation attempted
- Input or parameters used
- Environment details if relevant
### Suggested Fix
If identifiable, what might resolve this
### Metadata
- Reproducible: yes | no | unknown
- Related Files: path/to/file.ext
- See Also: ERR-YYYYMMDD-XXX (if recurring)
---
```
## Placeholders to Replace
- `{DOMAIN_DESCRIPTION}`: e.g., "Operation failures, exceptions, and unexpected behaviors for [skill-name]."
- `{DOMAIN_AREAS}`: e.g., "文案 | 口播 | 短视频脚本" or "系统优化 | 卡顿 | 报错"
- `{DOMAIN_AREAS_EXAMPLE}`: One example area from the list
---
@@ -0,0 +1,100 @@
# [Skill Name] Evolution Rules
Domain-specific self-improvement rules for [skill-name]. Log learnings and errors to `.learnings/`; promote proven patterns to the targets below. **Evolution is driven by user feedback.**
## Quick Reference
| Situation | Action |
|-----------|--------|
| {LEARNING_TRIGGER_1} | Log to `.learnings/LEARNINGS.md` with category `correction` or `style_mismatch` |
| {LEARNING_TRIGGER_2} | Log to `.learnings/LEARNINGS.md` |
| {ERROR_TRIGGER_1} | Log to `.learnings/ERRORS.md` |
| {ERROR_TRIGGER_2} | Log to `.learnings/ERRORS.md` |
| User wants missing capability | Log to `.learnings/FEATURE_REQUESTS.md` |
| Pattern proven across 3+ instances | Promote to {PROMOTION_TARGET_1} |
| Safety/correctness rule | Promote to {PROMOTION_TARGET_2} |
## Review → Apply → Report Loop
**Before task**: Load relevant entries from `.learnings/LEARNINGS.md` (and ERRORS.md if applicable). Filter by area, tags, or keywords.
**During task**: Apply learnings when relevant. Optionally annotate: "本次参考了 [LRN-xxx]: ..." (or equivalent in target language).
**After task**: Tell user which learnings were used, what evolution result, what improvement. Decide per-use mention vs end-of-task summary based on context.
## Detection Triggers
### Learning Triggers (→ LEARNINGS.md)
- {LEARNING_TRIGGER_1}
- {LEARNING_TRIGGER_2}
- {LEARNING_TRIGGER_3}
- User provides correction or preference
- Better approach discovered for recurring task
### Error Triggers (→ ERRORS.md)
- {ERROR_TRIGGER_1}
- {ERROR_TRIGGER_2}
- {ERROR_TRIGGER_3}
- Operation fails unexpectedly
- Unexpected output or behavior
## Domain Activation Conditions (for hooks)
When to remind the agent to check learnings:
- {ACTIVATION_CONDITION_1}
- {ACTIVATION_CONDITION_2}
## Promotion Decision Tree
```
Is the learning skill-specific?
├── Yes → Keep in .learnings/
└── No → Is it style/behavior-related?
├── Yes → Promote to {PROMOTION_TARGET_1}
└── No → Is it safety/correctness-related?
├── Yes → Promote to {PROMOTION_TARGET_2}
└── No → Promote to {PROMOTION_TARGET_1}
```
## Experience Invalidation & Update
When user corrects again after a learning was applied:
- Add `Contradicted-By: LRN-YYYYMMDD-XXX` to the original entry
- Mark `Status: superseded` or `Last-Valid: YYYY-MM-DD` if the learning is no longer valid
- Increment `Recurrence-Count` if the pattern recurs but the fix is different
## Area Tags
| Area | Scope |
|------|-------|
| {AREA_1} | {AREA_1_SCOPE} |
| {AREA_2} | {AREA_2_SCOPE} |
| {AREA_3} | {AREA_3_SCOPE} |
## Priority Guidelines
| Priority | When to Use |
|----------|-------------|
| `critical` | Blocks core functionality, safety risk |
| `high` | Significant impact, affects common workflows |
| `medium` | Moderate impact, workaround exists |
| `low` | Minor inconvenience, edge case |
## Promotion Targets
- **{PROMOTION_TARGET_1}**: Evolution rules, style preferences, best practices
- **{PROMOTION_TARGET_2}**: Safety guidelines, correctness rules (if applicable)
## Placeholders to Replace
- `[skill-name]`, `[Skill Name]`: Domain name
- `{LEARNING_TRIGGER_1}`, `{LEARNING_TRIGGER_2}`, `{LEARNING_TRIGGER_3}`: User feedback phrases from domain config
- `{ERROR_TRIGGER_1}`, `{ERROR_TRIGGER_2}`, `{ERROR_TRIGGER_3}`: Failure modes from domain config
- `{ACTIVATION_CONDITION_1}`, `{ACTIVATION_CONDITION_2}`: Domain-specific activation (e.g., "User says 改得不通顺", "Optimization reported无效")
- `{PROMOTION_TARGET_1}`, `{PROMOTION_TARGET_2}`: e.g., `[skill-name]-专属进化规则.md`, `[skill-name]-最佳实践.md`
- `{AREA_1}`, `{AREA_2}`, `{AREA_3}`: Domain areas
- `{AREA_1_SCOPE}`, etc.: Brief scope description for each area
@@ -0,0 +1,45 @@
# Feature Requests
{DOMAIN_DESCRIPTION}
**Areas**: {DOMAIN_AREAS}
**Statuses**: pending | in_progress | resolved | wont_fix
## Feature Request Entry Format
Append entries in this format:
```markdown
## [FEAT-YYYYMMDD-XXX] capability_name
**Logged**: ISO-8601 timestamp
**Priority**: medium
**Status**: pending
**Area**: {DOMAIN_AREAS_EXAMPLE}
### Requested Capability
What the user wanted to do
### User Context
Why they needed it, what problem they're solving
### Complexity Estimate
simple | medium | complex
### Suggested Implementation
How this could be built, what it might extend
### Metadata
- Frequency: first_time | recurring
- Related Features: existing_feature_name
---
```
## Placeholders to Replace
- `{DOMAIN_DESCRIPTION}`: e.g., "Capabilities requested by user that don't currently exist for [skill-name]."
- `{DOMAIN_AREAS}`: e.g., "文案 | 口播 | 短视频脚本" or "系统优化 | 卡顿 | 报错"
- `{DOMAIN_AREAS_EXAMPLE}`: One example area from the list
---
@@ -0,0 +1,62 @@
# Learnings
{DOMAIN_DESCRIPTION}
**Categories**: {DOMAIN_CATEGORIES}
**Areas**: {DOMAIN_AREAS}
**Statuses**: pending | in_progress | resolved | wont_fix | promoted | promoted_to_skill | superseded
## Status Definitions
| Status | Meaning |
|--------|---------|
| `pending` | Not yet addressed |
| `in_progress` | Actively being worked on |
| `resolved` | Issue fixed or knowledge integrated |
| `wont_fix` | Decided not to address (reason in Resolution) |
| `promoted` | Elevated to {PROMOTION_TARGETS} |
| `promoted_to_skill` | Extracted as a reusable skill |
| `superseded` | User corrected again; this learning is no longer valid |
## Learning Entry Format
Append entries in this format:
```markdown
## [LRN-YYYYMMDD-XXX] category
**Logged**: ISO-8601 timestamp
**Priority**: low | medium | high | critical
**Status**: pending
**Area**: {DOMAIN_AREAS_EXAMPLE}
### Summary
One-line description of what was learned
### Details
Full context: what happened, what was wrong, what's correct
### Suggested Action
Specific fix or improvement to make
### Metadata
- Source: conversation | error | user_feedback
- Related Files: path/to/file.ext
- Tags: tag1, tag2
- See Also: LRN-YYYYMMDD-XXX (if related to existing entry)
- Recurrence-Count: 1 (optional, bump when pattern recurs)
- Last-Valid: YYYY-MM-DD (optional, when user contradicted)
- Contradicted-By: LRN-YYYYMMDD-XXX (optional, when superseded)
---
```
## Placeholders to Replace
- `{DOMAIN_DESCRIPTION}`: e.g., "Corrections, insights, and style preferences captured for [skill-name]."
- `{DOMAIN_CATEGORIES}`: e.g., "correction | insight | knowledge_gap | best_practice | style_mismatch | scene_adaptation"
- `{DOMAIN_AREAS}`: e.g., "文案 | 口播 | 短视频脚本" or "系统优化 | 卡顿 | 报错"
- `{DOMAIN_AREAS_EXAMPLE}`: One example area from the list
- `{PROMOTION_TARGETS}`: e.g., "[skill-name]-专属进化规则.md, [skill-name]-最佳实践.md"
---