This Skill is distilled based on the Gene Evolution Protocol (GEP) into 8 domain Genes + 1 evolution control Gene, each ~200-300 tokens, directly controlling behavior rather than explaining documentation. It supports the GEP three-layer structure (Gene / Capsule / Event) and the six-step evolution loop.
Gene Registry
| gene_id | Trigger Signal | File |
|---|---|---|
gene_cross_platform |
Cross-platform compatibility, dual-track, original platform | genes/gene_cross_platform.md |
gene_template |
template, wx:class, wx:style, wx:ref, basic components | genes/gene_template.md |
gene_style_selector |
selector, selectors, single class, compound, pseudo | genes/gene_style_selector.md |
gene_style_property |
style, flex, rpx, font-weight, display-none | genes/gene_style_property.md |
gene_script |
script, lifecycle, mpx.xxx, api-proxy, selector-api | genes/gene_script.md |
gene_conditional_compile |
Conditional compilation, @mpx-if, @mode, mpx_mode | genes/gene_conditional_compile.md |
gene_text_overflow |
text-overflow, numberOfLines, hairlineWidth | genes/gene_text_overflow.md |
gene_json_config |
json, usingComponents, disableScroll, tabBar | genes/gene_json_config.md |
gene_evolution |
Evolution, evolution, capsule, event, GEP loop | genes/gene_evolution.md |
Scheduling Rules
Task 1: Perform RN cross-platform adaptation and transformation on existing Mpx components
Always load: gene_cross_platform + gene_conditional_compile
Load in SFC block order:
<template>→ Readgene_template<script>→ Readgene_script<style>→ Read in sequencegene_style_selector→gene_style_property→gene_text_overflow<script name="json">/ JSON config → Readgene_json_config
Wrap-up: Compilation validation → Return to the corresponding gene to fix based on error classification
Task 2: Create an Mpx component compliant with RN cross-platform compatibility from scratch
Always load: gene_cross_platform + gene_conditional_compile
Load all genes in parallel: Directly follow all gene constraints when writing
Wrap-up: Compilation validation → ESLint validation
Task 3: Gene Evolution (accumulation of adaptation experience)
Trigger Signal: Compilation failure / ESLint error / user feedback correction / adaptation solution ineffective
Load: gene_evolution
GEP six-step loop:
- Scan: Locate the root cause of the failure, collect error logs/user feedback
- Signal: Map to a specific gene_id (e.g., style incompatibility →
gene_style_property) - Intent: Determine the evolution type (repair / optimization / extension)
- Mutate: Modify the target Gene's Strategy or AVOID items
- Validate: Re-execute compilation validation to confirm the fix is effective
- Solidify: Write back to the Gene file + record Event (
events/) + record Capsule (capsules/)
Task 4: Consult existing experience (Capsule retrieval)
Trigger Signal: When encountering the same type of task, first consult capsules/CAPSULES.md for a referenceable successful path
Load: The Gene set recorded in the corresponding Capsule
Detailed Reference
When the strategy instructions in the gene are insufficient to solve a specific problem, consult the detailed reference documentation:
| Reference Documentation | Purpose |
|---|---|
| Template Capability Reference | Detailed support for basic component properties/events |
| Script Capability Reference | Detailed support for lifecycle/instance methods/composition API |
| Style Capability Reference | Item-by-item support status of style properties |
| Style Development Best Practices | Common style compatibility solutions |
| Environment API Reference | Support status of mpx.xxx APIs |
| JSON Configuration Reference | Page/component JSON configuration support |
| Conditional compilation | Conditional compilation syntax for each block |
| Single-file component | Basic structure of an Mpx SFC |
| Capsule registry | Verified successful execution paths |
| Event registry | Gene evolution changelog |