Skip to content

Zeno2019/whetstone

Repository files navigation

Whetstone — AI Agent Skill

Version License Languages

An AI agent skill that de-slops PR and Issue descriptions — rewrite templated, emoji-heavy, AI-generated text into concise, human-style prose a maintainer can skim in 30 seconds.

中文文档

Quick Example

Before (AI-generated PR description):

## Summary
This PR implements a robust authentication system leveraging OAuth 2.0,
ensuring seamless integration with the existing user management pipeline. 🚀

## Changes
- Refactored auth middleware for comprehensive coverage ✨
- Added comprehensive test suite covering all edge cases ✅

After (Whetstone output):

## Summary
Added OAuth 2.0 login via Google and GitHub providers. Tokens are
stored in httpOnly cookies with a 24-hour expiry.

## Changes
- New `src/auth/` module: OAuth client, token management, session middleware
- 14 tests covering login flow, token refresh, and expired-session handling

Version 0.1.1 — see CHANGELOG.md.

Positioning

Runtime-agnostic. This Skill focuses on text content only, not tied to any specific agent runtime. Codex, Claude Code, opencode, Cursor, and others can all use it.

Language Support

Whetstone ships with a lean core (8 structural anti-patterns, language-agnostic) plus first-party bundled extensions for language-specific slop detection.

Layer Content Scope
Core (builtin) 8 structural patterns (templates, tables, emoji, over-structuring) All languages
patterns.d/zh-cn.md Chinese AI cliché words and phrasing (赋能, 助力, 值得一提的是, etc.) Chinese

Core stays small and language-agnostic. Language-specific patterns live in patterns.d/ as extensions, loaded via config.yaml. See config.yaml.example for setup.

Comparison with Related Tools

Tool Scope Overlap with Whetstone
patina (260★) CLI + skill, multi-language (CJK+EN), AI text detection Direct competitor. Similar approach but CLI-first and tied to Node runtime. Whetstone is runtime-agnostic and skill-only.
stop-slop (936★) Python library, text slop detection Heuristic-based detection, no rewriting. Whetstone adds structural rewriting + Chinese first-class support.
stephenturner/deslop (268★) R package, statistical text analysis Research-oriented. Whetstone targets practical PR/Issue workflows.
remove-ai-slops (built-in) Source code files (comment bloat, dead code, over-abstraction) Different domain. Whetstone targets description text, not code. Complementary — use both.

Installation

Symlink this directory into your agent's skills directory.

macOS / Linux / WSL

ln -s "$(pwd)" ~/your-agent-path/skills/whetstone

Replace your-agent-path with the appropriate path for your agent (see per-agent table below).

Windows

Option A: Symbolic Link (requires admin or Developer Mode)

# Run PowerShell as Administrator, then:
New-Item -ItemType SymbolicLink -Path "$env:USERPROFILE\.agents\skills\whetstone" -Target "$pwd"

Windows 10/11 with Developer Mode enabled does not require Administrator.

Option B: Junction (no admin required)

# Junctions work without admin rights, recommended for non-admin:
New-Item -ItemType Junction -Path "$env:USERPROFILE\.agents\skills\whetstone" -Target "$pwd"

Junctions are the preferred fallback when you do not have admin access or Developer Mode.

Per-agent paths

Agent Skills path
opencode ~/.agents/skills/whetstone
Codex ~/.codex/skills/whetstone
Claude Code ~/.claude/skills/whetstone
Cursor Copy the directory into your Cursor rules folder (symlinks not yet supported)

Configuration

Whetstone can read optional settings from ~/.config/whetstone/config.yaml (agent-mediated; see SKILL.md Step 0). Override the config directory with the WHETSTONE_CONFIG_DIR environment variable. See config.yaml.example for available options.

Config file reading is defined in the skill workflow (Step 0) but relies on the agent to follow it. For now, defaults (builtin + zh-cn) are applied automatically.

Reference Docs

Testing Limitations

Whetstone does not include automated end-to-end (LLM-in-the-loop) tests in CI. Why:

  • The deterministic verifier (tests/verify.sh, tests/verify.ps1) already checks every expected fixture against the full hard-constraint catalog (no emoji, no forbidden words, no template patterns, plus bidirectional anchor consistency, length limits, and structural advisories). This is fast, deterministic, and CI-friendly.
  • End-to-end tests that invoke an LLM and compare output to expected fixtures cannot deterministically verify output quality (structure, tone, information density) — that requires human judgment. They also couple the test to one specific runtime and model, which conflicts with Whetstone's runtime-agnostic positioning.
  • Manual validation against fixtures (see VALIDATION.md, recorded in VALIDATION_LOG.md) is the quality gate for each release. The Release Checklist requires running all 6 fixture tests with at least two different LLMs before tagging.

We track automated E2E as a known limitation. If you have ideas for low-false-positive E2E approaches that respect runtime-agnosticism, please open an issue.

About

AI agent skill that de-slops PR and Issue descriptions — runtime-agnostic, 中文一等公民

Topics

Resources

License

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors