feat(prompts): add cspell-config prompt for automated spell check maintenance#1516
feat(prompts): add cspell-config prompt for automated spell check maintenance#1516cundernehr wants to merge 10 commits intomicrosoft:mainfrom
Conversation
…oject-specific words and ignores - include instructions for spell-checking and token management - define acceptance criteria for cspell.json updates - document best practices for adding project-specific tokens 🔤 - Generated by Copilot
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1516 +/- ##
==========================================
- Coverage 87.44% 87.43% -0.01%
==========================================
Files 68 68
Lines 10335 10335
==========================================
- Hits 9037 9036 -1
- Misses 1298 1299 +1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
🔒 - Generated by Copilot
…and update of cspell.json file 🔧 - Generated by Copilot
katriendg
left a comment
There was a problem hiding this comment.
Thanks a lot @cundernehr for this addition!
Before we move to full review, I wanted to validate with you if the intention is truly to have a) generalized prompt for folks to use across repos & distribute it with plugins and extensions, or b) keep it as a useful prompt for contributors to hve-core repo only?
In case of a) I believe it would be beneficial to have the prompt more generic, for example, the config of cspell should be more dynamic (e.g., search cspell.{json,yaml,yml,js,cjs,mjs}, .cspell.json, cspell.config.*), the dictionary files are setup in a specific way in hve-core, but would need to be more generic as well, ...
In case of b) small changes would be recommended to align with hve-core's setup (for example the config file is .cspell.json and not cspell.json, you could move the prompt file at the root of .github/prompts folder which is where HVE Core repo specific prompts reside, and they don't need to be added to any collection, then either to regenerate any plugins.
…uration types and frameworks Co-authored-by: Copilot <copilot@github.com>
Thank you for the review! I am going for option A. Please see my latest commit that makes the prompt more generic. |
…ehr/hve-core into add-cspell-config-prompt
|
|
||
| 1. Re-run cspell using the same command from Step 4. | ||
| 2. Report the final counts: files checked, issues found, files with issues. | ||
| 3. If more than 50 issues remain, provide a short rationale and suggest next actions (add more words, fix typos, or add more ignore paths). |
There was a problem hiding this comment.
Comment 1 (Step 7.3 + Acceptance criteria) — 💡 Suggestion
The "< 50 issues" target is arbitrary across repo sizes. Either remove the absolute number or express it relative to baseline.
Suggested Change
3. If the issue count has not meaningfully decreased from baseline (target:
≥80% reduction), provide a short rationale and suggest next actions
(add more words, fix typos, or add more ignore paths).And in Acceptance criteria:
* A final cspell run shows a meaningful reduction from the baseline (target
≥80%, or the agent documents the remaining categories with rationale).| ### Step 5: Curate and categorize tokens | ||
|
|
||
| 1. Group unknown tokens into categories: project-specific terms, acronyms, technology names, environment variables, proper nouns, and potential typos. | ||
| 2. Filter out obvious garbage (long random hashes, base64 strings, generated identifiers). |
There was a problem hiding this comment.
Comment 2 (Step 5.2) — 💡 Suggestion
Concrete heuristics make filtering reproducible across runs and repos.
Suggested Change
2. Filter out obvious garbage using these heuristics:
- hex strings of 16+ chars (`[a-f0-9]{16,}`)
- base64-looking strings (`[A-Za-z0-9+/]{20,}={0,2}`)
- tokens appearing only in lockfiles, minified assets, or build output
feat(prompts): add cspell-config prompt for automated spell check maintenance
Added a new experimental prompt to the
experimentalcollection that automatescspell.jsonmaintenance. The prompt instructs Copilot to run spell checking across the workspace, curate project-specific words, update the words array (alphabetized and deduped), and synchronizeignorePathswith.gitignore.Description
Introduced
.github/prompts/experimental/cspell-config.prompt.mdand registered it across collection manifests and plugin outputs.The prompt guides Copilot through a structured workflow: run
cspell, collect unknown words, filter garbage tokens from legitimate project vocabulary, updatecspell.jsonwith curated entries, and re-run validation to confirm reduced issue counts. Acceptance criteria target fewer than 50 remaining issues after execution.collections/experimental.collection.ymlunder a new# Promptssectioncollections/hve-core-all.collection.ymlwithmaturity: experimentalplugins/experimental/.github/plugin/plugin.jsonwith a new"commands"array exposingcommands/experimental/"commands/experimental/"toplugins/hve-core-all/.github/plugin/plugin.json, maintaining alphabetical orderRelated Issue(s)
None
Type of Change
Select all that apply:
Code & Documentation:
Infrastructure & Configuration:
AI Artifacts:
prompt-builderagent and addressed all feedback.github/instructions/*.instructions.md).github/prompts/*.prompt.md).github/agents/*.agent.md).github/skills/*/SKILL.md)Other:
.ps1,.sh,.py)Sample Prompts (for AI Artifact Contributions)
User Request:
Invoke the
cspell-configprompt (via/promptor equivalent) to update the project'scspell.jsonwith domain-specific vocabulary.Execution Flow:
npx cspell --config cspell.json "**/*"to identify unknown wordswordsarray (alphabetized, deduped)ignorePathswith.gitignoreentriesOutput Artifacts:
Updated
cspell.jsonwith expandedwordsarray and refinedignorePaths. A summary of added tokens, ignored paths, and remaining issue count.Success Indicators:
cspell.jsonwords array is alphabetized and contains no duplicatesignorePathsreflects.gitignoreexclusions for generated foldersNote
Human review is recommended for agent-populated Sample Prompts content.
Testing
npm run lint:md): Failed (environment issue — missingmarkdownlint-rule-search-replacemodule, pre-existing)npm run spell-check): Failed (4 pre-existing issues in unrelated files: docs/contributing/documentation-maintenance.md, docs/getting-started/methods/submodule.md)npm run lint:frontmatter): Passed (537 files validated, 0 errors)npm run validate:skills): Passed (19 skills, 0 errors, 1 pre-existing warning in customer-card-render)npm run lint:md-links): Failed (environment issue —markdown-link-checknot installed, pre-existing)npm run lint:ps): Passed (all files clean)Checklist
Required Checks
AI Artifact Contributions
/prompt-analyzeto review contributionprompt-builderreviewRequired Automated Checks
The following validation commands must pass before merging:
npm run lint:md(N/A — environment missingmarkdownlint-rule-search-replace)npm run spell-check(N/A — 4 pre-existing issues in unrelated files)npm run lint:frontmatternpm run validate:skillsnpm run lint:md-links(N/A —markdown-link-checknot installed)npm run lint:psWarning
This PR includes experimental GHCP artifacts that may have breaking changes.
.github/prompts/experimental/cspell-config.prompt.mdGHCP Artifact Maturity
.github/prompts/experimental/cspell-config.prompt.mdGHCP Maturity Acknowledgment
Additional Notes
# Promptssection; one was introduced to house this entry.npm run plugin:generatebefore committing.