Last night, I posted an Instagram story linking to yesterday’s entry. After re-reading it this morning from my phone, I stumbled across at least 5 grammar errors. As a kid, my dad always drilled me to re-read my work countless times aloud until I was sure that no mistakes remained. That approach worked to instill in me the notion that good writing is something that isn’t rushed; rather, good writing is carefully crafted via an iterative process. This approach served me well through my days in the school system, but is no longer practical.

As a systems engineer, I should create a system to optimize the time needed to review my writing so I have more time to work and need less time to review.

That was my thought this morning. Today, I went and implemented it.

My initial idea was to leverage the power of a local LLM to review my writing. I did a few preliminary Google searches, which led me to the jfleg dataset, the “gold standard benchmark for developing and evaluating GEC systems with respect to fluency (extent to which a text is native-sounding) as well as grammaticality.” I didn’t read into it past that. I simply opened a ChatGPT prompt, gave it a link to jfleg, explained my use case, and started a deep research query.

Deep Research Prompt

“take a look at https://huggingface.co/datasets/jhu-clsp/jfleg. Are there now better models available for grammar correction? I’m looking to use ollama to run local grammar correction of text i write in md files. The ideal model should be very light so i can run it on a macbook air. If not though, I’m ok with a cheap grammar fixer thats cloud based. For example, I already use api calls to claude sonnet 3.5 to generate hashtags for my writing. Should i also use it for grammar?”

I didn’t bother reading the report. Instead, I downloaded it as markdown, imported it into my repo, fed it to Opus, crafted a quick prompt, and let it rip.

Claude Prompt

“I want to add llm assisted grammar checks to this blog. When theres a post without hashtags, we can assume it hasnt been checked yet for grammar mistakes. So in that same loop (such as npm run auto-optimize) when we add hashtags using an llm, we should also check for grammar. I did a deep research on running local grammar checks with an llm @deep-research-report.md , but i want you to consider the structure of our post pipeline and consider if we should leverage langgraph for this stuff like we do for the tagging and devise an implementation strategy for this blog.”

It took only one additional prompt to get a good system design in place. The way my system works is that posts without hashtags in them are flagged for grammar review and a text file is opened for each one. At the top, instructions are given, followed by a list of changes made, followed by corrected final text. After saving and closing the file, the entry is marked as corrected.

This is what it looked like when I ran a grammar check on yesterday’s entry:

INSTRUCTIONS:
  1. Review the corrections listed below
  2. Edit the corrected text below the marker line
  3. Save and close this file to apply your changes
  4. To reject ALL corrections, delete everything below the marker and save
 
Changes found (31):
----------------------------------------------------------------
 
  1)
     - ...box, I assumed my boss [] purchased me the same high-end...
     + ...box, I assumed my boss [had] purchased me the same high-end...
 
...
 
  31)
     - ...it. To anyone wishing they [] experienced the Interactive Energy Ball...
     + ...it. To anyone wishing they [had] experienced the Interactive Energy Ball...
       
=== CORRECTED VERSION (edit below, then save and close) ===
 
Love Burn Recap! What a hectic burn this was. Amazing, healing, emotional...

I know, I know…31 grammar corrections is a lot more than “at least 5”. But this is why tough tasks should be delegated! As I mentally prepare to dive into the world of OpenClaw soon, I’ve been putting additional emphasis on giving LLMs extra autonomy as they work for me. With only 3 prompts and minimal oversight, I was able to design and implement a working grammar-review system. Not bad!


The last step was creating proper documentation for the grammar system. Since my active Claude session was at 97% context usage and I didn’t want to risk compaction for such a simple ask, I used Simon Willison’s claude-code-transcripts tool to extract my current session into an HTML file, which I then passed on to the new agent. Then, because I was tired of always needing to remember to do this, I had Claude look up state-of-the-art practices (shout-out to Phillipp Spiess for the tip) for updating its context with important global instructions such as my requirement for it to keep the repo’s various README docs updated. After minutes of research, Claude just moved the contents of the blog’s CLAUDE.md into AGENTS.md. Ok, that’s not all. I was kidding. Here’s what it did, verbatim:

Claude’s Response

What Changed

AGENTS.md (new) — All project knowledge lives here now, fully updated with grammar checking, OpenAI support, and the complete 11-step pipeline. The “Documentation Updates Are Mandatory” rule is the very first section, listing every file that must be updated when pipeline features change.

CLAUDE.md (rewritten) — Went from 200 lines of stale content to 5 lines. Uses @AGENTS.md to import everything. Claude Code loads it automatically.

.cursor/rules/project.mdc (new) — Cursor’s alwaysApply: true rule that points to AGENTS.md and reinforces the documentation update requirement. Cursor reads this + AGENTS.md natively.

README.md — Added AGENTS.md to the Documentation section.

Why This Fixes Your Problem

The old setup failed because:

  1. The doc-update rule was buried at line 159 of CLAUDE.md — agents deprioritized it
  2. CLAUDE.md didn’t list itself as a file to update
  3. Cursor had no instructions at all

Now:

  • The doc-update rule is the first thing agents see in AGENTS.md
  • AGENTS.md lists itself in the files to update
  • Both Claude Code and Cursor read the same source of truth
  • Any other AGENTS.md-compatible tool (Copilot, Codex, etc.) gets the instructions too

Tags: ai workflow automation prompting claude optimization documentation