Add word-level analysis to the style generator - #1
Merged
Conversation
The generator skill previously jumped from sources to qualitative word/sentence/passage forks. Bundle DocWriter's checklist analyzer and require a measured lexical pass (A1–A5) before specialists write propositions. Multi-source CLI flags keep hapax and signature n-grams honest across the full sample.
GitHub rejected the first push because creating .github/workflows/test.yml requires the workflow scope. Keep the lexical analyzer and tests; npm test still runs locally.
The updated token should include workflow scope, so the test workflow can live in the plugin repo again.
The plugin is one skill. It measures word-level habits with the bundled script, then reads the same prose at the word, sentence, and passage level. It does not spawn lexis, grammar, or discourse agents, and it should not talk about Leech and Short families.
Words, sentences, and passages are parallel Agent forks. Say that, instead of explaining what they are not.
Install, invoke, and the generated skill. The generator already runs the analyzer; nobody needs the CLI or the test command in the README.
Write samples to ~/.claude/skills/my-writing-style/sources/ and the measurement report to references/metrics.json. /tmp is not part of the style.
The generator used to offer only rebuild or keep. Adding a piece of writing now keeps confirmed habits and existing sources; updating propositions re-reads the samples already in the style skill.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The generator was missing a word-level measurement step. This adds the
bundled analyzer, then a multi-agent pass over words, sentences, and
passages — the original three parallel Agent forks.
analyze-style.mjsand run it with--words --measuredscripts/andreferences/metrics.jsoninto the generated skillTest plan
node tests/lexical-analysis.mjs--wordskeeps the word-level slicetestworkflow