--- name: eng-analytics description: Build an Engineering Analytics dashboard of PR throughput, cycle time, review load, and work in progress, daily or weekly, by person and repo. Use for "engineering metrics", "cycle time", "how fast are we shipping", "throughput", "review bottlenecks", "team productivity", or "DORA". --- # Engineering Analytics How the engineering system is flowing. Read-only. The per-person summary is there to show load and where help is needed, not to rank: list people alphabetically, never call anyone the best or worst, and keep context (reviews given, on-call, large PRs) next to the numbers. ## How this runs Open with one friendly line and the plan: > 1. Pull PRs and tickets > 2. Work out the metrics > 3. Build your dashboard Start each step with a short progress line ("Step 2 of 3: ..."). Finish with one suggested next step. ## Before you start This skill runs on the user's Devplan workspace. 1. Check that the Devplan tools are available. If your client loads tools on demand, search for "devplan" first. Never call a Devplan tool just to find out whether it exists. 2. If Devplan isn't connected, or a call fails with a sign-in error, say in one line that this needs Devplan, then ask setup's first question, "Do you have a Devplan account?", with its three options (**Yes, connect it**, **No, create one**, **What is Devplan?**), and follow `devplan-setup` from step 1. Stop this skill there. Don't give connect steps or commands of your own, and don't offer to do the task without Devplan (no local drafts, notes-based plans, or git summaries). 3. Load company and personal context with `devplan-product-context`. 4. If the workspace is still being built (Devplan is connected but `list_repository_descriptions` and `list_workspace_projects` both come back empty), work from what exists and don't pad. On a dashboard, show the template's notice ("Devplan is still analyzing your sources. This fills in automatically as it finishes."). Anywhere else, say it in one line. ## 1. Window Default: two views. **Daily:** the last 30 days by day, compared with the 30 days before. **Weekly:** the last 8 weeks by week. State both time frames with exact dates. Honor any window, team, or repo the user gives. ## 2. Data Use `query_workspace_graph`. Timestamps are epoch milliseconds; write computed numbers into the query. - Pull requests: `openedAt`, `mergedAt`, `closedAt`, `status`, `isDraft`, `repo`, with authors and reviewers. - Tickets: status and creation time, for work in progress. - Review events with timestamps (first review, approval), if Devplan has them. Devplan has already linked PRs to people, so compute by repo and person directly. Leave bot PRs out of every metric (authors ending in `[bot]`, dependabot, renovate), and say how many you excluded. Bots don't count as reviewers either: a PR reviewed only by `claude[bot]` or similar has no human review. Authors not in `list_workspace_members` have left; mark them "(left)" in the by-person table. Compute medians and weekly buckets inside the graph query (`percentileCont`, a week index from the window start) rather than pulling every PR, since results are capped at 200 rows. Use teams from the company context when it names them. ## 3. Metrics - **Cycle time:** PR opened to merged. Median and 85th percentile. - **Throughput:** PRs merged per week. - **Work in progress:** open non-draft PRs, and PRs open longer than 7 days. - **Review load:** reviews per reviewer, and PRs merged with no recorded review. - **By person:** for each engineer active in the window, PRs merged, median cycle time, open PRs, and reviews given on others' PRs (exclude self-reviews). - **For each view:** PRs merged and median cycle time per bucket (day or week), and PRs merged per person and per repo over that view's window. Compute buckets in the graph query from the window start (`toInteger((pr.mergedAt - $start) / 86400000)` for days, `/ 604800000` for weeks). Add up to 3 findings that explain the biggest changes from the prior period, each with example PRs and one concrete suggestion for what to do about it. ## 4. Dashboard Title: "Engineering Analytics". Masthead window: "Last 30 days · ". No summary. 1. **View toggle** (Daily and Weekly) right under the masthead, with each view's exact time frame beside it. It switches the four charts below; the figures and tables stay on the 30-day window and say so. 2. **Figures:** PRs merged, median cycle time, p85 cycle time, and share merged without human review, each with its change from the prior 30 days (`up` when the change is good, `down` when it's bad). 3. **Throughput** (Trend): PRs merged per day or per week. 4. **Cycle time** (Trend): median cycle time per day or per week, in hours. 5. **PRs merged by person** and **PRs merged by repo** (Horizontal bars), side by side on wide screens, for the selected view's window. 6. **Findings:** rows with example PRs behind the Evidence link. Each has an action button with the suggestion as a ready prompt, for example **Fix review wait** (`Help me cut our review wait. PRs wait hours for a first review, mostly in . Draft a review rotation and a Slack message proposing it to the team.`) or **Investigate** (`Why did cycle time in rise from to hours since ? Look at <2 or 3 PR titles>.`). 7. **By person** (table): name, PRs merged, median cycle time, open PRs, reviews given. Alphabetical. 8. **By repo** (table): merged, median and p85 cycle time, open, oldest open. 9. **Long-running PRs:** rows for PRs open longer than 7 days, with author, age, reviewers, and a **Draft nudge** button. Every bar shows its value on hover (`data-tip`). ## Dashboard format Build the page from [references/dashboard-template.md](references/dashboard-template.md). Don't write your own layout, CSS, or script. 1. Copy the template's ``, `