@asermax/tachikoma 2.0.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 +64 -0
- package/dist/agent/adapter.d.ts +8 -0
- package/dist/agent/adapter.js +86 -0
- package/dist/agent/adapter.js.map +1 -0
- package/dist/agent/manager.d.ts +35 -0
- package/dist/agent/manager.js +76 -0
- package/dist/agent/manager.js.map +1 -0
- package/dist/agent/models.d.ts +46 -0
- package/dist/agent/models.js +96 -0
- package/dist/agent/models.js.map +1 -0
- package/dist/agent/side-run.d.ts +42 -0
- package/dist/agent/side-run.js +83 -0
- package/dist/agent/side-run.js.map +1 -0
- package/dist/app.d.ts +5 -0
- package/dist/app.js +79 -0
- package/dist/app.js.map +1 -0
- package/dist/channels/types.d.ts +37 -0
- package/dist/channels/types.js +5 -0
- package/dist/channels/types.js.map +1 -0
- package/dist/config/default-template.d.ts +1 -0
- package/dist/config/default-template.js +49 -0
- package/dist/config/default-template.js.map +1 -0
- package/dist/config/load.d.ts +8 -0
- package/dist/config/load.js +28 -0
- package/dist/config/load.js.map +1 -0
- package/dist/config/parse.d.ts +5 -0
- package/dist/config/parse.js +18 -0
- package/dist/config/parse.js.map +1 -0
- package/dist/config/schema.d.ts +29 -0
- package/dist/config/schema.js +35 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/coordinator.d.ts +54 -0
- package/dist/coordinator.js +344 -0
- package/dist/coordinator.js.map +1 -0
- package/dist/db/core-schema.d.ts +250 -0
- package/dist/db/core-schema.js +19 -0
- package/dist/db/core-schema.js.map +1 -0
- package/dist/db/index.d.ts +8 -0
- package/dist/db/index.js +16 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/schema.d.ts +4 -0
- package/dist/db/schema.js +7 -0
- package/dist/db/schema.js.map +1 -0
- package/dist/db/state.d.ts +10 -0
- package/dist/db/state.js +36 -0
- package/dist/db/state.js.map +1 -0
- package/dist/domain/agent-events.d.ts +26 -0
- package/dist/domain/agent-events.js +2 -0
- package/dist/domain/agent-events.js.map +1 -0
- package/dist/domain/message.d.ts +25 -0
- package/dist/domain/message.js +17 -0
- package/dist/domain/message.js.map +1 -0
- package/dist/events.d.ts +9 -0
- package/dist/events.js +27 -0
- package/dist/events.js.map +1 -0
- package/dist/extensions/api.d.ts +118 -0
- package/dist/extensions/api.js +7 -0
- package/dist/extensions/api.js.map +1 -0
- package/dist/extensions/boundary/detector.d.ts +20 -0
- package/dist/extensions/boundary/detector.js +57 -0
- package/dist/extensions/boundary/detector.js.map +1 -0
- package/dist/extensions/boundary/idle.d.ts +10 -0
- package/dist/extensions/boundary/idle.js +28 -0
- package/dist/extensions/boundary/idle.js.map +1 -0
- package/dist/extensions/boundary/index.d.ts +12 -0
- package/dist/extensions/boundary/index.js +65 -0
- package/dist/extensions/boundary/index.js.map +1 -0
- package/dist/extensions/boundary/summary.d.ts +5 -0
- package/dist/extensions/boundary/summary.js +33 -0
- package/dist/extensions/boundary/summary.js.map +1 -0
- package/dist/extensions/commands/index.d.ts +7 -0
- package/dist/extensions/commands/index.js +21 -0
- package/dist/extensions/commands/index.js.map +1 -0
- package/dist/extensions/context/index.d.ts +7 -0
- package/dist/extensions/context/index.js +65 -0
- package/dist/extensions/context/index.js.map +1 -0
- package/dist/extensions/context/processor.d.ts +27 -0
- package/dist/extensions/context/processor.js +228 -0
- package/dist/extensions/context/processor.js.map +1 -0
- package/dist/extensions/detached-processes/index.d.ts +12 -0
- package/dist/extensions/detached-processes/index.js +51 -0
- package/dist/extensions/detached-processes/index.js.map +1 -0
- package/dist/extensions/detached-processes/limits.d.ts +27 -0
- package/dist/extensions/detached-processes/limits.js +55 -0
- package/dist/extensions/detached-processes/limits.js.map +1 -0
- package/dist/extensions/detached-processes/output.d.ts +2 -0
- package/dist/extensions/detached-processes/output.js +26 -0
- package/dist/extensions/detached-processes/output.js.map +1 -0
- package/dist/extensions/detached-processes/reconcile.d.ts +31 -0
- package/dist/extensions/detached-processes/reconcile.js +71 -0
- package/dist/extensions/detached-processes/reconcile.js.map +1 -0
- package/dist/extensions/detached-processes/repository.d.ts +33 -0
- package/dist/extensions/detached-processes/repository.js +62 -0
- package/dist/extensions/detached-processes/repository.js.map +1 -0
- package/dist/extensions/detached-processes/schema.d.ts +252 -0
- package/dist/extensions/detached-processes/schema.js +23 -0
- package/dist/extensions/detached-processes/schema.js.map +1 -0
- package/dist/extensions/detached-processes/spawn.d.ts +40 -0
- package/dist/extensions/detached-processes/spawn.js +137 -0
- package/dist/extensions/detached-processes/spawn.js.map +1 -0
- package/dist/extensions/detached-processes/tools.d.ts +41 -0
- package/dist/extensions/detached-processes/tools.js +243 -0
- package/dist/extensions/detached-processes/tools.js.map +1 -0
- package/dist/extensions/detached-processes/watcher.d.ts +7 -0
- package/dist/extensions/detached-processes/watcher.js +19 -0
- package/dist/extensions/detached-processes/watcher.js.map +1 -0
- package/dist/extensions/external/index.d.ts +11 -0
- package/dist/extensions/external/index.js +40 -0
- package/dist/extensions/external/index.js.map +1 -0
- package/dist/extensions/external/installs.d.ts +39 -0
- package/dist/extensions/external/installs.js +98 -0
- package/dist/extensions/external/installs.js.map +1 -0
- package/dist/extensions/external/loader.d.ts +19 -0
- package/dist/extensions/external/loader.js +70 -0
- package/dist/extensions/external/loader.js.map +1 -0
- package/dist/extensions/external/tools.d.ts +17 -0
- package/dist/extensions/external/tools.js +112 -0
- package/dist/extensions/external/tools.js.map +1 -0
- package/dist/extensions/git/commit.d.ts +19 -0
- package/dist/extensions/git/commit.js +44 -0
- package/dist/extensions/git/commit.js.map +1 -0
- package/dist/extensions/git/git.d.ts +11 -0
- package/dist/extensions/git/git.js +29 -0
- package/dist/extensions/git/git.js.map +1 -0
- package/dist/extensions/git/hooks.d.ts +10 -0
- package/dist/extensions/git/hooks.js +88 -0
- package/dist/extensions/git/hooks.js.map +1 -0
- package/dist/extensions/git/index.d.ts +11 -0
- package/dist/extensions/git/index.js +28 -0
- package/dist/extensions/git/index.js.map +1 -0
- package/dist/extensions/git/processor.d.ts +13 -0
- package/dist/extensions/git/processor.js +52 -0
- package/dist/extensions/git/processor.js.map +1 -0
- package/dist/extensions/git/sync.d.ts +44 -0
- package/dist/extensions/git/sync.js +189 -0
- package/dist/extensions/git/sync.js.map +1 -0
- package/dist/extensions/git/tools.d.ts +21 -0
- package/dist/extensions/git/tools.js +101 -0
- package/dist/extensions/git/tools.js.map +1 -0
- package/dist/extensions/host.d.ts +31 -0
- package/dist/extensions/host.js +75 -0
- package/dist/extensions/host.js.map +1 -0
- package/dist/extensions/index.d.ts +3 -0
- package/dist/extensions/index.js +32 -0
- package/dist/extensions/index.js.map +1 -0
- package/dist/extensions/memory/archive.d.ts +8 -0
- package/dist/extensions/memory/archive.js +46 -0
- package/dist/extensions/memory/archive.js.map +1 -0
- package/dist/extensions/memory/dates.d.ts +2 -0
- package/dist/extensions/memory/dates.js +7 -0
- package/dist/extensions/memory/dates.js.map +1 -0
- package/dist/extensions/memory/extraction.d.ts +17 -0
- package/dist/extensions/memory/extraction.js +218 -0
- package/dist/extensions/memory/extraction.js.map +1 -0
- package/dist/extensions/memory/index.d.ts +20 -0
- package/dist/extensions/memory/index.js +67 -0
- package/dist/extensions/memory/index.js.map +1 -0
- package/dist/extensions/memory/indexes.d.ts +14 -0
- package/dist/extensions/memory/indexes.js +64 -0
- package/dist/extensions/memory/indexes.js.map +1 -0
- package/dist/extensions/memory/layout.d.ts +20 -0
- package/dist/extensions/memory/layout.js +79 -0
- package/dist/extensions/memory/layout.js.map +1 -0
- package/dist/extensions/memory/maintenance.d.ts +21 -0
- package/dist/extensions/memory/maintenance.js +357 -0
- package/dist/extensions/memory/maintenance.js.map +1 -0
- package/dist/extensions/memory/prompts.d.ts +8 -0
- package/dist/extensions/memory/prompts.js +125 -0
- package/dist/extensions/memory/prompts.js.map +1 -0
- package/dist/extensions/memory/transcript.d.ts +18 -0
- package/dist/extensions/memory/transcript.js +79 -0
- package/dist/extensions/memory/transcript.js.map +1 -0
- package/dist/extensions/notifications/format.d.ts +5 -0
- package/dist/extensions/notifications/format.js +17 -0
- package/dist/extensions/notifications/format.js.map +1 -0
- package/dist/extensions/notifications/index.d.ts +13 -0
- package/dist/extensions/notifications/index.js +29 -0
- package/dist/extensions/notifications/index.js.map +1 -0
- package/dist/extensions/notifications/payload.d.ts +22 -0
- package/dist/extensions/notifications/payload.js +29 -0
- package/dist/extensions/notifications/payload.js.map +1 -0
- package/dist/extensions/notifications/router.d.ts +29 -0
- package/dist/extensions/notifications/router.js +55 -0
- package/dist/extensions/notifications/router.js.map +1 -0
- package/dist/extensions/notifications/tools.d.ts +12 -0
- package/dist/extensions/notifications/tools.js +41 -0
- package/dist/extensions/notifications/tools.js.map +1 -0
- package/dist/extensions/projects/context-provider.d.ts +9 -0
- package/dist/extensions/projects/context-provider.js +37 -0
- package/dist/extensions/projects/context-provider.js.map +1 -0
- package/dist/extensions/projects/git.d.ts +28 -0
- package/dist/extensions/projects/git.js +91 -0
- package/dist/extensions/projects/git.js.map +1 -0
- package/dist/extensions/projects/hooks.d.ts +7 -0
- package/dist/extensions/projects/hooks.js +42 -0
- package/dist/extensions/projects/hooks.js.map +1 -0
- package/dist/extensions/projects/index.d.ts +11 -0
- package/dist/extensions/projects/index.js +30 -0
- package/dist/extensions/projects/index.js.map +1 -0
- package/dist/extensions/projects/processor.d.ts +13 -0
- package/dist/extensions/projects/processor.js +63 -0
- package/dist/extensions/projects/processor.js.map +1 -0
- package/dist/extensions/projects/tools.d.ts +21 -0
- package/dist/extensions/projects/tools.js +118 -0
- package/dist/extensions/projects/tools.js.map +1 -0
- package/dist/extensions/registrations.d.ts +21 -0
- package/dist/extensions/registrations.js +12 -0
- package/dist/extensions/registrations.js.map +1 -0
- package/dist/extensions/repl/index.d.ts +2 -0
- package/dist/extensions/repl/index.js +85 -0
- package/dist/extensions/repl/index.js.map +1 -0
- package/dist/extensions/skills/agents.d.ts +17 -0
- package/dist/extensions/skills/agents.js +77 -0
- package/dist/extensions/skills/agents.js.map +1 -0
- package/dist/extensions/skills/delegate.d.ts +22 -0
- package/dist/extensions/skills/delegate.js +54 -0
- package/dist/extensions/skills/delegate.js.map +1 -0
- package/dist/extensions/skills/index.d.ts +11 -0
- package/dist/extensions/skills/index.js +43 -0
- package/dist/extensions/skills/index.js.map +1 -0
- package/dist/extensions/skills/reload.d.ts +8 -0
- package/dist/extensions/skills/reload.js +38 -0
- package/dist/extensions/skills/reload.js.map +1 -0
- package/dist/extensions/tasks/executor.d.ts +43 -0
- package/dist/extensions/tasks/executor.js +179 -0
- package/dist/extensions/tasks/executor.js.map +1 -0
- package/dist/extensions/tasks/expiration.d.ts +12 -0
- package/dist/extensions/tasks/expiration.js +17 -0
- package/dist/extensions/tasks/expiration.js.map +1 -0
- package/dist/extensions/tasks/generation.d.ts +14 -0
- package/dist/extensions/tasks/generation.js +70 -0
- package/dist/extensions/tasks/generation.js.map +1 -0
- package/dist/extensions/tasks/index.d.ts +14 -0
- package/dist/extensions/tasks/index.js +75 -0
- package/dist/extensions/tasks/index.js.map +1 -0
- package/dist/extensions/tasks/repository.d.ts +53 -0
- package/dist/extensions/tasks/repository.js +147 -0
- package/dist/extensions/tasks/repository.js.map +1 -0
- package/dist/extensions/tasks/schedule.d.ts +13 -0
- package/dist/extensions/tasks/schedule.js +32 -0
- package/dist/extensions/tasks/schedule.js.map +1 -0
- package/dist/extensions/tasks/schema.d.ts +423 -0
- package/dist/extensions/tasks/schema.js +45 -0
- package/dist/extensions/tasks/schema.js.map +1 -0
- package/dist/extensions/tasks/session-delivery.d.ts +18 -0
- package/dist/extensions/tasks/session-delivery.js +39 -0
- package/dist/extensions/tasks/session-delivery.js.map +1 -0
- package/dist/extensions/tasks/tools.d.ts +38 -0
- package/dist/extensions/tasks/tools.js +181 -0
- package/dist/extensions/tasks/tools.js.map +1 -0
- package/dist/extensions/telegram/buttons.d.ts +14 -0
- package/dist/extensions/telegram/buttons.js +49 -0
- package/dist/extensions/telegram/buttons.js.map +1 -0
- package/dist/extensions/telegram/channel.d.ts +39 -0
- package/dist/extensions/telegram/channel.js +201 -0
- package/dist/extensions/telegram/channel.js.map +1 -0
- package/dist/extensions/telegram/chunking.d.ts +7 -0
- package/dist/extensions/telegram/chunking.js +67 -0
- package/dist/extensions/telegram/chunking.js.map +1 -0
- package/dist/extensions/telegram/inbound.d.ts +7 -0
- package/dist/extensions/telegram/inbound.js +29 -0
- package/dist/extensions/telegram/inbound.js.map +1 -0
- package/dist/extensions/telegram/index.d.ts +13 -0
- package/dist/extensions/telegram/index.js +67 -0
- package/dist/extensions/telegram/index.js.map +1 -0
- package/dist/extensions/telegram/media.d.ts +39 -0
- package/dist/extensions/telegram/media.js +223 -0
- package/dist/extensions/telegram/media.js.map +1 -0
- package/dist/extensions/telegram/mutex.d.ts +9 -0
- package/dist/extensions/telegram/mutex.js +14 -0
- package/dist/extensions/telegram/mutex.js.map +1 -0
- package/dist/extensions/telegram/sending.d.ts +48 -0
- package/dist/extensions/telegram/sending.js +119 -0
- package/dist/extensions/telegram/sending.js.map +1 -0
- package/dist/extensions/telegram/streaming.d.ts +46 -0
- package/dist/extensions/telegram/streaming.js +140 -0
- package/dist/extensions/telegram/streaming.js.map +1 -0
- package/dist/extensions/telegram/tools.d.ts +80 -0
- package/dist/extensions/telegram/tools.js +232 -0
- package/dist/extensions/telegram/tools.js.map +1 -0
- package/dist/extensions/workflows/cleanup.d.ts +10 -0
- package/dist/extensions/workflows/cleanup.js +38 -0
- package/dist/extensions/workflows/cleanup.js.map +1 -0
- package/dist/extensions/workflows/index.d.ts +11 -0
- package/dist/extensions/workflows/index.js +42 -0
- package/dist/extensions/workflows/index.js.map +1 -0
- package/dist/extensions/workflows/loader.d.ts +27 -0
- package/dist/extensions/workflows/loader.js +90 -0
- package/dist/extensions/workflows/loader.js.map +1 -0
- package/dist/extensions/workflows/model.d.ts +19 -0
- package/dist/extensions/workflows/model.js +7 -0
- package/dist/extensions/workflows/model.js.map +1 -0
- package/dist/extensions/workflows/repository.d.ts +24 -0
- package/dist/extensions/workflows/repository.js +61 -0
- package/dist/extensions/workflows/repository.js.map +1 -0
- package/dist/extensions/workflows/schema.d.ts +193 -0
- package/dist/extensions/workflows/schema.js +20 -0
- package/dist/extensions/workflows/schema.js.map +1 -0
- package/dist/extensions/workflows/tools.d.ts +27 -0
- package/dist/extensions/workflows/tools.js +285 -0
- package/dist/extensions/workflows/tools.js.map +1 -0
- package/dist/log.d.ts +8 -0
- package/dist/log.js +15 -0
- package/dist/log.js.map +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +27 -0
- package/dist/main.js.map +1 -0
- package/dist/migration/ask.d.ts +8 -0
- package/dist/migration/ask.js +24 -0
- package/dist/migration/ask.js.map +1 -0
- package/dist/migration/config.d.ts +10 -0
- package/dist/migration/config.js +122 -0
- package/dist/migration/config.js.map +1 -0
- package/dist/migration/context.d.ts +3 -0
- package/dist/migration/context.js +24 -0
- package/dist/migration/context.js.map +1 -0
- package/dist/migration/database.d.ts +8 -0
- package/dist/migration/database.js +51 -0
- package/dist/migration/database.js.map +1 -0
- package/dist/migration/fs.d.ts +1 -0
- package/dist/migration/fs.js +11 -0
- package/dist/migration/fs.js.map +1 -0
- package/dist/migration/index.d.ts +11 -0
- package/dist/migration/index.js +28 -0
- package/dist/migration/index.js.map +1 -0
- package/dist/migration/skills.d.ts +19 -0
- package/dist/migration/skills.js +77 -0
- package/dist/migration/skills.js.map +1 -0
- package/dist/scheduler.d.ts +17 -0
- package/dist/scheduler.js +53 -0
- package/dist/scheduler.js.map +1 -0
- package/dist/sessions/registry.d.ts +15 -0
- package/dist/sessions/registry.js +42 -0
- package/dist/sessions/registry.js.map +1 -0
- package/dist/workspace.d.ts +13 -0
- package/dist/workspace.js +32 -0
- package/dist/workspace.js.map +1 -0
- package/drizzle/0000_init.sql +19 -0
- package/drizzle/0001_extensions.sql +63 -0
- package/drizzle/meta/0000_snapshot.json +134 -0
- package/drizzle/meta/0001_snapshot.json +526 -0
- package/drizzle/meta/_journal.json +20 -0
- package/package.json +63 -0
- package/skills/skill-authoring/SKILL.md +168 -0
- package/skills/workflow-authoring/SKILL.md +251 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-authoring
|
|
3
|
+
description: |
|
|
4
|
+
Activates when the user wants to create, define, set up, build, or scaffold a new skill; encode expertise or save a process for reuse; define automation for the assistant. Also triggers on requests to author a skill, write a skill, help me make a skill, guide me through skill authoring, how to create a skill, make a skill, build a skill, new skill.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Skill Authoring Guide
|
|
8
|
+
|
|
9
|
+
This guide provides everything you need to create well-structured skills. Read this document when asked to create, define, or set up a new skill for the assistant.
|
|
10
|
+
|
|
11
|
+
## Directory Conventions
|
|
12
|
+
|
|
13
|
+
User skills live in the `skills/` directory of the workspace (`{workspace}/skills`). Each skill is a subdirectory containing a `SKILL.md` file:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
skills/
|
|
17
|
+
└── my-skill/
|
|
18
|
+
├── SKILL.md # Required: metadata + content
|
|
19
|
+
├── agents/ # Optional: delegable agent definitions
|
|
20
|
+
│ └── helper.md
|
|
21
|
+
├── references/ # Optional: detailed docs read on demand
|
|
22
|
+
│ └── api.md
|
|
23
|
+
└── workflows/ # Optional: multi-step workflow definitions
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**Naming**: lowercase with hyphens (e.g. `code-review`, `git-workflow`). Names must be 64 characters or fewer, use only `a-z`, `0-9`, and hyphens, and must not start/end with a hyphen or contain consecutive hyphens.
|
|
27
|
+
|
|
28
|
+
A directory containing a `SKILL.md` is a skill root — discovery does not recurse further inside it, so nested content (references, agents, scripts) belongs to that skill.
|
|
29
|
+
|
|
30
|
+
## SKILL.md Format
|
|
31
|
+
|
|
32
|
+
A `SKILL.md` file follows the Agent Skills standard: YAML frontmatter followed by a markdown body.
|
|
33
|
+
|
|
34
|
+
```yaml
|
|
35
|
+
---
|
|
36
|
+
name: my-skill
|
|
37
|
+
description: "A clear description of what this skill does and when to use it"
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
# Skill Title
|
|
41
|
+
|
|
42
|
+
The skill's content goes here. Explain what the skill does,
|
|
43
|
+
when to use it, and how to use it.
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Frontmatter Fields
|
|
47
|
+
|
|
48
|
+
| Field | Required | Description |
|
|
49
|
+
|-------|----------|-------------|
|
|
50
|
+
| `name` | No | Skill identifier. Defaults to the directory name. Same naming rules as directories. |
|
|
51
|
+
| `description` | Yes | What the skill does and when it applies (max 1024 characters). Drives skill selection. |
|
|
52
|
+
|
|
53
|
+
### Body Content
|
|
54
|
+
|
|
55
|
+
The body is loaded into context when the skill is used. Explain what the skill does, when to use it, how to use it, and any constraints or tips.
|
|
56
|
+
|
|
57
|
+
## How Skills Are Discovered
|
|
58
|
+
|
|
59
|
+
Skills use **progressive disclosure**: the name and description of every skill are always visible to the agent, while the body is only loaded when the skill is relevant. There is no separate classification pass — the description alone determines whether the skill gets picked up.
|
|
60
|
+
|
|
61
|
+
### Tips for Effective Descriptions
|
|
62
|
+
|
|
63
|
+
**Be specific about triggers** — mention concrete actions and requests:
|
|
64
|
+
|
|
65
|
+
```yaml
|
|
66
|
+
# Good: specific triggers
|
|
67
|
+
description: "Activates when the user wants to create, define, or scaffold a new skill"
|
|
68
|
+
|
|
69
|
+
# Bad: too vague
|
|
70
|
+
description: "A skill for skills"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**Include synonyms** — cover different phrasings of the same intent.
|
|
74
|
+
|
|
75
|
+
**Avoid false positives** — say what the skill does *not* cover when a term is ambiguous.
|
|
76
|
+
|
|
77
|
+
## Available Capabilities
|
|
78
|
+
|
|
79
|
+
### Agents (`agents/`)
|
|
80
|
+
|
|
81
|
+
**When to use**: delegate focused sub-tasks to an isolated agent with its own system prompt and tool set.
|
|
82
|
+
|
|
83
|
+
Agents are markdown files under the skill's `agents/` directory. Each file has YAML frontmatter and a body that becomes the agent's system prompt:
|
|
84
|
+
|
|
85
|
+
```yaml
|
|
86
|
+
---
|
|
87
|
+
description: "Finds and summarizes relevant sources"
|
|
88
|
+
tools:
|
|
89
|
+
- read
|
|
90
|
+
- grep
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
You are a research scout. Given a topic, locate relevant files
|
|
94
|
+
and produce a concise summary of what you found.
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
| Field | Required | Description |
|
|
98
|
+
|-------|----------|-------------|
|
|
99
|
+
| `description` | Yes | What the agent does — shown to the main agent when choosing whom to delegate to. |
|
|
100
|
+
| `name` | No | Agent identifier. Defaults to the file name without `.md`. |
|
|
101
|
+
| `tools` | No | Tools available to the agent: a YAML list or a comma-separated string. Defaults to read-only tools (`read`, `grep`, `find`, `ls`). |
|
|
102
|
+
|
|
103
|
+
Agents are exposed through the `delegate_to_agent` tool, namespaced as `<skill>/<agent>` to avoid collisions. Discovery runs per agent session, so a newly added agent becomes available on the next session without a restart.
|
|
104
|
+
|
|
105
|
+
### Reference Files (`references/`)
|
|
106
|
+
|
|
107
|
+
**When to use**: detailed documentation that would clutter the main body.
|
|
108
|
+
|
|
109
|
+
Reference files are regular files the agent reads with file-system tools when directed by the SKILL.md body. They are **not automatically injected** — use them for detailed API docs, extended examples, or large templates.
|
|
110
|
+
|
|
111
|
+
**Format**: any file type. Reference from SKILL.md like: "See `references/api.md` for detailed options."
|
|
112
|
+
|
|
113
|
+
### Workflows (`workflows/`)
|
|
114
|
+
|
|
115
|
+
**When to use**: the skill encodes a multi-step process that benefits from tracked, resumable execution.
|
|
116
|
+
|
|
117
|
+
Workflows are directory-based step definitions executed through dedicated lifecycle tools. See the `workflow-authoring` skill for the full format and conventions.
|
|
118
|
+
|
|
119
|
+
### Scripts and Other Content
|
|
120
|
+
|
|
121
|
+
Skills can bundle executable scripts or data files anywhere in the skill directory; the agent runs them with its shell tool when the SKILL.md body says to. Organize additional content as needed (`data/`, `templates/`, `examples/`). Keep generated runtime state out of the skill directory — a skill should stay a read-only package.
|
|
122
|
+
|
|
123
|
+
## Writing Best Practices
|
|
124
|
+
|
|
125
|
+
### Explain the Why
|
|
126
|
+
|
|
127
|
+
Don't just say what to do — explain the reasoning behind choices so the agent can make good decisions when the situation deviates from the script.
|
|
128
|
+
|
|
129
|
+
### Keep It Lean
|
|
130
|
+
|
|
131
|
+
Only include what's necessary. Avoid redundant explanations, overly verbose instructions, and information already covered by the system prompt or other skills.
|
|
132
|
+
|
|
133
|
+
### Progressive Disclosure
|
|
134
|
+
|
|
135
|
+
Put essential information in the main body. Move detailed reference material to `references/` files. This keeps loaded context focused while making details available on demand.
|
|
136
|
+
|
|
137
|
+
## Example
|
|
138
|
+
|
|
139
|
+
```yaml
|
|
140
|
+
---
|
|
141
|
+
name: git-commit
|
|
142
|
+
description: |
|
|
143
|
+
Activates when the user wants to create, update, or manage git commits.
|
|
144
|
+
Triggers on requests to commit changes, create a commit, make a commit.
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
# Git Commit Workflow
|
|
148
|
+
|
|
149
|
+
Guides the user through creating well-structured git commits.
|
|
150
|
+
|
|
151
|
+
## When to Use
|
|
152
|
+
|
|
153
|
+
- User asks to commit changes
|
|
154
|
+
- User wants a commit with a specific message
|
|
155
|
+
- User needs help with commit message format
|
|
156
|
+
|
|
157
|
+
## Workflow
|
|
158
|
+
|
|
159
|
+
1. **Stage changes**: review what files have been modified
|
|
160
|
+
2. **Draft message**: propose a conventional commit message
|
|
161
|
+
3. **Create commit**: execute the git commit
|
|
162
|
+
|
|
163
|
+
## Tips
|
|
164
|
+
|
|
165
|
+
- Use conventional commit format (type(scope): message)
|
|
166
|
+
- Group related changes into logical commits
|
|
167
|
+
- Keep commits focused and atomic
|
|
168
|
+
```
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: workflow-authoring
|
|
3
|
+
description: |
|
|
4
|
+
Activates when the user wants to create, define, set up, build, or scaffold a new workflow; encode a multi-step process or save a procedure for reuse; define automation for workflows. Also triggers on requests to author a workflow, write a workflow, help me make a workflow, guide me through workflow authoring, how to create a workflow, make a workflow, build a workflow, new workflow.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Workflow Authoring Guide
|
|
8
|
+
|
|
9
|
+
This guide provides everything you need to create well-structured workflows. Read this document when asked to create, define, or set up a new workflow for a skill.
|
|
10
|
+
|
|
11
|
+
## What Workflows Are
|
|
12
|
+
|
|
13
|
+
Workflows are ordered multi-step processes defined within skills. They provide:
|
|
14
|
+
|
|
15
|
+
- **Structured execution**: steps run in sequence with clear boundaries
|
|
16
|
+
- **State persistence**: progress is saved between steps, enabling resumption after interruptions
|
|
17
|
+
- **Recovery**: lost context can be recovered by querying active workflows and resuming
|
|
18
|
+
|
|
19
|
+
Workflows are **optional** — skills may have zero, one, or many workflows depending on their purpose.
|
|
20
|
+
|
|
21
|
+
## Directory Conventions
|
|
22
|
+
|
|
23
|
+
Workflows live in a `workflows/` subdirectory within a skill:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
skills/
|
|
27
|
+
└── my-skill/
|
|
28
|
+
├── SKILL.md # Mentions available workflows
|
|
29
|
+
└── workflows/
|
|
30
|
+
└── my-workflow/
|
|
31
|
+
├── 01-first-step/
|
|
32
|
+
│ ├── instructions.md
|
|
33
|
+
│ ├── references/
|
|
34
|
+
│ └── scripts/
|
|
35
|
+
├── 02-next-step/
|
|
36
|
+
│ └── instructions.md
|
|
37
|
+
└── 03-final-step/
|
|
38
|
+
└── instructions.md
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**Naming**:
|
|
42
|
+
|
|
43
|
+
- Workflow directories: lowercase with hyphens (e.g. `feature-planning`, `code-refactor`)
|
|
44
|
+
- Step directories: two-digit prefix for ordering (e.g. `01-analyze`, `02-design`, `03-implement`)
|
|
45
|
+
|
|
46
|
+
Steps execute in **lexicographic order of their directory names** — the numeric prefix is what orders them. Gaps are allowed (`01-*`, `05-*`, `10-*`) to leave room for future steps.
|
|
47
|
+
|
|
48
|
+
## SKILL.md Integration Pattern
|
|
49
|
+
|
|
50
|
+
Critical: workflows are discovered by reading the skill's SKILL.md body, not by automatic detection. You **must** document workflows in the SKILL.md for the agent to know they exist:
|
|
51
|
+
|
|
52
|
+
```markdown
|
|
53
|
+
## Available Workflows
|
|
54
|
+
|
|
55
|
+
### feature-planning
|
|
56
|
+
Use when planning a new feature. Steps through requirements analysis,
|
|
57
|
+
design considerations, and implementation planning.
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
For each workflow, explain when to use it, what it does, and the expected outcome.
|
|
61
|
+
|
|
62
|
+
## Step Format
|
|
63
|
+
|
|
64
|
+
Each step directory contains:
|
|
65
|
+
|
|
66
|
+
- **instructions.md** (required): the step's content with YAML frontmatter
|
|
67
|
+
- **references/** (optional): detailed documentation read on demand
|
|
68
|
+
- **scripts/** (optional): executable scripts for the step
|
|
69
|
+
|
|
70
|
+
A step directory without an `instructions.md`, or whose frontmatter is missing a valid `title`, is skipped at load time with a warning — the rest of the workflow still loads.
|
|
71
|
+
|
|
72
|
+
### instructions.md
|
|
73
|
+
|
|
74
|
+
```yaml
|
|
75
|
+
---
|
|
76
|
+
title: "Analyze Requirements"
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
# Step Instructions
|
|
80
|
+
|
|
81
|
+
The step's guidance goes here. Explain what the step does,
|
|
82
|
+
what to produce, and how to validate completion.
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Frontmatter Fields
|
|
86
|
+
|
|
87
|
+
| Field | Required | Description |
|
|
88
|
+
|-------|----------|-------------|
|
|
89
|
+
| `title` | Yes | Human-readable step title (non-empty string) |
|
|
90
|
+
| `required` | No | If `false`, the step may be skipped when not applicable (default: `true`) |
|
|
91
|
+
| `*` | No | Custom fields are preserved as step metadata but are not interpreted by the engine |
|
|
92
|
+
|
|
93
|
+
`skippable: true` is a deprecated alias for `required: false` — use `required` in new workflows.
|
|
94
|
+
|
|
95
|
+
### Body Content
|
|
96
|
+
|
|
97
|
+
The body is returned to the agent when the step starts. Explain:
|
|
98
|
+
|
|
99
|
+
- What the step accomplishes
|
|
100
|
+
- What actions to take
|
|
101
|
+
- What outputs to produce
|
|
102
|
+
- How to validate completion
|
|
103
|
+
|
|
104
|
+
## Workflow Execution Flow
|
|
105
|
+
|
|
106
|
+
The agent drives workflows through four tools:
|
|
107
|
+
|
|
108
|
+
1. **Start**: `start_workflow(skill_name, workflow_name)` creates a tracked instance with a unique ID, a scratchpad file for progress notes, and returns the step list. Only one instance per skill/workflow pair can be active at a time.
|
|
109
|
+
2. **First step**: `update_workflow_state(workflow_id, step, action="start")` begins the first step and returns its instructions.
|
|
110
|
+
3. **Execute**: the agent performs the step's actions, producing outputs and updating the scratchpad.
|
|
111
|
+
4. **Advance**: `update_workflow_state(workflow_id, step, action="complete")` marks the step done, **auto-starts** the next pending step, and returns its instructions — no separate `start` call needed. `action="skip"` does the same for steps declared `required: false`.
|
|
112
|
+
5. **Finalize**: when the last step is completed or skipped, the workflow is **auto-finalized** — state and scratchpad are cleaned up automatically.
|
|
113
|
+
|
|
114
|
+
To abort a workflow early, use `end_workflow(workflow_id, action="abort")`.
|
|
115
|
+
|
|
116
|
+
### Recovery
|
|
117
|
+
|
|
118
|
+
Workflow state survives context loss and restarts:
|
|
119
|
+
|
|
120
|
+
- `query_workflow()` without arguments lists all active workflows
|
|
121
|
+
- `query_workflow(workflow_id=...)` returns the full state: per-step status, current step, and scratchpad path
|
|
122
|
+
- Resume from the current step — all progress is preserved
|
|
123
|
+
|
|
124
|
+
Instances abandoned across sessions are expired automatically after a configurable staleness window.
|
|
125
|
+
|
|
126
|
+
## Step Design Patterns
|
|
127
|
+
|
|
128
|
+
### Atomic Steps
|
|
129
|
+
|
|
130
|
+
Each step should address one concern. Break complex work into smaller, focused steps:
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
# Good: atomic steps
|
|
134
|
+
01-requirements/ # Gather and analyze requirements
|
|
135
|
+
02-design/ # Design the solution
|
|
136
|
+
03-implement/ # Write the code
|
|
137
|
+
04-test/ # Validate the implementation
|
|
138
|
+
|
|
139
|
+
# Bad: one giant step
|
|
140
|
+
01-do-everything/ # Too broad — hard to track progress
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Clear Instructions
|
|
144
|
+
|
|
145
|
+
Each step should provide actionable guidance:
|
|
146
|
+
|
|
147
|
+
```markdown
|
|
148
|
+
# Good: specific actions
|
|
149
|
+
## Your Task
|
|
150
|
+
1. Read the feature request in `docs/feature-specs/my-feature.md`
|
|
151
|
+
2. Identify the core requirements
|
|
152
|
+
3. List any ambiguities or missing information
|
|
153
|
+
|
|
154
|
+
## Output
|
|
155
|
+
Create a requirements checklist as a markdown file
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Avoid vague directives like "think about the requirements and write them down".
|
|
159
|
+
|
|
160
|
+
### Provide Clear Validation Criteria
|
|
161
|
+
|
|
162
|
+
Each step should define what "done" looks like:
|
|
163
|
+
|
|
164
|
+
```markdown
|
|
165
|
+
## Validation
|
|
166
|
+
- [ ] All files pass linting
|
|
167
|
+
- [ ] All tests pass
|
|
168
|
+
- [ ] Type checking succeeds
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Mark Steps as Optional When Needed
|
|
172
|
+
|
|
173
|
+
Use `required: false` for steps that are conditionally needed, and say in the body how to decide:
|
|
174
|
+
|
|
175
|
+
```yaml
|
|
176
|
+
---
|
|
177
|
+
title: "Configure Database"
|
|
178
|
+
required: false
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
# Database Configuration
|
|
182
|
+
|
|
183
|
+
Skip this step if the project already has a configured database.
|
|
184
|
+
Check for `config/database.toml` to verify.
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### Leveraging References and Scripts
|
|
188
|
+
|
|
189
|
+
Use `references/` for detailed content that doesn't fit in the main instructions, and `scripts/` for executable code the step should run:
|
|
190
|
+
|
|
191
|
+
```
|
|
192
|
+
02-validate/
|
|
193
|
+
├── instructions.md # Main: "Run validation checks"
|
|
194
|
+
├── references/
|
|
195
|
+
│ └── lint-rules.md # Detailed: rule explanations
|
|
196
|
+
└── scripts/
|
|
197
|
+
└── lint-checks.sh # Executable: runs project linting
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## Example Workflow
|
|
201
|
+
|
|
202
|
+
```
|
|
203
|
+
workflows/
|
|
204
|
+
└── feature-planning/
|
|
205
|
+
├── 01-requirements/
|
|
206
|
+
│ └── instructions.md
|
|
207
|
+
├── 02-design/
|
|
208
|
+
│ ├── instructions.md
|
|
209
|
+
│ └── references/
|
|
210
|
+
│ └── design-patterns.md
|
|
211
|
+
└── 03-implementation-plan/
|
|
212
|
+
└── instructions.md
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**01-requirements/instructions.md**:
|
|
216
|
+
|
|
217
|
+
```yaml
|
|
218
|
+
---
|
|
219
|
+
title: "Gather Requirements"
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
# Requirements Gathering
|
|
223
|
+
|
|
224
|
+
## Your Task
|
|
225
|
+
1. Read the feature request or user story
|
|
226
|
+
2. Identify functional and non-functional requirements
|
|
227
|
+
3. List assumptions and constraints
|
|
228
|
+
|
|
229
|
+
## Output
|
|
230
|
+
Create a requirements document at `docs/requirements/{feature-name}.md`
|
|
231
|
+
|
|
232
|
+
## Validation
|
|
233
|
+
- All requirements are testable
|
|
234
|
+
- Assumptions are explicit
|
|
235
|
+
- Constraints are documented
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
## Testing Your Workflow
|
|
239
|
+
|
|
240
|
+
Before considering a workflow complete:
|
|
241
|
+
|
|
242
|
+
1. **Manual walkthrough**: read through each step's instructions — do they make sense?
|
|
243
|
+
2. **Ordering check**: are steps in the right order? Do dependencies flow correctly?
|
|
244
|
+
3. **Validation check**: does each step have clear success criteria?
|
|
245
|
+
4. **SKILL.md check**: is the workflow documented in the skill's SKILL.md?
|
|
246
|
+
|
|
247
|
+
## Common Patterns
|
|
248
|
+
|
|
249
|
+
- **Planning**: requirements → design → implementation-plan → validation
|
|
250
|
+
- **Refactoring**: analyze-current → design-refactor → implement-changes → validate
|
|
251
|
+
- **Onboarding**: read-context → understand-architecture → setup-environment → first-task
|