Skip to content

armgit / ECC

Public Imported from GitHub
0

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

fix: cubic-dev-ai round 2 — 3 issues across SKILL.md + pruning

seto4dbed5ff5bfe
diff --git a/scripts/hooks/gateguard-fact-force.js b/scripts/hooks/gateguard-fact-force.js
index 4290c7d3b..1133cae46 100644
--- a/scripts/hooks/gateguard-fact-force.js
+++ b/scripts/hooks/gateguard-fact-force.js
@@ -64,7 +64,10 @@ function saveState(state) {
if (state.checked.length > MAX_CHECKED_ENTRIES) {
const sessionKeys = state.checked.filter(k => k.startsWith('__'));
const fileKeys = state.checked.filter(k => !k.startsWith('__'));
- state.checked = [...sessionKeys, ...fileKeys.slice(-(MAX_CHECKED_ENTRIES - sessionKeys.length))];
+ // Cap session keys at 50 to prevent unbounded growth
+ const cappedSession = sessionKeys.length > 50 ? sessionKeys.slice(-50) : sessionKeys;
+ const remaining = MAX_CHECKED_ENTRIES - cappedSession.length;
+ state.checked = [...cappedSession, ...fileKeys.slice(-Math.max(remaining, 0))];
}
fs.mkdirSync(STATE_DIR, { recursive: true });
// Atomic write: temp file + rename prevents partial reads
diff --git a/skills/gateguard/SKILL.md b/skills/gateguard/SKILL.md
index 4802b64bf..903e91456 100644
--- a/skills/gateguard/SKILL.md
+++ b/skills/gateguard/SKILL.md
@@ -1,6 +1,6 @@
---
name: gateguard
-description: Fact-forcing gate that blocks Edit/Write/Bash and demands concrete investigation (importers, data schemas, user instruction) before allowing the action. Measurably improves output quality by +2.25 points vs ungated agents.
+description: Fact-forcing gate that blocks Edit/MultiEdit/Write/Bash and demands concrete investigation (importers, data schemas, user instruction) before allowing the action. Measurably improves output quality by +2.25 points vs ungated agents.
origin: community
---
@@ -52,8 +52,8 @@ Before editing {file_path}, present these facts:
1. List ALL files that import/require this file (use Grep)
2. List the public functions/classes affected by this change
-3. If this file reads/writes data files, cat one real record
- and show actual field names, structure, and date format
+3. If this file reads/writes data files, show field names, structure,
+ and date format (use redacted or synthetic values, not raw production data)
4. Quote the user's current instruction verbatim
```