-
Notifications
You must be signed in to change notification settings - Fork 0
KPI Pipeline
Every day at 5pm Sydney time, the KPI pipeline fetches your GitHub activity, asks for manual input, and generates a professional daily report.
Phase 1 (parallel): cleanupAgent + githubAgent
Phase 2 (sequential): manualKpiAgent ← waits for your input
Phase 3 (sequential): diaryAgent ← writes report from Phase 1+2 data
Two agents run simultaneously via Promise.allSettled():
- cleanupAgent — deletes stale records from the company database (older than 30 days)
- githubAgent — fetches all commits and pull requests for the day using the GitHub API (Octokit)
If cleanup fails, the pipeline continues. If GitHub fetch fails, the pipeline stops (no data to report on).
The manualKpiAgent prompts you to enter activities that GitHub doesn't capture:
- Meetings, code reviews, planning sessions
- Documentation, mentoring, design work
- Anything else worth recording
If no manual activities are provided, the pipeline skips the diary and saves GitHub data only.
The diaryAgent combines GitHub activity + manual input and generates a professional KPI report:
- One-sentence summary of the day
- GitHub contributions (commits and PRs with context)
- Manual activities
- Short closing note on progress or impact
The report is saved to both the diary database table and a local markdown file (data/diary/YYYY-MM-DD.md).
| Table | Data |
|---|---|
kpi |
GitHub summary, commit count, PR count, manual activities |
diary |
Full AI-generated KPI report text |
cleanup_log |
Cleanup results (deleted count, errors, status) |
pnpm startThis is interactive — it will prompt for manual input in the terminal.
The daily-kpi.yml workflow uses workflow_dispatch with an input form — enter comma-separated activities before clicking Run.