Skip to content

refactor: reuse hook invocation parser in standalone runners - #268

Merged
LadyBluenotes merged 1 commit into
fix-workspace-discovery-refreshfrom
refactor-hook-parser-source
Sep 11, 2026
Merged

refactor: reuse hook invocation parser in standalone runners#268
LadyBluenotes merged 1 commit into
fix-workspace-discovery-refreshfrom
refactor-hook-parser-source

Conversation

@LadyBluenotes

Copy link
Copy Markdown
Member

🎯 Changes

Stacked on #267. Addresses the bounded parser-sharing result of #239.

Generate the standalone runner parser from the tested, self-contained parseIntentInvocation function. Remove the duplicated escaped regex and parser body from the installer template. No new runtime asset, dependency, or framework.

Investigation Outcome

  • Invocation parsing has one source. Edit-tool sets and deny text already come from the policy module.
  • Event adaptation and observation-file handling remain in the standalone runner. The pure policy API takes in-memory observations; the installed runner owns stdin, persistence, and process output.
  • Keep each agent output format and existing user/project installation behavior. Do not widen this into command authority work from Guard human-only Intent commands from agent execution #229.
  • Preserve fail-open catalog behavior: a failed session catalog still permits subsequent edits. Observing a command does not prove it succeeded or that its guidance was applied. No new success/failure state is introduced.

The generation contract is that the parser stays self-contained after bundling. A packed-CLI test installs and copies the emitted scripts, then checks denial before a command observation and allowance afterward. The three-agent runtime matrix covers supported command runners and non-command exclusions.

Verification

44 hook-policy, installed-runner, and packed-release tests passed. Build, typecheck, focused ESLint, Knip, Prettier, and git diff --check passed. Guide and dependency files are unchanged.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 51 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: a14b9916-c2bc-4b11-b01d-46f9e343df87

📥 Commits

Reviewing files that changed from the base of the PR and between 68ad8e3 and a17880b.

📒 Files selected for processing (5)
  • .changeset/reuse-hook-parser.md
  • packages/intent/src/hooks/install.ts
  • packages/intent/src/hooks/policy.ts
  • packages/intent/tests/hooks-install.test.ts
  • packages/intent/tests/integration/packed-release.test.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nx-cloud

nx-cloud Bot commented Sep 11, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 20d7ea3

Command Status Duration Result
nx run-many --targets=build ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-09-11 20:50:14 UTC

@pkg-pr-new

pkg-pr-new Bot commented Sep 11, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@tanstack/intent@268

commit: 20d7ea3

@codspeed-hq

codspeed-hq Bot commented Sep 11, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 9 untouched benchmarks


Comparing refactor-hook-parser-source (a17880b) with fix-workspace-discovery-refresh (68ad8e3)

Open in CodSpeed

LadyBluenotes added a commit that referenced this pull request Sep 11, 2026
… hot path

Query Git for ignored paths only when an uncovered change needs
classifying, and check files coverage once per skills root instead of
once per skill file. Benchmarks match the #268 baseline within noise.
@LadyBluenotes
LadyBluenotes added this pull request to stack #274 September 11, 2026 22:02
LadyBluenotes added a commit that referenced this pull request Sep 11, 2026
… hot path

Query Git for ignored paths only when an uncovered change needs
classifying, and check files coverage once per skills root instead of
once per skill file. Benchmarks match the #268 baseline within noise.
@LadyBluenotes
LadyBluenotes force-pushed the refactor-hook-parser-source branch from 20d7ea3 to 7d3a67c Compare September 11, 2026 22:22
LadyBluenotes added a commit that referenced this pull request Sep 11, 2026
… hot path

Query Git for ignored paths only when an uncovered change needs
classifying, and check files coverage once per skills root instead of
once per skill file. Benchmarks match the #268 baseline within noise.
@LadyBluenotes
LadyBluenotes force-pushed the refactor-hook-parser-source branch from 7d3a67c to 5c204d5 Compare September 11, 2026 22:25
LadyBluenotes added a commit that referenced this pull request Sep 11, 2026
… hot path

Query Git for ignored paths only when an uncovered change needs
classifying, and check files coverage once per skills root instead of
once per skill file. Benchmarks match the #268 baseline within noise.
@LadyBluenotes
LadyBluenotes force-pushed the refactor-hook-parser-source branch from 5c204d5 to a17880b Compare September 11, 2026 22:30
@LadyBluenotes
LadyBluenotes merged commit fab9591 into main Sep 11, 2026
8 of 13 checks passed
@LadyBluenotes
LadyBluenotes deleted the refactor-hook-parser-source branch September 11, 2026 22:32
LadyBluenotes added a commit that referenced this pull request Sep 11, 2026
…CLI (#273)

* feat: register developer tasks and retire skills from the maintainer CLI

maintainer add --task records the developer tasks in domain_map.yaml so a
one-skill batch no longer needs a hand edit before check passes.
maintainer remove <name> retires a registered skill in the tree and notes
it in the spec without deleting authored guidance; it refuses while the
skill is selected for distribution or required by another skill.
review --json reports include the outcomes and fields a recording needs.

* docs: teach the packaged procedure the new maintainer commands

Describe --task, remove, package inference, review.ignore, interactive
review, and the report's recording block. Inline the skill tree entry
format so a one-task authoring read no longer loads the full tree
generator skill.

* perf: keep review ignore queries and validate coverage checks off the hot path

Query Git for ignored paths only when an uncovered change needs
classifying, and check files coverage once per skills root instead of
once per skill file. Benchmarks match the #268 baseline within noise.
@github-actions github-actions Bot mentioned this pull request Sep 12, 2026
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.

1 participant