issue-291: Add the pure ste-style.ts module and inject the style block into the Grill Me prompt #301

Merged
david merged 2 commits from feature/issue-291/add-the-pure-ste-style-ts-module-and-inject-the-st into main 2026-10-09 21:36:32 +00:00
Owner

291: Add the pure ste-style.ts module and inject the style block into the Grill Me prompt

Closes #291 — 291.

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 5m 40s.

Review findings

Now I understand the findings. Let me apply the fixes.All gates pass after the fixes:

  • cd extensions/grillme && node --test → 430 pass / 0 fail (2 removed change-detector tests)
  • root npm test → 1432 pass / 1 skip / 0 fail (now includes extensions/grillme/*.test.ts)
  • tsc --noEmit … index.ts bash-filter.ts ste-style.ts widget.ts → clean
  • no lint config exists in the repo

Review Findings — 291

Summary

Resolved all five findings. Medium: kept ste-style.test.ts and added a header comment recording that #292 owns/extends the rule-text checks (§7.1) rather than moving the file and leaving the new module untested. Low: resolved the self-check-vs-credit contradiction in favour of "place it last" (the issue's STE_SELF_CHECK section, the plan's risk table, and plan §5.4 all agree) by emitting the credit line before the self-check and updating the test whose name/assertion had locked the opposite order; removed the two verbatim assert.deepEqual "spells out …" tests that only duplicated module literals; added ste-style.ts to the documented tsc command; and added extensions/grillme/*.test.ts to the root test script so the new suite is gated by default. Gates: extension node --test → 430 pass / 0 fail; root npm test → 1432 pass / 1 skip / 0 fail; tsc --noEmit clean; no lint config exists. Nothing remains unresolved.

Critical

High

Medium

  • extensions/grillme/ste-style.test.ts:1 — this new file is the deliverable of sibling issue #292 ("Add ste-style.test.ts checks for the rule text and the block content"), but #291's acceptance criteria only require the existing bash-filter.test.ts / widget.test.ts to stay green. The file ships #292's block-content checks while omitting #292's rule-text checks (sentence-length limits, the -ing allowlist, the banned-phrasing list). Suggested fix: keep the file (it passes and is correct) but record in the PR that #292 must extend it with the rule-text checks; if strict per-issue scope is required, move the whole file into #292 instead.

Low

  • extensions/grillme/ste-style.ts:74 — the self-check is emitted before the credit line, but #291's STE_SELF_CHECK section says "Place it last in the block" (and the plan's risk table repeats "place it last"), while the same issue's buildSteStyleBlock() section lists the credit line after the self-check. The test at ste-style.test.ts:100 locks self-check-before-credit. Suggested fix: resolve the contradiction — if "last" is authoritative, move STE_CREDIT before STE_SELF_CHECK and update the test; otherwise amend the issue/plan to state the credit line is last.
  • extensions/grillme/ste-style.test.ts:25 — the two assert.deepEqual "spells out …" tests duplicate the module's string literals verbatim, so they only force "wording changed → update the snapshot" and do not enforce the plan's stated goal of catching drift toward the standard's phrasing. Suggested fix: rely on #292's rule-text checks (or assert a paraphrase invariant) instead of copying the literals.
  • extensions/grillme/README.md:89 — the documented tsc command still lists only index.ts bash-filter.ts widget.ts; the new module is typechecked transitively but is not named, so the documented check is stale. Suggested fix: add ste-style.ts to that command.
  • package.json:34 — the repo-root npm test script lists no extensions/grillme/*.test.ts, so this new suite (like the existing bash-filter/widget suites) runs only via the extension-level command; a regression in ste-style.ts would not be caught by the default gate. Suggested fix: add extensions/grillme/*.test.ts to the root test script, or explicitly document the extension-level command as the gate.
## 291: Add the pure ste-style.ts module and inject the style block into the Grill Me prompt Closes #291 — [291](https://git.excelera.net/david/pi-extensions-and-skills/issues/291). > 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 5m 40s. ## Review findings Now I understand the findings. Let me apply the fixes.All gates pass after the fixes: - `cd extensions/grillme && node --test` → **430 pass / 0 fail** (2 removed change-detector tests) - root `npm test` → **1432 pass / 1 skip / 0 fail** (now includes `extensions/grillme/*.test.ts`) - `tsc --noEmit … index.ts bash-filter.ts ste-style.ts widget.ts` → clean - no lint config exists in the repo # Review Findings — 291 ## Summary Resolved all five findings. Medium: kept `ste-style.test.ts` and added a header comment recording that #292 owns/extends the rule-text checks (§7.1) rather than moving the file and leaving the new module untested. Low: resolved the self-check-vs-credit contradiction in favour of "place it last" (the issue's `STE_SELF_CHECK` section, the plan's risk table, and plan §5.4 all agree) by emitting the credit line before the self-check and updating the test whose name/assertion had locked the opposite order; removed the two verbatim `assert.deepEqual` "spells out …" tests that only duplicated module literals; added `ste-style.ts` to the documented `tsc` command; and added `extensions/grillme/*.test.ts` to the root `test` script so the new suite is gated by default. Gates: extension `node --test` → 430 pass / 0 fail; root `npm test` → 1432 pass / 1 skip / 0 fail; `tsc --noEmit` clean; no lint config exists. Nothing remains unresolved. ## Critical ## High ## Medium - [x] extensions/grillme/ste-style.test.ts:1 — this new file is the deliverable of sibling issue #292 ("Add ste-style.test.ts checks for the rule text and the block content"), but #291's acceptance criteria only require the *existing* `bash-filter.test.ts` / `widget.test.ts` to stay green. The file ships #292's block-content checks while omitting #292's rule-text checks (sentence-length limits, the `-ing` allowlist, the banned-phrasing list). Suggested fix: keep the file (it passes and is correct) but record in the PR that #292 must *extend* it with the rule-text checks; if strict per-issue scope is required, move the whole file into #292 instead. ## Low - [x] extensions/grillme/ste-style.ts:74 — the self-check is emitted before the credit line, but #291's `STE_SELF_CHECK` section says "Place it **last** in the block" (and the plan's risk table repeats "place it last"), while the same issue's `buildSteStyleBlock()` section lists the credit line *after* the self-check. The test at ste-style.test.ts:100 locks self-check-before-credit. Suggested fix: resolve the contradiction — if "last" is authoritative, move `STE_CREDIT` before `STE_SELF_CHECK` and update the test; otherwise amend the issue/plan to state the credit line is last. - [x] extensions/grillme/ste-style.test.ts:25 — the two `assert.deepEqual` "spells out …" tests duplicate the module's string literals verbatim, so they only force "wording changed → update the snapshot" and do not enforce the plan's stated goal of catching drift toward the standard's phrasing. Suggested fix: rely on #292's rule-text checks (or assert a paraphrase invariant) instead of copying the literals. - [x] extensions/grillme/README.md:89 — the documented `tsc` command still lists only `index.ts bash-filter.ts widget.ts`; the new module is typechecked transitively but is not named, so the documented check is stale. Suggested fix: add `ste-style.ts` to that command. - [x] package.json:34 — the repo-root `npm test` script lists no `extensions/grillme/*.test.ts`, so this new suite (like the existing `bash-filter`/`widget` suites) runs only via the extension-level command; a regression in `ste-style.ts` would not be caught by the default gate. Suggested fix: add `extensions/grillme/*.test.ts` to the root `test` script, or explicitly document the extension-level command as the gate.
david merged commit 642d63a270 into main 2026-10-09 21:36:32 +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!301
No description provided.