Skip to content

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

Draft
SaintPatrck wants to merge 5 commits 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 5 commits into
consulting-adrs-planning-toolsfrom
adr-consulting-wiring

Conversation

@SaintPatrck

@SaintPatrck SaintPatrck commented Jul 31, 2026

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/stale-reference/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.

@SaintPatrck SaintPatrck added the ai-review Request a Claude code review label Jul 31, 2026
@github-actions

This comment was marked as outdated.

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

🤖 Bitwarden Claude Code Review

Overall Assessment: REQUEST CHANGES

Re-review of the ADR-check rewiring. Verified the deleted references/adr-alignment.md has no dangling references anywhere in the repo (the plugin's references/ directory is now gone entirely), the Skill(bitwarden-planning-tools:consulting-adrs) invocation syntax matches the qualified form used by other cross-plugin call sites, and the version bump is consistent across marketplace.json, plugin.json, and the README catalog. The finding taxonomy in the two SKILL.md call sites now matches what consulting-adrs emits; the same fix was not applied to the changelog. The cross-plugin dependency finding from the previous round remains open.

Code Review Details
  • ⚠️ : Still open from the previous round — the three new Skill(bitwarden-planning-tools:consulting-adrs) call sites state no behavior for when the sibling plugin is absent, and the new bitwarden-planning-tools requirement appears only in the CHANGELOG (not in plugin.json or plugins/bitwarden-security-engineer/README.md, whose Overview/Usage sections are unchanged). Every other cross-plugin call site in this repo declares its contract — optional (bitwarden-security-engineer/agents/bitwarden-security-engineer.md:73, claude-config-validator/skills/reviewing-claude-config/SKILL.md:167) or required (bitwarden-testing-tools/skills/assessing-test-coverage/SKILL.md:18, bitwarden-tech-lead/agents/AGENT.md:74). Without one, the ADR check silently no-ops on a machine that lacks the plugin, and the guidance the deleted reference carried (conflict = finding, undocumented significant decision = gap, verify status before citing) is gone. See the existing unresolved thread for suggested fixes.
    • plugins/bitwarden-security-engineer/skills/bitwarden-security-context/SKILL.md:66, skills/reviewing-security-architecture/SKILL.md:133, skills/threat-modeling/SKILL.md:12
  • 🎨 : Changelog still says "conflict/gap/aligned", omitting the stale-reference token the two SKILL.md files were just corrected to use.
    • plugins/bitwarden-security-engineer/CHANGELOG.md:12

## 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).

Establish bitwarden-planning-tools as the pre-implementation planning home
(counterpart to bitwarden-delivery-tools' post-implementation mechanics), and
land consulting-adrs here as its first skill.

consulting-adrs checks a design/change/plan/threat-model against Bitwarden's
ADRs (or locates/summarizes the catalog) and returns structured
conflict/gap/aligned findings with cited ADRs. Ships the full eval harness
(trigger/structure/behavior) with baselines on claude-opus-4-8: triggering
7/8 should-trigger, 6/6 should-not; behavior with-skill 1.00 vs baseline 0.78
over 9 cases. WebFetch scoped to contributing.bitwarden.com.

Proposed as the future home for tech breakdowns, initiative-funnel navigation,
and architecting-solutions as planning tools consolidate here.
Treat fetched ADR pages as untrusted data, matching the sibling
architecting-solutions skill's rule for the same domain. Drop the
Cross-Plugin Integration table's consumer inventory rather than
correct its premature claim — a skill has no need to track which
plugins call it, and the table's only other row duplicated the
Overview's own counterpart framing.
@SaintPatrck
SaintPatrck force-pushed the consulting-adrs-planning-tools branch from ce76862 to 8e05440 Compare August 5, 2026 12:41
…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 force-pushed the adr-consulting-wiring branch from 4c86059 to 36cb60a Compare August 5, 2026 19:07
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Claude Configuration Validation — PR #178

PR: AI-59 llm: wire bitwarden-security-engineer ADR checks to consulting-adrs
Head: adr-consulting-wiring @ 36cb60a · Base: consulting-adrs-planning-tools (PR #177, open)
Plugin under review: bitwarden-security-engineer 1.3.0 → 1.4.0

Verdict

No critical issues and no errors. Structure, versioning, changelog, frontmatter, JSON validity, and reference integrity all pass, and the secret/permission scan is clean. Three warnings should be addressed before merge — all concern the cross-plugin dependency this PR introduces rather than the rewrite itself.

Recommendation: approve with changes requested (warnings only).


What this PR does

Deletes plugins/bitwarden-security-engineer/references/adr-alignment.md and repoints three skills from that local reference file to Skill(bitwarden-planning-tools:consulting-adrs), a skill in a separate plugin. Adds the 1.4.0 version bump across all four required locations plus a changelog entry.


1. Plugin Validation (plugin-validator, plugin-dev)

Result: PASS with warnings.

Verified clean:

  • plugins/bitwarden-security-engineer/.claude-plugin/plugin.json — valid JSON, name matches directory, semver 1.4.0, all required fields present, the explicit "agents": ["./agents/bitwarden-security-engineer.md"] path resolves.
  • Version consistency at 1.4.0 across all four required locations: .claude-plugin/marketplace.json:57, plugins/bitwarden-security-engineer/.claude-plugin/plugin.json:3, README.md:21. The agent file carries no version field, so nothing to sync there.
  • Changelogplugins/bitwarden-security-engineer/CHANGELOG.md:8-12 adds ## [1.4.0] - 2026-07-28 with a ### Changed section in Keep a Changelog format, ordered correctly above 1.3.0. MINOR is a defensible bump (see warning 2 for the caveat).
  • Reference integrity — zero dangling references to the deleted references/adr-alignment.md and zero remaining ${CLAUDE_PLUGIN_ROOT} references anywhere in the plugin. All four removal sites were handled, including the easily-missed resource-index bullet formerly at skills/threat-modeling/SKILL.md:122. Every relative path in all 24 plugin files resolves, including the two cross-directory ones (perform-security-review/references/security-review-rubric.md:52 and threat-modeling/examples/security-definition-document.md:92).
  • Target skill resolvesplugins/bitwarden-planning-tools/skills/consulting-adrs/SKILL.md exists with name: consulting-adrs, and bitwarden-planning-tools is at 1.0.0 in both its manifest and marketplace.json, satisfying the "1.0.0+" requirement.
  • Agentagents/bitwarden-security-engineer.md frontmatter valid (name 28 chars lowercase-hyphen, model: opus, color: red, substantial system prompt). Unchanged by this PR.
  • Skills — all 9 have valid ----delimited frontmatter with name and description; every name matches its directory.
  • No hooks, no MCP servers in this plugin — N/A.
  • File organizationREADME.md, CHANGELOG.md, .claude-plugin/plugin.json present; no stray files; the now-empty plugin-root references/ directory was removed cleanly with no orphan.

2. Skill Review (skill-reviewer, plugin-dev)

Result: needs improvement — rewrite is correct, dependency handling is not.

Skill Words Frontmatter Broken refs
bitwarden-security-context 739 valid none
reviewing-security-architecture 1,118 valid none
threat-modeling 1,817 valid none

Cross-plugin invocation syntax: correct. bitwarden-planning-tools:consulting-adrs is the right fully-qualified identifier, and the Skill(plugin:skill) prose form matches established repo convention (e.g. plugins/bitwarden-code-review/skills/performing-multi-agent-code-review/SKILL.md:69). None of the three skills declare allowed-tools, so the Skill tool is available — no gating problem.

Finding taxonomy in the skills: correct. consulting-adrs emits exactly four literal tokens (plugins/bitwarden-planning-tools/skills/consulting-adrs/SKILL.md:27): [CONFLICT], [GAP], [STALE-REFERENCE], [ALIGNED]. Both call sites that name the taxonomy list all four. The original commit a95fc75 dropped stale-reference; 36cb60a fixed both SKILL.md files. One stale copy survives in the changelog — warning 3.

Positives: progressive disclosure is well executed in threat-modeling (lean SKILL.md plus four references/ files and three examples/ templates, all present and indexed at lines 110-121). reviewing-security-architecture correctly keeps only review-specific ADR guidance inline while delegating the generic rules — the right split, not a blanket delete-and-delegate. Writing style is imperative/infinitive throughout.


3. Configuration & Security Review (reviewing-claude-config, claude-config-validator)

Result: PASS — no security findings.

  • No committed secrets or hardcoded credentials. Scanned all changed files for key/token/password assignments and provider prefixes (gh[pousr]_, sk-, AKIA, xox[baprs]-, PEM private-key headers): zero matches. The only credential-shaped strings anywhere in the plugin are intentional teaching examples in skills/detecting-secrets/SKILL.md:16,36,40,54,59 with obviously synthetic values — unchanged by this PR.
  • No settings.local.json tracked in git; no .claude/ settings files changed in this PR.
  • No dangerous auto-approvals or broad file access introduced. The three changed skills contain no Bash(...), no ! command substitution, and no rm -rf/curl | sh patterns. allowed-tools scoping elsewhere in the plugin (perform-security-review/SKILL.md:5, auditing-hackerone-vulns/SKILL.md:4) is narrowly scoped and untouched.
  • JSON validity confirmed for .claude-plugin/marketplace.json and plugins/bitwarden-security-engineer/.claude-plugin/plugin.json.
  • YAML frontmatter valid in all three changed skills.
  • Prompt-injection posture of the new dependency checks out. The delegated skill treats fetched contributing.bitwarden.com pages and local ADR files as untrusted data and forbids following instructions found inside them (plugins/bitwarden-planning-tools/skills/consulting-adrs/SKILL.md:43), and forbids inventing ADR numbers/URLs. Delegating a security-plugin check to a skill that fetches remote content is safe here.

Warnings (should fix)

Warning 1 — MAJOR: No graceful-degradation guidance at the three new call sites

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

All three issue an unconditional imperative to invoke a skill in a separately-installable plugin, with no instruction for the case where bitwarden-planning-tools is absent. Before 1.4.0 the ADR rules lived in this plugin's own references/adr-alignment.md, so the check always worked standalone. threat-modeling:12 is the worst case: it is step 1 of 5 in the Phase 1 numbered procedure, so a reader without the plugin hits an unsatisfiable instruction before doing anything else.

Remediation — append a degradation clause to each call site. Two conventions already exist in this marketplace; pick one:

  • Hard stop — 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."
  • Skip-and-disclose — plugins/bitwarden-code-review/skills/performing-multi-agent-code-review/SKILL.md:173, and this plugin's own agents/bitwarden-security-engineer.md:73 ("These skills are optional — if unavailable, provide standard security recommendations.").

For a security artifact, prefer skip-and-disclose over silent skip: e.g. "If bitwarden-planning-tools is not installed, skip the ADR check and state in the output that ADR alignment was not verified." Silently omitting an ADR-conflict check from a threat model is worse than skipping it loudly.

Warning 2 — MAJOR: The cross-plugin dependency is asserted but never documented for users

plugins/bitwarden-security-engineer/CHANGELOG.md:12 states "Requires the bitwarden-planning-tools plugin (1.0.0+)", but plugins/bitwarden-security-engineer/README.md has no Requirements/Dependencies section and never mentions the plugin. Claude Code's plugin.json has no dependency field, so this cannot be enforced mechanically — prose documentation is the only available mechanism, and it is missing from the user-facing surface.

Remediation — add a ## Requirements section to plugins/bitwarden-security-engineer/README.md naming bitwarden-planning-tools 1.0.0+ as required (or optional, per whichever behavior you choose in warning 1), and align the CHANGELOG wording with that choice. Repo precedent: plugins/bitwarden-designer/README.md:22, plugins/bitwarden-ai-telemetry/README.md:47, plugins/bitwarden-atlassian-tools/README.md:116, plugins/bitwarden-init/README.md:110.

Related semver note: replacing a self-contained capability with a hard cross-plugin dependency is arguably breaking for installs that only have this plugin. Adopting the skip-and-disclose fallback in warning 1 would make MINOR (1.4.0) unambiguously correct.

Warning 3 — MINOR: Stale finding taxonomy left in the changelog

plugins/bitwarden-security-engineer/CHANGELOG.md:12 describes the skill as returning "structured conflict/gap/aligned findings" — the old three-token list. consulting-adrs emits four tokens including [STALE-REFERENCE]. Commit 36cb60a corrected both SKILL.md call sites but missed the changelog, which is now the last stale copy. PR-introduced, one word to fix.

Remediation — change to conflict/gap/stale-reference/aligned.


Suggestions (optional, low priority)

  1. skills/bitwarden-security-context/SKILL.md:3 — description uses second person ("Use when you need") where the sibling skills use the third-person "This skill should be used when...", and it carries no quoted trigger phrases. "any Bitwarden development, review, or security task" is also near-vacuous as a trigger. Consider quoted triggers such as "Bitwarden security principles", "P01-P06", "zero knowledge guarantee", "data classification", "trust boundaries". Pre-existing, not introduced here.
  2. skills/threat-modeling/SKILL.md:12 — unlike the other two call sites, it does not describe the return shape, so a reader has no guidance on folding the findings into the threat model. Commit a95fc75 also removed the ADR bullet from the "Consult these references" index (lines 118-121) without a cross-plugin replacement, so the skill's own resource index no longer surfaces the ADR capability. Consider restoring a pointer there.
  3. Descriptions don't advertise the ADR check. Both reviewing-security-architecture:3 and threat-modeling:3 now perform ADR alignment as a first-class step but neither description mentions ADRs.
  4. Missing H1 titlesreviewing-security-architecture/SKILL.md:6 and threat-modeling/SKILL.md:6 open at an H2; bitwarden-security-context/SKILL.md:6 correctly opens with an H1 plus a purpose line. Pre-existing.
  5. Pre-existing coverage drift, out of scope for this PR: the agent's skills: block and routing table (agents/bitwarden-security-engineer.md:6-12, :34-39) list only 6 of 9 skills, omitting bitwarden-security-context, perform-security-review, and auditing-hackerone-vulns; the README skill table (README.md:11-19) omits bitwarden-security-context and auditing-hackerone-vulns. Newly relevant because bitwarden-security-context is now one of the three ADR call sites and the agent has no route to reach it. Also: the agent description has no <example> blocks (4 of 6 agent files in the repo do).

Notes on things checked and cleared

Checks that could not run

pnpm run lint (prettier + cspell) could not be executed in this environment — pnpm is not installed, and npx prettier is blocked by the repo's devEngines packageManager pin (EBADDEVENGINES). Manual inspection of the two formatting-sensitive spots found them consistent with prettier output, but CI's lint.yml job is the authority. The validate-plugin-structure.sh / validate-marketplace.sh scripts from bitwarden/gh-actions were also not available locally; their checks (structure, marketplace consistency, version bump) were performed manually and pass.

@SaintPatrck
SaintPatrck marked this pull request as ready for review August 5, 2026 19:30
@SaintPatrck
SaintPatrck requested a review from a team as a code owner August 5, 2026 19:30

### Changed

- `bitwarden-security-context`, `reviewing-security-architecture`, and `threat-modeling` now perform the ADR-alignment check by invoking `Skill(bitwarden-planning-tools:consulting-adrs)` instead of reading a local `references/adr-alignment.md`. Removed that reference file; the shared rule now lives in the `consulting-adrs` skill, which returns structured conflict/gap/aligned findings with cited ADRs. Requires the `bitwarden-planning-tools` plugin (1.0.0+).

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.

🎨 SUGGESTED: Changelog taxonomy is still stale — omits stale-reference.

Details and fix

The "Fix stale finding taxonomy" commit updated both SKILL.md call sites to the four tokens consulting-adrs actually emits (conflict / gap / stale-reference / aligned, per plugins/bitwarden-planning-tools/README.md:15), but this changelog line still describes three.

Suggested change
- `bitwarden-security-context`, `reviewing-security-architecture`, and `threat-modeling` now perform the ADR-alignment check by invoking `Skill(bitwarden-planning-tools:consulting-adrs)` instead of reading a local `references/adr-alignment.md`. Removed that reference file; the shared rule now lives in the `consulting-adrs` skill, which returns structured conflict/gap/aligned findings with cited ADRs. Requires the `bitwarden-planning-tools` plugin (1.0.0+).
- `bitwarden-security-context`, `reviewing-security-architecture`, and `threat-modeling` now perform the ADR-alignment check by invoking `Skill(bitwarden-planning-tools:consulting-adrs)` instead of reading a local `references/adr-alignment.md`. Removed that reference file; the shared rule now lives in the `consulting-adrs` skill, which returns structured conflict/gap/stale-reference/aligned findings with cited ADRs. Requires the `bitwarden-planning-tools` plugin (1.0.0+).

@SaintPatrck
SaintPatrck marked this pull request as draft August 6, 2026 13:15
@SaintPatrck

Copy link
Copy Markdown
Contributor Author

Demoting back to draft until potential impact on code review process is evaluated.

@SaintPatrck
SaintPatrck force-pushed the consulting-adrs-planning-tools branch from d487c03 to 00f6b90 Compare August 25, 2026 14:32
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