boundary-bbcr-fallback
Execute automatic BBCR (Collapse-Rebirth Correction) when knowledge boundaries are exceeded or reasoning fails.
Transform a vibecoded project into a properly structured, deployment-ready codebase with secrets extracted and organized folders
$ npx -y skills add qdhenry/Claude-Command-Suite --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
/cleanup-vibesContext preview
What this command does when you run it.
Transform a vibecoded project into a properly structured, deployment-ready codebase with secrets extracted and organized folders
name: cleanup-vibes description: Transform a vibecoded project into a properly structured, deployment-ready codebase with secrets extracted and organized folders
<objective> Transform a vibecoded project into a clean, deployment-ready codebase. Vibecoded projects typically have hardcoded API keys, flat/disorganized folder structures, no .env files, and no documentation.
This command detects the project type (TypeScript, Python, or hybrid TS frontend + Python backend), reorganizes the folder structure following industry conventions, extracts all embedded secrets into .env files, and generates deployment-ready documentation. </objective>
<context> Project files: !`find . -maxdepth 1 -not -name '.' -not -name '.git' -not -name 'node_modules' -not -name '__pycache__' -not -name '.venv' -not -name 'venv' | head -40` Package files: !`for f in package.json pyproject.toml requirements.txt setup.py Pipfile Cargo.toml; do [ -f "$f" ] && echo "$f"; done; true` Current structure: !`find . -type f -not -path '*/node_modules/*' -not -path '*/.git/*' -not -path '*/__pycache__/*' -not -path '*/.venv/*' -not -path '*/venv/*' -not -path '*/.next/*' -not -path '*/dist/*' -not -path '*/.DS_Store' | head -80` Existing env files: !`ls -la .env* 2>/dev/null || echo "No .env files found"` Existing gitignore: !`cat .gitignore 2>/dev/null || echo "No .gitignore found"` </context>
<process>
1. Analyze the project to determine its type:
2. Identify the framework(s) in use (Next.js, React, Express, FastAPI, Flask, Django, etc.) 3. Identify the entry points and main application logic
Deploy 3 parallel sub-agents using the Task tool to scan for embedded secrets:
**Agent 1 - Credential Scanner**: Scan ALL files for patterns matching:
**Agent 2 - URL/Endpoint Scanner**: Scan for hardcoded:
**Agent 3 - Config Scanner**: Scan for:
Compile all findings into a unified secrets inventory.
1. Create `.env` with all extracted secrets organized by category:
# ============================================ # Application # ============================================ PORT=3000 NODE_ENV=development # ============================================ # Database # ============================================ DATABASE_URL=<extracted-value> # ============================================ # Authentication # ============================================ API_KEY=<extracted-value>
2. Create `.env.example` with the same structure but placeholder values:
PORT=3000 NODE_ENV=development DATABASE_URL=your_database_url_here API_KEY=your_api_key_here
3. Replace all hardcoded values in source files with environment variable references:
Based on the detected project type, reorganize into the appropriate structure:
**TypeScript/Next.js project:**
src/ app/ # Next.js App Router (or pages/) components/ # React components lib/ # Shared utilities, API clients hooks/ # Custom React hooks types/ # TypeScript type definitions styles/ # Global styles config/ # App configuration (reads from env) public/ # Static assets tests/ # Test files
**TypeScript/Express or Node project:**
src/ routes/ # API route handlers controllers/ # Business logic models/ # Data models middleware/ # Express middleware services/ # External service integrations utils/ # Shared utilities types/ # TypeScript types config/ # Configuration (reads from env) tests/ # Test files
**Python project:**
src/ (or app/) api/ # API routes/views models/ # Data models services/ # Business logic utils/ # Shared utilities config/ # Configuration (reads from env) tests/ # Test files
**Hybrid (Python backend + TS frontend):**
backend/
app/ # Python application
api/
models/
services/
config/
requirements.txt
pyproject.toml
frontend/
src/
app/
components/
lib/
hooks/
types/
package.json
tsconfig.jsonRules:
1. Ensure `.gitignore` exists and includes:
2. Ensure `tsconfig.json` exists and
A comprehensive development toolkit designed following Anthropic's Claude Code Best Practices for AI-assisted software development.
Repo: qdhenry/Claude-Command-Suite
Execute automatic BBCR (Collapse-Rebirth Correction) when knowledge boundaries are exceeded or reasoning fails.
Analyze semantic position relative to knowledge boundaries to prevent hallucination and identify uncertainty zones.
Generate a visual heatmap of knowledge boundaries showing safe zones, risk areas, and semantic coverage.
Evaluate the current risk level and provide detailed analysis of potential hallucination or reasoning failure.
Find and construct semantic bridges to safely navigate from current position to target concept without crossing dangerous boundaries.
Takes an input prompt and returns ONLY a token-optimized version that preserves meaning while minimizing token count. Based on LLM tokenization principles:…