Skip to content

@tank/vibe-coding

1.0.0

Description

Vibe coding methodology for AI-assisted development covering rules files, prompt engineering, context engineering, research-plan-implement workflow, tool selection, quality guardrails, prototype-to-production refactoring, and failure recovery.

Triggered by

vibe codingAGENTS.mdCLAUDE.mdcontext engineeringAI code generationAI pair programming
Download
Verified
tank install @tank/vibe-coding

Vibe Coding

Core Philosophy

  1. Architecture before generation — Define data models, component boundaries, and API contracts before prompting. AI generates code fast; wrong architecture generated fast is worse than no code at all.
  2. Rules files are your codebase's memory — LLMs forget between sessions. Persistent rules files (AGENTS.md, CLAUDE.md, .cursor/rules/) encode conventions, stack decisions, and patterns so the AI starts every session aligned.
  3. Iterate in small bites — One feature per prompt. Monolithic prompts produce monolithic, uncontrollable output. Break work into scaffold, connect, style, test.
  4. Review AI output like a junior dev's PR — AI handles happy paths well. It misses edge cases, security gaps, and architectural drift. Every generation gets human review before merge.
  5. Know when to stop vibing — Vibe coding excels at prototypes, CRUD, UI scaffolding, and boilerplate. Switch to manual engineering for security-critical code, performance-sensitive paths, and complex state machines.

Quick-Start: Common Problems

"How do I set up vibe coding for my project?"

  1. Choose your AI tool based on project stage and team size
  2. Create a rules file describing stack, conventions, file structure
  3. Write an architecture document the AI can reference
  4. Start with a small, well-defined feature to establish the pattern -> See references/tool-selection.md and references/rules-files.md

"My AI keeps generating inconsistent code"

  1. Check rules files — are conventions explicitly stated?
  2. Verify context window — long conversations cause drift
  3. Start fresh conversations for new features
  4. Reference existing code as style examples with @ mentions -> See references/context-engineering.md

"I vibe-coded a prototype and now it's a mess"

  1. Run the codebase through static analysis and type checking
  2. Identify the 3-5 architectural decisions that need correcting
  3. Refactor in layers: data model first, then API, then UI
  4. Add tests before each refactoring step -> See references/prototype-to-production.md

"How do I write prompts that produce good code?"

  1. Be specific: name files, describe data shapes, state expected behavior
  2. Use the Research-Plan-Implement framework for complex features
  3. Provide reference code for style matching
  4. Break large features into 3-5 sequential prompts -> See references/prompt-patterns.md

"AI-generated code has security issues"

  1. Never trust AI with auth, encryption, or access control without review
  2. Add security-focused rules to your rules file
  3. Run SAST tools (Semgrep, ESLint security) on every generation
  4. Treat AI output as untrusted input — validate before shipping -> See references/quality-guardrails.md

Decision Trees

When to Vibe vs When to Engineer

SignalApproach
Prototype / MVP / hackathonVibe code freely
CRUD endpoints, forms, boilerplateVibe code with review
UI scaffolding and stylingVibe code with design reference
Test generationVibe code then verify coverage
Auth, payments, encryptionManual engineering with AI assist
Performance-critical hot pathsManual engineering
Complex state machinesManual engineering with AI planning
Regulatory / compliance codeManual engineering, AI review only

Tool Selection

SituationTool
Full-stack with IDE integrationCursor (Agent Mode)
Terminal-first, agentic workflowClaude Code or OpenCode
Existing VS Code workflow + CopilotGitHub Copilot
Open-source, self-hosted modelsAider or Continue
Quick prototypes, no local setupBolt.new, Lovable, v0
Team standardization neededAGENTS.md + any tool

Rules File Format

ToolFileFormat
Cursor.cursor/rules/*.mdcMarkdown + YAML frontmatter
Claude CodeCLAUDE.mdPlain markdown
OpenCodeAGENTS.md or instructionsPlain markdown
Windsurf.windsurfrulesPlain markdown
GitHub Copilot.github/copilot-instructions.mdPlain markdown
Cross-tool standardAGENTS.mdPlain markdown (Linux Foundation)

Reference Index

FileContents
references/rules-files.mdRules file authoring for every tool, structure patterns, what to include/exclude, cross-tool AGENTS.md standard
references/prompt-patterns.mdPrompt engineering for code generation, Research-Plan-Implement framework, iterative prompting, role assignment, context referencing
references/context-engineering.mdContext window management, anti-drift strategies, project documentation for AI, type-driven context, conversation hygiene
references/tool-selection.mdAI coding tool comparison (Cursor, Claude Code, OpenCode, Windsurf, Copilot, Aider, Bolt.new), selection criteria, workflow patterns per tool
references/quality-guardrails.mdCode review for AI output, security scanning, testing strategies, static analysis, tech debt prevention, the junior-dev-PR mental model
references/prototype-to-production.mdRefactoring vibe-coded prototypes, architecture recovery, incremental hardening, test-first refactoring, data model correction
references/failure-modes.mdAnti-patterns and failure modes, architecture drift detection, context window exhaustion, over-reliance signals, recovery procedures

Command Palette

Search skills, docs, and navigate Tank