1. Executive Summary (TL;DR)
This guide defines the transition from manual prompt engineering to Agentic System Architecture. We utilize three core layers — .agent (Rules), context (Memory), and skills (Logic) — to build self-evolving AI systems. By the end of this SOP, you will understand how to deploy a professional-grade US Market Analyzer using the Vibe Coding framework.
2. Technical Architecture
The Vibe Coding methodology prioritizes system structure over individual prompts. The architecture ensures that AI agents operate within defined guardrails while maintaining project-wide memory.
Logical Data Flow
graph TD
User((User)) -->|Instruction| Orchestrator[AI Orchestrator]
Orchestrator -->|Read Rules| AgentRules[.agent/ Rules]
Orchestrator -->|Load Memory| Context[context/ Memory]
Orchestrator -->|Execute| Skills[skills/ Functional]
subgraph "Core Agentic Layers"
AgentRules
Context
Skills
end
Skills -->|Analyze Data| Data[data/ Stock Data]
Data -->|Python Engine| Utils[utils/ Analytics]
Utils -->|Final Result| Web[web/ Dashboard]
Web -->|Feedback| Learnings[context/learnings.md]
Learnings -->|Evolve| Skills
3. Implementation SOP (Step-by-Step)
Step 1: Environment Initialization
Start by defining the project constitution. Use the following initialization prompt in your agentic IDE (Cursor or Antigravity):
Build a US Stock Market Analyzer using Vibe Coding principles:
1. Initialize .agent (Rules), context (Memory), and skills (Logic) directories.
2. Set up Next.js 14 for the frontend and a Python-based data bridge for the backend.
3. Install dependencies: pandas, yfinance, and google-generativeai.Step 2: Strategic Folder Mapping
Maintain strict separation between Memory and Execution.
| Directory | Role | Key Artifacts |
|---|---|---|
.agent/ | Identity | Personas, Operational Rules |
context/ | Memory | philosophy.md, market_view.md |
skills/ | Logic | macro_intelligence.md, risk_audit.md |
data/ | Assets | Real-time JSON/CSV exports |
Step 3: Designing Imperative Skills
A ‘Skill’ is not a request; it is a Standard Operating Procedure (SOP). Below is an example of a macro-intelligence skill:
# [Skill] Macro Intelligence Parser
# Goal: Correlate Fed rates with S&P 500 volatility.
1. Fetch latest Consumer Price Index (CPI) data from data/raw/.
2. Execute 'Calculated Sentiment' check against the last 24h market news.
3. Compare results against the thresholds defined in context/philosophy.md.
4. Output a risk-weighted recommendation to context/market_view.md.Step 4: The Self-Evolving Feedback Loop
Implement a learnings.md file to capture execution delta.
# logic/evolution_engine.py
def update_skills_from_feedback(feedback_path, skill_path):
"""
Automated refactoring of skill instructions based on user feedback
stored in the context layer.
"""
# Logic for skill optimization
pass4. Verification & Validation
To confirm the system is operational, verify the output of your master orchestrator.
✅ System Health Check:
text
[SYSTEM INFO] Initializing VibeAlgoLab Engine...
[CONTEXT] Loaded 12 memory artifacts.
[SKILLS] 5 active SOPs found (Macro, Risk, Sector, Newsletter, Copy).
[STATUS] 100% Operational. Awaiting user instruction.
5. Reference & Artifacts
⚠️ Disclaimer
This content is for educational purposes only. Automated trading involves significant risk. Always perform manual verification of AI-generated financial insights.