You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the activation contract specification for provider-agnostic skill discovery. Introduces metadata-version 2 with activation-intents, activation-events, activation-artifacts, capabilities, and risk-level fields across 13 core skills. Includes updated validation scripts, contributing guide, changelog, and activation documentation.
-`activation-artifacts` -- Optional comma-separated repo paths or globs
113
+
-`risk-level` -- Optional side-effect hint (`low`, `medium`, `high`)
104
114
105
115
## Where Skills Live
106
116
@@ -112,6 +122,8 @@ Canonical runtime location:
112
122
113
123
No provider-specific metadata files are stored in this repository. `.chalk/skills/` remains the source of truth.
114
124
125
+
Project activation rules live outside individual skills. Chalk reserves `.chalk/activation/skills.yaml` as the neutral project manifest location; see `docs/activation-model.md` and `docs/examples/activation-skills.yaml`.
126
+
115
127
## The `.chalk/` Folder
116
128
117
129
Skills produce and maintain the `.chalk/` documentation structure:
@@ -157,6 +169,7 @@ Skills produce and maintain the `.chalk/` documentation structure:
157
169
## Open Source Contract
158
170
159
171
- Scope and boundaries: `docs/open-source-scope.md`
@@ -173,7 +186,7 @@ make init-skill NAME=my-skill DESC="what it does and when to use it" OWNER=proje
173
186
## Adding a New Skill
174
187
175
188
1. Create a folder: `skills/<skill-name>/`
176
-
2. Add a `SKILL.md` with frontmatter (`name`, `description`, `owner`, `version`, `metadata-version`; plus optional `allowed-tools`, `argument-hint`)
189
+
2. Add a `SKILL.md` with frontmatter (`name`, `description`, `owner`, `version`, `metadata-version`; plus optional `allowed-tools`, `argument-hint`, and activation metadata)
177
190
3. Write the workflow as numbered steps
178
191
4. Add templates or scripts in `assets/` if needed
179
192
5. Keep `SKILL.md` under 500 lines; use progressive disclosure for detail
Chalk activation keeps skills provider-agnostic while giving runtimes enough structure to decide when to load them. The activation model lives at the project level, not inside a provider adapter.
6
+
7
+
- Skills declare reusable activation hints in `SKILL.md`
8
+
- Projects declare local routing rules in `.chalk/activation/skills.yaml`
9
+
- Runtimes such as Chalk Browser can compile or interpret those rules for a specific agent
10
+
11
+
This repository defines the contract only. It does not ship a live router or provider-specific hooks.
12
+
13
+
## Design Rules
14
+
15
+
- Keep rules deterministic before semantic.
16
+
- Keep project-specific routing in the project manifest, not in shared skills.
17
+
- Keep action names neutral so they can map to Claude hooks, RuleZ, or another adapter later.
18
+
- Default to audit-first rollout for new rule sets.
19
+
20
+
## Project Manifest Location
21
+
22
+
Real projects should store the manifest at:
23
+
24
+
```text
25
+
.chalk/activation/skills.yaml
26
+
```
27
+
28
+
An example file for contributors lives at `docs/examples/activation-skills.yaml`.
29
+
30
+
## Manifest Shape
31
+
32
+
```yaml
33
+
version: "1"
34
+
default-mode: audit
35
+
rules:
36
+
- id: create-plan-from-user-request
37
+
description: Activate planning when the user explicitly asks for a plan.
38
+
priority: 100
39
+
when:
40
+
events: [user-prompt]
41
+
prompt-contains: [plan, roadmap, approach]
42
+
activate:
43
+
skills: [create-plan]
44
+
```
45
+
46
+
## Supported Matchers
47
+
48
+
- `events`
49
+
- Neutral runtime events such as `user-prompt`, `session-start`, `pre-tool-use`, `post-tool-use`, `pre-compact`, `session-end`
50
+
- `prompt-contains`
51
+
- Plain-language trigger phrases
52
+
- `paths-any`
53
+
- Repo paths or globs related to the request or changed files
54
+
- `capabilities-any`
55
+
- Capability tags exported by the referenced skills
56
+
- `risk-max`
57
+
- Maximum allowed `risk-level` for auto-activation in the rule
58
+
59
+
Projects may add more matchers later, but they should stay declarative and portable.
60
+
61
+
## Supported Actions
62
+
63
+
- `activate.skills`
64
+
- Inject or prioritize one or more named Chalk skills
65
+
- `annotate`
66
+
- Add a deterministic note explaining what matched
67
+
- `block`
68
+
- Prevent an unsafe automatic activation and require user confirmation
69
+
70
+
The runtime decides how these actions map to a specific agent. This repository only defines the neutral intent.
71
+
72
+
## Conflict Resolution
73
+
74
+
1. Highest `priority` wins.
75
+
2. If priorities tie, the rule with the narrower path scope wins. A rule with no `paths-any` matcher is considered the widest possible scope (matches all paths).
76
+
3. If rules still tie, prefer the lower `risk-level`.
77
+
4. If there is still a tie, activate no new skill and surface an audit note.
- `owner: chalk`: Chalk-managed skill in this repository
39
45
- `owner: project`: Project-managed skill in project-level stores
40
46
47
+
## Activation Metadata
48
+
49
+
`metadata-version: "2"` adds optional activation hints that stay provider-agnostic and can be consumed by Chalk Browser or another adapter later.
50
+
51
+
- `capabilities`
52
+
- Comma-separated canonical capability tags
53
+
- Use lowercase dot namespaces such as `docs.create` or `review.orchestrate`
54
+
- `activation-intents`
55
+
- Comma-separated user-facing trigger phrases
56
+
- Keep them broad and reusable; project-specific routing belongs in project manifests
57
+
- `activation-events`
58
+
- Comma-separated event names from this set:
59
+
- `user-prompt`
60
+
- `session-start`
61
+
- `pre-tool-use`
62
+
- `post-tool-use`
63
+
- `pre-compact`
64
+
- `session-end`
65
+
- `activation-artifacts`
66
+
- Comma-separated repo paths or globs touched by the skill, such as `.chalk/docs/**`
67
+
- `risk-level`
68
+
- One of `low`, `medium`, `high`
69
+
- Signals the skill's side-effect profile, not a security guarantee
70
+
71
+
These fields are hints only. Project-specific activation rules live outside the skill in the neutral project manifest documented in `docs/activation-model.md`.
72
+
41
73
## Versioning Rules
42
74
43
75
`version` follows SemVer:
@@ -60,5 +92,6 @@ Current validator enforces:
60
92
- Name format and folder-name match
61
93
- SemVer format
62
94
- Ownership rules
63
-
- `metadata-version`value
95
+
- `metadata-version`value (`1` or `2`)
96
+
- `metadata-version: "2"` activation metadata format when present
64
97
- Provider-agnostic policy (fails on provider-specific metadata files)
0 commit comments