Package Exports
- dino-spec
Readme
dino-spec
Automatic context engineering for Claude Code
__
(_ \
.-^^^ /
/ /
<__|-|__|dino-spec brings structured, context-aware development to Claude Code. It automatically maintains session state, provides 54 MCP tools, and enables intelligent context retrieval with real-time statusline display.
v10.0.0 Breaking Change: The
dino mcp-servecommand has been removed. Usedino mcp serveinstead.
Features
- MCP Integration - 54 tools + 29 resources auto-configured during init
- Ralph Loop (v11.2.0) - Fresh-context iterative execution for large-scale development
- Story-Based PRD - Define multi-story features with acceptance criteria
- Fresh Context - Each iteration gets clean context (no history accumulation)
- Git Checkpoints - Automatic checkpoints for rollback capability
- Learning Propagation - Insights from failed iterations inform future attempts
- Max 10 iterations - Hard limit with max 2 attempts per story
- MCP tools:
dino_ralph_init,dino_ralph_iterate,dino_ralph_status,dino_ralph_learn
- MCP Tool Aggressive Filtering (v10.3.0) - Phase-based tool context reduction (~50-70% savings)
- Phase Filtering - Only load tools relevant to current workflow phase
- Description Modes - Minimal/standard/full verbosity control
- Lazy Details - Full descriptions loaded on-demand via
dino://tools/details - Auto-Enabled - Filtering enabled by default, opt-out with
DINO_AGGRESSIVE_FILTERING=false
- Lazy Context Loading (v10.1.0) - Defer file loading to save tokens (~60-80% initial context reduction)
- Deferred Resources - Replace file content with lightweight placeholders (~5-10 tokens)
- On-Demand Expansion - Load content only when needed with
dino_expand - Token Budget - Control expansion with budget constraints
- HUD Integration - Real-time display of deferred/loaded resources
- Self-Validate Hooks (v9.16.0) - Proactive validation system that catches edge cases before execution
- Ambiguity Detection - Identifies vague terms, incomplete requirements, missing specifics
- Edge Case Analysis - Null checks, empty collections, error handling coverage
- Confidence Scoring - Weighted validation with thresholds (block < 0.4, ask < 0.6, proceed ≥ 0.6)
- Impact Assessment - Breaking changes, security risks, cross-cutting concerns
- Question Generation - Auto-converts issues to user questions with recommended options
- Pre-validate hook blocks low-confidence operations before execution
- Phase 4 Advanced Optimizations (v9.14.0)
- MCP Tool Filtering - Phase-based tool tiering for 60-70% context overhead reduction
- Memory Recitation - SM-2 spaced repetition for long-term memory retention
- Entropy Enhancement - Language-specific profiles and cross-section deduplication
- External Vector DB - Qdrant/Pinecone adapter support for scalable embeddings
- Enhanced Observability - Execution tree, memory access log, context transitions with HTML/JSON export (v9.10.0)
- Session State - Automatic tracking of focus, test/build/lint status, blockers
- Persistent Memory - Decisions, patterns, learnings survive across sessions
- Interactive Memory Browser - Full-featured TUI for memory management with search, graph view, and actions (v10.0.0)
- Real-Time HUD - Statusline integration showing budget, phase, tests, focus, git status (v9.1.0)
- Session Handoff - Context continuity system for seamless session transitions (v9.1.0)
- Workflow Skills - Phases from discovery to completion (
/dino.*) - Task Delegation - Specialized agents with context handoffs
- Recursive Agents - Self-spawning agents with complexity-based depth control (v8.0.0)
- Recursive Retrieval (v10.4.0) - Enhanced RLM-style query decomposition with:
- Semantic Decomposition - Intent-based query splitting by distinct concepts
- Dependency-Aware Decomposition - Sequential sub-queries with prerequisite analysis
- Composition Decomposition - Parallel execution for "A and B" style queries
- Quality Confidence Bounds - Uncertainty tracking with Wilson score intervals
- Task-Specific Weight Calibration - Automatic quality weight adjustment per task type
- Provenance Tracking - Full source chain attribution for every result
- Conflict Detection - Automatic identification of score variance and data mismatches
- Decision Rationale - Explainability with alternatives considered
- Dynamic Partitioning - Intelligent codebase segmentation (directory, feature, dependency, time)
- Context REPL - Declarative DSL for model-driven exploration
- Spec-Kit: Intelligent Prompt Analysis (v10.5.0 - v10.8.0) - Auto-specification system that analyzes prompts before implementation
- Complexity Scoring - Ambiguity, scope, risk, novelty analysis (0-100 scale)
- Confidence Gating - 80% confidence threshold prevents premature implementation
- Auto-Trigger - Automatic
/dino.specsuggestion for complex prompts (3+ signals) - Multi-Part Decomposition - Splits "add X and Y" into separate tasks
- Context-Aware Questions - References existing patterns and focus area
- Learning System - Refines scoring weights based on outcome feedback
- Confidence Visualization (v10.8.0) - Progress bar, factor breakdown, improvement suggestions
- MCP tools:
dino_spec_analyze,dino_spec_feedback,dino_spec_stats,dino_spec_weights
- Context Engineering - Research-backed token optimization (v9.6.0, v9.7.0, v9.14.0)
- Tool result summarization (~50-70% better retention)
- Positional context optimization (~15-25% recall improvement)
- Just-in-time context loading (~60-80% initial context reduction)
- Entropy-guided budgeting (~20-30% token reduction)
- Virtual memory management (~40-50% memory overhead reduction)
- Multi-agent context isolation (~70-80% token reduction for parallel agents)
- Semantic memory validation (~20-30% better relevance)
- Language-specific entropy profiles (v9.14.0)
- Cross-section deduplication (v9.14.0)
- Reference docs and skills (
/research,/context-optimize)
Installation
npm install -g dino-specQuick Start
cd your-project
dino init # Analyze codebase, install hooks, configure MCP
# MCP server is auto-configured for Claude Code
# Use /mcp in Claude Code to verifyCLI Commands
| Command | Description |
|---|---|
dino init |
Initialize project (hooks + MCP) |
dino init --minimal |
Minimal CLAUDE.md with MCP resources |
dino init --bootstrap |
Include project analysis summary |
dino status |
Show session state and health |
dino refresh |
Re-analyze codebase |
dino update |
Update everything (skills, rules, hooks, MCP) (v10.9.0) |
dino update --scope mcp |
Fix MCP configuration |
dino memory list |
Show persistent memories |
dino memory search <query> |
Search memories |
dino memory browse |
Interactive memory browser TUI (v10.0.0) |
dino retrieve <query> |
Hybrid file retrieval |
dino hud install |
Install statusline integration (v9.1.0) |
dino hud preview |
Preview HUD output (v9.1.0) |
dino hud debug |
Debug context tracking data (v10.10.0) |
dino hud debug-clear |
Clear HUD debug logs (v10.10.0) |
dino handoff create |
Save session context for continuity (v9.1.0) |
dino handoff load |
Load handoff context (v9.1.0) |
dino mcp serve |
Start MCP server (auto-managed) |
dino mcp health |
Check MCP health and diagnose issues |
Workflow Skills
Use in Claude Code with /dino.<phase>:
| Phase | Skill | Purpose |
|---|---|---|
| Discover | /dino.discover |
Capture requirements |
| Scout | /dino.scout |
Research codebase |
| Sniff | /dino.sniff |
Clarify ambiguities |
| Nest | /dino.nest |
Plan implementation |
| Hatch | /dino.hatch |
Break into tasks |
| Hunt | /dino.hunt |
Execute implementation |
| Aging | /dino.aging |
Verify with tests |
| Fossil | /dino.fossil |
Archive and commit |
Utilities: /dino.status, /dino.focus, /dino.next, /dino.handoff (v9.1.0), /dino.release (v9.4.0)
Spec-Kit: /dino.spec (v10.5.0) - Intelligent prompt analysis before implementation
Context Engineering: /research (v9.7.0), /context-optimize (v9.7.0)
MCP Resources
Access via @dino:// in Claude Code:
| Resource | Description |
|---|---|
@dino://session |
Focus, blockers, test status |
@dino://structure |
Project architecture |
@dino://patterns |
Coding conventions |
@dino://commands |
Build/test/lint commands |
@dino://tasks |
Task registry and progress |
@dino://handoff |
Agent handoff context |
@dino://memories/summary |
All memories overview |
@dino://retrieval/ranked |
Session-relevant files |
@dino://traces/tree |
Execution tree overview (v9.10.0) |
@dino://traces/memory-access |
Memory access log (v9.10.0) |
@dino://traces/context-graph |
Context transition graph (v9.10.0) |
@dino://traces/overview |
Combined trace overview (v9.10.0) |
MCP Tools
Key tools available via Claude Code:
| Tool | Purpose |
|---|---|
dino_status |
Get session state |
dino_focus_set |
Set focus area |
dino_memory_recall |
Semantic memory search |
dino_context_repl |
Declarative context queries |
dino_recursive_query |
RLM-style retrieval |
dino_partition |
Intelligent codebase partitioning |
dino_agent_analyze |
Analyze task complexity for spawn decisions |
dino_agent_spawn_decision |
Get recursive agent spawn recommendation |
dino_agent_tree |
Display agent execution tree |
dino_task_create |
Create task in registry |
dino_plan_create |
Create implementation plan |
dino_graph_query |
Query knowledge graph entities |
dino_graph_relations |
Find entity relationships |
dino_graph_architecture |
Architectural analysis (cycles, dependencies) |
dino_retrieve |
Hybrid code retrieval (keyword + semantic + graph) |
dino_retrieve_similar |
Find similar files |
dino_embed_search |
Semantic code search with embeddings |
dino_embed_stats |
Vector store statistics |
dino_chunk_file |
AST-based semantic chunking |
dino_chunk_analyze |
Chunking analysis |
dino_effort_recommend |
Recommend effort level based on task complexity (v9.9.0) |
dino_trace_export |
Export execution traces to JSON or HTML (v9.10.0) |
dino_memory_access_stats |
View memory operation statistics (v9.10.0) |
dino_context_transitions |
View context transition history (v9.10.0) |
dino_expand |
Expand deferred context references on demand (v10.1.0) |
dino_deferred_status |
Get status of deferred resources and lazy loading stats (v10.1.0) |
dino_defer |
Defer a file for lazy loading instead of loading immediately (v10.1.0) |
Specialized Agents
| Agent | Role | Purpose |
|---|---|---|
@dino-analyst |
Explorer | Read-only codebase research |
@dino-architect |
Planner | Design and planning |
@dino-implementer |
Implementer | Full implementation |
@dino-tester |
Tester | Test writing/execution |
@dino-reviewer |
Reviewer | Code review and QA |
Memory System
Persistent memories in .dino/memories/:
| Type | Half-Life | Purpose |
|---|---|---|
| Decisions | 30 days | Architectural choices |
| Patterns | 14 days | Coding preferences |
| Learnings | 7 days | Session discoveries |
dino memory list # View all memories
dino memory search "auth" # Search memories
dino memory decay # Clean stale memoriesProject Structure
your-project/
├── CLAUDE.md # Project context
├── .claude/
│ ├── skills/dino/ # Workflow skills
│ ├── rules/dino/ # Workflow rules
│ └── agents/ # Specialized agents
└── .dino/
├── session.md # Session state
├── structure.json # Codebase analysis
├── tasks/ # Task registry
├── checkpoints/ # Agent checkpoints
└── memories/ # Persistent memoryRequirements
- Node.js >= 20.0.0
- Claude Code CLI
Troubleshooting
MCP not showing in /mcp
# Windows
claude mcp add-json --scope user dino '{"command":"cmd","args":["/c","npx","dino-spec","mcp","serve"]}'
# macOS/Linux
claude mcp add --scope user dino -- npx dino-spec mcp serveThen restart Claude Code.
License
MIT
Built for developers who believe AI coding should be structured, reproducible, and context-aware.