بنقرة واحدة
extending-workflows
Create and extend workflow definitions using the workflow system architecture
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Create and extend workflow definitions using the workflow system architecture
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
LLM Agent Skill for AnySystem Design React component library
Check and configure feature flag infrastructure (OpenFeature + providers)
Check and configure UX testing infrastructure (Playwright, accessibility, visual regression)
Generate comprehensive technical stack documentation from codebase analysis
Systematic debugging workflow with parallel agent exploration, root cause analysis, and fix verification. Adapted from feature-dev methodology for bug investigation.
Command: docs-plugin
| agents | ["none"] |
| category | chain |
| description | Create and extend workflow definitions using the workflow system architecture |
| knowledge | ["none"] |
| name | extending-workflows |
| related_skills | ["none"] |
| templates | ["none"] |
| tools | ["none"] |
| type | skill |
| version | 1.0.0 |
Create and extend workflow definitions using the workflow system architecture
Create, extend, and manage workflow definitions using the Factory's workflow system architecture:
| Artifact | Path | Purpose |
|---|---|---|
| Workflow Template | {directories.templates}/workflows/workflow.md.tmpl | Markdown structure for workflows |
| Workflow Schema | {directories.knowledge}/schemas/workflow-schema.json | Validation rules |
| Workflow Entities | {directories.knowledge}/workflow-entities.json | Entity definitions |
| Workflow Patterns | {directories.knowledge}/workflow-patterns.json | Common patterns |
| MCP Catalog | {directories.knowledge}/mcp-servers-catalog.json | Available tools |
| Skill Catalog | {directories.knowledge}/skill-catalog.json | Available skills |
Workflows follow the entity model defined in {directories.knowledge}/workflow-entities.json:
Workflow
├── Phases (ordered groups of steps)
│ ├── Steps (atomic operations)
│ │ ├── Skills (reusable capabilities)
│ │ ├── MCP Servers (external tools)
│ │ └── Knowledge (reference data)
│ └── Decision Points (branching logic)
├── State Machine (lifecycle management)
├── Learning Hooks (continuous improvement)
└── Outputs (artifacts produced)
| State | Description |
|---|---|
draft | Being designed, not executable |
active | Ready for execution |
executing | Currently running |
paused | Awaiting input or resources |
completed | Successfully finished |
failed | Terminated with errors |
learning | Post-execution analysis |
Use when: Creating workflow from known patterns
Steps:
{directories.knowledge}/workflow-patterns.jsonUse when: Creating workflow for new domain
Tools: web_search, read_file
Step 1: web_search("{{domain}} workflow best practices 2026")
Step 2: web_search("{{domain}} automation patterns")
Step 3: Synthesize into workflow structure
Use when: Enhancing an existing workflow
Tools: read_file, search_replace
Step 1: read_file("{directories.workflows}/{{existing-workflow}}.md")
Step 2: Identify extension points
Step 3: Add new phases/steps
Step 4: Update MCP tools and skills
Trigger: "Create workflow for {{purpose}}", "Add workflow that {{does_what}}"
Steps:
Understand Requirements
→ What problem does the workflow solve?
→ What are the inputs and outputs?
→ What tools and skills are needed?
→ What are the success criteria?
Check Existing Patterns
read_file("{directories.knowledge}/workflow-patterns.json")
→ Find similar patterns to use as base
Read Workflow Schema
read_file("{directories.knowledge}/schemas/workflow-schema.json")
→ Understand required structure
Read Entity Definitions
read_file("{directories.knowledge}/workflow-entities.json")
→ Understand entity relationships
Identify Required MCP Servers
read_file("{directories.knowledge}/mcp-servers-catalog.json")
→ Select tools needed for workflow steps
Identify Required Skills
read_file("{directories.knowledge}/skill-catalog.json")
→ Select skills for each step
Design Workflow Structure
Read Template
read_file("{directories.templates}/workflows/workflow.md.tmpl")
→ Get markdown structure
Generate Workflow
write("{directories.workflows}/{{workflow-name}}.md", content)
Validate Structure
Output: {directories.workflows}/{workflow-name}.md
Trigger: "Create {{pattern_type}} workflow for my project"
Steps:
Load Pattern
read_file("{directories.knowledge}/workflow-patterns.json")
→ Extract pattern: bugfix, feature, code-review, etc.
Customize for Project
Generate Workflow
write("{directories.workflows}/{{workflow-name}}.md", content)
Output: {directories.workflows}/{workflow-name}.md (customized from pattern)
Trigger: "Add {{capability}} to {{workflow_name}}", "Extend workflow with {{feature}}"
Steps:
Read Existing Workflow
read_file("{directories.workflows}/{{workflow-name}}.md")
→ Understand current structure
Identify Extension Points
Design Extension
Apply Extension
search_replace("{directories.workflows}/{{workflow-name}}.md", ...)
Validate Extended Workflow
Output: Updated {directories.workflows}/{workflow-name}.md
Trigger: "Create workflow for {{agent_name}} agent"
Steps:
Understand Agent Purpose
read_file("{directories.agents}/{{agent-name}}.md")
→ Extract responsibilities and skills
Map Agent Skills to Workflow Steps
Design Workflow
Generate Workflow
write("{directories.workflows}/{{agent-name}}-workflow.md", content)
Output: {directories.workflows}/{agent-name}-workflow.md
# {{Workflow Name}}
## Overview
{{Brief description of what this workflow accomplishes}}
**Project:** {{PROJECT_NAME}}
**Version:** {{VERSION}}
**Created:** {{DATE}}
## Trigger Conditions
{{When this workflow is activated}}
## Phases
### Phase 1: {{Phase Name}}
**Description:** {{What this phase accomplishes}}
**Entry Criteria:** {{When to enter this phase}}
**Exit Criteria:** {{When phase is complete}}
#### Step 1.1: {{Step Name}}
**Description:** {{What this step does}}
**Actions:**
- {{action 1}}
- {{action 2}}
**MCP Tools:**
- `{{server}}-{{tool}}`: {{purpose}}
**Skills:**
- `{{skill-name}}`: {{purpose}}
**Knowledge:**
- `{{knowledge-file}}`: {{purpose}}
**Outputs:**
- {{output 1}}
- {{output 2}}
**Is Mandatory:** Yes/No
---
## Decision Points
### Decision: {{Decision Name}}
**Condition:** {{What triggers this decision}}
**Options:**
| Condition | Next Phase | Rationale |
|-----------|------------|-----------|
| {{condition}} | {{phase}} | {{why}} |
---
## Escalation Paths
| Trigger | Action | Escalate To |
|---------|--------|-------------|
| {{trigger}} | {{action}} | {{target}} |
---
## Learning Hooks
| Hook Point | Capture | Use For |
|------------|---------|---------|
| {{when}} | {{what data}} | {{improvement}} |
---
## Output Artifacts
| Artifact | Location | Purpose |
|----------|----------|---------|
| {{name}} | {{path}} | {{purpose}} |
---
## Fallback Procedures
| Condition | Action |
|-----------|--------|
| {{issue}} | {{resolution}} |
---
## Related Artifacts
- **Agent**: {{agent if any}}
- **Skills**: {{list of skills}}
- **Knowledge**: {{list of knowledge files}}
User: Create a workflow for debugging pipeline failures
Agent: I'll create a comprehensive debugging workflow.
[read_file("{directories.knowledge}/workflow-patterns.json")] → Check existing patterns
[read_file("{directories.knowledge}/mcp-servers-catalog.json")] → Available tools
[read_file("{directories.knowledge}/skill-catalog.json")] → Available skills
[Designs workflow structure]
[write("{directories.workflows}/operations/debug-pipeline.md", ...)]
Created: {directories.workflows}/operations/debug-pipeline.md
Phases:
1. Error Detection - Parse logs, identify failure
2. Root Cause Analysis - Trace error origins
3. Resolution Strategy - Plan fix approach
4. Implementation - Apply fixes
5. Verification - Confirm resolution
6. Learning - Capture lessons learned
MCP Tools: github, sentry (if available)
Skills: pipeline-error-fix, tdd
Would you like me to create an agent to execute this workflow?
User: Add learning hooks to the TDD workflow
Agent: I'll extend the TDD workflow with learning capabilities.
[read_file("{directories.workflows}/tdd-workflow.md")]
[read_file("{directories.knowledge}/workflow-entities.json")] → Learning hook structure
[Designs learning extensions]
[search_replace("{directories.workflows}/tdd-workflow.md", ...)]
Updated: {directories.workflows}/tdd-workflow.md
Added Learning Hooks:
- After Phase 5 (Refactor): Capture refactoring patterns
- After Phase 7 (Integration): Capture test effectiveness metrics
- On failure: Capture failure patterns for future prevention
Would you like me to create a knowledge file to store learned patterns?
User: Create a bugfix workflow for my SAP project
Agent: I'll create a bugfix workflow customized for SAP.
[read_file("{directories.knowledge}/workflow-patterns.json")] → bugfix pattern
[read_file("{directories.knowledge}/sap-grounding-patterns.json")] → SAP-specific
[Customizes pattern for SAP]
[write("{directories.workflows}/sap-bugfix-workflow.md", ...)]
Created: {directories.workflows}/sap-bugfix-workflow.md
Customizations for SAP:
- Phase 1 uses SAP documentation MCP
- Grounding phase checks SAP data models
- Implementation follows RAP/ABAP patterns
- Testing uses SAP Unit framework
Tools: atlassian, SAP-documentation
Skills: grounding, bugfix-workflow, sap-development
| Extension Type | Output Location | Format |
|---|---|---|
| Workflow | {directories.workflows}/{name}.md | Markdown |
| Agent Workflow | {directories.workflows}/{agent}-workflow.md | Markdown |
| Pattern-Based | {directories.workflows}/{pattern}-{project}.md | Markdown |
After creating or extending ANY workflow:
If workflow adds new knowledge:
read_file("{directories.knowledge}/manifest.json")
→ Update if new knowledge file created
read_file("{directories.docs}/reference/WORKFLOW_PATTERNS.md")
→ Add new workflow to catalog if reusable pattern
read_file("CHANGELOG.md")
→ Add entry for new/extended workflow
ALWAYS ask before git operations:
⚠️ Ready to commit workflow changes:
Created/Modified: [list files]
Proposed commit: feat(workflow): {{description}}
Proceed? (yes/no/commit only)
| Issue | Resolution |
|---|---|
| Unknown MCP tool | Check catalog, suggest alternatives |
| Unknown skill | Check catalog, offer to create skill |
| Circular phases | Restructure workflow |
| Missing outputs | Add output definitions |
| No trigger conditions | Add activation triggers |
When onboarding a project:
.cursor/ structureWhen generating a project:
{directories.workflows}/ directory{directories.agents}/workflow-architect.md{directories.templates}/workflows/*.tmpl{directories.knowledge}/schemas/workflow-schema.json{directories.knowledge}/workflow-entities.json{directories.knowledge}/workflow-patterns.json{directories.docs}/WORKFLOW_AUTHORING.mdThis skill should be used when strict adherence to the defined process is required.