Code Quality Audit
Run quality and security audits for Drupal and Next.js projects with consistent tooling and reporting.
Quick Commands
For direct access, use these commands:
/code-quality:setup - First-time setup wizard (install and configure tools)
/code-quality:audit - Run full audit (all 22 operations)
/code-quality:coverage - Check test coverage
/code-quality:security - Security scan (10 layers for Drupal, 7 for Next.js)
/code-quality:lint - Code standards check
/code-quality:solid - Architecture and SOLID principles check
/code-quality:dry - Find code duplication
/code-quality:tdd - Start TDD workflow (test watcher mode)
/code-quality:review - Rubric-scored code review (/50 scale with quality gate)
/code-quality:generate-review-md - Generate REVIEW.md for Claude Code's managed Code Review
/code-quality:architecture-debate - Architecture debate (Pragmatist + Purist + Maintainer)
For conversational workflows, continue reading...
Note — Claude Code's built-in /simplify: Claude Code ships a built-in /simplify skill for quick single-pass code review. /code-quality:review is different: it runs automated tools (PHPStan/ESLint), scores across 10 rubric categories with a /50 scale, enforces a quality gate (PASS 35+/FAIL), and writes a persisted report. Use /simplify for fast ad-hoc feedback; use /code-quality:review when you need a structured, scored, and documented assessment.
When to Use
Drupal projects:
- "Setup quality tools" / "Install PHPStan"
- "Run code audit" / "Check code quality"
- "Check coverage" / "What's my coverage?"
- "Find SOLID violations" / "Check complexity"
- "Check duplication" / "DRY check"
- "Lint code" / "Check coding standards"
- "Fix deprecations" / "Run rector"
- "Start TDD" / "RED-GREEN-REFACTOR"
- "Check security" / "Find vulnerabilities" / "OWASP audit"
Next.js projects:
- "Setup quality tools" / "Install ESLint"
- "Run code audit" / "Check code quality"
- "Check coverage" / "Run Jest coverage"
- "Find SOLID violations" / "Check complexity" / "Check circular deps"
- "Lint code" / "Run ESLint"
- "Check duplication" / "DRY check"
- "Start TDD" / "Jest watch mode"
- "Check security" / "Find vulnerabilities" / "OWASP audit"
Quick Reference
Drupal Scripts
| Task |
Script |
Details |
| Setup tools |
scripts/core/install-tools.sh |
See Drupal Setup |
| Full audit |
scripts/core/full-audit.sh |
See Full Audit |
| Coverage |
scripts/drupal/coverage-report.sh |
See Coverage Check |
| SOLID check |
scripts/drupal/solid-check.sh |
See SOLID Check |
| DRY check |
scripts/drupal/dry-check.sh |
See DRY Check |
| Lint check |
scripts/drupal/lint-check.sh |
See Lint Check |
| Fix deprecations |
scripts/drupal/rector-fix.sh |
See Rector Fix |
| TDD cycle |
scripts/drupal/tdd-workflow.sh |
See TDD Workflow |
| Security audit |
scripts/drupal/security-check.sh |
See Security Audit (10 layers) |
Next.js Scripts
| Task |
Script |
Details |
| Setup tools |
scripts/core/install-tools.sh |
See Next.js Setup |
| Full audit |
scripts/core/full-audit.sh |
See Full Audit |
| Coverage |
scripts/nextjs/coverage-report.sh |
See Coverage Check |
| SOLID check |
scripts/nextjs/solid-check.sh |
See SOLID Check |
| Lint check |
scripts/nextjs/lint-check.sh |
See Lint Check |
| DRY check |
scripts/nextjs/dry-check.sh |
See DRY Check |
| TDD cycle |
scripts/nextjs/tdd-workflow.sh |
See TDD Workflow |
| Security audit |
scripts/nextjs/security-check.sh |
See Security Audit (7 layers) |
Before Any Operation
Drupal:
- Locate Drupal root: check
web/core/lib/Drupal.php or docroot/core/lib/Drupal.php
- Verify DDEV:
ddev describe
- Create reports directory:
mkdir -p .reports && echo ".reports/" >> .gitignore
Next.js:
- Verify npm:
npm --version
- Create reports directory:
mkdir -p .reports && echo ".reports/" >> .gitignore
Sandbox users: If Claude Code sandbox mode is enabled, bash scripts that invoke linters (PHPStan, ESLint, Semgrep, Trivy, Gitleaks) require their binary paths to be whitelisted. Add the tool binaries to your allowedPaths in claude_code_config.json (e.g., vendor/bin/phpstan, /usr/local/bin/semgrep). DDEV-proxied commands run inside the container and are unaffected.
When to Run What
Read decision-guides/quality-audit-checklist.md for detailed guidance.
| Context |
What to Run |
Time |
| Pre-commit |
quality:cs only |
~5s |
| Pre-push |
PHPStan + Unit/Kernel tests |
~2min |
| Pre-merge |
Full audit |
~10min |
| Weekly |
Full audit + HTML reports |
~15min |
Scope Targeting
To audit specific modules or components instead of the entire project:
See Scope Targeting for three approaches:
- Change directory (recommended) -
cd web/modules/custom/my_module
- Environment variables -
DRUPAL_MODULES_PATH=path/to/module
- Full scan (default) - Run from project root
Intelligent detection: Claude detects current directory and user intent.
Operations
All detailed operation instructions have been moved to reference files for better organization.
Drupal Operations
Setup & Configuration
- Operation 1: Setup Tools - Install PHPStan, PHPMD, PHPCPD, Coder
- Operation 6: Module-Specific Audit - Scope audit to one module
- Operation 7: Add Composer Scripts - Configure quality scripts
- Operation 8: CI Integration - Setup GitHub Actions
Quality Audits
- Operation 2: Full Audit - Run all quality checks
- Operation 3: Coverage Check - Measure test coverage
- Operation 4: SOLID Check - Find principle violations
- Operation 5: DRY Check - Detect code duplication
- Operation 11: Lint Check - Coding standards
- Operation 12: Rector Fix - Auto-fix deprecations
Development Workflows
- Operation 10: TDD Workflow - RED-GREEN-REFACTOR cycle
Security
- Operation 20: Security Audit - 10 security layers (v2.0.0)
- Drush pm:security, Composer audit
- yousha/php-security-linter, Psalm taint analysis
- Custom Drupal patterns, Security Review module
- Semgrep SAST, Trivy scanner, Gitleaks (v1.8.0)
- Roave Security Advisories (v2.0.0)
Next.js Operations
Setup & Configuration
- Operation 13: Setup Tools - Install ESLint, Jest, security tools
Quality Audits
- Operation 14: Full Audit - Run all quality checks
- Operation 15: Lint Check - ESLint + TypeScript
- Operation 16: Coverage Check - Jest coverage
- Operation 17: DRY Check - Detect duplication
- Operation 19: SOLID Check - Circular deps, complexity
Development Workflows
- Operation 18: TDD Workflow - RED-GREEN-REFACTOR with Jest
Security
- Operation 21: Security Audit - 7 security layers (v2.0.0)
- npm audit, ESLint security plugins
- Semgrep SAST, Trivy scanner, Gitleaks (v1.8.0)
- Custom React/Next.js patterns (XSS, eval, navigation)
- Socket CLI (v2.0.0)
Optional: DAST (Dynamic Testing)
Pre-production security testing for staging environments
- Operation 22: DAST Tools - Dynamic security testing (v2.1.0)
- OWASP ZAP (full DAST scanner)
- Nuclei (template-based CVE scanning)
- Requires running application
- Use before releases on staging/pre-production
Saving Reports
All reports must follow schemas/audit-report.schema.json:
{
"meta": {
"project_type": "drupal|nextjs|monorepo",
"timestamp": "2025-12-19T12:00:00Z",
"thresholds": { "coverage_minimum": 70, "duplication_max": 5 }
},
"summary": {
"overall_score": "pass|warning|fail",
"coverage_score": "pass|warning|fail",
"solid_score": "pass|warning|fail",
"dry_score": "pass|warning|fail",
"security_score": "pass|warning|fail"
},
"coverage": { "line_coverage": 75.5, "files_analyzed": 45 },
"solid": { "violations": [] },
"dry": { "duplication_percentage": 3.2, "clones": [] },
"security": { "critical": 0, "high": 0, "medium": 3, "low": 5, "issues": [] },
"recommendations": []
}
References
Core Guidance
references/tdd-workflow.md - RED-GREEN-REFACTOR patterns, test naming, cycle targets
references/coverage-metrics.md - Coverage targets by code type, PCOV vs Xdebug
references/dry-detection.md - Rule of Three, when duplication is OK
references/solid-detection.md - SOLID detection patterns and fixes
references/composer-scripts.md - Ready-to-use composer scripts
references/scope-targeting.md - Target specific modules/components (NEW in v1.8.0)
Operations
references/operations/drupal-setup.md - Drupal setup operations
references/operations/drupal-audits.md - Drupal quality audit operations
references/operations/drupal-security.md - Drupal security (10 layers, v2.0.0)
references/operations/drupal-tdd.md - Drupal TDD workflow
references/operations/nextjs-setup.md - Next.js setup operations
references/operations/nextjs-audits.md - Next.js quality audit operations
references/operations/nextjs-security.md - Next.js security (7 layers, v2.0.0)
references/operations/nextjs-tdd.md - Next.js TDD workflow
Online Dev-Guides (Drupal Domain)
For deeper Drupal-specific patterns beyond tool commands, fetch the guide index:
Index: https://camoa.github.io/dev-guides/llms.txt
Likely relevant topics: solid-principles, dry-principles, security, testing, tdd, js-development, github-actions
Usage: WebFetch the index to discover available topics, then fetch specific topic pages when explaining violations, suggesting fixes, or providing architectural context.
Decision Guides
decision-guides/test-type-selection.md - Unit vs Kernel vs Functional decision tree
decision-guides/quality-audit-checklist.md - When to run what (pre-commit vs pre-merge)
Templates
Drupal
templates/drupal/phpstan.neon - PHPStan 2.x config (extensions auto-load)
templates/drupal/phpmd.xml - PHPMD ruleset for Drupal
templates/drupal/phpunit.xml - PHPUnit config with testsuites
templates/ci/github-drupal.yml - GitHub Actions workflow with security tools
Next.js
templates/nextjs/eslint.config.js - ESLint v9 flat config with TypeScript + security
templates/nextjs/jest.config.js - Jest config with coverage thresholds
templates/nextjs/jest.setup.js - Jest setup with Testing Library
templates/nextjs/.prettierrc - Prettier config with Tailwind plugin
What's New in v2.1.0
Phase 3 - Optional DAST Tools (NEW!):
- ✅ OWASP ZAP (full DAST scanner for pre-production)
- ✅ Nuclei (template-based CVE and misconfiguration scanning)
- ✅ Comprehensive documentation with usage examples
- ✅ CI/CD integration guides (GitHub Actions, GitLab)
- ✅ Pre-release checklist script
DAST Coverage:
- Pre-production security testing
- Runtime vulnerability detection
- OWASP Top 10 dynamic testing
- 1000+ CVE templates (Nuclei)
See references/operations/dast-tools.md for full documentation.
What's New in v2.0.0
Progressive Disclosure Refactoring:
- ✅ SKILL.md: 632 → 234 lines (63% reduction)
- ✅ 9 reference files created with full documentation
- ✅ Plugin-creation-tools compliance (16/16 criteria)
Phase 1 - Cross-Stack Security Tools:
- ✅ Semgrep SAST (20,000+ security rules for PHP, React, JS, TS)
- ✅ Trivy scanner (dependency/container/secret scanner)
- ✅ Gitleaks (secret detection with 800+ patterns)
Phase 2 - Enhancement Tools:
- ✅ Roave Security Advisories (Drupal - Composer prevention layer)
- ✅ Socket CLI (Next.js - supply chain attack detection)
Security Coverage:
- Drupal: 40% → 90% (10 security layers)
- Next.js: 0% → 85% (7 security layers)
See .work-in-progress-v2.0.0.md for full implementation details.
1---2name: code-quality-audit3description: Use when checking code quality, running security audits, testing coverage, finding SOLID/DRY violations, or setting up quality tools. Use when user says "audit this code", "check security", "run PHPStan", "code quality", "find violations", "SOLID check", "DRY check", "test coverage", "lint this", "security review", "is this production ready", "check for vulnerabilities", "code review", "grade this code". Supports Drupal (PHPStan, PHPMD, Psalm, Semgrep, Trivy, Gitleaks via DDEV) and Next.js (ESLint, Jest, Semgrep, Trivy, Gitleaks). Use proactively before deployment or after significant code changes.4---5
6# Code Quality Audit
7
8Run quality and security audits for **Drupal** and **Next.js** projects with consistent tooling and reporting.
9
10## Quick Commands
11
12**For direct access, use these commands:**
13- `/code-quality:setup` - First-time setup wizard (install and configure tools)
14- `/code-quality:audit` - Run full audit (all 22 operations)
15- `/code-quality:coverage` - Check test coverage
16- `/code-quality:security` - Security scan (10 layers for Drupal, 7 for Next.js)
17- `/code-quality:lint` - Code standards check
18- `/code-quality:solid` - Architecture and SOLID principles check
19- `/code-quality:dry` - Find code duplication
20- `/code-quality:tdd` - Start TDD workflow (test watcher mode)
21- `/code-quality:review` - Rubric-scored code review (/50 scale with quality gate)
22- `/code-quality:generate-review-md` - Generate REVIEW.md for Claude Code's managed Code Review
23- `/code-quality:architecture-debate` - Architecture debate (Pragmatist + Purist + Maintainer)
24
25**For conversational workflows, continue reading...**
26
27> **Note — Claude Code's built-in `/simplify`:** Claude Code ships a built-in `/simplify` skill for quick single-pass code review. `/code-quality:review` is different: it runs automated tools (PHPStan/ESLint), scores across 10 rubric categories with a /50 scale, enforces a quality gate (PASS 35+/FAIL), and writes a persisted report. Use `/simplify` for fast ad-hoc feedback; use `/code-quality:review` when you need a structured, scored, and documented assessment.
28
29## When to Use
30
31**Drupal projects:**
32- "Setup quality tools" / "Install PHPStan"
33- "Run code audit" / "Check code quality"
34- "Check coverage" / "What's my coverage?"
35- "Find SOLID violations" / "Check complexity"
36- "Check duplication" / "DRY check"
37- "Lint code" / "Check coding standards"
38- "Fix deprecations" / "Run rector"
39- "Start TDD" / "RED-GREEN-REFACTOR"
40- "Check security" / "Find vulnerabilities" / "OWASP audit"
41
42**Next.js projects:**
43- "Setup quality tools" / "Install ESLint"
44- "Run code audit" / "Check code quality"
45- "Check coverage" / "Run Jest coverage"
46- "Find SOLID violations" / "Check complexity" / "Check circular deps"
47- "Lint code" / "Run ESLint"
48- "Check duplication" / "DRY check"
49- "Start TDD" / "Jest watch mode"
50- "Check security" / "Find vulnerabilities" / "OWASP audit"
51
52## Quick Reference
53
54### Drupal Scripts
55| Task | Script | Details |
56|------|--------|---------|
57| Setup tools | `scripts/core/install-tools.sh` | See [Drupal Setup](references/operations/drupal-setup.md#operation-1-setup-tools) |
58| Full audit | `scripts/core/full-audit.sh` | See [Full Audit](references/operations/drupal-audits.md#operation-2-full-audit) |
59| Coverage | `scripts/drupal/coverage-report.sh` | See [Coverage Check](references/operations/drupal-audits.md#operation-3-coverage-check) |
60| SOLID check | `scripts/drupal/solid-check.sh` | See [SOLID Check](references/operations/drupal-audits.md#operation-4-solid-check) |
61| DRY check | `scripts/drupal/dry-check.sh` | See [DRY Check](references/operations/drupal-audits.md#operation-5-dry-check) |
62| Lint check | `scripts/drupal/lint-check.sh` | See [Lint Check](references/operations/drupal-audits.md#operation-11-lint-check) |
63| Fix deprecations | `scripts/drupal/rector-fix.sh` | See [Rector Fix](references/operations/drupal-audits.md#operation-12-rector-fix) |
64| TDD cycle | `scripts/drupal/tdd-workflow.sh` | See [TDD Workflow](references/operations/drupal-tdd.md) |
65| Security audit | `scripts/drupal/security-check.sh` | See [Security Audit](references/operations/drupal-security.md) (10 layers) |
66
67### Next.js Scripts
68| Task | Script | Details |
69|------|--------|---------|
70| Setup tools | `scripts/core/install-tools.sh` | See [Next.js Setup](references/operations/nextjs-setup.md) |
71| Full audit | `scripts/core/full-audit.sh` | See [Full Audit](references/operations/nextjs-audits.md#operation-14-full-audit) |
72| Coverage | `scripts/nextjs/coverage-report.sh` | See [Coverage Check](references/operations/nextjs-audits.md#operation-16-coverage-check) |
73| SOLID check | `scripts/nextjs/solid-check.sh` | See [SOLID Check](references/operations/nextjs-audits.md#operation-19-solid-check) |
74| Lint check | `scripts/nextjs/lint-check.sh` | See [Lint Check](references/operations/nextjs-audits.md#operation-15-lint-check) |
75| DRY check | `scripts/nextjs/dry-check.sh` | See [DRY Check](references/operations/nextjs-audits.md#operation-17-dry-check) |
76| TDD cycle | `scripts/nextjs/tdd-workflow.sh` | See [TDD Workflow](references/operations/nextjs-tdd.md) |
77| Security audit | `scripts/nextjs/security-check.sh` | See [Security Audit](references/operations/nextjs-security.md) (7 layers) |
78
79## Before Any Operation
80
81**Drupal:**
821. Locate Drupal root: check `web/core/lib/Drupal.php` or `docroot/core/lib/Drupal.php`
832. Verify DDEV: `ddev describe`
843. Create reports directory: `mkdir -p .reports && echo ".reports/" >> .gitignore`
85
86**Next.js:**
871. Verify npm: `npm --version`
882. Create reports directory: `mkdir -p .reports && echo ".reports/" >> .gitignore`
89
90> **Sandbox users:** If Claude Code sandbox mode is enabled, bash scripts that invoke linters (PHPStan, ESLint, Semgrep, Trivy, Gitleaks) require their binary paths to be whitelisted. Add the tool binaries to your `allowedPaths` in `claude_code_config.json` (e.g., `vendor/bin/phpstan`, `/usr/local/bin/semgrep`). DDEV-proxied commands run inside the container and are unaffected.
91
92## When to Run What
93
94Read `decision-guides/quality-audit-checklist.md` for detailed guidance.
95
96| Context | What to Run | Time |
97|---------|-------------|------|
98| Pre-commit | `quality:cs` only | ~5s |
99| Pre-push | PHPStan + Unit/Kernel tests | ~2min |
100| Pre-merge | Full audit | ~10min |
101| Weekly | Full audit + HTML reports | ~15min |
102
103## Scope Targeting
104
105To audit specific modules or components instead of the entire project:
106
107**See [Scope Targeting](references/scope-targeting.md)** for three approaches:
1081. **Change directory** (recommended) - `cd web/modules/custom/my_module`
1092. **Environment variables** - `DRUPAL_MODULES_PATH=path/to/module`
1103. **Full scan** (default) - Run from project root
111
112Intelligent detection: Claude detects current directory and user intent.
113
114---
115
116# Operations
117
118All detailed operation instructions have been moved to reference files for better organization.
119
120## Drupal Operations
121
122### Setup & Configuration
123- **Operation 1:** [Setup Tools](references/operations/drupal-setup.md#operation-1-setup-tools) - Install PHPStan, PHPMD, PHPCPD, Coder
124- **Operation 6:** [Module-Specific Audit](references/operations/drupal-setup.md#operation-6-module-specific-audit) - Scope audit to one module
125- **Operation 7:** [Add Composer Scripts](references/operations/drupal-setup.md#operation-7-add-composer-scripts) - Configure quality scripts
126- **Operation 8:** [CI Integration](references/operations/drupal-setup.md#operation-8-ci-integration) - Setup GitHub Actions
127
128### Quality Audits
129- **Operation 2:** [Full Audit](references/operations/drupal-audits.md#operation-2-full-audit) - Run all quality checks
130- **Operation 3:** [Coverage Check](references/operations/drupal-audits.md#operation-3-coverage-check) - Measure test coverage
131- **Operation 4:** [SOLID Check](references/operations/drupal-audits.md#operation-4-solid-check) - Find principle violations
132- **Operation 5:** [DRY Check](references/operations/drupal-audits.md#operation-5-dry-check) - Detect code duplication
133- **Operation 11:** [Lint Check](references/operations/drupal-audits.md#operation-11-lint-check) - Coding standards
134- **Operation 12:** [Rector Fix](references/operations/drupal-audits.md#operation-12-rector-fix) - Auto-fix deprecations
135
136### Development Workflows
137- **Operation 10:** [TDD Workflow](references/operations/drupal-tdd.md) - RED-GREEN-REFACTOR cycle
138
139### Security
140- **Operation 20:** [Security Audit](references/operations/drupal-security.md) - **10 security layers (v2.0.0)**
141 - Drush pm:security, Composer audit
142 - yousha/php-security-linter, Psalm taint analysis
143 - Custom Drupal patterns, Security Review module
144 - **Semgrep SAST, Trivy scanner, Gitleaks** (v1.8.0)
145 - **Roave Security Advisories** (v2.0.0)
146
147## Next.js Operations
148
149### Setup & Configuration
150- **Operation 13:** [Setup Tools](references/operations/nextjs-setup.md) - Install ESLint, Jest, security tools
151
152### Quality Audits
153- **Operation 14:** [Full Audit](references/operations/nextjs-audits.md#operation-14-full-audit) - Run all quality checks
154- **Operation 15:** [Lint Check](references/operations/nextjs-audits.md#operation-15-lint-check) - ESLint + TypeScript
155- **Operation 16:** [Coverage Check](references/operations/nextjs-audits.md#operation-16-coverage-check) - Jest coverage
156- **Operation 17:** [DRY Check](references/operations/nextjs-audits.md#operation-17-dry-check) - Detect duplication
157- **Operation 19:** [SOLID Check](references/operations/nextjs-audits.md#operation-19-solid-check) - Circular deps, complexity
158
159### Development Workflows
160- **Operation 18:** [TDD Workflow](references/operations/nextjs-tdd.md) - RED-GREEN-REFACTOR with Jest
161
162### Security
163- **Operation 21:** [Security Audit](references/operations/nextjs-security.md) - **7 security layers (v2.0.0)**
164 - npm audit, ESLint security plugins
165 - **Semgrep SAST, Trivy scanner, Gitleaks** (v1.8.0)
166 - Custom React/Next.js patterns (XSS, eval, navigation)
167 - **Socket CLI** (v2.0.0)
168
169## Optional: DAST (Dynamic Testing)
170
171**Pre-production security testing for staging environments**
172
173- **Operation 22:** [DAST Tools](references/operations/dast-tools.md) - **Dynamic security testing (v2.1.0)**
174 - OWASP ZAP (full DAST scanner)
175 - Nuclei (template-based CVE scanning)
176 - Requires running application
177 - Use before releases on staging/pre-production
178
179---
180
181## Saving Reports
182
183All reports must follow `schemas/audit-report.schema.json`:
184
185```json
186{
187 "meta": {
188 "project_type": "drupal|nextjs|monorepo",
189 "timestamp": "2025-12-19T12:00:00Z",
190 "thresholds": { "coverage_minimum": 70, "duplication_max": 5 }
191 },
192 "summary": {
193 "overall_score": "pass|warning|fail",
194 "coverage_score": "pass|warning|fail",
195 "solid_score": "pass|warning|fail",
196 "dry_score": "pass|warning|fail",
197 "security_score": "pass|warning|fail"
198 },
199 "coverage": { "line_coverage": 75.5, "files_analyzed": 45 },
200 "solid": { "violations": [] },
201 "dry": { "duplication_percentage": 3.2, "clones": [] },
202 "security": { "critical": 0, "high": 0, "medium": 3, "low": 5, "issues": [] },
203 "recommendations": []
204}
205```
206
207---
208
209## References
210
211### Core Guidance
212- `references/tdd-workflow.md` - RED-GREEN-REFACTOR patterns, test naming, cycle targets
213- `references/coverage-metrics.md` - Coverage targets by code type, PCOV vs Xdebug
214- `references/dry-detection.md` - Rule of Three, when duplication is OK
215- `references/solid-detection.md` - SOLID detection patterns and fixes
216- `references/composer-scripts.md` - Ready-to-use composer scripts
217- `references/scope-targeting.md` - **Target specific modules/components (NEW in v1.8.0)**
218
219### Operations
220- `references/operations/drupal-setup.md` - Drupal setup operations
221- `references/operations/drupal-audits.md` - Drupal quality audit operations
222- `references/operations/drupal-security.md` - **Drupal security (10 layers, v2.0.0)**
223- `references/operations/drupal-tdd.md` - Drupal TDD workflow
224- `references/operations/nextjs-setup.md` - Next.js setup operations
225- `references/operations/nextjs-audits.md` - Next.js quality audit operations
226- `references/operations/nextjs-security.md` - **Next.js security (7 layers, v2.0.0)**
227- `references/operations/nextjs-tdd.md` - Next.js TDD workflow
228
229### Online Dev-Guides (Drupal Domain)
230
231For deeper Drupal-specific patterns beyond tool commands, fetch the guide index:
232
233**Index:** `https://camoa.github.io/dev-guides/llms.txt`
234
235Likely relevant topics: solid-principles, dry-principles, security, testing, tdd, js-development, github-actions
236
237Usage: WebFetch the index to discover available topics, then fetch specific topic pages when explaining violations, suggesting fixes, or providing architectural context.
238
239## Decision Guides
240
241- `decision-guides/test-type-selection.md` - Unit vs Kernel vs Functional decision tree
242- `decision-guides/quality-audit-checklist.md` - When to run what (pre-commit vs pre-merge)
243
244## Templates
245
246### Drupal
247- `templates/drupal/phpstan.neon` - PHPStan 2.x config (extensions auto-load)
248- `templates/drupal/phpmd.xml` - PHPMD ruleset for Drupal
249- `templates/drupal/phpunit.xml` - PHPUnit config with testsuites
250- `templates/ci/github-drupal.yml` - GitHub Actions workflow with security tools
251
252### Next.js
253- `templates/nextjs/eslint.config.js` - ESLint v9 flat config with TypeScript + security
254- `templates/nextjs/jest.config.js` - Jest config with coverage thresholds
255- `templates/nextjs/jest.setup.js` - Jest setup with Testing Library
256- `templates/nextjs/.prettierrc` - Prettier config with Tailwind plugin
257
258---
259
260## What's New in v2.1.0
261
262**Phase 3 - Optional DAST Tools (NEW!):**
263- ✅ OWASP ZAP (full DAST scanner for pre-production)
264- ✅ Nuclei (template-based CVE and misconfiguration scanning)
265- ✅ Comprehensive documentation with usage examples
266- ✅ CI/CD integration guides (GitHub Actions, GitLab)
267- ✅ Pre-release checklist script
268
269**DAST Coverage:**
270- Pre-production security testing
271- Runtime vulnerability detection
272- OWASP Top 10 dynamic testing
273- 1000+ CVE templates (Nuclei)
274
275See `references/operations/dast-tools.md` for full documentation.
276
277---
278
279## What's New in v2.0.0
280
281**Progressive Disclosure Refactoring:**
282- ✅ SKILL.md: 632 → 234 lines (63% reduction)
283- ✅ 9 reference files created with full documentation
284- ✅ Plugin-creation-tools compliance (16/16 criteria)
285
286**Phase 1 - Cross-Stack Security Tools:**
287- ✅ Semgrep SAST (20,000+ security rules for PHP, React, JS, TS)
288- ✅ Trivy scanner (dependency/container/secret scanner)
289- ✅ Gitleaks (secret detection with 800+ patterns)
290
291**Phase 2 - Enhancement Tools:**
292- ✅ Roave Security Advisories (Drupal - Composer prevention layer)
293- ✅ Socket CLI (Next.js - supply chain attack detection)
294
295**Security Coverage:**
296- Drupal: 40% → **90%** (10 security layers)
297- Next.js: 0% → **85%** (7 security layers)
298
299See `.work-in-progress-v2.0.0.md` for full implementation details.