Repository navigation
fix(prompts): render no CLI version or terminal command for a prompts host - #471
Conversation
…invocation A nightly's @taskless/cli/prompts fell back to its own pinned invocation, so every %(TASKLESS_CLI)s in a recipe body rendered as npx @taskless/cli-nightly@<version>, and a header: false render still carried the CLI version. The export now defaults to <taskless-cli>; the agent command keeps naming the build it was run from.
|
@claude /review |
|
Claude finished @theCodeDrift's task in 12m 27s —— View job Review mode: incremental — read 0 prior review thread(s) before reviewing.
AssessmentThe fix is narrow and correctly scoped: A few things I specifically checked and found fine:
No correctness, security, or test-adequacy issues found. Nothing new to flag. |
…re off route's final step, failure fallback and See Also named a recipe as a command to fetch, so a mechanics: false render still carried CLI invocations. Step 8 is now a whole-step substitution that names the destination by topic, and citations go through %(RECIPE_FETCH)s, which renders nothing with mechanics off. The default render is byte-identical.
|
@claude /review |
|
Claude finished @theCodeDrift's task in 15m 36s —— View job Review mode: incremental — read 0 prior review thread(s) before reviewing.
Previously assessed, not repeated
New in this pass (second commit:
|
Thanks. No findings to act on; the — AI Coding Agent |
Thanks. The one nit it raised, the overlong JSDoc line in — AI Coding Agent |
Two defects from #469 in what
@taskless/cli/promptsrenders for a host that has no terminal.1. A nightly rendered its own versioned invocation
The export fell back to the build's own invocation when a caller passed none. On a release that is the
<taskless-cli>marker; on a nightly it isnpx @taskless/cli-nightly@<version>, so every%(TASKLESS_CLI)sin a recipe body carried the nightly version, andgetPrompt(topic, { header: false })was no longer stable across CLI versions.The fallback logic and the affected recipes are identical in 0.11.2. The issue's 0-vs-N comparison was release against nightly, not a regression between versions: older nightlies render the same way.
Fix: the export (
getPrompt,getInstructions,PROMPTS) defaultsinvocationto<taskless-cli>. A host that imported the package did not launch it, which is what theinvocationdocs already promised.taskless agent <topic>and the other CLI render paths are unchanged and still name the build they were run from.2.
mechanics: falsestill named recipes as commands to fetchIn
route, step 8 ("Name the command"), the failure fallback and See Also all rendered<cli> agent <topic>. Withmechanics: falsethey now reduce to the topic name:create-vale-rulein its fence. It is a whole-step substitution (%(NAME_DESTINATION)s) with the title included, the same wayHOST_TOOLSswaps the onboard tool step.%(RECIPE_FETCH)s, written directly against the topic name (`%(RECIPE_FETCH)screate-sg-rule`). It renders<cli> agentby default and nothing with mechanics off, so the prose stays in the markdown where Vale and the cross-reference tests cover it.routerendered withmechanics: falsenow contains no CLI invocation at all. The default render is byte-identical (compared from the built package, with and without aninvocation), sotaskless agent routeoutput is unchanged and route stays at topic v5.Verification
build:nightly: 8 / 11 / 12 versioned invocations without the fix (route / create-sg-rule / create-vale-rule), 0 / 0 / 0 with it.test/nightly/prompts-invocation.test.ts(nightly vitest project) asserts that every exported topic's{ header: false, mechanics: false }render contains no versioned invocation and no CLI version. 8 of its tests fail without fix 1.test/prompts.test.tscover the topic-name render and the unchanged default.pnpm typecheck,pnpm lint, and the full suite (2114 tests) pass.Deliberately not covered
mechanics: falsestill acts only onroute. The authoring recipes (create-sg-rule,create-vale-rule,create-runtime-rule) carry 36 CLI commands between them, now with the version-free marker. About 20 of them are the authoring loop itself (verify,test,check), and a no-terminal replacement for those has to say how the host validates a rule, which this package cannot know. That needs the consumer's input rather than a guess, so it is left for a follow-up.Fixes #469