Skip to content

Adjacent-case sweep, frontend skill modernization, and coverage reframe (0.20.5)#132

Merged
shinpr merged 2 commits into
mainfrom
refine/adjacent-case-sweep
Jun 13, 2026
Merged

Adjacent-case sweep, frontend skill modernization, and coverage reframe (0.20.5)#132
shinpr merged 2 commits into
mainfrom
refine/adjacent-case-sweep

Conversation

@shinpr

@shinpr shinpr commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Summary

Two related strands of agent/skill refinement, released as 0.20.5.

1. Adjacent-case sweep

Check the cases sharing a change's path, contract, persisted state, or external boundary, so a bug fix / regression / state-change / boundary-change is not narrowly fixed in one place while a sibling case regresses.

  • task-decomposer: classify a task's Change Category (one or more of bug-fix / regression / state-change / boundary-change) and extend Investigation Targets with the adjacent files and both-side boundary owners.
  • task-template: optional Change Category field + a Red-phase sweep step driven by it.
  • task-executor (+ frontend): field-triggered Adjacent Case Sweep after Pre-implementation Verification; in-scope residuals fold into the failing tests, out-of-scope residuals are recorded for downstream review.
  • code-reviewer: new adjacent_residual finding category (enum, rationale, summary, example) and detection at AC verification.
  • verifier / solver: trace adjacent cases in coverage / weigh them into solution scope.
  • Trigger vocabulary aligned to the four canonical category tokens across all consumers; executor trigger expressed positively.
  • Compressed the JSON examples in code-reviewer / both executors / verifier / solver to the compact in-repo style (all 19 JSON blocks parse).

2. Frontend skill modernization + coverage reframe

Make the frontend skills framework-general (React, not Vite-locked) and replace baked-in or invented coverage numbers with project-deferred, signal-based guidance.

  • Environment variables: bundler-agnostic exposure rule (only prefixed vars reach the client; unprefixed is undefined) with per-bundler accessors (Vite import.meta.env, Next.js/CRA prefixed process.env), replacing a broken Vite-only example.
  • Memoization: rely on React Compiler when enabled; manual memo is a profiler- or identity-justified escape hatch.
  • useEffect async: guard against out-of-order responses and post-unmount state updates (AbortController / mounted flag / server-state library).
  • Server/Client boundary: conditional RSC guidance (Next.js App Router), N/A for client-only SPAs.
  • Quality Check Workflow: map the project's package.json scripts to phases instead of hardcoding tool-specific names/ports.
  • Coverage: treat coverage as a diagnostic signal, not a target (Goodhart's Law); remove fixed percentages, an invented standard label, and a dangling ADR reference; defer thresholds to the project's CI config.

Validation

  • pnpm sync / pnpm sync:check — generated plugins in sync, zero drift
  • pnpm check:skills-index — all 11 skills consistent
  • claude plugin validate — marketplace + all 4 plugin manifests pass

🤖 Generated with Claude Code

shinpr and others added 2 commits June 14, 2026 06:27
Implement the adjacent-case sweep across the workflow so that a bug fix,
regression, state-change, or boundary-change is checked against the cases
sharing its path, contract, persisted state, or external boundary, instead
of being narrowly fixed in one place.

- task-decomposer: classify a task's Change Category (one or more of
  bug-fix / regression / state-change / boundary-change) and extend the
  Investigation Targets with the adjacent files and both-side boundary
  owners, unioned across all matched categories.
- task-template: add the optional Change Category field and a Red-phase
  sweep step driven by that field.
- task-executor (+ frontend): run a field-triggered Adjacent Case Sweep
  after Pre-implementation Verification and before the Binding Decision
  Check, folding in-scope residuals into the failing tests and recording
  out-of-scope residuals in Investigation Notes for downstream review.
- code-reviewer: add the adjacent_residual finding category (enum,
  rationale, summary, example) and detect it at AC verification.
- verifier: extend the coverage check to trace adjacent cases.
- solver: weigh adjacent cases into the solution scope.

Align the trigger vocabulary to the canonical four category tokens across
code-reviewer / solver / verifier / both executors, note that the debugging
flow has no Change Category field, and state "same class of defect"
uniformly. Express the executor sweep trigger positively.

Compress the JSON examples in code-reviewer / both executors / verifier /
solver to the compact in-repo style (inline leaf objects, multi-line top
level) without collapsing to a single line. All 19 JSON blocks parse.

Synced to the generated plugins; sync:check and check:skills-index pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Make the frontend skills framework-general (React, not Vite-locked) and
replace baked-in or invented coverage numbers with project-deferred,
signal-based guidance. Bump plugins and package to 0.20.5.

Frontend skills (typescript-rules, frontend-ai-guide):
- Environment variables: state the bundler-agnostic exposure rule (only the
  build tool's prefixed vars reach the client; unprefixed is undefined) and
  give per-bundler accessors (Vite import.meta.env, Next.js/CRA prefixed
  process.env) instead of a broken, Vite-only example.
- Memoization: rely on React Compiler when enabled; manual
  memo/useMemo/useCallback is a profiler- or identity-justified escape hatch.
- useEffect async: guard against out-of-order responses and post-unmount
  state updates (AbortController / mounted flag / server-state library);
  try-catch alone does not cover this.
- Server/Client boundary: add conditional RSC guidance (Next.js App Router
  and similar), marked N/A for client-only SPAs.
- Quality Check Workflow: read the project's package.json scripts and map
  them to phases instead of hardcoding tool-specific script names and ports.
- Debug logging: frame the console.log template as temporary, removed before
  commit, resolving the contradiction with the delete-debug-log rule.

Coverage (testing-principles, test-implement/frontend.md, quality-fixer-frontend):
- Treat coverage as a diagnostic signal, not a target (Goodhart's Law);
  prioritize meaningful assertions and concentrate rigor on high-reuse units.
- Remove the fixed percentages, the non-existent "Frontend standard 2025"
  label, and the dangling "ADR-0002" reference; defer any threshold to the
  project's CI config.

Synced to the generated plugins; sync:check, check:skills-index, and
claude plugin validate all pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@shinpr shinpr self-assigned this Jun 13, 2026
@shinpr shinpr merged commit 5044e3f into main Jun 13, 2026
1 check passed
@shinpr shinpr deleted the refine/adjacent-case-sweep branch June 13, 2026 22:34
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