Prompt file imported from theplant/speckit-extension (
.windsurf/workflows/theplant.workflow-improvement.md). Fill in{{arguments}}before use. Copyright stays with the author.
User Input
{{arguments}}
You MUST consider the user input before proceeding (if not empty).
Goal
Analyze conversation issues and update workflows with generalized learnings.
How to Execute This Workflow
⚠️ MANDATORY: AI MUST run the workflow-runner command below and follow its output.
DO NOT read the Steps section below and execute them manually. The runner handles:
- Step sequencing and state tracking
- Nested workflow execution
- AI task delegation with proper context
deno run -A https://raw.githubusercontent.com/theplant/workflow-runner/HEAD/run.ts theplant.workflow-improvement
Run this command, then follow the runner's instructions. The runner will tell you what to do next.
Steps
Step 1: Rules and Issue Identification
IMPORTANT: Read and follow ALL rules in this step before proceeding.
Critical Rules for Workflow Updates
-
ALL rules MUST be in Step 1 - When creating or updating workflows, put all critical rules at the beginning of Step 1. Text before the Steps section is NOT read when workflows are nested-executed.
-
Use generic names - Use
MyEntity,myFieldNOT project-specific names likeUser,Task. -
Use conventional paths - Use
src/mocks/handlers.tsNOT absolute paths like/Users/john/projects/.... -
Focus on principles - Document the underlying principle, not the specific instance.
-
Include problem AND solution - Always show both the problem pattern and the solution.
-
Avoid duplication - Check existing workflows before adding new content.
Issue Identification
Why: Systematic issue identification ensures no learnings are lost. Each issue becomes a potential workflow improvement.
Analyze the current conversation and document:
## Issues Identified
### Issue 1: [Brief description]
- **What happened**: [Description]
- **Root cause**: [Why it happened]
- **Solution applied**: [How it was fixed]
- **Generalized learning**: [What to document]
- **Target workflow**: [Which theplant.*.md to update]
### Issue 2: ...
Why: Categorization ensures learnings go to the right workflow file, avoiding duplication and keeping workflows focused.
| Issue Type | Target Workflow |
|---|---|
| API/Type mismatches, Orval hooks | theplant.openapi-first.md |
| Selector strategies, test patterns | theplant.e2e-testing.md |
| Handler patterns, data persistence | theplant.msw-mock-backend.md |
| Investigation strategies, debugging | theplant.root-cause-tracing.md |
| Data flow tracing | theplant.system-exploration.md |
| Test data patterns | theplant.test-data-seeding.md |
Step 2: Read Target Workflow Files
Why: Reading existing content prevents duplication and helps identify the right section for new learnings.
# Read the workflow file to update
cat .windsurf/workflows/theplant.[target].md
Check:
- Current content structure
- Appropriate section to add learning
- Whether similar guidance already exists (avoid duplication)
Step 3: Apply Updates to Workflow Files
Why: Applying updates immediately captures learnings while context is fresh.
Edit the target workflow files with the generalized learnings.
If Needed, Create New Workflow
If learning represents a new discipline, create theplant.[discipline-name].md:
---
description: [One-line description]
---
## User Input
```text
{{arguments}}
You MUST consider the user input before proceeding (if not empty).
Goal
[What this workflow achieves]
Steps
Step 1: [First deterministic file change]
[Specific file to create/modify with exact content]
Step 2: [Next file change]
...
Step N: [Verification]
[How to verify the workflow worked]
**New Workflow Criteria:**
- Doesn't fit naturally into existing workflows
- Addresses recurring pattern across projects
- Has enough depth for its own file
- Follows naming: `theplant.[discipline-name].md`
