fix(cli): finish the help → agent rename - #115
Conversation
The user-facing command became `taskless agent <topic>` in #102, but the rename stopped at the surface. This carries it through the rest: - Specs: `taskless help …` invocations and "help subcommand" prose across analytics, cli, cli-init, cli-knowledge-prompts, cli-onboard, skills, and skill-taskless now name `agent` and the single-token topics. The three references in cli-agent that assert the *removed* command no longer serves recipes are kept deliberately. - Capability: `openspec/specs/cli-help/` -> `openspec/specs/cli-agent/`, with the two live cross-references updated. Archived changes are untouched. - Source: `packages/cli/src/help/` -> `packages/cli/src/agent/` (20 recipes), including the `import.meta.glob` the build depends on. The three test files named for the old command are renamed to match. - Telemetry: `cli_help` -> `cli_agent`, a hard cut with no dual-emit. The comment recording the earlier "keep cli_help" decision is replaced, and the existing source-scan guard now also catches a `cli_help` capture site. Fixes #107 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jwc9FFroR3mTZ4hLiSkkX3
There was a problem hiding this comment.
Pull request overview
Completes the help → agent rename across the Taskless CLI ecosystem so the command surface, embedded recipe directory, exported prompt API, OpenSpec docs, shipped skill artifacts, tests, and telemetry all consistently use agent (including the cli_agent intent event).
Changes:
- Update shipped skill/router docs (
skills/taskless,/tskl, README) to fetch recipes vianpx @taskless/cli agent <topic>and use the new single-token topic names. - Move/standardize the embedded recipe directory and prompt embedding to
packages/cli/src/agent, updating tests and OpenSpec references accordingly. - Rename intent telemetry from
cli_helptocli_agentand update/extend telemetry regression tests.
Reviewed changes
Copilot reviewed 22 out of 42 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| skills/taskless/SKILL.md | Updates the shipped skill router to fetch via agent and lists new topic names. |
| README.md | Updates repository docs to reflect src/agent/ and agent <topic> usage. |
| packages/cli/test/recipe-cross-references.test.ts | Updates recipe directory lookup from src/help → src/agent and validates cross-references. |
| packages/cli/test/prompts.test.ts | Updates tests to read recipe topics from src/agent. |
| packages/cli/test/agent-telemetry.test.ts | Updates assertions for cli_agent capture and expands legacy-event scanning. |
| packages/cli/test/agent-routing-telemetry.test.ts | Updates routing telemetry expectations from cli_help → cli_agent. |
| packages/cli/test/agent-extensions.test.ts | Minor refactor + keeps coverage for agent topic resolution and anonymous variant fallback. |
| packages/cli/src/telemetry-run.ts | Updates docs for cli_run.command derivation to reference cli_agent. |
| packages/cli/src/prompts/recipes.ts | Renames embedding/lookup to use ../agent/*.txt and renames internal maps accordingly. |
| packages/cli/src/prompts/index.ts | Updates public prompt API docs/error strings to reference agent/*.txt. |
| packages/cli/src/commands/agent.ts | Renames intent telemetry emission from cli_help → cli_agent and updates inline rationale. |
| packages/cli/src/agent/verify-rule.txt | Adds/updates agent recipe for verify/test by path (engine-agnostic). |
| packages/cli/src/agent/update.txt | Adds/updates agent recipe for non-interactive skill update flow. |
| packages/cli/src/agent/rule.txt | Adds/updates umbrella “rule” topic routing to specific rule operations. |
| packages/cli/src/agent/rule-meta.txt | Adds/updates agent-internal recipe for reading rule metadata via rule meta. |
| packages/cli/src/agent/route.txt | Adds/updates the canonical routing decision recipe (route). |
| packages/cli/src/agent/onboard.txt | Adds/updates onboarding discovery recipe (candidate rule mining flow). |
| packages/cli/src/agent/init.txt | Adds/updates recipe explaining interactive init/wizard and scripted init. |
| packages/cli/src/agent/info.txt | Adds/updates recipe for state/version/auth inspection via info --json. |
| packages/cli/src/agent/improve-rule.txt | Adds/updates API-backed improve recipe (rule improve --from ...). |
| packages/cli/src/agent/improve-rule.anonymous.txt | Adds/updates local-only improve recipe with verify/test feedback loop. |
| packages/cli/src/agent/detect.txt | Adds/updates recipe for deterministic local detection via detect --json. |
| packages/cli/src/agent/delete-rule.txt | Adds/updates recipe for local delete flow via rule delete. |
| packages/cli/src/agent/create-vale-rule.txt | Adds/updates the Vale authoring recipe (scoping, fixtures, verify/test). |
| packages/cli/src/agent/create-sg-rule.txt | Adds/updates the ast-grep authoring recipe (local-only). |
| packages/cli/src/agent/create-runtime-rule.txt | Adds/updates logged-out runtime-rule guidance + login gate explanation. |
| packages/cli/src/agent/create-remote-rule.txt | Adds/updates service-backed rule generation recipe (rule create --from ...). |
| packages/cli/src/agent/create-legacy-rule.txt | Adds/updates “write it in the repo’s existing linter” recipe. |
| packages/cli/src/agent/ci.txt | Adds/updates CI wiring recipe, including a GitHub Actions reference template. |
| packages/cli/src/agent/check.txt | Adds/updates check recipe, including runtime-rule verification/skip semantics. |
| packages/cli/src/agent/auth.txt | Adds/updates auth management recipe (login/logout/status) and JSON envelope notes. |
| openspec/specs/skills/spec.md | Updates skills spec text to reference agent command and src/agent recipes. |
| openspec/specs/skill-taskless/spec.md | Updates Taskless skill spec requirements to use tskl agent <topic>. |
| openspec/specs/cli/spec.md | Updates CLI spec references from help embedding/registration to agent. |
| openspec/specs/cli-rules/spec.md | Updates rules spec cross-reference from cli-help → cli-agent. |
| openspec/specs/cli-onboard/spec.md | Updates onboard spec to reference agent recipes and src/agent/onboard.txt. |
| openspec/specs/cli-knowledge-prompts/spec.md | Updates knowledge-prompts spec from help/*.txt to agent/*.txt terminology. |
| openspec/specs/cli-init/spec.md | Updates init spec wording to reference the agent topic index. |
| openspec/specs/cli-agent/spec.md | Renames/updates the capability spec from “CLI Help” to “CLI Agent”. |
| openspec/specs/analytics/spec.md | Updates analytics taxonomy/spec scenarios from cli_help → cli_agent. |
| commands/tskl/tskl.md | Updates /tskl router command to fetch via agent and use new topic names. |
| .changeset/rename-help-to-agent.md | Adds a changeset describing the rename completion + telemetry hard cut. |
Suppressed comments (1)
packages/cli/test/recipe-cross-references.test.ts:59
- The cross-reference check only validates
taskless agent <topic>links. The new recipes includenpx @taskless/cli agent <topic>references (e.g. route/auth flows), which currently bypass this guard and could drift to dangling topics unnoticed. Extend the regex to also match thenpx @taskless/cli...form.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@claude /review |
|
Claude finished @thecodedrift's task in 3m 40s —— View job Review complete
Overall assessmentThis is a clean, well-scoped mechanical rename with unusually thorough self-verification already documented in the PR description. I reviewed all 42 changed files (specs, source, tests, changeset, skill/router docs), traced call sites of the renamed symbols, and grepped the repo for stragglers. Findings: No correctness bugs found.
One test-coverage note (posted as an inline comment on No issues with the telemetry hard-cut, the OpenSpec capability rename ( |
…on form
The dangling-topic guard matched only `taskless agent <topic>`, so the
`npx @taskless/cli agent <topic>` phrasing in create-runtime-rule.txt:92
and route.txt:125 bypassed it entirely -- the exact failure class the
guard's doc comment exists to catch. Anchor both this guard and the
`taskless help` negative assertion on either the binary name or the
package specifier, which keeps prose ("the agent should...") from being
read as a citation.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jwc9FFroR3mTZ4hLiSkkX3
Addressed the one finding (the dangling-topic guard missing the — AI Coding Agent |
The one suppressed comment ( — AI Coding Agent |
|
@claude /review |
|
Claude finished @thecodedrift's task in 5m 22s —— View job Review complete
Overall assessmentThis re-review covers the diff as it stands after cac6c99 (the fix for the Confirmed correct, independently re-checked:
New finding this pass — incomplete rename in spec prose (posted inline): The PR's stated "spec prose and invocations" layer (~30 edits/8 files) missed several spots, concentrated in
These are documentation-only (OpenSpec doesn't semantically validate prose against code, so No other correctness, security, performance, or test-adequacy issues found. The telemetry hard-cut, the OpenSpec capability rename, source-directory move, and shipped skill/router doc updates are otherwise sound and internally consistent. |
Both found by the re-review that ran after the review workflow was fixed to check out the PR ref. Neither was reachable before: they sit outside the diff hunks, so a reviewer reading only `gh pr diff` could not see them, and a reviewer reading `main` had no `agent` tree at all. `cli-knowledge-prompts/spec.md` had the densest concentration of misses of any spec touched — six references, several a paragraph away from lines this sweep did update, including a scenario whose heading was renamed to "agent command" while its WHEN clause still said `help`. `cli/spec.md`'s scenario body was updated but its heading still read "Help subcommand is registered", which left it naming a subcommand that no longer exists, in a list where every sibling is named for its own command.
taskless help <topic>becametaskless agent <topic>in #102, but the rename stopped at the command. The specs, the capability name, the source directory, the telemetry event, and the shipped skill files all still saidhelp. This finishes it.Four layers
openspec/specs/cli-help/→cli-agent/, plus 2 cross-referencespackages/cli/src/help/→src/agent/(20 recipes), 4 referencing filescli_help→cli_agent, 5 call sitesNot a substitution. Topics also became single tokens in #102, so
taskless help rule createistaskless agent routein one place (the authoring front door) andtaskless agent create-sg-rulein another (a real fetch, not the multi-positional error path) — read individually rather than swept. Every topic name written was confirmed against a realpackages/cli/src/agent/<topic>.txt.A shipped artifact was telling agents to run a command that does not exist
Outside the four layers, and the reason this is a
fixrather than a docs change:skills/taskless/SKILL.mdandcommands/tskl/tskl.md— the skill files installed into user projects — still instructed agents to runnpx @taskless/cli help <topic>with topics that were removed (rule create,static,existing).README.mdcarried 4 more.No released version is affected. npm has 0.10.2, which predates the rename, so its CLI and its skill files agree. The breakage exists only on unreleased
main, and 0.11.0 ships theagentcommand and the corrected skill together — so it self-corrects on the first update.Nothing caught it.
recipe-cross-references.test.tsguards exactly this class of defect — a shipped artifact naming a dead topic — for recipes, and the guard does not extend to the skill files. Left as-is deliberately: asserting on markdown contents costs more than it catches.Telemetry is a hard cut
cli_help→cli_agent, no dual-emit.agent.tscarried a comment explaining that the event name deliberately stayedcli_help; that decision is reversed and the comment now records the reversal rather than contradicting the code. Dashboards keyed oncli_helpneed updating — the same note the 0.10.0 CHANGELOG made for its rename.Residual
help, all correctNegative assertions in
cli-agent/spec.mdthattaskless helpis gone, the test that enforces them, prose naming the pre-rename event, andCHANGELOG.md/openspec/changes/archive/**/ pending changesets — all history or deliberate. Untouched.Verification
pnpm lintclean ·pnpm typecheck1/1 ·pnpm test602 passing ·openspec validate --all --strict23/0 (spec/cli-agentpresent, nocli-help)Built binary re-checked after the directory rename, since
import.meta.glob("../help/*.txt")is the piece most likely to break silently:agent checkreturns real content,agent routeand the bareagentindex both serve.git statusshows 24 renames asR, not delete+add.Not fixed
.conventions/posthog.mddocuments an event table (cli_help_auth,cli_rule_create, …) that is entirely pre-0.10.0 taxonomy — every row was already wrong before this change. Rewriting it against the current scheme is a separate change, not a rename.Fixes #107