Skip to content

[AI-59] llm: wire bitwarden-security-engineer ADR checks to consulting-adrs - #178

Draft
SaintPatrck wants to merge 1 commit into
consulting-adrs-planning-toolsfrom
adr-consulting-wiring
Draft

[AI-59] llm: wire bitwarden-security-engineer ADR checks to consulting-adrs#178
SaintPatrck wants to merge 1 commit into
consulting-adrs-planning-toolsfrom
adr-consulting-wiring

Conversation

@SaintPatrck

Copy link
Copy Markdown
Contributor

🎟️ Tracking

AI-59

📔 Objective

Wires bitwarden-security-engineer's ADR-alignment checks to the consulting-adrs skill. The bitwarden-security-context, reviewing-security-architecture, and threat-modeling skills now perform the check by invoking Skill(bitwarden-planning-tools:consulting-adrs) instead of reading a local references/adr-alignment.md; that reference file is removed. The shared rule now lives in one cross-plugin skill that returns structured conflict/gap/aligned findings with cited ADRs.

Adds an install-time dependency on bitwarden-planning-tools (1.0.0+). Version bump 1.3.0 to 1.4.0 with changelog.

Stacked on #177 (the plugin and skill), which must land first.

…skill

Replace the local references/adr-alignment.md dedup with invocations of
Skill(bitwarden-planning-tools:consulting-adrs) in bitwarden-security-context,
reviewing-security-architecture, and threat-modeling. The shared ADR-alignment
rule now lives in one cross-plugin skill that returns structured
conflict/gap/aligned findings with cited ADRs; the reference file is removed.

Adds an install-time dependency on bitwarden-planning-tools (1.0.0+). Version
bump 1.3.0 -> 1.4.0 with changelog.

NOTE: depends on the consulting-adrs skill (bitwarden-planning-tools 1.0.0),
which is on a separate unmerged branch — that must land first.
@SaintPatrck SaintPatrck added the ai-review Request a Claude code review label Jul 31, 2026
@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

Plugin Validation Report — PR #178

Validated plugins/bitwarden-security-engineer (1.3.0 → 1.4.0) after the ADR-alignment refactor that deletes references/adr-alignment.md and routes the check to Skill(bitwarden-planning-tools:consulting-adrs).

Verdict: no critical issues. 3 major items should be fixed before merge — one of them will fail CI.

Check Result
plugin-validator (structure, manifest, agents, skills, hooks, MCP) Pass, 2 major doc/robustness gaps
skill-reviewer (3 changed SKILL.md files) Needs improvement
reviewing-claude-config (security) Pass — no secrets, no permission regressions
Reference integrity (deleted file) Pass — zero dangling references
Version + changelog consistency Pass
Formatting (prettier) Fail — 2 files

Critical (0)

None.


Major — must fix

1. Prettier violations will fail the lint.yml CI workflow

README.md:21 — the version-bump left the table cell under-padded:

| [bitwarden-security-engineer](plugins/bitwarden-security-engineer/) | 1.4.0 | Application security engineering: ...

Every sibling row pads the Version column to width 7 (| 1.4.0 |). Prettier normalizes markdown table padding, so prettier --check rejects this.

plugins/bitwarden-security-engineer/.claude-plugin/plugin.json:18-20 — the diff expanded a single-element array that previously passed prettier:

  "agents": [
    "./agents/bitwarden-security-engineer.md"
  ]

The collapsed form is ~55 chars, well under prettier's default printWidth: 80, and the repo has no .prettierrc overriding defaults — prettier will collapse it back to "agents": ["./agents/bitwarden-security-engineer.md"].

Fix: pnpm run format

Note: prettier could not be executed in this validation sandbox (bash restricted), so both findings are derived from the diff and the surrounding file state rather than from tool output. The evidence is unambiguous on both counts, but confirm locally with pnpm run lint.

Per .claude/CLAUDE.md, a formatting-only follow-up needs no additional version bump — fold it into this PR.

2. No degradation contract for the new hard cross-plugin dependency

  • skills/bitwarden-security-context/SKILL.md:66
  • skills/reviewing-security-architecture/SKILL.md:133
  • skills/threat-modeling/SKILL.md:12

All three instruct Skill(bitwarden-planning-tools:consulting-adrs) unconditionally with no "if unavailable" branch. Because the local fallback (references/adr-alignment.md) was deleted in the same commit, an environment without bitwarden-planning-tools now loses the ADR ground rules entirely rather than degrading. Repo CLAUDE.md requires plugins to "fail safely and degrade gracefully," and the plugin already has both precedents available:

  • Required-and-abort — plugins/bitwarden-testing-tools/skills/assessing-test-coverage/SKILL.md:18: "If bitwarden-atlassian-tools is not installed, stop and prompt the user to install it before continuing."
  • Optional-and-degrade — this plugin's own agents/bitwarden-security-engineer.md:73: "These skills are optional — if unavailable, provide standard security recommendations."

Fix: add one sentence per call site. If choosing "degrade," restore the three ground rules inline as the fallback, since the reference file is gone:

If bitwarden-planning-tools is not installed, apply these rules directly: a design conflicting with an accepted ADR is a finding, not a style preference; a significant architectural decision with no ADR is a gap worth flagging; confirm an ADR is Accepted before citing it — superseded or deprecated decisions are historical context, not current constraints. Note explicitly that the ADR check was skipped rather than treating the design as ADR-aligned.

3. New dependency undocumented outside the CHANGELOG

  • plugins/bitwarden-security-engineer/README.md — no mention of ADRs or bitwarden-planning-tools anywhere in the file
  • plugins/bitwarden-security-engineer/agents/bitwarden-security-engineer.md:67-73 — the cross-plugin section documents the optional bitwarden-software-engineer dependency but was not extended

CHANGELOG.md:12 states "Requires the bitwarden-planning-tools plugin (1.0.0+)", but that requirement appears in no user-facing doc. plugin.json has no dependency field, so README/agent prose is the only mechanism. The reverse direction is documented — plugins/bitwarden-planning-tools/README.md:19-21 has a Cross-Plugin Integration table naming bitwarden-security-engineer as the consumer.

Fix: add a ## Related Plugins / ## Companion Plugins section following the precedent at plugins/bitwarden-testing-tools/README.md:16-31 (how the dependency is used, whether optional, install command), and name bitwarden-planning-tools in the agent's cross-plugin section.


Minor — should fix (introduced by this PR)

Location Issue Fix
skills/bitwarden-security-context/SKILL.md:66 ADR check weakened from mandatory to descriptive. The deleted file said "Security assessments must check alignment against these"; the replacement reads "To check a design or change against them, invoke…", which sounds optional. The other two call sites kept imperative framing. Restore the obligation: "Security assessments must check alignment against them — invoke Skill(…), which returns…"
All three call sites The security-specific rationale was dropped: the deleted file explained that "a design can satisfy P01-P06 in the abstract while still contradicting a specific, already-decided architectural direction." consulting-adrs is deliberately domain-neutral and cannot supply this. Restore the clause in bitwarden-security-context:66
skills/reviewing-security-architecture/SKILL.md:133-136 Of the three ground rules, the local bullets cover conflict ("Cite it, don't just flag it") and gap ("gap triggers") — but nothing covers verify-status-before-citing, the one rule with no local survivor. Add a third bullet on ADR status verification

Minor — pre-existing (out of scope for this PR; would need their own bump)

  • README.md:11-19 — Skills table lists 7 of 9 skills; missing bitwarden-security-context (changed here, and invoked cross-plugin by two other plugins) and auditing-hackerone-vulns.
  • skills/bitwarden-security-context/SKILL.md:3 — description promises "data classification standards," but that table actually lives in reviewing-security-architecture/SKILL.md:88-97; the skill's third section is "Security Requirements by Category (VD/EK/AT/SC/TC)". Also uses second person ("Use when you need…") with no quoted trigger phrases, unlike the other two skills.
  • agents/bitwarden-security-engineer.md:3 — description has no <example> blocks; the repo's other four agents all use them.
  • agents/bitwarden-security-engineer.md:6-12skills: list declares 6 of 9, omitting bitwarden-security-context, perform-security-review, auditing-hackerone-vulns, while line 32 claims "All skills are preloaded."
  • skills/perform-security-review/SKILL.md:4-5argument-hint is a slash-command field, not a SKILL.md field; allowed-tools is space-separated where skills/auditing-hackerone-vulns/SKILL.md:4 uses commas. If the parser expects a comma list, the intended tool grants may not apply.
  • skills/reviewing-security-architecture/SKILL.md:6 and skills/threat-modeling/SKILL.md:6 — no H1; both open at ##.
  • None of the three changed skills declare allowed-tools, though they now dispatch cross-plugin. Non-blocking (omission grants defaults rather than restricting), but inconsistent with assessing-test-coverage/SKILL.md:5, architecting-solutions/SKILL.md:4, and this plugin's own perform-security-review/SKILL.md:5.

Verified clean

Reference integrity. A repo-wide search for adr-alignment returns exactly one hit — CHANGELOG.md:12, the historical note describing the removal. No SKILL.md, references/*.md, README.md, or agent file still points at the deleted path. The now-empty plugin-root references/ directory was removed cleanly. All 15 remaining references/… and examples/… paths across the plugin resolve to existing files. The plugin no longer uses ${CLAUDE_PLUGIN_ROOT} anywhere.

Dependency target is real. plugins/bitwarden-planning-tools/skills/consulting-adrs/SKILL.md exists with name: consulting-adrs, and bitwarden-planning-tools is at 1.0.0, satisfying the "1.0.0+" claim. Skill(plugin:skill) is the correct invocation form and matches all three existing cross-plugin dispatches in this repo (assessing-test-coverage/SKILL.md:18, performing-multi-agent-code-review/SKILL.md:69, architecting-solutions/SKILL.md:11).

The migration is a content upgrade when the dependency is present. consulting-adrs covers all three deleted ground rules and strengthens each: conflict now requires quoting the decision text (line 21), "significant" gets a concrete test (line 22), and status handling covers the full Accepted/Superseded/Deprecated/Rejected/Proposed taxonomy (line 18). It adds a fourth finding type (Stale-reference) and anti-hallucination rules the deleted file lacked.

Version and changelog. 1.4.0 agrees across .claude-plugin/plugin.json, .claude-plugin/marketplace.json:57, README.md:21, and the CHANGELOG.md heading. Keep a Changelog format is correct, entries are in descending order, ### Changed is the right category, and MINOR is the right semver call for a behavior change plus a new external dependency with no removed capability.

Security scan — no findings. No secrets, tokens, API keys, or hardcoded credentials in any changed file. No settings.local.json or credential files (.env, .pem, id_rsa) tracked anywhere in the repo. No settings files touched, so no permission-scoping or dangerous-auto-approval changes. The only secret-pattern hits in the plugin are skills/detecting-secrets/SKILL.md:36,40 — unchanged by this PR and explicitly labeled illustrative "NOT a real secret" / "REAL secret" teaching fixtures. The newly depended-on consulting-adrs scopes its network access correctly: WebFetch(domain:contributing.bitwarden.com) over HTTPS, not open WebFetch.

Skill content quality. Word counts are within or acceptably near the 1,000–3,000 target: bitwarden-security-context 738 (under, but a table-dense quick-reference by design), reviewing-security-architecture 1,116, threat-modeling 1,817. Progressive disclosure is intact. Removing the ADR bullet from threat-modeling/SKILL.md:116-121 improved that section's coherence — it was the only entry using a ${CLAUDE_PLUGIN_ROOT} prefix and the only one pointing outside the skill's own references/; the remaining four bullets are uniform and all resolve.

Structure. 1 agent (valid: name 29 chars lowercase-hyphens, model: opus, color: red, tools includes Skill, ~830-word system prompt). 9 skills, all with valid name + description frontmatter matching their directory names. No hooks, no MCP config. README.md, CHANGELOG.md, .claude-plugin/plugin.json all present; no stray artifacts among 24 files.


Recommended order

  1. pnpm run format — unblocks CI (Major Dependency Dashboard #1)
  2. Add not-installed behavior to the three Skill() call sites; if degrading, restore the ground rules inline (Major Initialize Bitwarden Claude Plugin Marketplace #2)
  3. Document the bitwarden-planning-tools requirement in the plugin README and agent (Major Initial AI setup #3)
  4. Restore "must" and the P01-P06 rationale at bitwarden-security-context:66; add the status-verification bullet to reviewing-security-architecture:133-136 (Minor)
  5. Defer the pre-existing minors to a follow-up PR with its own version bump

Validated with plugin-dev:plugin-validator, plugin-dev:skill-reviewer, and claude-config-validator:reviewing-claude-config. scripts/validate-plugin-structure.sh, scripts/validate-marketplace.sh, and prettier could not be executed in this sandbox; those checks were performed by direct file inspection instead.

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

🤖 Bitwarden Claude Code Review

Overall Assessment: REQUEST CHANGES

Documentation-only change that repoints the ADR-alignment check in three bitwarden-security-engineer skills from a local references/adr-alignment.md to Skill(bitwarden-planning-tools:consulting-adrs), deletes that reference file, and bumps the plugin 1.3.0 → 1.4.0 with a changelog entry. The skill reference resolves correctly against plugins/bitwarden-planning-tools/skills/consulting-adrs/SKILL.md (present on the stacked base branch), no lingering references to the deleted file remain, and none of the three skills restrict allowed-tools in a way that would block Skill invocation. Two items need attention: an undocumented cross-plugin dependency with no fallback, and formatting artifacts from the version-bump script that will fail the Prettier CI check.

Code Review Details
  • ⚠️ : Cross-plugin skill reference has no fallback and the new bitwarden-planning-tools requirement is documented only in the CHANGELOG (not in plugin.json or the plugin README)
    • plugins/bitwarden-security-engineer/skills/bitwarden-security-context/SKILL.md:66
  • ♻️ : pnpm run lint:prettier will fail — the version-bump script's jq rewrite expanded the single-line agents array, and the sed README update dropped the version column padding (| 1.4.0 | vs | 1.4.0 |). Running pnpm run format fixes both.
    • plugins/bitwarden-security-engineer/.claude-plugin/plugin.json:18, README.md:21

## Architecture Decision Records (ADRs)

Bitwarden's accepted architecture decisions are catalogued separately from the security principles above. See `${CLAUDE_PLUGIN_ROOT}/references/adr-alignment.md` for how security assessments should check alignment against them.
Bitwarden's accepted architecture decisions are catalogued separately from the security principles above. To check a design or change against them, invoke `Skill(bitwarden-planning-tools:consulting-adrs)` — it returns structured findings (conflict, gap, aligned) with cited ADRs.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ IMPORTANT: Cross-plugin skill reference has no fallback and the new requirement is not documented for consumers.

Details and fix

All three edited skills (bitwarden-security-context:66, reviewing-security-architecture:133, threat-modeling:12) now delegate the ADR-alignment check to Skill(bitwarden-planning-tools:consulting-adrs), and references/adr-alignment.md — which carried the ground rules (conflict = finding, undocumented significant decision = gap, verify status before citing) — is deleted. If bitwarden-planning-tools is not installed, the check silently no-ops with no residual guidance.

The PR description says this "adds an install-time dependency on bitwarden-planning-tools (1.0.0+)", but nothing in the diff declares or surfaces it: plugin.json has no dependency field, and plugins/bitwarden-security-engineer/README.md is unchanged (no prerequisite noted in Overview/Usage). The CHANGELOG entry is the only place it appears, which readers won't see at install time.

Two suggested fixes:

  1. Add the graceful-degradation sentence this repo already uses for cross-plugin skills, e.g. plugins/claude-config-validator/skills/reviewing-claude-config/SKILL.md:167 ("This skill is optional. If unavailable, rely on the manual security checks above.") and plugins/bitwarden-product-analyst/agents/product-analyst.md:195. Retaining a one-line summary of the conflict/gap/status rules inline would keep the skills useful standalone.
  2. Note the bitwarden-planning-tools requirement in plugins/bitwarden-security-engineer/README.md, mirroring the "Consumers" row already added on the producer side (plugins/bitwarden-planning-tools/README.md:21).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Request a Claude code review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant