agentleFS
rioX432rioX432/agent-witness/.claude/skills/dig/SKILL.md

dig

Skill1 starsChanged 5 months agoApache-2.0View on GitHub

Clarify ambiguities in plans with structured questions and auto-decide rules

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 10 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 10

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After investigation is complete but before decomposition

    line 15
  2. Distinctive:

    When there are design choices, trade-offs, or unclear requirements

    line 16
  3. Distinctive:

    When the approach could go multiple valid directions

    line 17
  4. Distinctive:

    Check if CLAUDE.md or rules/ explicitly defines a convention for this decision

    line 34
  5. Distinctive:

    Check if the codebase has an established pattern (Grep for similar implementations)

    line 35
  6. Distinctive:

    If a clear, consistent pattern exists → auto-decide and record the rule

    line 36
  7. Distinctive:

    Naming: Follow project naming conventions (Check CLAUDE.md or rules/)

    line 44
  8. Distinctive:

    Use Explore agent to find existing patterns in the codebase

    line 50
  9. Distinctive:

    Check if similar features already exist and how they handle the same decision

    line 51
  10. Distinctive:

    Read relevant documentation or ADRs

    line 52
  11. Very specific:

    If ToolSearch fails to find Codex or the call errors:

    line 90

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Dig — Structured Ambiguity Resolution

Resolve ambiguities before implementation by generating structured questions with options. Auto-decides choices that follow established project patterns.

When to Use

  • After investigation is complete but before decomposition
  • When there are design choices, trade-offs, or unclear requirements
  • When the approach could go multiple valid directions

Process

Step 1: Extract Ambiguities

From the investigation results, identify every decision point:

#AmbiguityCategoryAuto-decidable?
1...architecture / api-design / data-flow / concurrency / error-handling / naming / testingyes/no

Step 2: Apply Auto-Decide Rules

For auto-decidable ambiguities, check the project's CLAUDE.md, rules/*.md, and existing codebase patterns to determine the answer.

How to auto-decide:

  1. Check if CLAUDE.md or rules/ explicitly defines a convention for this decision
  2. Check if the codebase has an established pattern (Grep for similar implementations)
  3. If a clear, consistent pattern exists → auto-decide and record the rule

Common decision categories:

  • Architecture: Where does this code belong? (Check CLAUDE.md architecture section)
  • API Design: Public or internal? What return type? (Check existing public API patterns)
  • Data Flow: Sync or async? Callback or stream? (Check established patterns)
  • Concurrency: Thread safety approach? (Check existing locking/synchronization patterns)
  • Error Handling: Exception, Result type, or null? (Check existing error patterns)
  • Naming: Follow project naming conventions (Check CLAUDE.md or rules/)
  • Testing: Unit, integration, or both? (Check existing test patterns)

Step 3: Investigate Remaining Unknowns

For non-auto-decidable ambiguities:

  1. Use Explore agent to find existing patterns in the codebase
  2. Check if similar features already exist and how they handle the same decision
  3. Read relevant documentation or ADRs

Step 3.5: Codex Design Review (Optional)

For non-auto-decidable ambiguities in the architecture, api-design, or concurrency categories, consult Codex for alternative approaches before asking the user.

Skip this step for: naming, testing, error-handling, data-flow categories (these are resolved by codebase patterns or user preference).

Load Codex

ToolSearch("select:mcp__codex__codex")

Call Codex (if available)

mcp__codex__codex(
  prompt: "Given these unresolved design decisions, explore alternatives:

  ## Ambiguities
  {list of non-auto-decidable architecture/api-design/concurrency ambiguities with their options}

  ## Codebase Context
  {relevant patterns from Step 2, existing conventions}

  For each ambiguity:
  1. Evaluate the proposed options
  2. Suggest any additional alternatives not yet considered
  3. Recommend the best option with reasoning
  4. Flag any risks or trade-offs"
)

Incorporate Codex recommendations into the options presented to the user in Step 4.

Fallback (Codex unavailable)

If ToolSearch fails to find Codex or the call errors:

  • Skip this step — proceed to Step 4 with Step 3 results only (traditional flow)

Step 4: Ask User (max 3 rounds, max 4 questions per round)

Present remaining unknowns with AskUserQuestion:

  • Context from investigation
  • 2-4 concrete options with trade-offs
  • Recommend the option matching existing codebase patterns

Step 5: Output Decision Matrix

## Dig Results: {requirement}

### Auto-Decided
| # | Decision | Rule | Result |
|---|----------|------|--------|
| 1 | Where to place X | CLAUDE.md: "feature code in src/features/" | src/features/x/ |

### Investigated
| # | Decision | Finding | Result |
|---|----------|---------|--------|
| 2 | Error handling approach | Existing pattern in src/api/client.kt uses Result<T> | Result<T> |

### User-Decided
| # | Decision | Choice | Reason |
|---|----------|--------|--------|
| 3 | Public API surface | Option A: minimal | user preference |

### Assumptions (if any)
| # | Assumption | Risk |
|---|-----------|------|

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.