x-ipe 1.0.24__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 (139) hide show
  1. x_ipe/app.py +25 -3
  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 +17 -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 +2 -0
  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 +30 -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 +19 -0
  87. x_ipe/services/kb_service.py +378 -0
  88. x_ipe/services/proxy_service.py +4 -0
  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 +32 -0
  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 +1 -0
  103. x_ipe/static/css/tracing-dashboard.css +796 -0
  104. x_ipe/static/css/workplace.css +20 -0
  105. x_ipe/static/img/homepage-infinity-loop.png +0 -0
  106. x_ipe/static/js/features/homepage-infinity.js +314 -0
  107. x_ipe/static/js/features/kb-core.js +371 -0
  108. x_ipe/static/js/features/quality-evaluation.js +387 -0
  109. x_ipe/static/js/features/sidebar.js +255 -12
  110. x_ipe/static/js/features/tracing-dashboard.js +855 -0
  111. x_ipe/static/js/features/tracing-graph.js +1031 -0
  112. x_ipe/static/js/features/tree-search.js +6 -2
  113. x_ipe/static/js/features/workplace.js +200 -6
  114. x_ipe/static/js/init.js +76 -0
  115. x_ipe/static/js/uiux-feedback.js +18 -2
  116. x_ipe/templates/base.html +19 -0
  117. x_ipe/templates/index.html +7 -1
  118. x_ipe/templates/knowledge-base.html +110 -0
  119. x_ipe/templates/workplace.html +4 -0
  120. x_ipe/tracing/__init__.py +37 -0
  121. x_ipe/tracing/buffer.py +135 -0
  122. x_ipe/tracing/context.py +125 -0
  123. x_ipe/tracing/decorator.py +288 -0
  124. x_ipe/tracing/middleware.py +197 -0
  125. x_ipe/tracing/parser.py +235 -0
  126. x_ipe/tracing/redactor.py +111 -0
  127. x_ipe/tracing/writer.py +122 -0
  128. {x_ipe-1.0.24.dist-info → x_ipe-1.0.25.dist-info}/METADATA +2 -2
  129. {x_ipe-1.0.24.dist-info → x_ipe-1.0.25.dist-info}/RECORD +132 -62
  130. x_ipe/resources/skills/x-ipe-skill-creator/SKILL.md +0 -329
  131. x_ipe/resources/skills/x-ipe-skill-creator/references/output-patterns.md +0 -169
  132. x_ipe/resources/skills/x-ipe-skill-creator/references/skill-structure.md +0 -162
  133. x_ipe/resources/skills/x-ipe-skill-creator/references/workflows.md +0 -110
  134. x_ipe/resources/skills/x-ipe-skill-creator/templates/references/examples.md +0 -113
  135. x_ipe/resources/skills/x-ipe-skill-creator/templates/skill-category-skill.md +0 -296
  136. x_ipe/resources/skills/x-ipe-skill-creator/templates/task-type-skill.md +0 -269
  137. {x_ipe-1.0.24.dist-info → x_ipe-1.0.25.dist-info}/WHEEL +0 -0
  138. {x_ipe-1.0.24.dist-info → x_ipe-1.0.25.dist-info}/entry_points.txt +0 -0
  139. {x_ipe-1.0.24.dist-info → x_ipe-1.0.25.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,160 @@
1
+ # Visualization Guide
2
+
3
+ This reference document describes how to use visualization tools in idea summaries.
4
+
5
+ ---
6
+
7
+ ## Config-Driven Visualization
8
+
9
+ Check `x-ipe-docs/config/tools.json` before choosing visualization method:
10
+
11
+ ```yaml
12
+ decision_tree:
13
+ - check: "config.stages.ideation.ideation.antv-infographic"
14
+ if_true: "Use infographic DSL"
15
+ use_for: "Feature lists, roadmaps, comparisons"
16
+
17
+ - check: "config.stages.ideation.ideation.mermaid"
18
+ if_true: "Use mermaid diagrams"
19
+ use_for: "Flowcharts, sequences, state diagrams"
20
+
21
+ - check: "config.stages.ideation.ideation.tool-architecture-dsl"
22
+ if_true: "Use architecture DSL"
23
+ use_for: "Layered architecture, module views"
24
+
25
+ - fallback: "Use standard markdown"
26
+ use_for: "Bullet lists, tables"
27
+ ```
28
+
29
+ ---
30
+
31
+ ## Infographic Templates
32
+
33
+ | Use Case | Template | When to Use |
34
+ |----------|----------|-------------|
35
+ | Feature List | `list-grid-badge-card` | Listing key features with icons |
36
+ | Roadmap | `sequence-roadmap-vertical-simple` | Implementation phases |
37
+ | Comparison | `compare-binary-horizontal-badge-card-arrow` | Comparing options |
38
+
39
+ ### Feature List Example
40
+
41
+ ```infographic
42
+ infographic list-grid-badge-card
43
+ data
44
+ title Key Features
45
+ lists
46
+ - label Feature 1
47
+ desc Description of feature 1
48
+ icon flash
49
+ - label Feature 2
50
+ desc Description of feature 2
51
+ icon shield
52
+ ```
53
+
54
+ ### Roadmap Example
55
+
56
+ ```infographic
57
+ infographic sequence-roadmap-vertical-simple
58
+ data
59
+ title Implementation Phases
60
+ lists
61
+ - label Phase 1
62
+ desc MVP with core features
63
+ - label Phase 2
64
+ desc User feedback integration
65
+ - label Phase 3
66
+ desc Scale and optimize
67
+ ```
68
+
69
+ ---
70
+
71
+ ## Mermaid Diagrams
72
+
73
+ | Use Case | Diagram Type | When to Use |
74
+ |----------|--------------|-------------|
75
+ | User Flow | flowchart | Step-by-step user journey |
76
+ | Process | sequenceDiagram | System interactions |
77
+ | States | stateDiagram | State transitions |
78
+
79
+ ### Flowchart Example
80
+
81
+ ```mermaid
82
+ flowchart TD
83
+ A[User Action] --> B[Feature 1]
84
+ B --> C[Feature 2]
85
+ C --> D[Result]
86
+ ```
87
+
88
+ ### Sequence Example
89
+
90
+ ```mermaid
91
+ sequenceDiagram
92
+ User->>App: Request
93
+ App->>API: Process
94
+ API-->>App: Response
95
+ App-->>User: Display
96
+ ```
97
+
98
+ ---
99
+
100
+ ## Architecture DSL
101
+
102
+ Use for layered architecture when `tool-architecture-dsl` is enabled:
103
+
104
+ ```architecture-dsl
105
+ @startuml module-view
106
+ title "System Architecture"
107
+ theme "theme-default"
108
+ direction top-to-bottom
109
+ grid 12 x 6
110
+
111
+ layer "Frontend" {
112
+ color "#fce7f3"
113
+ border-color "#ec4899"
114
+ rows 2
115
+ module "Web" { cols 12, rows 2, grid 1 x 1, component "React App" { cols 1, rows 1 } }
116
+ }
117
+
118
+ layer "Backend" {
119
+ color "#dbeafe"
120
+ border-color "#3b82f6"
121
+ rows 2
122
+ module "Services" { cols 12, rows 2, grid 2 x 1, component "API" { cols 1, rows 1 }, component "Workers" { cols 1, rows 1 } }
123
+ }
124
+
125
+ @enduml
126
+ ```
127
+
128
+ ---
129
+
130
+ ## Fallback (No Tools Enabled)
131
+
132
+ When all visualization tools are disabled, use standard markdown:
133
+
134
+ ### Feature List (Fallback)
135
+ ```markdown
136
+ ## Key Features
137
+
138
+ - **Feature 1:** Description of feature 1
139
+ - **Feature 2:** Description of feature 2
140
+ - **Feature 3:** Description of feature 3
141
+ ```
142
+
143
+ ### Comparison (Fallback)
144
+ ```markdown
145
+ | Option | Pros | Cons |
146
+ |--------|------|------|
147
+ | Option A | Fast, cheap | Limited features |
148
+ | Option B | Full features | Slower, expensive |
149
+ ```
150
+
151
+ ### Process (Fallback)
152
+ ```markdown
153
+ ## Process Flow
154
+
155
+ 1. User logs in
156
+ 2. Dashboard loads
157
+ 3. User selects action
158
+ 4. System processes
159
+ 5. Result displayed
160
+ ```
@@ -0,0 +1,86 @@
1
+ # Idea Summary Template
2
+
3
+ > Use this template when creating `idea-summary-vN.md` files.
4
+
5
+ ```markdown
6
+ # Idea Summary
7
+
8
+ > Idea ID: IDEA-XXX
9
+ > Folder: {folder_name}
10
+ > Version: vN
11
+ > Created: {date}
12
+ > Status: Refined
13
+
14
+ ## Overview
15
+ {Brief description of the refined idea}
16
+
17
+ ## Problem Statement
18
+ {What problem does this idea solve?}
19
+
20
+ ## Target Users
21
+ {Who will benefit?}
22
+
23
+ ## Proposed Solution
24
+ {High-level description of the solution}
25
+
26
+ ## Key Features
27
+
28
+ {IF antv-infographic enabled → use infographic DSL}
29
+ {IF mermaid enabled → use mermaid for flow}
30
+ {IF both disabled → use bullet list}
31
+
32
+ <!-- Example if antv-infographic: true -->
33
+ ```infographic
34
+ infographic list-grid-badge-card
35
+ data
36
+ title Key Features
37
+ lists
38
+ - label Feature 1
39
+ desc Description of feature 1
40
+ icon flash
41
+ - label Feature 2
42
+ desc Description of feature 2
43
+ icon shield
44
+ ```
45
+
46
+ <!-- Example if mermaid: true (for user flow) -->
47
+ ```mermaid
48
+ flowchart TD
49
+ A[User Action] --> B[Feature 1]
50
+ B --> C[Feature 2]
51
+ ```
52
+
53
+ ## Success Criteria
54
+ - [ ] Criterion 1
55
+ - [ ] Criterion 2
56
+
57
+ ## Constraints & Considerations
58
+ - Constraint 1
59
+ - Constraint 2
60
+
61
+ ## Brainstorming Notes
62
+ {Key insights from brainstorming session}
63
+
64
+ ## Ideation Artifacts (If Tools Used)
65
+ {Link to any mockups, prototypes, or visual artifacts created during brainstorming}
66
+ - Mockup: {path or description}
67
+ - Prototype: {path or URL}
68
+
69
+ ## Source Files
70
+ - file1.md
71
+ - file2.txt
72
+
73
+ ## Next Steps
74
+ - [ ] Proceed to Idea Mockup / Idea to Architecture / Requirement Gathering
75
+
76
+ ## References & Common Principles
77
+ {Include if the idea involves common/established topics}
78
+
79
+ ### Applied Principles
80
+ - **Principle 1:** {Description} - [Source](URL)
81
+ - **Principle 2:** {Description} - [Source](URL)
82
+
83
+ ### Further Reading
84
+ - [Resource 1](URL) - {Brief description}
85
+ - [Resource 2](URL) - {Brief description}
86
+ ```
x_ipe/routes/__init__.py CHANGED
@@ -10,6 +10,7 @@ from .project_routes import project_bp
10
10
  from .ideas_routes import ideas_bp
11
11
  from .tools_routes import tools_bp
12
12
  from .proxy_routes import proxy_bp
13
+ from .kb_routes import kb_bp
13
14
 
14
15
  __all__ = [
15
16
  'main_bp',
@@ -18,4 +19,5 @@ __all__ = [
18
19
  'ideas_bp',
19
20
  'tools_bp',
20
21
  'proxy_bp',
22
+ 'kb_bp',
21
23
  ]
@@ -15,11 +15,13 @@ import os
15
15
  from flask import Blueprint, jsonify, request, current_app
16
16
 
17
17
  from x_ipe.services import IdeasService, SkillsService
18
+ from x_ipe.tracing import x_ipe_tracing
18
19
 
19
20
  ideas_bp = Blueprint('ideas', __name__)
20
21
 
21
22
 
22
23
  @ideas_bp.route('/api/ideas/tree', methods=['GET'])
24
+ @x_ipe_tracing()
23
25
  def get_ideas_tree():
24
26
  """
25
27
  GET /api/ideas/tree
@@ -47,6 +49,7 @@ def get_ideas_tree():
47
49
 
48
50
 
49
51
  @ideas_bp.route('/api/ideas/upload', methods=['POST'])
52
+ @x_ipe_tracing()
50
53
  def upload_ideas():
51
54
  """
52
55
  POST /api/ideas/upload
@@ -92,6 +95,7 @@ def upload_ideas():
92
95
 
93
96
 
94
97
  @ideas_bp.route('/api/ideas/create-folder', methods=['POST'])
98
+ @x_ipe_tracing()
95
99
  def create_idea_folder():
96
100
  """
97
101
  POST /api/ideas/create-folder
@@ -134,6 +138,7 @@ def create_idea_folder():
134
138
 
135
139
 
136
140
  @ideas_bp.route('/api/ideas/rename', methods=['POST'])
141
+ @x_ipe_tracing()
137
142
  def rename_idea_folder():
138
143
  """
139
144
  POST /api/ideas/rename
@@ -177,6 +182,7 @@ def rename_idea_folder():
177
182
 
178
183
 
179
184
  @ideas_bp.route('/api/ideas/rename-file', methods=['POST'])
185
+ @x_ipe_tracing()
180
186
  def rename_idea_file():
181
187
  """
182
188
  POST /api/ideas/rename-file
@@ -220,6 +226,7 @@ def rename_idea_file():
220
226
 
221
227
 
222
228
  @ideas_bp.route('/api/ideas/delete', methods=['POST'])
229
+ @x_ipe_tracing()
223
230
  def delete_idea_item():
224
231
  """
225
232
  POST /api/ideas/delete
@@ -260,6 +267,7 @@ def delete_idea_item():
260
267
 
261
268
 
262
269
  @ideas_bp.route('/api/ideas/toolbox', methods=['GET'])
270
+ @x_ipe_tracing()
263
271
  def get_ideas_toolbox():
264
272
  """
265
273
  GET /api/ideas/toolbox
@@ -280,6 +288,7 @@ def get_ideas_toolbox():
280
288
 
281
289
 
282
290
  @ideas_bp.route('/api/ideas/toolbox', methods=['POST'])
291
+ @x_ipe_tracing()
283
292
  def save_ideas_toolbox():
284
293
  """
285
294
  POST /api/ideas/toolbox
@@ -311,6 +320,7 @@ def save_ideas_toolbox():
311
320
  # ==========================================================================
312
321
 
313
322
  @ideas_bp.route('/api/ideas/move', methods=['POST'])
323
+ @x_ipe_tracing()
314
324
  def move_idea_item():
315
325
  """
316
326
  POST /api/ideas/move
@@ -349,6 +359,7 @@ def move_idea_item():
349
359
 
350
360
 
351
361
  @ideas_bp.route('/api/ideas/duplicate', methods=['POST'])
362
+ @x_ipe_tracing()
352
363
  def duplicate_idea_item():
353
364
  """
354
365
  POST /api/ideas/duplicate
@@ -382,6 +393,7 @@ def duplicate_idea_item():
382
393
 
383
394
 
384
395
  @ideas_bp.route('/api/ideas/download', methods=['GET'])
396
+ @x_ipe_tracing()
385
397
  def download_idea_file():
386
398
  """
387
399
  GET /api/ideas/download?path=...
@@ -426,6 +438,7 @@ def download_idea_file():
426
438
 
427
439
 
428
440
  @ideas_bp.route('/api/ideas/folder-contents', methods=['GET'])
441
+ @x_ipe_tracing()
429
442
  def get_folder_contents():
430
443
  """
431
444
  GET /api/ideas/folder-contents?path=...
@@ -452,6 +465,7 @@ def get_folder_contents():
452
465
 
453
466
 
454
467
  @ideas_bp.route('/api/ideas/search', methods=['GET'])
468
+ @x_ipe_tracing()
455
469
  def search_ideas():
456
470
  """
457
471
  GET /api/ideas/search?q=...
@@ -478,6 +492,7 @@ def search_ideas():
478
492
 
479
493
 
480
494
  @ideas_bp.route('/api/ideas/delete-info', methods=['GET'])
495
+ @x_ipe_tracing()
481
496
  def get_delete_info():
482
497
  """
483
498
  GET /api/ideas/delete-info?path=...
@@ -509,6 +524,7 @@ def get_delete_info():
509
524
 
510
525
 
511
526
  @ideas_bp.route('/api/ideas/validate-drop', methods=['POST'])
527
+ @x_ipe_tracing()
512
528
  def validate_drop_target():
513
529
  """
514
530
  POST /api/ideas/validate-drop
@@ -543,6 +559,7 @@ def validate_drop_target():
543
559
  # ==========================================================================
544
560
 
545
561
  @ideas_bp.route('/api/skills', methods=['GET'])
562
+ @x_ipe_tracing()
546
563
  def get_skills():
547
564
  """
548
565
  GET /api/skills
@@ -0,0 +1,80 @@
1
+ """
2
+ FEATURE-025-A: KB Core Infrastructure
3
+
4
+ KB Routes: REST API endpoints for Knowledge Base operations.
5
+ """
6
+ from flask import Blueprint, jsonify, current_app
7
+
8
+ from x_ipe.services.kb_service import KBService
9
+ from x_ipe.tracing import x_ipe_tracing
10
+
11
+ kb_bp = Blueprint('kb', __name__, url_prefix='/api/kb')
12
+
13
+
14
+ def _get_kb_service() -> KBService:
15
+ """Get KBService instance using project root from app config."""
16
+ project_root = current_app.config.get('PROJECT_ROOT', '.')
17
+ return KBService(project_root)
18
+
19
+
20
+ @kb_bp.route('/index', methods=['GET'])
21
+ @x_ipe_tracing(level="INFO")
22
+ def get_index():
23
+ """
24
+ Get current file index.
25
+
26
+ Returns:
27
+ JSON: File index with version, last_updated, and files list
28
+ """
29
+ service = _get_kb_service()
30
+ index = service.get_index()
31
+ return jsonify(index)
32
+
33
+
34
+ @kb_bp.route('/index/refresh', methods=['POST'])
35
+ @x_ipe_tracing(level="INFO")
36
+ def refresh_index():
37
+ """
38
+ Rebuild file index from file system.
39
+
40
+ Returns:
41
+ JSON: Updated file index
42
+ """
43
+ service = _get_kb_service()
44
+ index = service.refresh_index()
45
+ return jsonify(index)
46
+
47
+
48
+ @kb_bp.route('/topics', methods=['GET'])
49
+ @x_ipe_tracing(level="INFO")
50
+ def get_topics():
51
+ """
52
+ Get list of all topics.
53
+
54
+ Returns:
55
+ JSON: { "topics": ["topic1", "topic2", ...] }
56
+ """
57
+ service = _get_kb_service()
58
+ topics = service.get_topics()
59
+ return jsonify({"topics": topics})
60
+
61
+
62
+ @kb_bp.route('/topics/<name>', methods=['GET'])
63
+ @x_ipe_tracing(level="INFO")
64
+ def get_topic_metadata(name: str):
65
+ """
66
+ Get metadata for a specific topic.
67
+
68
+ Args:
69
+ name: Topic folder name
70
+
71
+ Returns:
72
+ JSON: Topic metadata or 404 if not found
73
+ """
74
+ service = _get_kb_service()
75
+ metadata = service.get_topic_metadata(name)
76
+
77
+ if metadata is None:
78
+ return jsonify({"error": f"Topic '{name}' not found"}), 404
79
+
80
+ return jsonify(metadata)
@@ -15,17 +15,20 @@ from pathlib import Path
15
15
  from flask import Blueprint, render_template, jsonify, request, current_app, send_file
16
16
 
17
17
  from x_ipe.services import ProjectService, ContentService
18
+ from x_ipe.tracing import x_ipe_tracing
18
19
 
19
20
  main_bp = Blueprint('main', __name__)
20
21
 
21
22
 
22
23
  @main_bp.route('/')
24
+ @x_ipe_tracing()
23
25
  def index():
24
26
  """Serve main page with sidebar navigation"""
25
27
  return render_template('index.html')
26
28
 
27
29
 
28
30
  @main_bp.route('/uiux-feedbacks')
31
+ @x_ipe_tracing()
29
32
  def uiux_feedbacks():
30
33
  """
31
34
  GET /uiux-feedbacks
@@ -36,6 +39,7 @@ def uiux_feedbacks():
36
39
 
37
40
 
38
41
  @main_bp.route('/workplace')
42
+ @x_ipe_tracing()
39
43
  def workplace():
40
44
  """
41
45
  GET /workplace
@@ -46,7 +50,19 @@ def workplace():
46
50
  return render_template('workplace.html')
47
51
 
48
52
 
53
+ @main_bp.route('/knowledge-base')
54
+ @x_ipe_tracing()
55
+ def knowledge_base():
56
+ """
57
+ GET /knowledge-base
58
+
59
+ FEATURE-025-A: Knowledge Base page
60
+ """
61
+ return render_template('knowledge-base.html')
62
+
63
+
49
64
  @main_bp.route('/api/project/structure')
65
+ @x_ipe_tracing()
50
66
  def get_project_structure():
51
67
  """
52
68
  GET /api/project/structure
@@ -68,6 +84,7 @@ def get_project_structure():
68
84
 
69
85
 
70
86
  @main_bp.route('/api/file/content')
87
+ @x_ipe_tracing()
71
88
  def get_file_content():
72
89
  """
73
90
  GET /api/file/content?path=<relative_path>&raw=<true/false>
@@ -148,6 +165,7 @@ def get_file_content():
148
165
 
149
166
 
150
167
  @main_bp.route('/api/file/save', methods=['POST'])
168
+ @x_ipe_tracing()
151
169
  def save_file():
152
170
  """
153
171
  POST /api/file/save
@@ -13,6 +13,8 @@ Provides:
13
13
  import os
14
14
  from flask import Blueprint, jsonify, request, current_app
15
15
 
16
+ from x_ipe.tracing import x_ipe_tracing
17
+
16
18
  project_bp = Blueprint('project', __name__)
17
19
 
18
20
 
@@ -22,6 +24,7 @@ def get_project_folders_service():
22
24
 
23
25
 
24
26
  @project_bp.route('/api/projects', methods=['GET'])
27
+ @x_ipe_tracing()
25
28
  def get_projects():
26
29
  """
27
30
  GET /api/projects
@@ -43,6 +46,7 @@ def get_projects():
43
46
 
44
47
 
45
48
  @project_bp.route('/api/projects', methods=['POST'])
49
+ @x_ipe_tracing()
46
50
  def add_project():
47
51
  """
48
52
  POST /api/projects
@@ -78,6 +82,7 @@ def add_project():
78
82
 
79
83
 
80
84
  @project_bp.route('/api/projects/<int:project_id>', methods=['PUT'])
85
+ @x_ipe_tracing()
81
86
  def update_project(project_id):
82
87
  """
83
88
  PUT /api/projects/<id>
@@ -113,6 +118,7 @@ def update_project(project_id):
113
118
 
114
119
 
115
120
  @project_bp.route('/api/projects/<int:project_id>', methods=['DELETE'])
121
+ @x_ipe_tracing()
116
122
  def delete_project(project_id):
117
123
  """
118
124
  DELETE /api/projects/<id>
@@ -137,6 +143,7 @@ def delete_project(project_id):
137
143
 
138
144
 
139
145
  @project_bp.route('/api/projects/switch', methods=['POST'])
146
+ @x_ipe_tracing()
140
147
  def switch_project():
141
148
  """
142
149
  POST /api/projects/switch
@@ -8,11 +8,13 @@ Provides localhost URL proxying endpoint.
8
8
  from flask import Blueprint, jsonify, request, Response
9
9
 
10
10
  from x_ipe.services import ProxyService
11
+ from x_ipe.tracing import x_ipe_tracing
11
12
 
12
13
  proxy_bp = Blueprint('proxy', __name__)
13
14
 
14
15
 
15
16
  @proxy_bp.route('/api/proxy', methods=['GET'])
17
+ @x_ipe_tracing()
16
18
  def proxy_url():
17
19
  """
18
20
  GET /api/proxy?url=<encoded_url>