@icex-labs/icex-flow 0.3.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.
Files changed (85) hide show
  1. package/README.md +158 -0
  2. package/SKILL.md +141 -0
  3. package/bin/icex-flow.mjs +3 -0
  4. package/dist/src/adapters/index.d.ts +1 -0
  5. package/dist/src/adapters/index.js +2 -0
  6. package/dist/src/adapters/index.js.map +1 -0
  7. package/dist/src/adapters/openclaw.d.ts +31 -0
  8. package/dist/src/adapters/openclaw.js +118 -0
  9. package/dist/src/adapters/openclaw.js.map +1 -0
  10. package/dist/src/cli.d.ts +1 -0
  11. package/dist/src/cli.js +95 -0
  12. package/dist/src/cli.js.map +1 -0
  13. package/dist/src/commands/context.d.ts +1 -0
  14. package/dist/src/commands/context.js +40 -0
  15. package/dist/src/commands/context.js.map +1 -0
  16. package/dist/src/commands/generate.d.ts +2 -0
  17. package/dist/src/commands/generate.js +230 -0
  18. package/dist/src/commands/generate.js.map +1 -0
  19. package/dist/src/commands/init.d.ts +1 -0
  20. package/dist/src/commands/init.js +104 -0
  21. package/dist/src/commands/init.js.map +1 -0
  22. package/dist/src/commands/learn.d.ts +13 -0
  23. package/dist/src/commands/learn.js +108 -0
  24. package/dist/src/commands/learn.js.map +1 -0
  25. package/dist/src/commands/list.d.ts +1 -0
  26. package/dist/src/commands/list.js +104 -0
  27. package/dist/src/commands/list.js.map +1 -0
  28. package/dist/src/commands/plan.d.ts +1 -0
  29. package/dist/src/commands/plan.js +88 -0
  30. package/dist/src/commands/plan.js.map +1 -0
  31. package/dist/src/commands/projects.d.ts +1 -0
  32. package/dist/src/commands/projects.js +69 -0
  33. package/dist/src/commands/projects.js.map +1 -0
  34. package/dist/src/commands/route.d.ts +1 -0
  35. package/dist/src/commands/route.js +38 -0
  36. package/dist/src/commands/route.js.map +1 -0
  37. package/dist/src/commands/validate.d.ts +1 -0
  38. package/dist/src/commands/validate.js +194 -0
  39. package/dist/src/commands/validate.js.map +1 -0
  40. package/dist/src/commands/verify.d.ts +1 -0
  41. package/dist/src/commands/verify.js +50 -0
  42. package/dist/src/commands/verify.js.map +1 -0
  43. package/dist/src/engine/architecture.d.ts +12 -0
  44. package/dist/src/engine/architecture.js +367 -0
  45. package/dist/src/engine/architecture.js.map +1 -0
  46. package/dist/src/engine/config.d.ts +24 -0
  47. package/dist/src/engine/config.js +164 -0
  48. package/dist/src/engine/config.js.map +1 -0
  49. package/dist/src/engine/context.d.ts +12 -0
  50. package/dist/src/engine/context.js +171 -0
  51. package/dist/src/engine/context.js.map +1 -0
  52. package/dist/src/engine/detect.d.ts +6 -0
  53. package/dist/src/engine/detect.js +300 -0
  54. package/dist/src/engine/detect.js.map +1 -0
  55. package/dist/src/engine/environment.d.ts +12 -0
  56. package/dist/src/engine/environment.js +399 -0
  57. package/dist/src/engine/environment.js.map +1 -0
  58. package/dist/src/engine/planner.d.ts +12 -0
  59. package/dist/src/engine/planner.js +130 -0
  60. package/dist/src/engine/planner.js.map +1 -0
  61. package/dist/src/engine/router.d.ts +7 -0
  62. package/dist/src/engine/router.js +56 -0
  63. package/dist/src/engine/router.js.map +1 -0
  64. package/dist/src/engine/verifier.d.ts +8 -0
  65. package/dist/src/engine/verifier.js +55 -0
  66. package/dist/src/engine/verifier.js.map +1 -0
  67. package/dist/src/index.d.ts +14 -0
  68. package/dist/src/index.js +13 -0
  69. package/dist/src/index.js.map +1 -0
  70. package/dist/src/presets/index.d.ts +11 -0
  71. package/dist/src/presets/index.js +352 -0
  72. package/dist/src/presets/index.js.map +1 -0
  73. package/dist/src/types.d.ts +161 -0
  74. package/dist/src/types.js +8 -0
  75. package/dist/src/types.js.map +1 -0
  76. package/dist/src/utils.d.ts +8 -0
  77. package/dist/src/utils.js +65 -0
  78. package/dist/src/utils.js.map +1 -0
  79. package/package.json +48 -0
  80. package/schemas/context.schema.json +38 -0
  81. package/schemas/routes.schema.json +33 -0
  82. package/schemas/workflow.schema.json +84 -0
  83. package/templates/context.manifest.json +21 -0
  84. package/templates/dev-chain.flow.json +112 -0
  85. package/templates/routes.json +37 -0
@@ -0,0 +1,65 @@
1
+ import { readFileSync, existsSync } from 'node:fs';
2
+ import { resolve } from 'node:path';
3
+ export function resolveTemplate(template, vars) {
4
+ return template.replace(/\{\{(\w+)\}\}/g, (_, key) => vars[key] ?? `{{${key}}}`);
5
+ }
6
+ export function readFileSafe(path) {
7
+ try {
8
+ return readFileSync(path, 'utf-8');
9
+ }
10
+ catch {
11
+ return null;
12
+ }
13
+ }
14
+ export function loadJson(path) {
15
+ const abs = resolve(path);
16
+ if (!existsSync(abs)) {
17
+ throw new Error(`File not found: ${abs}`);
18
+ }
19
+ const raw = readFileSync(abs, 'utf-8');
20
+ try {
21
+ return JSON.parse(raw);
22
+ }
23
+ catch (e) {
24
+ throw new Error(`Invalid JSON in ${abs}: ${e.message}`);
25
+ }
26
+ }
27
+ export function parseFlags(args) {
28
+ const positional = [];
29
+ const flags = {};
30
+ for (let i = 0; i < args.length; i++) {
31
+ if (args[i].startsWith('--')) {
32
+ const key = args[i].slice(2);
33
+ if (i + 1 < args.length && !args[i + 1].startsWith('--')) {
34
+ flags[key] = args[i + 1];
35
+ i++;
36
+ }
37
+ else {
38
+ flags[key] = 'true';
39
+ }
40
+ }
41
+ else {
42
+ positional.push(args[i]);
43
+ }
44
+ }
45
+ return { positional, flags };
46
+ }
47
+ export function formatTable(rows, headers) {
48
+ const allRows = headers ? [headers, ...rows] : rows;
49
+ const cols = allRows[0]?.length ?? 0;
50
+ const widths = [];
51
+ for (let c = 0; c < cols; c++) {
52
+ widths[c] = Math.max(...allRows.map((r) => (r[c] ?? '').length));
53
+ }
54
+ const lines = [];
55
+ for (let i = 0; i < allRows.length; i++) {
56
+ const row = allRows[i];
57
+ const line = row.map((cell, c) => cell.padEnd(widths[c])).join(' ');
58
+ lines.push(line);
59
+ if (i === 0 && headers) {
60
+ lines.push(widths.map((w) => '─'.repeat(w)).join('──'));
61
+ }
62
+ }
63
+ return lines.join('\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AC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IACnE,CAAC;IAED,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACxC,MAAM,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;QACvB,MAAM,IAAI,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjB,IAAI,CAAC,KAAK,CAAC,IAAI,OAAO,EAAE,CAAC;YACvB,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC1D,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@icex-labs/icex-flow",
3
+ "version": "0.3.0",
4
+ "description": "Deterministic agent workflow orchestration — eliminate randomness in AI agent pipelines",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "bin": {
9
+ "icex-flow": "bin/icex-flow.mjs"
10
+ },
11
+ "scripts": {
12
+ "build": "tsc",
13
+ "test": "echo 'no tests yet'",
14
+ "prepare": "npm run build",
15
+ "prepublishOnly": "npm run build && npm test"
16
+ },
17
+ "files": [
18
+ "dist/",
19
+ "bin/",
20
+ "schemas/",
21
+ "templates/",
22
+ "SKILL.md",
23
+ "README.md"
24
+ ],
25
+ "keywords": [
26
+ "ai",
27
+ "agent",
28
+ "workflow",
29
+ "orchestration",
30
+ "deterministic",
31
+ "openclaw",
32
+ "claude-code",
33
+ "pipeline"
34
+ ],
35
+ "author": "icex-labs",
36
+ "license": "MIT",
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "https://github.com/icex-labs/icex-flow.git"
40
+ },
41
+ "engines": {
42
+ "node": ">=18.0.0"
43
+ },
44
+ "devDependencies": {
45
+ "@types/node": "^25.5.0",
46
+ "typescript": "^6.0.2"
47
+ }
48
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://icex.dev/schemas/context.schema.json",
4
+ "title": "icex-flow Context Manifest",
5
+ "type": "object",
6
+ "required": ["version", "global"],
7
+ "properties": {
8
+ "version": { "type": "string" },
9
+ "base_dir": { "type": "string" },
10
+ "global": {
11
+ "type": "object",
12
+ "required": ["always_inject"],
13
+ "properties": {
14
+ "always_inject": { "type": "array", "items": { "type": "string" } },
15
+ "inject_if_exists": { "type": "array", "items": { "type": "string" } }
16
+ }
17
+ },
18
+ "workflows": {
19
+ "type": "object",
20
+ "additionalProperties": {
21
+ "type": "object",
22
+ "properties": {
23
+ "always_inject": { "type": "array", "items": { "type": "string" } },
24
+ "inject_if_exists": { "type": "array", "items": { "type": "string" } },
25
+ "steps": {
26
+ "type": "object",
27
+ "additionalProperties": {
28
+ "type": "object",
29
+ "properties": {
30
+ "inject": { "type": "array", "items": { "type": "string" } }
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
38
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://icex.dev/schemas/routes.schema.json",
4
+ "title": "icex-flow Routes Configuration",
5
+ "type": "object",
6
+ "required": ["version", "default_agent", "routes"],
7
+ "properties": {
8
+ "version": { "type": "string" },
9
+ "default_agent": { "type": "string" },
10
+ "default_workflow": { "type": "string" },
11
+ "routes": {
12
+ "type": "array",
13
+ "items": {
14
+ "type": "object",
15
+ "required": ["match", "workflow", "agent"],
16
+ "properties": {
17
+ "match": {
18
+ "type": "object",
19
+ "properties": {
20
+ "labels": { "type": "array", "items": { "type": "string" } },
21
+ "keywords": { "type": "array", "items": { "type": "string" } },
22
+ "channel": { "type": "string" },
23
+ "sender": { "type": "string" }
24
+ }
25
+ },
26
+ "workflow": { "type": "string" },
27
+ "agent": { "type": "string" },
28
+ "priority": { "type": "integer" }
29
+ }
30
+ }
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,84 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://icex.dev/schemas/workflow.schema.json",
4
+ "title": "icex-flow Workflow Definition",
5
+ "type": "object",
6
+ "required": ["name", "version", "steps"],
7
+ "properties": {
8
+ "name": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
9
+ "version": { "type": "string" },
10
+ "description": { "type": "string" },
11
+ "triggers": {
12
+ "type": "object",
13
+ "properties": {
14
+ "labels": { "type": "array", "items": { "type": "string" } },
15
+ "keywords": { "type": "array", "items": { "type": "string" } }
16
+ }
17
+ },
18
+ "context": {
19
+ "type": "object",
20
+ "properties": {
21
+ "always": { "type": "array", "items": { "type": "string" } },
22
+ "per_step": {
23
+ "type": "object",
24
+ "additionalProperties": {
25
+ "type": "array", "items": { "type": "string" }
26
+ }
27
+ }
28
+ }
29
+ },
30
+ "inputs": {
31
+ "type": "object",
32
+ "additionalProperties": {
33
+ "type": "object",
34
+ "properties": {
35
+ "type": { "enum": ["string", "number", "boolean"] },
36
+ "required": { "type": "boolean" },
37
+ "default": {},
38
+ "description": { "type": "string" }
39
+ }
40
+ }
41
+ },
42
+ "steps": {
43
+ "type": "array",
44
+ "minItems": 1,
45
+ "items": {
46
+ "type": "object",
47
+ "required": ["id", "name", "action"],
48
+ "properties": {
49
+ "id": { "type": "string" },
50
+ "name": { "type": "string" },
51
+ "action": { "enum": ["shell", "agent", "notify", "gate"] },
52
+ "command": { "type": "string" },
53
+ "agent": { "type": "string" },
54
+ "timeout": { "type": "number", "minimum": 1 },
55
+ "input": { "type": "string" },
56
+ "channels": { "type": "array", "items": { "type": "string" } },
57
+ "message": { "type": "string" },
58
+ "capture": { "type": "string" },
59
+ "condition": { "type": "string" },
60
+ "verify": {
61
+ "type": "object",
62
+ "required": ["command"],
63
+ "properties": {
64
+ "command": { "type": "string" },
65
+ "expect": { "type": "string" },
66
+ "expect_exit": { "type": "integer" },
67
+ "retry": { "type": "integer", "minimum": 0 },
68
+ "retry_delay": { "type": "integer", "minimum": 1 }
69
+ }
70
+ }
71
+ }
72
+ }
73
+ },
74
+ "on_failure": {
75
+ "type": "object",
76
+ "properties": {
77
+ "action": { "enum": ["notify", "rollback"] },
78
+ "channels": { "type": "array", "items": { "type": "string" } },
79
+ "message": { "type": "string" },
80
+ "rollback_steps": { "type": "array", "items": { "type": "string" } }
81
+ }
82
+ }
83
+ }
84
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "base_dir": ".",
4
+ "global": {
5
+ "always_inject": [
6
+ "context/L0-global/"
7
+ ],
8
+ "inject_if_exists": []
9
+ },
10
+ "workflows": {
11
+ "dev-chain": {
12
+ "always_inject": [
13
+ "context/L1-project/"
14
+ ],
15
+ "inject_if_exists": [
16
+ "context/L2-reference/"
17
+ ],
18
+ "steps": {}
19
+ }
20
+ }
21
+ }
@@ -0,0 +1,112 @@
1
+ {
2
+ "name": "dev-chain",
3
+ "version": "1.0.0",
4
+ "description": "Issue → Branch → Implement → Test → PR → Merge → Deploy → Notify",
5
+ "triggers": {
6
+ "labels": ["auto-ok", "bug", "feature", "enhancement"],
7
+ "keywords": ["implement", "fix", "add", "refactor", "build"]
8
+ },
9
+ "context": {
10
+ "always": ["WORKFLOW_AUTO.md", "agents/dev/DEV_RULES.md"],
11
+ "per_step": {
12
+ "implement": ["src/", "tests/"],
13
+ "deploy": ["gitops-config/"]
14
+ }
15
+ },
16
+ "inputs": {
17
+ "issue_number": {
18
+ "type": "string",
19
+ "required": true,
20
+ "description": "GitHub issue number"
21
+ },
22
+ "branch_name": {
23
+ "type": "string",
24
+ "required": true,
25
+ "description": "Feature branch name (e.g. fix/login-bug)"
26
+ },
27
+ "repo": {
28
+ "type": "string",
29
+ "default": "netralis-inc/netralis-quant",
30
+ "description": "GitHub repo"
31
+ },
32
+ "pr_title": {
33
+ "type": "string",
34
+ "required": true,
35
+ "description": "Pull request title"
36
+ }
37
+ },
38
+ "steps": [
39
+ {
40
+ "id": "lock-issue",
41
+ "name": "Lock Issue",
42
+ "action": "shell",
43
+ "command": "gh issue edit {{issue_number}} --add-label in-progress --repo {{repo}}",
44
+ "verify": {
45
+ "command": "gh issue view {{issue_number}} --repo {{repo}} --json labels -q '.labels[].name'",
46
+ "expect": "in-progress"
47
+ }
48
+ },
49
+ {
50
+ "id": "create-branch",
51
+ "name": "Create Feature Branch",
52
+ "action": "shell",
53
+ "command": "git checkout -b {{branch_name}} && git push -u origin {{branch_name}}",
54
+ "verify": {
55
+ "command": "git branch --show-current",
56
+ "expect": "{{branch_name}}"
57
+ }
58
+ },
59
+ {
60
+ "id": "implement",
61
+ "name": "Implement Changes",
62
+ "action": "agent",
63
+ "agent": "dev-coder",
64
+ "timeout": 600,
65
+ "input": "Implement the changes described in issue #{{issue_number}}. Branch: {{branch_name}}. Run tests before committing.",
66
+ "verify": {
67
+ "command": "python -m pytest tests/ -v --tb=short",
68
+ "expect_exit": 0
69
+ }
70
+ },
71
+ {
72
+ "id": "create-pr",
73
+ "name": "Create Pull Request",
74
+ "action": "shell",
75
+ "command": "gh pr create --base main --head {{branch_name}} --title '{{pr_title}}' --body 'Closes #{{issue_number}}' --repo {{repo}}",
76
+ "capture": "pr_url"
77
+ },
78
+ {
79
+ "id": "wait-ci",
80
+ "name": "Wait for CI",
81
+ "action": "gate",
82
+ "verify": {
83
+ "command": "gh pr checks {{branch_name}} --repo {{repo}} --json state -q '.[].state' | sort -u | grep -v SUCCESS | wc -l | tr -d ' '",
84
+ "expect": "0",
85
+ "retry": 12,
86
+ "retry_delay": 30
87
+ }
88
+ },
89
+ {
90
+ "id": "merge-pr",
91
+ "name": "Merge PR",
92
+ "action": "shell",
93
+ "command": "gh pr merge {{branch_name}} --squash --delete-branch --repo {{repo}}",
94
+ "verify": {
95
+ "command": "gh pr view {{branch_name}} --repo {{repo}} --json state -q '.state'",
96
+ "expect": "MERGED"
97
+ }
98
+ },
99
+ {
100
+ "id": "notify",
101
+ "name": "Notify Completion",
102
+ "action": "notify",
103
+ "channels": ["telegram:notify"],
104
+ "message": "✅ dev-chain complete: {{pr_title}} (issue #{{issue_number}}) merged"
105
+ }
106
+ ],
107
+ "on_failure": {
108
+ "action": "notify",
109
+ "channels": ["telegram:notify"],
110
+ "message": "❌ dev-chain failed at step '{{failed_step}}' for issue #{{issue_number}}: {{error}}"
111
+ }
112
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "default_agent": "main",
4
+ "default_workflow": "default",
5
+ "routes": [
6
+ {
7
+ "match": { "labels": ["auto-ok"] },
8
+ "workflow": "dev-chain",
9
+ "agent": "dev",
10
+ "priority": 10
11
+ },
12
+ {
13
+ "match": { "keywords": ["implement", "fix", "bug", "feature", "refactor", "add"] },
14
+ "workflow": "dev-chain",
15
+ "agent": "dev",
16
+ "priority": 5
17
+ },
18
+ {
19
+ "match": { "keywords": ["deploy", "rollout", "k3d", "u9", "cluster", "helm", "argocd"] },
20
+ "workflow": "deploy",
21
+ "agent": "ops",
22
+ "priority": 5
23
+ },
24
+ {
25
+ "match": { "keywords": ["architecture", "design", "rfc", "adr", "review", "strategy"] },
26
+ "workflow": "review",
27
+ "agent": "arch",
28
+ "priority": 5
29
+ },
30
+ {
31
+ "match": { "keywords": ["test", "validate", "qa", "regression", "lint", "coverage"] },
32
+ "workflow": "test-suite",
33
+ "agent": "qa",
34
+ "priority": 5
35
+ }
36
+ ]
37
+ }