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.

11.5 KB
Raw Blame
{
  "name": "internal-only-edits",
  "description": "Body-only edits of unexported code in JS, Python, Go and TypeScript.",
  "files": {
    "src/cache/lru.js": "'use strict';\n\nfunction evictOldest(entries) {\n  for (const entry of entries) {\n    entries.delete(entry.key);\n    return entry;\n  }\n}\n\nmodule.exports = { createCache: () => new Map(), evictOldest };\n",
    "pkg/store/_helpers.py": "def _normalize(name):\n    return name.strip().lower()\n",
    "internal/codec/escape.go": "package codec\n\nfunc escapeRune(r rune) string {\n\treturn string(r)\n}\n",
    "src/cache/policy.ts": "const limit = 100;\n\nexport function allow(size: number): boolean {\n  return size < limit;\n}\n"
  },
  "steps": [
    {
      "id": "edit-js-body",
      "transcript": [
        {
          "type": "user",
          "uuid": "internal-only-edits-001",
          "sessionId": "sess-internal",
          "isSidechain": false,
          "promptId": "prompt-internal-1",
          "message": {
            "role": "user",
            "content": "Make LRU eviction skip pinned entries and tidy the helpers."
          }
        },
        {
          "type": "assistant",
          "uuid": "internal-only-edits-002",
          "sessionId": "sess-internal",
          "isSidechain": false,
          "message": {
            "id": "msg_internalonlyedits_01",
            "type": "message",
            "role": "assistant",
            "model": "claude-sonnet-4-5",
            "content": [
              {
                "type": "tool_use",
                "id": "toolu_internalonlyedits_001",
                "name": "Read",
                "input": {
                  "file_path": "{{root}}/src/cache/lru.js"
                }
              }
            ]
          }
        },
        {
          "type": "user",
          "uuid": "internal-only-edits-003",
          "sessionId": "sess-internal",
          "isSidechain": false,
          "promptId": "prompt-internal-1",
          "message": {
            "role": "user",
            "content": [
              {
                "type": "tool_result",
                "tool_use_id": "toolu_internalonlyedits_001",
                "content": "ok"
              }
            ]
          }
        },
        {
          "type": "assistant",
          "uuid": "internal-only-edits-004",
          "sessionId": "sess-internal",
          "isSidechain": false,
          "message": {
            "id": "msg_internalonlyedits_02",
            "type": "message",
            "role": "assistant",
            "model": "claude-sonnet-4-5",
            "content": [
              {
                "type": "tool_use",
                "id": "toolu_internalonlyedits_002",
                "name": "Edit",
                "input": {
                  "file_path": "{{root}}/src/cache/lru.js",
                  "old_string": "  for (const entry of entries) {\n    entries.delete(entry.key);",
                  "new_string": "  for (const entry of entries) {\n    if (entry.pinned) continue;\n    entries.delete(entry.key);"
                }
              }
            ]
          }
        }
      ],
      "payload": {
        "session_id": "sess-internal",
        "transcript_path": "{{transcript}}",
        "cwd": "{{root}}",
        "permission_mode": "default",
        "hook_event_name": "PreToolUse",
        "tool_name": "Edit",
        "tool_input": {
          "file_path": "{{root}}/src/cache/lru.js",
          "old_string": "  for (const entry of entries) {\n    entries.delete(entry.key);",
          "new_string": "  for (const entry of entries) {\n    if (entry.pinned) continue;\n    entries.delete(entry.key);"
        },
        "tool_use_id": "toolu_internalonlyedits_002"
      },
      "expect": "deny",
      "mustDeny": false,
      "redundant": false,
      "relevantQuestions": [
        "local-callers",
        "quote-instruction"
      ]
    },
    {
      "id": "edit-python-private",
      "transcript": [
        {
          "type": "user",
          "uuid": "internal-only-edits-005",
          "sessionId": "sess-internal",
          "isSidechain": false,
          "promptId": "prompt-internal-1",
          "message": {
            "role": "user",
            "content": [
              {
                "type": "tool_result",
                "tool_use_id": "toolu_internalonlyedits_002",
                "content": "ok"
              }
            ]
          }
        },
        {
          "type": "assistant",
          "uuid": "internal-only-edits-006",
          "sessionId": "sess-internal",
          "isSidechain": false,
          "message": {
            "id": "msg_internalonlyedits_03",
            "type": "message",
            "role": "assistant",
            "model": "claude-sonnet-4-5",
            "content": [
              {
                "type": "tool_use",
                "id": "toolu_internalonlyedits_003",
                "name": "Edit",
                "input": {
                  "file_path": "{{root}}/pkg/store/_helpers.py",
                  "old_string": "    return name.strip().lower()",
                  "new_string": "    return name.strip().casefold()"
                }
              }
            ]
          }
        }
      ],
      "payload": {
        "session_id": "sess-internal",
        "transcript_path": "{{transcript}}",
        "cwd": "{{root}}",
        "permission_mode": "default",
        "hook_event_name": "PreToolUse",
        "tool_name": "Edit",
        "tool_input": {
          "file_path": "{{root}}/pkg/store/_helpers.py",
          "old_string": "    return name.strip().lower()",
          "new_string": "    return name.strip().casefold()"
        },
        "tool_use_id": "toolu_internalonlyedits_003"
      },
      "expect": "deny",
      "mustDeny": false,
      "redundant": false,
      "relevantQuestions": [
        "local-callers",
        "quote-instruction"
      ]
    },
    {
      "id": "edit-go-unexported",
      "transcript": [
        {
          "type": "user",
          "uuid": "internal-only-edits-007",
          "sessionId": "sess-internal",
          "isSidechain": false,
          "promptId": "prompt-internal-1",
          "message": {
            "role": "user",
            "content": [
              {
                "type": "tool_result",
                "tool_use_id": "toolu_internalonlyedits_003",
                "content": "ok"
              }
            ]
          }
        },
        {
          "type": "assistant",
          "uuid": "internal-only-edits-008",
          "sessionId": "sess-internal",
          "isSidechain": false,
          "message": {
            "id": "msg_internalonlyedits_04",
            "type": "message",
            "role": "assistant",
            "model": "claude-sonnet-4-5",
            "content": [
              {
                "type": "tool_use",
                "id": "toolu_internalonlyedits_004",
                "name": "Edit",
                "input": {
                  "file_path": "{{root}}/internal/codec/escape.go",
                  "old_string": "\treturn string(r)",
                  "new_string": "\treturn strconv.QuoteRune(r)"
                }
              }
            ]
          }
        }
      ],
      "payload": {
        "session_id": "sess-internal",
        "transcript_path": "{{transcript}}",
        "cwd": "{{root}}",
        "permission_mode": "default",
        "hook_event_name": "PreToolUse",
        "tool_name": "Edit",
        "tool_input": {
          "file_path": "{{root}}/internal/codec/escape.go",
          "old_string": "\treturn string(r)",
          "new_string": "\treturn strconv.QuoteRune(r)"
        },
        "tool_use_id": "toolu_internalonlyedits_004"
      },
      "expect": "deny",
      "mustDeny": false,
      "redundant": false,
      "relevantQuestions": [
        "local-callers",
        "quote-instruction"
      ]
    },
    {
      "id": "edit-ts-module-constant",
      "transcript": [
        {
          "type": "user",
          "uuid": "internal-only-edits-009",
          "sessionId": "sess-internal",
          "isSidechain": false,
          "promptId": "prompt-internal-1",
          "message": {
            "role": "user",
            "content": [
              {
                "type": "tool_result",
                "tool_use_id": "toolu_internalonlyedits_004",
                "content": "ok"
              }
            ]
          }
        },
        {
          "type": "assistant",
          "uuid": "internal-only-edits-010",
          "sessionId": "sess-internal",
          "isSidechain": false,
          "message": {
            "id": "msg_internalonlyedits_05",
            "type": "message",
            "role": "assistant",
            "model": "claude-sonnet-4-5",
            "content": [
              {
                "type": "tool_use",
                "id": "toolu_internalonlyedits_005",
                "name": "Edit",
                "input": {
                  "file_path": "{{root}}/src/cache/policy.ts",
                  "old_string": "const limit = 100;",
                  "new_string": "const limit = 128;"
                }
              }
            ]
          }
        }
      ],
      "payload": {
        "session_id": "sess-internal",
        "transcript_path": "{{transcript}}",
        "cwd": "{{root}}",
        "permission_mode": "default",
        "hook_event_name": "PreToolUse",
        "tool_name": "Edit",
        "tool_input": {
          "file_path": "{{root}}/src/cache/policy.ts",
          "old_string": "const limit = 100;",
          "new_string": "const limit = 128;"
        },
        "tool_use_id": "toolu_internalonlyedits_005"
      },
      "expect": "deny",
      "mustDeny": false,
      "redundant": false,
      "relevantQuestions": [
        "local-callers",
        "quote-instruction"
      ]
    },
    {
      "id": "edit-js-body-again",
      "transcript": [
        {
          "type": "user",
          "uuid": "internal-only-edits-011",
          "sessionId": "sess-internal",
          "isSidechain": false,
          "promptId": "prompt-internal-1",
          "message": {
            "role": "user",
            "content": [
              {
                "type": "tool_result",
                "tool_use_id": "toolu_internalonlyedits_005",
                "content": "ok"
              }
            ]
          }
        },
        {
          "type": "assistant",
          "uuid": "internal-only-edits-012",
          "sessionId": "sess-internal",
          "isSidechain": false,
          "message": {
            "id": "msg_internalonlyedits_06",
            "type": "message",
            "role": "assistant",
            "model": "claude-sonnet-4-5",
            "content": [
              {
                "type": "tool_use",
                "id": "toolu_internalonlyedits_006",
                "name": "Edit",
                "input": {
                  "file_path": "{{root}}/src/cache/lru.js",
                  "old_string": "    return entry;",
                  "new_string": "    return entry || null;"
                }
              }
            ]
          }
        }
      ],
      "payload": {
        "session_id": "sess-internal",
        "transcript_path": "{{transcript}}",
        "cwd": "{{root}}",
        "permission_mode": "default",
        "hook_event_name": "PreToolUse",
        "tool_name": "Edit",
        "tool_input": {
          "file_path": "{{root}}/src/cache/lru.js",
          "old_string": "    return entry;",
          "new_string": "    return entry || null;"
        },
        "tool_use_id": "toolu_internalonlyedits_006"
      },
      "expect": "allow",
      "mustDeny": false,
      "redundant": false
    }
  ]
}