Skip to content

EricGao888/chill-worklog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chill-worklog

An AI-powered worklog generator that reads git commit logs from your projects and summarizes them into daily, weekly, and monthly worklogs using any OpenAI-compatible LLM. Features include English-to-Chinese translation with technical term preservation, human-in-the-loop review for iterative polishing, and cascading data fallback for weekly/monthly reports.

Setup

1. Install dependencies

uv sync

2. Configure

Copy the example config files and fill in your values:

cp config/config.yaml.example config/config.yaml
cp config/projects.txt.example config/projects.txt

Edit config/config.yaml:

git_username: "Your Name"
openai_api_key: "sk-your-api-key"
openai_base_url: "https://your-openai-compatible-endpoint/v1"
model_name: "your-model-name"  # e.g., qwen3-coder-plus, gpt-4o, etc.

Edit config/projects.txt — add your project paths (one per line):

/Users/me/workspace/project-a
/Users/me/workspace/project-b

⚠️ Security: config/config.yaml, config/projects.txt, and output/ are gitignored to prevent leaking sensitive data.

Usage

Generate daily worklog

uv run python main.py daily                    # today
uv run python main.py daily --date 2026-03-04  # specific date
uv run python main.py daily --no-translate     # skip translation

Generate weekly worklog

uv run python main.py weekly                   # current week
uv run python main.py weekly --date 2026-03-04 # week containing this date

Weekly worklogs use existing daily worklogs when available, falling back to raw git commits for missing days.

Generate monthly worklog

uv run python main.py monthly                    # current month
uv run python main.py monthly --date 2026-03-04  # month containing this date

Monthly worklogs cascade: weekly worklogs → daily worklogs → git commits.

Human-in-the-Loop Review

After generating a worklog, you'll enter an interactive review loop:

  • y — Approve and save the worklog
  • n — Provide feedback; the LLM will polish the worklog based on your input
  • k — Add conservative keywords (technical terms that should not be translated). These are persisted to your config.yaml for future runs
  • q — Discard and exit without saving

Template Customization

Templates are in the templates/ directory using Jinja2 syntax:

  • templates/daily.md — Daily worklog template
  • templates/weekly.md — Weekly worklog template
  • templates/monthly.md — Monthly worklog template

You can customize these templates to match your preferred worklog format.

Conservative Keywords

Technical terms like Apache Spark, Kubernetes, Docker, etc. are preserved during translation. You can extend the list in two ways:

  1. Add to config/config.yaml under conservative_keywords
  2. Add on-the-fly during the review loop by pressing k

Architecture

Built with LangChain + LangGraph:

  • chill/graph.py — LangGraph StateGraph workflow (collect → rewrite → translate → summarize → render → review → polish/save)
  • chill/git_reader.py — Git log extraction via subprocess (captures commit subject + body)
  • chill/rewriter.py — Two-stage commit message rewriter (default filter + custom rules)
  • chill/llm_client.py — LangChain ChatOpenAI wrapper (compatible with any OpenAI-compatible API)
  • chill/translator.py — Placeholder-based translation with keyword preservation
  • chill/template_engine.py — Jinja2 template rendering
  • main.py — Click CLI entry point

Workflow Topology

Workflow Topology

A local copy is also saved at docs/workflow.png.

Mermaid source
graph LR
    START --> collect_data
    collect_data --> rewrite_node
    rewrite_node --> translate_node
    translate_node --> summarize
    summarize --> render_template
    render_template --> human_review
    human_review -->|approve| save_output
    human_review -->|request changes| polish
    human_review -->|add keywords| translate_node
    human_review -->|quit| END
    polish --> human_review
    save_output --> END
Loading

Output

Generated worklogs are saved to:

output/
├── daily/      # e.g., 2026-03-04.md
├── weekly/     # e.g., 2026-03-02_to_06.md
└── monthly/    # e.g., 2026-03.md

Roadmap

  • milestone1: summarize worklogs from git commit messages with HITL for final review and polishing. ✅
  • milestone2: add customizable git message rewriters✅, support logging llm interaction merics (token input / generated, requests)
  • milestone3: fault tolerance (persist intermediate result) during review loop, support retry llm interaction with network issues, ask user for confirmation if overwriting existing files
  • milestone3: make okr-oriented worklogs, with reference to user's okr docs
  • milestone3: mimic user's writing style after learning from user's previous manually-written worklogs

About

agentic workflow to write weekly / monthly worklogs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages