一键导入
architecture-audit
Comprehensive **project** consistency review across code, documentation, diagrams, and configuration
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Comprehensive **project** consistency review across code, documentation, diagrams, and configuration
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create and maintain ASCII visual dashboards for project tracking with parallel lane progress bars
Store and manage voice samples for TTS cloning — portable, version-controlled audio references
Clear documentation through visual excellence
AI music generation via Replicate — 5 models for background tracks, lyrics, and sound design
Practitioner methodology for longitudinal case study research, evidence-based documentation, and publication-ready academic writing in AI-assisted development.
First impressions matter. Set projects up for success.
| name | architecture-audit |
| description | Comprehensive **project** consistency review across code, documentation, diagrams, and configuration |
| tier | standard |
| applyTo | **/*audit*,**/*review*,**/*consistency* |
Comprehensive project consistency review across code, documentation, diagrams, and configuration
Systematic audit process to ensure all project artifacts stay synchronized. Catches version drift, terminology inconsistencies, outdated diagrams, broken references, and code-to-docs mismatches.
⚠️ IMPORTANT: This skill audits the user's project code, NOT the Alex cognitive architecture in .github/. Ignore .github/ folder contents when performing audits - focus on the actual source code, documentation, and configuration in the project root and subdirectories.
# Find version references in common locations
# EXCLUDE: .github/** (Alex cognitive architecture - not project code)
$patterns = @(
'package.json', # "version": "x.y.z"
'src/**/config*.json', # Version in config files (not .github)
'*.md', # Root documentation only
'docs/**/*.md', # Project docs (not .github)
'src/**/constants.ts', # Hardcoded versions
'CHANGELOG.md' # Version headers
)
# Grep for version patterns
Get-ChildItem -Recurse -Include $patterns |
Select-String -Pattern 'v?\d+\.\d+\.\d+' |
Group-Object -Property Line
Check: All version references match the canonical version (usually package.json)
Build a deprecated terms list for your project:
| Deprecated Term | Current Term | Migration Pattern |
|---|---|---|
DK-*.md | skills/*/SKILL.md | File format change |
domain-knowledge/ | skills/ | Folder rename |
| (project-specific) | (project-specific) | (document here) |
# Search for deprecated terms (exclude .github/)
$deprecated = @('OLD_TERM_1', 'OLD_TERM_2')
foreach ($term in $deprecated) {
Get-ChildItem -Recurse -Include "*.md","*.ts","*.json" -Exclude ".github" |
Where-Object { $_.FullName -notmatch '\\.github\\' } |
Select-String -Pattern $term
}
Maintain a facts file or section with current counts:
## Current Facts (Update on Audit)
- Skills: 46 folders
- Commands: 16 total
- Tools: 11 MCP tools
- Agents: 5 custom agents
- Instructions: 19 files
- Prompts: 7 files
Check: All documentation referencing these counts matches actual values
For each diagram (Mermaid/ASCII):
# Find all diagrams in project (exclude .github/)
Get-ChildItem -Recurse -Include "*.md" |
Where-Object { $_.FullName -notmatch '\\.github\\' } |
Select-String -Pattern '```mermaid|```ascii|┌|╔' |
Group-Object -Property Path
[text](path) → file exists)#section-name → heading exists)# Find markdown links in project (exclude .github/)
Get-ChildItem -Recurse -Include "*.md" |
Where-Object { $_.FullName -notmatch '\\.github\\' } |
Select-String -Pattern '\[.*?\]\((?!http)[^)]+\)' |
ForEach-Object {
# Extract path and verify existence
}
| Code Artifact | Documentation Location | Check |
|---|---|---|
| Exported functions | API docs | Signatures match |
| Config options | README/User Manual | All options documented |
| CLI commands | Help text / docs | Commands listed |
| Error messages | Troubleshooting | Errors explained |
# Architecture Audit Report
**Date:** YYYY-MM-DD
**Version Audited:** x.y.z
**Auditor:** [name/AI]
## Summary
| Category | Status | Issues Found |
|----------|--------|--------------|
| Version Consistency | ✅/⚠️/❌ | N |
| Terminology | ✅/⚠️/❌ | N |
| Fact Accuracy | ✅/⚠️/❌ | N |
| Diagrams | ✅/⚠️/❌ | N |
| Cross-References | ✅/⚠️/❌ | N |
| Code-Docs Sync | ✅/⚠️/❌ | N |
## Issues Found
### [Category]
- **File:** path/to/file
- **Line:** N
- **Issue:** Description
- **Fix:** Suggested correction
## Actions Taken
- [ ] Issue 1 fixed
- [ ] Issue 2 fixed
# .husky/pre-commit or similar
npm run audit:quick # Fast checks only
# GitHub Actions
- name: Architecture Audit
run: npm run audit:full
if: github.event_name == 'pull_request'
# Weekly full audit
on:
schedule:
- cron: '0 9 * * 1' # Monday 9am
❌ Skipping audits before release — Drift accumulates silently
❌ Manual-only audits — Automate what you can
❌ Fixing without documenting — Record the pattern for next time
❌ Ignoring "cosmetic" issues — They signal deeper drift
❌ Auditing only changed files — Drift affects unchanged files too
✅ Run full audit before major releases
✅ Add new deprecated terms as you migrate
✅ Update fact inventory after structural changes
✅ Document audit findings for patterns
✅ Automate repetitive checks
✅ Time-box manual review (don't boil the ocean)
release-preflight → Trigger audit before releasebrain-qa → Synapse-specific validation and architecture healthcode-review → Audit as part of PR reviewrefactoring-patterns → Audit after major refactoringMaster Alex-specific audit procedures that extend the generic project audit above. These leverage knowledge of exact folder structure, heir relationships, safety imperatives, and build/release workflows.
| Dimension | Script (Automated) | Alex (With This Skill) |
|---|---|---|
| Structural | File existence, counts, format | ✅ Automated |
| Semantic | — | Do files describe concepts consistently? |
| Logic | — | Are documented workflows achievable? |
| Code | Compile, lint, bundle | Does code match documented claims? |
| Architectural | Version alignment, heir sync | Is memory architecture reflected accurately? |
| # | Section | What It Checks |
|---|---|---|
| 1 | Version Alignment | package.json ↔ CHANGELOG ↔ copilot-instructions |
| 2 | Heir Folder Sync | Master → heir file counts |
| 3 | Skill Inheritance | SKILL_EXCLUSIONS in sync-architecture.cjs |
| 4 | Safety Imperatives | Kill switch, protection markers |
| 5 | Build Artifacts | dist/extension.js exists and recent |
| 6 | Documentation Cross-Refs | Required links between docs |
| 7 | Synapse Health | Valid connections, no orphans |
| 8 | alex_docs Audit | Version refs, deprecated terms |
| 9 | Skill Network Diagram | Node count matches actual skills |
| # | Section | What It Checks |
|---|---|---|
| 10 | Extension UI | Dead buttons |
| 11 | Dependency Health | npm audit vulnerabilities |
| 12 | TypeScript & Lint | Compile errors, lint warnings |
| 13 | Security | Secrets in code, CSP compliance |
| 14 | Bundle Size | extension.js size |
| 15 | Git Hygiene | Uncommitted changes, branch status |
| 16 | Changelog | Format, version alignment |
| 17 | API Compatibility | Deprecated VS Code APIs |
| 18 | Test Coverage | Test file count vs source files |
| 19 | Accessibility | ARIA labels, CSS variables |
| 20 | Localization | l10n configuration |
| 21 | Asset Integrity | Icon exists, no missing assets |
| 22 | Configuration Files | launch.json, tsconfig.json, .vscodeignore |
# Full audit (all 22 sections)
.\.github\muscles\audit-master-alex.ps1
# Quick audit (master-specific only, sections 1-9)
.\.github\muscles\audit-master-alex.ps1 -Section quick
# Specific sections
.\.github\muscles\audit-master-alex.ps1 -Section 4,7,13