Generate weekly InfiniteTactics timecard entries from GitLab activity via glab. Use when the user asks to "fill out timecard", "generate timecard summary", "weekly timecard", "/timecard-summary", or needs proposed `ittime add` commands based on MR/commit activity. Fudges numbers to total >=40h/week and ~8h/day with start time <=9:00 (standup).
Generate a proposed weekly timecard from GitLab activity.
ittime project IDs (see ~/doc/projects/timecard/ or ittime projects).~/.claude/skills/timecard-summary/scripts/fetch-activity.sh ${1:-0}
Writes /tmp/timecard-activity.json with MRs, commits, and notes authored by the current user in the target week. Uses (works across all GitLab projects the user has access to via endpoint).
glab apieventsRead the JSON, group by day (Mon-Fri), and infer the dominant project per day. Keep the summary brief - you're mapping real work to billable projects, not writing prose.
If the user has configured project mappings in ~/.config/timecard-summary/mapping.yml, use them. Otherwise ask which ittime project ID applies to each repo/group.
Commenting on or reviewing an MR is billable, but the correct project depends on whose work it is, not yours. For every MR-comment / MR-approval / MR-review event in the activity JSON:
~/.claude/skills/timecard-summary/scripts/resolve-customer.sh <project_id> <mr_iid>
This returns the MR plus its linked issues with their labels. Look for customer/site labels (default prefixes: customer::, site::, org::, client:: - edit the regex in the script if your team uses different conventions).
Resolution rules:
ittime project.Closes (first in description), else ask the user.(project_id, mr_iid) in /tmp/timecard-customer-cache.json to avoid repeated API hits.Batch this step: collect unique (project_id, mr_iid) pairs from the activity JSON before calling, and run resolutions in parallel where sensible.
Call:
~/.claude/skills/timecard-summary/scripts/generate-schedule.sh <week-start-date>
It outputs a proposed block layout per weekday that satisfies all constraints (start <=9:00, total >=40h, daily ~8h, lunch gap). Fill in the project IDs and notes from Step 2.
Print the resulting ittime add commands as a copyable block. Do not execute them - the user reviews and runs them.
Example output:
# Monday 2026-04-13 (8.0h)
ittime add -d 2026-04-13 -p 246 -s 8:30 -f 12:00 -n "MR !1234 review, KVM volume work"
ittime add -d 2026-04-13 -p 246 -s 12:30 -f 17:00 -n "Volume lifecycle impl"
ittime week checkAfter the user runs the commands, suggest ittime week to verify the total.
9:07.