@open-agent-toolkit/cli 0.1.18 → 0.1.19
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oat-agent-instructions-apply
|
|
3
|
-
version: 1.6.
|
|
3
|
+
version: 1.6.2
|
|
4
4
|
description: Run when you have an agent instructions analysis artifact and want to generate or update instruction files. Creates a branch, generates files from templates, and optionally opens a PR.
|
|
5
5
|
disable-model-invocation: true
|
|
6
6
|
user-invocable: true
|
|
@@ -217,6 +217,7 @@ recommendation so plan review and generation stay aligned to the same pack file.
|
|
|
217
217
|
1. **AGENTS.md first** — the canonical, provider-agnostic file
|
|
218
218
|
2. **CLAUDE.md** — if claude provider is active, ensure `@AGENTS.md` import exists
|
|
219
219
|
3. **Glob-scoped rules** — author once in canonical format at `.agents/rules/{name}.md` with YAML frontmatter (`description`, `globs`, `activation`)
|
|
220
|
+
- `activation` MUST be one of `always`, `glob`, `agent-requested`, `manual` — any other value (e.g. `auto`) is rejected by `oat sync`. Use `glob` (with `globs`) for file-targeted rules; see `frontmatter/canonical-rule.md` for the full activation matrix.
|
|
220
221
|
- Provider-specific rule files are generated by `oat sync --scope project`
|
|
221
222
|
- Do not hand-author `.claude/rules/*.md`, `.cursor/rules/*.mdc`, or `.github/instructions/*.instructions.md`
|
|
222
223
|
4. **Copilot shim** — if copilot provider is active, generate `.github/copilot-instructions.md` from `frontmatter/copilot-shim.md` template
|
|
@@ -320,7 +321,7 @@ For each approved recommendation, in the order from Step 2:
|
|
|
320
321
|
- `Claim Corrections` replaces stale claims in updated files
|
|
321
322
|
6. For glob-scoped rules:
|
|
322
323
|
- Write the canonical markdown once to `.agents/rules/{name}.md`
|
|
323
|
-
- Include canonical rule frontmatter (`description`, `globs`, `activation`) instead of provider-specific wrappers
|
|
324
|
+
- Include canonical rule frontmatter (`description`, `globs`, `activation`) instead of provider-specific wrappers. `activation` must be one of `always`, `glob`, `agent-requested`, `manual` (not `auto`); use `glob` with `globs` for file-targeted rules. See `references/instruction-file-templates/frontmatter/canonical-rule.md`.
|
|
324
325
|
- After writing canonical rules, run `oat sync --scope project` to generate provider-specific rule files
|
|
325
326
|
- Verify the generated provider files exist for each active provider instead of maintaining them by hand
|
|
326
327
|
- Verify each generated provider file is trackable with `git check-ignore`; if any generated file is ignored,
|
|
@@ -503,5 +504,6 @@ Apply complete.
|
|
|
503
504
|
- Bundled Cursor-specific format reference: `references/docs/cursor-rules-files.md`
|
|
504
505
|
- Analysis artifact: `.oat/repo/analysis/agent-instructions-*.md`
|
|
505
506
|
- Templates: `references/instruction-file-templates/`
|
|
507
|
+
- Canonical rule frontmatter reference: `references/instruction-file-templates/frontmatter/canonical-rule.md`
|
|
506
508
|
- Apply plan template: `references/apply-plan-template.md`
|
|
507
509
|
- Tracking script: `.oat/scripts/resolve-tracking.sh`
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Canonical Rule Frontmatter
|
|
2
|
+
|
|
3
|
+
Canonical glob-scoped rules live at `.agents/rules/{name}.md`. This is the **single source you author** — `oat sync --scope project` reads it and generates the provider-specific rule files (`.claude/rules/*.md`, `.cursor/rules/*.mdc`, `.github/instructions/*.instructions.md`). Do not hand-author those provider files.
|
|
4
|
+
|
|
5
|
+
The canonical frontmatter is provider-agnostic and uses three fields: `description`, `globs`, and `activation`.
|
|
6
|
+
|
|
7
|
+
## Frontmatter Fields
|
|
8
|
+
|
|
9
|
+
| Field | Required | Type | Description |
|
|
10
|
+
| ------------- | ----------- | -------- | -------------------------------------------------------------------------------------- |
|
|
11
|
+
| `activation` | **Yes** | enum | One of `always`, `glob`, `agent-requested`, `manual`. See matrix below. |
|
|
12
|
+
| `globs` | Conditional | string[] | Glob patterns the rule targets. **Required when `activation: glob`.** |
|
|
13
|
+
| `description` | Conditional | string | Short purpose. **Required when `activation: agent-requested`**; recommended otherwise. |
|
|
14
|
+
|
|
15
|
+
> The `activation` value is validated. The only accepted values are
|
|
16
|
+
> `always`, `glob`, `agent-requested`, and `manual`. Any other value
|
|
17
|
+
> (e.g. `auto`) is rejected by `oat sync --scope project`.
|
|
18
|
+
|
|
19
|
+
## Activation Matrix
|
|
20
|
+
|
|
21
|
+
| `activation` | When to use | Required companion fields |
|
|
22
|
+
| ----------------- | ---------------------------------------------------------------- | ------------------------- |
|
|
23
|
+
| `glob` | Rule applies to files matching specific patterns | `globs` |
|
|
24
|
+
| `always` | Repo-wide rule that should be in every session | — |
|
|
25
|
+
| `agent-requested` | Agent decides relevance from the description (no file targeting) | `description` |
|
|
26
|
+
| `manual` | Opt-in only — user explicitly invokes the rule | — |
|
|
27
|
+
|
|
28
|
+
Selection rule of thumb: if the recommendation targets file patterns, use `activation: glob` with `globs`. Use `always` only for genuinely repo-wide guidance, `agent-requested` for description-driven rules with no glob, and `manual` for opt-in references.
|
|
29
|
+
|
|
30
|
+
## Examples
|
|
31
|
+
|
|
32
|
+
### Glob-scoped (most common)
|
|
33
|
+
|
|
34
|
+
```yaml
|
|
35
|
+
---
|
|
36
|
+
description: 'Firebase handler trigger/registration conventions'
|
|
37
|
+
activation: glob
|
|
38
|
+
globs:
|
|
39
|
+
- 'src/functions/**/*.ts'
|
|
40
|
+
---
|
|
41
|
+
# {Rule Title}
|
|
42
|
+
|
|
43
|
+
{ Rule body — identical to glob-scoped-rule.md template body }
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Always-on
|
|
47
|
+
|
|
48
|
+
```yaml
|
|
49
|
+
---
|
|
50
|
+
description: 'Repo-wide security non-negotiables'
|
|
51
|
+
activation: always
|
|
52
|
+
---
|
|
53
|
+
# {Rule Title}
|
|
54
|
+
|
|
55
|
+
{ Rule body }
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Agent-requested (no globs)
|
|
59
|
+
|
|
60
|
+
```yaml
|
|
61
|
+
---
|
|
62
|
+
description: 'Patreon integration gotchas — apply when touching billing flows'
|
|
63
|
+
activation: agent-requested
|
|
64
|
+
---
|
|
65
|
+
# {Rule Title}
|
|
66
|
+
|
|
67
|
+
{ Rule body }
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Manual (opt-in)
|
|
71
|
+
|
|
72
|
+
```yaml
|
|
73
|
+
---
|
|
74
|
+
description: 'One-off migration playbook'
|
|
75
|
+
activation: manual
|
|
76
|
+
---
|
|
77
|
+
# {Rule Title}
|
|
78
|
+
|
|
79
|
+
{ Rule body }
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## How It Maps to Providers
|
|
83
|
+
|
|
84
|
+
`oat sync --scope project` translates each canonical `activation` to the equivalent provider frontmatter:
|
|
85
|
+
|
|
86
|
+
| Canonical | Claude (`.claude/rules/*.md`) | Cursor (`.cursor/rules/*.mdc`) | Copilot (`.github/instructions/*`) |
|
|
87
|
+
| ----------------- | ----------------------------- | ------------------------------------ | ---------------------------------- |
|
|
88
|
+
| `glob` | `paths` | `alwaysApply: false` + `globs` | `applyTo` |
|
|
89
|
+
| `always` | no frontmatter (always-on) | `alwaysApply: true` | repo-wide `applyTo` / shim |
|
|
90
|
+
| `agent-requested` | degrades to always-on | `alwaysApply: false` + `description` | degrades to always-on |
|
|
91
|
+
| `manual` | omitted / opt-in | no frontmatter | omitted |
|
|
92
|
+
|
|
93
|
+
See the per-provider frontmatter docs in this directory (`claude-rule.md`, `cursor-rule.md`, `copilot-instruction.md`) for the generated output formats, and `references/docs/rules-files.md` for the full cross-provider deep dive.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-agent-toolkit/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Open Agent Toolkit CLI",
|
|
6
6
|
"homepage": "https://github.com/voxmedia/open-agent-toolkit/tree/main/packages/cli",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"ora": "^9.0.0",
|
|
35
35
|
"yaml": "2.8.2",
|
|
36
36
|
"zod": "^3.25.76",
|
|
37
|
-
"@open-agent-toolkit/control-plane": "0.1.
|
|
37
|
+
"@open-agent-toolkit/control-plane": "0.1.19"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/node": "^22.10.0",
|