Repository navigation
Pre-PR style check, doc-draft skill, and product briefs - #1693
Conversation
Move doc linting off the PR and into the pre-commit hook. The hook checks new pages whole and existing pages only on the lines the commit changes: Vale, the AI-isms word list, and two model checks (an AI-isms judge and Dale), each voted over 3 runs with verdicts cached by content. Vale must be installed or the commit is blocked with install steps. - scripts/quality: score CLI (staged/branch/file), Vale and Dale runners, judge, claude-CLI fallback when there is no API key, optional fix helper with validated drop/swap/reword edits, optional readability report - Claude Code: Stop hook that checks only the docs the session edited (recorded by a PostToolUse hook), hooks use node instead of jq - tech-writer agent: lints its own drafts, reads a generated lint-rules list, follows the documentation section guide for placement and new directories, takes GitHub issues, Jira tickets, and Azure DevOps items, and gives examples to every procedure (TODOs for concepts) - Vale ignores bold UI labels and double-quoted product messages - Remove vale-autofix.yml; add script-tests.yml for script changes - Update CLAUDE.md, docs/CLAUDE.md, and CONTRIBUTING.md to match Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… persona The pre-commit check now fails a new page without a non-empty description in its frontmatter. Existing pages and partials are not checked. The tech-writer agent writes a description on every page, and its opening persona text is cut. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The drafting workflow runs in the session (or a subagent) instead of a dedicated agent: PR, work item, specs and notes, and new-directory structure, with the lint step and the description rule. The style reference moves to a file beside the skill. CLAUDE.md and CONTRIBUTING.md point to the skill. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… rules Swap lib/judge.mjs and score.mjs for lib/consensus.mjs and check.mjs (npm run quality:check; flags --no-model and --require-model). Add 12 Dale rules and 7 Vale rules for AI-writing patterns, wire a quality step into the pre-commit hook, restore vale-autofix.yml as a CI backstop, and drop phrases from ai-isms.yml that Vale now covers. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…efs to doc-draft - Read tests with the code, fetch Xchange links from work items, and name the Jira tools with a sign-in hint - Put code-established caveats on the page, check internal links, and point step 3 at the new page-structure guide - Add product briefs for auditor, dataclassification, endpointprotector, threatmanager, threatprevention, and pingcastle - Add docs/CLAUDE.md files for four products and update threatmanager's Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Offer once, after the report, to write a brief when a product has none - Add step 10: fix a product CLAUDE.md or brief only where the draft made a stated fact false, and report those edits apart from the docs pages - Lint is now step 11 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Escape backslashes before pipes in findings table cells - Create the fix-loop patch temp file in a private mkdtemp directory Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
docusaurus.config.js imported src/plugins/llms-txt.js, which is not in the repository, so the CI build failed with MODULE_NOT_FOUND. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Regenerate lint-rules.md so the drift check passes - Point doc-help at doc-draft instead of the removed tech-writer agent - Treat a failed Dale model call as skipped, and exit 3 when the check itself crashes; the Stop hook no longer sends a crash to Claude as findings - Strip nested JSX tags until stable in the prose extractor Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Skip the Stop hook in CI and when dependencies are not installed - Give .vale-local.ini the same TokenIgnores as .vale.ini - Run Script Tests when the Vale or Dale rule files change, and on reopen - Start gen-lint-digest.mjs reliably on any path with fileURLToPath - Declare js-yaml in devDependencies Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Code ReviewNo security problems found. The new workflow uses 1. The pre-commit 2. The 3. The pre-commit hook crashes if dependencies are missing 4. 5. The Stop hook keeps blocking on later turns Minor
|
|
It's awkward that this PR is merged without approvals |
Summary
Adds
/doc-draft, a skill that writes new Netwrix documentation from source material and lints it before the PR. It replaces thetech-writeragent. The PR also adds the pre-PR style check that/doc-draftand writers share, product briefs that give the skill context, and a page-structure guide.What
/doc-draftdoesGive it a PR, a work item, specs or notes, or a request to structure a new docs directory. It reads the source, drafts into the docs tree, checks coverage, lints, and reports what it did.
{/* TODO */}and never invents facts._category_.json.Every draft:
descriptionnpm run quality:check(Vale, Dale, AI-isms), up to 3 roundsAfter the report it offers once to write a product brief when the product has none. It fixes
docs/<product>/CLAUDE.mdor the brief only where its changes made a stated fact false.Context the skill reads
.claude/references/products/<product>.md: briefs for auditor, dataclassification, endpointprotector, pingcastle, threatmanager and threatprevention. Each covers what the product is, where things live in the code, code-to-UI vocabulary, and what couldn't be verified.docs/<product>/CLAUDE.mdfor auditor, dataclassification, endpointprotector and threatprevention (new), and threatmanager (updated: it listed 2 of its 4 versions)..claude/references/page-structure-guide.md: page types, new page vs section vs edit, titles, reference pages and glossaries, API docs..claude/references/lint-rules.md: a generated digest of the lint rules, so the first draft avoids them.Pre-PR style check
Vale, Dale (a model check; 2 of 3 runs must agree) and an AI-writing check run at commit on the lines the change adds. The Stop hook runs the same check on the docs a Claude session edited, up to 3 rounds. It is skipped in CI and when dependencies aren't installed. A failed model call skips Dale and doesn't block the commit.
vale-autofix.ymlremains the PR-side backstop.git commit --no-verifyskips the check.How it compares
I ran
/doc-drafton two Data Classification features and scored it against a code-derived fact list and the team's existing pages. These existing pages may not come fromgenerate-issue-documentation, which I couldn't confirm./doc-draftThe team's pages named the Graph permissions, which the code doesn't state. That motivated the Xchange and Jira steps in the skill.
Review notes
.claude/is gitignored, so the new reference files were added withgit add -f.js-yamltodevDependencies.🤖 Generated with Claude Code