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
feat(cli): add investigate + communicate actions and confirmation protocol to AI skills (#1247)
* feat(cli): add manage action with confirmation protocol to AI skills
Adds a `manage` action to `checkly skills` covering operational
commands (checks list/get, incidents lifecycle, status pages) and
documents the confirmation protocol for write commands.
- Adds confirmation protocol note to SKILL.md (always in context)
- Adds manage.md with full protocol docs and rules for agents
- Adds manage-checks.md and manage-incidents.md references
- Updates prepare-ai-context.ts to process manage references
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: update generated skills/checkly/SKILL.md
Regenerated from prepare-ai-context to include the manage action
and confirmation protocol section.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* docs: add AI context regeneration workflow to CONTRIBUTING.md
Documents the required steps when modifying agent skill sources:
run prepare, copy generated SKILL.md, and commit both.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor(cli): align AI skills with RFC — split manage into investigate + communicate
Replace the single `manage` action with `investigate` and `communicate`
per the Skills Architecture RFC. Check inspection goes under `investigate`,
incident lifecycle under `communicate`. The confirmation protocol now
lives in `communicate.md` where write commands are documented.
Also generalizes the prepare script's reference command generation so
future actions with references don't need one-off functions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Update packages/cli/src/ai-context/references/communicate-incidents.md
Co-authored-by: Stefan Judis <stefanjudis@gmail.com>
* refactor(cli): unify action processing in prepare-ai-context
Remove the special-case handling for configure and the brittle
`action.id === 'configure'` guard. All actions with references now go
through a single loop that applies replaceExamples uniformly (no-op
when there are no template strings).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(cli): generate skills example commands from ACTIONS
The examples section in `checkly skills` was hardcoded with only
initialize/configure. Generate it from the ACTIONS array so new actions
like investigate and communicate appear automatically.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Stefan Judis <stefanjudis@gmail.com>
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,6 +57,27 @@ You can use the current branch of the code against any examples in the `/example
57
57
2. Run `npm create checkly -- --template boilerplate-project`
58
58
3. Just use `npx checkly` as normal.
59
59
60
+
## AI context and agent skills
61
+
62
+
The CLI ships agent skills (`skills/checkly/SKILL.md`) and serves reference docs via `npx checkly skills`. The source files live in `packages/cli/src/ai-context/` and are processed at build time.
63
+
64
+
When modifying AI context sources (`src/ai-context/skill.md`, `src/ai-context/references/`, or `src/ai-context/context.ts`):
65
+
66
+
1. Run the full prepare step from the `packages/cli` directory:
67
+
```bash
68
+
npm run prepare --workspace packages/cli
69
+
```
70
+
This compiles TypeScript, generates examples from fixtures, and runs `prepare-ai-context.ts` to produce the output in `dist/ai-context/`.
71
+
72
+
2. Copy the generated public skill to the tracked location:
description: 'Incident lifecycle (`incidents create`, `update`, `resolve`, `list`) and status pages',
63
+
},
64
+
]asconst
65
+
52
66
exportconstSKILL={
53
67
name: 'checkly',
54
68
description: 'Get all the information and context to let your agent initialize, set up, create, test and manage your monitoring checks using the Checkly CLI.',
@@ -64,6 +78,16 @@ export const ACTIONS = [
64
78
description: 'Learn how to create and manage monitoring checks using Checkly constructs and the CLI.',
65
79
references: REFERENCES,
66
80
},
81
+
{
82
+
id: 'investigate',
83
+
description: 'Access check status, analyze failures, and investigate errors.',
84
+
references: INVESTIGATE_REFERENCES,
85
+
},
86
+
{
87
+
id: 'communicate',
88
+
description: 'Open incidents and lead customer communications via status pages.',
Create, update, and resolve incidents on status pages. All write commands require confirmation (see `npx checkly skills communicate` for the confirmation protocol).
4
+
5
+
## List incidents
6
+
7
+
```bash
8
+
npx checkly incidents list
9
+
npx checkly incidents list --status active --output json
10
+
npx checkly incidents list --status resolved --limit 5
11
+
```
12
+
13
+
Flags:
14
+
-`--status <status>` — `active` (default), `resolved`, or `all`
15
+
-`--limit <n>` — max incidents to return
16
+
-`-o, --output <format>` — `table` (default), `json`, or `md`
Use `npx checkly status-pages list` to find status page IDs and their services. Use `--output json` to get machine-readable service IDs for incident creation.
Open incidents and lead customer communications via status pages.
4
+
5
+
## Confirmation Protocol
6
+
7
+
Write commands (`incidents create`, `incidents update`, `incidents resolve`, `deploy`, `destroy`) require confirmation before executing. When the CLI detects an agent environment, it returns a JSON envelope with exit code 2 instead of executing:
1. When exit code is 2 and output contains `"status": "confirmation_required"`, **always present the `changes` array to the user** and ask for confirmation.
23
+
2.**Never auto-append `--force`** — only run the `confirmCommand` after the user explicitly approves.
24
+
3. This applies to **every** write command, not just the first one. Incident updates and resolutions also require confirmation.
25
+
4. Use `--dry-run` to preview what a command will do without executing or prompting.
Copy file name to clipboardExpand all lines: packages/cli/src/ai-context/skill.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,4 +22,10 @@ The skill is structured for efficient context usage:
22
22
23
23
Agents load what they need for each task.
24
24
25
+
## Confirmation Protocol
26
+
27
+
Write commands (e.g. `incidents create`, `deploy`, `destroy`) return exit code 2 with a `confirmation_required` JSON envelope instead of executing. **Always present the `changes` to the user and wait for approval before running the `confirmCommand`.** Never auto-append `--force`. This applies to every write command individually — updates and resolutions need confirmation too, not just the initial create.
28
+
29
+
Run `npx checkly skills communicate` for the full protocol details.
0 commit comments