docs(openspec): export knowledge prompts as @taskless/cli/prompts - #70
Draft
thecodedrift wants to merge 6 commits into
Draft
docs(openspec): export knowledge prompts as @taskless/cli/prompts#70thecodedrift wants to merge 6 commits into
thecodedrift wants to merge 6 commits into
Conversation
This was referenced Jul 28, 2026
…rompts Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LdEhGzeQfSGJM3nKKNj7Bp
Prompts become render functions returning fully-rendered text rather than raw placeholder-bearing strings — every %(KEY)s resolves inside the package, and rendering carries applyCliInvocation so the export cannot diverge from `taskless help` under non-prod builds. Confirms @taskless/cli/prompts as the published subpath, and adds a completeness check requirement so topic membership stays an explicit list that a new or deleted recipe file cannot silently change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CDv57zHq7abms3RReSQw6q
The cloud consumer established that only `static` is reachable server-side: `route` decides a pre-service authoring destination, `remote` states the service owns rule-type selection, and `detect` / `existing` / `rule-meta` are local-only. TOPICS ships minimal and the rest stay internal, since an exported name is a promise held for a major. Recorded as D6, correcting an earlier six-topic assumption this design had read off the consumer's draft rather than the recipes. Adds PromptOptions.header (default true) so a consumer can drop the version-bearing header line, which would otherwise sit in an LLM prompt-cache key and be invalidated by every CLI publish. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CDv57zHq7abms3RReSQw6q
The consumer retracted its prerelease request, preferring to wait for a stable version over pinning a moving one against an API that isn't semver-stable yet. Nothing downstream now waits on this change, so it releases at whatever cadence suits this repo. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CDv57zHq7abms3RReSQw6q
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CDv57zHq7abms3RReSQw6q
Two units, each independently safe: a pure refactor that must leave help output byte-identical, then the new export surface nothing depends on yet. Splitting them keeps the risky part — touching a shipped command — reviewed apart from the new public API. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CDv57zHq7abms3RReSQw6q
thecodedrift
force-pushed
the
openspec/export-knowledge-prompts
branch
from
July 29, 2026 19:03
dbbd881 to
27116b9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Exposes the CLI's
help/*.txtknowledge recipes as an importable@taskless/cli/prompts, so the generator can source routing guidance from the same text the CLI serves rather than a local copy that drifts.Prompts are functions returning fully-rendered text, not raw strings. Every
%(KEY)sresolves inside the package —CLI_VERSIONfrom the build version,INPUT_SCHEMAfrom the Zod source,PACKAGE_MANAGER_DLXas an agent-fill marker — so no consumer handles a template dialect.PromptOptionscarriesanonymous,packageManagerDlx, andheader;header: falsedrops the version-bearing first line, which would otherwise sit in an LLM consumer's prompt-cache key and be invalidated by every CLI publish. Thehelpcommand shares both the embedded source and the render path, so the two surfaces cannot diverge.TOPICSships withstaticonly.route,remote,detect,existing, andrule-metaare recorded as internal — each verified unreachable server-side, sinceroutepicks a pre-service authoring destination,remote.txtstates the service owns rule-type selection, anddetectdocuments a subprocess. Topic names are semver-tracked public API, so exporting one speculatively spends that promise for nothing. A completeness check fails CI when a recipe file is neither exported nor explicitly internal.stack: openspec-archivedwill be red until the change is implemented and archived. That is expected: archiving now would delete the spec before anything is built against it.Where this sits
Each change is independently landable: one OpenSpec change, one PR, archived on merge. The archive gate requires it — a tip PR must leave
openspec/changes/empty — so nothing here is stacked and none of these depend on a shared branch.vale/directory it scaffolds) and #72 (needs a binary to resolve)Only #71 has prerequisites. The other three can land in any order.
#70 and #71 are coupled by exactly one line: whichever lands second adds the engine-selection topic to
TOPICS. Ordering between them doesn't matter.Downstream, the generator's decision router (TSKL-279) needs a published release containing #70 and #71. It consumes a normal release — no prerelease, no path dependency — so it waits without blocking anything here.
Fixes OSS-20