mycontext-cli
v4.5.0
Published
The Context Engine for AI-Native Development - Generate high-fidelity scaffolds and Living Brains for AI-powered coding
Maintainers
Readme
mycontext-cli
The Specification & Implementation Runtime for AI-Native Development. Design features, maintain a Living Brain, and drive your codebase from natural language to working application — all from a single terminal cockpit.
What's New in 4.5.0
🧠 Enhanced TUI: Intent Parser + Multi-Agent Status
NEW: Parse-then-confirm workflow with deep intent analysis and comprehensive agent status tracking.
# Launch TUI
mycontext tui
# Inside TUI:
/parse Add user authentication with JWT, protect /dashboard and /profile
# → Shows: goals, requirements, risks, blockers, multi-phase plan with estimates
/lock # Lock session for stable plan
/execute # Execute the plan
/status detailed # Real-time agent status with progress bars
/unlock # Re-enable dynamic updatesKey Features:
Human Intent Parser — Deeply analyzes natural language before execution
- Extracts goals, functional & non-functional requirements, acceptance criteria
- Identifies dependencies, blockers, and risks with mitigation strategies
- Generates multi-phase execution plans with time estimates
- Beautiful colored output with confirmation workflow
Where Are We Agent — Multi-agent status aggregation
- Shows all active agents with progress bars (0-100%)
- Identifies blockers and ETAs
- Health scoring (excellent/good/fair/poor)
- Timeline of recent activities
Session Locking — Prevent dynamic task list updates during execution
/lockto freeze the plan/unlockto re-enable agile task injection
Philosophy: "Understand deeply before executing. See everything while executing."
🚀 Website Readiness Layer
NEW: Baseline website generation and architecture analysis before contextualization.
# Create deterministic baseline shell
mycontext website:shell
# Analyze route boundaries
mycontext routes:review
# Detect naming drift
mycontext naming:reviewPhilosophy: "Give every project a strong default body, then let the LLM contextualize the soul"
What website:shell creates:
- ✅ Responsive header with navigation
- ✅ Responsive footer with sections
- ✅ Mobile navigation drawer
- ✅ Home and about pages
- ✅ Error pages (404, loading, error)
- ✅ Container and section components
- ✅ Site configuration
- ✅ 13 files, deterministic, no LLM needed
What routes:review detects:
- Status variants (pending/processing/ready) → recommend tabs
- Sibling sections (analytics/activity) → recommend tabs
- Detail pages → recommend drawers/sheets
- Page-heavy architectures → recommend surfaces
What naming:review detects:
- Naming drift (user/profile/account inconsistencies)
- Folder/file pattern inconsistencies
- Component naming drift
Complete Workflow:
mycontext website:shell # 1. Create baseline
mycontext routes:review # 2. Analyze routes
mycontext naming:review # 3. Check naming
# Then: contextualize → refine → validate → healWhat's New in 4.4.0
14-Stage Landing Page Compiler
Generate production-ready landing pages with validation gates and zero hallucinated imports:
mycontext compile-page ./my-nextjs-appKey Features:
- 35+ shadcn/ui Component Catalog — No more hallucinated imports
- Validation Gates — Catch TypeScript errors at each stage, save 5+ minutes
- Constrained Design — Measurable refinements ("increase font-size by 4 units"), not vague aesthetics
- Structure-First — Separate skeleton generation (Stage 8) from content population (Stage 9)
- 14 Pipeline Stages — Baseline check → Context → Narrative → Sections → Inventory → Mapping → Schema → Skeleton → Content → Validation → Refinement → Final → Healing
Generates 6 sections: Hero, Problem, Solution, Features, Pricing, Call-to-Action
What is MyContext?
MyContext is a deterministic runtime that reverse-engineers finished software from natural language intent. It treats .mycontext/context.json as a Living Brain — the single source of truth for your app's goals, features, components, design system, and implementation plan.
The system compiles high-level intent through a layered pipeline:
- Question Graph — blocking questions that gate compilation
- Semantic Dictionary — term discovery, definition, and conflict resolution
- Feature Graph — dependency-ordered features with completeness scoring
- Implementation Graph — batch-ordered task plans per feature
- Operation Pipeline — 16 deterministic file operations with rollback
- Execution History — unified audit trail
- Validation Daemon — continuous structural drift detection
- Agent Registry — 7 specialized AI agents with metrics persistence
- File Registry — deterministic per-file tracking with drift detection
- Landing Page Compiler — 14-stage manifest-driven landing page generation with validation gates
- Interactive TUI — slash-command-driven terminal cockpit
Installation
npm install -g mycontext-cli
# or
pnpm add -g mycontext-cliVerify:
mycontext --version🚀 Getting Started in 3 Minutes
For absolute beginners:
# 1. Install globally
npm install -g mycontext-cli
# 2. Create a new Next.js project (if you don't have one)
npx create-next-app@latest my-app
cd my-app
# 3. Launch the interactive TUI
mycontext
# 4. Follow the guided setup wizard
# It will ask you questions about your project
# 5. Once setup is complete, try these commands:
/parse Build a todo app with add, complete, and delete features
/status
/executeWhat just happened?
- ✅ MyContext analyzed your natural language request
- ✅ Broke it into goals, requirements, risks, and execution phases
- ✅ Generated a detailed plan with time estimates
- ✅ Showed you agent status and progress
- ✅ Executed the plan with file operations and validation
Next steps:
- Try
/parse <your idea>to add new features - Use
/status detailedto see what agents are doing - Use
/lockbefore/executeif you want a stable plan - Use
/doctorto validate your codebase
Quick Start
Interactive Cockpit (recommended)
cd my-project
mycontext # auto-detects setup vs chat mode
# or explicitly:
mycontext tui # same as aboveBooting without arguments launches the TUI Cockpit:
- New project → guided setup wizard (SetupMode)
- Existing project → agent chat with slash commands
Quick Commands
# Initialize a project
mycontext init my-app
# Website Readiness Layer (NEW in 4.5.0)
mycontext website:shell # create baseline shell (13 files)
mycontext website:shell --dry-run # preview without writing
mycontext website:shell --force # overwrite existing files
mycontext routes:review # analyze route boundaries
mycontext naming:review # detect naming drift
# Landing Page Compiler (14-stage pipeline)
# Prerequisites: Next.js/React project with shadcn/ui installed + components.json
mycontext compile-page ./my-nextjs-app # generate from project README
mycontext compile-page --fresh # regenerate from scratch, bypass cache
mycontext compile-page --verbose # show detailed validation logs
mycontext compile-page --benchmark # generate baseline comparison
mycontext compile-page --output ./custom-dir # specify output directory
# Outputs: 6 components (Hero, Problem, Solution, Features, Pricing, CTA)
# Generate Living Brain from existing code
mycontext generate context --full
# Question-driven compilation
mycontext questions:generate "I want a daily guessing game"
mycontext questions:answer q-abc123 "Yes, one guess per day"
# Feature planning
mycontext feature:plan
mycontext impl:plan feat_daily_guess
mycontext impl:batches feat_daily_guess
# Execute the full pipeline
mycontext execute "Add a leaderboard to the game"
# File Registry — track every source file
mycontext registry:update
mycontext registry:diff # display drift report
mycontext registry:diff --strict # exit 1 on untracked files
mycontext registry:diff --json # machine-readable output
# Semantic dictionary
mycontext semantics:extract --scan src/
mycontext semantics:define SCORE_RANKING "Algorithm that sorts players by accuracy"
# Agent system
mycontext agent:list
mycontext agent:run ContextDriftAgent
mycontext agent:status
mycontext agent:metrics
# Validate everything
mycontext doctor
mycontext validate:watch # continuous monitoring
# Operation rollback
mycontext op:list
mycontext op:rollback op-create-file-abc123
# Security audit
mycontext doctor --red-team
# TUI Cockpit
mycontext tui
# Design debt remediation
mycontext tidy .TUI Slash Commands
Inside the interactive cockpit, use / commands:
🧠 Intent & Status (NEW in 4.5.0)
| Command | What it does |
|---------|-------------|
| /parse <request> | Deeply analyze natural language input with parse-then-confirm workflow. Extracts goals, requirements, risks, blockers, and multi-phase execution plan before execution. |
| /status | Get comprehensive status report from all active agents. Shows progress, blockers, ETAs, and health score. |
| /status detailed | Full status report with timeline of recent activities. |
| /lock | Lock session to prevent dynamic task list updates during execution. |
| /unlock | Unlock session to re-enable dynamic task updates. |
Example workflow:
/parse Add user authentication with JWT and protected routes
/lock # Lock session for stable plan
/execute # Execute the plan
/status detailed # Check progress during execution
/unlock # Re-enable dynamic updates📊 Features & Planning
| Command | What it does |
|---------|-------------|
| /features list | List features with completeness scores |
| /features graph | Show feature dependency graph |
| /impl plan <feature> | Generate implementation plan |
| /impl batches <feature> | Show batch plan |
❓ Questions
| Command | What it does |
|---------|-------------|
| /questions list | List blocking questions |
| /questions blockers | Show compilation gates |
| /questions harvest <prompt> | Auto-generate questions from a prompt |
📖 Semantic Dictionary
| Command | What it does |
|---------|-------------|
| /semantics list | List dictionary entries |
| /semantics search <term> | Search dictionary |
| /semantics define <term> <def> | Define a new term |
| /semantics discover <text> | Auto-discover terms |
⚙️ Operations
| Command | What it does |
|---------|-------------|
| /ops plan <feature> | Generate operations |
| /ops execute <id> | Execute operation batch |
| /ops status <id> | Check operation status |
| /ops rollback <id> | Roll back operations |
🤖 Agents
| Command | What it does |
|---------|-------------|
| /agents list | List registered agents |
| /agents run <name> | Run an agent |
| /agents status | Agent system status |
| /agents metrics | Agent metrics report |
🔄 Execution
| Command | What it does |
|---------|-------------|
| /execute compile | Compile pipeline (questions → semantics → features → impl → ops) |
| /execute run <prompt> | Full pipeline from prompt |
🏥 Validation
| Command | What it does |
|---------|-------------|
| /doctor run | Run all doctor rules |
| /doctor watch | Continuous validation |
| /doctor rules | List doctor rules |
📜 History
| Command | What it does |
|---------|-------------|
| /history list | Show execution history |
| /history show <id> | Show execution detail |
Environment Variables
MyContext loads .env files automatically (first match wins):
.mycontext/.env.local → .mycontext/.env → .env.local → .env
| Variable | Description |
|----------|-------------|
| ANTHROPIC_API_KEY | Anthropic Claude API key |
| OPENAI_API_KEY | OpenAI API key |
| GEMINI_API_KEY | Google Gemini API key |
| XAI_API_KEY | xAI (Grok) API key |
Core Concepts
| Concept | Description |
|---------|-------------|
| Living Brain | .mycontext/context.json — canonical source of truth |
| File Registry | .mycontext/file-registry.json — per-file SHA256 tracking |
| Landing Page Compiler | 14-stage manifest-driven pipeline with validation gates, shadcn/ui primitive catalog (35+ components), constrained design refinement, and TypeScript validation at each stage |
| Feature Graph | Dependency-ordered features with completeness scoring |
| Question Graph | Blocking questions that gate compilation |
| Semantic Dictionary | Term discovery, definition, conflict resolution |
| Implementation Graph | Batch-ordered task plans per feature |
| Operation Pipeline | 16 atomic file operations (create, patch, rename, delete, add-import, add-export, remove-import, add-classname, add-server-action, add-i18n-key, add-permission, add-test, add-route, add-component, add-action, add-model) |
| Agent System | 7 specialized agents (ContextDrift, FeatureCompleteness, SemanticDictionary, PromptToIntent, QAReplay, AdminFirst, I18n) with metrics persistence |
| Validation Daemon | Continuous structural drift detection with auto-fix |
| Execution History | Unified audit trail for all operations |
Project Structure
components/ ← Generated landing pages
└── landing-page/ ← Output from compile-page command
├── HeroSection.tsx
├── ProblemSection.tsx
├── SolutionSection.tsx
├── FeaturesSection.tsx
├── PricingSection.tsx
└── CallToActionSection.tsx
.mycontext/
├── context.json ← Living Brain (source of truth)
├── file-registry.json ← Per-file tracking with SHA256 hashes
├── execution-history.json ← Operation audit trail
├── agent-registry.json ← Agent metrics persistence
├── .env.local ← Local secrets (git-ignored)
├── landing-page/ ← Cached pipeline stages
│ ├── state.json ← Current pipeline stage
│ ├── baseline-check.json ← shadcn/ui verification results
│ ├── project-context.json ← Extracted README context
│ ├── narrative.json ← Product positioning
│ ├── section-manifest.json← Section-level manifest
│ ├── component-inventory.json ← Installed shadcn components
│ └── primitive-mapping.json ← UI pattern to component mapping
└── specs/ ← Auto-rendered markdown specs
└── [feature-id]/
├── requirements.md
├── design.md
└── tasks.mdLinks
Built with MyContext — reverse-compiling application anatomy for the AI era.
