Task Manager Submodule

Purpose

This submodule manages the state, task tracking, and coordination for the solfunmeme-dioxus project and its related submodules (e.g., social media, dataset, sync, campaign phases).

Features

  • Centralized state recording (state.json)
  • Tracks project, dataset, and social media status
  • Designed for extensibility (add scripts, dashboards, etc.)

Directory Structure

task_manager/
├── README.md         # This file
├── Cargo.toml        # Crate manifest
├── src/              # Rust source code
├── datasets/         # Data related to tasks (e.g., task definitions, progress logs)
├── states/           # State definitions and management logic
└── state.json        # Current state of the project (example/placeholder)

Example State File

See state.json for the current state structure.

Usage

  • Update state.json after major project events (dataset update, campaign phase change, etc.)
  • Use scripts in src/ to automate state management (coming soon)

Extending

  • Add new fields to state.json as needed
  • Add scripts for automation, dashboards, or integrations

Part of the solfunmeme-dioxus project ecosystem

AI Agent Directives

Refer to GEMINI.md in this directory for specific guidelines for AI agents contributing to task_manager.

Task Manager: Turtle-Based Semantic Migration Plan

1. Semantic Task Representation

  • Each task, dependency, and status will be a node in an RDF/Turtle graph.
  • Example:
    tm:Task123 a tm:Task ;
        tm:content "Implement emoji ontology export" ;
        tm:status "pending" ;
        tm:dependsOn tm:Task122 .

2. Sophia Integration

  • Use Sophia to parse, query, and update the task graph in Rust.
  • Tasks can be queried by status, dependencies, or content.

3. SerDe for Task State

  • Serialize/deserialize task instances and state to/from Turtle using SerDe.
  • Enables persistence, sharing, and versioning of task data.

4. Integration with Universal Semantic Code Graph

  • Tasks can reference or be referenced by code, component, or contract nodes in the main ontology.
  • Enables unified project management, code, and UI orchestration.

5. Future LLM and GUI Integration

  • LLMs can query, generate, or update tasks via the semantic graph.
  • Dioxus GUI can render and edit tasks live from the Turtle graph.

This migration will make the task manager a first-class, semantic, and LLM-accessible part of the universal code graph.

Internal AI TODO Integration

  • Internal TODOs generated by the AI assistant are now tracked as Task entries in the codebase.
  • These TODOs can be exported to Turtle (RDF) format using the export_internal_todos_to_turtle function in src/main.rs.

Exporting Internal TODOs to Turtle

To export the internal TODOs to a Turtle file:

// In your main or a script:
export_internal_todos_to_turtle("./states/gemini/internal_todos.ttl").expect("Export failed");

This will create a Turtle file with all internal TODOs, making them part of your semantic code graph and ontology workflows.

  • Each TODO is exported as a tm:Task with id, content, status, and dependencies.
  • Emoji annotations are included if available in the ontology.

For more details, see the Task struct and export functions in src/main.rs.

Exporting All Tasks as JSON

You can export all tasks in the state directory as a single JSON array file using the CLI:

cargo run --package task-manager -- export-all-tasks-json

This will create task_manager/states/gemini/all_tasks.json containing all tasks as an array.

You can specify a custom output path:

cargo run --package task-manager -- export-all-tasks-json --output my_tasks.json

Adding Tasks

You can add tasks in two ways:

1. Using the CLI

cargo run --package task-manager -- add <task_id> <content> --dependencies dep1 dep2

Example:

cargo run --package task-manager -- add review-forgejo-rust-port "Rewrite forgejo-python/issues.py in Rust" --dependencies import-issues-codeberg-github

2. By Writing JSON Directly

Create a file in task_manager/states/gemini/ named <task_id>.json with this structure:

{
  "id": "review-forgejo-rust-port",
  "content": "Rewrite forgejo-python/issues.py in Rust",
  "status": "pending",
  "dependencies": ["import-issues-codeberg-github"]
}

Both methods are supported and can be mixed as needed.