Get the FREE Ultimate OpenClaw Setup Guide →

slash-nonspec-modification

Scanned
npx machina-cli add skill paulp-o/ask-user-questions-mcp/slash-nonspec-modification --openclaw
Files (1)
SKILL.md
6.8 KB

Lightweight modification workflow for changes that don't require OpenSpec artifacts.

When to use this skill:

  • Bug fixes with clear error/stacktrace
  • Typo fixes
  • Config/setting changes
  • Dependency version updates
  • Small refactoring (variable rename, function extraction)

When to redirect to OpenSpec:

  • New feature additions
  • API/interface changes
  • Data model changes

If any of the above OpenSpec criteria are detected, stop and suggest: "This change requires new spec. You might want to roll back and start over."

Flow Decision

Classify the request at the start:

User Request
    │
    ├─ Has error message / stacktrace / "bug" keyword
    │   └─ → [Bug Flow]
    │
    └─ No error (typo, config, refactor, etc.)
        └─ → [Simple Fix Flow]

Flow transitions are allowed:

  • Simple Fix → Bug Flow: If modification reveals deeper issues, upgrade
  • Bug Flow → Simple Fix: If Explore reports "complexity: LOW", downgrade to save resources

Bug Flow

For requests with error messages, stacktraces, or explicit bug reports.

Step 1: Parallel Investigation

Fire 5+ Explore agents AND Researcher in parallel:

// Explore agents - investigate codebase
asyncagents_task(agent="explore", prompt="
  TASK: Investigate bug - [error description]
  FIND: Related code, call paths, recent changes
  ASSESS COMPLEXITY (include this line in response):
  complexity: HIGH or LOW
  
  HIGH if any:
  - Spans 3+ modules/files
  - Root cause unclear
  - Async/concurrency/race condition involved
  - Deep in external library
")

// Researcher - external context
asyncagents_task(agent="researcher", prompt="
  TASK: Research [error message / library name]
  FIND: Known issues, solutions, documentation
")

Wait for ALL agents to complete before proceeding.

Step 2: Complexity Check

Parse Explore responses for complexity: line:

  • If ANY Explore reports complexity: HIGH → Fire Genius immediately
  • If ALL report complexity: LOW → Consider downgrading to Simple Fix Flow
// If complex
asyncagents_task(agent="genius", fork=true, prompt="
  TASK: Analyze complex bug
  CONTEXT: [Explore findings]
  PROVIDE: Root cause analysis, fix strategy, verification plan
")

Step 3: Delegate Fix to Programmer

Delegate to Programmer with fork=true:

asyncagents_task(agent="programmer", fork=true, prompt="
  TASK: Fix bug - [description]
  ROOT CAUSE: [from investigation]
  FILES TO MODIFY: [file list]
  
  MUST DO:
  - Implement minimal fix
  - Run lsp_diagnostics after edit
  - Run tests if available
  - Report success/failure with evidence
  
  MUST NOT:
  - Modify files outside allowlist
  - Refactor unrelated code
  - Suppress errors with as any / @ts-ignore
")

For parallelizable tasks: Fire parallel Programmers with clear file allowlists.

Simple Fix Flow

For typos, config changes, dependency updates, small refactoring.

Step 1: Light Investigation

Fire 2+ Explore agents in parallel:

asyncagents_task(agent="explore", prompt="
  TASK: Find location for [change description]
  FIND: Relevant files, current implementation
")

[BLOCKING] If related to external library (version update, config), also fire Researcher:

asyncagents_task(agent="researcher", prompt="
  TASK: Check [library name] for [version/config change]
  FIND: Migration guides, breaking changes, best practices
")

[BLOCKING] If the task seems to have hidden complexity (multiple files, unclear scope), consider firing Genius agent for analysis:

asyncagents_task(agent="genius", prompt="...

Step 2: Plan implementation & parallelization (skippable)

Spawn a Plan agent to design both implementation and parallelization strategy. This step is optional; for very simple changes (typos, small config tweaks), you may skip directly to Step 3.

Step 3: Delegate to Programmer

Directly delegate to Programmer with fork=true:

asyncagents_task(agent="programmer", fork=true, prompt="...")  // Follow 8-section prompt

Flow Upgrade

If Programmer reports unexpected complexity or repeated failures:

  • Upgrade to Bug Flow
  • Fire additional Explore agents
  • Consider Genius consultation

Verification

Programmer is responsible for verification (not main agent).

Programmer must:

  1. Run lsp_diagnostics on changed files - REQUIRED
  2. Run related tests if they exist - REQUIRED if tests exist
  3. Manual verification if no tests - REQUIRED
  4. Build step - SKIP if tests pass

Programmer reports back with evidence:

Fix applied: [description]
Files changed: [list]
lsp_diagnostics: ✓ clean
Tests: ✓ passed (or "no tests, manually verified")

Failure Handling

Definition of "1 failure":

  • Programmer completes fix but lsp_diagnostics fails
  • Programmer completes fix but tests fail
  • Programmer reports "unable to fix"

Failure escalation:

Attempt 1 fails → Retry with adjusted approach
Attempt 2 fails → Retry with different strategy  
Attempt 3 fails → Call Genius
                      │
                      ├─ Genius provides analysis
                      │   └─ Retry with Genius guidance
                      │
                      └─ Genius also fails
                          └─ Ask user: "What would you like to do?"
                              - Continue trying
                              - Switch to OpenSpec workflow
                              - Get manual help

When calling Genius after failures:

asyncagents_task(agent="genius", fork=true, prompt="
  TASK: Debug repeated fix failures
  
  ATTEMPTS MADE:
  1. [approach] → [result]
  2. [approach] → [result]
  3. [approach] → [result]
  
  ERROR/FAILURE: [details]
  
  PROVIDE:
  - Root cause analysis
  - Why previous attempts failed
  - Recommended fix strategy
  - Verification approach
")

Guardrails

MUST DO:

  • Use TODO tool to track progress
  • Report detailed status (files changed, verification results)
  • Wait for ALL Explore agents before proceeding (Bug Flow)
  • Delegate actual code changes to Programmer
  • Verify with lsp_diagnostics before declaring success

MUST NOT:

  • Suggest commit after completion (just report done)
  • Suppress errors with as any, @ts-ignore, @ts-expect-error
  • Let Programmer modify files outside their allowlist
  • Skip verification step
  • Proceed with OpenSpec-level changes (redirect instead)

REDIRECT TO OPENSPEC if:

  • New feature/capability needed
  • API or interface changes required
  • Data model/schema changes required

Say: "This change requires new spec. You might want to roll back and start over."

Source

git clone https://github.com/paulp-o/ask-user-questions-mcp/blob/master/.opencode/skills/slash-nonspec-modification/SKILL.mdView on GitHub

Overview

This skill guides lightweight changes that don’t require OpenSpec artifacts. It covers bug fixes, typos, config tweaks, small refactors, and dependency updates, using a focused decision flow to avoid unnecessary spec work.

How This Skill Works

It classifies the request at the start as Bug Flow or Simple Fix Flow. For Bug Flow, it fires 5+ Explore agents plus a Researcher to surface root cause and assess complexity, escalating to Genius if complexity is HIGH or downgrading to Simple Fix if LOW. For Simple Fix Flow, it uses light parallel exploration (and an optional Researcher for external libraries) and may invoke Genius for hidden complexity.

When to Use It

  • Bug fixes with a clear error message or stacktrace
  • Typo fixes
  • Config or setting changes
  • Dependency version updates
  • Small refactoring such as variable rename or function extraction

Quick Start

  1. Step 1: Classify the request as Bug Flow or Simple Fix Flow
  2. Step 2: Run parallel agents according to the flow (Explore + optional Researcher)
  3. Step 3: Implement the change within scope or escalate to Programmer; run diagnostics and tests

Best Practices

  • Confirm no OpenSpec artifacts are needed before starting
  • Use a strict scope and file allowlists for edits
  • Run lsp_diagnostics and tests where available
  • Parallelize investigations with Explore agents and Researcher when in Bug Flow
  • Escalate to Genius if hidden complexity is detected

Example Use Cases

  • Fix a UI label typo in the interface text
  • Bump a library version in dependency management
  • Rename a variable to improve code readability
  • Toggle a configuration flag to enable/disable a feature
  • Extract a small helper function from a larger method

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers