зеркало из
				https://github.com/docxology/cognitive.git
				synced 2025-10-31 05:06:04 +02:00 
			
		
		
		
	
		
			
				
	
	
	
		
			3.8 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			3.8 KiB
		
	
	
	
	
	
	
	
Git Workflow Guide
Overview
This guide outlines our Git workflow for managing cognitive modeling projects, integrating with both cursor_integration and obsidian_usage.
Repository Structure
Core Branches
- main- Stable production code
- develop- Integration branch
- feature/*- Feature branches
- release/*- Release preparation
- hotfix/*- Production fixes
Workflow Patterns
Feature Development
- 
Create feature branch from develop:git checkout develop git pull origin develop git checkout -b feature/new-feature
- 
Develop with cursor_integration: - Use AI assistance
- Follow code_style
- Update documentation_guide
 
- 
Commit changes: git add . git commit -m "feat: add new feature - Added X functionality - Updated Y components - Related to #issue"
Knowledge Base Changes
Working with Obsidian
- 
Create knowledge branch: git checkout -b kb/topic-name
- 
Update content: - Follow obsidian_usage guidelines
- Maintain linking_patterns
- Update node_types
 
- 
Commit changes: git add knowledge_base/ git commit -m "kb: update topic structure - Added new nodes - Updated relationships - Fixed broken links"
Commit Conventions
Message Structure
<type>(<scope>): <subject>
<body>
<footer>
Types
- feat: New feature
- fix: Bug fix
- docs: Documentation
- kb: Knowledge base
- refactor: Code refactoring
- test: Testing
- chore: Maintenance
Scopes
- agent: Agent-related changes
- belief: Belief network updates
- model: Model implementation
- docs: Documentation
- kb: Knowledge base
Integration Practices
With Obsidian
- Track .obsidian/selectively
- Include templates
- Exclude personal settings
- See obsidian_usage
With Cursor
- Include .cursorrules
- Track AI configurations
- See cursor_integration
Branching Strategy
Feature Branches
- Branch from: develop
- Merge to: develop
- Naming: feature/description
Knowledge Base Branches
- Branch from: main
- Merge to: main
- Naming: kb/topic
Release Branches
- Branch from: develop
- Merge to: mainanddevelop
- Naming: release/version
Code Review
Process
- Create Pull Request
- Use cursor_integration for review
- Check code_style compliance
- Verify testing_guide coverage
- Update documentation_guide
Checklist
- Code follows style guide
- Tests added/updated
- Documentation updated
- Knowledge base links valid
- CI/CD passes
Conflict Resolution
Strategy
- 
Keep local branch updated: git fetch origin git rebase origin/develop
- 
Resolve conflicts: - Check linking_patterns
- Maintain node_types integrity
- Preserve knowledge structure
 
Best Practices
Repository Maintenance
- Regular cleanup
- Archive old branches
- Update documentation
- Follow maintenance_guide
Knowledge Management
- Consistent structure
- Clear relationships
- Updated metadata
- See obsidian_usage
Collaboration
- Clear communication
- Regular updates
- Proper documentation
- Follow workflow_guides
Automation
Git Hooks
#!/bin/sh
# pre-commit hook
npm run lint
npm run test
CI/CD Integration
- Automated testing
- Documentation generation
- Knowledge base validation
- See deployment_guide
Troubleshooting
Common Issues
- Merge conflicts
- Lost changes
- Broken links See troubleshooting for solutions.
