agentic-productivity-setup
Build or rebuild a private, local-first macOS system that measures daily Git commits, active AI-agent sessions, and instruction prompts, then sends aggregate charts to Discord. Use when someone asks to set up an agentic productivity tracker, install daily agent reports, recreate this architecture on a Mac, or understand how to build it safely. Differentiator: creates a fresh system from generic contracts and never copies another person''s data, paths, credentials, repositories, prompts, or private configuration.
davidondrej · AI review on file
Installation
Read the source and dependencies before running a command. Copying does not install or execute anything.
npx skills add davidondrej/skills --skill agentic-productivity-setupAbout this skill
name: agentic-productivity-setup description: 'Build or rebuild a private, local-first macOS system that measures daily Git commits, active AI-agent sessions, and instruction prompts, then sends aggregate charts to Discord. Use when someone asks to set up an agentic productivity tracker, install daily agent reports, recreate this architecture on a Mac, or understand how to build it safely. Differentiator: creates a fresh system from generic contracts and never copies another person''s data, paths, credentials, repositories, prompts, or private configuration.'
Agentic Productivity Setup
Build a deterministic system that measures whether AI agents increase a person's output over time. Keep collection local. Send one private Discord report each morning with exactly three aggregate charts.
Privacy rules
Treat these as hard requirements:
- Build a fresh implementation. Never copy another installation, runtime database, log, session store, credential, machine path, repository list, or private configuration.
- Never persist or transmit prompt text, responses, tool output, repository names, file paths, identities, raw session IDs, or commit messages.
- Read native agent stores only to count events. Keep temporary identifiers in memory, then discard them. Persist a one-way hash only when a collector needs a cross-run baseline.
- Render charts locally by default. Only Discord should receive the daily totals and chart images. Explain the exact data flow before enabling any optional remote chart service.
- Store the Discord webhook in the current user's macOS Keychain. Never put it in source code, a command argument, an environment file, the database, logs, tests, or the scheduler definition.
- Use synthetic fixtures in tests. Never use copied session data, real prompts, real repository metadata, or live credentials.
- Open native databases read-only. Collectors must not modify agent state.
- Report missing, unreadable, or unsupported sources as coverage problems. Never turn collection failure into a silent zero.
Confirm the scope
First determine whether the user wants an explanation, a new project, or an installation. Do not create or install anything when they only asked how it works.
For a build, confirm or safely default these values:
- Platform: macOS. Ask before adapting the design to another operating system.
- Code root:
$HOME/code. - Timezone: the Mac's configured timezone.
- Report time: 08:00 local time.
- Report window: 90 days ending yesterday.
- Agent harnesses: only tools the user wants measured.
- Project location and reverse-DNS LaunchAgent label.
Do not ask the user to paste a webhook into chat. Configure it through secure terminal input after the application is built.
Ask before changing metric definitions, storage boundaries, report destinations, or data sent off the Mac. Record consequential choices in a short ADR inside the generated project.
Architecture
Use this data flow:
Git reflogs + native agent registries
-> read-only collectors
-> daily aggregate counts
-> local SQLite database
-> local chart renderer
-> one Discord webhook request
Keep the source checkout separate from the installed runtime:
- Copy application code into
~/Library/Application Support/<app>/app/. - Store aggregate state beside it in
metrics.sqlite3. - Store logs in
~/Library/Logs/<app>/. - Install the plist in
~/Library/LaunchAgents/. - Give directories mode
0700and sensitive files mode0600. - Preserve aggregate state across reinstalls and normal uninstalls.
Metric contracts
Implement three independent metrics. Do not create a combined productivity score.
Unique local commits
- Discover Git repositories recursively under the configured code root.
- Deduplicate primary checkouts and linked worktrees by Git common directory.
- Read local creation events from reflogs for the requested date range.
- Include only commits whose author or committer email matches an identity configured in that repository.
- Count each commit hash once across all refs and worktrees.
- Exclude fetched commits, pushes, and branch movement by themselves.
- Keep hashes in memory only. Store the final daily count.
Active agent sessions
- Count one session on each local calendar day where its native registry records activity.
- Include GUI, CLI, headless, resumed, parent, subagent, delegated, and automated sessions.
- Deduplicate with the harness's native session identity in memory.
- Keep each harness separate in storage and reports.
Instruction-bearing prompts
- Count stored user, system, and developer inputs that contain instructions.
- Include human prompts, automation, setup context, delegation, and subagent instructions.
- Exclude assistant responses, tool results, empty inputs, and duplicated storage copies.
- Inspect content only long enough to classify the event. Never store or log it.
Convert every timestamp into the configured timezone before assigning a day.
Collector design
Use one adapter per harness. Prefer native registries over process inspection, shell history, window titles, or guessed file timestamps.
Support common source shapes:
- JSON or JSONL session records.
- Read-only SQLite registries.
- Editor global or workspace state databases.
- Authenticated native CLI export when no readable local registry exists.
Each adapter must return:
- daily unique session identities in memory;
- daily prompt counts;
full,partial,unavailable,absent, orerrorcoverage;- a short detail string containing counts and limitations, never private data.
Some stores expose a session total but no timestamp for each turn. For those stores, save a hashed source key and total, then attribute only positive deltas observed after the local baseline. Mark older attribution as partial.
Discover installed harnesses at runtime. Keep unsupported tools absent from the ch
Read the complete source ↗