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:
Max Mayfield
2026-02-27 06:56:34 +00:00
commit df667e0db8
38 changed files with 3206 additions and 0 deletions

61
openwebui/SETUP.md Normal file
View File

@@ -0,0 +1,61 @@
# Open WebUI Integration
Drop-in configuration to use the PM Factory repo with [Open WebUI](https://github.com/open-webui/open-webui).
## Quick Setup
### 1. Connect Your Model Provider
In Open WebUI → Settings → Connections, add:
| Field | Value |
|-------|-------|
| URL | `http://<your-kiro-gateway>:8000/v1` |
| API Key | Your gateway API key |
| Model | `claude-opus-4.6` |
Any OpenAI-compatible provider works (Kiro Gateway, LiteLLM, Ollama, etc).
### 2. Import the Preset
Go to Workspace → Models → Import, and upload `preset.json`.
This creates a "Reltio PM Factory" model preset with the full system prompt from AGENTS.md baked in.
### 3. Upload Knowledge (Optional)
Go to Workspace → Knowledge → Create Collection called "PM Factory".
Upload these directories as documents:
- `skills/epics-standards/references/`
- `skills/factory-standards/` (after running `manager.py update`)
- `skills/bmad-suite/` (after running `manager.py update`)
Then attach the collection to your preset in Model settings → Knowledge.
### 4. Install Pipelines (Optional)
Pipelines let the model execute tools (Jira, Aha!, Gainsight) directly.
Copy the files from `pipelines/` into your Open WebUI pipelines directory, or upload them via the Pipelines UI.
Required env vars (set in Open WebUI → Settings → Pipelines):
- `AHA_API_KEY`
- `AHA_DOMAIN`
- `GAINSIGHT_PX_API_KEY`
- `MCPORTER_CONFIG` — path to `config/mcporter.json`
---
## Architecture
```
Open WebUI (browser)
↕ OpenAI-compatible API
Any LLM Provider (Kiro / Ollama / LiteLLM / OpenAI)
+ System Prompt (preset.json ← AGENTS.md)
+ RAG Knowledge (skills docs)
+ Pipelines (mcporter, aha, gainsight, bmad)
```
The repo remains CLI-agnostic. This is just one frontend option.

35
openwebui/knowledge.json Normal file
View File

@@ -0,0 +1,35 @@
{
"name": "PM Factory Knowledge Base",
"description": "Skills documentation and reference materials for the Reltio PM Factory.",
"collections": [
{
"name": "Transparent Factory Standards",
"description": "The five tenets of the Transparent Factory engineering standard.",
"source": ".standards/factory/content/",
"note": "Run 'python3 skills/factory-standards/manager.py update' first to populate this directory."
},
{
"name": "Epic Standards",
"description": "Templates and checklists for creating well-structured epics.",
"files": [
"skills/epics-standards/references/aha-epic-workflow.md",
"skills/epics-standards/references/epic-fields-checklist.md",
"skills/epics-standards/SKILL.md"
]
},
{
"name": "BMad Creative Suite",
"description": "Agent definitions and workflows for brainstorming, design thinking, and storytelling.",
"source": "bmad/creative-intelligence-suite/docs/",
"note": "Run 'python3 skills/bmad-suite/manager.py update' first to populate this directory."
},
{
"name": "Gainsight PX",
"description": "Product analytics skill documentation.",
"files": [
"skills/gainsight-px/SKILL.md"
]
}
],
"upload_instructions": "In Open WebUI: Workspace → Knowledge → Create Collection. Upload the files listed for each collection. Then attach the collections to the 'Reltio PM Factory' model preset."
}

View 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)}"

View 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

View 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)}"

View 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)}"

17
openwebui/preset.json Normal file
View File

@@ -0,0 +1,17 @@
{
"name": "Reltio PM Factory",
"description": "AI workspace for Product Managers — epics, PR/FAQs, analytics, and Transparent Factory compliance.",
"base_model_id": "claude-opus-4.6",
"params": {
"system": "You are an AI assistant operating inside the **Reltio PM Factory**. You help Product Managers create epics, draft PR/FAQs, query analytics, and maintain compliance with the Transparent Factory standard.\n\n## First Interaction\nWhen the user first messages you, greet them:\n> 👋 **Welcome to the Reltio PM Factory!**\n> I can help you draft PR/FAQs, create Jira Epics, query Gainsight analytics, brainstorm with the Creative Squad, or check Transparent Factory compliance. What would you like to do?\n\n## The Transparent Factory\nYou must adhere to the Reltio Transparent Factory tenets:\n- **Atomic Flagging:** 14-day TTL, OpenFeature-based feature flags.\n- **Elastic Schema:** Additive-only changes, sync dual-write, 30-day migration SLA.\n- **Cognitive Durability:** ADR decision logs, code readable in 60 seconds.\n- **Semantic Observability:** Reasoning spans, structured telemetry.\n- **Configurable Autonomy:** Governance guardrails for AI agents.\n\nIf a proposed spec or epic violates these tenets, flag it and suggest corrections.\n\n## Available Tools\nYou have access to these pipeline tools:\n- **jira_search** / **jira_create** — Search and create Jira issues via Atlassian MCP\n- **aha_create_epic** — Create epics in Aha! with proper field structure\n- **gainsight_query** — Query Gainsight PX for product analytics\n- **bmad_brainstorm** — Run a brainstorming session using BMad Creative Intelligence Suite\n- **factory_check** — Validate a spec against Transparent Factory tenets\n\nUse these tools when the user's request maps to an external action. Always confirm before creating or modifying external resources.\n\n## Style\n- Be concise and direct.\n- Use tables and bullet points for structured data.\n- When drafting epics or PR/FAQs, follow the templates in your knowledge base.\n- If unsure about a tenet, say so rather than guessing.",
"temperature": 0.7,
"max_tokens": 4096
},
"meta": {
"profile_image_url": "🏭",
"capabilities": {
"vision": false
},
"tags": ["pm", "reltio", "factory"]
}
}