Skip to content

docs(openspec): Propose local-rule-routing change#23

Open
thecodedrift wants to merge 9 commits into
mainfrom
feat/local-rule-routing
Open

docs(openspec): Propose local-rule-routing change#23
thecodedrift wants to merge 9 commits into
mainfrom
feat/local-rule-routing

Conversation

@thecodedrift

@thecodedrift thecodedrift commented Jun 11, 2026

Copy link
Copy Markdown
Member

Establish the OpenSpec change contract for a local-first rule-routing layer in the Taskless CLI and skill.

Today authoring a rule routes straight to the login-gated rule create, which runs generation off the developer's machine, and the skill suppresses itself whenever a user names a linter (eslint, ruff, biome) — stepping back from exactly the requests where Taskless could help author the rule in that tool's dialect. This change defines a routing front door that keeps authoring on-device whenever possible and only escalates to the service (with explicit confirmation) when a rule genuinely can't be built locally.

The contract introduces:

  • cli-detect — a deterministic, offline taskless detect --json signal scan.
  • cli-rule-routingroute / existing / static / remote recipes with a confidence-gated contract: reason before routing, commit local on reasonable confidence, and treat try-verify-escalate as a failure fallback that prompts-and-confirms before spending a generation.
  • cli-help (modified) — register the four routing topics + intent telemetry.
  • skill-taskless (modified) — reverse named-tool suppression so naming a linter engages routing; the 1024-char description ceiling is a first-class gating constraint.

This change deliberately does not define static-vs-runtime classification — that cut is owned upstream by the Runtime Rules project (TSKL) and lives behind remote. route only decides local-vs-remote.

This is the base of a stack; implementation PRs land on top of it group by group.

Refs TSKL Runtime Rules


Stack generated by Git Town

Add the change contract for a local-first rule-routing layer: a
deterministic detect command plus route/existing/static/remote recipes
that keep authoring on-device and gate the login wall behind reasonable
confidence with a confirm-before-service fallback.

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

Defines a spec-driven OpenSpec contract for a local-first rule-authoring “routing front door” in Taskless, centered around an offline detect signal scan and a help-recipe based classifier (route) that prefers local authoring paths (existing / static) and escalates to the service (remote) only with explicit user confirmation when needed.

Changes:

  • Adds a new OpenSpec change set (local-rule-routing) with proposal/design docs and a spec-driven manifest.
  • Introduces CLI requirements for taskless detect --json and for the route / existing / static / remote help-recipe layer (including rationale-first and confirmation-gated escalation semantics).
  • Updates the skill-taskless contract to engage routing when a linter is named (instead of suppressing) and to route rule-authoring via the new route topic.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
openspec/changes/local-rule-routing/specs/skill-taskless/spec.md Updates the skill triggering and routing contract to use the new routing front door.
openspec/changes/local-rule-routing/specs/cli-rule-routing/spec.md Specifies the routing recipe contract and the three destinations (existing/static/remote).
openspec/changes/local-rule-routing/specs/cli-help/spec.md Requires help-topic registration + telemetry for routing topics.
openspec/changes/local-rule-routing/specs/cli-detect/spec.md Specifies an offline, deterministic detect --json signal scan + stable JSON output requirement.
openspec/changes/local-rule-routing/proposal.md High-level motivation, scope, and impact summary for the change stack.
openspec/changes/local-rule-routing/design.md Detailed design decisions, constraints, and routing rationale/fallback model.
openspec/changes/local-rule-routing/.openspec.yaml Declares the change set as spec-driven with creation date.

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

Comment thread openspec/changes/local-rule-routing/specs/cli-rule-routing/spec.md Outdated
Comment thread openspec/changes/local-rule-routing/specs/cli-rule-routing/spec.md Outdated
Comment thread openspec/changes/local-rule-routing/proposal.md Outdated
Comment thread openspec/changes/local-rule-routing/proposal.md Outdated
Comment thread openspec/changes/local-rule-routing/proposal.md Outdated
Comment thread openspec/changes/local-rule-routing/specs/skill-taskless/spec.md
Comment thread openspec/changes/local-rule-routing/specs/skill-taskless/spec.md
Comment thread openspec/changes/local-rule-routing/specs/skill-taskless/spec.md Outdated
Comment thread openspec/changes/local-rule-routing/specs/skill-taskless/spec.md
Comment thread openspec/changes/local-rule-routing/specs/cli-detect/spec.md Outdated
@thecodedrift thecodedrift marked this pull request as ready for review June 11, 2026 23:48
thecodedrift and others added 2 commits June 11, 2026 17:04
Resolve Copilot review on PR #23:
- Drop the "provably cannot be built locally" framing in the proposal; it
  set a stricter bar than the confidence-gated contract. Login is suggested
  when route is not reasonably confident a rule is locally solvable, or when
  a confident local attempt fails and the user confirms.
- Tighten the cli-rule-routing spec so routing distinguishes three states:
  confident-local, reasonable-belief-not-local (-> remote), and genuine
  uncertainty (-> ask). Mere uncertainty no longer reads as a remote trigger.
- Reference the canonical `npx @taskless/cli help route` invocation in the
  skill-taskless spec instead of a bare `taskless` binary name.
- Fix Markdown inline-code spans that were split across line breaks.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Reword the cli-detect spec: detect validates its --json output against an
internal Zod schema before printing (same as info/check), rather than a
"published output schema." The schema is an internal contract and detect
exposes no --schema mode. Resolves the remaining Copilot note on PR #23.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
thecodedrift and others added 3 commits June 11, 2026 21:21
Add the change contract for a local-first rule-routing layer: a
deterministic detect command plus route/existing/static/remote recipes
that keep authoring on-device and gate the login wall behind reasonable
confidence with a confirm-before-service fallback.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Resolve Copilot review on PR #23:
- Drop the "provably cannot be built locally" framing in the proposal; it
  set a stricter bar than the confidence-gated contract. Login is suggested
  when route is not reasonably confident a rule is locally solvable, or when
  a confident local attempt fails and the user confirms.
- Tighten the cli-rule-routing spec so routing distinguishes three states:
  confident-local, reasonable-belief-not-local (-> remote), and genuine
  uncertainty (-> ask). Mere uncertainty no longer reads as a remote trigger.
- Reference the canonical `npx @taskless/cli help route` invocation in the
  skill-taskless spec instead of a bare `taskless` binary name.
- Fix Markdown inline-code spans that were split across line breaks.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Reword the cli-detect spec: detect validates its --json output against an
internal Zod schema before printing (same as info/check), rather than a
"published output schema." The schema is an internal contract and detect
exposes no --schema mode. Resolves the remaining Copilot note on PR #23.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
thecodedrift and others added 3 commits June 12, 2026 04:16
A change is archived exactly once, when all of its work has landed. In a
stack of PRs, only the tip carries the archived change; the PRs below it
still carry the in-flight change directory by design — so failing the
archive check on them is noise.

Split the workflow into a stack-position detector and the archive check.
The detector marks a PR as the tip when no other OPEN PR targets its head
branch as a base; the archive job is gated on that, so non-tip PRs show
the check as SKIPPED and only the tip (or a standalone PR) runs it. Also
broaden the trigger from base=main to all PRs so the (skipped) check is
visible across the whole stack, mirroring how we think about changes in
flight vs all changes landed.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* main:
  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
…at/local-rule-routing

* origin/feat/local-rule-routing:
  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
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