legacy-bridge

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Legacy Bridge

Legacy Bridge(旧版兼容桥接工具)

Quick Navigation: Level 1: Quick Start (5 min) → Level 2: Implementation (30 min) → Level 3: Mastery (Extended)

快速导航: 第一阶段:快速入门(5分钟)→ 第二阶段:实现指南(30分钟)→ 第三阶段:精通进阶(进阶内容)

Level 1: Quick Start

第一阶段:快速入门

Overview

概述

The legacy-bridge skill provides backward compatibility for existing
@load
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.
Migration Timeline: 6-month transition period (deprecation warnings only, no breaking changes)
legacy-bridge Skill为CLAUDE.md和产品矩阵系统中使用的现有
@load
模式提供向后兼容支持。该桥接工具实现了从旧版标准加载器到新的基于Skills的架构的零破坏性变更迁移路径。
迁移时间线:6个月过渡周期(仅显示弃用警告,无破坏性变更)

When to Use

适用场景

Use this skill when:
  • You have existing code using
    @load product:*
    patterns
  • 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 PatternNew Skill Loading
@load product:api
skill-loader.py load product:api
@load CS:python
skills/coding-standards/python
@load SEC:*
skills/security/*
+ NIST baseline

旧版模式新Skill加载方式
@load product:api
skill-loader.py load product:api
@load CS:python
skills/coding-standards/python
@load SEC:*
skills/security/*
+ NIST基线

Level 2: Implementation

第二阶段:实现细节

Pattern Translation

模式转换

The legacy-bridge automatically translates old
@load
patterns to new skill loads:
legacy-bridge会自动将旧的
@load
模式转换为新的Skill加载方式:

Product Type Patterns

产品类型模式

bash
undefined
bash
undefined

Old 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]
undefined

Standard Code Patterns

标准代码模式

bash
undefined
bash
undefined

Coding 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
undefined

Composite Patterns

复合模式

bash
undefined
bash
undefined

Multiple 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测试标准
undefined

Wildcard 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:e2e

Auto-Inclusion Rules

自动包含规则

NIST Baseline Auto-Loading:
  • Any security standard (
    SEC:*
    ) automatically includes
    NIST-IG:base
  • Explicit override available with
    --no-auto-nist
    flag

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
undefined

Legacy pattern (still works)

旧版模式(仍可正常使用)

@load product:api
@load product:api

New skill pattern (recommended)

新Skill模式(推荐使用)

skill-loader.py load product:api
undefined
skill-loader.py load product:api
undefined

Phase 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
undefined
bash
undefined

Scan 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
undefined
skill-loader.py migrate --path . --backup
undefined

Related 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

外部资源

  • resources/legacy-mappings.yaml
    - Complete mapping definitions
  • config/product-matrix.yaml
    - Original product definitions
  • examples/legacy-patterns/
    - Migration examples
  • resources/legacy-mappings.yaml
    - 完整的映射定义
  • config/product-matrix.yaml
    - 原始产品定义
  • examples/legacy-patterns/
    - 迁移示例