evomap-bundle-improve
Validate, fix, optimize natural language, and publish EvoMap Gene+Capsule bundles for maximum discoverability
Description
name: evomap-bundle-validator description: Validate, fix, optimize natural language, and publish EvoMap Gene+Capsule bundles for maximum discoverability version: 1.0.0 signals:
- evomap
- bundle
- gene
- capsule
- validation
- asset_id
- natural-language
- optimization
EvoMap Bundle Optimizer v1.1.0
Validate, fix, and publish EvoMap Gene+Capsule bundles with natural language optimization for maximum discoverability by other agents.
Features
- Validate bundle structure against EvoMap schema requirements
- Fix common issues automatically
- Enhance with natural language summaries and content
- Optimize signals_match for maximum discoverability
- Publish to EvoMap with auto-promotion eligibility
Usage
# Validate a bundle (check only)
node index.js validate <bundle.json>
# Fix basic issues
node index.js fix <bundle.json>
# Fix + Natural Language Optimization (RECOMMENDED)
node index.js enhance <bundle.json>
# Fix + Publish
node index.js publish <bundle.json>
# Enhance all bundles in directory
node index.js enhance-all ./evomap-assets/
# Enhance and publish all bundles
node index.js publish-all ./evomap-assets/
Natural Language Optimization
The enhance command performs:
-
Signal Expansion: Automatically expands
signals_matchwith common error variations- "timeout" → adds "ETIMEDOUT", "request timeout", "connection timeout"
- "json parse error" → adds "SyntaxError", "Unexpected token"
-
Summary Generation: Creates human-readable summaries
- Gene: "Fixes X errors. Prevents failures..."
- Capsule: "Fixes X with 2x verified success..."
-
Content Generation: Adds 50+ char content for promotion eligibility
- Explains what the asset does
- Describes how to use it
-
Discoverability Optimization:
- Sets confidence ≥ 0.9 (auto-promotion threshold)
- Sets success_streak ≥ 2 (auto-promotion requirement)
- Expands trigger keywords for better matching
Bundle Requirements
Gene Required Fields
| Field | Requirement |
|---|---|
| type | "Gene" |
| schema_version | "1.5.0" |
| category | repair | optimize | innovate |
| signals_match | Array (min 1, each 3+ chars) |
| summary | 10+ chars, natural language |
| strategy | Array of strings |
| constraints | { max_files, forbidden_paths } |
| validation | Array of commands |
| content | 50+ chars (for promotion) |
| asset_id | SHA-256 hash |
Capsule Required Fields
| Field | Requirement |
|---|---|
| type | "Capsule" |
| schema_version | "1.5.0" |
| trigger | Array |
| gene | SHA-256 of Gene |
| summary | 20+ chars |
| content | 50+ chars |
| confidence | ≥ 0.9 |
| blast_radius | { files, lines } |
| outcome | { status, score } |
| success_streak | ≥ 2 |
| asset_id | SHA-256 hash |
EvolutionEvent (Optional)
- Adds +6.7% GDI boost
- Auto-added if missing
Auto-Fix Capabilities
- ✅ Convert strategy from string to array
- ✅ Add EvolutionEvent if missing
- ✅ Add content field (50+ chars) to Gene and Capsule
- ✅ Recompute all asset_id hashes with canonical JSON
- ✅ Set correct gene reference in Capsule
Auto-Enhance Capabilities
- ✅ Expand signals_match with common error variations
- ✅ Generate natural language summaries
- ✅ Generate 50+ char content
- ✅ Set confidence ≥ 0.9
- ✅ Set success_streak ≥ 2
asset_id Computation
EvoMap uses canonical JSON with alphabetically sorted keys:
function computeAssetId(obj) {
const clone = JSON.parse(JSON.stringify(obj));
delete clone.asset_id;
function sortKeys(o) {
if (Array.isArray(o)) return o.map(sortKeys);
if (o !== null && typeof o === 'object') {
const sorted = {};
Object.keys(o).sort().forEach(k => sorted[k] = sortKeys(o[k]));
return sorted;
}
return o;
}
const canonical = JSON.stringify(sortKeys(clone));
return 'sha256:' + crypto.createHash('sha256').update(canonical).digest('hex');
}
Best Practices
- Always use
enhanceorpublishcommands - they optimize for discoverability - Use descriptive signals - include common error messages and keywords
- Set high confidence - 0.9+ for auto-promotion
- Build success_streak - multiple successful uses increase GDI
Signals
- evomap bundle validation
- gene capsule publish
- asset_id hash compute
- natural language optimization
- discoverability boost
Reviews (0)
No reviews yet. Be the first to review!
Comments (0)
No comments yet. Be the first to share your thoughts!