v2: Forge Console + Open WebUI artifacts + Docker
- web/: Local chat UI (Express + WS → Codex bridge) - openwebui/: Preset, pipelines, knowledge manifest - Dockerfile + docker-compose.yml - Updated README with 3 frontend options - CLI-agnostic: works with Codex, Claude Code, Kiro, Gemini
This commit is contained in:
87
openwebui/pipelines/aha_pipeline.py
Normal file
87
openwebui/pipelines/aha_pipeline.py
Normal file
@@ -0,0 +1,87 @@
|
||||
"""
|
||||
title: Aha! Pipeline
|
||||
author: PM Factory
|
||||
version: 0.1.0
|
||||
description: Create epics and features in Aha! via the MCP server.
|
||||
requirements: subprocess
|
||||
"""
|
||||
|
||||
import subprocess
|
||||
import json
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
MCPORTER_CONFIG = os.environ.get("MCPORTER_CONFIG", "config/mcporter.json")
|
||||
|
||||
|
||||
class Tools:
|
||||
def __init__(self):
|
||||
self.valves = self.Valves()
|
||||
|
||||
class Valves:
|
||||
MCPORTER_CONFIG: str = MCPORTER_CONFIG
|
||||
AHA_DOMAIN: str = os.environ.get("AHA_DOMAIN", "")
|
||||
AHA_API_KEY: str = os.environ.get("AHA_API_KEY", "")
|
||||
|
||||
def aha_create_epic(self, product: str, name: str, description: str, workflow_status: str = "New", __user__: dict = {}) -> str:
|
||||
"""
|
||||
Create an epic in Aha!
|
||||
|
||||
:param product: Aha! product key (e.g. 'PLAT')
|
||||
:param name: Epic name
|
||||
:param description: Epic description (supports HTML)
|
||||
:param workflow_status: Initial status. Default: New
|
||||
:return: Created epic reference and URL
|
||||
"""
|
||||
env = os.environ.copy()
|
||||
env["AHA_DOMAIN"] = self.valves.AHA_DOMAIN
|
||||
env["AHA_API_TOKEN"] = self.valves.AHA_API_KEY
|
||||
|
||||
params = {
|
||||
"product": product,
|
||||
"name": name,
|
||||
"description": description,
|
||||
"workflow_status": workflow_status
|
||||
}
|
||||
try:
|
||||
result = subprocess.run(
|
||||
[
|
||||
"mcporter",
|
||||
"--config", self.valves.MCPORTER_CONFIG,
|
||||
"call", "aha", "create_epic",
|
||||
"--params", json.dumps(params)
|
||||
],
|
||||
capture_output=True, text=True, timeout=30, env=env
|
||||
)
|
||||
if result.returncode != 0:
|
||||
return f"Error: {result.stderr.strip()}"
|
||||
return result.stdout.strip()
|
||||
except Exception as e:
|
||||
return f"Error: {str(e)}"
|
||||
|
||||
def aha_list_features(self, product: str, __user__: dict = {}) -> str:
|
||||
"""
|
||||
List features for an Aha! product.
|
||||
|
||||
:param product: Aha! product key
|
||||
:return: JSON list of features
|
||||
"""
|
||||
env = os.environ.copy()
|
||||
env["AHA_DOMAIN"] = self.valves.AHA_DOMAIN
|
||||
env["AHA_API_TOKEN"] = self.valves.AHA_API_KEY
|
||||
|
||||
try:
|
||||
result = subprocess.run(
|
||||
[
|
||||
"mcporter",
|
||||
"--config", self.valves.MCPORTER_CONFIG,
|
||||
"call", "aha", "list_features",
|
||||
"--params", json.dumps({"product": product})
|
||||
],
|
||||
capture_output=True, text=True, timeout=30, env=env
|
||||
)
|
||||
if result.returncode != 0:
|
||||
return f"Error: {result.stderr.strip()}"
|
||||
return result.stdout.strip()
|
||||
except Exception as e:
|
||||
return f"Error: {str(e)}"
|
||||
117
openwebui/pipelines/bmad_factory_pipeline.py
Normal file
117
openwebui/pipelines/bmad_factory_pipeline.py
Normal file
@@ -0,0 +1,117 @@
|
||||
"""
|
||||
title: BMad & Factory Pipeline
|
||||
author: PM Factory
|
||||
version: 0.1.0
|
||||
description: Brainstorm with BMad Creative Suite and validate against Transparent Factory tenets.
|
||||
requirements: subprocess
|
||||
"""
|
||||
|
||||
import subprocess
|
||||
import json
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
BMAD_PATH = os.environ.get("BMAD_PATH", "bmad")
|
||||
FACTORY_PATH = os.environ.get("FACTORY_PATH", ".standards/factory/content")
|
||||
|
||||
|
||||
class Tools:
|
||||
def __init__(self):
|
||||
self.valves = self.Valves()
|
||||
|
||||
class Valves:
|
||||
BMAD_PATH: str = BMAD_PATH
|
||||
FACTORY_PATH: str = FACTORY_PATH
|
||||
|
||||
def bmad_list_agents(self, __user__: dict = {}) -> str:
|
||||
"""
|
||||
List available BMad Creative Intelligence Suite agents and their capabilities.
|
||||
|
||||
:return: List of agents with descriptions
|
||||
"""
|
||||
agents = {
|
||||
"Carson (Brainstorming Coach)": {
|
||||
"command": "/cis-brainstorm",
|
||||
"capabilities": "36 ideation techniques, group dynamics, 'Yes, and...' methodology"
|
||||
},
|
||||
"Maya (Design Thinking Coach)": {
|
||||
"command": "/cis-design-thinking",
|
||||
"capabilities": "Five-phase design thinking, empathy mapping, rapid prototyping"
|
||||
},
|
||||
"Victor (Innovation Strategist)": {
|
||||
"command": "/cis-innovation-strategy",
|
||||
"capabilities": "Jobs-to-be-Done, Blue Ocean Strategy, Business Model Canvas"
|
||||
},
|
||||
"Dr. Quinn (Creative Problem Solver)": {
|
||||
"command": "/cis-problem-solve",
|
||||
"capabilities": "Root cause analysis, systematic diagnosis, solution frameworks"
|
||||
},
|
||||
"Storyteller": {
|
||||
"command": "/cis-story",
|
||||
"capabilities": "PR/FAQ drafting, narrative structure, stakeholder communication"
|
||||
}
|
||||
}
|
||||
return json.dumps(agents, indent=2)
|
||||
|
||||
def bmad_brainstorm(self, topic: str, technique: str = "auto", __user__: dict = {}) -> str:
|
||||
"""
|
||||
Run a brainstorming session using BMad's Carson agent.
|
||||
|
||||
:param topic: The topic or problem to brainstorm about
|
||||
:param technique: Brainstorming technique (auto, scamper, reverse, starbursting, six-hats, etc). Default: auto
|
||||
:return: Brainstorming session output
|
||||
"""
|
||||
prompt = f"""You are Carson, the Brainstorming Coach from the BMad Creative Intelligence Suite.
|
||||
|
||||
Run a brainstorming session on this topic: {topic}
|
||||
|
||||
Technique: {technique if technique != 'auto' else 'Choose the best technique for this topic.'}
|
||||
|
||||
Generate:
|
||||
1. 8-12 diverse ideas using the selected technique
|
||||
2. For each idea: one sentence description + feasibility rating (1-5)
|
||||
3. Top 3 recommendations with brief rationale
|
||||
4. One wild/moonshot idea that breaks assumptions
|
||||
|
||||
Use "Yes, and..." methodology. Celebrate bold ideas."""
|
||||
|
||||
return prompt
|
||||
|
||||
def factory_check(self, spec_text: str, __user__: dict = {}) -> str:
|
||||
"""
|
||||
Validate a specification or epic against the Transparent Factory tenets.
|
||||
|
||||
:param spec_text: The spec, epic, or requirement text to validate
|
||||
:return: Compliance report with pass/fail per tenet and recommendations
|
||||
"""
|
||||
tenets = {
|
||||
"Atomic Flagging": {
|
||||
"rule": "All new features must be behind feature flags with 14-day TTL. Must use OpenFeature SDK.",
|
||||
"check": "Does the spec mention feature flags? Is there a TTL or rollout plan?"
|
||||
},
|
||||
"Elastic Schema": {
|
||||
"rule": "Schema changes must be additive-only. Breaking changes require sync dual-write with 30-day migration SLA.",
|
||||
"check": "Does the spec propose schema changes? Are they additive? Is there a migration plan?"
|
||||
},
|
||||
"Cognitive Durability": {
|
||||
"rule": "All architectural decisions must have ADR logs. Code must be readable in 60 seconds.",
|
||||
"check": "Does the spec reference ADRs? Is the proposed design simple enough to explain quickly?"
|
||||
},
|
||||
"Semantic Observability": {
|
||||
"rule": "AI reasoning must emit structured telemetry spans. Decisions must be traceable.",
|
||||
"check": "Does the spec include observability requirements? Are reasoning spans defined?"
|
||||
},
|
||||
"Configurable Autonomy": {
|
||||
"rule": "AI agent actions must have governance guardrails. Human-in-the-loop for destructive operations.",
|
||||
"check": "Does the spec define autonomy boundaries? Are there approval gates?"
|
||||
}
|
||||
}
|
||||
|
||||
report = "# Transparent Factory Compliance Check\n\n"
|
||||
report += f"**Input:** {spec_text[:200]}{'...' if len(spec_text) > 200 else ''}\n\n"
|
||||
report += "| Tenet | Rule | Question |\n|-------|------|----------|\n"
|
||||
for name, t in tenets.items():
|
||||
report += f"| {name} | {t['rule']} | {t['check']} |\n"
|
||||
report += "\n*Review each tenet against the spec and flag violations.*"
|
||||
|
||||
return report
|
||||
76
openwebui/pipelines/gainsight_pipeline.py
Normal file
76
openwebui/pipelines/gainsight_pipeline.py
Normal file
@@ -0,0 +1,76 @@
|
||||
"""
|
||||
title: Gainsight PX Pipeline
|
||||
author: PM Factory
|
||||
version: 0.1.0
|
||||
description: Query Gainsight PX product analytics.
|
||||
requirements: requests
|
||||
"""
|
||||
|
||||
import os
|
||||
import json
|
||||
import requests
|
||||
from typing import Optional
|
||||
|
||||
|
||||
class Tools:
|
||||
def __init__(self):
|
||||
self.valves = self.Valves()
|
||||
|
||||
class Valves:
|
||||
GAINSIGHT_PX_API_KEY: str = os.environ.get("GAINSIGHT_PX_API_KEY", "")
|
||||
GAINSIGHT_PX_REGION: str = os.environ.get("GAINSIGHT_PX_REGION", "US")
|
||||
|
||||
def _base_url(self) -> str:
|
||||
if self.valves.GAINSIGHT_PX_REGION.upper() == "EU":
|
||||
return "https://api-eu.aptrinsic.com/v1"
|
||||
return "https://api.aptrinsic.com/v1"
|
||||
|
||||
def _headers(self) -> dict:
|
||||
return {
|
||||
"X-APTRINSIC-API-KEY": self.valves.GAINSIGHT_PX_API_KEY,
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
|
||||
def gainsight_query_users(self, filter_expression: str = "", page_size: int = 20, __user__: dict = {}) -> str:
|
||||
"""
|
||||
Query Gainsight PX users/accounts.
|
||||
|
||||
:param filter_expression: Optional filter (e.g. 'propertyName=value')
|
||||
:param page_size: Number of results to return. Default: 20
|
||||
:return: JSON string of user data
|
||||
"""
|
||||
try:
|
||||
params = {"pageSize": page_size}
|
||||
if filter_expression:
|
||||
params["filter"] = filter_expression
|
||||
|
||||
resp = requests.get(
|
||||
f"{self._base_url()}/users",
|
||||
headers=self._headers(),
|
||||
params=params,
|
||||
timeout=15
|
||||
)
|
||||
resp.raise_for_status()
|
||||
return json.dumps(resp.json(), indent=2)
|
||||
except Exception as e:
|
||||
return f"Error: {str(e)}"
|
||||
|
||||
def gainsight_feature_usage(self, feature_id: str, days: int = 30, __user__: dict = {}) -> str:
|
||||
"""
|
||||
Get feature usage stats from Gainsight PX.
|
||||
|
||||
:param feature_id: The feature ID to query
|
||||
:param days: Lookback period in days. Default: 30
|
||||
:return: JSON string of usage data
|
||||
"""
|
||||
try:
|
||||
resp = requests.get(
|
||||
f"{self._base_url()}/feature/{feature_id}/usage",
|
||||
headers=self._headers(),
|
||||
params={"days": days},
|
||||
timeout=15
|
||||
)
|
||||
resp.raise_for_status()
|
||||
return json.dumps(resp.json(), indent=2)
|
||||
except Exception as e:
|
||||
return f"Error: {str(e)}"
|
||||
77
openwebui/pipelines/jira_pipeline.py
Normal file
77
openwebui/pipelines/jira_pipeline.py
Normal file
@@ -0,0 +1,77 @@
|
||||
"""
|
||||
title: Jira Pipeline
|
||||
author: PM Factory
|
||||
version: 0.1.0
|
||||
description: Search and create Jira issues via mcporter + Atlassian MCP.
|
||||
requirements: subprocess
|
||||
"""
|
||||
|
||||
import subprocess
|
||||
import json
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
MCPORTER_CONFIG = os.environ.get("MCPORTER_CONFIG", "config/mcporter.json")
|
||||
|
||||
|
||||
class Tools:
|
||||
def __init__(self):
|
||||
self.valves = self.Valves()
|
||||
|
||||
class Valves:
|
||||
MCPORTER_CONFIG: str = MCPORTER_CONFIG
|
||||
|
||||
def jira_search(self, jql: str, __user__: dict = {}) -> str:
|
||||
"""
|
||||
Search Jira issues using JQL.
|
||||
|
||||
:param jql: JQL query string (e.g. 'project = PLAT AND status = "In Progress"')
|
||||
:return: JSON string of matching issues
|
||||
"""
|
||||
try:
|
||||
result = subprocess.run(
|
||||
[
|
||||
"mcporter",
|
||||
"--config", self.valves.MCPORTER_CONFIG,
|
||||
"call", "atlassian", "jira_search",
|
||||
"--params", json.dumps({"jql": jql})
|
||||
],
|
||||
capture_output=True, text=True, timeout=30
|
||||
)
|
||||
if result.returncode != 0:
|
||||
return f"Error: {result.stderr.strip()}"
|
||||
return result.stdout.strip()
|
||||
except Exception as e:
|
||||
return f"Error: {str(e)}"
|
||||
|
||||
def jira_create(self, project: str, summary: str, description: str, issue_type: str = "Story", __user__: dict = {}) -> str:
|
||||
"""
|
||||
Create a Jira issue.
|
||||
|
||||
:param project: Jira project key (e.g. 'PLAT')
|
||||
:param summary: Issue title
|
||||
:param description: Issue description (markdown supported)
|
||||
:param issue_type: Issue type (Story, Bug, Epic, Task). Default: Story
|
||||
:return: Created issue key and URL
|
||||
"""
|
||||
params = {
|
||||
"project": project,
|
||||
"summary": summary,
|
||||
"description": description,
|
||||
"issueType": issue_type
|
||||
}
|
||||
try:
|
||||
result = subprocess.run(
|
||||
[
|
||||
"mcporter",
|
||||
"--config", self.valves.MCPORTER_CONFIG,
|
||||
"call", "atlassian", "jira_create_issue",
|
||||
"--params", json.dumps(params)
|
||||
],
|
||||
capture_output=True, text=True, timeout=30
|
||||
)
|
||||
if result.returncode != 0:
|
||||
return f"Error: {result.stderr.strip()}"
|
||||
return result.stdout.strip()
|
||||
except Exception as e:
|
||||
return f"Error: {str(e)}"
|
||||
Reference in New Issue
Block a user