legacy-bridge
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLegacy Bridge
Legacy Bridge(旧版兼容桥接工具)
Quick Navigation: Level 1: Quick Start (5 min) → Level 2: Implementation (30 min) → Level 3: Mastery (Extended)
Level 1: Quick Start
第一阶段:快速入门
Overview
概述
The legacy-bridge skill provides backward compatibility for existing patterns used in CLAUDE.md and the product-matrix system. This bridge enables a zero-breaking-change migration path from the legacy standards loader to the new Skills-based architecture.
@loadMigration Timeline: 6-month transition period (deprecation warnings only, no breaking changes)
legacy-bridge Skill为CLAUDE.md和产品矩阵系统中使用的现有模式提供向后兼容支持。该桥接工具实现了从旧版标准加载器到新的基于Skills的架构的零破坏性变更迁移路径。
@load迁移时间线:6个月过渡周期(仅显示弃用警告,无破坏性变更)
When to Use
适用场景
Use this skill when:
- You have existing code using patterns
@load product:* - You need to maintain backward compatibility during migration
- You want to gradually transition to the new Skills format
在以下场景中使用该Skill:
- 您的现有代码使用模式
@load product:* - 您需要在迁移期间保持向后兼容
- 您希望逐步过渡到新的Skills格式
Quick Reference
快速参考对照表
| Legacy Pattern | New Skill Loading |
|---|---|
| |
| |
| |
| 旧版模式 | 新Skill加载方式 |
|---|---|
| |
| |
| |
Level 2: Implementation
第二阶段:实现细节
Pattern Translation
模式转换
The legacy-bridge automatically translates old patterns to new skill loads:
@loadlegacy-bridge会自动将旧的模式转换为新的Skill加载方式:
@loadProduct Type Patterns
产品类型模式
bash
undefinedbash
undefinedOld Pattern → New Skill Loading
旧版模式 → 新Skill加载方式
@load product:api → Load: [coding-standards, testing, security, devops]
@load product:web-service → Load: [coding-standards, testing, security, frontend, devops]
@load product:frontend-web → Load: [frontend, testing, security]
undefined@load product:api → 加载:[coding-standards, testing, security, devops]
@load product:web-service → 加载:[coding-standards, testing, security, frontend, devops]
@load product:frontend-web → 加载:[frontend, testing, security]
undefinedStandard Code Patterns
标准代码模式
bash
undefinedbash
undefinedCoding Standards (CS)
编码标准(CS)
@load CS:python → Load: skills/coding-standards/python
@load CS:javascript → Load: skills/coding-standards/javascript
@load CS:python → 加载:skills/coding-standards/python
@load CS:javascript → 加载:skills/coding-standards/javascript
Testing Standards (TS)
测试标准(TS)
@load TS:pytest → Load: skills/testing/pytest
@load TS:* → Load: skills/testing/* (all testing skills)
@load TS:pytest → 加载:skills/testing/pytest
@load TS:* → 加载:skills/testing/*(所有测试Skill)
Security Standards (SEC)
安全标准(SEC)
@load SEC:auth → Load: skills/security/authentication
@load SEC:* → Load: skills/security/* + NIST-IG:base
undefined@load SEC:auth → 加载:skills/security/authentication
@load SEC:* → 加载:skills/security/* + NIST-IG:base
undefinedComposite Patterns
复合模式
bash
undefinedbash
undefinedMultiple standards combined
组合多个标准
@load [product:api + CS:python + TS:pytest]
→ Load: product:api skills + python coding + pytest testing
undefined@load [product:api + CS:python + TS:pytest]
→ 加载:product:api相关Skills + Python编码标准 + Pytest测试标准
undefinedWildcard Expansion
通配符扩展
The bridge automatically expands wildcards:
yaml
SEC:* expands to:
- SEC:auth
- SEC:secrets
- SEC:input-validation
- NIST-IG:base # Auto-included with security
TS:* expands to:
- TS:unit
- TS:integration
- TS:e2e该桥接工具会自动扩展通配符:
yaml
SEC:* 扩展为:
- SEC:auth
- SEC:secrets
- SEC:input-validation
- NIST-IG:base # 随安全标准自动包含
TS:* 扩展为:
- TS:unit
- TS:integration
- TS:e2eAuto-Inclusion Rules
自动包含规则
NIST Baseline Auto-Loading:
- Any security standard () automatically includes
SEC:*NIST-IG:base - Explicit override available with flag
--no-auto-nist
NIST基线自动加载:
- 任何安全标准()都会自动包含
SEC:*NIST-IG:base - 可使用标志进行显式覆盖
--no-auto-nist
Level 3: Mastery Resources
第三阶段:精通进阶资源
Migration Guide
迁移指南
Phase 1: Compatibility Mode (Current)
第一阶段:兼容模式(当前阶段)
Both patterns work side-by-side:
bash
undefined两种模式可同时使用:
bash
undefinedLegacy pattern (still works)
旧版模式(仍可正常使用)
@load product:api
@load product:api
New skill pattern (recommended)
新Skill模式(推荐使用)
skill-loader.py load product:api
undefinedskill-loader.py load product:api
undefinedPhase 2: Deprecation Warnings (Month 3-6)
第二阶段:弃用警告(第3-6个月)
Deprecation warnings will appear in logs.
日志中会显示弃用警告。
Phase 3: Legacy Removal (Month 6+)
第三阶段:移除旧版语法(第6个月之后)
Legacy syntax will be removed. Migration guide available.
旧版语法将被移除。迁移指南已备好。
Migration Tools
迁移工具
bash
undefinedbash
undefinedScan codebase for legacy patterns
扫描代码库中的旧版模式
skill-loader.py audit-legacy --path .
skill-loader.py audit-legacy --path .
Generate migration report
生成迁移报告
skill-loader.py migration-report --output migration-plan.md
skill-loader.py migration-report --output migration-plan.md
Auto-migrate files (with backup)
自动迁移文件(带备份)
skill-loader.py migrate --path . --backup
undefinedskill-loader.py migrate --path . --backup
undefinedRelated Skills
相关Skills
- skill-loader - New skill loading mechanism
- coding-standards - Base coding standards
- security-practices - Security implementations
- skill-loader - 新的Skill加载机制
- coding-standards - 基础编码标准
- security-practices - 安全实践实现
External Resources
外部资源
- - Complete mapping definitions
resources/legacy-mappings.yaml - - Original product definitions
config/product-matrix.yaml - - Migration examples
examples/legacy-patterns/
- - 完整的映射定义
resources/legacy-mappings.yaml - - 原始产品定义
config/product-matrix.yaml - - 迁移示例
examples/legacy-patterns/