-
Notifications
You must be signed in to change notification settings - Fork 121
feat: add workflow-kit — full product lifecycle plugin (v0.3.0) #161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Le-Xuan-Thang
wants to merge
3
commits into
hashgraph-online:main
Choose a base branch
from
Le-Xuan-Thang:add/workflow-kit
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
plugins/Le-Xuan-Thang/workflow-kit/.codex-plugin/plugin.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| { | ||
| "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.official@gmail.com" | ||
| }, | ||
| "skills": "./skills/", | ||
| "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" | ||
| } | ||
| } | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
101 changes: 101 additions & 0 deletions
101
plugins/Le-Xuan-Thang/workflow-kit/skills/execute/SKILL.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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: <from workflow.yaml> | ||
|
|
||
| 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 <id> failed review N times | ||
| Reviewer (<domain>): <feedback summary> | ||
|
|
||
| A) Skip this task | ||
| B) Retry with your guidance (describe what to fix) | ||
| C) Redesign the task entirely | ||
| ``` | ||
|
|
||
| Respond inline — dispatcher waits before continuing. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WARNING: Missing required "skills" field in plugin.json
According to the plugin documentation, plugin.json must include a "skills" path pointing to the skills directory. Add a "skills" field (e.g., "./skills/") even if the directory is empty.