Skip to content

Commit 288408a

Browse files
committed
chore: rename env var from WORKFLOWS to WORKFLOW for consistency
1 parent 6449f23 commit 288408a

17 files changed

Lines changed: 151 additions & 121 deletions

.opencode/commands/workflow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ When workflows are disabled, the plugin will not inject development instructions
1414
You can also set the initial state via environment variable:
1515

1616
```bash
17-
WORKFLOWS=off opencode
17+
WORKFLOW=off opencode
1818
```
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Development Plan: responsible-vibe (disable-plugin-env-var branch)
2+
3+
*Generated on 2026-04-02 by Vibe Feature MCP*
4+
*Workflow: [minor](https://mrsimpson.github.io/responsible-vibe-mcp/workflows/minor)*
5+
6+
## Goal
7+
*Define what you're building or fixing - this will be updated as requirements are gathered*
8+
## Key Decisions
9+
*Important decisions will be documented here as they are made*
10+
11+
## Notes
12+
*Additional context and observations*
13+
14+
## Explore
15+
### Tasks
16+
- [ ] *Tasks will be added as they are identified*
17+
18+
### Completed
19+
- [x] Created development plan file
20+
21+
## Implement
22+
### Tasks
23+
- [ ] *To be added when this phase becomes active*
24+
25+
### Completed
26+
*None yet*
27+
28+
## Finalize
29+
### Tasks
30+
- [ ] *To be added when this phase becomes active*
31+
32+
### Completed
33+
*None yet*
34+
35+
36+
37+
---
38+
*This plan is maintained by the LLM. Tool responses provide guidance on which section to focus on and what tasks to work on.*

packages/core/src/workflow-manager.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ export class WorkflowManager {
4949
}
5050

5151
/**
52-
* Parse enabled domains from environment variable
53-
* Supports both WORKFLOW_DOMAINS and VIBE_WORKFLOW_DOMAINS (legacy)
54-
* WORKFLOW_DOMAINS takes precedence if both are set (modern, non-prefixed version preferred)
52+
* Parse enabled domains from environment variable.
53+
* WORKFLOW_DOMAINS is the canonical name.
54+
* VIBE_WORKFLOW_DOMAINS is supported as a legacy alias for backward compatibility.
55+
* WORKFLOW_DOMAINS takes precedence when both are set.
5556
*/
5657
private parseEnabledDomains(): Set<string> {
57-
// Check both WORKFLOW_DOMAINS and VIBE_WORKFLOW_DOMAINS
58-
// WORKFLOW_DOMAINS (modern) takes precedence over VIBE_WORKFLOW_DOMAINS (legacy)
58+
// WORKFLOW_DOMAINS (canonical) takes precedence over VIBE_WORKFLOW_DOMAINS (legacy alias)
5959
const domainsEnv =
6060
process.env['WORKFLOW_DOMAINS'] || process.env['VIBE_WORKFLOW_DOMAINS'];
6161

@@ -74,7 +74,7 @@ export class WorkflowManager {
7474
logger.debug('Parsed enabled domains', {
7575
source: process.env['WORKFLOW_DOMAINS']
7676
? 'WORKFLOW_DOMAINS'
77-
: 'VIBE_WORKFLOW_DOMAINS',
77+
: 'VIBE_WORKFLOW_DOMAINS (legacy)',
7878
domains: Array.from(domains),
7979
});
8080

@@ -187,17 +187,17 @@ export class WorkflowManager {
187187
*/
188188
public getAllAvailableWorkflows(): WorkflowInfo[] {
189189
// Create a temporary manager with all domains enabled
190-
const originalEnv = process.env.VIBE_WORKFLOW_DOMAINS;
191-
process.env.VIBE_WORKFLOW_DOMAINS = 'code,architecture,office,sdd';
190+
const originalEnv = process.env['WORKFLOW_DOMAINS'];
191+
process.env['WORKFLOW_DOMAINS'] = 'code,architecture,office,sdd';
192192

193193
try {
194194
const tempManager = new WorkflowManager();
195195
return tempManager.getAvailableWorkflows();
196196
} finally {
197197
if (originalEnv !== undefined) {
198-
process.env.VIBE_WORKFLOW_DOMAINS = originalEnv;
198+
process.env['WORKFLOW_DOMAINS'] = originalEnv;
199199
} else {
200-
delete process.env.VIBE_WORKFLOW_DOMAINS;
200+
delete process.env['WORKFLOW_DOMAINS'];
201201
}
202202
}
203203
}
@@ -323,7 +323,7 @@ export class WorkflowManager {
323323
this.getAvailableWorkflowsForProject(projectPath);
324324
if (availableWorkflows.length === 0) {
325325
throw new Error(
326-
'No workflows available. Please install a workflow or adjust VIBE_WORKFLOW_DOMAINS environment variable.'
326+
'No workflows available. Please install a workflow or adjust WORKFLOW_DOMAINS environment variable.'
327327
);
328328
}
329329
workflowName = availableWorkflows[0].name;

packages/core/test/unit/custom-workflow-loading.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,24 @@ describe('Custom Workflow Loading', () => {
99
let originalEnv: string | undefined;
1010

1111
beforeEach(() => {
12-
originalEnv = process.env.VIBE_WORKFLOW_DOMAINS;
12+
originalEnv = process.env.WORKFLOW_DOMAINS;
1313
testProjectPath = fs.mkdtempSync(
1414
path.join(tmpdir(), 'custom-workflow-test-')
1515
);
1616
});
1717

1818
afterEach(() => {
1919
if (originalEnv !== undefined) {
20-
process.env.VIBE_WORKFLOW_DOMAINS = originalEnv;
20+
process.env.WORKFLOW_DOMAINS = originalEnv;
2121
} else {
22-
delete process.env.VIBE_WORKFLOW_DOMAINS;
22+
delete process.env.WORKFLOW_DOMAINS;
2323
}
2424

2525
fs.rmSync(testProjectPath, { recursive: true, force: true });
2626
});
2727

2828
it('should load custom workflow from .vibe/workflows directory', () => {
29-
process.env.VIBE_WORKFLOW_DOMAINS = 'code';
29+
process.env.WORKFLOW_DOMAINS = 'code';
3030

3131
const workflowsDir = path.join(testProjectPath, '.vibe', 'workflows');
3232
fs.mkdirSync(workflowsDir, { recursive: true });
@@ -73,7 +73,7 @@ describe('Custom Workflow Loading', () => {
7373
});
7474

7575
it('should load multiple custom workflows', () => {
76-
process.env.VIBE_WORKFLOW_DOMAINS = 'code';
76+
process.env.WORKFLOW_DOMAINS = 'code';
7777

7878
const workflowsDir = path.join(testProjectPath, '.vibe', 'workflows');
7979
fs.mkdirSync(workflowsDir, { recursive: true });
@@ -133,7 +133,7 @@ describe('Custom Workflow Loading', () => {
133133
});
134134

135135
it('should ignore domain filtering for custom workflows', () => {
136-
process.env.VIBE_WORKFLOW_DOMAINS = 'code'; // Only code domain
136+
process.env.WORKFLOW_DOMAINS = 'code'; // Only code domain
137137

138138
const workflowsDir = path.join(testProjectPath, '.vibe', 'workflows');
139139
fs.mkdirSync(workflowsDir, { recursive: true });

packages/core/test/unit/workflow-domain-filtering.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ describe('Workflow Domain Filtering', () => {
55
let originalEnv: string | undefined;
66

77
beforeEach(() => {
8-
originalEnv = process.env.VIBE_WORKFLOW_DOMAINS;
8+
originalEnv = process.env.WORKFLOW_DOMAINS;
99
});
1010

1111
afterEach(() => {
1212
if (originalEnv !== undefined) {
13-
process.env.VIBE_WORKFLOW_DOMAINS = originalEnv;
13+
process.env.WORKFLOW_DOMAINS = originalEnv;
1414
} else {
15-
delete process.env.VIBE_WORKFLOW_DOMAINS;
15+
delete process.env.WORKFLOW_DOMAINS;
1616
}
1717
});
1818

1919
it('should load only code workflows when no domain filter is set', () => {
20-
delete process.env.VIBE_WORKFLOW_DOMAINS;
20+
delete process.env.WORKFLOW_DOMAINS;
2121

2222
const manager = new WorkflowManager();
2323
const workflows = manager.getAvailableWorkflows();
@@ -34,8 +34,8 @@ describe('Workflow Domain Filtering', () => {
3434
expect(nonCodeWorkflows.length).toBe(0);
3535
});
3636

37-
it('should filter workflows by domain when VIBE_WORKFLOW_DOMAINS is set', () => {
38-
process.env.VIBE_WORKFLOW_DOMAINS = 'code';
37+
it('should filter workflows by domain when WORKFLOW_DOMAINS is set', () => {
38+
process.env.WORKFLOW_DOMAINS = 'code';
3939

4040
const manager = new WorkflowManager();
4141
const workflows = manager.getAvailableWorkflows();
@@ -51,7 +51,7 @@ describe('Workflow Domain Filtering', () => {
5151
});
5252

5353
it('should support multiple domains', () => {
54-
process.env.VIBE_WORKFLOW_DOMAINS = 'code,office';
54+
process.env.WORKFLOW_DOMAINS = 'code,office';
5555

5656
const manager = new WorkflowManager();
5757
const workflows = manager.getAvailableWorkflows();
@@ -64,7 +64,7 @@ describe('Workflow Domain Filtering', () => {
6464
});
6565

6666
it('should handle invalid domains gracefully', () => {
67-
process.env.VIBE_WORKFLOW_DOMAINS = 'code,invalid,office';
67+
process.env.WORKFLOW_DOMAINS = 'code,invalid,office';
6868

6969
const manager = new WorkflowManager();
7070
const workflows = manager.getAvailableWorkflows();

packages/core/test/unit/workflow-domains-precedence.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describe, it, expect, afterEach } from 'vitest';
22
import { WorkflowManager } from '../../src/workflow-manager.js';
33

4-
describe('WORKFLOW_DOMAINS precedence', () => {
4+
describe('WORKFLOW_DOMAINS precedence (backward compat)', () => {
55
const originalVibe = process.env.VIBE_WORKFLOW_DOMAINS;
66
const originalWorkflow = process.env.WORKFLOW_DOMAINS;
77

@@ -13,7 +13,7 @@ describe('WORKFLOW_DOMAINS precedence', () => {
1313
else delete process.env.WORKFLOW_DOMAINS;
1414
});
1515

16-
it('should prefer WORKFLOW_DOMAINS over VIBE_WORKFLOW_DOMAINS', () => {
16+
it('should prefer WORKFLOW_DOMAINS over legacy VIBE_WORKFLOW_DOMAINS when both are set', () => {
1717
delete process.env['VIBE_WORKFLOW_DOMAINS'];
1818
delete process.env['WORKFLOW_DOMAINS'];
1919

@@ -40,10 +40,11 @@ describe('WORKFLOW_DOMAINS precedence', () => {
4040
expect(hasArchitecture).toBe(true);
4141
});
4242

43-
it('should use VIBE_WORKFLOW_DOMAINS when WORKFLOW_DOMAINS is not set', () => {
43+
it('should fall back to legacy VIBE_WORKFLOW_DOMAINS when WORKFLOW_DOMAINS is not set', () => {
4444
delete process.env['VIBE_WORKFLOW_DOMAINS'];
4545
delete process.env['WORKFLOW_DOMAINS'];
4646

47+
// Simulate a user who still has the old VIBE_WORKFLOW_DOMAINS set
4748
process.env['VIBE_WORKFLOW_DOMAINS'] = 'code';
4849

4950
const manager = new WorkflowManager();

packages/core/test/unit/workflow-override-by-name.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,24 @@ describe('Workflow Override by Name', () => {
99
let originalEnv: string | undefined;
1010

1111
beforeEach(() => {
12-
originalEnv = process.env.VIBE_WORKFLOW_DOMAINS;
12+
originalEnv = process.env.WORKFLOW_DOMAINS;
1313
testProjectPath = fs.mkdtempSync(
1414
path.join(tmpdir(), 'workflow-override-test-')
1515
);
1616
});
1717

1818
afterEach(() => {
1919
if (originalEnv !== undefined) {
20-
process.env.VIBE_WORKFLOW_DOMAINS = originalEnv;
20+
process.env.WORKFLOW_DOMAINS = originalEnv;
2121
} else {
22-
delete process.env.VIBE_WORKFLOW_DOMAINS;
22+
delete process.env.WORKFLOW_DOMAINS;
2323
}
2424

2525
fs.rmSync(testProjectPath, { recursive: true, force: true });
2626
});
2727

2828
it('should override predefined workflow by YAML name, not filename', () => {
29-
process.env.VIBE_WORKFLOW_DOMAINS = 'code';
29+
process.env.WORKFLOW_DOMAINS = 'code';
3030

3131
const workflowsDir = path.join(testProjectPath, '.vibe', 'workflows');
3232
fs.mkdirSync(workflowsDir, { recursive: true });
@@ -67,7 +67,7 @@ describe('Workflow Override by Name', () => {
6767
});
6868

6969
it('should use YAML name as workflow key, not filename', () => {
70-
process.env.VIBE_WORKFLOW_DOMAINS = 'code';
70+
process.env.WORKFLOW_DOMAINS = 'code';
7171

7272
const workflowsDir = path.join(testProjectPath, '.vibe', 'workflows');
7373
fs.mkdirSync(workflowsDir, { recursive: true });

packages/core/test/unit/workflow-validation.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ describe('Workflow Validation', () => {
4040

4141
it('should load ALL workflow files from resources directory', () => {
4242
// Temporarily disable domain filtering for this test
43-
const originalEnv = process.env.VIBE_WORKFLOW_DOMAINS;
44-
process.env.VIBE_WORKFLOW_DOMAINS =
43+
const originalEnv = process.env.WORKFLOW_DOMAINS;
44+
process.env.WORKFLOW_DOMAINS =
4545
'code,architecture,office,sdd,sdd-crowd,children,skilled';
4646

4747
try {
@@ -63,9 +63,9 @@ describe('Workflow Validation', () => {
6363
}
6464
} finally {
6565
if (originalEnv !== undefined) {
66-
process.env.VIBE_WORKFLOW_DOMAINS = originalEnv;
66+
process.env.WORKFLOW_DOMAINS = originalEnv;
6767
} else {
68-
delete process.env.VIBE_WORKFLOW_DOMAINS;
68+
delete process.env.WORKFLOW_DOMAINS;
6969
}
7070
}
7171
});

packages/docs/user/crowd-mcp-integration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This creates three agent configurations in `.crowd/agents/`:
2323
Each agent is pre-configured with:
2424

2525
- `VIBE_ROLE` environment variable (business-analyst, architect, or developer)
26-
- `VIBE_WORKFLOW_DOMAINS=sdd-crowd` to access collaborative workflows
26+
- `WORKFLOW_DOMAINS=sdd-crowd` to access collaborative workflows
2727
- System prompts explaining team collaboration
2828
- MCP server connection to workflows server
2929

@@ -248,7 +248,7 @@ mcpServers:
248248
args: [@codemcp/workflows-server@latest]
249249
env:
250250
VIBE_ROLE: business-analyst
251-
VIBE_WORKFLOW_DOMAINS: sdd-crowd
251+
WORKFLOW_DOMAINS: sdd-crowd
252252
```
253253
254254
## Workflow Features
@@ -444,7 +444,7 @@ When transitioning phases:
444444
- **VIBE_ROLE**: Agent's role (business-analyst, architect, developer)
445445
- Required for collaborative workflows
446446
- Optional for single-agent workflows
447-
- **VIBE_WORKFLOW_DOMAINS**: Filter workflows by domain
447+
- **WORKFLOW_DOMAINS**: Filter workflows by domain
448448
- Set to `sdd-crowd` for collaborative workflows
449449
- Can combine: `sdd-crowd,sdd` for both
450450

packages/docs/user/custom-workflows.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Workflows are organized by domains to keep things manageable:
2828
**Control which domains are loaded:**
2929

3030
```bash
31-
export VIBE_WORKFLOW_DOMAINS="code,architecture"
31+
export WORKFLOW_DOMAINS="code,architecture"
3232
# Only loads workflows from code and architecture domains
3333
```
3434

@@ -153,13 +153,13 @@ The copied workflow will have:
153153

154154
```bash
155155
# Default: only 'code' domain workflows
156-
VIBE_WORKFLOW_DOMAINS="code"
156+
WORKFLOW_DOMAINS="code"
157157

158158
# Multiple domains
159-
VIBE_WORKFLOW_DOMAINS="code,architecture,office"
159+
WORKFLOW_DOMAINS="code,architecture,office"
160160

161161
# All domains
162-
VIBE_WORKFLOW_DOMAINS="code,architecture,office"
162+
WORKFLOW_DOMAINS="code,architecture,office"
163163
```
164164

165165
## Project-Specific Configuration

0 commit comments

Comments
 (0)