본문으로 건너뛰기
cccskills
무료GitHub에 공개

pre-generation-arch-check

Pre-generation architecture check — detect R006 separation-of-concerns and compilation metaphor violations before code generation begins

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md5.3 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Pre-Generation Architecture Check

AASM-inspired pre-generation architecture guard. Detects design violations before code generation (the "pre-compile lint" phase), complementing adversarial-review and deep-verify which operate post-generation.

Overview

This skill fills the PRE-generation gap in the verification pipeline:

PhaseSkillWhen
Pre-generationpre-generation-arch-checkBefore code is written
Post-generationadversarial-reviewAfter code is written
Post-generationdeep-verifyAfter changes are committed

Inspired by Contexty's AASM (AI Anti-pattern Severity Matrix) mechanism. Detects when a requested change might violate:

  • R006 separation of concerns (agents vs skills vs guides)
  • Compilation metaphor boundaries (source/build/spec/linker/stdlib)
  • R010 orchestrator delegation rules
  • Protected path rules (.claude/agents/, .claude/skills/, guides/)

Input

  • Request summary: What the user or pipeline is asking to generate
  • Target files/paths: Where changes will be made

Processing — Anti-Pattern Detection

Check for each of the following anti-patterns against the request summary and target paths:

1. Skill-in-Agent (WARN)

An agent file (.claude/agents/*.md) body contains detailed step-by-step instructions, scripts, or workflow logic that belongs in a skill file.

  • Signal: Agent body exceeds ~50 lines OR contains code blocks / numbered step sequences
  • Suggestion: Extract instructions into .claude/skills/{name}/SKILL.md, reference from agent skills: frontmatter

2. Agent-in-Skill (WARN)

A skill file contains agent configuration fields (model:, tools:, memory:, permissionMode:).

  • Signal: Proposed skill SKILL.md frontmatter contains agent-only fields
  • Suggestion: Move agent configuration to .claude/agents/{name}.md; keep skill focused on instructions

3. Guide-in-Skill (WARN)

A skill file contains reference documentation, best-practices tutorials, or conceptual explanations that belong in guides/.

  • Signal: Proposed SKILL.md body contains "## Background", "## Concepts", or sections > 100 lines of prose
  • Suggestion: Move reference content to guides/{topic}/, link from skill

4. Cross-Concern Write Without mgr-creator (BLOCK)

A single atomic change spans two or more of: .claude/agents/, .claude/skills/, guides/ — without routing through mgr-creator.

  • Signal: Target paths include files in 2+ protected directories in the same request
  • Suggestion: Route the request through mgr-creator (R010 protected path rule)

5. Direct Orchestrator Write (BLOCK)

An implementation step would have the orchestrator (main conversation) directly write or edit files, bypassing subagent delegation.

  • Signal: Request implies "I will write X" from orchestrator context rather than "delegate to specialist"
  • Suggestion: Delegate file writes to appropriate specialist agent per R010 delegation table

6. Spec-Build Confusion (WARN)

Rules (.claude/rules/) are being modified in the same atomic change as source code or agent/skill files.

  • Signal: Target paths include both .claude/rules/*.md and any code or .claude/agents/ or .claude/skills/ files
  • Suggestion: Separate rule updates (spec changes) from agent/skill/code changes (build changes) into distinct commits

Output Format

When no violations are detected:

[ARCH-CHECK] No violations detected — proceed with generation

When violations are detected:

[ARCH-WARNING] {count} potential violation(s) detected:
├── {pattern-name} ({severity}): {description}
│   └── Suggestion: {fix}
├── {pattern-name} ({severity}): {description}
│   └── Suggestion: {fix}

Severity Levels

SeverityAction
WARNAdvisory — proceed with caution, note in generation plan
BLOCKHalt — requires architectural redesign before proceeding

BLOCK violations must be resolved before generation continues. WARN violations are logged and surfaced to the user but do not halt execution (consistent with R021 advisory-first enforcement model).

Integration

Auto-invoked at structured-dev-cycle Phase 1 (planning phase) before any file generation begins.

This skill is advisory only — it does NOT hard-block execution. This is consistent with R021's advisory-first enforcement model. Future promotion to a PreToolUse hook is possible if violation rates warrant escalation.

Invocation pattern:

[structured-dev-cycle Phase 1]
  → pre-generation-arch-check
    → returns [ARCH-CHECK] or [ARCH-WARNING]
  → continue to Phase 2 (generation) with findings surfaced

Cross-References

  • .claude/rules/MUST-agent-design.md (R006) — separation of concerns
  • .claude/rules/MUST-orchestrator-coordination.md (R010) — protected paths and delegation
  • .claude/skills/adversarial-review/ — post-generation security counterpart
  • .claude/skills/deep-verify/ — post-generation quality counterpart
  • Source concept: Contexty AASM (https://github.com/ttalkkak-lab/opencode-contexty)

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Pre-action boundary checking — validates agent tool calls against declared capabilities and task contracts

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

baekenough/second-brain152026년 10월 8일 업데이트

Auto-detect project context and optimize harness — deactivate unused agents/skills, suggest missing experts, generate project profile

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

baekenough/second-brain152026년 10월 8일 업데이트

Adversarial code review using attacker mindset — trust boundary, attack surface, business logic, and defense evaluation

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

baekenough/second-brain152026년 10월 8일 업데이트

Apache Airflow best practices for DAG authoring, testing, and production deployment

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

baekenough/second-brain152026년 10월 8일 업데이트

Alembic migration patterns for naming conventions, safety checks, expand-contract, env.py configuration, and CI integration

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

baekenough/second-brain152026년 10월 8일 업데이트

Pre-routing ambiguity analysis — scores request clarity and asks clarifying questions when needed (inspired by ouroboros)

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

baekenough/second-brain152026년 10월 8일 업데이트

baekenough의 스킬 모두 보기

이 스킬의 문제 신고