The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
{
"name": "comment-only-edits",
"description": "Comment and whitespace-only edits, the Python indentation trap, and edits that only look comment-only.",
"files": {
"src/format/pad.js": "// pads left\nfunction padLeft(s, n) {\n return s.padStart(n);\n}\n",
"tools/fetch.py": "def fetch(url):\n # retry twice\n retries = 2\n return url, retries\n",
"src/format/align.py": "def align(width):\n if width:\n pad(width)\n flush()\n",
"src/format/wrap.js": "// wraps text\nfunction wrap(s) {\n return s;\n}\n",
"scripts/build.sh": "#!/bin/sh\n# build\nmake all\n",
"src/format/trim.js": "function trim(a) {\n if (a) { return a.trim(); }\n}\n",
"src/format/banner.js": "const banner = `v1 // stable`;\n",
"tools/links.py": "BASE = \"https://example.test/#home\"\n",
"src/native/buf.c": "// buffer size\nint size = 64;\n"
},
"steps": [
{
"id": "trivial-js-comment",
"transcript": [
{
"type": "user",
"uuid": "comment-only-edits-001",
"sessionId": "sess-comments",
"isSidechain": false,
"promptId": "prompt-comments-1",
"message": {
"role": "user",
"content": "Clarify the comments in the formatting helpers."
}
},
{
"type": "assistant",
"uuid": "comment-only-edits-002",
"sessionId": "sess-comments",
"isSidechain": false,
"message": {
"id": "msg_commentonlyedits_01",
"type": "message",
"role": "assistant",
"model": "claude-sonnet-4-5",
"content": [
{
"type": "tool_use",
"id": "toolu_commentonlyedits_001",
"name": "Edit",
"input": {
"file_path": "{{root}}/src/format/pad.js",
"old_string": "// pads left\nfunction padLeft(s, n) {",
"new_string": "// Pads a string on the left to width n.\nfunction padLeft(s, n) {"
}
}
]
}
}
],
"payload": {
"session_id": "sess-comments",
"transcript_path": "{{transcript}}",
"cwd": "{{root}}",
"permission_mode": "default",
"hook_event_name": "PreToolUse",
"tool_name": "Edit",
"tool_input": {
"file_path": "{{root}}/src/format/pad.js",
"old_string": "// pads left\nfunction padLeft(s, n) {",
"new_string": "// Pads a string on the left to width n.\nfunction padLeft(s, n) {"
},
"tool_use_id": "toolu_commentonlyedits_001"
},
"expect": "allow",
"mustDeny": false,
"redundant": true,
"relevantQuestions": [
"quote-instruction"
]
},
{
"id": "code-edit-after-trivial",
"note": "A trivial pass does not mark the file checked.",
"transcript": [
{
"type": "user",
"uuid": "comment-only-edits-003",
"sessionId": "sess-comments",
"isSidechain": false,
"promptId": "prompt-comments-1",
"message": {
"role": "user",
"content": [
{
"type": "tool_result",
"tool_use_id": "toolu_commentonlyedits_001",
"content": "ok"
}
]
}
},
{
"type": "assistant",
"uuid": "comment-only-edits-004",
"sessionId": "sess-comments",
"isSidechain": false,
"message": {
"id": "msg_commentonlyedits_02",
"type": "message",
"role": "assistant",
"model": "claude-sonnet-4-5",
"content": [
{
"type": "tool_use",
"id": "toolu_commentonlyedits_002",
"name": "Edit",
"input": {
"file_path": "{{root}}/src/format/pad.js",
"old_string": " return s.padStart(n);",
"new_string": " return String(s).padStart(n);"
}
}
]
}
}
],
"payload": {
"session_id": "sess-comments",
"transcript_path": "{{transcript}}",
"cwd": "{{root}}",
"permission_mode": "default",
"hook_event_name": "PreToolUse",
"tool_name": "Edit",
"tool_input": {
"file_path": "{{root}}/src/format/pad.js",
"old_string": " return s.padStart(n);",
"new_string": " return String(s).padStart(n);"
},
"tool_use_id": "toolu_commentonlyedits_002"
},
"expect": "deny",
"mustDeny": false,
"redundant": false,
"relevantQuestions": [
"local-callers",
"quote-instruction"
]
},
{
"id": "trivial-python-comment",
"transcript": [
{
"type": "user",
"uuid": "comment-only-edits-005",
"sessionId": "sess-comments",
"isSidechain": false,
"promptId": "prompt-comments-1",
"message": {
"role": "user",
"content": [
{
"type": "tool_result",
"tool_use_id": "toolu_commentonlyedits_002",
"content": "ok"
}
]
}
},
{
"type": "assistant",
"uuid": "comment-only-edits-006",
"sessionId": "sess-comments",
"isSidechain": false,
"message": {
"id": "msg_commentonlyedits_03",
"type": "message",
"role": "assistant",
"model": "claude-sonnet-4-5",
"content": [
{
"type": "tool_use",
"id": "toolu_commentonlyedits_003",
"name": "Edit",
"input": {
"file_path": "{{root}}/tools/fetch.py",
"old_string": " # retry twice\n retries = 2",
"new_string": " # Retry up to two times before giving up.\n retries = 2"
}
}
]
}
}
],
"payload": {
"session_id": "sess-comments",
"transcript_path": "{{transcript}}",
"cwd": "{{root}}",
"permission_mode": "default",
"hook_event_name": "PreToolUse",
"tool_name": "Edit",
"tool_input": {
"file_path": "{{root}}/tools/fetch.py",
"old_string": " # retry twice\n retries = 2",
"new_string": " # Retry up to two times before giving up.\n retries = 2"
},
"tool_use_id": "toolu_commentonlyedits_003"
},
"expect": "allow",
"mustDeny": false,
"redundant": true,
"relevantQuestions": [
"quote-instruction"
]
},
{
"id": "python-indentation-change",
"note": "Only whitespace changed, but indentation is code in Python.",
"transcript": [
{
"type": "user",
"uuid": "comment-only-edits-007",
"sessionId": "sess-comments",
"isSidechain": false,
"promptId": "prompt-comments-1",
"message": {
"role": "user",
"content": [
{
"type": "tool_result",
"tool_use_id": "toolu_commentonlyedits_003",
"content": "ok"
}
]
}
},
{
"type": "assistant",
"uuid": "comment-only-edits-008",
"sessionId": "sess-comments",
"isSidechain": false,
"message": {
"id": "msg_commentonlyedits_04",
"type": "message",
"role": "assistant",
"model": "claude-sonnet-4-5",
"content": [
{
"type": "tool_use",
"id": "toolu_commentonlyedits_004",
"name": "Edit",
"input": {
"file_path": "{{root}}/src/format/align.py",
"old_string": " pad(width)\n flush()",
"new_string": " pad(width)\n flush()"
}
}
]
}
}
],
"payload": {
"session_id": "sess-comments",
"transcript_path": "{{transcript}}",
"cwd": "{{root}}",
"permission_mode": "default",
"hook_event_name": "PreToolUse",
"tool_name": "Edit",
"tool_input": {
"file_path": "{{root}}/src/format/align.py",
"old_string": " pad(width)\n flush()",
"new_string": " pad(width)\n flush()"
},
"tool_use_id": "toolu_commentonlyedits_004"
},
"expect": "deny",
"mustDeny": true,
"redundant": false,
"relevantQuestions": [
"local-callers",
"quote-instruction"
]
},
{
"id": "comment-plus-code",
"transcript": [
{
"type": "user",
"uuid": "comment-only-edits-009",
"sessionId": "sess-comments",
"isSidechain": false,
"promptId": "prompt-comments-1",
"message": {
"role": "user",
"content": [
{
"type": "tool_result",
"tool_use_id": "toolu_commentonlyedits_004",
"content": "ok"
}
]
}
},
{
"type": "assistant",
"uuid": "comment-only-edits-010",
"sessionId": "sess-comments",
"isSidechain": false,
"message": {
"id": "msg_commentonlyedits_05",
"type": "message",
"role": "assistant",
"model": "claude-sonnet-4-5",
"content": [
{
"type": "tool_use",
"id": "toolu_commentonlyedits_005",
"name": "Edit",
"input": {
"file_path": "{{root}}/src/format/wrap.js",
"old_string": "// wraps text\nfunction wrap(s) {\n return s;",
"new_string": "// Wraps text.\nfunction wrap(s) {\n return s.trim();"
}
}
]
}
}
],
"payload": {
"session_id": "sess-comments",
"transcript_path": "{{transcript}}",
"cwd": "{{root}}",
"permission_mode": "default",
"hook_event_name": "PreToolUse",
"tool_name": "Edit",
"tool_input": {
"file_path": "{{root}}/src/format/wrap.js",
"old_string": "// wraps text\nfunction wrap(s) {\n return s;",
"new_string": "// Wraps text.\nfunction wrap(s) {\n return s.trim();"
},
"tool_use_id": "toolu_commentonlyedits_005"
},
"expect": "deny",
"mustDeny": true,
"redundant": false,
"relevantQuestions": [
"local-callers",
"quote-instruction"
]
},
{
"id": "unknown-extension-comment",
"note": "A comment-only change to a shell script; # starts a comment only at the start of a word.",
"transcript": [
{
"type": "user",
"uuid": "comment-only-edits-011",
"sessionId": "sess-comments",
"isSidechain": false,
"promptId": "prompt-comments-1",
"message": {
"role": "user",
"content": [
{
"type": "tool_result",
"tool_use_id": "toolu_commentonlyedits_005",
"content": "ok"
}
]
}
},
{
"type": "assistant",
"uuid": "comment-only-edits-012",
"sessionId": "sess-comments",
"isSidechain": false,
"message": {
"id": "msg_commentonlyedits_06",
"type": "message",
"role": "assistant",
"model": "claude-sonnet-4-5",
"content": [
{
"type": "tool_use",
"id": "toolu_commentonlyedits_006",
"name": "Edit",
"input": {
"file_path": "{{root}}/scripts/build.sh",
"old_string": "# build\n",
"new_string": "# Build all targets.\n"
}
}
]
}
}
],
"payload": {
"session_id": "sess-comments",
"transcript_path": "{{transcript}}",
"cwd": "{{root}}",
"permission_mode": "default",
"hook_event_name": "PreToolUse",
"tool_name": "Edit",
"tool_input": {
"file_path": "{{root}}/scripts/build.sh",
"old_string": "# build\n",
"new_string": "# Build all targets.\n"
},
"tool_use_id": "toolu_commentonlyedits_006"
},
"expect": "allow",
"mustDeny": false,
"redundant": true,
"relevantQuestions": [
"quote-instruction"
]
},
{
"id": "whitespace-reflow",
"transcript": [
{
"type": "user",
"uuid": "comment-only-edits-013",
"sessionId": "sess-comments",
"isSidechain": false,
"promptId": "prompt-comments-1",
"message": {
"role": "user",
"content": [
{
"type": "tool_result",
"tool_use_id": "toolu_commentonlyedits_006",
"content": "ok"
}
]
}
},
{
"type": "assistant",
"uuid": "comment-only-edits-014",
"sessionId": "sess-comments",
"isSidechain": false,
"message": {
"id": "msg_commentonlyedits_07",
"type": "message",
"role": "assistant",
"model": "claude-sonnet-4-5",
"content": [
{
"type": "tool_use",
"id": "toolu_commentonlyedits_007",
"name": "Edit",
"input": {
"file_path": "{{root}}/src/format/trim.js",
"old_string": "function trim(a) {\n if (a) { return a.trim(); }",
"new_string": "function trim(a) {\n\n if (a) { return a.trim(); }"
}
}
]
}
}
],
"payload": {
"session_id": "sess-comments",
"transcript_path": "{{transcript}}",
"cwd": "{{root}}",
"permission_mode": "default",
"hook_event_name": "PreToolUse",
"tool_name": "Edit",
"tool_input": {
"file_path": "{{root}}/src/format/trim.js",
"old_string": "function trim(a) {\n if (a) { return a.trim(); }",
"new_string": "function trim(a) {\n\n if (a) { return a.trim(); }"
},
"tool_use_id": "toolu_commentonlyedits_007"
},
"expect": "allow",
"mustDeny": false,
"redundant": true,
"relevantQuestions": [
"quote-instruction"
]
},
{
"id": "template-literal-disguise",
"note": "Text after // sits inside a template literal.",
"transcript": [
{
"type": "user",
"uuid": "comment-only-edits-015",
"sessionId": "sess-comments",
"isSidechain": false,
"promptId": "prompt-comments-1",
"message": {
"role": "user",
"content": [
{
"type": "tool_result",
"tool_use_id": "toolu_commentonlyedits_007",
"content": "ok"
}
]
}
},
{
"type": "assistant",
"uuid": "comment-only-edits-016",
"sessionId": "sess-comments",
"isSidechain": false,
"message": {
"id": "msg_commentonlyedits_08",
"type": "message",
"role": "assistant",
"model": "claude-sonnet-4-5",
"content": [
{
"type": "tool_use",
"id": "toolu_commentonlyedits_008",
"name": "Edit",
"input": {
"file_path": "{{root}}/src/format/banner.js",
"old_string": "const banner = `v1 // stable`;",
"new_string": "const banner = `v2 // stable`;"
}
}
]
}
}
],
"payload": {
"session_id": "sess-comments",
"transcript_path": "{{transcript}}",
"cwd": "{{root}}",
"permission_mode": "default",
"hook_event_name": "PreToolUse",
"tool_name": "Edit",
"tool_input": {
"file_path": "{{root}}/src/format/banner.js",
"old_string": "const banner = `v1 // stable`;",
"new_string": "const banner = `v2 // stable`;"
},
"tool_use_id": "toolu_commentonlyedits_008"
},
"expect": "deny",
"mustDeny": true,
"redundant": false,
"relevantQuestions": [
"local-callers",
"quote-instruction"
]
},
{
"id": "python-hash-in-string",
"note": "The # is inside a string; BASE is a public module constant.",
"transcript": [
{
"type": "user",
"uuid": "comment-only-edits-017",
"sessionId": "sess-comments",
"isSidechain": false,
"promptId": "prompt-comments-1",
"message": {
"role": "user",
"content": [
{
"type": "tool_result",
"tool_use_id": "toolu_commentonlyedits_008",
"content": "ok"
}
]
}
},
{
"type": "assistant",
"uuid": "comment-only-edits-018",
"sessionId": "sess-comments",
"isSidechain": false,
"message": {
"id": "msg_commentonlyedits_09",
"type": "message",
"role": "assistant",
"model": "claude-sonnet-4-5",
"content": [
{
"type": "tool_use",
"id": "toolu_commentonlyedits_009",
"name": "Edit",
"input": {
"file_path": "{{root}}/tools/links.py",
"old_string": "BASE = \"https://example.test/#home\"",
"new_string": "BASE = \"https://example.test/#admin\""
}
}
]
}
}
],
"payload": {
"session_id": "sess-comments",
"transcript_path": "{{transcript}}",
"cwd": "{{root}}",
"permission_mode": "default",
"hook_event_name": "PreToolUse",
"tool_name": "Edit",
"tool_input": {
"file_path": "{{root}}/tools/links.py",
"old_string": "BASE = \"https://example.test/#home\"",
"new_string": "BASE = \"https://example.test/#admin\""
},
"tool_use_id": "toolu_commentonlyedits_009"
},
"expect": "deny",
"mustDeny": true,
"redundant": false,
"relevantQuestions": [
"importers",
"public-api",
"quote-instruction"
]
},
{
"id": "c-comment-continuation",
"note": "A trailing backslash continues the comment over the declaration.",
"transcript": [
{
"type": "user",
"uuid": "comment-only-edits-019",
"sessionId": "sess-comments",
"isSidechain": false,
"promptId": "prompt-comments-1",
"message": {
"role": "user",
"content": [
{
"type": "tool_result",
"tool_use_id": "toolu_commentonlyedits_009",
"content": "ok"
}
]
}
},
{
"type": "assistant",
"uuid": "comment-only-edits-020",
"sessionId": "sess-comments",
"isSidechain": false,
"message": {
"id": "msg_commentonlyedits_10",
"type": "message",
"role": "assistant",
"model": "claude-sonnet-4-5",
"content": [
{
"type": "tool_use",
"id": "toolu_commentonlyedits_010",
"name": "Edit",
"input": {
"file_path": "{{root}}/src/native/buf.c",
"old_string": "// buffer size\nint size = 64;",
"new_string": "// buffer size \\\nint size = 64;"
}
}
]
}
}
],
"payload": {
"session_id": "sess-comments",
"transcript_path": "{{transcript}}",
"cwd": "{{root}}",
"permission_mode": "default",
"hook_event_name": "PreToolUse",
"tool_name": "Edit",
"tool_input": {
"file_path": "{{root}}/src/native/buf.c",
"old_string": "// buffer size\nint size = 64;",
"new_string": "// buffer size \\\nint size = 64;"
},
"tool_use_id": "toolu_commentonlyedits_010"
},
"expect": "deny",
"mustDeny": true,
"redundant": false,
"relevantQuestions": [
"importers",
"public-api",
"data-schema",
"external-contract",
"quote-instruction"
]
}
]
}