{"id":50366458,"url":"https://github.com/brint/mytime-helper-codex","last_synced_at":"2026-05-30T04:05:18.923Z","repository":{"id":357694732,"uuid":"1238149749","full_name":"brint/mytime-helper-codex","owner":"brint","description":"Drafts my time in addition to approval","archived":false,"fork":false,"pushed_at":"2026-05-13T21:35:20.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-13T23:32:18.339Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brint.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-13T21:28:33.000Z","updated_at":"2026-05-13T21:35:25.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/brint/mytime-helper-codex","commit_stats":null,"previous_names":["brint/mytime-helper-codex"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/brint/mytime-helper-codex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brint%2Fmytime-helper-codex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brint%2Fmytime-helper-codex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brint%2Fmytime-helper-codex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brint%2Fmytime-helper-codex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brint","download_url":"https://codeload.github.com/brint/mytime-helper-codex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brint%2Fmytime-helper-codex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33679325,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-30T04:05:17.347Z","updated_at":"2026-05-30T04:05:18.918Z","avatar_url":"https://github.com/brint.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mytime-helper-codex\n\nCLI and MCP server for viewing, drafting, and approving time entries in [MyTime](https://mytime.slalom.com/), extended for Codex-driven weekly time drafting.\n\nThe intended use is that Codex acts as the agent: it reads MyTime state from this repo, pulls evidence from connected Outlook, Slack, Teams, SharePoint, and other in-session tools, then makes a reasonable project-and-hours decision for missing time.\n\n## What This Repo Does\n\n- Authenticates to MyTime and reads or creates draft entries\n- Exposes MyTime as an MCP server for Codex\n- Provides a weekly drafting context tool that identifies missing hours by day and exposes existing entries\n- Provides targeted draft and delete helpers for refreshing stale weekly drafts\n- Documents the expected Codex workflow for combining MyTime with Outlook Calendar, Outlook Email, Teams, Slack, and SharePoint evidence\n- Defines default inference rules for likely project allocation and approximate hours\n\nThis repo does not directly call Microsoft 365 or Slack APIs from Node. Codex should use the in-session connectors for those systems and this repo's MyTime tools for the time-entry side.\n\n## Intended workflow\n\n1. Codex reads the target week from MyTime with `mytime_get_week_draft_context`.\n2. Codex looks only at days with missing time or days whose existing draft needs to be refreshed.\n3. Codex pulls supporting evidence from Outlook Calendar, Outlook Email, Teams, Slack, SharePoint, and other connected tools.\n4. Codex infers which project the time likely belongs to and about how many hours to allocate.\n5. Codex creates or refreshes MyTime draft entries without inventing unsupported work.\n\nCalendar is the primary signal. Email, Teams, Slack, and SharePoint are supporting signals used to strengthen or adjust the allocation.\n\n## Setup\n\n### 1. Install dependencies\n\n```bash\nnpm install\nnpx playwright install chromium\n```\n\n### 2. Build the CLI and MCP server\n\n```bash\nnpm run build\n```\n\n### 3. Add the MCP server using Codex repo conventions\n\nThis repo uses a repo-level [`.mcp.json`](.mcp.json) file for Codex:\n\n```json\n{\n  \"mcpServers\": {\n    \"mytime\": {\n      \"command\": \"npx\",\n      \"args\": [\"tsx\", \"src/mcp-server.ts\"]\n    }\n  }\n}\n```\n\nIf Codex is running from this repo, that is the expected MCP configuration pattern.\n\n## Authentication\n\nOn first run, a browser window opens for Entra login. Complete the login and MFA flow; the access token is cached at `~/.mytime-helper/token.json`.\n\n```bash\nnpx tsx src/index.ts auth\n```\n\n## CLI\n\n```bash\nnpx tsx src/index.ts auth\nnpx tsx src/index.ts status\nnpx tsx src/index.ts raw-week --week 5/11/2026\nnpx tsx src/index.ts draft --dry-run\nnpx tsx src/index.ts draft-entry --date 5/12/2026 --hours 2\nnpx tsx src/index.ts delete-entry --id \u003ctime-entry-id\u003e --week 5/11/2026\nnpx tsx src/index.ts approvals\nnpx tsx src/index.ts weekly-draft-context --week 5/11/2026 --target-hours 8\nnpm run build\nnpm run mcp\n```\n\n### `weekly-draft-context`\n\nReturns structured JSON describing the current week, total logged hours per day, missing hours, existing entries, and guidance for Codex to use with connected Calendar, Email, Teams, Slack, and SharePoint context.\n\n```bash\nnpm run draft-context\nnpx tsx src/index.ts weekly-draft-context --week 5/11/2026 --target-hours 8\n```\n\n## MCP server\n\nStart the local MCP server directly:\n\n```bash\nnpm run mcp\n```\n\n### Tools\n\n- `mytime_get_week_dates`\n- `mytime_get_week_status`\n- `mytime_get_week_draft_context`\n- `mytime_get_approvals`\n- `mytime_draft_entry`\n\n## Codex workflow\n\n1. Call `mytime_get_week_draft_context`.\n2. Review dates with `missingHours \u003e 0`, or inspect an already-drafted week that needs to be refreshed.\n3. Pull evidence for those dates from Outlook Calendar first, then Outlook Email, Teams, Slack, and SharePoint as needed.\n4. Use the evidence to make a project mapping decision, not just to summarize activity.\n5. Draft concise, truthful descriptions for the time being added or refreshed.\n6. Create MyTime draft entries with `mytime_draft_entry` or the CLI `draft-entry` flow.\n7. When a week needs to be rewritten, inspect current rows with `raw-week` and remove stale rows with `delete-entry` before re-drafting.\n\nThis repo is intended for agentic use: Codex should do the evidence gathering and project inference work, then use these local MyTime tools to update the week.\n\n## Inference defaults\n\nSee [docs/inference-rules.md](docs/inference-rules.md).\n\nCurrent defaults include:\n\n- Codex should make a reasonable first-pass assumption about which projects missing time belongs to and about how many hours to allocate.\n- Outlook Calendar is the primary signal, especially when entries are explicitly tagged.\n- Calendar duration is the anchor, but it can be adjusted when email, chat, or document activity clearly supports additional work.\n- `Sales` calendar tags map to business development.\n- `Marathon`, `Marathon Petroleum`, and `MPC` all map to the MPC MyTime project unless stronger evidence points elsewhere.\n- Calendar invites marked `Free` should not contribute project hours.\n- Email, Teams, Slack, and SharePoint activity should be used to strengthen or adjust the allocation.\n- Existing logged project time should not be overwritten with generic Available time.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrint%2Fmytime-helper-codex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrint%2Fmytime-helper-codex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrint%2Fmytime-helper-codex/lists"}