šØ EXECUTION NOTICE FOR CLAUDE
When you invoke this command via SlashCommand, the system returns THESE INSTRUCTIONS below.
YOU are the executor. This is NOT an autonomous subprocess.
- ā
The phases below are YOUR execution checklist
- ā
YOU must run each phase immediately using tools (Bash, Read, Write, Edit, TodoWrite)
- ā
Complete ALL phases before considering this command done
- ā DON't wait for "the command to complete" - YOU complete it by executing the phases
- ā DON't treat this as status output - it IS your instruction set
Immediately after SlashCommand returns, start executing Phase 0, then Phase 1, etc.
See @CLAUDE.md section "SlashCommand Execution - YOU Are The Executor" for detailed explanation.
Security Requirements
CRITICAL: All generated files must follow security rules:
@docs/security/SECURITY-RULES.md
Key requirements:
- Never hardcode API keys or secrets
- Use placeholders:
your_service_key_here
- Protect
.env files with .gitignore
- Create
.env.example with placeholders only
- Document key acquisition for users
Arguments: $ARGUMENTS
Goal: Analyze project structure and dependencies to detect the complete tech stack, then populate .claude/project.json with framework, languages, AI SDKs, and architecture information
Core Principles:
- Detect don't assume - never hardcode frameworks
- Analyze thoroughly - check package.json, requirements.txt, go.mod, Cargo.toml, etc.
- Support all stacks - frontend, backend, monorepo, AI applications
- AI-aware - detect Vercel AI SDK, Claude Agent SDK, Mem0, FastMCP, etc.
Available Skills
This commands has access to the following skills from the foundation plugin:
- environment-setup: Environment verification, tool checking, version validation, and path configuration. Use when checking system requirements, verifying tool installations, validating versions, checking PATH configuration, or when user mentions environment setup, system check, tool verification, version check, missing tools, or installation requirements.
- git-hooks:
- mcp-configuration: Comprehensive MCP server configuration templates, .mcp.json management, API key handling, and server installation helpers. Use when configuring MCP servers, managing .mcp.json files, setting up API keys, installing MCP servers, validating MCP configs, or when user mentions MCP setup, server configuration, MCP environment, API key storage, or MCP installation.
- mcp-server-config: Manage .mcp.json MCP server configurations. Use when configuring MCP servers, adding server entries, managing MCP config files, or when user mentions .mcp.json, MCP server setup, server configuration.
- project-detection: Comprehensive tech stack detection, framework identification, dependency analysis, and project.json generation. Use when analyzing project structure, detecting frameworks, identifying dependencies, discovering AI stack components, detecting databases, or when user mentions project detection, tech stack analysis, framework discovery, or project.json generation.
To use a skill:
!{skill skill-name}
Use skills when you need:
- Domain-specific templates and examples
- Validation scripts and automation
- Best practices and patterns
- Configuration generators
Skills provide pre-built resources to accelerate your work.
Phase 1: Discovery
Goal: Understand the project structure and locate key files
Actions:
- Parse $ARGUMENTS for project path (default: current directory)
- Check if .claude directory exists, create if needed
- Find all package manifest files:
- !{bash find . -maxdepth 3 -name "package.json" -o -name "requirements.txt" -o -name "pyproject.toml" -o -name "go.mod" -o -name "Cargo.toml" -o -name "composer.json" 2>/dev/null}
- Identify project type indicators:
- Frontend: node_modules, src/, public/, components/
- Backend: api/, server/, app/, main.py, main.go
- Monorepo: packages/, apps/, workspaces in package.json
Phase 2: Analysis
Goal: Load and analyze project files
Actions:
- Load primary manifest files for inspection:
- @package.json (if exists)
- @requirements.txt (if exists)
- @pyproject.toml (if exists)
- @go.mod (if exists)
- Check for configuration files:
- @next.config.js or @next.config.ts (Next.js)
- @vite.config.js or @vite.config.ts (Vite)
- @tsconfig.json (TypeScript)
- @.python-version (Python version)
- Look for AI-specific indicators:
- Dependencies: @vercel/ai, anthropic, openai, langchain
- MCP servers: @.mcp.json
- Memory: mem0, supabase (with pgvector)
Phase 3: Planning
Goal: Prepare detection strategy
Actions:
- Outline what needs to be detected:
- Primary framework (Next.js, FastAPI, Django, Go, Rust, etc.)
- Languages and versions (TypeScript, Python, Go, Rust)
- AI SDKs (Vercel AI SDK, Claude Agent SDK, OpenAI SDK)
- Database (Supabase, PostgreSQL, MongoDB, etc.)
- MCP servers configured
- Testing frameworks (Jest, Pytest, Go test)
- Build tools (Vite, Webpack, esbuild, etc.)
- Identify any ambiguities that need clarification
Phase 4: Implementation
Goal: Execute detection with agent
Actions:
Launch the stack-detector agent to analyze the project and detect the complete tech stack.
Provide the agent with:
- Context: Project files loaded from manifest analysis
- Target: $ARGUMENTS (project path)
- Requirements:
- Detect primary framework (Next.js, React, Vue, FastAPI, Django, Go, Rust, etc.)
- Identify all languages and their versions
- Find AI SDKs and providers (Vercel AI SDK, Anthropic, OpenAI, Google AI)
- Detect database and storage (Supabase, PostgreSQL, Redis, etc.)
- Identify MCP servers from .mcp.json
- Detect AI-specific features:
- Memory systems (Mem0, custom)
- Vector databases (pgvector, Pinecone, etc.)
- Agent frameworks (Claude Agent SDK, LangChain, CrewAI)
- Find testing framework
- Detect deployment targets (Vercel, Railway, DigitalOcean, AWS, etc.)
- Expected output: Complete tech stack information formatted for .claude/project.json
Phase 5: Review
Goal: Verify detection results
Actions:
- Check agent's output for completeness
- Verify all major components detected:
- Framework ā
- Languages ā
- AI stack ā
- Database ā
- Testing ā
- Validate .claude/project.json structure
- Example: @.claude/project.json
Phase 6: Summary
Goal: Report what was detected
Actions:
- Display comprehensive tech stack summary:
- Framework: {detected framework and version}
- Languages: {languages with versions}
- AI Stack: {AI SDKs and providers}
- Database: {database type and version}
- MCP Servers: {count and names}
- Testing: {test framework}
- Deployment: {target platforms}
- Show .claude/project.json location
- Suggest next steps:
- "Use detected stack with lifecycle commands"
- "AI Tech Stack detected: {stack-number}" (if applicable)
- "Run /foundation:env-check to verify required tools"