ߛߓߍ ߞߏ ߢߊ (Cultural Code Comments)
Traditional code comments explain **what** or **how**. Cultural Code Comments explain **why** — through the lens of ancestral wisdom.
Full Public Reader
ߛߓߍ ߞߏ ߢߊ (Cultural Code Comments)
Code Documentation in N'Ko Proverbs and Wisdom
ߊ ߢߣߊ ߟߊ ߦߋ ߊ ߛߓߍ ߘߐ — "What is sought is found in writing"
---
Vision
Traditional code comments explain what or how. Cultural Code Comments explain why — through the lens of ancestral wisdom.
Every programming concept has a parallel in human experience. N'Ko proverbs, distilled over generations, capture these patterns. This system bridges code and culture.
Philosophy
| Programming Concept | N'Ko Wisdom | Proverb |
|---|---|---|
| Error handling | Rivers don't reverse | ߓߊ ߕߍ ߥߊ߫ ߞߐ ߝߍ߬ |
| Collaboration | One hand can't grab flour | ߓߟߏ ߞߋߟߋ߲ ߕߍ ߓߎ߬ߙߎ ߕߊ |
| Modularity | No one comes from one direction | ߡߐ߱ ߛߌ߬ ߕߍ ߓߐ߫ ߝߊ߲߬ ߞߋߟߋ߲ ߠߊ߫ |
| Patience/async | Patience is wisdom | ߢߍߥߟߊ ߦߋ ߣߡߊ |
| Documentation | Truth persists | ߕߌ߲ ߦߋ ߟߊ ߥߟߊ ߛߎ |
| Learning/iteration | The hand of learning is response | ߖߐ ߓߟߏ ߦߋ ߖߊ߬ߓߌ |
| Team architecture | One head doesn't carry the roof | ߞߎ߲ ߞߋߟߋ߲ ߕߍ ߜߊ߬ߙߊ ߕߊ |
Installation
# Python package
pip install nko-comments
# CLI tool
nko-comment suggest my_code.py
# VS Code extension
cd vscode-extension
npm install && npm run compile
vsce package
code --install-extension nko-cultural-comments-0.8.0.vsix
# LSP Server (Gen 8!) — Works with Neovim, Emacs, Helix, Sublime Text
cd lsp-server
npm install && npm run build
npm link # Makes nko-cultural-lsp available globallyUsage
As Comments
# ߓߊ ߕߍ ߥߊ߫ ߞߐ ߝߍ߬
# "The river doesn't go backwards"
# Once an error is handled, we move forward—never retry blindly.
def process_with_recovery(data):
try:
return transform(data)
except TransformError as e:
log_error(e)
return fallback(data) # Flow forward, not backWith CLI
# Suggest proverbs for a file
$ nko-comment suggest api.py
Found 4 wisdom moments:
Line 23 (async/await pattern):
ߢߍߥߟߊ ߦߋ ߣߡߊ — "Patience is wisdom"
Line 47 (collaborative function):
ߓߟߏ ߞߋߟߋ߲ ߕߍ ߓߎ߬ߙߎ ߕߊ — "One hand cannot grab flour"
# Auto-insert cultural comments
$ nko-comment insert api.py --interactiveIn Documentation
## API Design Philosophy
> ߞߎ߲ ߞߋߟߋ߲ ߕߍ ߜߊ߬ߙߊ ߕߊ
> *"One head doesn't carry the roof"*
Our API is designed for composition. No single endpoint does everything.
Each service carries part of the load—together, they shelter the system.Proverb Categories
### ߛߓߍߞߏ (Foundations)
Core programming principles — variables, functions, types
### ߢߊߦߌ߬ (Flow)
Control flow — conditionals, loops, error handling
### ߓߊ߯ߙߊ (Architecture)
System design — modules, services, data flow
### ߞߊ߲ߞߊ (Communication)
APIs, protocols, documentation
### ߖߐ (Learning)
Testing, debugging, iteration
API
from nko_comments import CulturalComments
cc = CulturalComments()
# Get wisdom for a concept
wisdom = cc.for_concept("error-handling")
print(wisdom.nko) # ߓߊ ߕߍ ߥߊ߫ ߞߐ ߝߍ߬
print(wisdom.meaning) # The river doesn't go backwards
print(wisdom.applied) # Handle errors, then move forward
# Analyze code for cultural comment opportunities
suggestions = cc.analyze_file("my_code.py")
for s in suggestions:
print(f"Line {s.line}: {s.proverb.nko}")
print(f" Why: {s.rationale}")
# Generate docstring with cultural wisdom
docstring = cc.generate_docstring(
function_name="distributed_consensus",
concept="collaboration"
)Git Integration (Gen 8!)
Git Hooks
Integrate wisdom into your commit workflow:
cd Desktop/nko-code-comments/git-hooks
# Install for current repository
./install.sh
# Install globally for all repositories
./install.sh --globalThis adds:
- pre-commit: Suggests wisdom for staged files
- prepare-commit-msg: Adds wisdom template to commit messages
- commit-msg: Optionally appends proverbs
GitHub Actions
Automatically suggest wisdom on Pull Requests:
# .github/workflows/cultural-comments.yml
name: Cultural Code Comments
on:
pull_request:
types: [opened, synchronize]
jobs:
wisdom:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: nko-comments/cultural-comments-action@v1
with:
github-[sensitive field redacted]
comment-style: both # inline|summary|bothSee [`.github/workflows/cultural-comments.yml`](.github/workflows/cultural-comments.yml) for the full example.
Web Dashboard & Analytics (Gen 8.4!)
Visualize and track N'Ko wisdom across your codebase and team.
Quick Start
cd dashboard
npm install
npm start
# Opens http://localhost:3847Features
- 📊 Usage Analytics — Track total wisdom insertions across projects
- 🏆 Top Concepts — See which proverbs resonate most with your team
- 📈 Daily Trends — Monitor adoption over time
- ✨ Random Wisdom — Refresh your mind with N'Ko proverbs
- 📚 Proverb Catalog — Browse and discover all available wisdom
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
| `/api/proverbs` | GET | List all proverbs with usage counts |
| `/api/proverbs/:concept` | GET | Get specific proverb by concept |
| `/api/usage` | POST | Record a wisdom insertion |
| `/api/stats` | GET | Get dashboard statistics |
| `/api/random` | GET | Get random wisdom |
| `/api/health` | GET | Health check with bonus wisdom |
Integration
Report usage from anywhere:
# Python
from dashboard.client.reporter import WisdomReporter
reporter = WisdomReporter('http://localhost:3847')
reporter.report(
file_path='api.py',
concept='async',
proverb_nko='ߢߍߥߟߊ ߦߋ ߣߡߊ',
proverb_english='Patience is wisdom',
line_number=42
)# Git post-commit hook
python -m dashboard.client.reporter post-commitEnvironment Variables
NKO_DASHBOARD_URL=http://localhost:3847 # Dashboard URL
PORT=3847 # Server port---
LSP Server (Gen 8.3!)
Universal editor support via Language Server Protocol. Works with any LSP-compatible editor.
Quick Setup
cd lsp-server
npm install && npm run build
npm link # Installs nko-cultural-lsp globallyEditor Configs
| Editor | Config Location |
|---|---|
| Neovim | `lsp-server/editor-configs/neovim/init.lua` |
| Emacs | `lsp-server/editor-configs/emacs/nko-lsp.el` |
| Helix | `lsp-server/editor-configs/helix/languages.toml` |
| Sublime | `lsp-server/editor-configs/sublime/LSP-nko-cultural.sublime-settings` |
Features
- Completions — Type `// nko` or `# nko` for proverb suggestions
- Hover — See full wisdom with transliteration and context
- Code Actions — Quick-insert wisdom above detected patterns
- Pattern Detection — Recognizes `async/await`, `try/catch`, loops, imports, etc.
-- Neovim example
lspconfig.nko_cultural.setup({})
-- Then: <leader>nw to insert wisdom, <leader>nr for random proverbSee [`lsp-server/README.md`](lsp-server/README.md) for detailed setup instructions.
---
Extending
Add your own proverbs:
cc.add_proverb(
nko="ߖߐ߬ߙߌ ߦߋ ߛߌ߲ߘߌ ߛߓߍ",
latin="jori ye sindi sebe",
english="Testing is the writing of knowledge",
concept="testing",
applied="Tests are documentation that proves understanding"
)Cultural Notes
N'Ko (ߒߞߏ) was created in 1949 by Solomana Kante to write Manding languages (Bambara, Maninka, Jula, Dioula). It represents a movement of African intellectual sovereignty—creating writing systems by Africans, for Africans.
Using N'Ko in code is an act of cultural preservation and technological innovation. It says: our wisdom belongs in the future we're building.
Contributing
We welcome:
- New proverb mappings
- Language additions (Wolof, Yoruba, Swahili...)
- IDE integrations
- Translations
See [CONTRIBUTING.md](docs/CONTRIBUTING.md)
---
AI Wisdom Engine (Gen 8.5!)
Semantic analysis + LLM integration for deeply contextual wisdom suggestions.
The AI Wisdom Engine goes beyond pattern matching. It understands code semantics to suggest the most culturally and technically appropriate N'Ko proverbs.
Quick Start
cd ai-wisdom-engine
# Analyze a code file
./nko-wisdom analyze my_code.py
# Get random wisdom
./nko-wisdom random
# Browse by category
./nko-wisdom categories
./nko-wisdom category async
# Start REST API server
./nko-wisdom serve 8420
# Generate LLM prompt for deep analysis
./nko-wisdom prompt my_code.pyFeatures
| Feature | Description |
|---|---|
| Semantic Analysis | Multi-layer analysis: patterns, themes, complexity |
| Relevance Scoring | 0-1 score with transparent reasoning |
| 15 Categories | Flow, async, modularity, security, performance, etc. |
| REST API | Full API at `http://localhost:8420` |
| LLM Integration | Generate prompts for Claude/GPT for even deeper analysis |
| Teaching Mode | Learn the cultural context of each proverb |
REST API Endpoints
# Random wisdom
curl http://localhost:8420/random
# List all proverbs
curl http://localhost:8420/proverbs
# Get by category
curl http://localhost:8420/category/async
# Suggest for code
curl -X POST http://localhost:8420/suggest \
-H "Content-Type: application/json" \
-d '{"code": "async def fetch_data(): await api.get()", "language": "python"}'
# Deep analysis
curl -X POST http://localhost:8420/analyze \
-H "Content-Type: application/json" \
-d '{"code": "try: ... except: ...", "language": "python"}'LLM Integration
Generate prompts that help language models suggest the most appropriate proverbs:
from llm_integration import LLMWisdomIntegration
integration = LLMWisdomIntegration()
# Generate analysis prompt for Claude/GPT
prompt = integration.generate_analysis_prompt(code, "python")
# Generate teaching prompt for a specific proverb
teaching = integration.generate_teaching_prompt("ߢߍߥߟߊ ߦߋ ߣߡߊ")
# Get plugin config for editor integrations
config = integration.create_plugin_config()Extended Proverb Database
15 categories with semantic triggers:
| Category | Example Pattern | Proverb |
|---|---|---|
| flow | try/catch/finally | ߓߊ ߕߍ ߥߊ߫ ߞߐ ߝߍ߬ |
| async | async/await/Promise | ߢߍߥߟߊ ߦߋ ߣߡߊ |
| modularity | import/require | ߡߐ߱ ߛߌ߬ ߕߍ ߓߐ߫ ߝߊ߲߬ ߞߋߟߋ߲ ߠߊ߫ |
| security | private/validate | ߘߊ ߕߐ߲߬ߣߍ ߕߍ ߛߐ߬ ߞߣߍ ߘߌ߫ |
| performance | cache/memo/lazy | ߝߟߍ ߞߊ ߝߟߍ ߕߊ߬ |
| simplicity | pure/single | ߘߋ߲ ߞߋߟߋ߲ ߦߋ ߛߌ߬ ߡߊ߬ |
| transformation | map/filter/reduce | ߓߊ߯ ߘߏ߲߬ ߣߌ߲߬ ߞߐ ߥߊ߫ ߓߊ߯ ߕߐ߲ ߘߌ߫ |
| persistence | database/backup | ߖߌ ߡߊ߲߬ ߓߐ߫ ߞߎ߲߬ ߞߋߟߋ߲ ߡߊ߬ |
---
Pedagogy System (Gen 8.6)
⚔️ Wisdom Katas — Practice Through Proverbs
6 interactive coding exercises, each rooted in an N'Ko proverb. The proverb isn't decoration — it's the specification.
cd pedagogy
python3 nko-pedagogy kata list # Browse katas
python3 nko-pedagogy kata start river-flow # Begin a kata
python3 nko-pedagogy kata hint river-flow 0 # Get a hint
python3 nko-pedagogy kata complete river-flow # Unlock wisdom
python3 nko-pedagogy kata journal # View unlocked wisdom| Kata | Proverb | Concept | Difficulty |
|---|---|---|---|
| river-flow | ߓߊ ߕߍ ߥߊ߫ ߞߐ ߝߍ߬ | Error handling | Seed |
| many-hands | ߓߟߏ ߞߋߟߋ߲ ߕߍ ߓߎ߬ߙߎ ߕߊ | Collaboration | Sprout |
| patient-await | ߢߍߥߟߊ ߦߋ ߣߡߊ | Async | Branch |
| many-directions | ߡߐ߱ ߛߌ߬ ߕߍ ߓߐ߫ ߝߊ߲߬ ߞߋߟߋ߲ ߠߊ߫ | Modularity | Canopy |
| found-in-writing | ߊ ߢߣߊ ߟߊ ߦߋ ߊ ߛߓߍ ߘߐ | Documentation | Sprout |
| shared-roof | ߞߎ߲ ߞߋߟߋ߲ ߕߍ ߜߊ߬ߙߊ ߕߊ | Consensus | Branch |
Multi-language support: Python, JavaScript, Rust starter code for each kata.
🌍 Cross-Cultural Wisdom Bridge
Maps N'Ko proverbs to equivalent wisdom from 10+ cultures — showing that programming truths are universal human truths.
python3 nko-pedagogy bridge map # Full wisdom map
python3 nko-pedagogy bridge bridge error-handling # See parallels
python3 nko-pedagogy bridge culture Japanese # Filter by culture
python3 nko-pedagogy bridge comment async --lang rust # Generate multi-cultural commentCultures represented: Arabic, Chinese, Hindi, Italian, Japanese, Korean, Latin/Roman, Spanish, Zulu/Nguni.
Example bridge for error-handling:
- N'Ko: ߓߊ ߕߍ ߥߊ߫ ߞߐ ߝߍ߬ — "The river doesn't go backwards"
- Japanese: 覆水盆に返らず — "Spilled water doesn't return to the tray"
- Hindi: पानी गई भैंस की — "Water gone, buffalo gone"
- Spanish: Lo hecho, hecho está — "What's done is done"
📚 Wisdom Tutorials
Step-by-step coding tutorials where each step is guided by a different proverb.
python3 nko-pedagogy tutorial list # Browse tutorials
python3 nko-pedagogy tutorial preview resilient-api # Preview in terminal
python3 nko-pedagogy tutorial generate resilient-api # Save as Markdown
python3 nko-pedagogy tutorial generate resilient-api -f notebook # Jupyter notebookAvailable tutorials:
- Resilient API — Build a production API client using 4 proverbs as architecture
- Universal Data Pipeline — Source-agnostic data processing through modularity wisdom
---
Project Evolution
| Gen | Component | Description |
|---|---|---|
| 8.0 | Python Library | Core `src/cultural_comments.py` with AST analysis |
| 8.1 | VS Code Extension | Rich IDE integration with CodeLens, hover, commands |
| 8.2 | Git Hooks + GitHub Actions | CI/CD integration, PR wisdom comments |
| 8.3 | LSP Server | Universal editor support via Language Server Protocol |
| 8.4 | Web Dashboard | Analytics, team tracking, proverb catalog, trends |
| 8.5 | AI Wisdom Engine | Semantic analysis + LLM integration for deep wisdom |
| 8.6 | Pedagogy System | Katas, cross-cultural bridges, and wisdom tutorials |
---
ߟߐ߲ߠߌ߲ ߦߋ ߛߋ߲ ߠߊ߫ — Knowledge is power
Promotion Decision
Keep in the searchable backlog until it intersects a live paper or system.
Source Anchor
nko-code-comments/README.md
Detected Structure
Method · Code Anchors · Architecture