Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .changeset/rename-help-to-agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
"@taskless/cli": patch
---

Complete the `help` → `agent` rename. The user-facing command was renamed in
0.10.0, but the internals kept the old name: the recipe directory moved from
`packages/cli/src/help/` to `packages/cli/src/agent/`, the `cli-help` OpenSpec
capability is now `cli-agent`, and the shipped skill and `/tskl` command no
longer tell agents to run the removed `npx @taskless/cli help <topic>` (they
now use `agent`, with the single-token topic names — `route`, `improve-rule`,
`delete-rule`, `create-sg-rule`, and siblings).

**Telemetry rename (hard cut, no dual-emit).** The `cli_help` event is renamed
to `cli_agent`. The `topic` property is unchanged. PostHog dashboards keyed on
`cli_help` will need updating — nothing is emitted under the old name.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ skills/
commands/
tskl/tskl.md # Single /tskl router command
packages/
cli/ # @taskless/cli — recipes live in cli/src/help/
cli/ # @taskless/cli — recipes live in cli/src/agent/
scripts/
sync-skill-versions.ts # Syncs metadata.version to CLI version
.claude-plugin/ # Claude Code Plugin Marketplace manifest
```

## Skill

Starting in v0.7, Taskless ships a **single consolidated skill** (`taskless`) plus a single `/tskl` slash command. The skill body is a small router; per-task instructions live behind `npx @taskless/cli help <topic>` and are fetched on demand.
Starting in v0.7, Taskless ships a **single consolidated skill** (`taskless`) plus a single `/tskl` slash command. The skill body is a small router; per-task instructions live behind `npx @taskless/cli agent <topic>` and are fetched on demand.

| Skill | Command | Description |
| ---------- | ------------- | ------------------------------------------------------ |
Expand Down Expand Up @@ -97,9 +97,9 @@ Tagging started at `v0.9.0`; earlier releases were not tagged.

In v0.7+, new agent-facing instructions are added as **recipes**, not skills. To add a recipe:

1. Create `packages/cli/src/help/<topic>.txt` following the canonical template (Goal / Preconditions / Steps / Input schema / Errors / See Also).
1. Create `packages/cli/src/agent/<topic>.txt` following the canonical template (Goal / Preconditions / Steps / Input schema / Errors / See Also).
2. Use `{{CLI_VERSION}}` and `{{INPUT_SCHEMA}}` placeholders for runtime interpolation.
3. For topics with a substantively different local-only flow, add `<topic>.anonymous.txt`. The help command's variant lookup is automatic.
3. For topics with a substantively different local-only flow, add `<topic>.anonymous.txt`. The `agent` command's variant lookup is automatic.
4. Update the topic table in `skills/taskless/SKILL.md` and `commands/tskl/tskl.md` so agents can discover the new topic.

### Distribution channels
Expand Down
28 changes: 14 additions & 14 deletions commands/tskl/tskl.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: "Taskless"
description: Run any Taskless action — create/improve/delete a rule, run check, manage auth, or wire CI. Routes via `npx @taskless/cli help <topic>` to fetch the canonical recipe and follow it.
description: Run any Taskless action — create/improve/delete a rule, run check, manage auth, or wire CI. Routes via `npx @taskless/cli agent <topic>` to fetch the canonical recipe and follow it.
category: Taskless
argument-hint: <describe what you want to do>
tags:
Expand All @@ -20,23 +20,23 @@ with Taskless before proceeding.
Otherwise, follow the same flow as the `taskless` skill:

1. Identify the topic from `$ARGUMENTS` using the table below.
2. Fetch the canonical recipe with `npx @taskless/cli help <topic>` (or
`npx @taskless/cli help <topic> --anonymous` if the user is offline or
2. Fetch the canonical recipe with `npx @taskless/cli agent <topic>` (or
`npx @taskless/cli agent <topic> --anonymous` if the user is offline or
explicitly asked for anonymous mode).
3. Follow the recipe step-by-step. The recipe is canonical for the
currently-installed CLI version; do not improvise from prior knowledge.

## Topics

| User wants | Topic |
| -------------------------- | ------------------------------------- |
| Update Taskless skills | run `npx @taskless/cli update` |
| Create a new rule | `npx @taskless/cli help rule create` |
| Improve an existing rule | `npx @taskless/cli help rule improve` |
| Delete a rule | `npx @taskless/cli help rule delete` |
| Check code against rules | `npx @taskless/cli help check` |
| Log in, log out, or status | `npx @taskless/cli help auth` |
| Wire into CI | `npx @taskless/cli help ci` |

If unsure, run `npx @taskless/cli help` (no args) for the topic
| User wants | Topic |
| -------------------------- | -------------------------------------- |
| Update Taskless skills | run `npx @taskless/cli update` |
| Create a new rule | `npx @taskless/cli agent route` |
| Improve an existing rule | `npx @taskless/cli agent improve-rule` |
| Delete a rule | `npx @taskless/cli agent delete-rule` |
| Check code against rules | `npx @taskless/cli agent check` |
| Log in, log out, or status | `npx @taskless/cli agent auth` |
| Wire into CI | `npx @taskless/cli agent ci` |

If unsure, run `npx @taskless/cli agent` (no args) for the topic
disambiguation table.
32 changes: 16 additions & 16 deletions openspec/specs/analytics/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ CLI events SHALL use the `cli_` prefix, with the taxonomy organized as a
`warningCount`, `findings`)
- `cli_error` — a single failure event with `command` and `code` (a stable
`CLIErrorCode`)
- `cli_help` — fired when the help command serves a request, with a `topic`
- `cli_agent` — fired when the `agent` command serves a request, with a `topic`
property (the served topic; the exact literal `"(index)"` when invoked with no
topic; the attempted topic for an unknown request). This replaces the previous
`help_index`, `help_<topic>`, and `help_unknown` events.
Expand All @@ -168,16 +168,16 @@ Commands that carry no concrete state beyond the invocation (e.g. `info`,
- **AND** SHALL receive a `cli_rule_created` event
- **AND** SHALL NOT receive `cli_rule_create` or `cli_rule_create_completed`

#### Scenario: Help fetch emits cli_help with a topic
#### Scenario: Recipe fetch emits cli_agent with a topic

- **WHEN** an agent runs `taskless help rule create`
- **THEN** PostHog SHALL receive a `cli_help` event with `topic: "rule create"`
- **AND** SHALL NOT receive a `help_rule_create` event
- **WHEN** an agent runs `taskless agent create-sg-rule`
- **THEN** PostHog SHALL receive a `cli_agent` event with `topic: "create-sg-rule"`
- **AND** SHALL NOT receive a `help_create_sg_rule` event

#### Scenario: Help with no topic emits cli_help with the index marker
#### Scenario: Fetch with no topic emits cli_agent with the index marker

- **WHEN** an agent runs `taskless help`
- **THEN** PostHog SHALL receive a `cli_help` event with `topic: "(index)"`
- **WHEN** an agent runs `taskless agent`
- **THEN** PostHog SHALL receive a `cli_agent` event with `topic: "(index)"`
- **AND** SHALL NOT receive a `help_index` event

#### Scenario: A command failure emits cli_error
Expand All @@ -196,24 +196,24 @@ Commands that carry no concrete state beyond the invocation (e.g. `info`,
The taxonomy SHALL keep wrong-topic re-routing derivable as a funnel signal from
the new events:

- A `cli_help { topic: A }` event not followed by the concrete event for topic A
- A `cli_agent { topic: A }` event not followed by the concrete event for topic A
(or by `cli_run` with the corresponding `command`), and then a subsequent
`cli_help { topic: B }`, indicates the agent fetched recipe A, did not act on
`cli_agent { topic: B }`, indicates the agent fetched recipe A, did not act on
it, and re-routed to topic B.
- A `cli_help` index-marker event followed by a `cli_help { topic }` event
- A `cli_agent` index-marker event followed by a `cli_agent { topic }` event
indicates the agent consulted the index before picking a topic (baseline).
- A `cli_help { topic }` event with no subsequent acting `cli_run` and no further
`cli_help` event indicates the agent abandoned the action.
- A `cli_agent { topic }` event with no subsequent acting `cli_run` and no further
`cli_agent` event indicates the agent abandoned the action.

No additional events SHALL be added to capture this signal directly — it is
derivable from the `cli_help` / `cli_run` sequence. Dashboards SHOULD surface
derivable from the `cli_agent` / `cli_run` sequence. Dashboards SHOULD surface
re-routing rates per topic.

#### Scenario: Funnel data supports wrong-topic detection

- **WHEN** dashboards are constructed in PostHog
- **THEN** the `cli_help` (with `topic`) and `cli_run` (with `command`) events
SHALL be sufficient to compute "rate of `cli_help { topic }` not followed by a
- **THEN** the `cli_agent` (with `topic`) and `cli_run` (with `command`) events
SHALL be sufficient to compute "rate of `cli_agent { topic }` not followed by a
corresponding acting `cli_run` within N minutes"

### Requirement: Telemetry failures are silent
Expand Down
Loading
Loading