claude-skills/engineering
Claude 2c384a9c47
fix(memory-engineering): close an F1 bypass and make --print-sample-spec reachable
Fourth review on PR #947 reported two functional bugs, explicitly noting it had
not run anything. Both reproduced, and the first is severe.

1. F1 -- the blocking gate -- could be bypassed by a typo.

   _check_forgetting_rule() failed only when `rule` was literally
   "none"/""/"never", and otherwise inferred PASS from what the rule was *not*.
   So anything unrecognized fell through to the PASS branch with an empty
   mechanism list. Reproduced:

     {"rule": "asdf"}             -> F1=PASS  "Forgetting is designed: ."
     {"rule": "ttl"} (no ttl_days)-> F1=PASS  "Forgetting is designed: ."

   A misspelling silently passed the one check this entire skill is built
   around, and the nonsensical detail string was the only hint.

   The check is now allowlist-based: PASS is unreachable unless a concrete
   mechanism is actually found (ttl_days > 0, max_records/max_bytes > 0, or a
   decay setting). Failure messages now distinguish an unrecognized rule from a
   declared-but-unconfigured one, so a typo is never mistaken for a deliberate
   decision not to forget. Booleans are rejected where a number is expected,
   and ttl_days=0 counts as absent.

   Verified across 10 cases: all six bypass variants now FAIL at exit 4, all
   four legitimate mechanisms still PASS, and the empty-mechanism string can no
   longer be emitted.

2. --print-sample-spec was unreachable on all three scripts that offer it.

   The flag sat outside a mutually-exclusive group declared required=True, and
   argparse enforces that during parse_args() -- before any of our code runs.
   So the flag alone exited 2 with a usage error, which broke the first line of
   the workflow SKILL.md documents verbatim:

     python scripts/memory_cost_profiler.py --print-sample-spec > workload.json

   The group is now required=False with explicit post-parse validation, so
   no-args still errors helpfully and names all valid entry points. Verified the
   full round-trip on all three: --print-sample-spec > f.json, then feed f.json
   back in.

   This slipped through because the PR's own checklist covered --help, --sample
   and --output json, but never ran --print-sample-spec standalone.

Also removed the identity dict in render() flagged as a nit.

Verified: 4/4 scripts help/sample/json; error paths 3/4/4; all six blocking
gates; checklist 6/6 PASS; security auditor PASS (0 critical, 0 high, 0 info).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jt1sqt5kQmopyfXu2Hhjnv
2026-08-09 05:10:36 +00:00
..
.claude-plugin feat(skills): wave-3 optimization — domain overhauls per newgen audit 2026-06-11 03:58:41 +00:00
.codex feat(skills): wave-3 optimization — domain overhauls per newgen audit 2026-06-11 03:58:41 +00:00
agent-harness feat(engineering): add book-to-skill — compile documents into knowledge-base skills 2026-08-05 07:01:23 +00:00
agenthub feat(skills): wave-3 optimization — domain overhauls per newgen audit 2026-06-11 03:58:41 +00:00
autoresearch-agent feat(skills): wave-3 optimization — domain overhauls per newgen audit 2026-06-11 03:58:41 +00:00
behuman chore(versioning,docs): normalize stale versions to 2.9.0 + refresh counts 2026-05-27 05:22:59 +00:00
book-to-skill fix(book-to-skill): close the workdir race with fd pinning 2026-08-05 08:17:16 +00:00
caveman chore(versioning,docs): normalize stale versions to 2.9.0 + refresh counts 2026-05-27 05:22:59 +00:00
chaos-engineering feat(tooling): JSON-output sample gate (G9) + --sample fixtures (#654) 2026-06-11 15:29:39 +00:00
claude-coach feat(tooling): JSON-output sample gate (G9) + --sample fixtures (#654) 2026-06-11 15:29:39 +00:00
code-tour chore(versioning,docs): normalize stale versions to 2.9.0 + refresh counts 2026-05-27 05:22:59 +00:00
collab-proof fix(collab-proof): add trailing newline + attribution block to plugin.json 2026-06-07 04:09:37 +00:00
data-quality-auditor feat(skills): wave-3 optimization — domain overhauls per newgen audit 2026-06-11 03:58:41 +00:00
demo-video chore(versioning,docs): normalize stale versions to 2.9.0 + refresh counts 2026-05-27 05:22:59 +00:00
docker-development chore(versioning,docs): normalize stale versions to 2.9.0 + refresh counts 2026-05-27 05:22:59 +00:00
feature-flags-architect chore(versioning,docs): normalize stale versions to 2.9.0 + refresh counts 2026-05-27 05:22:59 +00:00
grill-me chore(versioning,docs): normalize stale versions to 2.9.0 + refresh counts 2026-05-27 05:22:59 +00:00
grill-with-docs chore(versioning,docs): normalize stale versions to 2.9.0 + refresh counts 2026-05-27 05:22:59 +00:00
handoff chore(versioning,docs): normalize stale versions to 2.9.0 + refresh counts 2026-05-27 05:22:59 +00:00
helm-chart-builder chore(versioning,docs): normalize stale versions to 2.9.0 + refresh counts 2026-05-27 05:22:59 +00:00
karpathy-coder fix: phantom-path sweep — 888 unresolvable references to zero 2026-06-10 14:33:00 +00:00
kubernetes-operator chore(versioning,docs): normalize stale versions to 2.9.0 + refresh counts 2026-05-27 05:22:59 +00:00
llm-cost-optimizer chore(versioning,docs): normalize stale versions to 2.9.0 + refresh counts 2026-05-27 05:22:59 +00:00
llm-wiki fix: phantom-path sweep — 888 unresolvable references to zero 2026-06-10 14:33:00 +00:00
memory-engineering fix(memory-engineering): close an F1 bypass and make --print-sample-spec reachable 2026-08-09 05:10:36 +00:00
minimalist feat(engineering): add minimalist and strict-api skills 2026-07-06 13:05:12 +05:30
prompt-governance chore(versioning,docs): normalize stale versions to 2.9.0 + refresh counts 2026-05-27 05:22:59 +00:00
security-guidance chore(versioning): unify remaining 20 plugins to 2.9.0 2026-05-27 14:25:08 +00:00
skillopt-sleep fix(engineering): require --yes for schedule + close mkdir/chmod race (round-10) 2026-07-11 19:43:30 +00:00
skills refactor(skills): #655 tranche 2 — performance-profiler under the 100-line ceiling 2026-06-12 05:21:35 +00:00
slo-architect feat(tooling): JSON-output sample gate (G9) + --sample fixtures (#654) 2026-06-11 15:29:39 +00:00
statistical-analyst chore(versioning,docs): normalize stale versions to 2.9.0 + refresh counts 2026-05-27 05:22:59 +00:00
strict-api feat(engineering): add minimalist and strict-api skills 2026-07-06 13:05:12 +05:30
terraform-patterns chore(versioning,docs): normalize stale versions to 2.9.0 + refresh counts 2026-05-27 05:22:59 +00:00
universal-scraping-architect polish: PR #838 second-pass nits (non-blocking) 2026-06-11 15:40:45 +00:00
workflow-builder chore(workflow-builder): apply plugin-audit fixes 2026-05-27 14:47:00 +00:00
write-a-skill feat(engineering): add book-to-skill — compile documents into knowledge-base skills 2026-08-05 07:01:23 +00:00
zero-hallucination-coder feat(engineering): add zero-hallucination-coder (hardened from #854) 2026-07-01 02:22:24 +00:00