wogiflow 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.workflow/agents/reviewer.md +81 -0
- package/.workflow/agents/security.md +94 -0
- package/.workflow/agents/story-writer.md +58 -0
- package/.workflow/bridges/base-bridge.js +395 -0
- package/.workflow/bridges/claude-bridge.js +434 -0
- package/.workflow/bridges/index.js +130 -0
- package/.workflow/lib/assumption-detector.js +481 -0
- package/.workflow/lib/config-substitution.js +371 -0
- package/.workflow/lib/failure-categories.js +478 -0
- package/.workflow/state/app-map.md.template +15 -0
- package/.workflow/state/architecture.md.template +24 -0
- package/.workflow/state/component-index.json.template +5 -0
- package/.workflow/state/decisions.md.template +15 -0
- package/.workflow/state/feedback-patterns.md.template +9 -0
- package/.workflow/state/knowledge-sync.json.template +6 -0
- package/.workflow/state/progress.md.template +14 -0
- package/.workflow/state/ready.json.template +7 -0
- package/.workflow/state/request-log.md.template +14 -0
- package/.workflow/state/session-state.json.template +11 -0
- package/.workflow/state/stack.md.template +33 -0
- package/.workflow/state/testing.md.template +36 -0
- package/.workflow/templates/claude-md.hbs +257 -0
- package/.workflow/templates/correction-report.md +67 -0
- package/.workflow/templates/gemini-md.hbs +52 -0
- package/README.md +1802 -0
- package/bin/flow +205 -0
- package/lib/index.js +33 -0
- package/lib/installer.js +467 -0
- package/lib/release-channel.js +269 -0
- package/lib/skill-registry.js +526 -0
- package/lib/upgrader.js +401 -0
- package/lib/utils.js +305 -0
- package/package.json +64 -0
- package/scripts/flow +985 -0
- package/scripts/flow-adaptive-learning.js +1259 -0
- package/scripts/flow-aggregate.js +488 -0
- package/scripts/flow-archive +133 -0
- package/scripts/flow-auto-context.js +1015 -0
- package/scripts/flow-auto-learn.js +615 -0
- package/scripts/flow-bridge.js +223 -0
- package/scripts/flow-browser-suggest.js +316 -0
- package/scripts/flow-bug.js +247 -0
- package/scripts/flow-cascade.js +711 -0
- package/scripts/flow-changelog +85 -0
- package/scripts/flow-checkpoint.js +483 -0
- package/scripts/flow-cli.js +403 -0
- package/scripts/flow-code-intelligence.js +760 -0
- package/scripts/flow-complexity.js +502 -0
- package/scripts/flow-config-set.js +152 -0
- package/scripts/flow-constants.js +157 -0
- package/scripts/flow-context +152 -0
- package/scripts/flow-context-init.js +482 -0
- package/scripts/flow-context-monitor.js +384 -0
- package/scripts/flow-context-scoring.js +886 -0
- package/scripts/flow-correct.js +458 -0
- package/scripts/flow-damage-control.js +985 -0
- package/scripts/flow-deps +101 -0
- package/scripts/flow-diff.js +700 -0
- package/scripts/flow-done +151 -0
- package/scripts/flow-done.js +489 -0
- package/scripts/flow-durable-session.js +1541 -0
- package/scripts/flow-entropy-monitor.js +345 -0
- package/scripts/flow-export-profile +349 -0
- package/scripts/flow-export-scanner.js +1046 -0
- package/scripts/flow-figma-confirm.js +400 -0
- package/scripts/flow-figma-extract.js +496 -0
- package/scripts/flow-figma-generate.js +683 -0
- package/scripts/flow-figma-index.js +909 -0
- package/scripts/flow-figma-match.js +617 -0
- package/scripts/flow-figma-mcp-server.js +518 -0
- package/scripts/flow-figma-pipeline.js +414 -0
- package/scripts/flow-file-ops.js +301 -0
- package/scripts/flow-gate-confidence.js +825 -0
- package/scripts/flow-guided-edit.js +659 -0
- package/scripts/flow-health +185 -0
- package/scripts/flow-health.js +413 -0
- package/scripts/flow-hooks.js +556 -0
- package/scripts/flow-http-client.js +249 -0
- package/scripts/flow-hybrid-detect.js +167 -0
- package/scripts/flow-hybrid-interactive.js +591 -0
- package/scripts/flow-hybrid-test.js +152 -0
- package/scripts/flow-import-profile +439 -0
- package/scripts/flow-init +253 -0
- package/scripts/flow-instruction-richness.js +827 -0
- package/scripts/flow-jira-integration.js +579 -0
- package/scripts/flow-knowledge-router.js +522 -0
- package/scripts/flow-knowledge-sync.js +589 -0
- package/scripts/flow-linear-integration.js +631 -0
- package/scripts/flow-links.js +774 -0
- package/scripts/flow-log-manager.js +559 -0
- package/scripts/flow-loop-enforcer.js +1246 -0
- package/scripts/flow-loop-retry-learning.js +630 -0
- package/scripts/flow-lsp.js +923 -0
- package/scripts/flow-map-index +348 -0
- package/scripts/flow-map-sync +201 -0
- package/scripts/flow-memory-blocks.js +668 -0
- package/scripts/flow-memory-compactor.js +350 -0
- package/scripts/flow-memory-db.js +1110 -0
- package/scripts/flow-memory-sync.js +484 -0
- package/scripts/flow-metrics.js +353 -0
- package/scripts/flow-migrate-ids.js +370 -0
- package/scripts/flow-model-adapter.js +802 -0
- package/scripts/flow-model-router.js +884 -0
- package/scripts/flow-models.js +1231 -0
- package/scripts/flow-morning.js +517 -0
- package/scripts/flow-multi-approach.js +660 -0
- package/scripts/flow-new-feature +86 -0
- package/scripts/flow-onboard +1042 -0
- package/scripts/flow-orchestrate-llm.js +459 -0
- package/scripts/flow-orchestrate.js +3592 -0
- package/scripts/flow-output.js +123 -0
- package/scripts/flow-parallel-detector.js +399 -0
- package/scripts/flow-parallel-dispatch.js +987 -0
- package/scripts/flow-parallel.js +428 -0
- package/scripts/flow-pattern-enforcer.js +600 -0
- package/scripts/flow-prd-manager.js +282 -0
- package/scripts/flow-progress.js +323 -0
- package/scripts/flow-project-analyzer.js +975 -0
- package/scripts/flow-prompt-composer.js +487 -0
- package/scripts/flow-providers.js +1381 -0
- package/scripts/flow-queue.js +308 -0
- package/scripts/flow-ready +82 -0
- package/scripts/flow-ready.js +189 -0
- package/scripts/flow-regression.js +396 -0
- package/scripts/flow-response-parser.js +450 -0
- package/scripts/flow-resume.js +284 -0
- package/scripts/flow-rules-sync.js +439 -0
- package/scripts/flow-run-trace.js +718 -0
- package/scripts/flow-safety.js +587 -0
- package/scripts/flow-search +104 -0
- package/scripts/flow-security.js +481 -0
- package/scripts/flow-session-end +106 -0
- package/scripts/flow-session-end.js +437 -0
- package/scripts/flow-session-state.js +671 -0
- package/scripts/flow-setup-hooks +216 -0
- package/scripts/flow-setup-hooks.js +377 -0
- package/scripts/flow-skill-create.js +329 -0
- package/scripts/flow-skill-creator.js +572 -0
- package/scripts/flow-skill-generator.js +1046 -0
- package/scripts/flow-skill-learn.js +880 -0
- package/scripts/flow-skill-matcher.js +578 -0
- package/scripts/flow-spec-generator.js +820 -0
- package/scripts/flow-stack-wizard.js +895 -0
- package/scripts/flow-standup +162 -0
- package/scripts/flow-start +74 -0
- package/scripts/flow-start.js +235 -0
- package/scripts/flow-status +110 -0
- package/scripts/flow-status.js +301 -0
- package/scripts/flow-step-browser.js +83 -0
- package/scripts/flow-step-changelog.js +217 -0
- package/scripts/flow-step-comments.js +306 -0
- package/scripts/flow-step-complexity.js +234 -0
- package/scripts/flow-step-coverage.js +218 -0
- package/scripts/flow-step-knowledge.js +193 -0
- package/scripts/flow-step-pr-tests.js +364 -0
- package/scripts/flow-step-regression.js +89 -0
- package/scripts/flow-step-review.js +516 -0
- package/scripts/flow-step-security.js +162 -0
- package/scripts/flow-step-silent-failures.js +290 -0
- package/scripts/flow-step-simplifier.js +346 -0
- package/scripts/flow-story +105 -0
- package/scripts/flow-story.js +500 -0
- package/scripts/flow-suspend.js +252 -0
- package/scripts/flow-sync-daemon.js +654 -0
- package/scripts/flow-task-analyzer.js +606 -0
- package/scripts/flow-team-dashboard.js +748 -0
- package/scripts/flow-team-sync.js +752 -0
- package/scripts/flow-team.js +977 -0
- package/scripts/flow-tech-options.js +528 -0
- package/scripts/flow-templates.js +812 -0
- package/scripts/flow-tiered-learning.js +728 -0
- package/scripts/flow-trace +204 -0
- package/scripts/flow-transcript-chunking.js +1106 -0
- package/scripts/flow-transcript-digest.js +7918 -0
- package/scripts/flow-transcript-language.js +465 -0
- package/scripts/flow-transcript-parsing.js +1085 -0
- package/scripts/flow-transcript-stories.js +2194 -0
- package/scripts/flow-update-map +224 -0
- package/scripts/flow-utils.js +2242 -0
- package/scripts/flow-verification.js +644 -0
- package/scripts/flow-verify.js +1177 -0
- package/scripts/flow-voice-input.js +638 -0
- package/scripts/flow-watch +168 -0
- package/scripts/flow-workflow-steps.js +521 -0
- package/scripts/flow-workflow.js +1029 -0
- package/scripts/flow-worktree.js +489 -0
- package/scripts/hooks/adapters/base-adapter.js +102 -0
- package/scripts/hooks/adapters/claude-code.js +359 -0
- package/scripts/hooks/adapters/index.js +79 -0
- package/scripts/hooks/core/component-check.js +341 -0
- package/scripts/hooks/core/index.js +35 -0
- package/scripts/hooks/core/loop-check.js +241 -0
- package/scripts/hooks/core/session-context.js +294 -0
- package/scripts/hooks/core/task-gate.js +177 -0
- package/scripts/hooks/core/validation.js +230 -0
- package/scripts/hooks/entry/claude-code/post-tool-use.js +65 -0
- package/scripts/hooks/entry/claude-code/pre-tool-use.js +89 -0
- package/scripts/hooks/entry/claude-code/session-end.js +87 -0
- package/scripts/hooks/entry/claude-code/session-start.js +46 -0
- package/scripts/hooks/entry/claude-code/stop.js +43 -0
- package/scripts/postinstall.js +139 -0
- package/templates/browser-test-flow.json +56 -0
- package/templates/bug-report.md +43 -0
- package/templates/component-detail.md +42 -0
- package/templates/component.stories.tsx +49 -0
- package/templates/context/constraints.md +83 -0
- package/templates/context/conventions.md +177 -0
- package/templates/context/stack.md +60 -0
- package/templates/correction-report.md +90 -0
- package/templates/feature-proposal.md +35 -0
- package/templates/hybrid/_base.md +254 -0
- package/templates/hybrid/_patterns.md +45 -0
- package/templates/hybrid/create-component.md +127 -0
- package/templates/hybrid/create-file.md +56 -0
- package/templates/hybrid/create-hook.md +145 -0
- package/templates/hybrid/create-service.md +70 -0
- package/templates/hybrid/fix-bug.md +33 -0
- package/templates/hybrid/modify-file.md +55 -0
- package/templates/story.md +68 -0
- package/templates/task.json +56 -0
- package/templates/trace.md +69 -0
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Wogi Flow Release Channel Management
|
|
5
|
+
*
|
|
6
|
+
* Handles release channel configuration for updates.
|
|
7
|
+
* Supports stable, beta, and canary channels.
|
|
8
|
+
*
|
|
9
|
+
* @module lib/release-channel
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
const fs = require('fs');
|
|
13
|
+
const path = require('path');
|
|
14
|
+
|
|
15
|
+
// Shared utilities
|
|
16
|
+
const { findProjectRoot, safeReadJson, safeJsonParse, httpsGet } = require('./utils');
|
|
17
|
+
|
|
18
|
+
// Available release channels
|
|
19
|
+
const CHANNELS = {
|
|
20
|
+
stable: {
|
|
21
|
+
name: 'stable',
|
|
22
|
+
description: 'Production-ready releases',
|
|
23
|
+
npmTag: 'latest'
|
|
24
|
+
},
|
|
25
|
+
beta: {
|
|
26
|
+
name: 'beta',
|
|
27
|
+
description: 'Pre-release features for testing',
|
|
28
|
+
npmTag: 'beta'
|
|
29
|
+
},
|
|
30
|
+
canary: {
|
|
31
|
+
name: 'canary',
|
|
32
|
+
description: 'Cutting-edge development builds',
|
|
33
|
+
npmTag: 'canary'
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
// npm registry URL
|
|
38
|
+
const NPM_REGISTRY = 'https://registry.npmjs.org/wogi-flow';
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Parse command line arguments
|
|
42
|
+
* @param {string[]} args - Command line arguments
|
|
43
|
+
* @returns {Object} Parsed options
|
|
44
|
+
*/
|
|
45
|
+
function parseArgs(args) {
|
|
46
|
+
const options = {
|
|
47
|
+
command: args[0] || 'show',
|
|
48
|
+
channel: args[1] || null,
|
|
49
|
+
help: false
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
for (let i = 0; i < args.length; i++) {
|
|
53
|
+
if (args[i] === '--help' || args[i] === '-h') {
|
|
54
|
+
options.help = true;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return options;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Show help message
|
|
63
|
+
*/
|
|
64
|
+
function showHelp() {
|
|
65
|
+
console.log(`
|
|
66
|
+
Usage: flow channel <command> [options]
|
|
67
|
+
|
|
68
|
+
Manage release channel for updates.
|
|
69
|
+
|
|
70
|
+
Commands:
|
|
71
|
+
show Show current release channel
|
|
72
|
+
set <channel> Set release channel (stable, beta, canary)
|
|
73
|
+
list List available channels
|
|
74
|
+
check Check for updates on current channel
|
|
75
|
+
|
|
76
|
+
Options:
|
|
77
|
+
--help, -h Show this help message
|
|
78
|
+
|
|
79
|
+
Examples:
|
|
80
|
+
flow channel show # Show current channel
|
|
81
|
+
flow channel set beta # Switch to beta channel
|
|
82
|
+
flow channel list # List all channels
|
|
83
|
+
flow channel check # Check for updates
|
|
84
|
+
`);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// findProjectRoot and httpsGet are imported from ./utils
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Get project configuration
|
|
91
|
+
* @param {string} projectRoot - Project root directory
|
|
92
|
+
* @returns {Object} Configuration
|
|
93
|
+
*/
|
|
94
|
+
function getConfig(projectRoot) {
|
|
95
|
+
const configPath = path.join(projectRoot, '.workflow', 'config.json');
|
|
96
|
+
const config = safeReadJson(configPath);
|
|
97
|
+
return config || { releaseChannel: 'stable' };
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Save project configuration
|
|
102
|
+
* @param {string} projectRoot - Project root directory
|
|
103
|
+
* @param {Object} config - Configuration to save
|
|
104
|
+
*/
|
|
105
|
+
function saveConfig(projectRoot, config) {
|
|
106
|
+
const configPath = path.join(projectRoot, '.workflow', 'config.json');
|
|
107
|
+
fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Get latest version from npm for a channel
|
|
112
|
+
* @param {string} channel - Release channel
|
|
113
|
+
* @returns {Promise<string>} Latest version
|
|
114
|
+
*/
|
|
115
|
+
async function getLatestVersion(channel) {
|
|
116
|
+
try {
|
|
117
|
+
const data = await httpsGet(NPM_REGISTRY);
|
|
118
|
+
const pkg = safeJsonParse(data);
|
|
119
|
+
if (!pkg) {
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const channelConfig = CHANNELS[channel];
|
|
124
|
+
if (!channelConfig) {
|
|
125
|
+
throw new Error(`Unknown channel: ${channel}`);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Get version for the channel's npm tag
|
|
129
|
+
const distTags = pkg['dist-tags'] || {};
|
|
130
|
+
return distTags[channelConfig.npmTag] || distTags.latest || pkg.version;
|
|
131
|
+
} catch (err) {
|
|
132
|
+
return null;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Show current release channel
|
|
138
|
+
* @param {string} projectRoot - Project root directory
|
|
139
|
+
*/
|
|
140
|
+
function showChannel(projectRoot) {
|
|
141
|
+
const config = getConfig(projectRoot);
|
|
142
|
+
const channel = config.releaseChannel || 'stable';
|
|
143
|
+
const channelInfo = CHANNELS[channel] || CHANNELS.stable;
|
|
144
|
+
|
|
145
|
+
console.log(`\nš” Release Channel: ${channel}`);
|
|
146
|
+
console.log(` ${channelInfo.description}`);
|
|
147
|
+
console.log('');
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Set release channel
|
|
152
|
+
* @param {string} channel - Channel to set
|
|
153
|
+
* @param {string} projectRoot - Project root directory
|
|
154
|
+
*/
|
|
155
|
+
function setChannel(channel, projectRoot) {
|
|
156
|
+
if (!CHANNELS[channel]) {
|
|
157
|
+
console.error(`Error: Unknown channel '${channel}'`);
|
|
158
|
+
console.error('Available channels: stable, beta, canary');
|
|
159
|
+
process.exit(1);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
const config = getConfig(projectRoot);
|
|
163
|
+
const previousChannel = config.releaseChannel || 'stable';
|
|
164
|
+
|
|
165
|
+
config.releaseChannel = channel;
|
|
166
|
+
saveConfig(projectRoot, config);
|
|
167
|
+
|
|
168
|
+
console.log(`\nā Release channel changed: ${previousChannel} ā ${channel}`);
|
|
169
|
+
console.log(` ${CHANNELS[channel].description}`);
|
|
170
|
+
console.log('\nRun `flow upgrade` to update to the latest version on this channel.');
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* List available channels
|
|
175
|
+
*/
|
|
176
|
+
function listChannels() {
|
|
177
|
+
console.log('\nš” Available Release Channels\n');
|
|
178
|
+
|
|
179
|
+
for (const [key, channel] of Object.entries(CHANNELS)) {
|
|
180
|
+
console.log(` ${key.padEnd(10)} ${channel.description}`);
|
|
181
|
+
console.log(` npm tag: ${channel.npmTag}`);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
console.log('\nUse `flow channel set <channel>` to switch channels.');
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Check for updates
|
|
189
|
+
* @param {string} projectRoot - Project root directory
|
|
190
|
+
*/
|
|
191
|
+
async function checkUpdates(projectRoot) {
|
|
192
|
+
const config = getConfig(projectRoot);
|
|
193
|
+
const channel = config.releaseChannel || 'stable';
|
|
194
|
+
const currentVersion = config.version || require('../package.json').version;
|
|
195
|
+
|
|
196
|
+
console.log(`\nš Checking for updates on ${channel} channel...\n`);
|
|
197
|
+
|
|
198
|
+
const latestVersion = await getLatestVersion(channel);
|
|
199
|
+
|
|
200
|
+
if (!latestVersion) {
|
|
201
|
+
console.log(' Unable to check for updates (network error)');
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
console.log(` Current version: ${currentVersion}`);
|
|
206
|
+
console.log(` Latest version: ${latestVersion}`);
|
|
207
|
+
|
|
208
|
+
if (currentVersion === latestVersion) {
|
|
209
|
+
console.log('\nā You are on the latest version');
|
|
210
|
+
} else {
|
|
211
|
+
console.log('\nā Update available!');
|
|
212
|
+
console.log(' Run `flow upgrade` to update');
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Main release channel function
|
|
218
|
+
* @param {string[]} args - Command line arguments
|
|
219
|
+
*/
|
|
220
|
+
async function channel(args) {
|
|
221
|
+
const options = parseArgs(args);
|
|
222
|
+
|
|
223
|
+
if (options.help) {
|
|
224
|
+
showHelp();
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
const projectRoot = findProjectRoot();
|
|
229
|
+
|
|
230
|
+
if (!projectRoot && options.command !== 'list') {
|
|
231
|
+
console.error('Error: Not in a Wogi Flow project');
|
|
232
|
+
console.error('Use `flow init` to initialize a new project');
|
|
233
|
+
process.exit(1);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
switch (options.command) {
|
|
237
|
+
case 'show':
|
|
238
|
+
showChannel(projectRoot);
|
|
239
|
+
break;
|
|
240
|
+
|
|
241
|
+
case 'set':
|
|
242
|
+
if (!options.channel) {
|
|
243
|
+
console.error('Error: Please specify a channel');
|
|
244
|
+
console.error('Usage: flow channel set <channel>');
|
|
245
|
+
process.exit(1);
|
|
246
|
+
}
|
|
247
|
+
setChannel(options.channel, projectRoot);
|
|
248
|
+
break;
|
|
249
|
+
|
|
250
|
+
case 'list':
|
|
251
|
+
listChannels();
|
|
252
|
+
break;
|
|
253
|
+
|
|
254
|
+
case 'check':
|
|
255
|
+
await checkUpdates(projectRoot);
|
|
256
|
+
break;
|
|
257
|
+
|
|
258
|
+
default:
|
|
259
|
+
console.error(`Unknown command: ${options.command}`);
|
|
260
|
+
showHelp();
|
|
261
|
+
process.exit(1);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
module.exports = {
|
|
266
|
+
channel,
|
|
267
|
+
CHANNELS,
|
|
268
|
+
getLatestVersion
|
|
269
|
+
};
|