用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/terrylica/cc-skills --skill symmetric-dogfooding命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | symmetric-dogfooding |
| description | Bidirectional integration validation where two repositories validate each other before release. |
| allowed-tools | Read, Bash, Write, Edit, Grep, Glob |
Bidirectional integration validation pattern where two repositories each consume the other for testing, ensuring both sides work correctly together before downstream adoption.
Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.
┌─────────────────────────────────────────────────────────────────┐
│ SYMMETRIC DOGFOODING │
│ │
│ Repo A ◄─────── mutual validation ───────► Repo B │
│ │
│ EXPORTS: EXPORTS: │
│ - Library/API - Library/API │
│ - Data structures - Data structures │
│ │
│ VALIDATES WITH: VALIDATES WITH: │
│ - Repo B real outputs - Repo A real outputs │
│ - Production-like data - Production-like data │
│ │
└─────────────────────────────────────────────────────────────────┘
Use this skill when:
1. Identify integration surface (exports from A consumed by B and vice versa)
2. Document data formats, schemas, API signatures at boundary
3. Configure cross-repo dev dependencies in both repos
4. Pin versions explicitly (tags or SHAs, never main)
5. Create integration/ test directory in both repos
6. Write bidirectional validation tests (A validates with B outputs, B validates with A outputs)
7. Add validation tasks to mise.toml or Makefile
8. Document pre-release protocol in both CLAUDE.md files
9. Run full symmetric validation to verify setup
10. Verify against Symmetric Dogfooding Checklist below
1. Run validate:symmetric task in releasing repo
2. Check if other repo has pending changes affecting integration
3. If yes, test against other repo's feature branch
4. Document any failures in validation log
5. Fix integration issues before release
6. Update version pins after successful validation
7. Coordinate if breaking changes require simultaneous release
8. Verify against Symmetric Dogfooding Checklist below
1. Identify new export/import being added
2. Update integration surface documentation
3. Add tests in both repos for new integration point
4. Run symmetric validation in both directions
5. Update version pins if needed
6. Verify against Symmetric Dogfooding Checklist below
After ANY symmetric dogfooding work, verify:
After modifying THIS skill:
Identify the integration surface:
Map validation scenarios:
Configure cross-repo dev dependencies:
Python (uv/pip):
# Repo A pyproject.toml
[project.optional-dependencies]
validation = ["repo-b"]
[tool.uv.sources]
repo-b = { git = "https://github.com/org/repo-b", tag = "<tag>" } # SSoT-OK
# Repo B pyproject.toml
[project.optional-dependencies]
validation = ["repo-a"]
[tool.uv.sources]
repo-a = { git = "https://github.com/org/repo-a", tag = "<tag>" } # SSoT-OK
Rust (Cargo):
[dev-dependencies]
repo-b = { git = "https://github.com/org/repo-b", tag = "<tag>" } # SSoT-OK
Node.js:
{
"devDependencies": {
"repo-b": "github:org/repo-b#<tag>"
}
}
Critical: Pin to tags or commit SHAs. Never use main/master branches.
Directory structure in both repos:
repo-a/
└── tests/
├── unit/ # Internal tests
└── integration/ # Tests using repo-b real outputs
└── test_with_repo_b.py
repo-b/
└── tests/
├── unit/ # Internal tests
└── integration/ # Tests using repo-a real outputs
└── test_with_repo_a.py
Bidirectional validation test pattern:
# repo-a/tests/integration/test_with_repo_b.py
"""Validate Repo A outputs work correctly with Repo B inputs."""
def test_a_output_consumed_by_b():
# Generate output using Repo A
a_output = repo_a.generate_data()
# Feed to Repo B - should work without errors
b_result = repo_b.process(a_output)
# Validate the round-trip
assert b_result.is_valid()
mise.toml example:
[tasks."validate:symmetric"]
description = "Validate against partner repo"
run = """
uv sync --extra validation
uv run pytest tests/integration/ -v
"""
[tasks."validate:pre-release"]
description = "Full validation before release"
depends = ["test:unit", "validate:symmetric"]
Before releasing Repo A:
validate:symmetric in Repo A (tests against current Repo B)Before releasing Repo B:
validate:symmetric in Repo B (tests against current Repo A)Coordinating breaking changes:
| Anti-Pattern | Problem | Solution |
|---|---|---|
| One-direction only | Misses half the bugs | Always test both directions |
| Using main branch | Unstable, breaks randomly | Pin to tags or SHAs |
| Skipping for small changes | Small changes cause big breaks | Always run full validation |
| Mocking partner repo | Defeats the purpose | Use real imports |
| Ignoring version matrix | Silent production failures | Maintain compatibility matrix |
External:
| Issue | Cause | Solution |
|---|---|---|
| Dependency resolution fails | Version pin outdated | Update tag/SHA pin to latest stable version |
| Tests pass locally fail CI | Different partner repo version | Pin exact same version in both environments |
| Breaking change not caught | One-direction testing only | Run validate:symmetric in BOTH repos |
| Integration surface unclear | Undocumented exports | Map all imports/exports before setting up tests |
| Too many parts moving | Uncoordinated releases | Coordinate breaking changes, test branches first |
| Mock data hiding bugs | Using stubs instead of real | Always import real partner repo for integration |
| Version matrix explosion | Too many combinations | Limit support to N-1 versions, document clearly |
| Circular dependency | Both repos require each other | Use optional-dependencies for validation only |
After this skill completes, reflect before closing the task:
Do NOT defer. The next invocation inherits whatever you leave behind.