Skip to content

feat(cli): Surface routing recipes in the help index - #26

Merged
thecodedrift merged 10 commits into
feat/local-rule-recipesfrom
feat/local-rule-help
Jun 15, 2026
Merged

feat(cli): Surface routing recipes in the help index#26
thecodedrift merged 10 commits into
feat/local-rule-recipesfrom
feat/local-rule-help

Conversation

@thecodedrift

@thecodedrift thecodedrift commented Jun 11, 2026

Copy link
Copy Markdown
Member

Make the routing recipes discoverable. The taskless help no-arg index previously listed only real subcommands; this adds an "Authoring recipes" section listing route/existing/static/remote so an agent landing on the index can find the rule-authoring front door.

Intent telemetry needs no new code: the help command already emits help_<topic> for any resolved topic, so the routing topics inherit it. Tests cover all three surfaces:

  • integration: each routing topic resolves via taskless help <topic> (no unknown-topic error), and the index lists all four;
  • in-process: help_route / help_existing / help_static / help_remote are captured when each topic is fetched (telemetry module mocked, mirroring the existing posthog mock pattern).

Stacked on #25. Skill posture change (engaging routing on a named linter) lands next.

Refs TSKL Runtime Rules


Stack generated by Git Town

List route/existing/static/remote under an "Authoring recipes" section
of the `taskless help` no-arg index so an agent can discover the
rule-authoring front door. The existing help command already emits
help_<topic> intent telemetry generically, so the routing topics inherit
it. Add integration tests for index listing and topic resolution, plus
an in-process test asserting help_route/existing/static/remote capture.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes the new routing authoring recipes discoverable from the taskless help no-args index by adding an “Authoring recipes” section, and adds automated coverage to ensure both topic resolution and intent telemetry work for the routing topics.

Changes:

  • Add an “Authoring recipes” section to taskless help (no args) listing route, existing, static, and remote.
  • Add integration tests asserting the index lists the routing topics and taskless help <topic> resolves each recipe.
  • Add an in-process test that mocks telemetry and asserts help_<topic> capture for each routing topic.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
packages/cli/test/help-routing-telemetry.test.ts Adds a unit-style telemetry capture test for help_route / help_existing / help_static / help_remote.
packages/cli/test/help-extensions.test.ts Extends CLI integration tests to validate index discoverability and recipe resolution for routing topics.
packages/cli/src/commands/help.ts Adds a recipe-topic index section and aligns table padding across command topics + recipe topics.
openspec/changes/local-rule-routing/tasks.md Marks the “Help registration + telemetry” checklist items as completed.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

* feat/local-rule-recipes:
  docs(cli): Align route recipe with the three-state contract
  docs(cli): Show detect output shape in the route recipe
  docs(openspec): Clarify detect output schema is internal, not published
  docs(openspec): Address review feedback on local-rule-routing contract
* feat/local-rule-recipes:
  docs(cli): Address review on routing recipes
  fix(cli): Harden detect against malformed manifests and false positives
* feat/local-rule-recipes:
  ci(openspec): Skip the archive check on non-tip stacked PRs (#31)
  docs(openspec): Clarify detect output schema is internal, not published
  docs(openspec): Address review feedback on local-rule-routing contract
  docs(openspec): Propose local-rule-routing change
  chore(skill): Refine the stacked-PR archive-check guidance
  chore(skill): Scope iterate-pr archive check to the stack tip
  chore(config): Allow git-town in project settings

@thecodedrift thecodedrift left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flagging the posthog telemetry changes #33 / #34 / #35 / #36 / #37 which impact this. Whichever lands first will trigger a large refactor for the other.

Comment thread packages/cli/src/commands/help.ts
Comment thread packages/cli/test/help-routing-telemetry.test.ts
thecodedrift and others added 6 commits June 13, 2026 20:29
* feat/local-rule-recipes:
  feat(cli): Make detect monorepo-aware; languages → linters; drop frameworks
* feat/local-rule-recipes:
  docs(cli): Update route recipe detect example for the new shape
* feat/local-rule-recipes:
  feat(cli): Add linters for already-detected Go, Rust, and PHP
* feat/local-rule-recipes: (21 commits)
  refactor(cli): Uppercase the acronym in CLIConfig
  refactor(cli): Uppercase the acronym in CLIErrorEnvelope too
  fix(cli): Carry the CLIErrorCode rename into auth.ts
  docs(openspec): Uppercase CLIError/CLIErrorCode in the change contract
  docs(openspec): Uppercase CLIError/CLIErrorCode in the analytics spec
  refactor(cli): Uppercase the CLI acronym in CliError/CliErrorCode
  docs(openspec): Sync corrected check/help spec into the archived capability
  fix(cli): Resolve cli_run identity at invocation start, not end
  test(cli): Prove help_* removal once via a source scan, not per-test
  test(cli): Assert no legacy help_* event on served-topic and index paths
  refactor(cli): Single-pass check counts; robust cli_installed assertion
  fix(cli): Only emit cli_rule_created/improved when rules are written
  fix(cli): Resolve cli_run identity fresh; tighten cli_error + drop cli_version
  docs(openspec): Address review on the telemetry contract
  ci(openspec): Skip the archive check on non-tip stacked PRs
  chore(openspec): Archive restructure-cli-telemetry and sync specs
  feat(cli): Collapse help_* into cli_help { topic }; drop cli_info
  feat(cli): Concrete auth + lifecycle events; drop start/_completed pairs
  feat(cli): Emit concrete rule events; drop rule start/_completed pairs
  feat(cli): Emit cli_run once per invocation from the runner
  ...
help.ts now emits cli_help { topic } instead of per-topic help_<topic> (the
taxonomy on main). Update the routing-topic assertions to match so this branch
is green/consistent with the tip's #39 resolution.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* feat/local-rule-recipes:
  chore(cli): Drop cli_detect on the detect branch (telemetry taxonomy)
@thecodedrift
thecodedrift merged commit 83e78b0 into feat/local-rule-recipes Jun 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants