AI Documentation Workflow
How to properly use AI assistants with system rules to maintain consistent, accurate documentation
AI Documentation Workflow
Overview
This guide establishes the proper workflow for using AI assistants to create and maintain documentation while ensuring consistency with our system rules and preventing contradictions.
Critical Requirement: All AI-generated documentation must follow this workflow to prevent architectural contradictions and maintain single-author consistency across the project.
Pre-Documentation Checklist
Before asking AI to write or modify ANY documentation:
Step 1: Identify Authoritative Sources
Always identify and reference the authoritative source for the topic:
Primary Sources (in order of authority):
- Feature Implementation Decision Tree - Authoritative for all placement decisions
- Existing implementations - Actual code in the codebase
- AI Coding Standards - Single author consistency rules
- Documentation Guidelines - Structure and format rules
Step 3: Verify No Contradictions Exist
If contradictions are found, STOP and resolve them before proceeding.
Proper AI Prompting Format
❌ WRONG Prompting
✅ CORRECT Prompting
Required AI Response Format
AI responses MUST start with verification:
Documentation Verification Process
After AI generates documentation:
Preventing Common Mistakes
Mistake 1: Ignoring the Decision Tree
Problem: Writing placement guidance without consulting the Feature Implementation Decision Tree.
Solution: Always reference the decision tree first and use it as the authoritative source.
Example Prevention:
Mistake 2: Creating Contradictory Examples
Problem: Showing examples that contradict established patterns.
Solution: Always verify examples against actual implementations.
Example Prevention:
Mistake 3: Missing Cross-References
Problem: Not linking to authoritative sources.
Solution: Always reference the decision tree and related documentation.
Example Prevention:
Quality Assurance Checklist
Before publishing any AI-generated documentation:
Content Accuracy
- All file paths exist and are correct
- Examples match actual implementations
- Guidance aligns with authoritative sources
- No contradictory information introduced
Consistency
- Terminology matches project standards
- Format follows documentation guidelines
- Cross-references are accurate and helpful
- Tone matches existing documentation
Architectural Alignment
- Placement decisions reference decision tree
- Examples follow established patterns
- Import paths are accurate
- Component organization follows three-layer architecture
Update Workflow for Contradictions
When contradictions are discovered:
Success Criteria
Documentation following this workflow will achieve:
✅ Consistency: All guidance aligns with authoritative sources ✅ Accuracy: Examples match actual implementations ✅ Maintainability: Single source of truth prevents drift ✅ Usability: Clear, non-contradictory guidance for developers
Tools and Commands
Essential Search Commands
Verification Scripts
Related Documentation
- Feature Implementation Decision Tree - Primary reference for all placement decisions
- AI Coding Standards - Single author consistency requirements
- Documentation Writing Best Practices - DRY principle and cross-referencing
- Technical Documentation Guidelines - Structure and format requirements
Remember: The Feature Implementation Decision Tree is the authoritative source for all architectural decisions. When in doubt, reference it first and ensure all documentation aligns with its guidance.
Feature Implementation Decision Tree
A step-by-step guide to determine where and how to implement new features, functions, and code in the codebase
Project Structure Migration Guide
Step-by-step guide for migrating to the hybrid architecture with domain-based business logic and feature-based UI organization.