v0.44.0 — CodeGuard security rules

Consumers act once: run /marvin:upgrade-agent-os. It asks once for security_rules: kit | codeguard; no answer writes kit and installs nothing. See upgrades/v0.44.0.md.

Why. The kit's security checklist is short and generic. Project CodeGuard (CoSAI / OASIS, CC BY 4.0) is a maintained, industry-backed set of security rules that ships as a Claude Code plugin. Teams that want it now get it in the review loop, added on top of the kit's checklist, without the kit copying third-party rules and without making them mandatory.

What changed.

Acceptance. Documentation, checked (repo rule 10):

Behaviour:

This note's scope: was derived over v0.43.1..HEAD (git log --no-merges), each subject's leading key deduplicated. AOS-308 is v0.43.1's live-acceptance record, which landed after the v0.43.1 tag.

Upgrade

Consumer-facing: a new security_rules: kit | codeguard setting offers Project CodeGuard's security rules on top of the kit checklist. Rules: .marvin/agents/codeguard.md.

  • Update the plugin, then run /marvin:upgrade-agent-os. It asks the CodeGuard question ONCE when security_rules is missing and inserts the key in .marvin/PROJECT-INFO.md right after codex_evidence; no answer or an unattended run writes kit (today's behaviour, nothing installed).
  • A yes runs claude plugin marketplace add 'cosai-oasis/project-codeguard#v1.5.0' --scope project (only when .claude/settings.json does not already declare project-codeguard) and claude plugin install codeguard-security@project-codeguard -s project, writes security_rules: codeguard, and the plugin is active from the next session. A failed install writes kit and the upgrade continues.
  • The install changes .claude/settings.json (extraKnownMarketplaces, enabledPlugins): commit it, so teammates are offered the plugin when they trust the folder.
  • A teammate without the plugin on a codeguard project gets one notice per session and runs the kit checklist alone; the absence never fails or blocks a task.
  • Later upgrades only check: on a codeguard project a disabled, removed or drifted plugin is an issue callout, and the key is never changed. To switch later, edit security_rules; for codeguard, install the plugin with the fix command in codeguard.md.
  • New cascade file .marvin/agents/codeguard.md; refreshed (with backups) security.md, briefing.md, validation-agent.md, codex.md, codex/security.md and the kit core CLAUDE.marvin.md.
  • No migration script.

Changes

Added

  • security_rules: kit | codeguard in PROJECT-INFO.md: install and upgrade ask once (no answer or unattended: kit), project-info validates it, /marvin:info reports it with the CodeGuard status.
  • .marvin/agents/codeguard.md: how the advisor, builders, the security validator and the Codex security lane use Project CodeGuard (CoSAI / OASIS, CC BY 4.0, validated v1.5.0) on top of the kit checklist; a missing plugin never fails or blocks a task.
  • Install step 6e offers CodeGuard and, on a yes, installs codeguard-security@project-codeguard at project scope pinned to v1.5.0; a re-install keeps a committed security_rules.
  • Codex security lane: a ### Rules block (the orchestrator's rules DATA, transient) carries the brief's named rules and the always-apply rules.
  • Docs site: the CodeGuard concept page and the security_rules Settings entry.
  • Factory: scripts/marvin-codeguard.sh, a read-only install/enable check (ready / disabled / not-installed / error <reason>), with scripts/test-codeguard.sh (inline mutation check, run in CI; 20 suites).
  • Factory: mh_enabled_plugins in the hook library, one reader of the effective enabledPlugins, shared with the style-plugin finder.
  • Factory: validate-kit check codeguard-grading (27 checks): the grading sentence is identical in codeguard.md, validation-agent.md and codex/security.md.

Changed

  • briefing.md item 4 names the always-apply rules plus the topic rules whose tags match the task, within the stack's language row; security.md, validation-agent.md, codex.md, codex/security.md and the kit core cite codeguard.md.
  • The upgrade's clean-path refusal names .claude/settings.json with a commit-or-restore instruction (the plugin CLI rewrites that committed file).

Security

  • A CodeGuard violation is graded by the kit's severity scale and is a FAIL only when it is itself an exploitable defect at the stage's must-fix bar; CodeGuard adds checks and never softens a kit rule.

Action needed

  • Run /marvin:upgrade-agent-os: it asks once whether to install CodeGuard (no answer: kit); after a yes, commit the .claude/settings.json change.