dot-agents 0.1.5 → 0.2.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/README.md CHANGED
@@ -15,12 +15,134 @@ dot-agents lets you define **personas** (agent configurations) and **workflows**
15
15
 
16
16
  ## Installation
17
17
 
18
+ No installation required - use `npx` to run directly:
19
+
20
+ ```bash
21
+ npx dot-agents init
22
+ npx dot-agents run my-workflow
23
+ ```
24
+
25
+ Or install globally:
26
+
18
27
  ```bash
19
28
  npm install -g dot-agents
20
29
  ```
21
30
 
22
31
  Requires Node.js 20+.
23
32
 
33
+ ## Project Setup
34
+
35
+ The easiest way to set up dot-agents is with the `init` command:
36
+
37
+ ```bash
38
+ # Fresh install - creates .agents/ with default persona and sample workflow
39
+ npx dot-agents init
40
+
41
+ # Or in a specific directory
42
+ npx dot-agents init --dir /path/to/project
43
+ ```
44
+
45
+ If you already have a `.agents/` directory, `init` will analyze it and guide you through migration.
46
+
47
+ ### Fresh Install
48
+
49
+ Running `dot-agents init` in a directory without `.agents/` will:
50
+
51
+ 1. Create the directory structure (`.agents/personas/`, `.agents/workflows/`, etc.)
52
+ 2. Create a default `claude` persona
53
+ 3. Create a sample `hello-world` workflow
54
+
55
+ You can also set up manually:
56
+
57
+ ```bash
58
+ mkdir -p .agents/personas/claude .agents/workflows/hello
59
+ ```
60
+
61
+ **Required persona fields:**
62
+
63
+ ```yaml
64
+ ---
65
+ name: my-persona # Required: unique identifier
66
+ cmd: "claude --print" # Required for root personas (can be inherited)
67
+ description: "..." # Optional but recommended
68
+ ---
69
+ ```
70
+
71
+ **Required workflow fields:**
72
+
73
+ ```yaml
74
+ ---
75
+ name: my-workflow # Required: unique identifier
76
+ description: "..." # Required: human-readable description
77
+ persona: my-persona # Required: must match a persona name/path
78
+ ---
79
+ ```
80
+
81
+ See [Quick Start](#quick-start) for a complete example.
82
+
83
+ ### Migrating Existing `.agents/` Directory
84
+
85
+ If you have an existing `.agents/` directory with skills or workflows:
86
+
87
+ ```bash
88
+ dot-agents init
89
+ ```
90
+
91
+ The init command will:
92
+
93
+ 1. Analyze your existing structure
94
+ 2. Create a `personas/` directory with a default persona if missing
95
+ 3. Report which workflows need frontmatter updates
96
+
97
+ **Workflow migration changes:**
98
+
99
+ | Old Field | New Field | Notes |
100
+ | -------------- | ----------------- | -------------------------------------- |
101
+ | `goal:` | `description:` | Rename the field |
102
+ | (missing) | `persona: claude` | Add reference to your persona |
103
+ | `skills_used:` | (move to persona) | Skills belong in persona, not workflow |
104
+
105
+ Before:
106
+
107
+ ```yaml
108
+ ---
109
+ name: my-workflow
110
+ goal: Do something useful
111
+ skills_used:
112
+ - osx/calendar
113
+ - productivity/query-todos
114
+ ---
115
+ ```
116
+
117
+ After:
118
+
119
+ ```yaml
120
+ ---
121
+ name: my-workflow
122
+ description: Do something useful
123
+ persona: claude
124
+ on:
125
+ manual: true
126
+ ---
127
+ ```
128
+
129
+ **Verify after migration:**
130
+
131
+ ```bash
132
+ dot-agents list personas
133
+ dot-agents list workflows
134
+ dot-agents run my-workflow --dry-run
135
+ ```
136
+
137
+ ### Directory Discovery
138
+
139
+ dot-agents searches for `.agents/` in these locations (in order):
140
+
141
+ 1. Current directory and ancestors (walks up the tree)
142
+ 2. Home directory (`~/.agents/`)
143
+
144
+ This means you can run `dot-agents` from any subdirectory of a project.
145
+
24
146
  ## Quick Start
25
147
 
26
148
  ### 1. Create a `.agents` directory
@@ -140,6 +262,7 @@ Workflows support variable expansion in the task body:
140
262
  dot-agents [command]
141
263
 
142
264
  Commands:
265
+ init Initialize or migrate a .agents directory
143
266
  run <workflow> Run a workflow
144
267
  list [workflows|personas] List resources
145
268
  show workflow <name> Show workflow details
@@ -1,3 +1,4 @@
1
+ export { initCommand } from "./init.js";
1
2
  export { runCommand } from "./run.js";
2
3
  export { listCommand } from "./list.js";
3
4
  export { showCommand } from "./show.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
@@ -1,3 +1,4 @@
1
+ export { initCommand } from "./init.js";
1
2
  export { runCommand } from "./run.js";
2
3
  export { listCommand } from "./list.js";
3
4
  export { showCommand } from "./show.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from "commander";
2
+ export declare const initCommand: Command;
3
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA+QpC,eAAO,MAAM,WAAW,SA0CpB,CAAC"}
@@ -0,0 +1,242 @@
1
+ import { Command } from "commander";
2
+ import chalk from "chalk";
3
+ import { mkdir, writeFile, readdir, stat } from "node:fs/promises";
4
+ import { join } from "node:path";
5
+ import { createInterface } from "node:readline";
6
+ import { findAgentsDir } from "../../lib/config.js";
7
+ import { listWorkflows, loadWorkflow } from "../../lib/workflow.js";
8
+ const AGENTS_DIR = ".agents";
9
+ const PERSONAS_DIR = "personas";
10
+ const WORKFLOWS_DIR = "workflows";
11
+ const SKILLS_DIR = "skills";
12
+ const SESSIONS_DIR = "sessions";
13
+ const DEFAULT_PERSONA_NAME = "claude";
14
+ const DEFAULT_PERSONA_CONTENT = `---
15
+ name: claude
16
+ description: Base Claude persona
17
+ cmd:
18
+ - "claude --print"
19
+ - "claude -p"
20
+ env:
21
+ CLAUDE_MODEL: sonnet
22
+ ---
23
+
24
+ You are a helpful assistant. Execute tasks thoroughly and report results clearly.
25
+ `;
26
+ const SAMPLE_WORKFLOW_CONTENT = `---
27
+ name: hello-world
28
+ description: A simple hello world workflow
29
+ persona: claude
30
+ on:
31
+ manual: true
32
+ ---
33
+
34
+ Say hello and tell me today's date.
35
+ `;
36
+ async function prompt(question) {
37
+ const rl = createInterface({
38
+ input: process.stdin,
39
+ output: process.stdout,
40
+ });
41
+ return new Promise((resolve) => {
42
+ rl.question(question, (answer) => {
43
+ rl.close();
44
+ resolve(answer.trim());
45
+ });
46
+ });
47
+ }
48
+ async function confirm(question, defaultYes = true) {
49
+ const hint = defaultYes ? "[Y/n]" : "[y/N]";
50
+ const answer = await prompt(`${question} ${hint} `);
51
+ if (answer === "") {
52
+ return defaultYes;
53
+ }
54
+ return answer.toLowerCase().startsWith("y");
55
+ }
56
+ async function dirExists(path) {
57
+ try {
58
+ const stats = await stat(path);
59
+ return stats.isDirectory();
60
+ }
61
+ catch {
62
+ return false;
63
+ }
64
+ }
65
+ async function fileExists(path) {
66
+ try {
67
+ const stats = await stat(path);
68
+ return stats.isFile();
69
+ }
70
+ catch {
71
+ return false;
72
+ }
73
+ }
74
+ async function analyzeMigration(agentsDir) {
75
+ const personasDir = join(agentsDir, PERSONAS_DIR);
76
+ const workflowsDir = join(agentsDir, WORKFLOWS_DIR);
77
+ const skillsDir = join(agentsDir, SKILLS_DIR);
78
+ const sessionsDir = join(agentsDir, SESSIONS_DIR);
79
+ const status = {
80
+ hasPersonas: await dirExists(personasDir),
81
+ hasWorkflows: await dirExists(workflowsDir),
82
+ hasSkills: await dirExists(skillsDir),
83
+ hasSessions: await dirExists(sessionsDir),
84
+ workflowsNeedingMigration: [],
85
+ validWorkflows: [],
86
+ };
87
+ // Check personas directory has at least one persona
88
+ if (status.hasPersonas) {
89
+ try {
90
+ const entries = await readdir(personasDir);
91
+ const hasPersonaFiles = await Promise.all(entries.map(async (entry) => {
92
+ const personaFile = join(personasDir, entry, "PERSONA.md");
93
+ return fileExists(personaFile);
94
+ }));
95
+ status.hasPersonas = hasPersonaFiles.some(Boolean);
96
+ }
97
+ catch {
98
+ status.hasPersonas = false;
99
+ }
100
+ }
101
+ // Scan workflows for migration needs
102
+ if (status.hasWorkflows) {
103
+ try {
104
+ const workflowPaths = await listWorkflows(workflowsDir);
105
+ for (const workflowPath of workflowPaths) {
106
+ try {
107
+ await loadWorkflow(workflowPath);
108
+ status.validWorkflows.push(workflowPath);
109
+ }
110
+ catch {
111
+ // Workflow exists but doesn't meet requirements
112
+ status.workflowsNeedingMigration.push(workflowPath);
113
+ }
114
+ }
115
+ }
116
+ catch {
117
+ // Ignore errors
118
+ }
119
+ }
120
+ return status;
121
+ }
122
+ async function freshInstall(targetDir) {
123
+ const agentsDir = join(targetDir, AGENTS_DIR);
124
+ console.log(chalk.blue("\nCreating .agents directory structure...\n"));
125
+ // Create directories
126
+ const dirs = [
127
+ join(agentsDir, PERSONAS_DIR, DEFAULT_PERSONA_NAME),
128
+ join(agentsDir, WORKFLOWS_DIR, "hello-world"),
129
+ join(agentsDir, SKILLS_DIR),
130
+ join(agentsDir, SESSIONS_DIR),
131
+ ];
132
+ for (const dir of dirs) {
133
+ await mkdir(dir, { recursive: true });
134
+ console.log(chalk.dim(` Created ${dir}`));
135
+ }
136
+ // Create default persona
137
+ const personaPath = join(agentsDir, PERSONAS_DIR, DEFAULT_PERSONA_NAME, "PERSONA.md");
138
+ await writeFile(personaPath, DEFAULT_PERSONA_CONTENT);
139
+ console.log(chalk.green(` Created ${personaPath}`));
140
+ // Create sample workflow
141
+ const workflowPath = join(agentsDir, WORKFLOWS_DIR, "hello-world", "WORKFLOW.md");
142
+ await writeFile(workflowPath, SAMPLE_WORKFLOW_CONTENT);
143
+ console.log(chalk.green(` Created ${workflowPath}`));
144
+ console.log(chalk.green("\n✓ Initialization complete!\n"));
145
+ console.log("Next steps:");
146
+ console.log(chalk.dim(" 1. Review the default persona at:"));
147
+ console.log(chalk.dim(` ${personaPath}`));
148
+ console.log(chalk.dim(" 2. Try running the sample workflow:"));
149
+ console.log(chalk.dim(" dot-agents run hello-world --dry-run"));
150
+ console.log(chalk.dim(" 3. Create your own workflows in:"));
151
+ console.log(chalk.dim(` ${join(agentsDir, WORKFLOWS_DIR)}/`));
152
+ }
153
+ async function migrate(agentsDir) {
154
+ console.log(chalk.blue("\nAnalyzing existing .agents directory...\n"));
155
+ const status = await analyzeMigration(agentsDir);
156
+ // Report current state
157
+ console.log("Current structure:");
158
+ console.log(` ${status.hasPersonas ? chalk.green("✓") : chalk.red("✗")} personas/`);
159
+ console.log(` ${status.hasWorkflows ? chalk.green("✓") : chalk.yellow("○")} workflows/`);
160
+ console.log(` ${status.hasSkills ? chalk.green("✓") : chalk.dim("○")} skills/`);
161
+ console.log(` ${status.hasSessions ? chalk.green("✓") : chalk.dim("○")} sessions/`);
162
+ // Report workflow status
163
+ if (status.validWorkflows.length > 0) {
164
+ console.log(chalk.green(`\n ${status.validWorkflows.length} valid workflow(s)`));
165
+ }
166
+ if (status.workflowsNeedingMigration.length > 0) {
167
+ console.log(chalk.yellow(` ${status.workflowsNeedingMigration.length} workflow(s) need migration`));
168
+ }
169
+ let needsAction = false;
170
+ // Create personas directory if missing
171
+ if (!status.hasPersonas) {
172
+ needsAction = true;
173
+ console.log(chalk.yellow("\n⚠ No personas found."));
174
+ const createPersona = await confirm("Create default 'claude' persona?");
175
+ if (createPersona) {
176
+ const personaDir = join(agentsDir, PERSONAS_DIR, DEFAULT_PERSONA_NAME);
177
+ await mkdir(personaDir, { recursive: true });
178
+ const personaPath = join(personaDir, "PERSONA.md");
179
+ await writeFile(personaPath, DEFAULT_PERSONA_CONTENT);
180
+ console.log(chalk.green(` Created ${personaPath}`));
181
+ }
182
+ }
183
+ // Report workflow migration needs
184
+ if (status.workflowsNeedingMigration.length > 0) {
185
+ needsAction = true;
186
+ console.log(chalk.yellow("\n⚠ Workflows requiring manual migration:\n"));
187
+ for (const workflowPath of status.workflowsNeedingMigration) {
188
+ console.log(chalk.dim(` - ${workflowPath}/WORKFLOW.md`));
189
+ }
190
+ console.log(chalk.dim("\nRequired changes for each workflow:"));
191
+ console.log(chalk.dim(" 1. Add 'description:' field (rename from 'goal:' if present)"));
192
+ console.log(chalk.dim(" 2. Add 'persona: claude' field"));
193
+ console.log(chalk.dim(" 3. Move 'skills_used:' to persona if present"));
194
+ }
195
+ if (!needsAction) {
196
+ console.log(chalk.green("\n✓ Your .agents directory is already set up!"));
197
+ }
198
+ else {
199
+ console.log(chalk.blue("\nAfter making changes, verify with:"));
200
+ console.log(chalk.dim(" dot-agents list workflows"));
201
+ console.log(chalk.dim(" dot-agents list personas"));
202
+ }
203
+ }
204
+ export const initCommand = new Command("init")
205
+ .description("Initialize or migrate a .agents directory")
206
+ .option("-d, --dir <path>", "Target directory", process.cwd())
207
+ .option("-f, --force", "Overwrite existing files")
208
+ .action(async (options) => {
209
+ try {
210
+ const targetDir = options.dir;
211
+ // Check if .agents already exists
212
+ const existingAgentsDir = await findAgentsDir(targetDir);
213
+ const localAgentsDir = join(targetDir, AGENTS_DIR);
214
+ const hasLocalAgents = await dirExists(localAgentsDir);
215
+ if (hasLocalAgents) {
216
+ // Migration mode
217
+ console.log(chalk.blue("Found existing .agents directory"));
218
+ await migrate(localAgentsDir);
219
+ }
220
+ else if (existingAgentsDir) {
221
+ // Found .agents in parent directory
222
+ console.log(chalk.yellow(`Found .agents in parent directory: ${existingAgentsDir}`));
223
+ const createLocal = await confirm("Create a new .agents in current directory instead?");
224
+ if (createLocal) {
225
+ await freshInstall(targetDir);
226
+ }
227
+ else {
228
+ console.log(chalk.dim("Using existing .agents directory"));
229
+ await migrate(existingAgentsDir);
230
+ }
231
+ }
232
+ else {
233
+ // Fresh install
234
+ await freshInstall(targetDir);
235
+ }
236
+ }
237
+ catch (error) {
238
+ console.error(chalk.red(`Error: ${error.message}`));
239
+ process.exit(1);
240
+ }
241
+ });
242
+ //# sourceMappingURL=init.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACnE,O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GAAG,CAAC,UAAW,KAAe,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QAC/D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
package/dist/cli/index.js CHANGED
@@ -1,14 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  import { Command } from "commander";
3
- import { runCommand, listCommand, showCommand, scheduleCommand, daemonCommand } from "./commands/index.js";
3
+ import { initCommand, runCommand, listCommand, showCommand, scheduleCommand, daemonCommand } from "./commands/index.js";
4
4
  const program = new Command();
5
5
  program
6
6
  .name("dot-agents")
7
7
  .description("Run and manage agentic workflows")
8
- .version("0.1.0")
8
+ .version("0.2.0")
9
9
  .action(() => {
10
10
  program.help();
11
11
  });
12
+ program.addCommand(initCommand);
12
13
  program.addCommand(runCommand);
13
14
  program.addCommand(listCommand);
14
15
  program.addCommand(showCommand);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE3G,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,YAAY,CAAC;KAClB,WAAW,CAAC,kCAAkC,CAAC;KAC/C,OAAO,CAAC,OAAO,CAAC;KAChB,MAAM,CAAC,GAAG,EAAE;IACX,OAAO,CAAC,IAAI,EAAE,CAAC;AACjB,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;AAC/B,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;AAChC,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;AAChC,OAAO,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;AAC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L,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dot-agents",
3
- "version": "0.1.5",
3
+ "version": "0.2.0",
4
4
  "description": "A framework for building agentic workflows with personas and scheduled execution",
5
5
  "type": "module",
6
6
  "main": "./dist/lib/index.js",