Skip to content

Commit 3069735

Browse files
committed
feat: workflow files part 1
1 parent fac7f5c commit 3069735

File tree

3 files changed

+39
-1
lines changed

3 files changed

+39
-1
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
export * from "./createMarkdownRule.js";
21
export * from "./createMarkdownPrompt.js";
2+
export * from "./createMarkdownRule.js";
33
export * from "./getRuleType.js";
44
export * from "./markdownToRule.js";
5+
export * from "./workflowFiles.js";
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const example = `
2+
---
3+
name: Example Agent / Workflow
4+
description: Trying to wrap my head around what are these files
5+
model: anthropic/claude-sonnet-4
6+
tools:
7+
- linear-mcp
8+
- sentry-mcp:read-alerts
9+
- Read
10+
- Glob
11+
- Bash(git diff:*)
12+
rules:
13+
- org/rule1
14+
- org/rule2
15+
---
16+
This is the prompt
17+
`.trim();
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import z from "zod";
2+
3+
/*
4+
Experimental/internal config format for workflows
5+
*/
6+
const workflowFileFrontmatterSchema = z.object({
7+
name: z.string(),
8+
description: z.string(),
9+
model: z.string(),
10+
tools: z.array(z.string()),
11+
rules: z.array(z.string()),
12+
});
13+
export type WorkflowFileFrontmatter = z.infer<
14+
typeof workflowFileFrontmatterSchema
15+
>;
16+
17+
const workflowFileSchema = workflowFileFrontmatterSchema.extend({
18+
prompt: z.string(),
19+
});
20+
export type WorkflowFile = z.infer<typeof workflowFileSchema>;

0 commit comments

Comments
 (0)