issue-294: Rewrite the Grill Me tool metadata to the STE rule categories #304

Merged
david merged 2 commits from feature/issue-294/rewrite-the-grill-me-tool-metadata-to-the-ste-rule into main 2026-10-09 22:00:22 +00:00
Owner

294: Rewrite the Grill Me tool metadata to the STE rule categories

Closes #294 — 294.

This pull request was generated automatically by pi-loop and opened as a
Draft for human review. Do not merge without reviewing the changes.

Generated in 10m 10s.

Review findings

Now let me apply the fixes. First, the prompt.ts research guidance:Now rewrite the test file to fix the High, Low region-delimiter, and Medium expansion findings:All gates pass (extensions/grillme 457/457; root npm test 1460 tests, 0 fail; tsc --noEmit clean on the test file).

Review Findings — 294

Summary

Fixed the High extraction-count finding with exact per-tool counts (3/6/9/3/2/2 descriptions = 25, 2/4/6/3/7/0 guidelines = 22) and replaced the pi.on("tool_call" region boundary with brace-balanced extraction of each pi.registerTool({...}) block, which also resolves the Low region-delimiter finding. Medium catalog-expansion is resolved in the test: each ${outputDestinationOptionNames()} template is expanded to the runtime string, and the exempt destination-label list collapses to one token before the word-limit check. Also restored the files/code scope in RESEARCH_GUIDANCE.auto, restored the conditional gate wording and the files/issues examples, and disambiguated the ...first. guideline. The only unresolved finding is the Low commit-message convention, which requires amending a commit and this stage must not commit/stage/push.

Note: the reviewer recorded "24 actual" descriptions; the region actually contains 25, so the guard asserts the verified counts.

Critical

High

  • extensions/grillme/tool-metadata.test.ts:210 — The extraction-count guards are loose (toolDescriptions().length >= 20 against 24 actual, and toolPromptGuidelines().length >= 12 against 22 actual at :213), so deleting up to four parameter/description strings or most promptGuidelines entries leaves the suite green — the very regression this new suite exists to catch. Suggested fix: assert exact counts per tool (e.g. a Record<toolName, number> for descriptions and guidelines, or assert.equal(toolDescriptions().length, 24)), and compare against a captured list rather than >= lower bounds.

Medium

  • extensions/grillme/index.ts:620 — At runtime this description is One or more output destinations from the catalog (GitHub issues, Design doc, …). — the outputDestinationOptionNames() expansion makes the sentence 36 words, and the equivalent description at :608 is 35 words, both over the 25-word description limit in the acceptance criteria. The word-limit test at tool-metadata.test.ts:219 only sees the raw template with the unresolved ${outputDestinationOptionNames()} token (9 words), so it cannot detect this. Suggested fix: substitute outputDestinationOptionNames() before measuring in the test (or assert the catalog-expanded strings), and either treat the destination list as exempt identifiers or move it out of the sentence into a following list.
  • extensions/grillme/prompt.ts:88 — RESEARCH_GUIDANCE.auto reads In a software project, inspect the available files when they can answer a question. The pre-change text covered available files/code, so a question answerable only from source code is no longer explicitly in scope; AC says the rewrite must keep each string's meaning. Suggested fix: In a software project, inspect the available files or code when they can answer a question. (still under the 20-word instruction limit).

Low

  • AGENTS.md:26 — AGENTS.md requires issue-driven commit messages of the form issue-<N>: <summary>, but the Stage 1 commit is 294: Rewrite the Grill Me tool metadata to the STE rule categories (missing the issue- prefix); the branch name feature/issue-294/… is correct, so the PR title/body will likely diverge too. Suggested fix: amend the commit to issue-294: rewrite the grill me tool metadata to the ste rule categories and title the PR issue-294: ….
  • extensions/grillme/index.ts:757 — outputPlan lost the original examples: pre-change was including one or more outputs/artifacts/files/issues and intended tool use, now It lists one or more outputs and the intended tool use. The narrowed wording removes the "issues/files" guidance the model used for non-doc artifacts. Suggested fix: The approved output plan. It lists one or more outputs, files, or issues and the intended tool use.
  • extensions/grillme/index.ts:751 — A tool, CLI, platform, or pi gate may block the change. Stop and ask the user … drops the original conditional (If … blocks the mutation, stop and ask…); the imperative now reads as unconditional. Suggested fix: merge into one instruction: If a tool, CLI, platform, or pi gate blocks the change, stop and ask the user for the needed permission, confirmation, credentials, or plan change.
  • extensions/grillme/index.ts:613 — Call grill_enter_output_selection_phase first. is ambiguous out of context (first relative to what?), where the original said "until … has been called". Suggested fix: Call grill_enter_output_selection_phase before you stop or produce outputs.
  • extensions/grillme/tool-metadata.test.ts:86 — The checked region is delimited by INDEX_SOURCE.indexOf('pi.on("tool_call"'), a hard-coded string from an unrelated hook; an unrelated insertion or rename silently widens or breaks the inspected region. Suggested fix: delimit the region with explicit markers (for example from the first pi.registerTool({ to a closing sentinel) or export the metadata table from a small dependency-free module instead of regex-scraping index.ts.
## 294: Rewrite the Grill Me tool metadata to the STE rule categories Closes #294 — [294](https://git.excelera.net/david/pi-extensions-and-skills/issues/294). > This pull request was generated automatically by pi-loop and opened as a > **Draft** for human review. Do not merge without reviewing the changes. Generated in 10m 10s. ## Review findings Now let me apply the fixes. First, the prompt.ts research guidance:Now rewrite the test file to fix the High, Low region-delimiter, and Medium expansion findings:All gates pass (`extensions/grillme` 457/457; root `npm test` 1460 tests, 0 fail; `tsc --noEmit` clean on the test file). # Review Findings — 294 ## Summary Fixed the High extraction-count finding with exact per-tool counts (3/6/9/3/2/2 descriptions = 25, 2/4/6/3/7/0 guidelines = 22) and replaced the `pi.on("tool_call"` region boundary with brace-balanced extraction of each `pi.registerTool({...})` block, which also resolves the Low region-delimiter finding. Medium catalog-expansion is resolved in the test: each `${outputDestinationOptionNames()}` template is expanded to the runtime string, and the exempt destination-label list collapses to one token before the word-limit check. Also restored the `files/code` scope in `RESEARCH_GUIDANCE.auto`, restored the conditional gate wording and the `files/issues` examples, and disambiguated the `...first.` guideline. The only unresolved finding is the Low commit-message convention, which requires amending a commit and this stage must not commit/stage/push. Note: the reviewer recorded "24 actual" descriptions; the region actually contains 25, so the guard asserts the verified counts. ## Critical ## High - [x] extensions/grillme/tool-metadata.test.ts:210 — The extraction-count guards are loose (`toolDescriptions().length >= 20` against 24 actual, and `toolPromptGuidelines().length >= 12` against 22 actual at :213), so deleting up to four parameter/description strings or most `promptGuidelines` entries leaves the suite green — the very regression this new suite exists to catch. Suggested fix: assert exact counts per tool (e.g. a `Record<toolName, number>` for descriptions and guidelines, or `assert.equal(toolDescriptions().length, 24)`), and compare against a captured list rather than `>=` lower bounds. ## Medium - [x] extensions/grillme/index.ts:620 — At runtime this description is `One or more output destinations from the catalog (GitHub issues, Design doc, …).` — the `outputDestinationOptionNames()` expansion makes the sentence 36 words, and the equivalent `description` at :608 is 35 words, both over the 25-word description limit in the acceptance criteria. The word-limit test at `tool-metadata.test.ts:219` only sees the raw template with the unresolved `${outputDestinationOptionNames()}` token (9 words), so it cannot detect this. Suggested fix: substitute `outputDestinationOptionNames()` before measuring in the test (or assert the catalog-expanded strings), and either treat the destination list as exempt identifiers or move it out of the sentence into a following list. - [x] extensions/grillme/prompt.ts:88 — `RESEARCH_GUIDANCE.auto` reads `In a software project, inspect the available files when they can answer a question.` The pre-change text covered `available files/code`, so a question answerable only from source code is no longer explicitly in scope; AC says the rewrite must keep each string's meaning. Suggested fix: `In a software project, inspect the available files or code when they can answer a question.` (still under the 20-word instruction limit). ## Low - [ ] AGENTS.md:26 — AGENTS.md requires issue-driven commit messages of the form `issue-<N>: <summary>`, but the Stage 1 commit is `294: Rewrite the Grill Me tool metadata to the STE rule categories` (missing the `issue-` prefix); the branch name `feature/issue-294/…` is correct, so the PR title/body will likely diverge too. Suggested fix: amend the commit to `issue-294: rewrite the grill me tool metadata to the ste rule categories` and title the PR `issue-294: …`. - [x] extensions/grillme/index.ts:757 — `outputPlan` lost the original examples: pre-change was `including one or more outputs/artifacts/files/issues and intended tool use`, now `It lists one or more outputs and the intended tool use.` The narrowed wording removes the "issues/files" guidance the model used for non-doc artifacts. Suggested fix: `The approved output plan. It lists one or more outputs, files, or issues and the intended tool use.` - [x] extensions/grillme/index.ts:751 — `A tool, CLI, platform, or pi gate may block the change. Stop and ask the user …` drops the original conditional (`If … blocks the mutation, stop and ask…`); the imperative now reads as unconditional. Suggested fix: merge into one instruction: `If a tool, CLI, platform, or pi gate blocks the change, stop and ask the user for the needed permission, confirmation, credentials, or plan change.` - [x] extensions/grillme/index.ts:613 — `Call grill_enter_output_selection_phase first.` is ambiguous out of context (first relative to what?), where the original said "until … has been called". Suggested fix: `Call grill_enter_output_selection_phase before you stop or produce outputs.` - [x] extensions/grillme/tool-metadata.test.ts:86 — The checked region is delimited by `INDEX_SOURCE.indexOf('pi.on("tool_call"')`, a hard-coded string from an unrelated hook; an unrelated insertion or rename silently widens or breaks the inspected region. Suggested fix: delimit the region with explicit markers (for example from the first `pi.registerTool({` to a closing sentinel) or export the metadata table from a small dependency-free module instead of regex-scraping `index.ts`.
david merged commit 7152e0f5bf into main 2026-10-09 22:00:22 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
david/pi-extensions-and-skills!304
No description provided.