AgentSkillsCN

align-architecture

依据AGENTS.md架构规范对代码库进行全面审计,识别并修正存在的偏差。当您需要验证六边形架构的合规性、代码规范的执行情况、测试质量、依赖方向、包配置,或在变更后确保文档与代码保持同步时,可选用此功能。

SKILL.md
--- frontmatter
name: align-architecture
description: Audit the codebase against AGENTS.md architecture rules, identify discrepancies, and fix them. Use when verifying hexagonal architecture compliance, code conventions, test quality, dependency direction, package configuration, or documentation sync after changes.

Align Architecture

Audit the codebase against AGENTS.md and fix all discrepancies.

Process

1. Load Rules

Read AGENTS.md (or CLAUDE.md) to extract the full rule set. Parse and categorize every rule into:

  • Architecture constraints
  • DO rules
  • DON'T rules

2. Audit

For each extracted rule, use the Explore agent to verify compliance across the codebase. Report each rule as PASS or FAIL with specific file paths and line numbers.

3. Plan Fixes

For each FAIL, create actionable fix items using TodoWrite.

4. Implement

  • Remove violating tests entirely (no commenting out)
  • Fix import patterns, configuration, or dependency violations
  • Sync documentation with actual state
  • Never introduce new violations while fixing

5. Verify

Run pnpm test and pnpm build (if available). All tests must pass.

6. Summary

Report: total rules checked, pass/fail counts, fixes applied, test results.