From dc2f830c488ca38a6fb8059dcdad0bca90348cfd Mon Sep 17 00:00:00 2001 From: Le Xuan Thang Date: Fri, 29 May 2026 09:23:39 +0100 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20add=20workflow-kit=20=E2=80=94=20fu?= =?UTF-8?q?ll=20product=20lifecycle=20plugin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds workflow-kit v0.3.0 to Development & Workflow section. Plugin features: - Full lifecycle: define Vision/Mission/Core → plan → execute → synthesize → maintain - Cross-provider reviewer agents (eliminates sycophancy bias) - Crash recovery with automatic file rollback and re-queue - Parallel task execution with file-conflict detection - AgentOps metrics dashboard (/status shows pass rate, latency, retries) Platforms: Claude Code, Codex CLI, OpenCode, Gemini CLI, standalone pip. License: MIT | Version: 0.3.0 | CI: passing (12-job matrix) --- README.md | 1 + .../workflow-kit/.codex-plugin/plugin.json | 20 +++++++++++++++ .../workflow-kit/assets/icon.svg | 25 +++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 plugins/Le-Xuan-Thang/workflow-kit/.codex-plugin/plugin.json create mode 100644 plugins/Le-Xuan-Thang/workflow-kit/assets/icon.svg diff --git a/README.md b/README.md index 10b242df..b605206f 100644 --- a/README.md +++ b/README.md @@ -179,6 +179,7 @@ Third-party plugins built by the community. [PRs welcome](#contributing)! - [Unity Agent Workflows](https://github.com/AUN-PN/unity-agent-workflows) - Codex plugin and skill for Unity 2D agents that enforces "No proof, no edit" workflows with runtime-owner proof, Teach structure maps, and validation gates. - [Universal Design Principles](https://github.com/HDeibler/universal-design-principles) - Cross-agent UX and product-design marketplace with a root Codex collection plugin, five focused plugin bundles, and 137 Agent Skills for design review, accessibility, layout, interaction, cognition, and product polish. - [VibePortrait](https://github.com/dadwadw233/VibePortrait) - Developer personality portrait generator — analyzes AI conversation history to produce MBTI type (16 color themes), capability radar, developer rating, 3-dimension famous match, and a persona skill that lets any AI "think like you". +- [workflow-kit](https://github.com/Le-Xuan-Thang/workflow-kit) - Full product lifecycle plugin for Claude Code, Codex CLI, and OpenCode: define Vision/Mission/Core → generate workplan → execute with mandatory cross-provider reviewer agents → synthesize deliverables → maintain, with parallel task execution, crash recovery, and AgentOps metrics. - [Writer's Loop](https://github.com/xxsang/writers-loop) - Structured AI writing workflow for planning, critique, revision, translation, style distillation, and opt-in local preference learning. - [Zagrosi Forge](https://github.com/zagrosi-code/zagrosi-forge) - Decompose broad project briefs into researched plans and implement sectioned work with TDD, quality gates, and traceability. diff --git a/plugins/Le-Xuan-Thang/workflow-kit/.codex-plugin/plugin.json b/plugins/Le-Xuan-Thang/workflow-kit/.codex-plugin/plugin.json new file mode 100644 index 00000000..7b836dbc --- /dev/null +++ b/plugins/Le-Xuan-Thang/workflow-kit/.codex-plugin/plugin.json @@ -0,0 +1,20 @@ +{ + "name": "workflow-kit", + "version": "0.3.0", + "description": "Full product lifecycle plugin: define Vision/Mission/Core → generate workplan → execute with mandatory reviewer agents → synthesize deliverables → maintain. Supports parallel task execution, crash recovery, cross-provider reviewer, and AgentOps metrics.", + "repository": "https://github.com/Le-Xuan-Thang/workflow-kit", + "license": "MIT", + "keywords": ["multi-agent", "product-lifecycle", "workflow", "reviewer", "automation"], + "author": { + "name": "Le Xuan Thang", + "email": "lexuanthang.stock@gmail.com" + }, + "interface": { + "displayName": "workflow-kit", + "shortDescription": "AI product lifecycle: Vision → Plan → Execute → Synthesize → Maintain", + "composerIcon": "./assets/icon.svg", + "developerName": "Le Xuan Thang", + "category": "Coding", + "brandColor": "#6366F1" + } +} diff --git a/plugins/Le-Xuan-Thang/workflow-kit/assets/icon.svg b/plugins/Le-Xuan-Thang/workflow-kit/assets/icon.svg new file mode 100644 index 00000000..a90d3ac1 --- /dev/null +++ b/plugins/Le-Xuan-Thang/workflow-kit/assets/icon.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + From 4330472ce5694d6d48d9213e61cd9e49f96239c3 Mon Sep 17 00:00:00 2001 From: Le Xuan Thang Date: Fri, 29 May 2026 09:42:50 +0100 Subject: [PATCH 2/3] fix: address bot review feedback on workflow-kit plugin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - plugin.json: fix composerIcon path ./assets/ → ../assets/icon.svg (manifest is in .codex-plugin/, icon is at plugin root level) - plugin.json: add skills field pointing to ./skills/ - assets/icon.svg: correct arc endpoint coordinates to lie on r=160 circle (were using (368,388) and (144,388) which are ~173px from center) Now using mathematically correct 5-segment points: (256,96) (408,207) (350,385) (162,385) (104,207) - skills/: include all 7 SKILL.md files in plugin bundle --- .../workflow-kit/.codex-plugin/plugin.json | 3 +- .../workflow-kit/assets/icon.svg | 34 +- .../workflow-kit/skills/execute/SKILL.md | 101 ++++++ .../workflow-kit/skills/init/SKILL.md | 293 ++++++++++++++++++ .../workflow-kit/skills/maintain/SKILL.md | 72 +++++ .../workflow-kit/skills/monitor/SKILL.md | 43 +++ .../workflow-kit/skills/plan/SKILL.md | 89 ++++++ .../workflow-kit/skills/status/SKILL.md | 68 ++++ .../workflow-kit/skills/synthesize/SKILL.md | 96 ++++++ 9 files changed, 783 insertions(+), 16 deletions(-) create mode 100644 plugins/Le-Xuan-Thang/workflow-kit/skills/execute/SKILL.md create mode 100644 plugins/Le-Xuan-Thang/workflow-kit/skills/init/SKILL.md create mode 100644 plugins/Le-Xuan-Thang/workflow-kit/skills/maintain/SKILL.md create mode 100644 plugins/Le-Xuan-Thang/workflow-kit/skills/monitor/SKILL.md create mode 100644 plugins/Le-Xuan-Thang/workflow-kit/skills/plan/SKILL.md create mode 100644 plugins/Le-Xuan-Thang/workflow-kit/skills/status/SKILL.md create mode 100644 plugins/Le-Xuan-Thang/workflow-kit/skills/synthesize/SKILL.md diff --git a/plugins/Le-Xuan-Thang/workflow-kit/.codex-plugin/plugin.json b/plugins/Le-Xuan-Thang/workflow-kit/.codex-plugin/plugin.json index 7b836dbc..e20fb499 100644 --- a/plugins/Le-Xuan-Thang/workflow-kit/.codex-plugin/plugin.json +++ b/plugins/Le-Xuan-Thang/workflow-kit/.codex-plugin/plugin.json @@ -9,10 +9,11 @@ "name": "Le Xuan Thang", "email": "lexuanthang.stock@gmail.com" }, + "skills": "./skills/", "interface": { "displayName": "workflow-kit", "shortDescription": "AI product lifecycle: Vision → Plan → Execute → Synthesize → Maintain", - "composerIcon": "./assets/icon.svg", + "composerIcon": "../assets/icon.svg", "developerName": "Le Xuan Thang", "category": "Coding", "brandColor": "#6366F1" diff --git a/plugins/Le-Xuan-Thang/workflow-kit/assets/icon.svg b/plugins/Le-Xuan-Thang/workflow-kit/assets/icon.svg index a90d3ac1..71641f61 100644 --- a/plugins/Le-Xuan-Thang/workflow-kit/assets/icon.svg +++ b/plugins/Le-Xuan-Thang/workflow-kit/assets/icon.svg @@ -2,24 +2,28 @@ - - + + - - - - - - - - - - + + + - - + + + + + + + + + + - + + + + diff --git a/plugins/Le-Xuan-Thang/workflow-kit/skills/execute/SKILL.md b/plugins/Le-Xuan-Thang/workflow-kit/skills/execute/SKILL.md new file mode 100644 index 00000000..567fa245 --- /dev/null +++ b/plugins/Le-Xuan-Thang/workflow-kit/skills/execute/SKILL.md @@ -0,0 +1,101 @@ +--- +name: execute +description: Use to start the dispatcher loop — every task is executed by a worker agent then validated by a domain-expert reviewer agent before being marked done. Requires at least one pending task. Also triggers when the user says "start building", "run the dispatcher", "execute the workplan", or "start the dev loop". Pass --stop to stop a running dispatcher. +argument-hint: "[--stop]" +allowed-tools: Read, Bash +--- + +# Workflow Execute + +Start the dispatcher. For every task: worker builds → reviewer validates → PASS marks done, FAIL retries, max retries exceeded escalates to user. + +## Reviewer gate + +After each worker output passes syntax verification: +1. If `reviewers:` is configured in `workflow.yaml` (or per-task `reviewer:` field in the task JSON), a reviewer agent is called with a domain-appropriate system prompt +2. Domain is auto-detected from task description: `code-reviewer`, `editor`, `researcher`, `designer`, `data-scientist`, or `devops` +3. Reviewer responds with PASS or FAIL on the first line, followed by specific feedback +4. On FAIL: feedback is appended to the retry prompt — worker tries again (up to `max_retries`) +5. After `max_retries` FAILs: task is escalated — user sees reviewer's final feedback and chooses: skip / retry with guidance / redesign +6. On PASS (or no reviewer configured): task is marked completed and committed +7. If reviewer LLM is unreachable: treated as PASS to avoid blocking the pipeline + +## Step 1: Check prerequisites + +```bash +python3 -c " +from workflow_kit.runtime.state import load_state +from pathlib import Path +s = load_state(Path('.')) +print('phase:', s.phase) +" && \ +ls workflow/tasks/pending/*.json 2>/dev/null | wc -l | xargs -I{} echo "pending tasks: {}" +``` + +- Phase not `plan` or `execute`: warn with correct next skill. +- 0 pending tasks: "Run /workflow-kit:plan first." + +## Step 2: Handle --stop + +If user passes `--stop` or says "stop": +```bash +python -m workflow_kit stop +``` +Done. + +## Step 3: Check if already running + +```bash +cat workflow/dispatcher.pid 2>/dev/null | xargs -I{} kill -0 {} 2>/dev/null && echo "running" || echo "stopped" +``` +If running: "Dispatcher already running. Use /workflow-kit:status." + +## Step 4: Advance state to 'execute' + +```python +from workflow_kit.runtime.state import load_state, save_state +from pathlib import Path +s = load_state(Path('.')) +if s.phase == "plan": + s.transition_to("execute") + save_state(s, Path('.')) + print("Phase: plan → execute") +``` + +## Step 5: Start dispatcher + +```bash +python -m workflow_kit execute & +echo $! > workflow/dispatcher.pid +``` + +## Step 6: Report + +``` +✓ Dispatcher started (PID N) + + Loop: worker builds → reviewer validates → PASS/FAIL + Max retries: + + Monitor: + /workflow-kit:status — inline progress + /workflow-kit:monitor — live dashboard + + When all tasks complete: + /workflow-kit:synthesize — package and review deliverables +``` + +## Reviewer escalation + +When a task fails review max_retries times, the dispatcher pauses and prints: + +``` +⚠ Task failed review N times + Reviewer (): + + A) Skip this task + B) Retry with your guidance (describe what to fix) + C) Redesign the task entirely +``` + +Respond inline — dispatcher waits before continuing. diff --git a/plugins/Le-Xuan-Thang/workflow-kit/skills/init/SKILL.md b/plugins/Le-Xuan-Thang/workflow-kit/skills/init/SKILL.md new file mode 100644 index 00000000..955afed4 --- /dev/null +++ b/plugins/Le-Xuan-Thang/workflow-kit/skills/init/SKILL.md @@ -0,0 +1,293 @@ +--- +name: init +description: Use to initialize workflow-kit in any project with a guided step-by-step wizard. Defines Vision, Mission, Core, audits the system, configures LLMs, and sets lifecycle state to 'define'. Also triggers when the user says "set up workflow-kit", "define the product", "start a new project", or "configure my dev loop". +argument-hint: "[--rebenchmark] [--reset]" +allowed-tools: Read, Write, Bash +--- + +# Workflow Init — Product Definition Wizard + +Guide the user through a complete workflow-kit setup: define Vision/Mission/Core, audit the environment, configure LLMs, write reviewer profiles, and set lifecycle state to `define`. + + +One question per message. Verify each step before advancing. Never dump a form. + + +## Phase 0: Handle flags + +- `--reset` → delete `workflow/` and `workflow.yaml`, start fresh +- `--rebenchmark` → skip to **Phase 5: Benchmark** + +## Phase 1: Check existing state + +```bash +ls workflow/state.yaml 2>/dev/null && \ + python3 -c "import yaml; s=yaml.safe_load(open('workflow/state.yaml')); print('phase:', s.get('phase'), '| type:', s.get('product_type'))" \ + || echo "no-state" +``` + +If already initialized: "workflow-kit is in phase X. Reinitialize from scratch, or update config only?" + +## Phase 2: Environment scan + +Run silently, show one summary: + +```bash +python3 --version 2>/dev/null || echo "python-missing" +python3 -c "import workflow_kit; print('runtime-ok')" 2>/dev/null || echo "runtime-missing" +ollama --version 2>/dev/null && echo "ollama-ok" || echo "ollama-missing" +curl -s http://localhost:11434/api/tags 2>/dev/null | \ + python3 -c "import sys,json; [print('model:', m['name']) for m in json.load(sys.stdin).get('models',[])]" 2>/dev/null || echo "ollama-not-running" +free -g 2>/dev/null | awk '/^Mem:/{print "ram:"$2"GB"}' || \ + sysctl -n hw.memsize 2>/dev/null | awk '{printf "ram:%dGB\n",$1/1073741824}' || echo "ram:unknown" +[ -n "$OPENROUTER_API_KEY" ] && echo "openrouter-set" || \ + grep -s OPENROUTER_API_KEY .env 2>/dev/null && echo "openrouter-in-env" || echo "openrouter-missing" +git --version 2>/dev/null | head -1 +``` + +Show summary: +``` +Environment: + Python ✓ 3.x / ✗ missing + Runtime ✓ installed / ✗ will install + Ollama ✓ running (models: ...) / ✗ not installed + RAM X GB + OpenRouter ✓ key set / ✗ missing + Git ✓ +``` + +## Phase 3: Define — Vision + +Ask: +> "Let's define your product. **Vision** first — what is this product's long-term direction? What does it become in 3–5 years?" + +Wait. Write to `workflow/product.md` under `## Vision`. + +## Phase 4: Define — Mission + +Ask: +> "**Mission** — who does this product serve, and what urgent problem does it solve for them?" + +Write to `workflow/product.md` under `## Mission`. + +## Phase 5: Define — Core + +Explain: "Core covers all systems available to build and run this product." + +Run system scan: +```bash +uname -sm +free -g 2>/dev/null | awk '/^Mem:/{print "RAM:"$2"GB"}' || \ + sysctl -n hw.memsize 2>/dev/null | awk '{printf "RAM:%dGB\n",$1/1073741824}' +python3 --version; node --version 2>/dev/null; docker --version 2>/dev/null; git --version +[ -n "$OPENROUTER_API_KEY" ] && echo "OpenRouter: configured" +[ -n "$OPENAI_API_KEY" ] && echo "OpenAI: configured" +``` + +Ask: +> "A few more things I can't detect automatically: +> - Timeline and team size? +> - Main competitors or alternatives in this space? +> - Hard constraints (budget, tech stack, regulatory)? +> - Key documentation, papers, or standards to reference?" + +Write complete `workflow/product.md`: + +```markdown +# Product + +## Vision + + +## Mission +### Who We Serve + +### Problem We Solve + + +## Core +### Computing Environment + +### Software Environment + +### Cloud & APIs + +### Documentation & Resources + +### Constraints + +### Competitive Landscape + +``` + +## Phase 6: Detect product type + +```python +from workflow_kit.runtime.synthesizer import detect_product_type +import re, pathlib +text = pathlib.Path("workflow/product.md").read_text() +vision = re.search(r"## Vision\n(.*?)##", text, re.DOTALL) +print(detect_product_type(vision.group(1) if vision else text)) +``` + +Confirm with user: "I detected this as a **** project. Correct?" + +## Phase 7: LLM setup + +Ask: +> "How do you want to run the **worker LLM** (the model that builds your product)? +> A) Local (Ollama) — private, free, needs RAM/GPU +> B) Cloud (OpenRouter/OpenAI/Anthropic) — no GPU, has cost +> C) Hybrid — local worker + free DeepSeek orchestrator (recommended)" + +**Path A — Local:** +- If Ollama missing → detect OS → show install command → verify → `ollama pull ` +- RAM-based model recommendation: ≥48GB→llama3.1:70b, ≥24GB→qwen2.5-coder:32b, ≥16GB→deepseek-coder-v2:16b, ≥8GB→llama3.1:8b +- Verify: `curl -s http://localhost:11434/v1/chat/completions -d '{"model":"","messages":[{"role":"user","content":"ok"}],"max_tokens":3}'` + +**Path B — Cloud:** +- Ask provider (OpenRouter/OpenAI/Anthropic) → show API key URL → verify key → choose model + +**Path C — Hybrid:** +- Run Path A for worker +- For orchestrator: get OpenRouter key → verify DeepSeek free tier + +## Phase 7b: Reviewer LLM setup + +Ask: +> "Do you want to configure a **reviewer LLM** — a separate model that validates each worker output before marking tasks complete? This eliminates sycophancy bias when the same model reviews its own work. +> A) Yes — use a cloud API (Claude/OpenAI/OpenRouter) as reviewer, local model as worker (recommended) +> B) Yes — use the same endpoint as worker (simpler, still adds review step) +> C) No — skip reviewer (worker output accepted after syntax check only)" + +**Path A or B:** Add `reviewers:` section to `workflow.yaml`: + +```yaml +reviewers: + - endpoint: "" + api_key: "" + model: "" +``` + +**Path C:** Skip — no `reviewers:` key in workflow.yaml. Task auto-passes after syntax check. + +Per-task override: any task JSON in `workflow/tasks/pending/` can include a `"reviewer": {"endpoint":…, "api_key":…, "model":…}` field to use a different reviewer for that specific task. + +## Phase 8: Write workflow.yaml + +```yaml +project: + name: "" + description: "" + root: "." + +orchestrator: + endpoint: "" + api_key: "<${VAR} or literal>" + model: "deepseek/deepseek-chat:free" + +worker: + endpoint: "" + api_key: "" + model: "" + +reviewers: + default_endpoint: "" + default_api_key: "" + default_model: "" + +settings: + work_hours: "9-21" + auto_commit: true + verify_syntax: true + max_retries: 2 + dashboard_port: 7860 +``` + +## Phase 9: Ensure runtime + +```bash +python3 -c "import workflow_kit" 2>/dev/null || ( + pip install --quiet pyyaml python-dotenv && + pip install --quiet git+https://github.com/Le-Xuan-Thang/workflow-kit.git +) +``` + +## Phase 10: Create workflow/ directory structure + +```bash +mkdir -p workflow/tasks/pending workflow/tasks/active workflow/tasks/review workflow/tasks/completed +mkdir -p workflow/reviewers workflow/output workflow/memory workflow/maintenance/jobs +``` + +## Phase 11: Write reviewer profiles + +Based on product_type, write relevant profiles to `workflow/reviewers/.md` using defaults from `workflow_kit.runtime.reviewer.DEFAULT_PROFILES`: + +```python +from workflow_kit.runtime.reviewer import DEFAULT_PROFILES +from pathlib import Path + +TYPE_REVIEWERS = { + "webapp": ["code-reviewer", "designer", "devops"], + "library": ["code-reviewer", "editor"], + "paper": ["researcher", "editor"], + "article": ["editor"], + "api": ["code-reviewer", "devops"], + "dataset": ["data-scientist", "researcher"], +} +product_type = "" +for domain in TYPE_REVIEWERS.get(product_type, ["code-reviewer"]): + Path(f"workflow/reviewers/{domain}.md").write_text(DEFAULT_PROFILES[domain]) + print(f" wrote workflow/reviewers/{domain}.md") +``` + +## Phase 12: Initialize lifecycle state + +```python +from workflow_kit.runtime.state import WorkflowState, save_state +from pathlib import Path +state = WorkflowState(phase="define", product_type="") +save_state(state, Path(".")) +print("State: phase=define") +``` + +## Phase 13: Benchmark + +```bash +python -m workflow_kit benchmark +``` + +## Phase 14: Update .gitignore + +Append if missing: +``` +workflow/ +workflow.yaml +.env +``` + +## Phase 15: Final report + +``` +╔══════════════════════════════════════════════════════════╗ +║ workflow-kit initialized ✓ ║ +╚══════════════════════════════════════════════════════════╝ + + Product: + Type: + Phase: define + Worker: + Orchestrator: + Reviewers: + + Files: + ✓ workflow/product.md + ✓ workflow/state.yaml (phase: define) + ✓ workflow/reviewers/ ( profiles) + ✓ workflow.yaml + + Next: + Edit workflow/product.md if needed, then: + /workflow-kit:plan — generate your workplan +``` diff --git a/plugins/Le-Xuan-Thang/workflow-kit/skills/maintain/SKILL.md b/plugins/Le-Xuan-Thang/workflow-kit/skills/maintain/SKILL.md new file mode 100644 index 00000000..b329c1d0 --- /dev/null +++ b/plugins/Le-Xuan-Thang/workflow-kit/skills/maintain/SKILL.md @@ -0,0 +1,72 @@ +--- +name: maintain +description: Use to set up and run scheduled maintenance jobs after a product is approved. Suggests jobs based on product type and schedules them via cron. Also triggers when the user says "set up maintenance", "keep the product updated", "schedule recurring checks", or "monitor the product ongoing". +allowed-tools: Read, Write, Bash +--- + +# Workflow Maintain + +Set up scheduled maintenance jobs appropriate to the product type. Jobs run via cron using `python -m workflow_kit schedule`. + +## Step 1: Check phase + +```bash +python3 -c " +from workflow_kit.runtime.state import load_state +from pathlib import Path +s = load_state(Path('.')) +print('phase:', s.phase, '| product_type:', s.product_type) +" +``` + +Phase should be `maintain`. If earlier: "Product not yet approved. Run /workflow-kit:synthesize first." + +## Step 2: Show suggested jobs by product type + +| Product type | Suggested jobs | +|---|---| +| webapp | Weekly dependency audit, Daily uptime check, Monthly perf report | +| library | Monthly compatibility check, Weekly CVE scan | +| paper | Monthly citation freshness check, Quarterly related-work scan | +| article | — (ask user if they want revision reminders) | +| api | Daily endpoint health check, Weekly schema drift detection | +| dataset | Quarterly data quality audit, Monthly license check | + +Ask: "Which of these jobs do you want? You can also describe custom jobs." + +## Step 3: Write job files + +For each enabled job, create `workflow/maintenance/jobs/.json`: + +```json +{ + "job_id": "", + "description": "", + "schedule": "", + "agent": "", + "reviewer": "", + "task": "" +} +``` + +## Step 4: Install cron schedule + +```bash +python -m workflow_kit schedule --start 09:00 --stop 10:00 --recurring +``` + +## Step 5: Report + +``` +✓ Maintenance configured + + Jobs: N enabled + Schedule: recurring, 09:00–10:00 + + : [] + ... + + To run manually: python -m workflow_kit maintain + To check status: /workflow-kit:status + To stop schedule: python -m workflow_kit schedule --remove +``` diff --git a/plugins/Le-Xuan-Thang/workflow-kit/skills/monitor/SKILL.md b/plugins/Le-Xuan-Thang/workflow-kit/skills/monitor/SKILL.md new file mode 100644 index 00000000..2f21aa98 --- /dev/null +++ b/plugins/Le-Xuan-Thang/workflow-kit/skills/monitor/SKILL.md @@ -0,0 +1,43 @@ +--- +name: monitor +description: Use to open the full live dashboard — Rich TUI in the terminal or web dashboard at localhost:7860. Also triggers when the user says "show live progress", "open workflow dashboard", "watch the dispatcher", or "monitor in browser". Pass --web for browser mode. +argument-hint: "[--web]" +allowed-tools: Bash +--- + +# Workflow Monitor + +Launch the live monitoring dashboard. TUI by default, web with `--web`. + +## Step 1: Check dispatcher + +```bash +cat workflow/dispatcher.pid 2>/dev/null | xargs -I{} kill -0 {} 2>/dev/null && echo "running" || echo "stopped" +``` + +If stopped: warn "Dispatcher not running — dashboard shows current state only. Start with /workflow-kit:execute." + +## Step 2: Choose mode + +- `--web` or user says "browser" / "web dashboard" → Web mode +- Sandboxed environment (Codex App, CI — no terminal control) → Web mode +- Otherwise → TUI mode + +## TUI mode + +```bash +python -m workflow_kit monitor +``` + +Rich terminal dashboard: task queue, in-review panel, live log, footer command bar. +Commands: `/pause`, `/resume`, `/skip `, `/retry `, `/quit` + +## Web mode + +```bash +python -m workflow_kit dashboard & +``` + +Tell user: "Dashboard at http://localhost:" + +Features: task cards with reviewer status, live log stream, goals viewer, pause/resume/retry buttons. diff --git a/plugins/Le-Xuan-Thang/workflow-kit/skills/plan/SKILL.md b/plugins/Le-Xuan-Thang/workflow-kit/skills/plan/SKILL.md new file mode 100644 index 00000000..75824cff --- /dev/null +++ b/plugins/Le-Xuan-Thang/workflow-kit/skills/plan/SKILL.md @@ -0,0 +1,89 @@ +--- +name: plan +description: Use to generate a structured workplan — objectives and tasks — from workflow/product.md. Requires init to have run first (phase must be 'define' or 'plan'). Also triggers when the user says "generate my workplan", "plan the project", "create tasks from the product definition", or "what should the agent work on". +argument-hint: "[-n ]" +allowed-tools: Read, Bash +--- + +# Workflow Plan + +Read `workflow/product.md` and generate objectives + tasks matched to worker capability. Advances phase to `plan`. + + +Do NOT generate tasks if workflow/product.md is missing or phase is past 'plan'. Warn and stop. + + +## Step 1: Check prerequisites + +```bash +python3 -c " +from workflow_kit.runtime.state import load_state +from pathlib import Path +s = load_state(Path('.')) +print('phase:', s.phase) +print('product_type:', s.product_type) +" +ls workflow/product.md 2>/dev/null && echo "product-ok" || echo "product-missing" +ls workflow/worker_capability.json 2>/dev/null && echo "capability-ok" || echo "no-capability-warning" +``` + +- Phase `execute` or later: "Already past planning. Use /workflow-kit:execute to continue." +- `workflow/product.md` missing: "Run /workflow-kit:init first." +- No capability file: warn but continue — orchestrator will plan conservatively. + +## Step 2: Generate workplan + +```bash +python -m workflow_kit workplan +``` + +Orchestrator (DeepSeek) reads: +- `workflow/product.md` (Vision/Mission/Core) +- `workflow/worker_capability.json` (skill scores) +- `workflow/tasks/completed/` (what's already done) + +Creates 3–5 objectives aligned to Vision. Tasks under each objective matched to worker skill scores. Tasks needing a skill < 3.0 are decomposed into smaller sub-tasks. + +## Step 3: Write workflow/workplan.md + +```markdown +# Workplan — + +Generated: + +## Objectives + +### +**Why:** aligned to Vision/Mission +**Success criteria:** measurable outcome + +Tasks: +- [ ] : +``` + +## Step 4: Advance state to 'plan' + +```python +from workflow_kit.runtime.state import load_state, save_state +from pathlib import Path +s = load_state(Path('.')) +if s.phase == "define": + s.transition_to("plan") + save_state(s, Path('.')) + print("Phase: define → plan") +``` + +## Step 5: Report + +``` +Workplan generated: + + Objectives: N + Tasks: N pending in workflow/tasks/pending/ + + obj-01: (N tasks) + obj-02: (N tasks) + +Review workflow/workplan.md, then: + /workflow-kit:execute — start the dispatcher with reviewer agents +``` diff --git a/plugins/Le-Xuan-Thang/workflow-kit/skills/status/SKILL.md b/plugins/Le-Xuan-Thang/workflow-kit/skills/status/SKILL.md new file mode 100644 index 00000000..ddf0ba51 --- /dev/null +++ b/plugins/Le-Xuan-Thang/workflow-kit/skills/status/SKILL.md @@ -0,0 +1,68 @@ +--- +name: status +description: Use for a quick inline status check — shows current lifecycle phase, dispatcher state, task counts, and recent decisions. No TUI or browser. Also triggers when the user says "what's happening", "workflow progress", "how many tasks are left", or "is the dispatcher running". +allowed-tools: Bash +--- + +# Workflow Status + +Print a compact status snapshot directly in the conversation. + +## Step 1: Run + +```bash +python -m workflow_kit status +``` + +## Step 2: Print result inline + +``` +── Workflow Status ─────────────────────────────────────── + Phase: execute (define → plan → [execute] → synthesize → maintain) + Dispatcher: running (PID 12345) / stopped + Active: feat-003-dark-mode (started 4 min ago) + In review: 1 task (reviewer running) + Pending: 2 tasks + Completed: 7 tasks (6 ✓ reviewer passed · 1 ✗ failed) + Workers: llama3.1:70b → qwen2.5-coder:32b + Orch: deepseek/deepseek-chat:free + + Last completed: + ✓ feat-002: Built CSV export endpoint + ✗ feat-001: Auth middleware (reviewer: missing tests) +────────────────────────────────────────────────────────── +``` + +If no `workflow/` directory: "workflow-kit not initialized. Run /workflow-kit:init first." + +If dispatcher stopped with pending tasks: append "Run /workflow-kit:execute to resume." + +If phase is `synthesize` and all tasks done: append "Run /workflow-kit:synthesize to package deliverables." + +## Metrics Summary + +Load and display recent task metrics: + +```python +from workflow_kit.runtime.metrics import load_metrics, summarize +from pathlib import Path + +metrics = load_metrics(Path("."), limit=50) +stats = summarize(metrics) +if stats: + print(f""" +┌─────────────────────────────────────────┐ +│ Task Metrics (last 50) │ +├─────────────────────────────────────────┤ +│ Total tasks: {stats['total']:>4} │ +│ Completed: {stats['completed']:>4} ({stats['pass_rate']}%) │ +│ Failed: {stats['failed']:>4} │ +│ Escalated: {stats['escalated']:>4} │ +│ Avg duration: {stats['avg_duration_seconds']:>6.1f}s │ +│ Avg retries: {stats['avg_retries']:>6.2f} │""") + if stats['reviewer_pass_rate'] is not None: + print(f"│ Reviewer pass: {stats['reviewer_pass_rate']:>5.1f}% │") + print("└─────────────────────────────────────────┘") +else: + print("No metrics recorded yet. Run /workflow-kit:execute to start.") +``` diff --git a/plugins/Le-Xuan-Thang/workflow-kit/skills/synthesize/SKILL.md b/plugins/Le-Xuan-Thang/workflow-kit/skills/synthesize/SKILL.md new file mode 100644 index 00000000..5f760b8f --- /dev/null +++ b/plugins/Le-Xuan-Thang/workflow-kit/skills/synthesize/SKILL.md @@ -0,0 +1,96 @@ +--- +name: synthesize +description: Use to package all completed work into deliverables appropriate to the product type, then present to the user for final review. User can approve (→ maintain), give feedback (→ sub-tasks → back to execute), or reject specific items. Also triggers when the user says "package the product", "I want to review what was built", "prepare deliverables", or "ship it". +allowed-tools: Read, Write, Bash +--- + +# Workflow Synthesize + +Package completed work, generate a synthesis report, and present to the user for final review. + +## Step 1: Check phase and task completion + +```bash +python3 -c " +from workflow_kit.runtime.state import load_state +from pathlib import Path +s = load_state(Path('.')) +print('phase:', s.phase, '| product_type:', s.product_type) +for bucket in ('pending', 'active', 'review'): + d = Path('workflow/tasks') / bucket + n = len(list(d.glob('*.json'))) if d.exists() else 0 + if n: print(f' still in {bucket}: {n} tasks') +" +``` + +If tasks still pending/active/review: "N tasks still running. Wait or stop with /workflow-kit:execute --stop." + +## Step 2: Generate synthesis report + +```bash +python -m workflow_kit synthesize +``` + +Writes `workflow/output/report.md` and prints the report. + +## Step 3: Show deliverable checklist + +Based on product_type: + +| product_type | Deliverables | +|---|---| +| webapp | Source code, Deployed URL / run instructions, User guide | +| library | Installable package, API docs, CHANGELOG | +| paper | Document (PDF/Markdown), Bibliography, Abstract | +| article | Formatted text, Assets, Publishing-ready file | +| api | OpenAPI spec, Endpoint URL, Postman collection | +| dataset | Data files, Data card, Methodology doc | + +Mark each ✓ (exists in workflow/output/ or project root) or □ (missing). + +## Step 4: Present to user + +``` +╔══════════════════════════════════════════════════════╗ +║ Product ready for your review ║ +╚══════════════════════════════════════════════════════╝ + + Type: + Tasks: N completed (N ✓ reviewer passed, N ✗ failed) + + Deliverables: + ✓/□ + ✓/□ + + Full report: workflow/output/report.md + + What would you like to do? + A) Approve → move to maintenance + B) Give feedback → create sub-tasks and loop back + C) Reject specific items → targeted rework only +``` + +## Step 5: Handle response + +**A — Approve:** +```python +from workflow_kit.runtime.state import load_state, save_state +from pathlib import Path +s = load_state(Path('.')) +s.transition_to("maintain") +save_state(s, Path('.')) +print("Phase: synthesize → maintain") +``` +Tell user: "Run /workflow-kit:maintain to set up ongoing maintenance jobs." + +**B — Feedback:** +Parse each piece of feedback into a task JSON in `workflow/tasks/pending/`. Detect task type from content (code issue → "implement", writing issue → "write", etc.). Then: +```python +s.transition_to("execute") +save_state(s, Path('.')) +print("Phase: synthesize → execute (feedback injected as sub-tasks)") +``` +Tell user: "Run /workflow-kit:execute to process feedback." + +**C — Specific rejection:** +Ask which deliverables to rework. Create targeted tasks for those only. Same execution loop as B. From 1a1bd06d4fcc25e55adb721c821a1d6228b46d73 Mon Sep 17 00:00:00 2001 From: Le Xuan Thang Date: Fri, 29 May 2026 09:57:01 +0100 Subject: [PATCH 3/3] fix: update author email to lexuanthang.official@gmail.com --- plugins/Le-Xuan-Thang/workflow-kit/.codex-plugin/plugin.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Le-Xuan-Thang/workflow-kit/.codex-plugin/plugin.json b/plugins/Le-Xuan-Thang/workflow-kit/.codex-plugin/plugin.json index e20fb499..5e32d96f 100644 --- a/plugins/Le-Xuan-Thang/workflow-kit/.codex-plugin/plugin.json +++ b/plugins/Le-Xuan-Thang/workflow-kit/.codex-plugin/plugin.json @@ -7,7 +7,7 @@ "keywords": ["multi-agent", "product-lifecycle", "workflow", "reviewer", "automation"], "author": { "name": "Le Xuan Thang", - "email": "lexuanthang.stock@gmail.com" + "email": "lexuanthang.official@gmail.com" }, "skills": "./skills/", "interface": {