一键导入
speckit-architecture-guard-violation-detection
Detect framework-agnostic architecture violations in plans, tasks, and implementation summaries.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Detect framework-agnostic architecture violations in plans, tasks, and implementation summaries.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Wrap core analysis with behavior-first vertical consistency checks.
Apply approved architecture refactors by updating plan and task artifacts directly.
Perform a framework-agnostic architecture review validating implementation against spec.md, plan.md, tasks.md, and the governance and architecture constitutions.
Perform an architecture-aware verification gate validating implementation against spec.md, plan.md, tasks.md, and the Architecture Constitution.
Run a single architecture workflow that prefers memory-first context and can incorporate security review when available.
Run implementation with memory context, then review the produced implementation against security and architecture constraints.
| name | speckit-architecture-guard-violation-detection |
| description | Detect framework-agnostic architecture violations in plans, tasks, and implementation summaries. |
| compatibility | Requires spec-kit project structure with .specify/ directory |
| metadata | {"author":"github-spec-kit","source":"architecture-guard:commands/violation-detection.md"} |
You are detecting architecture violations for architecture-guard, a high-integrity governance extension.
Your role is to identify architectural drift in specifications, plans, and implementations using framework-agnostic principles.
When Flash-Mem is available, query it first for summary and metadata context before performing architecture analysis:
If Flash-Mem is unavailable or the retrieved summaries are insufficient, continue with the repository artifacts and constitution files available in the workspace.
Accept the same normalized command context as the review workflow:
mode=architecture (default)focus=general (default), db, api, or async.If mode=performance, do not emit violations here. Let architecture-review own the advisory performance output.
When focus=general (default):
When focus=db (data/persistence):
When focus=api (API contracts):
When focus=async (async boundaries):
Before analysis, build internal representations (do not output these):
spec.md or plan.md intent.security-constraints.md or trust boundaries.A Security-Architecture Conflict occurs when security requirements and architecture boundaries create opposing design constraints. These must be flagged with CRITICAL severity and routed to both security and architecture workflows.
Example 1: Sensitive Data Placement
Example 2: Secret Management
.env, never passed to build or frontend"Example 3: Authorization Boundary
Model Context: Load artifacts and build the Semantic Models.
When Flash-Mem is available, use it first to gather the most relevant architecture context before judging violations. Prefer summary-first context and only expand into repository files when needed.
If Flash-Mem is unavailable or the context is insufficient, continue with the repository artifacts and constitution files available in the workspace.
Verify Evidence: Check if task-referenced files exist and contain expected implementation logic.
Analyze Alignment: Compare spec.md intent vs. plan.md architecture vs. actual behavior.
Scan Principles: Apply detection scope across boundaries and contracts.
Security & Governance Cross-Check: Ensure architecture decisions do not violate security_constitution.md or security-constraints.md.
Assign Severity:
Critical: Constitution MUST breach (including Security), Security Constraint violation, or zero evidence for a required boundary.High: Significant boundary erosion, contract inconsistency, or intent divergence.Medium: Local drift or debt.Low: Minor shape or naming drift.Return only:
Violations:
- Type:
Severity:
Location:
Description:
Evidence:
Principle:
If there are no violations:
Violations:
- None detected
Feed detected violations to /speckit.architecture-guard.refactor-generator so they can be converted into actionable refactor tasks.
If framework preset guidance exists, use it to map the Generic Architecture Model to framework primitives and detect stack-specific anti-patterns.
Preset path:
.specify/presets/architecture-guard-preset.md