x-ipe 1.0.23__py3-none-any.whl → 1.0.25__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. x_ipe/app.py +32 -1
  2. x_ipe/handlers/terminal_handlers.py +6 -0
  3. x_ipe/handlers/voice_handlers.py +5 -0
  4. x_ipe/resources/copilot-instructions.md +19 -6
  5. x_ipe/resources/skills/lesson-learned/SKILL.md +208 -0
  6. x_ipe/resources/skills/lesson-learned/references/examples.md +238 -0
  7. x_ipe/resources/skills/project-quality-board-management/SKILL.md +135 -298
  8. x_ipe/resources/skills/project-quality-board-management/references/evaluation-principles.md +213 -0
  9. x_ipe/resources/skills/project-quality-board-management/references/evaluation-procedures.md +214 -0
  10. x_ipe/resources/skills/project-quality-board-management/templates/quality-report.md +70 -18
  11. x_ipe/resources/skills/task-execution-guideline/SKILL.md +2 -2
  12. x_ipe/resources/skills/task-execution-guideline/templates/task-record.yaml +1 -1
  13. x_ipe/resources/skills/task-type-code-implementation/SKILL.md +72 -270
  14. x_ipe/resources/skills/task-type-code-implementation/references/implementation-guidelines.md +432 -0
  15. x_ipe/resources/skills/task-type-code-refactor-v2/SKILL.md +127 -353
  16. x_ipe/resources/skills/task-type-code-refactor-v2/references/refactoring-techniques.md +373 -0
  17. x_ipe/resources/skills/task-type-feature-breakdown/SKILL.md +31 -243
  18. x_ipe/resources/skills/task-type-feature-breakdown/references/breakdown-guidelines.md +330 -0
  19. x_ipe/resources/skills/task-type-feature-refinement/SKILL.md +27 -180
  20. x_ipe/resources/skills/task-type-feature-refinement/references/specification-writing-guide.md +267 -0
  21. x_ipe/resources/skills/task-type-idea-mockup/SKILL.md +38 -276
  22. x_ipe/resources/skills/task-type-idea-mockup/references/mockup-guidelines.md +299 -0
  23. x_ipe/resources/skills/task-type-idea-to-architecture/SKILL.md +20 -218
  24. x_ipe/resources/skills/task-type-idea-to-architecture/references/architecture-patterns.md +342 -0
  25. x_ipe/resources/skills/task-type-ideation/SKILL.md +10 -266
  26. x_ipe/resources/skills/task-type-ideation/references/folder-naming-guide.md +55 -0
  27. x_ipe/resources/skills/task-type-ideation/references/tool-usage-guide.md +236 -0
  28. x_ipe/resources/skills/task-type-ideation-v2/SKILL.md +488 -0
  29. x_ipe/resources/skills/task-type-ideation-v2/references/examples.md +377 -0
  30. x_ipe/resources/skills/task-type-ideation-v2/references/folder-naming-guide.md +74 -0
  31. x_ipe/resources/skills/task-type-ideation-v2/references/tool-usage-guide.md +145 -0
  32. x_ipe/resources/skills/task-type-ideation-v2/references/visualization-guide.md +160 -0
  33. x_ipe/resources/skills/task-type-ideation-v2/templates/idea-summary.md +86 -0
  34. x_ipe/resources/skills/task-type-refactoring-analysis/SKILL.md +83 -145
  35. x_ipe/resources/skills/task-type-refactoring-analysis/references/output-schema.md +172 -0
  36. x_ipe/resources/skills/task-type-technical-design/SKILL.md +28 -214
  37. x_ipe/resources/skills/task-type-technical-design/references/design-templates.md +422 -0
  38. x_ipe/resources/skills/task-type-test-generation/SKILL.md +47 -332
  39. x_ipe/resources/skills/task-type-test-generation/references/test-patterns.md +368 -0
  40. x_ipe/resources/skills/tool-tracing-creator/SKILL.md +312 -0
  41. x_ipe/resources/skills/tool-tracing-creator/references/examples.md +324 -0
  42. x_ipe/resources/skills/tool-tracing-instrumentation/SKILL.md +373 -0
  43. x_ipe/resources/skills/tool-tracing-instrumentation/references/examples.md +264 -0
  44. x_ipe/resources/skills/x-ipe-skill-creator-v3/SKILL.md +486 -0
  45. x_ipe/resources/skills/x-ipe-skill-creator-v3/references/10. example-gate-conditions.md +73 -0
  46. x_ipe/resources/skills/x-ipe-skill-creator-v3/references/11. reference-quality-standards.md +127 -0
  47. x_ipe/resources/skills/x-ipe-skill-creator-v3/references/2. reference-section-order.md +127 -0
  48. x_ipe/resources/skills/x-ipe-skill-creator-v3/references/3. example-step-based-code-review.md +84 -0
  49. x_ipe/resources/skills/x-ipe-skill-creator-v3/references/4. example-step-based-feature-implementation.md +113 -0
  50. x_ipe/resources/skills/x-ipe-skill-creator-v3/references/5. example-function-based-validation.md +73 -0
  51. x_ipe/resources/skills/x-ipe-skill-creator-v3/references/6. example-function-based-analysis.md +94 -0
  52. x_ipe/resources/skills/x-ipe-skill-creator-v3/references/7. example-task-io-code-implementation.md +36 -0
  53. x_ipe/resources/skills/x-ipe-skill-creator-v3/references/8. example-structured-summary.md +43 -0
  54. x_ipe/resources/skills/x-ipe-skill-creator-v3/references/9. example-dor-dod.md +77 -0
  55. x_ipe/resources/skills/x-ipe-skill-creator-v3/references/examples.md +429 -0
  56. x_ipe/resources/skills/x-ipe-skill-creator-v3/references/skill-general-guidelines-v2.md +611 -0
  57. x_ipe/resources/skills/x-ipe-skill-creator-v3/templates/skill-meta-x-ipe-meta.md +153 -0
  58. x_ipe/resources/skills/x-ipe-skill-creator-v3/templates/skill-meta-x-ipe-task-based.md +324 -0
  59. x_ipe/resources/skills/x-ipe-skill-creator-v3/templates/skill-meta-x-ipe-task-category.md +109 -0
  60. x_ipe/resources/skills/x-ipe-skill-creator-v3/templates/skill-meta-x-ipe-tool.md +205 -0
  61. x_ipe/resources/skills/x-ipe-skill-creator-v3/templates/x-ipe-meta.md +334 -0
  62. x_ipe/resources/skills/x-ipe-skill-creator-v3/templates/x-ipe-task-based.md +279 -0
  63. x_ipe/resources/skills/x-ipe-skill-creator-v3/templates/x-ipe-tool.md +175 -0
  64. x_ipe/resources/skills/x-ipe-skill-creator-v3/templates/x-ipe-workflow-orchestration.md +329 -0
  65. x_ipe/resources/skills/x-ipe-task-based-ideation/SKILL.md +487 -0
  66. x_ipe/resources/skills/x-ipe-task-based-ideation/references/examples.md +377 -0
  67. x_ipe/resources/skills/x-ipe-task-based-ideation/references/folder-naming-guide.md +74 -0
  68. x_ipe/resources/skills/x-ipe-task-based-ideation/references/tool-usage-guide.md +145 -0
  69. x_ipe/resources/skills/x-ipe-task-based-ideation/references/visualization-guide.md +160 -0
  70. x_ipe/resources/skills/x-ipe-task-based-ideation/templates/idea-summary.md +86 -0
  71. x_ipe/routes/__init__.py +2 -0
  72. x_ipe/routes/ideas_routes.py +289 -0
  73. x_ipe/routes/kb_routes.py +80 -0
  74. x_ipe/routes/main_routes.py +18 -0
  75. x_ipe/routes/project_routes.py +7 -0
  76. x_ipe/routes/proxy_routes.py +10 -2
  77. x_ipe/routes/quality_evaluation_routes.py +193 -0
  78. x_ipe/routes/settings_routes.py +6 -0
  79. x_ipe/routes/tools_routes.py +6 -0
  80. x_ipe/routes/tracing_routes.py +232 -0
  81. x_ipe/routes/uiux_feedback_routes.py +50 -0
  82. x_ipe/services/__init__.py +5 -0
  83. x_ipe/services/config_service.py +6 -0
  84. x_ipe/services/file_service.py +20 -0
  85. x_ipe/services/homepage_service.py +160 -0
  86. x_ipe/services/ideas_service.py +535 -2
  87. x_ipe/services/kb_service.py +378 -0
  88. x_ipe/services/proxy_service.py +37 -7
  89. x_ipe/services/settings_service.py +13 -0
  90. x_ipe/services/skills_service.py +4 -0
  91. x_ipe/services/terminal_service.py +24 -0
  92. x_ipe/services/themes_service.py +4 -0
  93. x_ipe/services/tools_config_service.py +4 -0
  94. x_ipe/services/tracing_service.py +333 -0
  95. x_ipe/services/uiux_feedback_service.py +148 -1
  96. x_ipe/services/voice_input_service_v2.py +11 -0
  97. x_ipe/static/css/base.css +7 -0
  98. x_ipe/static/css/homepage-infinity.css +330 -0
  99. x_ipe/static/css/kb-core.css +301 -0
  100. x_ipe/static/css/quality-evaluation.css +345 -0
  101. x_ipe/static/css/sidebar.css +14 -4
  102. x_ipe/static/css/terminal.css +23 -0
  103. x_ipe/static/css/tracing-dashboard.css +796 -0
  104. x_ipe/static/css/uiux-feedback.css +7 -1
  105. x_ipe/static/css/workplace.css +636 -0
  106. x_ipe/static/img/homepage-infinity-loop.png +0 -0
  107. x_ipe/static/js/features/confirm-dialog.js +169 -0
  108. x_ipe/static/js/features/folder-view.js +742 -0
  109. x_ipe/static/js/features/homepage-infinity.js +314 -0
  110. x_ipe/static/js/features/kb-core.js +371 -0
  111. x_ipe/static/js/features/quality-evaluation.js +387 -0
  112. x_ipe/static/js/features/sidebar.js +255 -12
  113. x_ipe/static/js/features/tracing-dashboard.js +855 -0
  114. x_ipe/static/js/features/tracing-graph.js +1031 -0
  115. x_ipe/static/js/features/tree-drag.js +227 -0
  116. x_ipe/static/js/features/tree-search.js +228 -0
  117. x_ipe/static/js/features/workplace.js +661 -33
  118. x_ipe/static/js/init.js +76 -0
  119. x_ipe/static/js/terminal-v2.js +45 -14
  120. x_ipe/static/js/terminal.js +50 -49
  121. x_ipe/static/js/uiux-feedback.js +75 -16
  122. x_ipe/templates/base.html +24 -0
  123. x_ipe/templates/index.html +10 -1
  124. x_ipe/templates/knowledge-base.html +110 -0
  125. x_ipe/templates/workplace.html +4 -0
  126. x_ipe/tracing/__init__.py +37 -0
  127. x_ipe/tracing/buffer.py +135 -0
  128. x_ipe/tracing/context.py +125 -0
  129. x_ipe/tracing/decorator.py +288 -0
  130. x_ipe/tracing/middleware.py +197 -0
  131. x_ipe/tracing/parser.py +235 -0
  132. x_ipe/tracing/redactor.py +111 -0
  133. x_ipe/tracing/writer.py +122 -0
  134. {x_ipe-1.0.23.dist-info → x_ipe-1.0.25.dist-info}/METADATA +2 -2
  135. {x_ipe-1.0.23.dist-info → x_ipe-1.0.25.dist-info}/RECORD +138 -65
  136. x_ipe/app.py.bak +0 -1333
  137. x_ipe/resources/skills/x-ipe-skill-creator/SKILL.md +0 -329
  138. x_ipe/resources/skills/x-ipe-skill-creator/references/output-patterns.md +0 -169
  139. x_ipe/resources/skills/x-ipe-skill-creator/references/skill-structure.md +0 -162
  140. x_ipe/resources/skills/x-ipe-skill-creator/references/workflows.md +0 -110
  141. x_ipe/resources/skills/x-ipe-skill-creator/templates/references/examples.md +0 -113
  142. x_ipe/resources/skills/x-ipe-skill-creator/templates/skill-category-skill.md +0 -296
  143. x_ipe/resources/skills/x-ipe-skill-creator/templates/task-type-skill.md +0 -269
  144. {x_ipe-1.0.23.dist-info → x_ipe-1.0.25.dist-info}/WHEEL +0 -0
  145. {x_ipe-1.0.23.dist-info → x_ipe-1.0.25.dist-info}/entry_points.txt +0 -0
  146. {x_ipe-1.0.23.dist-info → x_ipe-1.0.25.dist-info}/licenses/LICENSE +0 -0
@@ -5,12 +5,62 @@ API routes for submitting UI/UX feedback.
5
5
  """
6
6
  from flask import Blueprint, request, jsonify, current_app
7
7
  from ..services.uiux_feedback_service import UiuxFeedbackService
8
+ from x_ipe.tracing import x_ipe_tracing
8
9
 
9
10
 
10
11
  uiux_feedback_bp = Blueprint('uiux_feedback', __name__)
11
12
 
12
13
 
14
+ @uiux_feedback_bp.route('/api/uiux-feedback', methods=['GET'])
15
+ @x_ipe_tracing()
16
+ def list_feedback():
17
+ """
18
+ List recent feedback entries.
19
+
20
+ Query params:
21
+ days: Number of days to look back (default 2)
22
+
23
+ Returns:
24
+ 200: {"entries": [...]}
25
+ """
26
+ project_root = current_app.config.get('PROJECT_ROOT', '.')
27
+ days = request.args.get('days', 2, type=int)
28
+
29
+ service = UiuxFeedbackService(project_root)
30
+ entries = service.list_feedback(days=days)
31
+
32
+ return jsonify({'entries': entries}), 200
33
+
34
+
35
+ @uiux_feedback_bp.route('/api/uiux-feedback/<feedback_id>', methods=['DELETE'])
36
+ @x_ipe_tracing()
37
+ def delete_feedback(feedback_id):
38
+ """
39
+ Delete a feedback entry by ID.
40
+
41
+ Path params:
42
+ feedback_id: The feedback folder name/ID
43
+
44
+ Returns:
45
+ 200: {"success": true}
46
+ 404: {"success": false, "error": "Feedback not found"}
47
+ 500: {"success": false, "error": "..."}
48
+ """
49
+ project_root = current_app.config.get('PROJECT_ROOT', '.')
50
+
51
+ service = UiuxFeedbackService(project_root)
52
+ result = service.delete_feedback(feedback_id)
53
+
54
+ if result['success']:
55
+ return jsonify(result), 200
56
+ elif 'not found' in result.get('error', '').lower():
57
+ return jsonify(result), 404
58
+ else:
59
+ return jsonify(result), 500
60
+
61
+
13
62
  @uiux_feedback_bp.route('/api/uiux-feedback', methods=['POST'])
63
+ @x_ipe_tracing()
14
64
  def submit_feedback():
15
65
  """
16
66
  Submit UI/UX feedback entry.
@@ -26,6 +26,9 @@ from .file_service import (
26
26
  # Ideas Service (FEATURE-008)
27
27
  from .ideas_service import IdeasService
28
28
 
29
+ # KB Service (FEATURE-025-A)
30
+ from .kb_service import KBService
31
+
29
32
  # Terminal Service (FEATURE-005)
30
33
  from .terminal_service import (
31
34
  OutputBuffer,
@@ -80,6 +83,8 @@ __all__ = [
80
83
  'ContentService',
81
84
  # Ideas
82
85
  'IdeasService',
86
+ # KB
87
+ 'KBService',
83
88
  # Terminal
84
89
  'OutputBuffer',
85
90
  'PersistentSession',
@@ -10,6 +10,8 @@ from pathlib import Path
10
10
  from typing import Optional
11
11
  from dataclasses import dataclass
12
12
 
13
+ from x_ipe.tracing import x_ipe_tracing
14
+
13
15
 
14
16
  CONFIG_FILE_NAME = '.x-ipe.yaml'
15
17
  MAX_PARENT_LEVELS = 20
@@ -31,14 +33,17 @@ class ConfigData:
31
33
  file_tree_scope: str
32
34
  terminal_cwd: str
33
35
 
36
+ @x_ipe_tracing()
34
37
  def get_file_tree_path(self) -> str:
35
38
  """Return the path for file tree based on file_tree_scope."""
36
39
  return self.project_root if self.file_tree_scope == "project_root" else self.x_ipe_app
37
40
 
41
+ @x_ipe_tracing()
38
42
  def get_terminal_cwd(self) -> str:
39
43
  """Return the path for terminal cwd based on terminal_cwd setting."""
40
44
  return self.project_root if self.terminal_cwd == "project_root" else self.x_ipe_app
41
45
 
46
+ @x_ipe_tracing()
42
47
  def to_dict(self) -> dict:
43
48
  """Convert to dictionary for API response."""
44
49
  return {
@@ -74,6 +79,7 @@ class ConfigService:
74
79
  self._config_data: Optional[ConfigData] = None
75
80
  self._error: Optional[str] = None
76
81
 
82
+ @x_ipe_tracing()
77
83
  def load(self) -> Optional[ConfigData]:
78
84
  """
79
85
  Discover, parse, and validate config file.
@@ -1,5 +1,7 @@
1
1
  """
2
2
  FEATURE-001: Project Navigation
3
+ FEATURE-002: Content Viewer
4
+ FEATURE-003: Content Editor
3
5
 
4
6
  FileNode: Represents a file or folder in the project structure
5
7
  Section: Represents a top-level section in the sidebar
@@ -16,6 +18,8 @@ from dataclasses import dataclass
16
18
  from watchdog.observers import Observer
17
19
  from watchdog.events import FileSystemEventHandler, FileSystemEvent
18
20
 
21
+ from x_ipe.tracing import x_ipe_tracing
22
+
19
23
 
20
24
  @dataclass
21
25
  class FileNode:
@@ -96,6 +100,12 @@ class ProjectService:
96
100
  'path': 'x-ipe-docs/requirements',
97
101
  'icon': 'bi-file-text'
98
102
  },
103
+ {
104
+ 'id': 'skill-meta',
105
+ 'label': 'Skill Meta',
106
+ 'path': 'x-ipe-docs/skill-meta',
107
+ 'icon': 'bi-stars'
108
+ },
99
109
  {
100
110
  'id': 'code',
101
111
  'label': 'Code',
@@ -121,6 +131,7 @@ class ProjectService:
121
131
  self.project_root = Path(project_root).resolve()
122
132
  self.sections_config = sections or self.DEFAULT_SECTIONS
123
133
 
134
+ @x_ipe_tracing(level="INFO")
124
135
  def get_structure(self) -> Dict[str, Any]:
125
136
  """
126
137
  Get the complete project structure for sidebar navigation.
@@ -155,6 +166,7 @@ class ProjectService:
155
166
  'sections': sections
156
167
  }
157
168
 
169
+ @x_ipe_tracing(level="DEBUG")
158
170
  def _scan_directory(self, directory: Path, relative_base: str) -> List[FileNode]:
159
171
  """
160
172
  Recursively scan a directory and build file tree.
@@ -323,6 +335,7 @@ class FileWatcher:
323
335
  self._running = False
324
336
  self.ignore_patterns = self._load_gitignore()
325
337
 
338
+ @x_ipe_tracing(level="DEBUG")
326
339
  def _load_gitignore(self) -> List[str]:
327
340
  """Load and parse .gitignore patterns."""
328
341
  gitignore_path = self.project_root / '.gitignore'
@@ -341,6 +354,7 @@ class FileWatcher:
341
354
 
342
355
  return patterns
343
356
 
357
+ @x_ipe_tracing(level="DEBUG")
344
358
  def _emit_event(self, event_data: Dict):
345
359
  """Emit file system event via WebSocket"""
346
360
  if self.socketio:
@@ -363,6 +377,7 @@ class FileWatcher:
363
377
  }
364
378
  self.socketio.emit('content_changed', content_event)
365
379
 
380
+ @x_ipe_tracing(level="INFO")
366
381
  def start(self):
367
382
  """Start watching project directories"""
368
383
  if self._running:
@@ -381,6 +396,7 @@ class FileWatcher:
381
396
  self.observer.start()
382
397
  self._running = True
383
398
 
399
+ @x_ipe_tracing(level="INFO")
384
400
  def stop(self):
385
401
  """Stop watching"""
386
402
  if self.observer and self._running:
@@ -433,6 +449,7 @@ class ContentService:
433
449
  """
434
450
  self.project_root = Path(project_root).resolve()
435
451
 
452
+ @x_ipe_tracing(level="DEBUG")
436
453
  def detect_file_type(self, extension: str) -> str:
437
454
  """
438
455
  Detect file type from extension.
@@ -445,6 +462,7 @@ class ContentService:
445
462
  """
446
463
  return self.FILE_TYPES.get(extension.lower(), 'text')
447
464
 
465
+ @x_ipe_tracing(level="INFO")
448
466
  def get_content(self, relative_path: str) -> Dict[str, Any]:
449
467
  """
450
468
  Get file content with metadata.
@@ -487,6 +505,7 @@ class ContentService:
487
505
  'size': size
488
506
  }
489
507
 
508
+ @x_ipe_tracing(level="DEBUG")
490
509
  def _validate_path_for_write(self, relative_path: str) -> tuple:
491
510
  """
492
511
  Validate a path for write operations.
@@ -543,6 +562,7 @@ class ContentService:
543
562
 
544
563
  return (True, full_path)
545
564
 
565
+ @x_ipe_tracing(level="INFO")
546
566
  def save_content(self, relative_path: str, content: str) -> Dict[str, Any]:
547
567
  """
548
568
  Save content to a file.
@@ -0,0 +1,160 @@
1
+ """
2
+ Homepage Service
3
+ FEATURE-026: Homepage Infinity Loop
4
+
5
+ Provides stage mapping configuration and template generation
6
+ for the interactive homepage infinity loop visualization.
7
+ """
8
+ from x_ipe.services.tracing_service import x_ipe_tracing
9
+
10
+
11
+ class HomepageService:
12
+ """Service for homepage infinity loop functionality"""
13
+
14
+ # Stage-to-sidebar mapping configuration
15
+ STAGE_MAPPING = {
16
+ 'ideation': {
17
+ 'icon': '💡',
18
+ 'label': 'IDEATION',
19
+ 'theme': 'control',
20
+ 'status': 'ready',
21
+ 'section': 'workplace',
22
+ 'selector': '[data-path="x-ipe-docs/ideas"]',
23
+ 'position': {'left': '4.5%', 'top': '60%'}
24
+ },
25
+ 'requirement': {
26
+ 'icon': '📋',
27
+ 'label': 'REQUIREMENT',
28
+ 'theme': 'control',
29
+ 'status': 'ready',
30
+ 'section': 'project',
31
+ 'selector': '[data-path="x-ipe-docs/requirements"]',
32
+ 'position': {'left': '12%', 'top': '12%'}
33
+ },
34
+ 'implementation': {
35
+ 'icon': '⚙️',
36
+ 'label': 'IMPLEMENT',
37
+ 'theme': 'control',
38
+ 'status': 'ready',
39
+ 'section': 'project',
40
+ 'selector': '[data-path="x-ipe-docs/requirements"]',
41
+ 'position': {'left': '30%', 'top': '73%'}
42
+ },
43
+ 'deployment': {
44
+ 'icon': '🚀',
45
+ 'label': 'DEPLOY',
46
+ 'theme': 'control',
47
+ 'status': 'tbd',
48
+ 'section': 'management',
49
+ 'selector': None,
50
+ 'position': {'left': '56%', 'top': '19%'}
51
+ },
52
+ 'validation': {
53
+ 'icon': '✅',
54
+ 'label': 'VALIDATION',
55
+ 'theme': 'transparency',
56
+ 'status': 'ready',
57
+ 'section': 'quality',
58
+ 'selector': '[data-section="quality-report"]',
59
+ 'position': {'left': '80%', 'top': '13%'}
60
+ },
61
+ 'monitoring': {
62
+ 'icon': '📊',
63
+ 'label': 'MONITORING',
64
+ 'theme': 'transparency',
65
+ 'status': 'ready',
66
+ 'section': 'quality',
67
+ 'selector': '[data-section="behavior-tracing"]',
68
+ 'position': {'left': '85%', 'top': '65%'}
69
+ },
70
+ 'feedback': {
71
+ 'icon': '💬',
72
+ 'label': 'FEEDBACK',
73
+ 'theme': 'transparency',
74
+ 'status': 'ready',
75
+ 'section': 'feedback',
76
+ 'selector': '[data-section="uiux-feedback"]',
77
+ 'position': {'left': '58%', 'top': '70%'}
78
+ },
79
+ 'planning': {
80
+ 'icon': '📅',
81
+ 'label': 'PLANNING',
82
+ 'theme': 'transparency',
83
+ 'status': 'ready',
84
+ 'section': 'management',
85
+ 'selector': '[data-path="x-ipe-docs/planning"]',
86
+ 'position': {'left': '38%', 'top': '25%'}
87
+ }
88
+ }
89
+
90
+ @x_ipe_tracing(level="INFO")
91
+ def get_stage_mapping(self) -> dict:
92
+ """
93
+ Get the stage-to-sidebar mapping configuration.
94
+
95
+ Returns:
96
+ dict: Stage mapping with icons, labels, themes, selectors, and positions
97
+ """
98
+ return self.STAGE_MAPPING.copy()
99
+
100
+ @x_ipe_tracing(level="INFO")
101
+ def get_template(self) -> str:
102
+ """
103
+ Generate HTML template for homepage infinity loop.
104
+
105
+ Returns:
106
+ str: HTML template string
107
+ """
108
+ stage_buttons = self._render_stage_buttons()
109
+
110
+ return f'''
111
+ <div class="homepage-infinity-container">
112
+ <header class="homepage-header">
113
+ <h1>X-IPE</h1>
114
+ <p>AI-Powered Development Lifecycle</p>
115
+ </header>
116
+
117
+ <div class="infinity-loop-container">
118
+ <div class="infinity-loop">
119
+ <img src="/api/file/content?path=x-ipe-docs%2Fideas%2FTBC008.%20Feature-Homepage%2FControl%26Transparency.png&raw=true"
120
+ alt="Development Lifecycle"
121
+ class="infinity-bg"
122
+ onerror="this.style.display='none'">
123
+
124
+ {stage_buttons}
125
+
126
+ <span class="loop-label control">CONTROL</span>
127
+ <span class="loop-label transparency">TRANSPARENCY</span>
128
+ </div>
129
+ </div>
130
+
131
+ <footer class="homepage-legend">
132
+ <span>Control (What we decide)</span>
133
+ <span>Transparency (What we see)</span>
134
+ </footer>
135
+ </div>
136
+ '''
137
+
138
+ def _render_stage_buttons(self) -> str:
139
+ """Render HTML for all stage buttons"""
140
+ buttons = []
141
+ for stage_id, config in self.STAGE_MAPPING.items():
142
+ tbd_class = ' tbd' if config['status'] == 'tbd' else ''
143
+ tbd_attr = ' data-tbd="true"' if config['status'] == 'tbd' else ''
144
+ tbd_badge = '<span class="tbd-badge">TBD</span>' if config['status'] == 'tbd' else ''
145
+
146
+ button = f'''
147
+ <button class="stage-btn {config['theme']}{tbd_class}"
148
+ data-stage="{stage_id}"
149
+ data-section="{config['section']}"
150
+ data-selector="{config['selector'] or ''}"
151
+ style="left: {config['position']['left']}; top: {config['position']['top']};"
152
+ {tbd_attr}>
153
+ <span class="stage-icon">{config['icon']}</span>
154
+ <span class="stage-label">{config['label']}</span>
155
+ {tbd_badge}
156
+ </button>
157
+ '''
158
+ buttons.append(button)
159
+
160
+ return '\n'.join(buttons)