dcyfr-validation
Pre-completion validation checklists and approval gates
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
What I do
I ensure code meets quality gates before completion:
- Pre-completion checklist validation
- Approval gates for breaking changes
- Common failure patterns and fixes
- Escalation triggers for manual review
When to use me
✅ Use this skill when:
- Before marking work as complete
- Before creating pull requests
- Fixing validation failures
- Determining if manual review needed
❌ Don't use this skill for:
- Initial development (use during finalization)
- Exploratory work (validation comes later)
Pre-Completion Checklist
Standard Checklist (All Providers)
# 1. TypeScript compiles
npm run typecheck
# 2. ESLint passes
npm run lint
# 3. Tests pass (≥99% rate)
npm run test:run
# 4. Design tokens ≥90% compliance
npm run lint | grep "design-tokens"
Enhanced Checklist (OpenCode/GitHub Copilot)
Additional manual review required:
# 5. OpenCode-specific validation
npm run check:opencode
# Manual checks:
- [ ] Design tokens used (no hardcoded gap-8, text-3xl)
- [ ] Barrel imports used (no direct file imports)
- [ ] PageLayout used (unless ArticleLayout/ArchiveLayout justified)
- [ ] Test data has environment checks
- [ ] No emojis in public content
Approval Gates
When Manual Approval Required
- Breaking changes - API contracts, database schemas, public APIs
- Architecture decisions - New patterns, major refactors
- Security-sensitive - Auth, API keys, data access
- Performance impact - Database queries, bundle size
- External dependencies - New npm packages, third-party APIs
Approval Process
1. Create GitHub issue documenting change
2. Tag relevant reviewers (@architecture-team, @security-team)
3. Wait for approval before proceeding
4. Reference issue in PR description
Common Failure Patterns
TypeScript Errors
# Error: Type 'string | undefined' is not assignable to type 'string'
# Fix: Add type guard
if (!value) return null;
const safeValue: string = value;
ESLint Errors
# Error: @dcyfr/design-tokens/no-hardcoded-spacing
# Fix: Replace with design token
- className="gap-8"
+ className={`gap-${SPACING.content}`}
Test Failures
# Error: Test suite failing
# Fix: Update test expectations or fix implementation
npm run test:run -- --reporter=verbose
Escalation Triggers
Escalate to manual review if:
- ❌ Cannot fix validation errors
- ❌ Unsure if breaking change
- ❌ Security implications unclear
- ❌ Performance impact unknown
Validation Commands
# Full validation suite
npm run check
# OpenCode-enhanced validation
npm run check:opencode
# Auto-fix what's possible
npm run lint -- --fix
# Verify all tests pass
npm run test:run
Related Documentation
-
Validation checklist:
.github/agents/enforcement/VALIDATION_CHECKLIST.md -
Approval gates:
.github/agents/enforcement/APPROVAL_GATES.md -
Enhanced validation:
.opencode/enforcement/VALIDATION_ENHANCED.md
Approval Gates
Validation compliance is STRICT (hard block):
- ❌ Cannot merge with validation failures
- ❌ Cannot skip approval gates
- ✅ Must pass all quality checks
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-01-26
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!