Dashboard › cli › Distillation
f13bf91a-d555-4de4-8651-abe9a5da461b["lore_tm_v1_2ca4aCXo6rEsC9uECzmi6J9MwflqnoFO5SAvWd0CZ1g","lore_tm_v1_kuC1vXdc2kr1YQxRxurYpKcfJrD_YyUwXHXNkfTZ8bc","lore_tm_v1_UYjQGSWbdwDS7hdi8ezBBsh0CBbEE_f2-ZhkD64wxJg","lore_tm_v1_Y2S3gxzZEbtJm41KjsFQB8aVUgkrsJH9qzxWpfBpE_4","lore_tm_v1_0KHIA2UtGtOeQN6BYOB28WZhmqPAaK3QaF6owjQPgeg","lore_tm_v1_ihwhCAkQwQI8NB7LigbtZBe7zlaw2Q4lw02vo7Rt5QQ","lore_tm_v1_d7l4ra0bVBYhVqkze7G2SYCyPkUQBt9sU48aAH4AEcs","lore_tm_v1_qTVa9cz7x6fFLS-dLbNyP_8vG4X6ZnRRb1-sOmPvb6U","lore_tm_v1_wxaoTcqzYOuHWkoUAlpzdQGWZzn0Ou1Xlw7Y5_2y7dw","lore_tm_v1_FxtkurLiy89mQ5r3GQjnZ6G049g3Z2RaMAGKPTyQKbQ"]
packages/cli/node_modules/@stricli/core/dist/index.js lines 1470β1493, config.documentation.renderHelp?.() receives { prefix: result.prefix, unprocessedInputs: result.unprocessedInputs, helpRequested: result.helpRequested }; a returned string is written to stdout and exits with ExitCode.Success, while a non-string falls back to result.target.formatHelp(...).packages/cli/node_modules/@stricli/core/dist/index.js passes prefix, conditional version/help-all flags, argument-escape-sequence support, hidden-route visibility, documentation config, case-style aliases, localized text, and ANSI-color state to result.target.formatHelp(...).packages/cli/node_modules/@stricli/core/dist/index.js lines 1495β1515, failure of await context.forCommand({ prefix: result.prefix }) is formatted with text.exceptionWhileLoadingCommandContext(...), written to stderr, and returns ExitCode.ContextLoadError; otherwise runCommand() receives the resolved context, unprocessed inputs, scanner/documentation configs, error formatting, and determineExitCode.getPositionalString() tests in packages/cli/test/lib/introspect.test.ts verify, in order: undefined β ""; tuple placeholders β "<org> <project>"; optional tuple entries β "<required> [<optional>]"; missing tuple placeholders β "<arg0> <arg1>"; array placeholder β "<command...>"; missing array placeholder β "<args...>".packages/cli/test/lib/introspect.test.ts include makeCommand(overrides), makeRouteMap(entries, overrides), and makeEntry(name, target, hidden = false); type-guard tests require isRouteMap() and isCommand() to distinguish route maps from commands.packages/cli/test/lib/introspect.test.ts verifies extractFlags() maps a boolean json flag with brief "Output JSON" and default false to { name: "json", brief: "Output JSON", kind: "boolean", default: false, optional: true, variadic: false, hidden: false }.validationError(headline, examples, field?, note?) in packages/cli/src/lib/errors.ts returns new ValidationError(buildValidationMessage(headline, examples, note), field).buildValidationMessage() in packages/cli/src/lib/errors.ts starts with the headline, adds a blank line plus "Try:" and each example prefixed by two spaces when examples exist, then adds a blank line plus Note: ${note} when a note exists.ValidationError in packages/cli/src/lib/errors.ts extends CliError, calls super(message, EXIT.VALIDATION), sets name = "ValidationError", and preserves an optional field.buildCommand(builderArgs) in packages/cli/node_modules/@stricli/core/dist/index.js validates reserved flags help, helpAll, and help-all; reserved alias h; negation collisions; and invalid variadic separators before constructing the command.InternalError messages identifying the affected internal flag name and separator.buildCommand(), a direct func becomes loader = async () => builderArgs.func; otherwise builderArgs.loader is used. The resulting command exposes parameters, documentation getters, usage/help formatters, and usesFlag(flagName), which checks both flags and aliases.generateCommandHelpLines(builderArgs.parameters, builderArgs.docs, args), joined with "\n", and terminated by a final newline.generateRouteMapHelpLines() in patched Stricli renders each visible route using the configured case style and extended prefix, adds built-in flag usage lines under the joined prefix, then emits fullDescription ?? brief; hidden routes are included only when args.includeHidden permits them.packages/cli/test/script/ include generate-skill-markdown.test.ts, text-import-plugin.test.ts, sdk-declarations.test.ts, package-exports.test.ts, eval-provider.test.ts, debug-id.test.ts, check-error-patterns.test.ts, and check-env-coverage.test.ts.packages/cli/script/generate-command-docs.ts dynamically imports routes, extractAllRoutes, and ENV_VAR_REGISTRY after ensuring src/generated/skill-content.ts exists.packages/cli/script/generate-command-docs.ts creates src/generated/ recursively and writes the exact stub export const SKILL_FILES: [string, string][] = [];\n to src/generated/skill-content.ts; a later generate:skill run overwrites it with real content.packages/cli/script/generate-command-docs.ts generates command pages at docs/src/content/docs/commands/{route}.md, the overview at docs/src/content/docs/commands/index.md, and configuration reference at docs/src/content/docs/configuration.md; committed handwritten content comes from docs/src/fragments/.<!-- GENERATED:END --> as the boundary: content above it is regenerated and content below it is preserved.packages/cli/script/generate-command-docs.ts contains two export-related matches: the SKILL_FILES stub at line 39 and lines.push(\export ${entry.name}=${entry.example}`)` at line 321.