Skip to content

feat(rules): scope 04-cybersecurity off the always-on set (reclaim ~29% of budget)#21

Merged
Lyther merged 1 commit into
mainfrom
feat/scope-cybersecurity-rule
Jul 5, 2026
Merged

feat(rules): scope 04-cybersecurity off the always-on set (reclaim ~29% of budget)#21
Lyther merged 1 commit into
mainfrom
feat/scope-cybersecurity-rule

Conversation

@Lyther

@Lyther Lyther commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Why

04-cybersecurity was alwaysApply:true — the full offensive-security doctrine (~7.8 KB, ~29% of the always-on rule budget) loaded into every session, security work or not. Per the decision to load it only when necessary, flip it to a scoped rule.

Change

  • 04-cybersecurity.mdc frontmatter: alwaysApply:truealwaysApply:false + globs matching offensive-security file contexts (**/exploit*, **/pwn*, **/poc*, **/shellcode*, ctf/**, **/pentest*, findings/**, **/*.nmap, **/.garak.*). Globs verified against check rules' security-exploit scenario paths.
  • It now renders exactly like the language rules (1014): an on-demand references/rules/04-cybersecurity.md for every target (instruction-only hosts included — preserved, not dropped) plus a native glob rule for cursor. Description notes you can pull it in explicitly for ROE-authorized work with no matching file yet.

Effect

  • codex AGENTS.md: 27,727 → 19,874 bytes (−7,853, −28.3%). Same reclaim on every always-on surface.
  • check rules: 04 attaches only to the security-exploit scenario; drops from the 8 generic scenarios. No information lost — the doctrine is intact, just on-demand.

Tests (contract update, verified — not flipped to pass)

Updated the assertions that pinned 04's old always-on placement to its actual new placement, each confirmed against real build/install output:

  • scenario loop: 04 present only for security-exploit, absent for the 7 others (+ generic-chat).
  • codex: AGENTS.md no longer has a ## 04 section; references/rules/04-cybersecurity.md now exists.
  • kilo: 04 leaves rules/ + all three instruction lists, moves to references/.
  • cline install count 73 → 74 (04 becomes a separate reference file rather than merging into the always-on doc); manifest managed.length likewise.

check rules · check · check generated · build --target all · test — all green (clean sequential run).

Note: 13 unrelated commands/*.md files are dirty in the working tree (a blank-line-after-frontmatter formatter normalization, not from this change) — left unstaged.

by mass-energy equivalence

The offensive-security doctrine was alwaysApply:true, loading into every session's
context (~7.8 KB, ~29% of the always-on rule budget) even for non-security work.
Flip it to alwaysApply:false with globs matching offensive-security file contexts
(exploits, CTF/pwn, pentest findings, AI red-team configs). It now renders like the
language rules: on-demand references/rules/04-cybersecurity.md for every target
(preserved, not dropped — instruction-only hosts get the reference doc too) plus a
native glob rule for cursor. Nothing is lost; it just loads when relevant.

Effect: codex AGENTS.md 27727 -> 19874 bytes (-28.3%). check rules confirms 04
attaches only to the security-exploit scenario, not the 8 generic ones.

Tests: updated the assertions that pinned 04's always-on placement to its real new
placement (codex/kilo references vs rules dir; kilo instruction lists; cline file
count 73->74 as 04 becomes a separate reference file). Verified against actual build
/install output, not flipped to pass. check rules/check/check generated/build/test green.

by mass-energy equivalence
@Lyther
Lyther merged commit df2de49 into main Jul 5, 2026
2 checks passed
@Lyther
Lyther deleted the feat/scope-cybersecurity-rule branch July 5, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant