ワンクリックで
adv-arch-detection
Architecture inconsistency detection via deterministic tools, research fallback, and AI heuristic
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Architecture inconsistency detection via deterministic tools, research fallback, and AI heuristic
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
AI-generated code quality detection via AST, regex, and heuristic analysis
Backend technology stack evaluation — choose boring technology scaled by project context. Use when selecting languages, databases, async infra, or API styles for new or existing backends.
Competitive intelligence research methodology for source code and public information comparison
Improvement-discovery methodology for current-state, LBP, and external landscape analysis
Backlog reconciliation, bug priority assignment, and ROADMAP.md regeneration methodology
Codebase reconnaissance skill for mapping structure, hotspots, and risks
| name | adv-arch-detection |
| description | Architecture inconsistency detection via deterministic tools, research fallback, and AI heuristic |
| keywords | ["architecture","layer","circular-deps","drift","tech-stack","dependencies","structure"] |
| metadata | {"priority":"medium","source":".adv/specs/arch-scan/spec.json"} |
Detect architecture inconsistencies across codebase, specs, command docs, and workflow assets. Three phases: deterministic tools → research fallback → AI heuristic.
Detect stack from project files, then run stack-specific tools from the Stack Packs matrix before research fallback or generic AI heuristic fallback.
| Detected File | Stack Pack | Tools / Structural owners |
|---|---|---|
package.json + tsconfig.json | TypeScript/Node | dependency-cruiser, madge |
package.json + ADV command/spec/skill/Temporal assets | ADV stack pack | dependency graph tools; workflow bundle boundary tests; command/manifest symmetry tests; spec/asset anchors; command/skill methodology surfaces |
pyproject.toml / setup.py | Python | pydeps |
go.mod | Go | go vet, gocyclo |
Cargo.toml | Rust | cargo-deps |
When tools are absent → graceful fallback with detectionMethod: degraded and a note. When a relevant detected stack has no pack, report it as missing pack coverage.
Also scan known correctness boundaries for structural ownership: input parsing/normalization, workflow state transitions, gate/spec/compliance outcomes, persistence mutation, and classification. Prefer tool/schema/type evidence; heuristic-only signals are low-confidence candidates.
When stack is NOT in the Stack Packs matrix OR user requests --phase 2:
Gemfile → Ruby, pom.xml → Java)"{stack} architecture linter", "{stack} circular dependency detector"Run Phase 3 when the user requests --phase 3, after Phase 1/2 produce no findings, or when no Stack Pack applies.
detectionMethod: heuristic, confidence: low.| Stack Pack | Primary Tool / Structural Owner | Fallback Tool | Checks |
|---|---|---|---|
| TypeScript/Node | dependency-cruiser | madge | Circular deps, layer violations, orphans |
| ADV stack pack | existing structural enforcers | dependency graph tools | TypeScript/Bun/OpenCode plugin/Temporal workflow bundle boundary, command/manifest symmetry, spec/asset anchors, command/skill methodology surfaces |
| Python | pydeps | import-deps | Import cycles, module depth |
| Go | go vet | gocyclo | Shadowing, complexity, unused code |
| Rust | cargo-deps | cargo-modules | Dependency graph, unused crates |
The ADV stack pack cites existing tests and validators as authoritative structural checks instead of restating those boundaries as prose authority.
Text output: detected stacks, applied Stack Packs, missing Stack Packs, skipped detectors, degraded detectors. JSON: coverage.detectedStacks, coverage.appliedPacks, coverage.missingPacks, coverage.skippedDetectors, coverage.degradedDetectors.
Missing pack ≠ finding by itself. It is coverage debt.
The command derives a mandatory rewrite assessment after scan evidence is final and before report assembly. Skill owns the evidence rules:
No definite conclusion from scan evidence.status: "indeterminate" — never a no-change conclusion.rewriteAssessment JSON semantics only.detect stack → Exa query → Context7 lookup → apply → cite
Example: Kotlin project detected → Exa: "Kotlin architecture linter" → Context7: detekt docs → apply detekt architecture rules → cite detekt documentation URL.
{
"category": "circular-dep|layer-violation|orphan|complexity|drift",
"severity": "blocker|major|minor|nit",
"location": "file:line or module path",
"description": "what was found",
"recommendation": "how to fix",
"source": "https://... or tool name (optional for Phase 3)"
}
| Level | Criteria | Action |
|---|---|---|
| blocker | Core circular deps, build-breaking drift | Must fix before merge |
| major | Layer violations, orphaned critical modules | Fix current sprint |
| minor | Style inconsistency, minor complexity | Fix opportunistically |
| nit | Naming mismatch, formatting | Campsite rule |
Structural-correctness severity: blocker when heuristic-owned authority controls security, persistence, workflow state, gate completion, or spec compliance in touched scope; major for input recognition/classification authority without immediate mutation; minor/nit for advisory-only smells with guardrails.
Cross-scanner comparison: arch-scan blocker≈CRITICAL, major≈HIGH, minor≈MEDIUM, nit≈LOW vs slop-scan. Keep each scanner's native labels.