run
Add Prompt with command | Execute the inference-planz, Claude's best friend
What this skill does
# Inference Planz - Run
## CRITICAL EXECUTION REQUIREMENTS
### CZ (Confidenz) Score Integration
**MANDATORY**: For EVERY survey question batch:
1. **Read the CZ score** from `.claude/confidenz-latest.json`:
```bash
cat .claude/confidenz-latest.json 2>/dev/null
```
Returns: `{"score": 75, "level": "good", "color_code": "38;5;118"}`
2. **Display CZ score at BOTTOM** after presenting the question (not before, not in the middle - AT THE BOTTOM):
```
CZ: [SCORE]%
```
Use ANSI color code from the JSON: `\033[{color_code}mCZ: {score}%\033[0m`
3. **Color the recommended option label** using the SAME ANSI color code from the CZ score.
### CZ Color Codes Reference
| Score | Level | ANSI Code |
|-------|-------|-----------|
| 90+ | excellent | 38;5;46 |
| 80-89 | high | 38;5;82 |
| 70-79 | good | 38;5;118 |
| 60-69 | moderate | 38;5;154 |
| 50-59 | fair | 93 |
| 40-49 | uncertain | 33 |
| 25-39 | low | 91 |
| <25 | very_low | 31 |
### Execution Order (MANDATORY)
```
Step 1: Research Agent -> produces synthesis
Step 2: Read CZ score from .claude/confidenz-latest.json
Step 3: Call AskUserQuestion with recommended option colored using CZ color code
Step 4: Output CZ score at bottom: CZ: XX%
Step 5: IF "Review" selected -> Survey Agent -> present questions
Step 6: Plan Agent -> generate roadmap
```
### WRONG vs CORRECT
| WRONG | CORRECT |
|-------|---------|
| Output text survey: "Q1: Goal? A)Build B)Fix" | CALL `AskUserQuestion` tool |
| Ask user to type "1C 2D 3A..." | User clicks interactive buttons |
| Skip the CZ score display | Output `CZ: XX%` at BOTTOM after question |
| Plain recommended label | Color recommended label with CZ ANSI code |
---
When this skill is invoked with `/inference-planz:run <prompt>`, execute the complete inference-planz pipeline.
## Input Processing
The user's prompt is provided as "$ARGUMENTS".
### If prompt is empty:
Use the `AskUserQuestion` tool to display an INTERACTIVE domain selection survey:
```
AskUserQuestion({
questions: [
{
question: "What domain is this project for?",
header: "Domain",
multiSelect: false,
options: [
{ label: "Web Application (Recommended)", description: "Frontend/fullstack web apps with UI" },
{ label: "API/Backend Service", description: "REST/GraphQL APIs, microservices" },
{ label: "CLI Tool", description: "Command-line utilities and scripts" },
{ label: "Data Pipeline", description: "ETL, data processing, analytics" }
]
},
{
question: "What is the primary objective?",
header: "Goal",
multiSelect: false,
options: [
{ label: "Build new feature (Recommended)", description: "Create new functionality from scratch" },
{ label: "Fix bug or issue", description: "Debug and resolve existing problems" },
{ label: "Refactor/improve", description: "Restructure without changing behavior" },
{ label: "Research/exploration", description: "Investigate approaches and technologies" }
]
}
]
})
```
After receiving answers, use them to construct the full prompt context and proceed to the pipeline.
---
### If prompt is provided:
Execute the following 3-agent pipeline sequentially:
## Pipeline Execution
### Step 0: Input Normalization
- Trim whitespace from the prompt
- Detect language and tone
- Extract key entities, constraints, objectives, deliverables, format requests, and deadlines
- Store as structured context for agents
### Step 1: Research Agent (use Task tool with subagent_type="Plan")
Launch a research agent with this prompt:
```
You are a Research Agent analyzing a user's request. Your job is to deeply understand their intent and provide structured analysis.
User Request: {user_prompt}
Analyze this request and provide:
1. **Intent Summary**: What is the user truly trying to accomplish?
2. **Assumptions Inferred**: What assumptions can we reasonably make?
3. **Key Unknowns**: What critical information is missing?
4. **Constraints Detected**: What limitations or requirements are implied?
5. **Recommended Approaches**:
- **Option A**: [Description] - Tradeoffs: [pros/cons]
- **Option B**: [Description] - Tradeoffs: [pros/cons]
- **Option C**: [Description] - Tradeoffs: [pros/cons]
6. **Risks and Mitigations**: What could go wrong and how to prevent it?
7. **Success Criteria**: How do we know when this is done well?
Be concise but thorough. Focus on actionable insights. This is research only - do not write code or make changes.
```
Capture the Research Agent output.
---
## STEP 1.5: ACCEPT ALL DECISION (MANDATORY)
**IMMEDIATELY after Research Agent completes:**
### Step 1.5a: READ CZ SCORE
```bash
cat .claude/confidenz-latest.json 2>/dev/null
# Returns: {"score": 85, "level": "high", "color_code": "38;5;82"}
```
### Step 1.5b: CALL AskUserQuestion
The recommended option label should be colored using ANSI escape code from `color_code`.
```json
{
"questions": [
{
"question": "Research complete! Would you like to accept all recommended defaults or review each question individually?",
"header": "Quick Start",
"multiSelect": false,
"options": [
{ "label": "Accept All Recommended", "description": "Skip survey, use smart defaults from research, proceed directly to plan generation" },
{ "label": "Review each question", "description": "Answer 5-10 survey questions to customize the implementation plan" }
]
}
]
}
```
### Step 1.5c: OUTPUT CZ SCORE AT BOTTOM
AFTER the AskUserQuestion renders, output the CZ score line using ANSI color:
```
CZ: 85%
```
(colored with `\033[38;5;82m` for score 85)
### DECISION BRANCHING:
#### IF user clicks "Accept All Recommended":
```
┌─────────────────────────────────────────────────────────────┐
│ 1. SKIP Step 2 (Survey Agent) entirely │
│ 2. AUTO-GENERATE defaults from research synthesis: │
│ • Goal: Inferred from research intent │
│ • User: Inferred from detected entities │
│ • Output: Working code with tests │
│ • Quality: Production-ready │
│ 3. DISPLAY: "Accepted: Goal=X, User=X, Output=X, Quality=X" │
│ 4. PROCEED DIRECTLY to Step 3 (Plan Agent) │
└─────────────────────────────────────────────────────────────┘
```
#### IF user clicks "Review each question":
```
┌─────────────────────────────────────────────────────────────┐
│ Continue to Step 2 (Survey Agent) │
│ Generate and present individual questions │
└─────────────────────────────────────────────────────────────┘
```
---
### Step 2: Survey Agent (use Task tool with subagent_type="Plan")
**ONLY RUN THIS STEP IF USER SELECTED "Review each question" IN STEP 1.5**
Launch a survey agent with this prompt, including the research synthesis:
```
You are a Survey Agent creating clarification questions. Use the research synthesis to generate targeted questions that will unblock planning.
User Request: {user_prompt}
Research Synthesis:
{research_agent_output}
Generate 5-10 multiple-choice questions covering:
- Primary goal and success metrics
- Target user/audience
- Output format and structure
- Scope boundaries (what's in/out)
- Technical constraints
- Timeline expectations
- Quality bar
Rules:
- Each question must have 2-4 options (to fit AskUserQuestion tool limits)
- Mark the RECOMMENDED option with "(Recommended)" suffix and color label using CZ ANSI code
- Put the recommended option FIRST in the options array
- "Other" option is automatically provided by the tool
- Avoid open-ended essay questions
- Prioritize questions that unblock planning decisions
- End with a confirmation question: "Is this understanding correct?"
Output as structured JSON array for AskUserQuestion:
{
"questions": [
{
"question": "What is the primary goal?",
"header": "Goal",Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.