LLM Editing Reference Guide¶
Version: 1.0
Last Updated: 2025-11-12
Maintainer: Documentation Team
Applies To: All automated and assisted LLM edits within this repository
1. Purpose¶
This guide defines the global editing principles, workflow, and quality standards that every Large Language Model (LLM) interaction MUST follow when proposing, generating, or refining documentation in this repo. It complements:
doc-style-guide.md(human-facing style & formatting)LLM-README.md(LLM navigation & structural metadata)doc-relationships.yml(relationships, prerequisites, workflow ordering)
This document prevents style drift, duplication, hallucination, and inconsistent structural changes.
2. Core Editing Principles¶
- Preserve existing information fidelity—never remove accurate domain detail for brevity.
- Minimize disruption: prefer incremental improvement over full rewrites unless explicitly requested.
- Be source-driven: derive facts from existing docs; if uncertain, flag with an inline NOTE (admonition) and DO NOT invent specifics.
- Maintain cross-link integrity—add internal links only when they add navigational value and the target exists.
- Avoid redundancy—before adding a definition, check
acronyms-and-definitions.md. - Optimize for scannability: headings, lists, tables, and admonitions over paragraphs of dense text.
- Honor audience & difficulty metadata—do not shift a document’s intended audience unless explicitly reclassified.
- Never introduce marketing fluff; keep neutral, instructional tone.
- Prefer present tense; avoid future speculation unless clearly marked (e.g., Roadmap section).
- Protect repository consistency: naming, navigation labels, and conceptual hierarchy must match
mkdocs.ymlunless a coordinated change is part of the request.
3. Voice & Tone¶
- Neutral, concise, explanatory.
- Sentence construction: short, active voice.
- Avoid rhetorical questions, filler phrases, exclamation marks, and colloquialisms.
- Use second person ("You can configure…") sparingly; prefer declarative statements ("Configure X in…").
4. Structural Standards¶
Follow the 11-step structure from doc-style-guide.md for configuration/location documents. For non-configuration conceptual guides, use:
- Title (H1)
- Purpose / Scope
- When to Use / Applicability
- Prerequisites (cross-check
doc-relationships.yml) - Core Concepts / Field Breakdown
- Procedures / Workflows (link to
workflows-guide.mdif applicable) - Examples / Scenarios
- Troubleshooting / Edge Cases
- Related Documents / Next Steps
- Revision Metadata
Use H2 for primary sections, H3 for nested subsections. Do not exceed H4 unless strictly necessary.
5. Metadata Block (Major Docs Only)¶
Embed or maintain a metadata block near the top (if not already present) for key documents:
<!--
category: Routing
audience: Administrator
difficulty: Intermediate
time_required: 20m
prerequisites: carrier.md, provider-ratecard.md
related: routing-strategy.md, routing-usa.md
next_steps: global-routing.md
last_reviewed: 2025-11-12
llm_validation: true
-->
Rules:
- Only include existing file references.
- Update
last_reviewedwhen making substantive edits. - Do NOT add speculative prerequisites.
- Set
llm_validation: trueonly after performing the Quality Checklist (Section 13).
6. Formatting Rules (LLM-Specific Reinforcement)¶
- Lists: use
+for unordered, numeric for ordered (consistent with style guide). - Internal links: relative paths (e.g.,
[Routing Strategy](routing-strategy/)). - External links: bold link text (e.g.,
[**Mermaid Docs**](https://mermaid-js.github.io/)). - Code blocks: language-tag and
linenums="1"only where line numbers aid reference. - Buttons/UI actions:
Save(bold + backticks). - Options/selections:
Enabled,Disabled. - Use admonitions for warnings, tips, and notes:
!!! warning "High CPS Impact"
Adjusting this value may affect carrier throttling.
7. Terminology & Acronyms¶
Before defining: search acronyms-and-definitions.md. If missing:
- Add term there (not inline in multiple docs).
- Keep definition concise: one sentence + optional clarifying example.
- Never redefine the same acronym differently.
8. Cross-Linking & Relationship Integrity¶
When adding new links:
- Check
doc-relationships.ymlfor existing relationships. - Only introduce links that represent actual conceptual or workflow dependency.
- Do not create circular next-steps loops.
- Prefer linking forward to deeper/more advanced docs; backward links only if prerequisite confusion is likely.
9. Content Improvement Rules¶
Allowed improvements:
- Clarify ambiguous sentences.
- Break dense paragraphs into structured lists.
- Add missing, verifiable steps aligned with existing workflows.
- Insert examples derived from current documented patterns.
- Add troubleshooting notes for known failure modes (if documented elsewhere).
Prohibited changes:
- Fabricated feature behavior.
- Unverified performance claims.
- Renaming documented features without synchronized navigation update.
- Removing sections solely for brevity.
10. Fact Checking Hierarchy¶
- Existing file content (exact).
doc-relationships.ymlfor dependencies.- Glossary file for definitions.
- Workflow guide for procedural flows.
If any conflict is detected: preserve the most specific file (e.g., feature doc overrides generalized guide) and add an inline NOTE with a suggestion for future reconciliation.
11. Ambiguity & Uncertainty Handling¶
If user asks for undocumented behavior:
- Provide current documented scope.
- State limitation: "This feature’s extended behavior isn’t documented here."
- Suggest confirming with product or creating an issue.
Never guess implementation details.
12. Commit Message & PR Annotation (For Automated LLM Edits)¶
Use conventional prefix:
docs(style):formatting or structural adjustmentdocs(clarity):wording improvementsdocs(xref):cross-link additionsdocs(metadata):update metadata blocksdocs(workflow):add or adjust procedural sequencedocs(glossary):glossary addition
Include a short checklist in PR description:
LLM Edit Validation:
- [x] Metadata updated (if required)
- [x] Cross-links validated
- [x] Glossary checked
- [x] No hallucinated content
- [x] Style guide compliance
13. LLM Quality Checklist (Apply Before Marking Complete)¶
| Check | Description | Pass Criteria |
|---|---|---|
| Structure | Matches expected doc pattern | All major sections present or intentionally omitted with rationale |
| Tone | Neutral, instructional | No marketing/sales phrasing |
| Cross-Links | Valid & non-redundant | All links resolve to existing files |
| Terminology | Consistent & up to date | No duplicate or conflicting acronyms |
| Accuracy | No fabricated data | All new info sourced from existing docs |
| Formatting | Lists, code, admonitions correct | No mixed list markers, proper code fences |
| Metadata | Present & updated (major docs) | last_reviewed updated; fields valid |
| Redundancy | No duplication of glossary terms | Glossary edits centralized |
| Navigation | Headings align with mkdocs nav labels if relevant | No unauthorized label divergence |
| Accessibility | Clear for new & experienced users | Section intros concise & purposeful |
14. Examples¶
14.1 Improving a Dense Paragraph¶
Before:
Routing allows assigning carriers based on quality metrics and priorities which can be adjusted dynamically.
After:
**Routing Functions**
+ Carrier selection based on priority tiers
+ Quality metric evaluation (ASR, ACD) for dynamic reordering
+ Failover path activation when threshold breached
14.2 Adding a Prerequisite Block¶
!!! info "Prerequisites"
Review **`Carrier Main`** configuration before modifying Routing Strategy.
14.3 Document Metadata Addition¶
(See Section 5 for template.)
15. Adding New Documents (LLM Workflow)¶
- Confirm need (not a duplicate of existing doc).
- Draft minimal scaffold with metadata block.
- Populate sections with sourced content only.
- Insert appropriate cross-links (prerequisites & next steps).
- Add glossary entries if truly new terminology.
- Update
llm.txtanddoc-relationships.yml. - Run Quality Checklist.
16. Handling Large Refactors¶
Only perform large refactors when:
- Multiple sections are outdated/inaccurate.
- Structural ambiguity causes user confusion.
Process: fork → propose outline → apply incremental changes by section → validate after each stage.
17. Automation & Future Enhancements (Optional)¶
Potential next steps to further standardize LLM edits:
- Vale style rule set aligned with
doc-style-guide.md. - CI job: link integrity & glossary consistency check.
- Metadata schema validation (JSON Schema → transform from HTML comment blocks).
- Diff classifier that flags potential hallucination (new unlinked proper nouns).
- Content aging report (documents > 180 days since
last_reviewed).
18. Escalation Guidelines¶
If an edit would:
- Change navigation structure
- Introduce or deprecate major feature coverage
- Require multi-doc synchronization
Then: mark PR as needs-review and include impact summary.
19. Non-Goals¶
This guide does NOT define:
- Build/CI tooling specifics
- API schema evolution rules
- Release note formatting beyond documentation references
20. Final Validation Phrase¶
When an LLM completes an edit session and passes all checklist items, append (non-rendered HTML comment) at end of file:
<!-- llm_session: validated 2025-11-12 -->
Never add if any checklist item failed.
End of LLM Editing Reference Guide