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.
git clone --depth 1 https://github.com/techygarg/lattice /tmp/collaborative-judgment && cp -r /tmp/collaborative-judgment/skills/atoms/collaborative-judgment ~/.claude/skills/collaborative-judgmentSKILL.md
# Collaborative Judgment ## Problem AI resolve ambiguity silent. User never know decision made. Silent micro-assumption make code feel "off". Undo woven assumption cost more than upfront choice. ## When Decide vs When Ask Most decision NOT ambiguous. AI decide when: - **Rule clear.** 80-line function doing 5 things violate SRP. Domain entity import database break dependency rule. Fix. - **Project documented preference.** Knowledge base, refiner docs, context anchor specify choice -- follow. Not ambiguity, documented intent. - **Low-impact.** Variable naming, import order, test data -- choose, move on. - **Grounding solid.** Can point to source: user instruction, inspected code/artifact, failing test/log, knowledge base, refiner doc, context anchor. No repo-specific fact from memory alone. Surface decision only when ALL three true: 1. **Multiple valid approach** -- genuine fork between reasonable options. 2. **No active context resolve** -- checked user instruction, inspected code/artifacts, current evidence, knowledge base, refiner docs, context anchor. Still unresolved. 3. **Meaningful consequences** -- affect architecture, behavior, maintainability. Not cosmetic. **Confidence test**: "Considered two+ approaches, neither clearly better given project context." True → surface. False → decide, move on. **Err side of deciding only when grounded.** Confident AI occasionally disputable > uncertain AI ask everything. But grounded autonomy ≠ guessing. If evidence thin, missing, or conflicting, don't silent choose. Not all uncertainty = judgment call. Sometimes problem is **knowledge gap / hallucination risk**. Stop and inspect / ask when ANY signal fire: 1. **No grounding** -- can't cite source for a project-specific claim. 2. **Generic prior filling local gap** -- about to assume file path, API shape, config key, data contract, naming convention, workflow because "projects usually do X." 3. **Missing fact collapses answer** -- one unresolved fact would make one option clearly right/wrong. 4. **Conflicting sources** -- user instruction, code, docs, tests, logs, or context docs disagree. 5. **Unfalsifiable assumption** -- can't say what evidence would prove current assumption wrong. If any signal fire, don't invent options just to fit this protocol. First inspect available evidence. If still unresolved, ask targeted clarification. **Conflict rule**: conflicting active sources = automatic ask. Surface the contradiction explicitly. Don't pick 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 norm. Three maximum. No essays. ### B. Clarification needed Use when 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 requested artifact] > Why it matters: [one sentence] No fabricated options. Ask only for facts that materially change direction. If answer available in inspected repo/docs/tests, inspect first -- ask user only when gap remains. ## Batching Not interrupt every judgment call. Collect, surface at natural checkpoints: - **During implementation** (code-forge): batch per component. Surface all judgment call for component together before present code. - **During design** (design-blueprint): surface immediately. Each design level constrain next -- batching risk cascading misalignment. - **During review** (review): note uncertainty inline in report with both interpretations. - **Standalone / freeform**: batch per logical task segment. Surface all judgment call when feature scope clear -- not one at time. - **Knowledge gap / conflicting evidence**: surface immediately when next step depend on missing fact. Don't batch a blocker just to preserve flow. **Escalation signal**: Single component produce >3 judgment calls, project need clearer standards. Suggest run relevant refiner instead ask each individually. ## Resolution When user resolve judgment call or clarification: 1. **Apply immediately** -- implement choice in current context. 2. **Treat as commitment** -- chosen option, clarified fact, or conflict resolution not revisited silently later in session. 3. **Suggest persistence** -- if decision apply similar future situations, suggest capture via `framework:context-anchoring` (per-feature) or recommend run relevant refiner (project-wide). ## Diminishing Rule Protocol become less active as project mature: - **First feature**: more judgment calls (no documented preferences yet). - **After run refiners**: fewer (project standards documented). - **After several features**: rare (context docs, learnings cover most cases). Well-configured project see almost no judgment calls. If AI still ask frequently after multiple features, standards documents need improvement. Example: aggregate boundary questions keep surface, DDD defaults document may not define sizing heuristic -- run domain-driven-design refiner capture team preference, eliminate question permanently.
Audit and fix all Lattice documentation, README, docs/, 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.
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.
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.
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.
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'.
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'.
Enforce architectural rules when generating or modifying code. 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.
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'.