How jmikedupont2/meta-meme works
Project type and purpose
• Meta-Meme is an open-source, CLI-driven Python framework and library for collaborative human-AI creative exploration.
• It provides a core engine (metameme/metameme.py), a command-line interface (metameme/cli.py), and a collection of prompt examples, transformations, and documentation.
File structure
• Top-level “metameme/” directory: the core Python package (__init__.py, cli.py, metameme.py).
• “llms/” directory: organized subdirectories of prompt/example files for different language models.
• “examples/”: markdown demos.
• “docs/”: Sphinx documentation.
• “tests/”: unit tests for core functionality.
README insights
• Emphasis on human-AI collaboration, vector-based knowledge, pluggable tools (e.g., ToEmoji), community contributions.
• No external DB or GUI; persistence is file-based.
• Interfaces: CLI → core logic → LLM connectors (via API clients) and transform functions → file system for examples.
Main components and their interactions
a. User/CLI layer
• Entry point: metameme/cli.py
• Parses commands (e.g., generate, evolve, document) and passes arguments to core engine.
b. Core engine
• metameme/metameme.py: orchestrates workflows—loads prompt templates, invokes LLM connectors, applies transforms, writes outputs.
• Plugin points for new tools and connectors via Python entry points or config.
c. LLM Connector modules
• Implicit: code that calls external APIs (OpenAI, Bard, Claude, etc.) using prompt files under “llms/”.
d. Transformation tools
• Functions like ToEmoji that convert or enrich text.
e. Persistence layer
• File-system directories: “llms/” for prompt templates, “examples/” for demos, output artifacts written to project folders.
f. Supporting infrastructure
• Tests (pytest in “tests/”), documentation pipeline (Sphinx in “docs/”), CI/CD via Travis/GitHub Actions.
Relationships & Data Flow
User → CLI → Core Engine → (Select LLM Connector → External LLM Service)
↘ Transformation Tool
↘ File-system (read prompt templates, write results)
Tests import Core Engine and simulate CLI calls.
Docs read metadata from code and examples.
Architectural patterns & design principles
• Modular CLI + core library separation.
• Pluggable connectors and transformation plugins (open-closed principle).
• File-based configuration and template management.
• Lightweight, no centralized database (file-system acts as datastore).
• Clear layering: presentation (CLI) → application logic → external services → storage.