@openreef/cli 0.1.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 (83) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +187 -0
  3. package/dist/commands/init.d.ts +8 -0
  4. package/dist/commands/init.d.ts.map +1 -0
  5. package/dist/commands/init.js +61 -0
  6. package/dist/commands/init.js.map +1 -0
  7. package/dist/commands/inspect.d.ts +2 -0
  8. package/dist/commands/inspect.d.ts.map +1 -0
  9. package/dist/commands/inspect.js +120 -0
  10. package/dist/commands/inspect.js.map +1 -0
  11. package/dist/commands/pack.d.ts +5 -0
  12. package/dist/commands/pack.d.ts.map +1 -0
  13. package/dist/commands/pack.js +43 -0
  14. package/dist/commands/pack.js.map +1 -0
  15. package/dist/commands/validate.d.ts +7 -0
  16. package/dist/commands/validate.d.ts.map +1 -0
  17. package/dist/commands/validate.js +77 -0
  18. package/dist/commands/validate.js.map +1 -0
  19. package/dist/core/manifest-loader.d.ts +7 -0
  20. package/dist/core/manifest-loader.d.ts.map +1 -0
  21. package/dist/core/manifest-loader.js +29 -0
  22. package/dist/core/manifest-loader.js.map +1 -0
  23. package/dist/core/packer.d.ts +6 -0
  24. package/dist/core/packer.d.ts.map +1 -0
  25. package/dist/core/packer.js +26 -0
  26. package/dist/core/packer.js.map +1 -0
  27. package/dist/core/schema-validator.d.ts +3 -0
  28. package/dist/core/schema-validator.d.ts.map +1 -0
  29. package/dist/core/schema-validator.js +35 -0
  30. package/dist/core/schema-validator.js.map +1 -0
  31. package/dist/core/structural-validator.d.ts +4 -0
  32. package/dist/core/structural-validator.d.ts.map +1 -0
  33. package/dist/core/structural-validator.js +134 -0
  34. package/dist/core/structural-validator.js.map +1 -0
  35. package/dist/core/template-interpolator.d.ts +2 -0
  36. package/dist/core/template-interpolator.d.ts.map +1 -0
  37. package/dist/core/template-interpolator.js +11 -0
  38. package/dist/core/template-interpolator.js.map +1 -0
  39. package/dist/core/variable-resolver.d.ts +12 -0
  40. package/dist/core/variable-resolver.d.ts.map +1 -0
  41. package/dist/core/variable-resolver.js +38 -0
  42. package/dist/core/variable-resolver.js.map +1 -0
  43. package/dist/index.d.ts +3 -0
  44. package/dist/index.d.ts.map +1 -0
  45. package/dist/index.js +69 -0
  46. package/dist/index.js.map +1 -0
  47. package/dist/types/manifest.d.ts +75 -0
  48. package/dist/types/manifest.d.ts.map +1 -0
  49. package/dist/types/manifest.js +2 -0
  50. package/dist/types/manifest.js.map +1 -0
  51. package/dist/types/platform.d.ts +29 -0
  52. package/dist/types/platform.d.ts.map +1 -0
  53. package/dist/types/platform.js +2 -0
  54. package/dist/types/platform.js.map +1 -0
  55. package/dist/types/validation.d.ts +12 -0
  56. package/dist/types/validation.d.ts.map +1 -0
  57. package/dist/types/validation.js +2 -0
  58. package/dist/types/validation.js.map +1 -0
  59. package/dist/utils/fs.d.ts +5 -0
  60. package/dist/utils/fs.d.ts.map +1 -0
  61. package/dist/utils/fs.js +60 -0
  62. package/dist/utils/fs.js.map +1 -0
  63. package/dist/utils/output.d.ts +11 -0
  64. package/dist/utils/output.d.ts.map +1 -0
  65. package/dist/utils/output.js +31 -0
  66. package/dist/utils/output.js.map +1 -0
  67. package/dist/utils/paths.d.ts +3 -0
  68. package/dist/utils/paths.d.ts.map +1 -0
  69. package/dist/utils/paths.js +14 -0
  70. package/dist/utils/paths.js.map +1 -0
  71. package/package.json +53 -0
  72. package/schema/reef.schema.json +306 -0
  73. package/template/.env.example +3 -0
  74. package/template/README.md +48 -0
  75. package/template/agents/manager/IDENTITY.md +6 -0
  76. package/template/agents/manager/SOUL.md +29 -0
  77. package/template/agents/manager/knowledge/dynamic/.gitkeep +0 -0
  78. package/template/agents/manager/knowledge/static/project-brief.md +17 -0
  79. package/template/agents/researcher/SOUL.md +30 -0
  80. package/template/agents/researcher/knowledge/dynamic/.gitkeep +0 -0
  81. package/template/agents/researcher/knowledge/static/.gitkeep +0 -0
  82. package/template/reef.json +88 -0
  83. package/template/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AAI,EAAE,CAAC;YAChD,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;AAC5B,CAAC"}
@@ -0,0 +1,11 @@
1
+ export declare const icons: {
2
+ success: string;
3
+ error: string;
4
+ warning: string;
5
+ info: string;
6
+ };
7
+ export declare function header(text: string): string;
8
+ export declare function label(text: string): string;
9
+ export declare function value(text: string): string;
10
+ export declare function table(rows: string[][], columnGap?: number): string;
11
+ //# sourceMappingURL=output.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../src/utils/output.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK;;;;;CAKjB,CAAC;AAEF,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE3C;AAED,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE1C;AAED,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE1C;AAED,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,SAAI,GAAG,MAAM,CAmB7D"}
@@ -0,0 +1,31 @@
1
+ import chalk from 'chalk';
2
+ export const icons = {
3
+ success: chalk.green('\u2714'),
4
+ error: chalk.red('\u2716'),
5
+ warning: chalk.yellow('\u26A0'),
6
+ info: chalk.blue('\u2139'),
7
+ };
8
+ export function header(text) {
9
+ return chalk.bold.underline(text);
10
+ }
11
+ export function label(text) {
12
+ return chalk.dim(text);
13
+ }
14
+ export function value(text) {
15
+ return chalk.cyan(text);
16
+ }
17
+ export function table(rows, columnGap = 2) {
18
+ if (rows.length === 0)
19
+ return '';
20
+ const colCount = Math.max(...rows.map((r) => r.length));
21
+ const widths = [];
22
+ for (let c = 0; c < colCount; c++) {
23
+ widths[c] = Math.max(...rows.map((r) => (r[c] ?? '').length));
24
+ }
25
+ return rows
26
+ .map((row) => row
27
+ .map((cell, i) => i < row.length - 1 ? cell.padEnd(widths[i] + columnGap) : cell)
28
+ .join(''))
29
+ .join('\n');
30
+ }
31
+ //# sourceMappingURL=output.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output.js","sourceRoot":"","sources":["../../src/utils/output.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC9B,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC;IAC1B,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC;IAC/B,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC;CAC3B,CAAC;AAEF,MAAM,UAAU,MAAM,CAAC,IAAY;IACjC,OAAO,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,IAAY;IAChC,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,IAAY;IAChC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,IAAgB,EAAE,SAAS,GAAG,CAAC;IACnD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEjC,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IACxD,MAAM,MAAM,GAAa,EAAE,CAAC;IAE5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC;QAClC,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IAChE,CAAC;IAED,OAAO,IAAI;SACR,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CACX,GAAG;SACA,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CACf,CAAC,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAC/D;SACA,IAAI,CAAC,EAAE,CAAC,CACZ;SACA,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function getSchemaPath(): string;
2
+ export declare function getTemplatePath(): string;
3
+ //# sourceMappingURL=paths.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":"AASA,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,wBAAgB,eAAe,IAAI,MAAM,CAExC"}
@@ -0,0 +1,14 @@
1
+ import { fileURLToPath } from 'node:url';
2
+ import { dirname, resolve } from 'node:path';
3
+ function getPackageRoot() {
4
+ const currentFile = fileURLToPath(import.meta.url);
5
+ // Works from both src/utils/ and dist/utils/
6
+ return resolve(dirname(currentFile), '..', '..');
7
+ }
8
+ export function getSchemaPath() {
9
+ return resolve(getPackageRoot(), 'schema', 'reef.schema.json');
10
+ }
11
+ export function getTemplatePath() {
12
+ return resolve(getPackageRoot(), 'template');
13
+ }
14
+ //# sourceMappingURL=paths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE7C,SAAS,cAAc;IACrB,MAAM,WAAW,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACnD,6CAA6C;IAC7C,OAAO,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,aAAa;IAC3B,OAAO,OAAO,CAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,kBAAkB,CAAC,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,eAAe;IAC7B,OAAO,OAAO,CAAC,cAAc,EAAE,EAAE,UAAU,CAAC,CAAC;AAC/C,CAAC"}
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@openreef/cli",
3
+ "version": "0.1.0",
4
+ "description": "CLI toolchain for OpenReef formations — package and deploy multi-agent teams",
5
+ "type": "module",
6
+ "bin": {
7
+ "reef": "./dist/index.js"
8
+ },
9
+ "files": [
10
+ "dist",
11
+ "schema",
12
+ "template"
13
+ ],
14
+ "engines": {
15
+ "node": ">=18.0.0"
16
+ },
17
+ "scripts": {
18
+ "build": "tsc",
19
+ "test": "vitest run",
20
+ "test:watch": "vitest",
21
+ "lint": "tsc --noEmit",
22
+ "smoke": "npm run build && reef validate ./template && reef init smoke-test --yes && reef validate ./smoke-test && reef pack ./smoke-test"
23
+ },
24
+ "dependencies": {
25
+ "ajv": "^8.18.0",
26
+ "ajv-formats": "^3.0.1",
27
+ "chalk": "^5.6.2",
28
+ "commander": "^14.0.3",
29
+ "dotenv": "^17.3.1",
30
+ "@inquirer/prompts": "^8.2.1",
31
+ "ora": "^9.3.0",
32
+ "tar": "^7.5.7"
33
+ },
34
+ "devDependencies": {
35
+ "@types/node": "^22.0.0",
36
+ "json-schema-to-ts": "^3.1.1",
37
+ "typescript": "^5.9.3",
38
+ "vitest": "^4.0.18"
39
+ },
40
+ "keywords": [
41
+ "openreef",
42
+ "openclaw",
43
+ "ai-agents",
44
+ "formations",
45
+ "multi-agent",
46
+ "cli"
47
+ ],
48
+ "license": "MIT",
49
+ "repository": {
50
+ "type": "git",
51
+ "url": "https://github.com/openreefai/openreef.git"
52
+ }
53
+ }
@@ -0,0 +1,306 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openreef.dev/schema/reef.schema.json",
4
+ "title": "OpenReef Formation Manifest",
5
+ "description": "Schema for reef.json — the manifest file for an OpenReef formation.",
6
+ "type": "object",
7
+ "required": ["reef", "type", "name", "version", "description", "namespace", "agents"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "reef": {
11
+ "type": "string",
12
+ "description": "Specification version.",
13
+ "const": "1.0"
14
+ },
15
+ "type": {
16
+ "type": "string",
17
+ "description": "Formation category: solo (1 agent), team (2-5 agents), or swarm (6+ agents).",
18
+ "enum": ["solo", "team", "swarm"]
19
+ },
20
+ "name": {
21
+ "type": "string",
22
+ "description": "Formation name. Lowercase alphanumeric with hyphens.",
23
+ "pattern": "^[a-z][a-z0-9-]*$",
24
+ "minLength": 1,
25
+ "maxLength": 128
26
+ },
27
+ "version": {
28
+ "type": "string",
29
+ "description": "Semantic version of the formation.",
30
+ "pattern": "^\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.]+)?(\\+[a-zA-Z0-9.]+)?$"
31
+ },
32
+ "description": {
33
+ "type": "string",
34
+ "description": "Brief description of what the formation does.",
35
+ "minLength": 1,
36
+ "maxLength": 500
37
+ },
38
+ "author": {
39
+ "type": "string",
40
+ "description": "Formation author or organization."
41
+ },
42
+ "license": {
43
+ "type": "string",
44
+ "description": "SPDX license identifier."
45
+ },
46
+ "compatibility": {
47
+ "type": "object",
48
+ "description": "Platform compatibility constraints.",
49
+ "additionalProperties": false,
50
+ "properties": {
51
+ "openclaw": {
52
+ "type": "string",
53
+ "description": "Required OpenClaw version range (semver)."
54
+ }
55
+ }
56
+ },
57
+ "namespace": {
58
+ "type": "string",
59
+ "description": "Prefix for all agent IDs in this formation.",
60
+ "pattern": "^[a-z][a-z0-9-]*$",
61
+ "minLength": 1,
62
+ "maxLength": 64
63
+ },
64
+ "variables": {
65
+ "type": "object",
66
+ "description": "User-supplied configuration values.",
67
+ "additionalProperties": {
68
+ "type": "object",
69
+ "required": ["type"],
70
+ "additionalProperties": false,
71
+ "properties": {
72
+ "type": {
73
+ "type": "string",
74
+ "description": "Value type.",
75
+ "enum": ["string", "number", "boolean"]
76
+ },
77
+ "description": {
78
+ "type": "string",
79
+ "description": "Human-readable description of the variable."
80
+ },
81
+ "default": {
82
+ "description": "Default value if not provided."
83
+ },
84
+ "required": {
85
+ "type": "boolean",
86
+ "description": "Whether a value must be supplied.",
87
+ "default": false
88
+ },
89
+ "sensitive": {
90
+ "type": "boolean",
91
+ "description": "If true, value is never stored in plaintext.",
92
+ "default": false
93
+ }
94
+ }
95
+ }
96
+ },
97
+ "agents": {
98
+ "type": "object",
99
+ "description": "Agent definitions keyed by slug.",
100
+ "minProperties": 1,
101
+ "additionalProperties": {
102
+ "type": "object",
103
+ "required": ["source", "description"],
104
+ "additionalProperties": false,
105
+ "properties": {
106
+ "source": {
107
+ "type": "string",
108
+ "description": "Relative path to the agent's directory."
109
+ },
110
+ "description": {
111
+ "type": "string",
112
+ "description": "What this agent does."
113
+ },
114
+ "role": {
115
+ "type": "string",
116
+ "description": "Agent's role label."
117
+ },
118
+ "model": {
119
+ "type": "string",
120
+ "description": "LLM model identifier."
121
+ },
122
+ "tools": {
123
+ "type": "object",
124
+ "description": "Tool configuration.",
125
+ "additionalProperties": false,
126
+ "properties": {
127
+ "allow": {
128
+ "type": "array",
129
+ "description": "List of allowed tool/skill names.",
130
+ "items": {
131
+ "type": "string"
132
+ }
133
+ }
134
+ }
135
+ },
136
+ "sandbox": {
137
+ "type": "object",
138
+ "description": "OpenClaw sandbox configuration.",
139
+ "properties": {
140
+ "network": {
141
+ "type": "boolean",
142
+ "description": "Whether the agent can access the network."
143
+ },
144
+ "filesystem": {
145
+ "type": "string",
146
+ "description": "Filesystem access level.",
147
+ "enum": ["full", "restricted", "none"]
148
+ }
149
+ }
150
+ }
151
+ }
152
+ }
153
+ },
154
+ "agentToAgent": {
155
+ "type": "object",
156
+ "description": "Communication topology as directed adjacency list. Keys are source agent slugs, values are arrays of target agent slugs.",
157
+ "additionalProperties": {
158
+ "type": "array",
159
+ "items": {
160
+ "type": "string"
161
+ }
162
+ }
163
+ },
164
+ "bindings": {
165
+ "type": "array",
166
+ "description": "Channel routing rules.",
167
+ "items": {
168
+ "type": "object",
169
+ "required": ["channel", "agent"],
170
+ "additionalProperties": false,
171
+ "properties": {
172
+ "channel": {
173
+ "type": "string",
174
+ "description": "Channel identifier."
175
+ },
176
+ "agent": {
177
+ "type": "string",
178
+ "description": "Agent slug to bind."
179
+ },
180
+ "direction": {
181
+ "type": "string",
182
+ "description": "Binding direction.",
183
+ "enum": ["inbound", "outbound", "bidirectional"],
184
+ "default": "bidirectional"
185
+ }
186
+ }
187
+ }
188
+ },
189
+ "cron": {
190
+ "type": "array",
191
+ "description": "Scheduled jobs with agent assignment.",
192
+ "items": {
193
+ "type": "object",
194
+ "required": ["schedule", "agent", "prompt"],
195
+ "additionalProperties": false,
196
+ "properties": {
197
+ "schedule": {
198
+ "type": "string",
199
+ "description": "Cron expression."
200
+ },
201
+ "agent": {
202
+ "type": "string",
203
+ "description": "Agent slug to trigger."
204
+ },
205
+ "prompt": {
206
+ "type": "string",
207
+ "description": "Message sent to the agent."
208
+ },
209
+ "timezone": {
210
+ "type": "string",
211
+ "description": "IANA timezone.",
212
+ "default": "UTC"
213
+ }
214
+ }
215
+ }
216
+ },
217
+ "dependencies": {
218
+ "type": "object",
219
+ "description": "Required skills and services.",
220
+ "additionalProperties": false,
221
+ "properties": {
222
+ "skills": {
223
+ "type": "object",
224
+ "description": "Required ClawHub skills with semver version ranges.",
225
+ "additionalProperties": {
226
+ "type": "string"
227
+ }
228
+ },
229
+ "services": {
230
+ "type": "array",
231
+ "description": "Required external services (informational).",
232
+ "items": {
233
+ "type": "object",
234
+ "required": ["name"],
235
+ "additionalProperties": false,
236
+ "properties": {
237
+ "name": {
238
+ "type": "string",
239
+ "description": "Service name."
240
+ },
241
+ "url": {
242
+ "type": "string",
243
+ "description": "Service URL."
244
+ },
245
+ "required": {
246
+ "type": "boolean",
247
+ "description": "Whether the service is required.",
248
+ "default": true
249
+ },
250
+ "description": {
251
+ "type": "string",
252
+ "description": "What the service is used for."
253
+ }
254
+ }
255
+ }
256
+ }
257
+ }
258
+ },
259
+ "validation": {
260
+ "type": "object",
261
+ "description": "Post-deploy health check configuration.",
262
+ "additionalProperties": false,
263
+ "properties": {
264
+ "agent_exists": {
265
+ "type": "boolean",
266
+ "description": "Verify all agents were created.",
267
+ "default": true
268
+ },
269
+ "file_exists": {
270
+ "type": "boolean",
271
+ "description": "Verify workspace files were written.",
272
+ "default": true
273
+ },
274
+ "binding_active": {
275
+ "type": "boolean",
276
+ "description": "Verify all bindings are active.",
277
+ "default": true
278
+ },
279
+ "cron_exists": {
280
+ "type": "boolean",
281
+ "description": "Verify cron jobs were created.",
282
+ "default": true
283
+ },
284
+ "agent_responds": {
285
+ "type": "object",
286
+ "description": "Functional connectivity check. Opt-in only — requires --verify-connectivity flag.",
287
+ "additionalProperties": false,
288
+ "properties": {
289
+ "enabled": {
290
+ "type": "boolean",
291
+ "description": "Whether agent_responds check is enabled.",
292
+ "default": false
293
+ },
294
+ "timeout": {
295
+ "type": "number",
296
+ "description": "Timeout in seconds for agent response.",
297
+ "default": 30,
298
+ "minimum": 1,
299
+ "maximum": 300
300
+ }
301
+ }
302
+ }
303
+ }
304
+ }
305
+ }
306
+ }
@@ -0,0 +1,3 @@
1
+ # OpenReef Formation Variables
2
+ MISSION_GOAL="Research"
3
+ OPENAI_API_KEY=
@@ -0,0 +1,48 @@
1
+ # My Formation
2
+
3
+ > TODO: Describe what your formation does
4
+
5
+ ## Requirements
6
+
7
+ - [OpenClaw](https://github.com/openclaw/openclaw) installed and running
8
+ - [OpenReef CLI](https://github.com/openreef/openreef) installed
9
+ - OpenAI API key
10
+
11
+ ## Variables
12
+
13
+ | Variable | Description | Required | Default |
14
+ |----------|-------------|----------|---------|
15
+ | `OPENAI_API_KEY` | OpenAI API key for LLM calls | Yes | — |
16
+ | `MISSION_GOAL` | Primary mission for the agent team | No | `Research` |
17
+
18
+ ## Quick Start
19
+
20
+ ```bash
21
+ # 1. Copy the environment template and fill in your values
22
+ cp .env.example .env
23
+
24
+ # 2. Deploy the formation
25
+ reef install .
26
+ ```
27
+
28
+ ## Agents
29
+
30
+ ### Manager
31
+
32
+ **Role:** Coordinator
33
+
34
+ Coordinates the team, delegates tasks, and synthesizes results. Communicates with the researcher to assign topics and collect findings.
35
+
36
+ ### Researcher
37
+
38
+ **Role:** Researcher
39
+
40
+ Conducts deep research on assigned topics and reports findings back to the manager.
41
+
42
+ ## Communication Topology
43
+
44
+ ```
45
+ manager ↔ researcher
46
+ ```
47
+
48
+ The manager can send tasks to the researcher, and the researcher reports findings back to the manager.
@@ -0,0 +1,6 @@
1
+ # Identity
2
+
3
+ - **Name:** Manager
4
+ - **Role:** Coordinator
5
+ - **Formation:** {{namespace}}
6
+ - **Description:** Coordinates the team, delegates tasks, and synthesizes results
@@ -0,0 +1,29 @@
1
+ # Manager Agent
2
+
3
+ You are the **manager** of the {{namespace}} formation.
4
+
5
+ ## Mission
6
+
7
+ {{MISSION_GOAL}}
8
+
9
+ ## Personality
10
+
11
+ You are a focused, organized coordinator. You break down complex goals into concrete research tasks, delegate them to your team, and synthesize the results into actionable insights. You communicate clearly and keep the team aligned on priorities.
12
+
13
+ ## Behavior
14
+
15
+ - When you receive a new mission or goal, decompose it into specific research questions
16
+ - Delegate research tasks to the researcher agent
17
+ - Collect and synthesize findings into clear summaries
18
+ - Track progress and adjust priorities as new information emerges
19
+ - Store important findings and decisions in your `knowledge/dynamic/` directory for future reference
20
+
21
+ ## Available Tools
22
+
23
+ You have access to the following tools:
24
+
25
+ {{tools}}
26
+
27
+ ## Communication
28
+
29
+ You can communicate with other agents in your formation using the `sessions_send` tool. Refer to `AGENTS.md` for the full team roster and topology.
@@ -0,0 +1,17 @@
1
+ # Project Brief
2
+
3
+ ## Mission
4
+
5
+ {{MISSION_GOAL}}
6
+
7
+ ## Team Structure
8
+
9
+ This formation consists of a manager and a researcher working together. The manager coordinates tasks and synthesizes results, while the researcher conducts deep investigation on assigned topics.
10
+
11
+ ## Working Guidelines
12
+
13
+ 1. **Decompose goals** into specific, actionable research questions
14
+ 2. **Delegate clearly** with context and expected deliverables
15
+ 3. **Synthesize findings** into concise, actionable summaries
16
+ 4. **Iterate** based on new information and feedback
17
+ 5. **Document decisions** in `knowledge/dynamic/` for future reference
@@ -0,0 +1,30 @@
1
+ # Researcher Agent
2
+
3
+ You are a **researcher** in the {{namespace}} formation.
4
+
5
+ ## Mission
6
+
7
+ {{MISSION_GOAL}}
8
+
9
+ ## Personality
10
+
11
+ You are a thorough, methodical researcher. You investigate topics deeply, verify information from multiple angles, and present your findings in a clear, structured format. You are curious and persistent — you dig until you find reliable answers.
12
+
13
+ ## Behavior
14
+
15
+ - When you receive a research task, plan your investigation approach before starting
16
+ - Search for information from multiple sources to verify accuracy
17
+ - Organize findings into clear, structured reports
18
+ - Flag uncertainties and knowledge gaps honestly
19
+ - Report findings back to the manager with supporting evidence
20
+ - Store raw research notes and data in your `knowledge/dynamic/` directory
21
+
22
+ ## Available Tools
23
+
24
+ You have access to the following tools:
25
+
26
+ {{tools}}
27
+
28
+ ## Communication
29
+
30
+ You can communicate with other agents in your formation using the `sessions_send` tool. Refer to `AGENTS.md` for the full team roster and topology.