/risk-mitigate — Implement Mitigation Measures
Read the shared risk model at .claude/skills/shared/risk-model.md for all measure definitions, detection signals, tier requirements, and output formats. Do not duplicate those lists here — always reference the shared model as the single source of truth.
Step 1 — Read Assessment from CLAUDE.md
- Read the project's
CLAUDE.md file.
- Look for a section titled
## Risk Radar Assessment.
- If not found, stop and tell the user:
No Risk Radar Assessment found in CLAUDE.md. Please run /risk-assess first.
- If found, parse every
### Module: {name} subsection. For each module extract:
- The five dimension scores (codeType, language, deployment, data, blastRadius)
- The LLM Runtime Integration level (L0–L4), if present (default L0 for legacy assessments)
- The overall Tier (1–4)
- Print a summary table:
Found N module(s) with risk assessments:
| Module | Tier | Highest Dimension | LLM Runtime |
|--------|------|-------------------|-------------|
| ... | ... | ... | L{N} |
Step 2 — Detect Existing Mitigations
For each module (or repo-wide for measures like CI and linting):
2a. Determine project type
- JavaScript/TypeScript:
package.json exists
- Python:
pyproject.toml, requirements.txt, or setup.py exists
- Rust:
Cargo.toml exists
- Multi-language: multiple of the above
2b. Check detection signals
Use the Detection signals tables in .claude/skills/shared/risk-model.md (one per tier) to check which mitigations are already present.
Tier 1 checks:
| Measure |
What to check |
| Linter |
Files: .eslintrc*, eslint.config.*, ruff.toml, .pylintrc. Scripts: lint in package.json |
| Formatter |
Files: .prettierrc*, rustfmt.toml. Config: black or ruff.format in pyproject.toml |
| Type Checking |
tsconfig.json with "strict": true. Python: mypy.ini or [tool.mypy] in pyproject.toml |
| Pre-Commit Hooks |
Dirs: .husky/. Files: .pre-commit-config.yaml. Config: lint-staged in package.json |
| Dependency Check |
audit step in CI workflows. Python: pip-audit or safety in dependencies |
| CI/CD |
Dirs: .github/workflows/. Files: Jenkinsfile, .gitlab-ci.yml |
Tier 2 checks:
| Measure |
What to check |
| SAST |
semgrep or codeql in CI workflow files. Dir: .semgrep/ |
| AI Code Review |
coderabbit.yaml, Copilot review in CI |
| Property-Based Tests |
fast-check or hypothesis in dependencies |
| SonarQube |
sonar-project.properties. Sonar step in CI |
Tier 3 checks:
| Measure |
What to check |
| Branch Protection |
Run: gh api repos/{owner}/{repo}/branches/main/protection (200 = enabled) |
| Fuzzing |
Dir: fuzz/. Deps: cargo-fuzz, AFL config files |
| Canary/Gradual Deploy |
Check CI for canary or blue-green deployment steps |
Tier 4 checks:
| Measure |
What to check |
| Formal Verification |
Files: *.dfy (Dafny), *.tla (TLA+), SPARK annotations |
| MC/DC Coverage |
Coverage config requiring MC/DC |
For each check, record the result as:
- Present — config file or tool found and appears correctly configured
- Missing — no config found
- Partial — config exists but incomplete (e.g., linter config but no CI integration)
Step 3 — Present Gap Analysis
For each module, show a gap analysis table grouped by tier (cumulative up to the module's tier):
### Gap Analysis: {module-name} (Tier {N})
#### Tier 1 — Automated Gates
| Measure | Type | Status | Details |
|---------|------|--------|---------|
| Linter & Formatter | deterministic | Present | .eslintrc.js found |
| Pre-Commit Hooks | deterministic | Missing | — |
| ...
#### Tier 2 — Extended Assurance
| Measure | Type | Status | Details |
|---------|------|--------|---------|
| SAST | deterministic | Missing | — |
| ...
After the table, summarize:
- Total measures required for this tier: X
- Already present: Y
- Missing: Z
- Completion: Y/X (percentage)
3b. LLM Runtime Callout (L3+ modules only)
If any module has llmRuntimeLevel >= 3, display a callout before moving
to implementation, making it explicit that our mitigation catalog is
insufficient for runtime LLM risks:
⚠️ {module} has LLM Runtime Integration L{N} ({name})
The mitigations listed above cover build-time risks (how the code was
written). Your runtime LLM use introduces a qualitatively different risk
class — prompt injection, unauthorized tool calls, agentic runaway — that
this framework does not deeply cover.
For these risks, defer to specialized frameworks:
• OWASP LLM Top 10
https://owasp.org/www-project-top-10-for-large-language-model-applications/
• Palo Alto Unit 42 SHIELD
https://unit42.paloaltonetworks.com/securing-vibe-coding-tools/
• Aikido VCAL
https://www.aikido.dev/blog/vibe-coding-security
• Google SAIF
https://saif.google/secure-ai-framework
Recommended runtime mitigations (not installable via this skill):
- Prompt injection detection and input sanitization
- Tool allow-list / deny-list with least-privilege function calling
- Output filtering (PII redaction, unsafe content detection)
- Sandbox for code execution (e2b, Firecracker, gVisor)
- Rate limiting and cost caps per user/session
- Audit logging of all tool calls with prompt provenance
- Human-in-the-loop confirmation for destructive actions
Ask the user:
Would you like to track these runtime mitigations in CLAUDE.md as
pending items? [y/N]
If yes, add a new table ### LLM Runtime Mitigations: {module-name} (L{N})
to CLAUDE.md with the recommended runtime mitigations as Pending, plus
links to the source framework for each. The skill does not install
these tools — they require architectural decisions that belong with the
user, not an automated skill.
Step 4 — Interactive Implementation
Work through missing measures in priority order: all Tier 1 gaps first, then Tier 2, etc.
For each missing measure:
- Explain what the measure does and why the module's tier requires it.
- Ask the user whether they want to implement it now. Wait for confirmation before proceeding.
- Implement based on the tier level:
Tier 1 — Install and configure directly
| Measure |
JS/TS Project |
Python Project |
| Linter |
npm install -D eslint, create eslint.config.js with recommended rules |
pip install ruff, create ruff.toml |
| Formatter |
npm install -D prettier, create .prettierrc |
Add [tool.ruff.format] to pyproject.toml or pip install black |
| Type Checking |
Ensure tsconfig.json has "strict": true |
pip install mypy, create mypy.ini or add [tool.mypy] to pyproject.toml |
| Pre-Commit |
npm install -D husky lint-staged, npx husky init, configure lint-staged in package.json |
pip install pre-commit, create .pre-commit-config.yaml |
| Dependency Check |
Add npm audit step to CI workflow |
Add pip-audit step to CI workflow |
| CI Build & Tests |
Create .github/workflows/ci.yml with install, lint, build, test steps |
Create .github/workflows/ci.yml with install, lint, test steps |
After installing, verify the tool works:
- Run the linter and confirm it executes without config errors
- Run the formatter in check mode
- Run the type checker
- Validate the CI workflow YAML is well-formed
Tier 2 — Install where possible, suggest for others
| Measure |
Action |
| SAST (Semgrep) |
Create .github/workflows/semgrep.yml with Semgrep CI action. Or add CodeQL workflow |
| AI Code Review |
Suggest enabling CodeRabbit or Copilot review. Provide setup link |
| Property-Based Tests |
JS/TS: npm install -D fast-check. Python: pip install hypothesis. Create one example test file |
| SonarQube |
Create sonar-project.properties, add SonarCloud step to CI. Requires user to set up project in SonarCloud |
| Sampling Review |
Suggest CODEOWNERS file and PR review policy. Provide template |
Tier 3 — Configure where possible, guide for others
| Measure |
Action |
| Branch Protection |
Configure via gh api -X PUT repos/{owner}/{repo}/branches/main/protection with required reviews, status checks |
| Sandbox/Isolation |
Provide guidance for Docker-based isolation, Deno sandbox, or Firecracker setup |
| Fuzzing |
JS/TS: Suggest jsfuzz or custom property-based fuzzing. Rust: cargo install cargo-fuzz, create fuzz/ dir. Provide starter template |
| Penetration Testing |
Provide a recommended schedule and checklist. Suggest tools: OWASP ZAP, Burp Suite |
| Canary Deployments |
Provide a workflow template for gradual rollout with auto-rollback |
| PromptBOM/Provenance |
Create a PROMPTBOM.md template documenting AI model, prompt, and approver for each module |
Tier 4 — Recommendations and checklists only
| Measure |
Action |
| Formal Verification |
Recommend tools (Dafny, TLA+, SPARK) based on language. Provide getting-started links |
| Independent Re-Verification |
Provide a process checklist for independent review per DO-178C DAL A |
| MC/DC Coverage |
Recommend coverage tools and configuration for MC/DC. Provide setup guide |
| Contract-Based Design |
Suggest libraries: ts-contract (TS), icontract (Python), contracts (Rust). Show example |
| Certification Process |
Provide a checklist for relevant standard (IEC 61508, DO-178C, ISO 26262) |
| AI as Draft Aid Only |
Suggest a workflow policy document template restricting AI to proposal-only role |
After each installation
Step 5 — Update CLAUDE.md
After completing implementations (or if the user stops partway through):
- Open
CLAUDE.md
- For each assessed module, add or update a
### Mitigations: {module-name} (Tier N) section
- Use the format from
.claude/skills/shared/risk-model.md:
### Mitigations: {module-name} (Tier {N})
_Updated by `/risk-mitigate` on YYYY-MM-DD_
| Measure | Status | Details |
| ------------------ | ------- | ------------------------------ |
| Linter & Formatter | Present | eslint.config.js, .prettierrc |
| Type Checking | Set up | tsconfig.json strict enabled |
| Pre-Commit Hooks | Set up | husky + lint-staged configured |
| SAST | Pending | — |
| Branch Protection | N/A | Not required for Tier 1 |
Status values:
- Present — was already in place before running this skill
- Set up — installed/configured during this session
- Pending — required but not yet implemented (user deferred or manual action needed)
- N/A — not required at this module's tier level
- Commit the CLAUDE.md update:
git add CLAUDE.md
git commit -m "docs: update mitigation status in CLAUDE.md"
Step 6 — Update ADR (if exists)
If an ADR was generated during /risk-assess, update it with mitigation status:
Check for ADR reference in CLAUDE.md:
- Look for a line like
_Architecture Decision: See [ADR-NNN](docs/adr/NNN-risk-classification-*.md)_
- Extract the ADR file path
If ADR exists, update it:
- Read the current ADR file
- Add or replace a section at the end titled
## Implementation Status (or ## Mitigations Implemented if following strict Nygard format)
- Include the mitigation status table from CLAUDE.md
- Update the Status field at the top:
- If all required mitigations are now "Present" or "Set up" → change Status to
Accepted
- If some are still "Pending" → keep Status as
Proposed
Example addition to ADR:
## Implementation Status
_Updated by `/risk-mitigate` on YYYY-MM-DD_
| Measure | Status | Details |
| ------------------ | ---------- | ------------------------------------------- |
| Linter & Formatter | ✅ Set up | eslint.config.js, .prettierrc |
| Pre-Commit Hooks | ✅ Set up | husky + lint-staged |
| SAST | ⬜ Pending | CodeQL workflow created, awaiting first run |
**Overall Status:** 8/10 measures active → ADR Status updated to **Accepted**
Update arc42 reference (if exists):
Commit the ADR update:
git add docs/adr/NNN-*.md docs/arc42/ (if modified)
git commit -m "docs: update ADR with mitigation implementation status"
Important Guidelines
- Always read
.claude/skills/shared/risk-model.md at the start for the authoritative measure definitions and detection signals. Do not hardcode or duplicate those lists.
- Never install anything without asking the user first. Present the measure, explain it, and wait for confirmation.
- Verify each tool after installation. Run the tool and confirm it executes without errors.
- Commit each tool separately. Each installed mitigation gets its own commit for clean history.
- Handle both JS/TS and Python projects. Detect from
package.json vs pyproject.toml/requirements.txt.
- Tiers are cumulative. A Tier 3 module needs all Tier 1 + Tier 2 + Tier 3 measures.
- Be conservative with automated configuration. For measures that require external service setup (SonarCloud, CodeRabbit), provide guidance rather than attempting partial setup that won't work.
- If a measure is already present, confirm it is properly configured. A linter config without CI integration is only "Partial".
1---2name: risk-mitigate3description: Help implement mitigation measures based on the risk assessment in CLAUDE.md. Detects existing tools, installs missing ones, and tracks progress.4---56# /risk-mitigate — Implement Mitigation Measures78Read the shared risk model at `.claude/skills/shared/risk-model.md` for all measure definitions, detection signals, tier requirements, and output formats. Do not duplicate those lists here — always reference the shared model as the single source of truth.910---1112## Step 1 — Read Assessment from CLAUDE.md13141. Read the project's `CLAUDE.md` file.152. Look for a section titled `## Risk Radar Assessment`.163. If not found, stop and tell the user:17 > No Risk Radar Assessment found in CLAUDE.md. Please run `/risk-assess` first.184. If found, parse every `### Module: {name}` subsection. For each module extract:19 - The five dimension scores (codeType, language, deployment, data, blastRadius)20 - The **LLM Runtime Integration** level (L0–L4), if present (default L0 for legacy assessments)21 - The overall **Tier** (1–4)225. Print a summary table:2324```25Found N module(s) with risk assessments:26| Module | Tier | Highest Dimension | LLM Runtime |27|--------|------|-------------------|-------------|28| ... | ... | ... | L{N} |29```3031---3233## Step 2 — Detect Existing Mitigations3435For each module (or repo-wide for measures like CI and linting):3637### 2a. Determine project type3839- **JavaScript/TypeScript**: `package.json` exists40- **Python**: `pyproject.toml`, `requirements.txt`, or `setup.py` exists41- **Rust**: `Cargo.toml` exists42- **Multi-language**: multiple of the above4344### 2b. Check detection signals4546Use the **Detection signals** tables in `.claude/skills/shared/risk-model.md` (one per tier) to check which mitigations are already present.4748**Tier 1 checks:**4950| Measure | What to check |51| ---------------- | ------------------------------------------------------------------------------------------------- |52| Linter | Files: `.eslintrc*`, `eslint.config.*`, `ruff.toml`, `.pylintrc`. Scripts: `lint` in package.json |53| Formatter | Files: `.prettierrc*`, `rustfmt.toml`. Config: `black` or `ruff.format` in pyproject.toml |54| Type Checking | `tsconfig.json` with `"strict": true`. Python: `mypy.ini` or `[tool.mypy]` in pyproject.toml |55| Pre-Commit Hooks | Dirs: `.husky/`. Files: `.pre-commit-config.yaml`. Config: `lint-staged` in package.json |56| Dependency Check | `audit` step in CI workflows. Python: `pip-audit` or `safety` in dependencies |57| CI/CD | Dirs: `.github/workflows/`. Files: `Jenkinsfile`, `.gitlab-ci.yml` |5859**Tier 2 checks:**6061| Measure | What to check |62| -------------------- | ------------------------------------------------------------ |63| SAST | `semgrep` or `codeql` in CI workflow files. Dir: `.semgrep/` |64| AI Code Review | `coderabbit.yaml`, Copilot review in CI |65| Property-Based Tests | `fast-check` or `hypothesis` in dependencies |66| SonarQube | `sonar-project.properties`. Sonar step in CI |6768**Tier 3 checks:**6970| Measure | What to check |71| --------------------- | --------------------------------------------------------------------------- |72| Branch Protection | Run: `gh api repos/{owner}/{repo}/branches/main/protection` (200 = enabled) |73| Fuzzing | Dir: `fuzz/`. Deps: `cargo-fuzz`, AFL config files |74| Canary/Gradual Deploy | Check CI for canary or blue-green deployment steps |7576**Tier 4 checks:**7778| Measure | What to check |79| ------------------- | --------------------------------------------------------- |80| Formal Verification | Files: `*.dfy` (Dafny), `*.tla` (TLA+), SPARK annotations |81| MC/DC Coverage | Coverage config requiring MC/DC |8283For each check, record the result as:8485- **Present** — config file or tool found and appears correctly configured86- **Missing** — no config found87- **Partial** — config exists but incomplete (e.g., linter config but no CI integration)8889---9091## Step 3 — Present Gap Analysis9293For each module, show a gap analysis table grouped by tier (cumulative up to the module's tier):9495```96### Gap Analysis: {module-name} (Tier {N})9798#### Tier 1 — Automated Gates99| Measure | Type | Status | Details |100|---------|------|--------|---------|101| Linter & Formatter | deterministic | Present | .eslintrc.js found |102| Pre-Commit Hooks | deterministic | Missing | — |103| ...104105#### Tier 2 — Extended Assurance106| Measure | Type | Status | Details |107|---------|------|--------|---------|108| SAST | deterministic | Missing | — |109| ...110```111112After the table, summarize:113114- Total measures required for this tier: X115- Already present: Y116- Missing: Z117- Completion: Y/X (percentage)118119### 3b. LLM Runtime Callout (L3+ modules only)120121If any module has `llmRuntimeLevel >= 3`, display a **callout** before moving122to implementation, making it explicit that our mitigation catalog is123**insufficient** for runtime LLM risks:124125```126⚠️ {module} has LLM Runtime Integration L{N} ({name})127128The mitigations listed above cover build-time risks (how the code was129written). Your runtime LLM use introduces a qualitatively different risk130class — prompt injection, unauthorized tool calls, agentic runaway — that131this framework does not deeply cover.132133For these risks, defer to specialized frameworks:134135 • OWASP LLM Top 10136 https://owasp.org/www-project-top-10-for-large-language-model-applications/137 • Palo Alto Unit 42 SHIELD138 https://unit42.paloaltonetworks.com/securing-vibe-coding-tools/139 • Aikido VCAL140 https://www.aikido.dev/blog/vibe-coding-security141 • Google SAIF142 https://saif.google/secure-ai-framework143144Recommended runtime mitigations (not installable via this skill):145 - Prompt injection detection and input sanitization146 - Tool allow-list / deny-list with least-privilege function calling147 - Output filtering (PII redaction, unsafe content detection)148 - Sandbox for code execution (e2b, Firecracker, gVisor)149 - Rate limiting and cost caps per user/session150 - Audit logging of all tool calls with prompt provenance151 - Human-in-the-loop confirmation for destructive actions152```153154Ask the user:155156```157Would you like to track these runtime mitigations in CLAUDE.md as158pending items? [y/N]159```160161If yes, add a new table `### LLM Runtime Mitigations: {module-name} (L{N})`162to CLAUDE.md with the recommended runtime mitigations as `Pending`, plus163links to the source framework for each. The skill **does not** install164these tools — they require architectural decisions that belong with the165user, not an automated skill.166167---168169## Step 4 — Interactive Implementation170171Work through missing measures in priority order: all Tier 1 gaps first, then Tier 2, etc.172173For each missing measure:1741751. **Explain** what the measure does and why the module's tier requires it.1762. **Ask the user** whether they want to implement it now. Wait for confirmation before proceeding.1773. **Implement** based on the tier level:178179### Tier 1 — Install and configure directly180181| Measure | JS/TS Project | Python Project |182| ---------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |183| Linter | `npm install -D eslint`, create `eslint.config.js` with recommended rules | `pip install ruff`, create `ruff.toml` |184| Formatter | `npm install -D prettier`, create `.prettierrc` | Add `[tool.ruff.format]` to pyproject.toml or `pip install black` |185| Type Checking | Ensure `tsconfig.json` has `"strict": true` | `pip install mypy`, create `mypy.ini` or add `[tool.mypy]` to pyproject.toml |186| Pre-Commit | `npm install -D husky lint-staged`, `npx husky init`, configure lint-staged in package.json | `pip install pre-commit`, create `.pre-commit-config.yaml` |187| Dependency Check | Add `npm audit` step to CI workflow | Add `pip-audit` step to CI workflow |188| CI Build & Tests | Create `.github/workflows/ci.yml` with install, lint, build, test steps | Create `.github/workflows/ci.yml` with install, lint, test steps |189190After installing, **verify** the tool works:191192- Run the linter and confirm it executes without config errors193- Run the formatter in check mode194- Run the type checker195- Validate the CI workflow YAML is well-formed196197### Tier 2 — Install where possible, suggest for others198199| Measure | Action |200| -------------------- | ----------------------------------------------------------------------------------------------------------- |201| SAST (Semgrep) | Create `.github/workflows/semgrep.yml` with Semgrep CI action. Or add CodeQL workflow |202| AI Code Review | Suggest enabling CodeRabbit or Copilot review. Provide setup link |203| Property-Based Tests | JS/TS: `npm install -D fast-check`. Python: `pip install hypothesis`. Create one example test file |204| SonarQube | Create `sonar-project.properties`, add SonarCloud step to CI. Requires user to set up project in SonarCloud |205| Sampling Review | Suggest CODEOWNERS file and PR review policy. Provide template |206207### Tier 3 — Configure where possible, guide for others208209| Measure | Action |210| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |211| Branch Protection | Configure via `gh api -X PUT repos/{owner}/{repo}/branches/main/protection` with required reviews, status checks |212| Sandbox/Isolation | Provide guidance for Docker-based isolation, Deno sandbox, or Firecracker setup |213| Fuzzing | JS/TS: Suggest `jsfuzz` or custom property-based fuzzing. Rust: `cargo install cargo-fuzz`, create `fuzz/` dir. Provide starter template |214| Penetration Testing | Provide a recommended schedule and checklist. Suggest tools: OWASP ZAP, Burp Suite |215| Canary Deployments | Provide a workflow template for gradual rollout with auto-rollback |216| PromptBOM/Provenance | Create a `PROMPTBOM.md` template documenting AI model, prompt, and approver for each module |217218### Tier 4 — Recommendations and checklists only219220| Measure | Action |221| --------------------------- | --------------------------------------------------------------------------------------------- |222| Formal Verification | Recommend tools (Dafny, TLA+, SPARK) based on language. Provide getting-started links |223| Independent Re-Verification | Provide a process checklist for independent review per DO-178C DAL A |224| MC/DC Coverage | Recommend coverage tools and configuration for MC/DC. Provide setup guide |225| Contract-Based Design | Suggest libraries: `ts-contract` (TS), `icontract` (Python), `contracts` (Rust). Show example |226| Certification Process | Provide a checklist for relevant standard (IEC 61508, DO-178C, ISO 26262) |227| AI as Draft Aid Only | Suggest a workflow policy document template restricting AI to proposal-only role |228229### After each installation230231- Verify the tool works (run it, check output)232- Create a git commit for the installed tool:233 ```234 git add <relevant files>235 git commit -m "chore: set up {tool name} for {module}"236 ```237238---239240## Step 5 — Update CLAUDE.md241242After completing implementations (or if the user stops partway through):2432441. Open `CLAUDE.md`2452. For each assessed module, add or update a `### Mitigations: {module-name} (Tier N)` section2463. Use the format from `.claude/skills/shared/risk-model.md`:247248```markdown249### Mitigations: {module-name} (Tier {N})250251_Updated by `/risk-mitigate` on YYYY-MM-DD_252253| Measure | Status | Details |254| ------------------ | ------- | ------------------------------ |255| Linter & Formatter | Present | eslint.config.js, .prettierrc |256| Type Checking | Set up | tsconfig.json strict enabled |257| Pre-Commit Hooks | Set up | husky + lint-staged configured |258| SAST | Pending | — |259| Branch Protection | N/A | Not required for Tier 1 |260```261262Status values:263264- **Present** — was already in place before running this skill265- **Set up** — installed/configured during this session266- **Pending** — required but not yet implemented (user deferred or manual action needed)267- **N/A** — not required at this module's tier level2682694. Commit the CLAUDE.md update:270 ```271 git add CLAUDE.md272 git commit -m "docs: update mitigation status in CLAUDE.md"273 ```274275---276277## Step 6 — Update ADR (if exists)278279If an ADR was generated during `/risk-assess`, update it with mitigation status:2802811. **Check for ADR reference in CLAUDE.md**:282 - Look for a line like `_Architecture Decision: See [ADR-NNN](docs/adr/NNN-risk-classification-*.md)_`283 - Extract the ADR file path2842852. **If ADR exists, update it**:286 - Read the current ADR file287 - Add or replace a section at the end titled `## Implementation Status` (or `## Mitigations Implemented` if following strict Nygard format)288 - Include the mitigation status table from CLAUDE.md289 - Update the **Status** field at the top:290 - If all required mitigations are now "Present" or "Set up" → change Status to `Accepted`291 - If some are still "Pending" → keep Status as `Proposed`2922933. **Example addition to ADR**:294295 ```markdown296 ## Implementation Status297298 _Updated by `/risk-mitigate` on YYYY-MM-DD_299300 | Measure | Status | Details |301 | ------------------ | ---------- | ------------------------------------------- |302 | Linter & Formatter | ✅ Set up | eslint.config.js, .prettierrc |303 | Pre-Commit Hooks | ✅ Set up | husky + lint-staged |304 | SAST | ⬜ Pending | CodeQL workflow created, awaiting first run |305306 **Overall Status:** 8/10 measures active → ADR Status updated to **Accepted**307 ```3083094. **Update arc42 reference (if exists)**:310 - If `docs/arc42/chapters/09_architecture_decisions.adoc` contains a reference to this ADR311 - Update the status badge there as well:312 ```asciidoc313 **Status:** Accepted | **Date:** YYYY-MM-DD | **Tier:** {N} | **Mitigations:** 8/10 active314 ```3153165. **Commit the ADR update**:317 ```bash318 git add docs/adr/NNN-*.md docs/arc42/ (if modified)319 git commit -m "docs: update ADR with mitigation implementation status"320 ```321322---323324## Important Guidelines325326- **Always read `.claude/skills/shared/risk-model.md`** at the start for the authoritative measure definitions and detection signals. Do not hardcode or duplicate those lists.327- **Never install anything without asking the user first.** Present the measure, explain it, and wait for confirmation.328- **Verify each tool after installation.** Run the tool and confirm it executes without errors.329- **Commit each tool separately.** Each installed mitigation gets its own commit for clean history.330- **Handle both JS/TS and Python projects.** Detect from `package.json` vs `pyproject.toml`/`requirements.txt`.331- **Tiers are cumulative.** A Tier 3 module needs all Tier 1 + Tier 2 + Tier 3 measures.332- **Be conservative with automated configuration.** For measures that require external service setup (SonarCloud, CodeRabbit), provide guidance rather than attempting partial setup that won't work.333- **If a measure is already present, confirm it is properly configured.** A linter config without CI integration is only "Partial".