Skip to content

Explore Work IQ + Squad integration opportunities #26

Closed as not planned
Closed as not planned

Description

@bradygaster

Work IQ + Squad: Integration Exploration

Context

Microsoft Work IQ is the intelligence layer powering Microsoft 365 Copilot and AI agents. It provides:

  • Personal work memory — remembers preferences, collaboration style, frequent tasks
  • Work chart — maps real collaboration networks (not just org charts)
  • Deep inference — links project files, task dependencies, and communications automatically
  • Cross-app coordination — agents coordinate across M365 apps with understanding of dependencies and deadlines
  • Agent 365 control plane — admin oversight for enterprise agent deployment

Squad already has persistent agent memory, team knowledge, and multi-agent coordination. Work IQ operates at the organizational layer. The question: can these two systems complement each other?

Ideas to Explore

1. Work IQ + GitHub Issues (collaboration intelligence)

  • Work IQ understands who actually works together and on what. Squad manages AI agent teams on GitHub repos.
  • Could Work IQ's collaboration graph inform squad composition? ("These 3 humans always collaborate on auth work — suggest them as human squad members")
  • Could Squad's issue triage feed into Work IQ's task intelligence?

2. Work IQ context → Squad agent memory

  • Work IQ knows what meetings are coming, what documents are active, what deadlines loom
  • Squad agents could use this context: "Brady has a design review tomorrow on the auth module — prioritize auth work"
  • Personal work memory could seed agent history on new projects

3. Squad notifications via Work IQ signals

  • Work IQ knows when someone is available vs. in deep focus
  • Squad notification timing could respect Work IQ availability signals
  • "Don't ping Brady during his focus block — queue notifications for his next break"

4. Enterprise squad management via Agent 365

  • Agent 365 control plane provides admin oversight for agents
  • Could Squad agents register with Agent 365 for enterprise governance?
  • Compliance, audit trails, and security policies applied to squad operations

5. Work IQ + Squad for team onboarding

  • Work IQ knows the informal knowledge network
  • Squad could use this to route questions to the right human expert
  • New team members get an AI squad pre-loaded with organizational context

Goal

Research feasibility, identify 2-3 high-value integration points, and produce a go/no-go recommendation with a sprint plan. Focus on what's achievable with current APIs and MCP tooling — not vaporware.

Key Questions

  • Does Work IQ expose APIs or MCP tools that Squad agents could consume?
  • Can Work IQ's context be accessed from GitHub Copilot's MCP environment?
  • What's the auth/permission model for accessing Work IQ data?
  • Are there existing MCP servers for Work IQ or M365 Graph that Squad could leverage?

Activity

  1. bradygaster commented on Feb 12, 2026

    @bradygaster
    CollaboratorAuthor

    @copilot — Research assignment.

    What we need

    1. API/MCP audit: Does Work IQ expose any APIs, Graph endpoints, or MCP servers that Squad agents could consume? Check Microsoft Learn docs, the Agent 365 control plane, and any MCP server registries.
    2. Integration feasibility matrix: For each of the 5 ideas in the issue body, rate feasibility (🟢/🟡/🔴) and build cost.
    3. Go/no-go recommendation: Pick the 2-3 highest-value integration points. Recommend GO or NO-GO with rationale.
    4. Sprint plan: If GO, outline work items with squad-time estimates.

    Key files to read for context

    • .github/agents/squad.agent.md — how Squad works (Skills, Human Team Members, MCP integration patterns)
    • team-docs/proposals/030-async-comms-feasibility.md — prior async comms research
    • team-docs/proposals/032a-provider-abstraction-architecture.md — provider abstraction patterns
    • team-docs/proposals/034-notification-architecture.md — just-shipped notification design (MCP-based)
    • .ai-team/skills/human-notification/SKILL.md — notification skill (shows MCP integration pattern)

    Deliverable

    Post your findings as a comment on this issue. Include the feasibility matrix, go/no-go, and sprint plan.

  2. added
    go:noNot pursuing
    type:spikeResearch/investigation — produces a plan, not code
    and removed on Feb 13, 2026
  3. GreenCee commented on Feb 13, 2026

    @GreenCee

    Providing a summary of experience with worki1+squad current state pulled from this week's CLI sessions:

    Squad + WorkIQ Integration — Field Test Results (Feb 7-13, 2026)

    Ran Squad with WorkIQ MCP server (ask_work_iq) for a full week across multiple workflows. Here's what I attempted and what actually happened.

    ✅ Attempted & Worked

    Querying Teams messages for content the squad needed:

    • Asked WorkIQ to find links I'd shared in Teams over the past 2 weeks → returned Steve Yegge's Medium posts, GitHub repos (bradygaster/squad,
      steveyegge/bead), GitHub Agentic Workflows blog\
    • Agent received prose response, parsed it, and integrated the links into a presentation slide
    • Latency: ~5-8 seconds per query. Acceptable for async agent work.

    Finding a specific correction in recent chat history:

    • Asked "Find recent messages between Chris and Brady about what Shayne created" → returned exact quote: "that's not entirely true. Shayne built ralph and the copilot stuff."
    • Agent used this to correct an attribution error in a deliverable within the same session
    • Key: WorkIQ correctly scoped to the right conversation and returned verbatim quotes with Teams deep links

    Querying across multiple chat types simultaneously:

    • Single query searched 1:1 chats, group chats, channel messages, and meeting chats
    • Returned results from: meetings, chats, 1:1s
    • Teams deep links included for each result (clickable)

    Feeding WorkIQ output to downstream agent work:

    • Pattern: Coordinator spawns agent → agent prompt includes "use WorkIQ to find X" → agent calls ask_work_iq → uses response as input to its task
    • This worked reliably across multiple spawns in a single session

    ❌ Attempted & Failed (or not possible)

    Getting structured/JSON output:

    • WorkIQ returns natural language prose, not structured data
    • When I needed dates, URLs, or counts, agents had to parse the prose
    • No way to request format: json or get typed fields back
    • Impact: Fragile for automation. Works for human-in-the-loop, breaks for fully autonomous pipelines

    Writing back to WorkIQ / updating context:

    • No write capability. Can't tell WorkIQ "remember that we decided X" or "update my task status"
    • Squad decisions stay in .ai-team/decisions.md — WorkIQ doesn't know about them
    • Impact: One-way data flow only. No feedback loop.

    Querying email reliably:

    • Email search metadata reported matches (e.g., "1 email found") but returned empty result sets
    • Teams messages returned consistently; emails did not
    • Tried multiple query phrasings — same result
    • Impact: Can't use WorkIQ as a reliable email search bridge

    Getting collaboration graph / who-works-with-whom:

    • No way to ask "who does Chris collaborate with most on auth work"
    • WorkIQ can answer "find messages between X and Y" but can't map collaboration patterns
    • Impact: Can't auto-suggest squad composition from real collaboration networks

    Getting availability/focus signals:

    • No way to ask "is Brady in focus time right now" or "when is Chris's next available slot"
    • Impact: Can't build availability-aware notification timing

    Getting file/document context proactively:

    • Can ask "what files has Chris been working on" but responses were vague
    • No way to get "the 3 most relevant documents for this task" based on work patterns
    • Impact: Can't seed agent context from organizational document activity

    🟡 Partially Worked

    Searching meeting transcripts:

    • Some meeting content appeared in results
    • But couldn't reliably target "search the transcript of today's 10am meeting"
    • Hit or miss depending on how Teams indexed the content

    Counting / aggregating:

    • Asked "how many messages did Chris send about squad this week" — got a narrative answer, not a count
    • The narrative was useful but not machine-parseable

    Integration Pattern That Emerged

    User request → Squad Coordinator → spawns agent with WorkIQ access
    → Agent calls ask_work_iq("find X in Teams from the past N days")
    → WorkIQ returns prose + deep links
    → Agent parses prose, extracts relevant content
    → Agent incorporates into deliverable (code, docs, slides, etc.)

    This pattern was used ~8 times across the week and succeeded every time for Teams message queries. The failure modes were all around email, structured output, and write-back.

    Spec Implications

    For a real integration, WorkIQ would need:

    1. Structured response mode — JSON output with typed fields (dates, URLs, people, message IDs)
    2. Write-back API — let agents store decisions/context that persists in the Work IQ graph
    3. Email parity — email search should return results as reliably as Teams
    4. Availability signals — expose focus time / free-busy as a queryable signal
    5. Document relevance — "most relevant documents for task X" based on work patterns

    Items 1 and 3 would make the existing integration production-grade. Items 2, 4, 5 are the full vision.

  4. bradygaster commented on Feb 14, 2026

    @bradygaster
    CollaboratorAuthor

    This is a great write-up @GreenCee - thanks.

  5. github-actions commented on Mar 4, 2026

    @github-actions
    Contributor

    🔄 Ralph — Auto-Triage

    Assigned to: Baer
    Reason: Matched routing keyword(s): compliance
    Source: routing-rule

    Ralph auto-triaged this issue using routing rules.
    To reassign, swap the squad:* label.

  6. bradygaster commented on Mar 5, 2026

    @bradygaster
    CollaboratorAuthor

    PRD: Work IQ + Squad Integration

    Author: Keaton (Lead)
    Requested by: Brady
    Status: Draft
    Issue: #26 — Explore Work IQ + Squad Integration Opportunities
    Related: SDK-First Squad Mode PRD (#194), Squad Telemetry Infrastructure
    Date: 2026-03-06


    1. Overview and Problem Statement

    The Problem

    Squad teams operate blind. When a squad of AI agents works on a codebase — triaging issues, writing code, reviewing PRs, running ceremonies — there is zero visibility into how well the team is actually performing. Questions nobody can answer today:

    • Is the squad getting better over time, or just busy?
    • Which agents produce work that sticks vs. work that gets reworked?
    • Are ceremonies (retros, design reviews) actually catching issues before implementation?
    • What's the cost per issue resolved? Is a premium model bump justified?
    • How does this squad compare to its state 30 days ago?

    Meanwhile, Microsoft's Work IQ — the intelligence layer powering M365 Copilot — already solves the organizational version of this problem: it maps collaboration networks, remembers work patterns, and infers task dependencies across an enterprise. There is now a public MCP server (@microsoft/workiq) that exposes this intelligence layer to AI agents via the Model Context Protocol.

    The Opportunity

    Two integration surfaces exist:

    1. Inbound: Work IQ → Squad. Feed organizational context (collaboration graphs, deadlines, availability signals, active documents) into squad agent memory and routing decisions. Squad agents become organizationally aware.

    2. Outbound: Squad → Work IQ / Observability. Emit squad performance telemetry — agent effectiveness, team velocity, cost attribution, skill growth — into enterprise observability pipelines. Squad becomes measurable.

    Why This Matters

    Without measurement, squad adoption is a leap of faith. Enterprise teams need ROI justification. Individual developers need confidence that their squad is improving. Work IQ integration provides both: external context makes squads smarter, internal metrics make squads accountable.


    2. Proposed "Work IQ" Metrics

    2.1 Agent Effectiveness Metrics

    Metric Formula What It Measures
    Decision Durability (decisions not overridden within 7d) / (total decisions) How often an agent's choices stick without human revision
    First-Pass Rate (PRs approved on first review) / (total PRs submitted) Work quality — catches rework before it compounds
    Rework Ratio (rejected PR count + revision cycles) / (total PR count) Cost of iteration — lower is better
    Context Utilization (history.md reads before task) / (total tasks) Whether agents leverage accumulated knowledge
    Skill Confidence Distribution {high: N, medium: N, low: N} per agent Learning maturity — shift toward high over time
    Routing Accuracy (tasks completed by initially routed agent) / (total routed tasks) Coordinator's ability to match work to the right agent

    2.2 Team Dynamics Metrics

    Metric Formula What It Measures
    Velocity issues_closed / time_period Raw throughput (normalized by complexity when available)
    Cycle Time median(PR_merge_timestamp - issue_assignment_timestamp) End-to-end delivery speed
    Ceremony Hit Rate (issues caught in design review) / (issues found post-implementation) Are ceremonies earning their cost?
    Knowledge Growth Rate delta(skills + history_entries + decisions) / time_period Is the squad learning or stagnating?
    Fan-Out Efficiency (parallel_agent_time) / (serial_equivalent_time) Multi-agent parallelism dividend
    Queue Health {untriaged: N, stale: N, blocked: N} snapshot Board hygiene — Ralph's domain

    2.3 Cost & Efficiency Metrics

    Metric Formula What It Measures
    Cost Per Resolution sum(token_cost) / issues_closed Economic efficiency
    Token Efficiency (useful_output_tokens) / (total_tokens) Signal-to-noise in generation
    Model ROI (quality_delta) / (cost_delta) when premium model used Whether expensive models justify their cost
    Latency P50/P95 Distribution of time_to_first_response Responsiveness at median and tail
    TTFT (Time to First Token) first_token_timestamp - request_timestamp Model/infrastructure latency

    2.4 Integration-Specific Metrics (Work IQ)

    Metric Formula What It Measures
    Context Freshness age(most_recent_workiq_sync) How current is the organizational context?
    Availability Respect Rate (notifications sent during available windows) / (total notifications) Are we respecting human focus time?
    Collaboration Graph Hit Rate (routed-to-human suggestions accepted) / (suggestions made) Quality of Work IQ's collaboration recommendations

    3. Data Collection Architecture

    3.1 What Gets Captured

    ┌─────────────────────────────────────────────────────────────────┐
    │                    Data Collection Points                        │
    ├─────────────────┬───────────────────────────────────────────────┤
    │ Source           │ Events                                        │
    ├─────────────────┼───────────────────────────────────────────────┤
    │ EventBus         │ session:created, session:ended,               │
    │ (existing)       │ agent:spawned, agent:completed,               │
    │                  │ coordinator:routed, coordinator:fan-out       │
    ├─────────────────┼───────────────────────────────────────────────┤
    │ CostTracker      │ token_usage per agent/model/session,          │
    │ (existing)       │ cost_estimate, fallback_count                 │
    ├─────────────────┼───────────────────────────────────────────────┤
    │ OTel Metrics     │ squad.agent.spawn_count, squad.agent.duration,│
    │ (existing)       │ squad.session.active, squad.latency.ttft,     │
    │                  │ squad.tokens.input, squad.tokens.output       │
    ├─────────────────┼───────────────────────────────────────────────┤
    │ Git              │ commit frequency, PR cycle time, review       │
    │ (new collector)  │ outcomes, branch lifetime, merge conflicts    │
    ├─────────────────┼───────────────────────────────────────────────┤
    │ .squad/ FS       │ skills/ changes, history.md appends,          │
    │ (squad-observer) │ decisions/ writes, ceremony outputs           │
    ├─────────────────┼───────────────────────────────────────────────┤
    │ Work IQ MCP      │ collaboration graph, availability signals,    │
    │ (new integration)│ active documents, deadline context            │
    ├─────────────────┼───────────────────────────────────────────────┤
    │ Ralph            │ board_state snapshots, triage decisions,      │
    │ (existing)       │ agent health checks, milestone accumulation   │
    └─────────────────┴───────────────────────────────────────────────┘
    

    3.2 Where It's Stored

    Local-first, privacy-respecting:

    .squad/
      telemetry/
        sessions.jsonl        # Session-level summaries (append-only)
        agents.jsonl          # Per-agent per-session metrics (append-only)
        snapshots/
          YYYY-MM-DD.json     # Daily Work IQ score snapshots
        workiq-cache/
          context.json        # Cached Work IQ organizational context
          last-sync.json      # Sync metadata
    

    When OTLP is configured (SDK mode):

    Telemetry additionally flows to the configured OTLP endpoint (Aspire dashboard, Grafana, Azure Monitor, etc.) via the existing OTel bridge in packages/squad-sdk/src/runtime/otel.ts.

    3.3 How It Flows

                                      ┌──────────────┐
                                      │  Work IQ MCP │
                                      │   Server     │
                                      └──────┬───────┘
                                             │ (context queries)
                                             ▼
    ┌──────────┐   EventBus    ┌─────────────────────┐   OTLP    ┌──────────────┐
    │ Agent    │──────────────▶│  TelemetryCollector  │─────────▶│ Aspire /     │
    │ Runtime  │               │  (existing module)   │          │ Azure Monitor│
    └──────────┘               │                      │          └──────────────┘
                               │  + WorkIQScorer      │
          ┌──────────┐        │  (new module)        │   .jsonl   ┌──────────┐
          │ Git      │───────▶│                      │──────────▶│ .squad/  │
          │ Collector│        └─────────────────────┘           │ telemetry│
          └──────────┘                                           └──────────┘
                               ┌──────────────┐
                               │ Ralph Monitor│──────▶ board_state snapshots
                               └──────────────┘
    

    4. Scoring Model

    4.1 Individual Agent Score (0–100)

    Each agent receives a score composed of weighted dimensions:

    AgentScore = (
        0.30 × normalize(FirstPassRate, 0, 1) +
        0.25 × normalize(DecisionDurability, 0, 1) +
        0.20 × normalize(1 - ReworkRatio, 0, 1) +
        0.15 × normalize(ContextUtilization, 0, 1) +
        0.10 × normalize(SkillConfidenceIndex, 0, 1)
    ) × 100
    

    Where SkillConfidenceIndex = (high×1.0 + medium×0.5 + low×0.1) / total_skills.

    4.2 Team Work IQ Score (0–100)

    Composite of agent scores and team-level metrics:

    TeamWorkIQ = (
        0.35 × mean(AgentScores) +
        0.20 × normalize(Velocity, baseline, target) +
        0.15 × normalize(CeremonyHitRate, 0, 1) +
        0.15 × normalize(FanOutEfficiency, 1, max_agents) +
        0.10 × normalize(KnowledgeGrowthRate, 0, target) +
        0.05 × normalize(QueueHealth, 0, 1)
    ) × 100
    

    4.3 Squad Maturity Model

    The Team Work IQ score maps to maturity levels:

    Level Name Score Range Characteristics
    1 Basic 0–25 Agents execute tasks. No persistent memory. No ceremony outcomes tracked. Token costs unknown.
    2 Learning 26–50 Skills extracted and accumulating. History entries growing. Decisions documented. Routing uses rules but doesn't improve.
    3 Adaptive 51–75 Routing accuracy improves over time. Ceremonies auto-trigger based on patterns. Skill confidence shifts toward high. Cost per resolution trending down.
    4 Autonomous 76–100 Ralph-driven continuous improvement. Self-optimizing model selection. Ceremonies create measurable quality improvements. Fan-out efficiency near theoretical max.

    4.4 Trend Detection

    Work IQ tracks 7-day, 30-day, and 90-day trends:

    • Improving: Score increased >5% over period
    • Stable: Score within ±5%
    • Degrading: Score decreased >5% — triggers Ralph alert

    5. Dashboard / Reporting UX

    5.1 CLI Output: squad workiq

    Primary interface — respects NO_COLOR, ASCII-only separators, text-over-emoji:

    $ squad workiq
    
    Work IQ Report — my-project
    ------------------------------------------------------
    Team Score: 67/100 (Adaptive)  [+8 over 30d]
    
    Agent Breakdown:
      Keaton (Lead)      82/100  [stable]    First-pass: 91%  Rework: 4%
      Edie (TypeScript)  71/100  [+12]       First-pass: 78%  Rework: 11%
      Baer (Security)    64/100  [+5]        First-pass: 85%  Rework: 7%
      Fenster (Core)     58/100  [-3]        First-pass: 72%  Rework: 15%
    
    Key Metrics:
      Velocity:           4.2 issues/day  [+18%]
      Cycle Time (P50):   2.3 hours
      Cost/Resolution:    $0.47           [-12%]
      Ceremony Hit Rate:  73%
      Fan-Out Efficiency: 2.8x
    
    Work IQ Integration:  Connected (last sync: 12m ago)
      Context Freshness:  Current
      Availability Resp:  94%
    
    Maturity: Level 3 (Adaptive)
      Next level needs:   Routing accuracy >85%, ceremony auto-triggers
    ------------------------------------------------------
    

    5.2 CLI Output: squad workiq --detail <agent>

    Deep dive into a single agent's metrics with historical trend.

    5.3 CLI Output: squad workiq --export

    Exports full metrics as JSON for external dashboards or CI integration:

    {
      "version": "1.0",
      "timestamp": "2026-03-06T12:00:00Z",
      "team_score": 67,
      "maturity_level": 3,
      "agents": { ... },
      "metrics": { ... },
      "trends": { ... }
    }

    5.4 OTLP Dashboard (SDK Mode)

    When telemetry flows to Aspire/Grafana, pre-built dashboard panels include:

    • Work IQ score over time (line chart)
    • Agent score comparison (bar chart)
    • Cost per resolution trend (line chart)
    • Token usage heatmap by agent and model
    • Ceremony outcome tracking
    • Maturity level progression

    6. Integration Points with Existing Features

    6.1 Work IQ MCP Server → Squad

    What exists: Microsoft ships @microsoft/workiq as an MCP server (npx -y @microsoft/workiq mcp). It exposes M365 data — emails, calendars, documents, Teams messages, collaboration graphs — via MCP protocol. Requires M365 + Copilot license + Entra ID auth.

    Integration path:

    // squad.config.ts — SDK mode
    import { defineConfig, defineWorkIQ } from '@bradygaster/squad-sdk';
    
    export default defineConfig({
      workiq: defineWorkIQ({
        enabled: true,
        syncInterval: '15m',
        signals: ['availability', 'collaboration-graph', 'active-documents'],
        privacy: {
          cacheLocally: true,       // Don't send org data to LLM
          stripPII: true,           // Remove names/emails from agent context
          retentionDays: 7          // Auto-purge cached context
        }
      })
    });

    Three integration points:

    1. Collaboration graph → Squad composition suggestions

      • Work IQ knows who actually collaborates on what
      • Squad can suggest human squad members based on real collaboration patterns
      • CLI: squad suggest --from-workiq → "Based on collaboration patterns, suggest adding @sarah (auth expert) and @james (frontend lead)"
    2. Availability signals → Notification timing

      • Work IQ knows focus blocks, meeting schedules, availability status
      • Squad queues notifications for available windows
      • Respects Do Not Disturb — no pings during deep work
    3. Active document context → Agent task prioritization

      • Work IQ knows what documents/PRs are actively being edited
      • Squad can prioritize related issues: "auth-module.ts is being actively edited — prioritize auth issues"
      • Reduces merge conflict probability

    6.2 Agent 365 Control Plane → Squad Governance

    What exists: Microsoft Agent 365 provides centralized identity, policy, audit trails for AI agents via Entra ID. SDK supports registration, policy enforcement, OpenTelemetry integration.

    Integration path (enterprise tier):

    // squad.config.ts — Enterprise mode
    export default defineConfig({
      governance: {
        agent365: {
          enabled: true,
          tenantId: process.env.AZURE_TENANT_ID,
          agentRegistration: true,    // Register squad agents with Entra
          policyEnforcement: true,    // Apply org policies to agent actions
          auditTrail: true            // Log all agent actions for compliance
        }
      }
    });
    • Squad agents get Entra IDs for enterprise audit trails
    • Organizational security policies apply to agent file access, tool usage
    • Compliance scanning via Microsoft Purview integration

    6.3 Squad Telemetry → Observability Pipeline

    What exists: Full OTel infrastructure in packages/squad-sdk/src/runtime/ — currently dormant, activated by SDK mode (PRD #194).

    Existing Module Work IQ Integration
    otel-metrics.ts Token usage, agent duration, session counts → Work IQ score inputs
    cost-tracker.ts Per-agent cost attribution → Cost Per Resolution metric
    event-bus.ts Session/agent lifecycle events → Event-driven score updates
    squad-observer.ts .squad/ file changes → Knowledge Growth Rate
    Ralph monitor Board state, triage decisions → Queue Health, Routing Accuracy

    6.4 Ceremony Outcomes → Metrics

    Squad ceremonies already produce structured outputs:

    • Retros → Learnings extracted → feeds Knowledge Growth Rate
    • Design reviews → Issues caught → feeds Ceremony Hit Rate
    • Skill extraction → Confidence levels → feeds Skill Confidence Distribution

    Work IQ score creates a feedback loop: ceremonies that improve the Work IQ score get validated, ceremonies that don't get questioned.


    7. Connection to SDK-First Squad Mode (#194)

    SDK Mode Is the Enabler

    This PRD depends on SDK-First Squad Mode (#194). Here's why:

    Current state (markdown-only mode): Squad runs inside Copilot CLI's sandbox. We have zero hook into session creation, tool calls, routing decisions, or token usage. All OTel infrastructure is dead code. No telemetry = no metrics = no Work IQ score.

    SDK mode unlocks:

    Capability Markdown Mode SDK Mode
    Token tracking Not possible CostTracker active via EventBus
    Agent duration Not possible OTel spans on agent lifecycle
    Routing decisions Not captured Coordinator events logged
    Session telemetry Not captured Full session lifecycle
    Work IQ MCP calls Not possible MCP client integration
    OTLP export Not possible OTel bridge to Aspire/Grafana
    Cost per resolution Not possible Token cost × issue linkage

    Phase dependency:

    SDK-First Mode (#194)          Work IQ Integration (#26)
    ├── Phase 1: squad build   →   (no dependency)
    ├── Phase 2: squad init --sdk  →  (no dependency)
    ├── Phase 3: squad run     →   Phase 1: Metric collection begins
    └── Phase 4: squad migrate →   Phase 2: Work IQ MCP integration
                                    Phase 3: Scoring + dashboard
                                    Phase 4: Enterprise governance
    

    Markdown-Mode Fallback

    Even without SDK mode, a subset of Work IQ metrics can be computed from Git data and .squad/ file analysis:

    • Git-derived: Velocity (issues closed), cycle time (PR timestamps), review outcomes
    • File-derived: Knowledge growth (file change counts), skill inventory
    • Not available: Token costs, latency, routing decisions, real-time agent performance

    The squad workiq command works in markdown mode with reduced fidelity. A banner indicates: [PARTIAL] Full metrics require SDK mode — run squad init --sdk


    8. Phased Rollout

    Phase 1: Git Metrics Foundation (works today, no SDK dependency)

    Ships: squad workiq CLI command with git-derived metrics

    Scope:

    • Git collector: PR cycle time, merge frequency, review outcomes from git log and GitHub API
    • .squad/ analyzer: skill count, history growth, decision count
    • Basic scoring: velocity + knowledge growth + git-derived first-pass rate
    • CLI output: simplified Work IQ report
    • Storage: .squad/telemetry/sessions.jsonl

    Effort: 1–2 weeks, 1 engineer (Fenster or Fortier)

    Acceptance criteria:

    • squad workiq produces a score on any squadded repo
    • Score is reproducible (same repo state = same score)
    • No external dependencies (works offline)

    Phase 2: SDK Telemetry Activation (requires SDK Mode Phase 3)

    Ships: Full agent-level metrics from runtime telemetry

    Scope:

    • Wire TelemetryCollector to WorkIQScorer
    • Per-agent effectiveness metrics (first-pass, rework, decision durability)
    • CostTracker integration (cost per resolution, token efficiency)
    • Real-time EventBus scoring (score updates on agent completion)
    • OTLP export of Work IQ metrics as custom OTel metrics

    Effort: 2–3 weeks, 1 engineer

    Acceptance criteria:

    • Agent-level scores visible in squad workiq
    • Token costs attributed per agent per session
    • Aspire dashboard shows Work IQ metrics when OTLP configured
    • Scores differ meaningfully between high/low performing agents

    Phase 3: Work IQ MCP Integration

    Ships: Organizational context flowing into Squad

    Scope:

    • MCP client for @microsoft/workiq server
    • Collaboration graph queries → composition suggestions
    • Availability signal consumption → notification timing
    • Active document context → task prioritization hints
    • Privacy controls (local cache, PII stripping, retention limits)
    • squad suggest --from-workiq CLI command

    Effort: 3–4 weeks, 1–2 engineers (Baer for security review)

    Acceptance criteria:

    • squad suggest --from-workiq returns meaningful suggestions
    • Notifications respect availability signals
    • Zero PII leaks to LLM context (Baer validates)
    • Works with Work IQ MCP server v1.x
    • Graceful degradation when Work IQ unavailable

    Phase 4: Enterprise Governance + Agent 365

    Ships: Enterprise-grade agent management

    Scope:

    • Agent 365 registration for squad agents
    • Entra ID integration for agent identity
    • Policy enforcement hooks (file access, tool usage restrictions)
    • Audit trail export for compliance
    • squad governance CLI commands

    Effort: 4–6 weeks, 2 engineers (Baer + enterprise focus)

    Acceptance criteria:

    • Squad agents appear in Agent 365 dashboard
    • Organizational policies enforced during agent execution
    • Audit logs pass compliance review
    • Admin can disable/quarantine individual squad agents

    9. Privacy and Data Considerations

    9.1 Core Principles

    1. Local-first: All metrics stored in .squad/telemetry/ by default. No external transmission without explicit opt-in (SQUAD_TELEMETRY=1 + OTLP endpoint).

    2. No PII in metrics: Work IQ scores, agent metrics, and telemetry contain no personally identifiable information. Agent names are fictional (casting identities), not real names.

    3. Org context isolation: Work IQ data cached locally is never sent to LLM context without PII stripping. Collaboration graph uses role descriptors, not names: "auth expert (3 shared PRs)" not "sarah@company.com".

    4. Retention limits: Telemetry files auto-rotate. Default: 90 days for session data, 7 days for cached Work IQ context. Configurable via squad.config.ts.

    5. Consent model:

      • Tier 0 (default): Local-only metrics from git + .squad/ files. No network calls. No opt-in needed.
      • Tier 1 (SQUAD_TELEMETRY=1): SDK telemetry active, OTLP export enabled. Explicit env var.
      • Tier 2 (workiq.enabled): Work IQ MCP integration. Requires M365 auth + explicit config.
      • Tier 3 (governance.agent365): Enterprise governance. Requires Entra ID + admin consent.

    9.2 Work IQ-Specific Privacy

    • Work IQ MCP server handles its own auth (Entra ID, delegated permissions)
    • Squad never stores raw M365 data — only derived signals (availability: boolean, collaboration score: number)
    • Admin consent required at tenant level before Work IQ integration activates
    • squad workiq --privacy shows exactly what data is collected and where it's stored

    9.3 Data in .gitignore

    # Work IQ telemetry (local-only, not committed)
    .squad/telemetry/
    .squad/workiq-cache/
    

    Telemetry data is gitignored by default. Team-level aggregates (daily snapshots) can optionally be committed for shared visibility.


    10. Success Criteria and Acceptance Tests

    Phase 1 Success

    Criterion Test
    Score reproducibility Same repo state produces identical score across 10 runs
    Offline operation squad workiq works with no network (git-only metrics)
    Performance Score computation < 5 seconds for repos with 1000+ commits
    NO_COLOR compliance Output renders correctly without ANSI codes
    Markdown mode works squad workiq produces partial score without SDK mode

    Phase 2 Success

    Criterion Test
    Agent differentiation Agents with different performance profiles get different scores
    Cost accuracy Token costs match CostTracker totals within 1%
    Real-time updates Score updates within 30 seconds of agent task completion
    OTLP emission Custom metrics visible in Aspire dashboard within 1 minute
    Trend detection 7-day trend correctly identifies improving/degrading agents

    Phase 3 Success

    Criterion Test
    MCP connectivity Squad connects to Work IQ MCP server and retrieves context
    Suggestion quality >50% of collaboration suggestions rated "useful" by user
    Availability respect Zero notifications sent during declared focus blocks
    Graceful degradation Squad operates normally when Work IQ MCP server is unavailable
    PII isolation Automated scan confirms zero PII in LLM context or telemetry files

    Phase 4 Success

    Criterion Test
    Agent registration All squad agents appear in Agent 365 dashboard
    Policy enforcement File access restrictions correctly block unauthorized reads
    Audit completeness Every agent action appears in audit log within 60 seconds
    Admin controls Admin can quarantine an agent; agent stops executing immediately

    11. Open Questions

    1. Work IQ MCP server stability: The @microsoft/workiq MCP server is in preview. How do we handle breaking changes? Recommendation: version-pin + adapter pattern.

    2. Scoring calibration: Initial weights (0.30 first-pass, 0.25 durability, etc.) are hypotheses. Do we need a calibration period? Recommendation: ship with defaults, add squad workiq --calibrate later.

    3. Cross-repo Work IQ: Can a Work IQ score aggregate across multiple repos in a monorepo or multi-repo setup? Recommendation: Phase 2+ concern; start with single-repo.

    4. Human-in-the-loop validation: Should humans be able to override/adjust Work IQ scores? Recommendation: No — scores are derived from data, not opinions. Humans can adjust weights.

    5. Competitive benchmarking: Should squads be comparable across organizations? Recommendation: No — Work IQ is for self-improvement, not leaderboards. Organizational context makes cross-org comparison meaningless.

    6. Agent 365 licensing: What's the licensing model for registering non-Microsoft agents? Research needed before Phase 4 commitment.

    7. Ceremony auto-triggering: At Level 3 (Adaptive), should low Work IQ scores auto-trigger retros? Recommendation: Yes, with user confirmation — [SUGGEST] Work IQ dropped 8% this week. Run a retro? (y/n)


    12. Risk Matrix

    Risk Likelihood Impact Mitigation
    Work IQ MCP server breaks (preview) Medium Medium Version-pin, adapter pattern, graceful degradation to local-only
    Metrics gaming (agents optimize for score) Low Medium Scores are derived from outcomes, not behaviors; weights are private
    Privacy incident (PII leak via Work IQ) Low High PII stripping at ingestion, local-only cache, Baer security review per phase
    SDK Mode delayed (blocks Phase 2) Medium High Phase 1 ships independently; git-only metrics provide immediate value
    Enterprise adoption friction Medium Medium Tier 0 requires zero setup; each tier is opt-in with clear value proposition
    Score becomes vanity metric Medium Low Trend detection > absolute score; actionable recommendations tied to each metric

    13. Go/No-Go Recommendation

    Go. Three reasons:

    1. Infrastructure exists. The OTel stack, EventBus, CostTracker, Ralph monitor, and squad-observer are all built and waiting for activation. Work IQ is not new infrastructure — it's the measurement layer for infrastructure we've already invested in.

    2. Phase 1 ships without SDK dependency. Git-derived metrics and .squad/ file analysis provide immediate value. No blocking dependency on SDK-First Mode for initial delivery.

    3. Microsoft has built the bridge. The @microsoft/workiq MCP server and Agent 365 control plane are public, documented, and designed for exactly this integration pattern. We're not inventing a protocol — we're consuming one.

    Recommended first action: File Phase 1 implementation issues (git collector, scorer, CLI command) and assign to Fenster or Fortier. Phase 1 can start immediately.

  7. bradygaster commented on Mar 7, 2026

    @bradygaster
    CollaboratorAuthor

    This is a really thoughtful exploration, and we genuinely appreciate the depth of thinking here. The Work IQ + Squad pairing is genuinely interesting — personal work memory feeding agent context is a compelling idea! We're focused on core Squad stability right now, but MCP (Model Context Protocol) is the path forward for integrations like this. Once Work IQ exposes MCP tools or M365 Graph APIs, Squad agents could consume that context directly. The architecture supports it. Let's keep this on the radar! 🚀

  8. added a commit that references this issue on Mar 8, 2026
  9. added a commit that references this issue on Mar 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    squadSquad triage inbox — Lead will assign to a membertype:spikeResearch/investigation — produces a plan, not code

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions