Skip to content

Commit a2e604a

Browse files
committed
feat: LIVE INTEGRATION - Vibe-Agile Fusion Engine integrated into Universal Composition Layer - complete emotional intelligence + systematic agile methodology with auto-generated artifacts and human interaction loops
1 parent e96ae8d commit a2e604a

1 file changed

Lines changed: 277 additions & 1 deletion

File tree

apps/universal_composition_app.py

Lines changed: 277 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,17 @@
2929
Architect = None
3030
AGENTS_AVAILABLE = False
3131

32+
# Import Vibe-Agile Fusion Engine
33+
try:
34+
from utils.agile.vibe_agile_fusion import VibeAgileFusionEngine, VibeContext, VibeIntensity, AgilePhase
35+
VIBE_AGILE_AVAILABLE = True
36+
except ImportError:
37+
VibeAgileFusionEngine = None
38+
VibeContext = None
39+
VibeIntensity = None
40+
AgilePhase = None
41+
VIBE_AGILE_AVAILABLE = False
42+
3243
# Page configuration
3344
st.set_page_config(
3445
page_title="Universal Composition Layer",
@@ -129,6 +140,20 @@ def initialize_session_state():
129140
# Load API keys from secrets.toml
130141
st.session_state.api_keys = load_api_keys()
131142

143+
# Initialize Vibe-Agile Fusion Engine
144+
if 'vibe_agile_engine' not in st.session_state:
145+
if VIBE_AGILE_AVAILABLE:
146+
st.session_state.vibe_agile_engine = VibeAgileFusionEngine(project_root)
147+
else:
148+
st.session_state.vibe_agile_engine = None
149+
150+
# Initialize vibe-agile project state
151+
if 'vibe_agile_projects' not in st.session_state:
152+
st.session_state.vibe_agile_projects = []
153+
154+
if 'current_agile_phase' not in st.session_state:
155+
st.session_state.current_agile_phase = AgilePhase.INCEPTION if VIBE_AGILE_AVAILABLE else None
156+
132157
if 'running_projects' not in st.session_state:
133158
st.session_state.running_projects = []
134159

@@ -2144,6 +2169,255 @@ def execute_guided_step(guided_config: Dict):
21442169
st.info(f"🎯 **Guided Creation**: Now executing {steps[step]}")
21452170
st.info("⏸️ **Paused for Approval**: Review the step and approve to continue.")
21462171

2172+
def display_agile_vibe_projects_interface():
2173+
"""Display the Agile-Vibe Projects interface for creating projects with emotional intelligence and systematic agile methodology."""
2174+
2175+
st.markdown('<div class="composition-card">', unsafe_allow_html=True)
2176+
st.subheader("🎼 Agile-Vibe Projects - Emotional Intelligence Meets Systematic Excellence")
2177+
st.markdown("Create projects that combine vibe-driven emotional context with complete agile methodology including auto-generated artifacts, human interaction loops, and phase-specific dialogues.")
2178+
2179+
if not VIBE_AGILE_AVAILABLE:
2180+
st.error("🚨 Vibe-Agile Fusion Engine not available. Please check the installation.")
2181+
st.markdown('</div>', unsafe_allow_html=True)
2182+
return
2183+
2184+
# Project Creation Interface
2185+
col1, col2 = st.columns([2, 1])
2186+
2187+
with col1:
2188+
st.markdown("### 🌟 Create New Vibe-Agile Project")
2189+
2190+
# Project Basic Info
2191+
project_name = st.text_input("Project Name", placeholder="My Amazing Vibe Project")
2192+
project_description = st.text_area(
2193+
"Project Vision",
2194+
placeholder="Describe your project vision with emotional context...",
2195+
height=100
2196+
)
2197+
2198+
# Vibe Context Configuration
2199+
st.markdown("#### 🎭 Vibe Context")
2200+
col_vibe1, col_vibe2 = st.columns(2)
2201+
2202+
with col_vibe1:
2203+
vibe_intensity = st.selectbox(
2204+
"Energy Level",
2205+
["calm", "focused", "energetic", "passionate", "urgent"],
2206+
help="How intense should the development energy be?"
2207+
)
2208+
2209+
communication_style = st.selectbox(
2210+
"Communication Style",
2211+
["collaborative", "direct", "supportive", "analytical", "creative"],
2212+
help="How should the team communicate during development?"
2213+
)
2214+
2215+
with col_vibe2:
2216+
quality_focus = st.selectbox(
2217+
"Quality Focus",
2218+
["craft", "speed", "innovation", "reliability", "user_delight"],
2219+
help="What aspect of quality should drive decisions?"
2220+
)
2221+
2222+
timeline_preference = st.selectbox(
2223+
"Timeline Approach",
2224+
["flexible", "structured", "sprint_driven", "milestone_driven", "continuous"],
2225+
help="How should time be managed in this project?"
2226+
)
2227+
2228+
# Agile Configuration
2229+
st.markdown("#### 📋 Agile Configuration")
2230+
col_agile1, col_agile2 = st.columns(2)
2231+
2232+
with col_agile1:
2233+
sprint_length = st.slider("Sprint Length (days)", 7, 21, 14)
2234+
team_size = st.slider("Team Size", 1, 10, 3)
2235+
2236+
with col_agile2:
2237+
methodology = st.selectbox(
2238+
"Agile Framework",
2239+
["Scrum", "Kanban", "Scrumban", "XP", "Custom"],
2240+
help="Choose your preferred agile methodology"
2241+
)
2242+
2243+
human_interaction_level = st.selectbox(
2244+
"Human Interaction Level",
2245+
["minimal", "standard", "intensive", "continuous"],
2246+
help="How much human interaction should be required?"
2247+
)
2248+
2249+
# Create Project Button
2250+
if st.button("🚀 Create Vibe-Agile Project", type="primary"):
2251+
if project_name and project_description:
2252+
create_vibe_agile_project(
2253+
project_name, project_description, vibe_intensity,
2254+
communication_style, quality_focus, timeline_preference,
2255+
sprint_length, team_size, methodology, human_interaction_level
2256+
)
2257+
else:
2258+
st.error("Please fill in project name and description.")
2259+
2260+
with col2:
2261+
st.markdown("### 🎯 Vibe-Agile Benefits")
2262+
st.info("""
2263+
**🌟 Emotional Intelligence**
2264+
- Projects adapt to team energy levels
2265+
- Communication style influences planning
2266+
- Quality focus drives decisions
2267+
2268+
**📋 Systematic Excellence**
2269+
- Complete agile artifact generation
2270+
- User stories with emotional context
2271+
- Sprint planning with vibe adaptation
2272+
2273+
**🤝 Human-Centered Process**
2274+
- Real interaction checkpoints
2275+
- Phase-specific dialogues
2276+
- Continuous feedback loops
2277+
2278+
**🔄 Adaptive Development**
2279+
- Timeline adjusts to energy levels
2280+
- Story points include emotional complexity
2281+
- Definition of Done includes satisfaction
2282+
""")
2283+
2284+
st.markdown('</div>', unsafe_allow_html=True)
2285+
2286+
# Display Existing Projects
2287+
display_existing_vibe_agile_projects()
2288+
2289+
def create_vibe_agile_project(project_name, project_description, vibe_intensity,
2290+
communication_style, quality_focus, timeline_preference,
2291+
sprint_length, team_size, methodology, human_interaction_level):
2292+
"""Create a new vibe-agile project with complete agile artifacts."""
2293+
2294+
try:
2295+
# Create vibe context
2296+
vibe_context = VibeContext(
2297+
intensity=getattr(VibeIntensity, vibe_intensity.upper()) if vibe_intensity.upper() in VibeIntensity.__members__ else VibeIntensity.FOCUSED,
2298+
communication_style=communication_style,
2299+
quality_focus=quality_focus,
2300+
timeline_preference=timeline_preference
2301+
)
2302+
2303+
# Project configuration
2304+
project_config = {
2305+
'name': project_name,
2306+
'description': project_description,
2307+
'vibe_context': vibe_context,
2308+
'sprint_length_days': sprint_length,
2309+
'team_size': team_size,
2310+
'methodology': methodology,
2311+
'human_interaction_level': human_interaction_level,
2312+
'created_at': datetime.now().isoformat()
2313+
}
2314+
2315+
# Create project using Vibe-Agile Fusion Engine
2316+
with st.spinner("🎼 Creating vibe-agile project with complete agile artifacts..."):
2317+
result = st.session_state.vibe_agile_engine.create_vibe_agile_project(project_config)
2318+
2319+
# Add to session state
2320+
st.session_state.vibe_agile_projects.append(result)
2321+
2322+
st.success("🎉 Vibe-Agile Project Created Successfully!")
2323+
st.balloons()
2324+
2325+
# Display creation summary
2326+
display_project_creation_summary(result)
2327+
2328+
except Exception as e:
2329+
st.error(f"🚨 Error creating vibe-agile project: {str(e)}")
2330+
2331+
def display_project_creation_summary(project_result):
2332+
"""Display a summary of the created vibe-agile project."""
2333+
2334+
st.markdown("### 🎯 Project Creation Summary")
2335+
2336+
col1, col2, col3 = st.columns(3)
2337+
2338+
with col1:
2339+
st.metric("📋 Agile Artifacts", project_result.get('artifacts_created', 0))
2340+
st.metric("📝 User Stories", project_result.get('user_stories_count', 0))
2341+
2342+
with col2:
2343+
st.metric("🏃‍♂️ Sprint Length", f"{project_result.get('sprint_length', 14)} days")
2344+
st.metric("👥 Team Size", project_result.get('team_size', 3))
2345+
2346+
with col3:
2347+
st.metric("🎭 Vibe Intensity", project_result.get('vibe_intensity', 'focused').title())
2348+
st.metric("💬 Interaction Level", project_result.get('human_interaction_level', 'standard').title())
2349+
2350+
# Display project structure
2351+
if 'project_structure' in project_result:
2352+
with st.expander("📁 Generated Project Structure"):
2353+
st.code(project_result['project_structure'], language='text')
2354+
2355+
# Display agile artifacts
2356+
if 'agile_artifacts' in project_result:
2357+
with st.expander("📋 Generated Agile Artifacts"):
2358+
for artifact_name, artifact_path in project_result['agile_artifacts'].items():
2359+
st.markdown(f"- **{artifact_name}**: `{artifact_path}`")
2360+
2361+
def display_existing_vibe_agile_projects():
2362+
"""Display existing vibe-agile projects with management options."""
2363+
2364+
if not st.session_state.vibe_agile_projects:
2365+
st.info("🌟 No vibe-agile projects yet. Create your first one above!")
2366+
return
2367+
2368+
st.markdown('<div class="composition-card">', unsafe_allow_html=True)
2369+
st.subheader(f"📁 Existing Vibe-Agile Projects ({len(st.session_state.vibe_agile_projects)})")
2370+
2371+
for i, project in enumerate(st.session_state.vibe_agile_projects):
2372+
with st.expander(f"🎼 {project.get('name', f'Project {i+1}')} - {project.get('vibe_intensity', 'focused').title()} Energy"):
2373+
col1, col2, col3 = st.columns([2, 1, 1])
2374+
2375+
with col1:
2376+
st.markdown(f"**Description**: {project.get('description', 'No description')}")
2377+
st.markdown(f"**Methodology**: {project.get('methodology', 'Scrum')}")
2378+
st.markdown(f"**Created**: {project.get('created_at', 'Unknown')}")
2379+
2380+
with col2:
2381+
if st.button(f"🚀 Enter Project", key=f"enter_project_{i}"):
2382+
enter_vibe_agile_project(project)
2383+
2384+
if st.button(f"📊 View Artifacts", key=f"view_artifacts_{i}"):
2385+
view_project_artifacts(project)
2386+
2387+
with col3:
2388+
if st.button(f"🔄 Continue Development", key=f"continue_dev_{i}"):
2389+
continue_project_development(project)
2390+
2391+
if st.button(f"📈 Project Health", key=f"health_{i}"):
2392+
show_project_health(project)
2393+
2394+
st.markdown('</div>', unsafe_allow_html=True)
2395+
2396+
def enter_vibe_agile_project(project):
2397+
"""Enter a vibe-agile project and start the development workflow."""
2398+
st.session_state.current_vibe_project = project
2399+
st.success(f"🎯 Entered project: {project.get('name', 'Unnamed Project')}")
2400+
st.info("🚧 Project development interface coming in next update...")
2401+
2402+
def view_project_artifacts(project):
2403+
"""View the agile artifacts for a project."""
2404+
st.info(f"📋 Viewing artifacts for: {project.get('name', 'Unnamed Project')}")
2405+
if 'agile_artifacts' in project:
2406+
for artifact_name, artifact_path in project['agile_artifacts'].items():
2407+
st.markdown(f"- **{artifact_name}**: `{artifact_path}`")
2408+
else:
2409+
st.warning("No artifacts found for this project.")
2410+
2411+
def continue_project_development(project):
2412+
"""Continue development on an existing project."""
2413+
st.info(f"🔄 Continuing development for: {project.get('name', 'Unnamed Project')}")
2414+
st.info("🚧 Development continuation interface coming in next update...")
2415+
2416+
def show_project_health(project):
2417+
"""Show project health metrics."""
2418+
st.info(f"📈 Project health for: {project.get('name', 'Unnamed Project')}")
2419+
st.info("🚧 Project health dashboard coming in next update...")
2420+
21472421
def main():
21482422
"""Main application function."""
21492423
initialize_session_state()
@@ -2154,7 +2428,7 @@ def main():
21542428
st.markdown("### 🔧 Navigation")
21552429
page = st.selectbox(
21562430
"Select Interface:",
2157-
["🎯 Composition Dashboard", "🚀 Project Runner", "🤖 Agent Builder", "🏢 Enterprise Systems", "🔍 System Monitor", "⚙️ Settings"]
2431+
["🎯 Composition Dashboard", "🚀 Project Runner", "🤖 Agent Builder", "🎼 Agile-Vibe Projects", "🏢 Enterprise Systems", "🔍 System Monitor", "⚙️ Settings"]
21582432
)
21592433

21602434
if page == "🎯 Composition Dashboard":
@@ -2163,6 +2437,8 @@ def main():
21632437
display_project_runner()
21642438
elif page == "🤖 Agent Builder":
21652439
display_agent_builder_interface()
2440+
elif page == "🎼 Agile-Vibe Projects":
2441+
display_agile_vibe_projects_interface()
21662442
elif page == "🏢 Enterprise Systems":
21672443
st.info("🚧 Enterprise Systems interface coming soon...")
21682444
elif page == "🔍 System Monitor":

0 commit comments

Comments
 (0)