Engineering Intelligence
105 lines

Plan overview

Developer Productivity

Aggregate commit activity across repositories to surface contributor concentration and time-of-day execution patterns.

Best for

Engineering managers · CTOs · Developer productivity

Runs with

GitHub · Commit activity · Contributor trends

At a glance

03

Outputs

01

Capabilities

03

Teams

Core outputs

Commit activity summary

Contributor trends

Engineering activity snapshot

Capability requirements

MCP

What it solves

Developer productivity conversations often rely on incomplete snapshots instead of a reusable operating view of engineering activity.

Supports management reviews with consistent data.

Reduces one-off spreadsheet analysis.

Improves visibility into engineering execution patterns.

Workflow

1

Aggregate contribution data across connected repositories.

2

Summarize contributor concentration, timing, and output patterns.

3

Return a structured view for management review and follow-up analysis.

Implementation

Review the underlying plan definition, inspect the template when available, and see how the workflow is instructed for repeatable execution.

Plan Code

Markdown Report

developer-productivity.yaml

105 lines

## COMMIT ACTIVITY ANALYSIS - Multi-Repo Discovery
parameters:
  - name: repositoryOwner
    schema:
      type: string
      description: "GitHub organization or account owner"
  - name: repositorySearchQuery
    schema:
      type: string
      description: "GitHub repository search query, for example 'org:acme-inc fork:false'"
      default: "fork:false"

requiredTools:
  - name: github
    type: mcp

transformers:
  - name: repo_name_extractor
    onFunctionOutput: search_repositories
    jmesPath: "items[*].name"
  - name: cleanup_commits
    onFunctionOutput: list_commits
    jmesPath: '[*].{sha: sha, message: commit.message, author: commit.author.name, date: commit.author.date, url: html_url}'

components:
  schemas:
    commit:
      type: object
      properties:
        sha: { type: string }
        message: { type: string }
        author: { type: string }
        date: { type: string }
        url: { type: string }

# ✅ Top-level preCalls - run once, available everywhere
preCalls:
  - name: search_repositories
    args:
      query: "{{ .params.repositorySearchQuery }}"
    in: vars
    var: repo_list

sessions:
  # STEP 1: Iterative Commit Fetch - must have empty prompt
  fetch-commits:
    iterateOn: vars.repo_list
    preCalls:
      - name: list_commits
        args:
          owner: "{{ .params.repositoryOwner }}"
          repo: "{{ .it }}"
          per_page: 50
        in: context
    prompt: ""  # ✅ Empty prompt required for headless iteration

  # STEP 2: The Aggregated Thinker
  analyze-activity:
    dependsOn:
      - session: fetch-commits
    context: true
    prompt: |-
      You are an engineering metrics aggregator.
      
      CONTEXT DATA:
      The context above contains all commits from multiple repositories collected during the fetch-commits iterations.
      
      TASK:
      1. Extract ALL commits from the context above (from the list_commits function call results).
      2. Aggregate them into a single global list.
      3. Map the aggregated 'author' and 'date' fields to the 'activitySummary' schema:
         - Group by author for 'top_committers' (count how many commits each author made).
         - Parse the ISO dates to fill 'time_of_day_breakdown':
           * morning: 6 AM to 12 PM
           * afternoon: 12 PM to 6 PM
           * evening: 6 PM to 12 AM
           * night: 12 AM to 6 AM
      
      CRITICAL: Use ONLY the real data from the context. Extract commit data from function call results above.

schema:
  type: object
  properties:
    activitySummary:
      type: object
      required:
        - top_committers
        - time_of_day_breakdown
      x-session: analyze-activity
      x-phase: 1
      properties:
        top_committers:
          type: array
          items:
            type: object
            properties:
              author: { type: string, description: "GitHub username of the contributor" }
              commit_count: { type: integer, description: "Total number of commits made by the contributor" }
        time_of_day_breakdown:
          type: object
          properties:
            morning: { type: integer, description: "Number of commits made in the morning (6 AM to 12 PM)" }
            afternoon: { type: integer, description: "Number of commits made in the afternoon (12 PM to 6 PM)" }
            evening: { type: integer, description: "Number of commits made in the evening (6 PM to 12 AM)" } 
            night: { type: integer, description: "Number of commits made at night (12 AM to 6 AM)" }