feat(prompts): export route from @taskless/cli/prompts - #251
feat(prompts): export route from @taskless/cli/prompts#251thecodedrift wants to merge 4 commits into
Conversation
|
@claude /review |
|
Claude finished @thecodedrift's task in 3m 54s —— View job ReviewReview mode: incremental — read 0 prior review thread(s) before reviewing.
The diff itself ( Three things worth your attention: [New] Spec left inconsistent with the code (not part of this diff, but governs it).
That's now factually wrong: [New] Changeset semver classification — inline comment posted on [New, lower confidence] Nothing else stood out — the diff's own logic (list membership, doc-comment rewrite) is correct and internally consistent with itself. |
The MODIFIED block is matched to the standing requirement by title. Rename it and nothing is applied: the standing text survives untouched, the delta is discarded, and `openspec validate --strict` passes on both sides. Found by doing it. The delta for `cli-knowledge-prompts` renamed a requirement to say it covers the chooser as well as the destinations, and the archive left the old requirement exactly as it was, with zero occurrences of the new text. This is the quieter half of the trap already recorded here. Dropping a scenario at least changes something; a rename looks like a substantial edit and does nothing. A title that should change is a REMOVED plus an ADDED. Also corrects the verification procedure, which bit me twice while measuring this. Reset to the scratch commit's own SHA, not to `HEAD~1`: resetting past it deletes the change under test, and `git clean` then removes what the reset left untracked.
5cf0082 to
337fbea
Compare
`route` sat in INTERNAL_TOPICS on two grounds. It contains local mechanics a Worker cannot run, and a consumer could adjudicate ambiguous calls from the three authoring recipes it already had. The first is true and does not defeat it: a service consumer ignores the mechanics, which is a smaller and more honest adaptation than restating the criteria. The second was tested in the field and failed. The platform generator hand-wrote the same judgement, reached `static | runtime` with nowhere to put `vale`, and generated every prose rule as an ast-grep rule while its own delivery layer could already serve a Vale one. That is the dead end this surface exists to remove, mirrored. The file already warned that exporting a chooser without its destinations strands a consumer that can route but not author; destinations without the chooser strand one that can author but not route, and it writes its own chooser rather than stopping. Reworded one sentence to avoid the phrase `from "which engine"`, which the source-level import scanner in test/prompts.test.ts reads as an import. That is the false positive the code styleguide documents by name, still live in the source-level half of a check whose built-output half was replaced by a vite plugin. Filed separately rather than fixed here.
…lean absence Exporting `route` shipped a recipe whose first two steps tell a reader to run `taskless detect --json` and `taskless info --json`. A service consumer cannot, and `invocation` does not answer it: that option substitutes a binary NAME inside a command, so setting it to a phrase renders Run: ``` no CLI is available detect --json ``` which is an instruction to execute something that does not parse. Worse than either honest answer, and it worked only because a forgiving model skipped past it to the criteria. `mechanics: false` replaces both steps with what the caller must supply. It does not drop them: the routing criteria are stated in terms of linters, languages, rule styles, `loggedIn` and `ghOwner`, so a consumer that reads nothing there loses the inputs rather than the commands. Rendered through the variable table as whole blocks rather than stripped after the fact, so the default can be proved rather than asserted. Measured byte-identical at 18161 bytes, `diff` clean. `TASKLESS_CLI` and the new blocks now share one invocation resolver so the command inside a step cannot disagree with the command beside it.
The platform generator asked for this, and their evidence is the argument.
Why it was withheld, and why both reasons fail
routesat inINTERNAL_TOPICSon two grounds, both recorded insrc/prompts/index.ts:taskless detect, on-device authoring) a Worker cannot run.The first is true and does not defeat it. A service consumer ignores the mechanics, which is a smaller and more honest adaptation than restating the criteria.
The second was tried in the field and failed. The generator hand-wrote the same judgement, its classifier reached
static | runtimewith nowhere to putvale, and every prose rule was generated as an ast-grep rule — while its own delivery layer could already serve a Vale one. It shipped a tier it was incapable of producing.The file already contains the argument against itself:
We shipped the mirror image. Destinations without the chooser strand a consumer that can author but not route, and it writes its own chooser rather than stopping.
What lands
routemoves fromINTERNAL_TOPICStoTOPICS, and the reasoning in both doc comments is rewritten to record why rather than leaving the old justification standing. The completeness check (TOPICS + INTERNAL_TOPICSaccounts for every canonical recipe on disk) holds unchanged.Verified against the built entry, not just the source, since the two render options the consumer named are load-bearing:
header: falsematters to them because the version line would churn their prompt-cache key on every nightly publish.One thing found on the way, filed not fixed
The first run failed with:
My doc comment contained the phrase
a different axis from "which engine", and the source-level import scanner readfrom "which engine"as an import.That is the false positive
.conventions/STYLEGUIDE-CODE.mddocuments by name in its worked example. The resolution recorded there — move the check into a vite plugin, delete the test — was applied to the built-output scanner. A source-level regex scanner survived and reproduces the same defect, on the same phrase.Reworded the sentence here so this PR stays about one thing. Filed separately, because the next person to write that phrase hits it again and the styleguide currently reads as though it cannot happen.
Checks
pnpm typecheck,pnpm lint, full suite (1181 passed),pnpm cli checkwith only the 4 known pre-existingno-hedgingwarnings.