Turn a Daily Work Log into a Weekly Report with AI and Reconcile the Numbers
An AI chat assistant can turn terse daily notes into a readable weekly report, but totals such as hours and completed-task counts should be checked separately. This guide uses a small synthetic work log, an AI drafting prompt, and a Python reconciliation script.
Content checked 2026.09.21Example files included
Show contents
Who this is forFor people who keep short daily work logs and want AI to draft weekly reports without losing control of hours, counts, and factual details.
What you need
Python 3.12
A plain CSV file containing the daily work log
01Why reconcile an AI-written weekly report?
AI is useful for reorganizing terse work notes into readable prose, but it should not be treated as the source of truth for arithmetic. A weekly report can sound coherent while quietly changing a total, counting one activity twice, or presenting a planned task as completed. A safer workflow separates narrative drafting from numerical reconciliation.
Use the work log as the factual source.
Ask the AI to summarize only what appears in the log.
Calculate hours and counts independently from the structured data.
Compare the AI report with the independently calculated totals.
Correct the report before sending or publishing it.
02Start with a small synthetic work log
The following work log is synthetic. Each row records one activity, the hours spent, and whether the activity was completed during the week. Keeping these fields structured makes later reconciliation much easier.
date
task
hours
status
2026-09-14
Clean customer CSV
2.0
completed
2026-09-14
Draft import script
1.5
completed
2026-09-15
Test import script
2.5
completed
2026-09-16
Investigate duplicate IDs
1.0
completed
2026-09-17
Update validation rules
2.0
completed
2026-09-18
Prepare user notes
1.5
in progress
By hand, the hours are 2.0 + 1.5 + 2.5 + 1.0 + 2.0 + 1.5 = 10.5 hours. Five of the six activities have status completed, so the completed-task count is 5. The final activity is still in progress and must not be counted as completed.
03Ask the AI to draft from the log, not from memory
Paste the log into an AI chat assistant and explicitly limit the task to rewriting and organizing the supplied data. Also ask it to state its totals so they can be checked.
Prompt to the AI: Using only the work log below, write a concise weekly report with three parts: work completed, work still in progress, and weekly totals. Do not invent outcomes or tasks. State the total logged hours and the number of completed activities. Keep the original task meanings.
A typical AI answer might say: This week, customer data was cleaned, an import script was drafted and tested, duplicate IDs were investigated, and validation rules were updated. User notes remain in progress. Total logged time was 10.5 hours, with 5 completed activities.
04Keep a structured copy for reconciliation
Save the same synthetic example as work_log.csv with the columns date, task, hours, and status. The reconciliation script should read this source file directly rather than trying to recover numbers from the AI-written prose.
Metric
Expected value from the log
Rows
6
Total hours
10.5
Completed activities
5
In-progress activities
1
This separation is important: the CSV is the evidence, while the weekly report is a presentation of that evidence.
05Recalculate hours and counts with Python
The following Python 3.12 script reads work_log.csv, validates the required fields, totals the hours, counts statuses, and writes a reconciliation report to outputs/weekly_reconciliation.txt. It does not overwrite an existing outputs directory.
python
from pathlib import Path
import csv
input_path = Path("work_log.csv")
output_dir = Path("outputs")
if output_dir.exists():
raise SystemExit("outputs already exists; remove or rename it before running again")
if not input_path.exists():
raise SystemExit("work_log.csv was not found")
required_fields = {"date", "task", "hours", "status"}
rows = []
with input_path.open("r", encoding="utf-8", newline="") as f:
reader = csv.DictReader(f)
if reader.fieldnames is None:
raise SystemExit("CSV has no header")
missing = required_fields - set(reader.fieldnames)
if missing:
raise SystemExit(f"Missing columns: {sorted(missing)}")
for line_number, row in enumerate(reader, start=2):
try:
hours = float(row["hours"])
except ValueError:
raise SystemExit(f"Invalid hours value on line {line_number}")
if hours < 0:
raise SystemExit(f"Negative hours on line {line_number}")
status = row["status"].strip().lower()
if status not in {"completed", "in progress"}:
raise SystemExit(f"Unexpected status on line {line_number}: {status}")
rows.append({
"date": row["date"].strip(),
"task": row["task"].strip(),
"hours": hours,
"status": status,
})
total_hours = sum(row["hours"] for row in rows)
completed_count = sum(row["status"] == "completed" for row in rows)
in_progress_count = sum(row["status"] == "in progress" for row in rows)
output_dir.mkdir()
report_path = output_dir / "weekly_reconciliation.txt"
report = (
f"Rows: {len(rows)}\n"
f"Total hours: {total_hours:.1f}\n"
f"Completed activities: {completed_count}\n"
f"In-progress activities: {in_progress_count}\n"
)
report_path.write_text(report, encoding="utf-8")
print(report, end="")
print(f"Saved: {report_path}")
06Compare the AI report with the calculated values
For this example, the independently expected values are 10.5 total hours and 5 completed activities. Compare those values with every numerical statement in the AI draft.
Check
Log result
AI draft
Decision
Total hours
10.5
10.5
Matches
Completed activities
5
5
Matches
In-progress activities
1
User notes remain in progress
Consistent
Check every number in the AI report against the reconciliation output.
Confirm that completed and in-progress work were not mixed.
Compare task wording with the original log so outcomes were not invented.
If the AI total differs, use the structured log calculation and revise the prose.
07Common mistakes and limits
Summing numbers from the AI report instead of from the original log.
Counting every row as completed even when some rows are still in progress.
Treating several log rows about the same project as one task without defining that counting rule.
Allowing the AI to infer achievements that are not explicitly recorded.
Changing status wording between the log and the script without updating the accepted values.
Ignoring missing rows, invalid hour values, or duplicated entries before calculating totals.
This example counts completed activities by row. A real organization may instead count tickets, deliverables, projects, or milestones, so the counting rule must be defined before reconciliation. The script also checks arithmetic and simple statuses only; it cannot determine whether a work-log entry itself is accurate or whether the reported work quality was sufficient.
Execution and verification record
2026-09-21 · hand-checked example · Python 3.12
Checked by hand that the six synthetic rows contain 2.0, 1.5, 2.5, 1.0, 2.0, and 1.5 hours.
Checked by hand that those values sum to 10.5 hours.
Checked by hand that five rows are marked completed and one row is marked in progress.
Checked that the comparison table uses the same 10.5-hour and 5-completed-activity results.
Checked that the script reads work_log.csv, validates required columns and statuses, and writes only to outputs/weekly_reconciliation.txt.
Checked that the script stops if the outputs directory already exists rather than overwriting a previous result.
Verification limits
The code was not executed by me.
The example is synthetic and does not represent a real employee, organization, or reporting system.
The script assumes each CSV row represents one countable activity.
The script can reconcile recorded hours and statuses but cannot verify whether the original log entries are truthful, complete, or correctly classified.
Turn “automate this” into an executable task description. Attach a synthetic sample with no sensitive data and a hand-checked expected result to complete a request for a script that totals work logs by team.
Check an aggregation function with four rows you can calculate by hand and 12 unit tests. Verify not only normal values but also empty input, zero, decimals, and invalid input.
Split a plausible summary into facts, calculations, and interpretations. Recalculate ratios and averages from synthetic monthly data, and rewrite sentences with missing sources or overstated causes into checkable statements.
Treat an AI-generated regex as a draft, not a finished rule. Build a small synthetic test table, compare expected and actual matches, revise the pattern, and save a review report before using it on real data.