dot-agents 0.1.0 → 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 +305 -150
- package/dist/cli/commands/index.d.ts +1 -0
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +1 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.d.ts +3 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +242 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/index.js +3 -2
- package/dist/cli/index.js.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,237 +1,392 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dot-agents
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+
A framework for building and running agentic workflows with personas and scheduled execution.
|
|
4
4
|
|
|
5
|
-
## What is
|
|
5
|
+
## What is dot-agents?
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
dot-agents lets you define **personas** (agent configurations) and **workflows** (tasks for agents to execute), then run them on-demand or on a schedule. It's designed to work with any agent CLI (Claude Code, local LLMs, etc.).
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- **Workflows** - Multi-step orchestrations that compose skills and tools
|
|
11
|
-
- **Meta-tooling** - Tools for creating, testing, and managing agent capabilities
|
|
9
|
+
**Key features:**
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
- **Personas** with cascading inheritance - define base configurations and extend them
|
|
12
|
+
- **Workflows** with triggers - run on-demand, on cron schedules, or via webhooks
|
|
13
|
+
- **Daemon** for background execution - scheduled workflows run automatically
|
|
14
|
+
- **Agent-agnostic** - works with any CLI that accepts prompts via stdin
|
|
14
15
|
|
|
15
|
-
##
|
|
16
|
+
## Installation
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
No installation required - use `npx` to run directly:
|
|
18
19
|
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
│ ├── meta/ # Tools for skill management
|
|
23
|
-
│ ├── examples/ # Example implementations
|
|
24
|
-
│ └── documents/ # Document processing
|
|
25
|
-
└── workflows/ # Multi-step orchestrations
|
|
26
|
-
└── examples/ # Example workflows
|
|
20
|
+
```bash
|
|
21
|
+
npx dot-agents init
|
|
22
|
+
npx dot-agents run my-workflow
|
|
27
23
|
```
|
|
28
24
|
|
|
29
|
-
|
|
25
|
+
Or install globally:
|
|
30
26
|
|
|
31
|
-
|
|
27
|
+
```bash
|
|
28
|
+
npm install -g dot-agents
|
|
29
|
+
```
|
|
32
30
|
|
|
33
|
-
|
|
31
|
+
Requires Node.js 20+.
|
|
34
32
|
|
|
35
|
-
|
|
33
|
+
## Project Setup
|
|
36
34
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
|
40
43
|
```
|
|
41
44
|
|
|
42
|
-
|
|
45
|
+
If you already have a `.agents/` directory, `init` will analyze it and guide you through migration.
|
|
43
46
|
|
|
44
|
-
|
|
45
|
-
2. Detect your `.agents/` directory (or ask where to install)
|
|
46
|
-
3. Map repository structure to installation location:
|
|
47
|
-
- `skills/` → `.agents/skills/`
|
|
48
|
-
- `workflows/` → `.agents/workflows/`
|
|
49
|
-
4. Verify installation
|
|
47
|
+
### Fresh Install
|
|
50
48
|
|
|
51
|
-
|
|
49
|
+
Running `dot-agents init` in a directory without `.agents/` will:
|
|
52
50
|
|
|
53
|
-
|
|
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
54
|
|
|
55
|
-
|
|
55
|
+
You can also set up manually:
|
|
56
56
|
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
"What workflows are available?"
|
|
60
|
-
"Show me document-related skills"
|
|
57
|
+
```bash
|
|
58
|
+
mkdir -p .agents/personas/claude .agents/workflows/hello
|
|
61
59
|
```
|
|
62
60
|
|
|
63
|
-
|
|
61
|
+
**Required persona fields:**
|
|
64
62
|
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
|
|
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
|
+
---
|
|
68
69
|
```
|
|
69
70
|
|
|
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
|
+
```
|
|
71
80
|
|
|
72
|
-
|
|
81
|
+
See [Quick Start](#quick-start) for a complete example.
|
|
73
82
|
|
|
74
|
-
|
|
83
|
+
### Migrating Existing `.agents/` Directory
|
|
75
84
|
|
|
76
|
-
|
|
77
|
-
- **skill-browser**: Discovers available skills and workflows
|
|
85
|
+
If you have an existing `.agents/` directory with skills or workflows:
|
|
78
86
|
|
|
79
|
-
|
|
87
|
+
```bash
|
|
88
|
+
dot-agents init
|
|
89
|
+
```
|
|
80
90
|
|
|
81
|
-
|
|
91
|
+
The init command will:
|
|
82
92
|
|
|
83
|
-
|
|
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
|
|
84
96
|
|
|
85
|
-
|
|
86
|
-
2. `.claude/` - Project-level, Claude-specific
|
|
87
|
-
3. `~/.agents/` - Global, agent-agnostic
|
|
88
|
-
4. `~/.claude/` - Global, Claude-specific
|
|
97
|
+
**Workflow migration changes:**
|
|
89
98
|
|
|
90
|
-
|
|
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 |
|
|
91
104
|
|
|
92
|
-
|
|
105
|
+
Before:
|
|
93
106
|
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
│ │ ├── skill-tester/
|
|
103
|
-
│ │ └── skill-evaluator/
|
|
104
|
-
│ ├── examples/ # Example implementations
|
|
105
|
-
│ │ ├── find-local-events/
|
|
106
|
-
│ │ ├── get-weather/
|
|
107
|
-
│ │ └── simple-task/
|
|
108
|
-
│ └── documents/ # Document processing
|
|
109
|
-
│ ├── image-review-pdf/
|
|
110
|
-
│ └── markdown-to-pdf/
|
|
111
|
-
└── workflows/ # → .agents/workflows/ when consumed
|
|
112
|
-
├── README.md
|
|
113
|
-
└── examples/
|
|
107
|
+
```yaml
|
|
108
|
+
---
|
|
109
|
+
name: my-workflow
|
|
110
|
+
goal: Do something useful
|
|
111
|
+
skills_used:
|
|
112
|
+
- osx/calendar
|
|
113
|
+
- productivity/query-todos
|
|
114
|
+
---
|
|
114
115
|
```
|
|
115
116
|
|
|
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
|
+
```
|
|
117
128
|
|
|
118
|
-
|
|
129
|
+
**Verify after migration:**
|
|
119
130
|
|
|
120
|
-
|
|
131
|
+
```bash
|
|
132
|
+
dot-agents list personas
|
|
133
|
+
dot-agents list workflows
|
|
134
|
+
dot-agents run my-workflow --dry-run
|
|
135
|
+
```
|
|
121
136
|
|
|
122
|
-
|
|
123
|
-
- Templates and examples
|
|
124
|
-
- Validation and testing tools
|
|
137
|
+
### Directory Discovery
|
|
125
138
|
|
|
126
|
-
|
|
139
|
+
dot-agents searches for `.agents/` in these locations (in order):
|
|
127
140
|
|
|
128
|
-
1.
|
|
129
|
-
2.
|
|
130
|
-
3. **Use meta-skills**: Leverage skill-creator, skill-tester, skill-evaluator
|
|
131
|
-
4. **Create custom resources**: Follow specifications in each directory's README
|
|
132
|
-
5. **See development workflows**: Check WORKFLOWS.md for development patterns
|
|
141
|
+
1. Current directory and ancestors (walks up the tree)
|
|
142
|
+
2. Home directory (`~/.agents/`)
|
|
133
143
|
|
|
134
|
-
|
|
144
|
+
This means you can run `dot-agents` from any subdirectory of a project.
|
|
145
|
+
|
|
146
|
+
## Quick Start
|
|
147
|
+
|
|
148
|
+
### 1. Create a `.agents` directory
|
|
135
149
|
|
|
136
|
-
|
|
150
|
+
```bash
|
|
151
|
+
mkdir -p .agents/personas/claude .agents/workflows/hello
|
|
152
|
+
```
|
|
137
153
|
|
|
138
|
-
|
|
139
|
-
- `CONTEXT.md` - Optional user/project-specific context and customizations
|
|
140
|
-
- Optional supporting files (scripts, templates, assets, references)
|
|
154
|
+
### 2. Define a persona
|
|
141
155
|
|
|
142
|
-
|
|
156
|
+
Create `.agents/personas/claude/PERSONA.md`:
|
|
143
157
|
|
|
144
158
|
```markdown
|
|
145
159
|
---
|
|
146
|
-
name:
|
|
147
|
-
description:
|
|
148
|
-
|
|
160
|
+
name: claude
|
|
161
|
+
description: Base Claude persona
|
|
162
|
+
cmd:
|
|
163
|
+
- "claude --print"
|
|
164
|
+
- "claude -p"
|
|
165
|
+
env:
|
|
166
|
+
CLAUDE_MODEL: sonnet
|
|
149
167
|
---
|
|
150
168
|
|
|
151
|
-
|
|
169
|
+
You are a helpful assistant. Execute tasks thoroughly and report results clearly.
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### 3. Create a workflow
|
|
173
|
+
|
|
174
|
+
Create `.agents/workflows/hello/WORKFLOW.md`:
|
|
175
|
+
|
|
176
|
+
```markdown
|
|
177
|
+
---
|
|
178
|
+
name: hello-world
|
|
179
|
+
description: A simple hello world workflow
|
|
180
|
+
persona: claude
|
|
181
|
+
on:
|
|
182
|
+
manual: true
|
|
183
|
+
---
|
|
152
184
|
|
|
153
|
-
|
|
185
|
+
Say hello and tell me today's date.
|
|
154
186
|
```
|
|
155
187
|
|
|
156
|
-
|
|
188
|
+
### 4. Run it
|
|
157
189
|
|
|
158
|
-
|
|
190
|
+
```bash
|
|
191
|
+
dot-agents run hello-world
|
|
192
|
+
```
|
|
159
193
|
|
|
160
|
-
##
|
|
194
|
+
## Core Concepts
|
|
161
195
|
|
|
162
|
-
|
|
196
|
+
### Personas
|
|
163
197
|
|
|
164
|
-
|
|
165
|
-
- Decision making and conditionals
|
|
166
|
-
- Coordination of multiple skills
|
|
167
|
-
- Standardized procedures
|
|
198
|
+
Personas define **how** an agent behaves. They specify the command to run, environment variables, available skills, and a system prompt.
|
|
168
199
|
|
|
169
|
-
|
|
200
|
+
```yaml
|
|
201
|
+
---
|
|
202
|
+
name: productivity-assistant
|
|
203
|
+
description: Focused assistant for productivity tasks
|
|
204
|
+
cmd: "claude --print"
|
|
205
|
+
env:
|
|
206
|
+
CLAUDE_MODEL: sonnet
|
|
207
|
+
skills:
|
|
208
|
+
- "productivity/**"
|
|
209
|
+
- "!productivity/experimental/*"
|
|
210
|
+
---
|
|
211
|
+
System prompt goes here in the markdown body...
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
**Persona inheritance:** Personas cascade through directories. A persona at `personas/claude/autonomous/productivity/` inherits from `personas/claude/autonomous/` which inherits from `personas/claude/`.
|
|
170
215
|
|
|
171
|
-
|
|
216
|
+
- Scalar fields (name, description, cmd) - child overrides parent
|
|
217
|
+
- Objects (env) - deep merged
|
|
218
|
+
- Arrays (skills) - merged with `!` prefix for removal
|
|
172
219
|
|
|
173
|
-
###
|
|
220
|
+
### Workflows
|
|
174
221
|
|
|
175
|
-
|
|
222
|
+
Workflows define **what** an agent should do. They reference a persona and contain the task in the markdown body.
|
|
223
|
+
|
|
224
|
+
```yaml
|
|
225
|
+
---
|
|
226
|
+
name: daily-standup
|
|
227
|
+
description: Generate standup notes from git activity
|
|
228
|
+
persona: claude/autonomous
|
|
229
|
+
on:
|
|
230
|
+
schedule:
|
|
231
|
+
- cron: "0 9 * * 1-5"
|
|
232
|
+
manual: true
|
|
233
|
+
inputs:
|
|
234
|
+
- name: days
|
|
235
|
+
type: number
|
|
236
|
+
default: 1
|
|
237
|
+
description: Days of history to analyze
|
|
238
|
+
---
|
|
176
239
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
- Auto-detects installation location
|
|
240
|
+
Analyze git commits from the last ${days} day(s) and generate standup notes.
|
|
241
|
+
Focus on: what was accomplished, what's in progress, any blockers.
|
|
242
|
+
```
|
|
181
243
|
|
|
182
|
-
**
|
|
244
|
+
**Triggers:**
|
|
183
245
|
|
|
184
|
-
|
|
246
|
+
- `manual: true` - Can be run on-demand
|
|
247
|
+
- `schedule` - Cron-based scheduling (requires daemon)
|
|
248
|
+
- Future: `file_change`, `webhook`, `git`
|
|
185
249
|
|
|
186
|
-
|
|
250
|
+
### Variable Expansion
|
|
187
251
|
|
|
188
|
-
|
|
189
|
-
- Compares with local installation
|
|
190
|
-
- Identifies updates and new additions
|
|
191
|
-
- Filters by category or relevance
|
|
252
|
+
Workflows support variable expansion in the task body:
|
|
192
253
|
|
|
193
|
-
|
|
254
|
+
- `${VAR}` - Environment variables and inputs
|
|
255
|
+
- `${DATE}`, `${TIME}`, `${DATETIME}` - Current date/time
|
|
256
|
+
- `${RUN_ID}` - Unique execution identifier
|
|
257
|
+
- `{{#if var}}...{{/if}}` - Conditional blocks
|
|
194
258
|
|
|
195
|
-
|
|
259
|
+
## CLI Reference
|
|
196
260
|
|
|
197
|
-
|
|
261
|
+
```bash
|
|
262
|
+
dot-agents [command]
|
|
198
263
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
264
|
+
Commands:
|
|
265
|
+
init Initialize or migrate a .agents directory
|
|
266
|
+
run <workflow> Run a workflow
|
|
267
|
+
list [workflows|personas] List resources
|
|
268
|
+
show workflow <name> Show workflow details
|
|
269
|
+
show persona <name> Show resolved persona (with inheritance)
|
|
270
|
+
schedule list List scheduled workflows
|
|
271
|
+
daemon run Run the scheduler daemon
|
|
272
|
+
daemon status Check daemon status
|
|
273
|
+
daemon jobs List scheduled jobs
|
|
274
|
+
daemon trigger <name> Manually trigger a workflow
|
|
202
275
|
|
|
203
|
-
|
|
276
|
+
Aliases:
|
|
277
|
+
workflows List all workflows
|
|
278
|
+
personas List all personas
|
|
279
|
+
```
|
|
204
280
|
|
|
205
|
-
|
|
281
|
+
### Running Workflows
|
|
206
282
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
-
|
|
283
|
+
```bash
|
|
284
|
+
# Run a workflow
|
|
285
|
+
dot-agents run daily-standup
|
|
210
286
|
|
|
211
|
-
|
|
287
|
+
# With input overrides
|
|
288
|
+
dot-agents run daily-standup -i days=3
|
|
212
289
|
|
|
213
|
-
|
|
290
|
+
# Dry run (show prompt without executing)
|
|
291
|
+
dot-agents run daily-standup --dry-run
|
|
214
292
|
|
|
215
|
-
|
|
216
|
-
-
|
|
217
|
-
|
|
293
|
+
# Override persona
|
|
294
|
+
dot-agents run daily-standup -p claude/autonomous
|
|
295
|
+
```
|
|
218
296
|
|
|
219
|
-
|
|
297
|
+
### Viewing Details
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
# Show resolved persona with full inheritance chain
|
|
301
|
+
dot-agents show persona claude/autonomous/productivity
|
|
302
|
+
|
|
303
|
+
# Show workflow with resolved prompt
|
|
304
|
+
dot-agents show workflow daily-standup --prompt
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
## Daemon
|
|
308
|
+
|
|
309
|
+
The daemon runs scheduled workflows in the background.
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
# Start the daemon
|
|
313
|
+
dot-agents daemon run
|
|
314
|
+
|
|
315
|
+
# Check status
|
|
316
|
+
dot-agents daemon status
|
|
317
|
+
|
|
318
|
+
# View scheduled jobs
|
|
319
|
+
dot-agents daemon jobs
|
|
320
|
+
|
|
321
|
+
# Manually trigger a workflow
|
|
322
|
+
dot-agents daemon trigger daily-standup
|
|
323
|
+
|
|
324
|
+
# Reload workflows after changes
|
|
325
|
+
dot-agents daemon reload
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
The daemon provides an HTTP API on port 3141 (configurable with `-p`):
|
|
329
|
+
|
|
330
|
+
- `GET /health` - Health check
|
|
331
|
+
- `GET /status` - Daemon status and uptime
|
|
332
|
+
- `GET /jobs` - List scheduled jobs
|
|
333
|
+
- `POST /trigger/:workflow` - Trigger a workflow
|
|
334
|
+
- `POST /reload` - Reload workflows from disk
|
|
335
|
+
|
|
336
|
+
## Directory Structure
|
|
337
|
+
|
|
338
|
+
```text
|
|
339
|
+
.agents/
|
|
340
|
+
├── personas/ # Agent configurations
|
|
341
|
+
│ └── claude/
|
|
342
|
+
│ ├── PERSONA.md # Base Claude persona
|
|
343
|
+
│ └── autonomous/
|
|
344
|
+
│ ├── PERSONA.md # Inherits from claude
|
|
345
|
+
│ └── productivity/
|
|
346
|
+
│ └── PERSONA.md # Inherits from autonomous
|
|
347
|
+
├── workflows/ # Task definitions
|
|
348
|
+
│ └── daily-standup/
|
|
349
|
+
│ └── WORKFLOW.md
|
|
350
|
+
├── skills/ # Reusable capabilities (optional)
|
|
351
|
+
└── sessions/ # Execution logs
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
## Skills
|
|
355
|
+
|
|
356
|
+
dot-agents also supports skills - focused, reusable capabilities that agents can load. Skills follow the [Anthropic Skills Specification](https://github.com/anthropics/skills/blob/main/agent_skills_spec.md).
|
|
357
|
+
|
|
358
|
+
Skills are referenced in personas via glob patterns:
|
|
359
|
+
|
|
360
|
+
```yaml
|
|
361
|
+
skills:
|
|
362
|
+
- "documents/**"
|
|
363
|
+
- "productivity/*"
|
|
364
|
+
- "!experimental/**"
|
|
365
|
+
```
|
|
220
366
|
|
|
221
|
-
|
|
367
|
+
See the `skills/` directory for examples.
|
|
222
368
|
|
|
223
|
-
|
|
224
|
-
2. Test with `skill-tester` to ensure spec compliance
|
|
225
|
-
3. Evaluate with `skill-evaluator` for quality assurance
|
|
226
|
-
4. Follow the test → evaluate → refine cycle
|
|
369
|
+
## Development
|
|
227
370
|
|
|
228
|
-
|
|
371
|
+
```bash
|
|
372
|
+
# Clone and install
|
|
373
|
+
git clone https://github.com/tnez/dot-agents.git
|
|
374
|
+
cd dot-agents
|
|
375
|
+
npm install
|
|
229
376
|
|
|
230
|
-
|
|
377
|
+
# Build
|
|
378
|
+
npm run build
|
|
379
|
+
|
|
380
|
+
# Run CLI locally
|
|
381
|
+
just cli list workflows
|
|
382
|
+
|
|
383
|
+
# Run linters
|
|
384
|
+
just lint
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
## Contributing
|
|
231
388
|
|
|
232
|
-
|
|
233
|
-
- [Anthropics Skills Repository](https://github.com/anthropics/skills)
|
|
234
|
-
- [Development Workflows](DEVELOPMENT.md)
|
|
389
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
235
390
|
|
|
236
391
|
## License
|
|
237
392
|
|
|
@@ -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 +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 @@
|
|
|
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/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iB,CAAC,CAAC;YACnC,CAAC;QACH,CAAC;aAAM,CAAC;YACN,gBAAgB;YAChB,MAAM,YAAY,CAAC,SAAS,CAAC,CAAC;QAChC,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,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.
|
|
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);
|
package/dist/cli/index.js.map
CHANGED
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AAEA,OAAO,E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AAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;IACxB,MAAM,WAAW,CAAC,UAAU,CAAC,CAAC,UAAU,EAAE,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE;QAC7E,IAAI,EAAE,MAAM;KACb,CAAC,CAAC;AACL,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.
|
|
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",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"dev": "tsc --watch",
|
|
24
24
|
"typecheck": "tsc --noEmit",
|
|
25
25
|
"clean": "rm -rf dist *.tsbuildinfo",
|
|
26
|
+
"prepare": "git config core.hooksPath .githooks || true",
|
|
26
27
|
"prepublishOnly": "npm run clean && npm run build"
|
|
27
28
|
},
|
|
28
29
|
"files": [
|