Skip to content

Commit c3c459c

Browse files
committed
refactor(ai-markmap-agent): remove V1/V2 pipeline, keep only V3
- Remove V2 pipeline imports (src.graph) - Remove --v2 CLI argument - Simplify banner without version parameter - Remove version switching logic - Streamline workflow output to V3 only
1 parent 74e8131 commit c3c459c

File tree

1 file changed

+18
-45
lines changed

1 file changed

+18
-45
lines changed

tools/ai-markmap-agent/main.py

Lines changed: 18 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
# AI Markmap Agent - Main Entry Point
44
# =============================================================================
55
# Usage:
6-
# python main.py # Run V3 pipeline (default)
7-
# python main.py --v2 # Run V2 pipeline
6+
# python main.py # Run pipeline
87
# python main.py --config path/to/config.yaml
98
# python main.py --no-openai # Skip OpenAI API key request
109
# python main.py --dry-run # Load data but don't run pipeline
@@ -29,26 +28,21 @@
2928
get_api_key,
3029
)
3130
from src.data_sources import DataSourcesLoader, load_data_sources
32-
33-
# V2 Pipeline
34-
from src.graph import run_pipeline, build_markmap_graph
35-
36-
# V3 Pipeline
3731
from src.graph_v3 import run_pipeline_v3, build_markmap_graph_v3
3832

3933

40-
def print_banner(version: str = "V3") -> None:
34+
def print_banner() -> None:
4135
"""Print application banner."""
42-
print(f"""
36+
print("""
4337
╔═══════════════════════════════════════════════════════════════════════════╗
44-
║ AI Markmap Agent {version}
38+
AI Markmap Agent
4539
║ ║
4640
║ Multi-Agent Collaborative System for Markmap Generation ║
4741
║ ║
48-
{version} Features: ║
49-
{"║ • Structure Specification (YAML) based workflow ║" if version == "V3" else "║ • Markdown-based workflow ║"}
50-
{"║ • Content Strategists discuss concepts, not formatting ║" if version == "V3" else "║ • Optimizers debate full Markdown drafts ║"}
51-
{"║ • Writer is the ONLY agent producing final Markdown ║" if version == "V3" else "║ • Judges evaluate complete Markmaps ║"}
42+
║ Features:
43+
║ • Structure Specification (YAML) based workflow ║
44+
║ • Content Strategists discuss concepts, not formatting ║
45+
║ • Writer is the ONLY agent producing final Markdown ║
5246
║ ║
5347
║ Outputs: ║
5448
║ • neetcode_general_ai_en.md / .html ║
@@ -112,11 +106,6 @@ def main() -> int:
112106
default=None,
113107
help="Path to configuration file (default: config/config.yaml)"
114108
)
115-
parser.add_argument(
116-
"--v2",
117-
action="store_true",
118-
help="Use V2 pipeline (Markdown-based, default is V3)"
119-
)
120109
parser.add_argument(
121110
"--no-openai",
122111
action="store_true",
@@ -141,13 +130,9 @@ def main() -> int:
141130

142131
args = parser.parse_args()
143132

144-
# Determine pipeline version
145-
use_v3 = not args.v2
146-
pipeline_version = "V3" if use_v3 else "V2"
147-
148133
try:
149134
# Print banner
150-
print_banner(pipeline_version)
135+
print_banner()
151136

152137
# Step 1: Load configuration
153138
print("Loading configuration...")
@@ -156,7 +141,6 @@ def main() -> int:
156141

157142
# Print workflow summary
158143
print_workflow_summary(config)
159-
print(f"\n Pipeline: {pipeline_version}" + (" (use --v2 for V2)" if use_v3 else " (default is V3)"))
160144

161145
# Step 2: Request API keys at runtime (NOT STORED)
162146
providers = []
@@ -191,28 +175,17 @@ def main() -> int:
191175

192176
# Step 6: Build and run the LangGraph pipeline
193177
print("\n" + "=" * 60)
194-
print(f"Starting Markmap Generation Pipeline ({pipeline_version})")
178+
print("Starting Markmap Generation Pipeline")
195179
print("=" * 60)
196180

197-
# Run the appropriate pipeline
198-
if use_v3:
199-
print("\n📋 V3 Workflow:")
200-
print(" 1. Generate Structure Specifications (Planners)")
201-
print(" 2. Optimize content strategy (Strategists + Integrator)")
202-
print(" 3. Evaluate structure quality (Evaluators)")
203-
print(" 4. Render final Markmap (Writer)")
204-
print(" 5. Translate if needed")
205-
print(" 6. Post-process and save")
206-
result = run_pipeline_v3(data, config)
207-
else:
208-
print("\n📋 V2 Workflow:")
209-
print(" 1. Generate baselines (Draft mode)")
210-
print(" 2. Optimization rounds (Optimizers)")
211-
print(" 3. Evaluate and debate (Judges)")
212-
print(" 4. Write final output (Writer)")
213-
print(" 5. Translate if needed")
214-
print(" 6. Post-process and save")
215-
result = run_pipeline(data, config)
181+
print("\n📋 Workflow:")
182+
print(" 1. Generate Structure Specifications (Planners)")
183+
print(" 2. Optimize content strategy (Strategists + Integrator)")
184+
print(" 3. Evaluate structure quality (Evaluators)")
185+
print(" 4. Render final Markmap (Writer)")
186+
print(" 5. Translate if needed")
187+
print(" 6. Post-process and save")
188+
result = run_pipeline_v3(data, config)
216189

217190
# Report results
218191
print("\n" + "=" * 60)

0 commit comments

Comments
 (0)