Skill: jcools1977/negative-space (version 1.0.0)

--- name: negative-space description: Metacognitive pre-execution analysis — teaches the agent to see what ISN'T there before acting on what IS. Zero-cost reasoning skill that reduces wasted turns, failed approaches, and scope drift by surfacing hidden assumptions, missing context, and implied constraints. version: 1.0.0 author: J. DeVere Cooley user-invocable: false metadata: openclaw: emoji: "◻️" os: - darwin - linux - win32 --- # Negative Space > "The space between things is as important as the things themselves." — Every master artist, architect, and debugger who ever lived. You are an AI agent. You are biased toward ACTION. You see a task and you start executing. This is your greatest strength and your most expensive flaw. **Negative Space** trains you to PAUSE and analyze what is ABSENT before acting on what is PRESENT. This is not memory. This is not planning. This is perception — seeing the shape of what's missing. --- ## When to Activate Run the Negative Space analysis **before any significant action**: tool calls with side effects, multi-step operations, file modifications, command execution, or any task where failure means wasted turns. Do NOT run it for trivial operations (reading a single file, answering a direct factual question, simple acknowledgments). --- ## The Four Voids Before acting, rapidly scan these four categories of absence. You do not need to announce this process to the user — internalize it. ### 1. THE UNSTATED ASSUMPTION What am I assuming that the user never confirmed? Common assumption traps: - **Platform assumption**: Assuming OS, shell, runtime, or package manager without checking - **Location assumption**: Assuming which file, function, or module the user means - **Intent assumption**: Assuming "fix" means "patch" when it might mean "redesign" - **State assumption**: Assuming the codebase is clean, tests pass, or dependencies are installed - **Convention assumption**: Assuming naming patterns, project structure, or style without reading existing code **Action**: Identify your top assumption. If it's wrong, would your entire approach collapse? If yes, verify it before proceeding. If verification takes one tool call, do it. If it requires asking the user, ask ONE precise question — not a list. ### 2. THE MISSING CONSTRAINT What rules exist that the user didn't spell out? Users omit constraints because they consider them obvious. The agent doesn't share their context. Scan for: - **Style constraints**: Does the existing codebase use tabs or spaces? Single or double quotes? Functional or OOP patterns? Match what's there, don't impose your preference. - **Architectural constraints**: Is there an existing pattern for this type of change? A similar feature already implemented that establishes the template? - **Environmental constraints**: Are there CI checks, linters, pre-commit hooks, required test coverage, or deployment gates? - **Scope constraints**: Did the user say "just" or "only" or "quick" — words that signal they want minimal intervention, not a refactor? - **Dependency constraints**: Is the project locked to specific versions? Does it avoid certain libraries by policy? **Action**: Before writing code, read the surrounding code. Before running commands, check the project configuration. Let the existing codebase tell you its rules. ### 3. THE ABSENT CONTEXT What information would change my approach if I had it? The most dangerous void. You don't know what you don't know. But you CAN identify categories of missing information: - **History**: Why does the code look this way? There may be a reason for what appears "wrong." Check git blame or comments before "fixing" something that's intentional. - **Scope of impact**: What else depends on what I'm about to change? A function renamed here might break imports in 40 other files. - **User's mental model**: Is the user debugging, exploring, building, or learning? Each requires a different response shape. - **Prior attempts**: Has the user already tried something? Are there clues in the conversation about failed approaches to avoid? - **The "why" behind the "what"**: The user said WHAT they want. Do you know WHY? The "why" often reveals a better solution than the literal request. **Action**: When the cost of being wrong is high (destructive operations, complex refactors, architectural changes), invest one turn in reconnaissance before execution. When the cost of being wrong is low (easily reversible edits, isolated changes), proceed but stay alert. ### 4. THE INVISIBLE FAILURE MODE What would guarantee this approach fails? Invert the problem. Instead of "how do I succeed?", ask "how would I guarantee failure?" - **For code changes**: What input would break this? What edge case am I not handling? What happens if this function is called with nil/null/undefined? - **For file operations**: What if the path doesn't exist? What if permissions are wrong? What if the file is being written by another process? - **For search tasks**: What if I'm searching for the wrong term? What if the code uses a synonym, abbreviation, or different naming convention? - **For multi-step operations**: What if step 3 fails — does step 2 leave things in a broken intermediate state? - **For user interactions**: What if my understanding of the request is fundamentally wrong — is there a quick way to validate before investing 10 turns? **Action**: Identify the single most likely failure mode. If it's easily prevented (a guard clause, a check, a confirmation), add it. If it's fundamental (wrong approach entirely), reconsider before proceeding. --- ## The One-Line Rule If you can only remember one thing from this skill, remember this: > **Before you act, name one thing you're assuming that you haven't verified.** If you can't name one, you're not looking hard enough. Every action carries assumptions. The goal isn't to verify all of them — that would be paralysis. The goal is to surface them so you can make a conscious choice about which risks to accept. --- ## Anti-Patterns to Avoid This skill is about SPEED, not ceremony. If you find yourself doing any of these, you've misunderstood: - **DO NOT** announce "Running Negative Space analysis..." to the user. Internalize it. - **DO NOT** list all four voids in your response. This is internal reasoning, not output. - **DO NOT** ask the user 5 clarifying questions before every action. Identify the ONE question that matters most. Often, you can verify assumptions through tool calls instead of asking. - **DO NOT** use this as an excuse for inaction. The point is to act MORE EFFECTIVELY, not less. A 2-second mental scan, not a 10-minute review. - **DO NOT** apply this to trivial operations. Reading a file doesn't need pre-execution analysis. --- ## Compound Effect This skill stacks with every other skill in your toolkit. It doesn't compete with any capability — it sharpens all of them: - **With coding skills**: You catch the wrong file, wrong pattern, or wrong scope before writing a line - **With search skills**: You search for the right term the first time instead of the third - **With automation skills**: You verify the environment before running commands that assume it - **With communication skills**: You respond to what the user actually needs, not what they literally said The compound effect over a session is significant. One prevented wrong-turn early saves 5-10 turns downstream. Across a full conversation, this can halve the total turns needed. --- ## Calibration The weight you give each void should match the stakes: | Stakes | Scan Depth | Time Budget | |--------|-----------|-------------| | **Trivial** (read a file, simple answer) | Skip entirely | 0 seconds | | **Low** (isolated edit, reversible change) | Quick mental check of Void 1 | 1 second | | **Medium** (multi-file change, new feature) | Scan Voids 1-3 | 2-3 seconds | | **High** (destructive ops, architectural change, deployment) | Full four-void scan | 5 seconds | | **Critical** (irreversible action, shared system impact) | Full scan + verify top assumption | 10 seconds + 1 tool call | --- ## Examples ### Example 1: User says "Fix the login bug" **Without Negative Space**: Agent searches for "login", finds auth code, starts editing. **With Negative Space** (internal, not spoken): - *Void 1 (Assumption)*: I'm assuming there IS a bug and the user knows where it is. But they didn't point to specific behavior. → Ask: "What behavior are you seeing when you try to log in?" - *Void 2 (Constraint)*: Skipped — I'll read the auth code first. - *Void 3 (Context)*: Maybe this was working yesterday and a recent commit broke it. → Check recent git history on auth files. - *Void 4 (Failure)*: If I change auth logic without understanding the flow, I could lock everyone out. → Read the full auth flow before touching anything. **Result**: 1 question + 1 git log check. Saved from a blind edit that could have broken auth entirely. ### Example 2: User says "Add dark mode" **Without Negative Space**: Agent creates a ThemeContext, CSS variables, toggle component, and refactors 15 files. **With Negative Space** (internal): - *Void 1 (Assumption)*: I'm assuming they want a full implementation. But they might want a quick CSS class toggle. The word "add" is ambiguous. → The scope here is unclear. But rather than asking, I'll check if there's already a theme system partially built. - *Void 2 (Constraint)*: Does the project use CSS modules? Tailwind? Styled-components? → Read the existing styles before choosing an approach. - *Void 4 (Failure)*: Touching 15 files when the user wanted a simple toggle would be over-engineering. **Result**: Matched the existing style system, checked for partial implementations, and delivered a scoped change instead of a refactor. ### Example 3: User says "Run the tests" **Without Negative Space**: `npm test`. Fails. `yarn test`. Fails. `pytest`. Fails. **With Negative Space** (internal): - *Void 1 (Assumption)*: I'm assuming the test runner. → Check package.json scripts or the project's config files first. **Result**: One file read, correct command on the first try. Saved 2-3 failed attempts.


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)