Skip to main content
ClaudeWave
Skill190 repo starsupdated 6d ago

collaborative-judgment

The collaborative-judgment skill is a protocol that directs Claude to identify and surface genuine ambiguous decisions during code generation and review, while stopping to ask for clarification when facts are missing, conflicting, or at risk of hallucination. Use it when multiple valid technical approaches exist, when project context hasn't resolved a decision, or when consequences are meaningful to architecture or maintainability, but always grounding choices in inspected evidence rather than generic assumptions or invented options.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/techygarg/lattice /tmp/collaborative-judgment && cp -r /tmp/collaborative-judgment/skills/atoms/collaborative-judgment ~/.claude/skills/collaborative-judgment
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# Collaborative Judgment

## When to Decide vs When to Ask

Most decisions are NOT ambiguous. The AI decides on its own when:

- **The rule is clear.** An 80-line function doing 5 things violates SRP. A domain entity importing the database breaks the dependency rule. Fix it.
- **The project has a documented preference.** The knowledge base, refiner docs, or context anchor specify the choice -- follow it. That is not ambiguity; it is documented intent.
- **The impact is low.** Variable naming, import order, test data -- choose and move on.
- **Grounding is solid.** You can point to a source: user instruction, inspected code/artifact, failing test/log, knowledge base, refiner doc, context anchor. Never take a repo-specific fact from memory alone.

Surface a decision only when ALL three are true:

1. **Multiple valid approaches** -- a genuine fork between reasonable options.
2. **No active context resolves it** -- user instruction, inspected code/artifacts, current evidence, knowledge base, refiner docs, and context anchor have all been checked. Still unresolved.
3. **Consequences are meaningful** -- affects architecture, behavior, or maintainability. Not cosmetic.

**Confidence test**: "I considered two or more approaches, and neither is clearly better given this project's context." True → surface. False → decide and move on.

**Default to deciding -- but only when grounded.** Grounded autonomy ≠ guessing. **STOP:** If the evidence is thin, missing, or conflicting, do not silently choose.

Stop and inspect / ask when ANY signal fires:

1. **No grounding** -- you cannot cite a source for a project-specific claim.
2. **Generic priors filling a local gap** -- you are about to assume a file path, API shape, config key, data contract, naming convention, or workflow because "projects usually do X."
3. **A missing fact collapses the answer** -- one unresolved fact would make one option clearly right or wrong.
4. **Conflicting sources** -- user instruction, code, docs, tests, logs, or context docs disagree.
5. **Unfalsifiable assumption** -- you cannot say what evidence would prove the current assumption wrong.

If any signal fires, do not invent options just to fit this protocol. Inspect the available evidence first. If it stays unresolved, ask a targeted clarification.

**STOP:** Conflicting active sources — surface the contradiction and ask. Never pick a winner silently.

## Presentation Format

Two formats:

### A. Decision needed

Use when multiple **grounded** options remain:

> **Decision needed**: [one-line description of what's being decided]
>
> Checked: [sources]. Missing/conflicting: [fact]
>
> - **Option A**: [approach] — [1-line pro], [1-line con]
> - **Option B**: [approach] — [1-line pro], [1-line con]
>
> I lean toward **[option]** because [one sentence of reasoning].

Two options is the norm. Three is the maximum. No essays.

### B. Clarification needed

Use when the issue is missing/conflicting knowledge, not balanced options:

> **Clarification needed**: [missing fact or contradiction]
>
> Checked: [sources]
> Missing/conflicting: [exact fact]
> Need from you: [1–3 targeted questions or a requested artifact]
> Why it matters: [one sentence]

No fabricated options. Ask only for facts that materially change direction. If the answer is available in the inspected repo/docs/tests, inspect first -- ask the user only when the gap remains.

## Batching

Do not interrupt for every judgment call. Collect and surface at natural checkpoints:

- **During implementation** (code-forge): batch per component. Surface all judgment calls for a component together before presenting its code.
- **During design** (design-blueprint): surface immediately. Each design level constrains the next -- batching risks cascading misalignment.
- **During review** (review): note uncertainty inline in the report, with both interpretations.
- **Standalone / freeform**: batch per logical task segment. Surface all judgment calls once the feature scope is clear -- not one at a time.
- **Knowledge gap / conflicting evidence**: surface immediately when the next step depends on the missing fact. Do not batch a blocker just to preserve flow.

**Escalation signal**: a single component producing more than 3 judgment calls means the project needs clearer standards. Suggest running the relevant refiner instead of asking about each one individually.

## Resolution

When the user resolves a judgment call or clarification:

1. **Apply immediately** -- implement the choice in the current context.
2. **Treat it as a commitment** -- the chosen option, clarified fact, or conflict resolution is not revisited silently later in the session.
3. **Suggest persistence** -- if the decision applies to similar future situations, suggest capturing it via `framework:context-anchoring` (per-feature) or recommend running the relevant refiner (project-wide).

## Diminishing Rule

This protocol becomes less active as the project matures:

- **First feature**: more judgment calls (no documented preferences yet).
- **After running refiners**: fewer (project standards are documented).
- **After several features**: rare (context docs and learnings cover most cases).
skill-alignSkill

Audit and fix all Lattice documentation, README, docs/, PROJECT.md, GitHub issue templates, and CLAUDE.md to ensure they are fully aligned with the current skill inventory. Documentation drift is the most common source of user confusion in Lattice — a skill exists in the codebase but not in the docs, or a renamed skill leaves a stale reference in the bug report template. If you've made any change to skills/ and haven't run this, run it now. Use when the user says 'align docs', 'audit docs', 'update documentation', 'skill align', 'check docs are in sync', 'audit skill inventory', 'ensure docs are aligned', 'are the docs up to date', or 'what needs updating'. Standalone — does not call other skills.

skill-forgeSkill

Create a new Lattice skill — atom, molecule, or refiner — following all framework conventions. Writing skill files manually almost always produces convention violations: wrong section order, missing confirmation gates, defaults.md without the right structure. This skill knows all of that and guides you through it. Use whenever adding any new atom, molecule, or refiner to Lattice, or when the user says 'create a new skill', 'add an atom', 'add a molecule', 'add a refiner', 'build X for Lattice', 'new lattice skill', or 'skill forge'. Does not validate, align docs, or deploy — those are separate skills you run after.

skill-reviewSkill

Deep behavioral audit of a Lattice skill — proposes 3 review personas relevant to the skill, runs independent scenario analysis from each persona's perspective, then merges only the high-confidence, practical findings into a severity-ordered gap report with proposed fixes. Structural validation (conventions, cross-references) is skill-validate's job — this skill finds gaps that would realistically surface when someone actually uses the skill: missing scenario handling, ambiguous instructions, silent failure cases, and behavioral inconsistencies. Filters out theoretical edge cases, low-likelihood speculation, and findings owned by other skills. Use after writing or significantly changing any skill, or when the user says 'review this skill', 'deep review', 'does this skill work', 'find gaps in this skill', 'stress test this skill', 'review from different angles', or 'skill review'. Standalone — does not call other skills.

skill-validateSkill

Validate any Lattice SKILL.md against all tier conventions — atoms, molecules, and refiners. Catches structural errors, broken cross-references, and convention violations before they reach the repo. If you just wrote or modified a Lattice skill file and haven't run this yet, run it now — manual review consistently misses the same categories of errors this skill is specifically designed to catch. Use when the user says 'validate this skill', 'check this skill', 'does this follow conventions', 'review this skill file', 'check my SKILL.md', or 'skill validate'. Reports PASS/FAIL with specific file-and-section findings and actionable fixes. Standalone — does not call other skills.

architecture-compassSkill

Architectural thinking partner for an existing repository — scans the codebase, conducts a structured interview, agrees on current architectural state and recommended direction, and produces a shareable insights document. Scoped to one repository, module, or folder. Does not execute transformation — it orients. Use when the user says 'assess my codebase architecture', 'what direction should my codebase go', 'architecture compass', 'understand my architecture', 'audit architecture drift', 'architectural assessment', or 'help me understand what is wrong with my codebase'.

architecture-refinerSkill

Facilitate a structured conversation to define architecture principles for a repository. Supports multiple architecture styles: clean architecture (default), hexagonal / ports & adapters, modular monolith, or custom. Produces a formal architecture document that the corresponding atom will use. Use when setting up a new project, defining architecture standards, or when the user says 'setup architecture', 'define layers', 'architecture principles', 'help me define my architecture', 'hexagonal architecture', 'modular monolith', 'ports and adapters', or 'define my architecture style'.

architectureSkill

Enforce architectural rules when generating or modifying code, and validate proposed designs before approval (design mode). Defaults to clean architecture; supports any architecture style via the architecture-refiner. Validates layer responsibilities, dependency direction, and structural constraints using the loaded architecture rules. Use when generating code, reviewing architecture, creating new files, or when the user mentions 'architecture', 'layers', 'structure', 'dependency rules', 'hexagonal architecture', 'ports and adapters', 'modular monolith', or 'onion architecture'. Also use when reviewing generated code for structural compliance.

bug-fixSkill

Investigate, reproduce, and safely fix a bug with regression protection. Composes context, diagnosis, architecture, code quality, and testing guardrails into a reproduce-first repair workflow. Use when the user says 'fix this bug', 'debug this', 'investigate this failure', 'patch this regression', 'repair this issue', or 'why is this broken'.