Zenflow Product Manager (PM) Skill Contract
This document defines the trigger conditions, orchestration steps, configuration scope, input parameters, and output artifacts for the Zenflow Product Manager (PM) Skill.
1. Trigger Conditions
The Zenflow Product Manager (PM) Skill is designed to run automatically on a recurring schedule or on-demand based on specific events:
- Scheduled Trigger:
- Weekly Pulse: Runs every Friday at 15:00 UTC to generate the weekly health, roadmap status, and stakeholder brief.
- Daily Sync: Runs daily at 09:00 UTC to monitor competitive updates and update customer discovery preparation profiles.
- On-Demand/Event Trigger:
- Trigger Event: Shipped Release / Epic Closed.
- Manual Command: Invoked manually by a product manager inside the chat or Zenflow pipeline with:
zenflow run-skill product-manager
2. Configuration Scope
The skill is configured at the organization/workspace level using the single configuration file ./org-config.yaml. The schema consists of:
organization: Name of the target organization.product_lines: Defined product lines with mapped resource identifiers for Jira/Linear, Amplitude, and Stripe.competitive_intelligence: Monitored competitors with RSS/Atom changelog feeds and custom pricing regex selectors.customer_discovery: Active threshold indicators and error project tracking definitions.
3. Input Parameters Schema
When the PM Skill is executed, it accepts a JSON input payload containing execution flags and optional narrative briefs:
{
"config_path": "./org-config.yaml",
"output_dir": "./dist",
"force_mock": false,
"ai_brief_text": "Our primary milestone 'Stripe Sync Engine V2' was successfully completed on June 12, three days ahead of schedule! Focus is shifting to 'Mobile App Performance' theme priority mapping for the enterprise tier. We encountered minor staging blockage on database optimizations, causing carrier-over spillover for ENG-402, which is now resolved."
}
4. Execution & Orchestration Steps
The PM Skill orchestrator runs through a dual-stage execution pipeline to gather raw metadata and compile the interactive web dashboard:
flowchart TD
Start([Trigger PM Skill]) --> LoadConfig[Load Config from ./org-config.yaml]
LoadConfig --> Step1[Stage 1: Gather raw metrics and normalize via ./scripts/gather_pm.py]
Step1 --> CheckIntegrations{Are Live Integrations & Skills Connected?}
CheckIntegrations -->|Yes| QueryAPIs[Query live Stripe, Amplitude, Linear/Jira, Sentry, HubSpot APIs]
CheckIntegrations -->|No / Part| UseMocks[Fall back gracefully to realistic simulated mock metrics]
QueryAPIs --> NormalizeJSON[Merge & write normalized output to ./dist/pm_data.json]
UseMocks --> NormalizeJSON
NormalizeJSON --> Step2[Stage 2: Hydrate Dashboard via ./scripts/populate_pm.py]
Step2 --> LoadTemplate[Load UI template from ./templates/pm_dashboard.html]
LoadTemplate --> CompileHTML[Safely inject JSON & AI Brief into DOM data script blocks]
CompileHTML --> WriteOutput[Write standalone production dashboard to ./dist/index.html]
WriteOutput --> Finish([Orchestration Complete & Notify User])
- Stage 1 (Gathering):
- Call
./scripts/gather_pm.pypassing--configand--outputparameters. - The script parses
./org-config.yamlnatively using a fallback line-by-line YAML reader ifPyYAMLis missing. - Computes delivery estimation dates, shipping velocity, customer tier theme counts, scope creep indicators, and competitive updates.
- Resolves missing keys or credentials by sliding in realistic mock data gracefully.
- Call
- Stage 2 (Compilation):
- Call
./scripts/populate_pm.pyfeeding./dist/pm_data.jsonas input. - Accepts the optional narrative brief input from the orchestrator.
- Performs a secure injection into
./templates/pm_dashboard.html, safely wrapping data inside application block templates. - Produces
./dist/index.htmlwith Tailwind/Alpine CDN references for instant cross-platform client-side rendering.
- Call
5. Output Artifacts
Every orchestration run produces exactly two primary output files:
./dist/pm_data.json: The normalized, structured JSON metrics payload covering all 8 PM dashboard views. This format decouples external platform dependencies from visual rendering structures../dist/index.html: A standalone, self-contained interactive PM Dashboard HTML client styled with Zenflow branding (dark-gray backgrounds and neon orange highlights) that works out-of-the-box in any browser.
6. How to Invoke inside Zenflow Pipeline
The skill can be incorporated into ./.zenflow/pipelines/pm-weekly.yaml configurations using the workflow schema below:
name: "Product Manager Intelligence Sync"
on:
schedule:
- cron: "0 15 * * 5" # Runs every Friday at 15:00 UTC
jobs:
weekly_pm_sync:
runs-on: "zenflow-runner"
steps:
- name: "Checkout Codebase"
uses: "actions/checkout@v4"
- name: "Run PM Aggregator CLI"
run: |
python3 ./scripts/gather_pm.py \
--config ./org-config.yaml \
--output ./dist/pm_data.json
- name: "Generate Narrative Insights Brief"
id: "ai_insights"
uses: "zenflow/ai-summarizer@v1"
with:
input_data: "./dist/pm_data.json"
prompt: "Analyze the product metrics and generate a concise highlights/lowlights text narrative for stakeholders."
- name: "Compile PM Visual Dashboard"
run: |
python3 ./scripts/populate_pm.py \
--input ./dist/pm_data.json \
--template ./templates/pm_dashboard.html \
--brief "${{ steps.ai_insights.outputs.brief_text }}" \
--output ./dist/index.html
- name: "Publish & Notify Slack"
uses: "zenflow/slack-notify@v1"
with:
channel_id: "C0123456789"
message: "Weekly Product Health & PM Dashboard has been successfully compiled! Open ./dist/index.html to view the insights."