Skip to main content
OrchestKit v7.26.3 — 100 skills, 36 agents, 110 hooks · Claude Code 2.1.76+
OrchestKit

Agent Attribution

Automatic tracking of which sub-agents contributed to each branch, with attribution in commit messages and PR bodies.

Agent Attribution

OrchestKit automatically tracks which sub-agents contributed to your work and surfaces that attribution in commit messages and PR descriptions.

Instead of GitHub showing a single "claude" contributor, agent attribution shows the full team — which specialized agents ran, what they did, how long they took, and whether they ran in parallel.

How It Works

Agent spawns          SubagentStart hook
─────────────────►    Records HEAD sha + start time

Agent completes       SubagentStop hook
─────────────────►    Appends to branch activity ledger
                      (.claude/agents/activity/{branch}.jsonl)

/ork:commit           Reads ledger → injects trailers
─────────────────►    "Agents Involved:" + Co-Authored-By

/ork:create-pr        Reads ledger → generates PR body
─────────────────►    Badge row + Team Roster + Credits Roll

The Branch Activity Ledger

Every time a sub-agent completes work, the SubagentStop hook appends an entry to a JSONL file scoped to the current branch:

{"ts":"2026-03-29T07:58:05Z","agent":"ork:backend-system-architect","stage":0,"duration_ms":5263,"summary":"Designed REST API schema...","commit_base":"a8cef5f9..."}
{"ts":"2026-03-29T07:58:19Z","agent":"Explore","stage":2,"duration_ms":6029,"summary":"Counted 10 exported functions","commit_base":"a8cef5f9..."}
{"ts":"2026-03-29T07:58:23Z","agent":"ork:security-auditor","stage":2,"duration_ms":11369,"summary":"Found path traversal in sanitizeBranch()","commit_base":"a8cef5f9..."}

Each entry captures:

FieldDescription
agentSub-agent type (e.g., ork:security-auditor)
stageExecution stage: 0 = Lead, 1 = Parallel, 2 = Follow-up
duration_msHow long the agent ran (real wall-clock time)
summaryWhat the agent concluded (first 300 chars of response)
commit_baseHEAD sha when the agent started (for commit attribution)
orchestratorWhich skill spawned the agent (e.g., brainstorm, implement)

Commit Attribution

When you run /ork:commit, the skill reads the ledger and injects two things into the commit message:

1. "Agents Involved" Section

feat(auth): implement OAuth2 flow

- Added token refresh endpoint
- Configured PKCE flow

Agents Involved:
  ork:backend-system-architect — API design + data models (2m14s)
  ork:security-auditor — Token rotation hardening (0m42s)
  ork:test-generator — 47 integration tests (2m01s)

Co-Authored-By: Claude <noreply@anthropic.com>

2. Per-Agent Co-Authored-By Trailers

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: ork:backend-system-architect <noreply@orchestkit.dev>
Co-Authored-By: ork:security-auditor <noreply@orchestkit.dev>
Co-Authored-By: ork:test-generator <noreply@orchestkit.dev>

Only agents that ran for more than 5 seconds or produced file changes are included in commit trailers. Advisory-only agents appear in the PR body instead.

PR Attribution

When you run /ork:create-pr, the skill reads the full branch ledger and generates:

Badge Row

Shields.io badges showing agent count, tests generated, and vulnerability scan results.

Agent Team Sheet

A Markdown table showing each agent, what it did, its execution stage, and duration:

AgentTaskStageTime
backend-system-architectAPI design + data modelsLead2m14s
security-auditorDependency auditParallel0m42s
test-generator47 tests, 94% coverageParallel2m01s

Credits Roll

A collapsible <details> section grouping agents by execution stage:

  • Lead — The first agent spawned (typically the architect or designer)
  • Parallel — Agents that ran simultaneously (security, testing, frontend)
  • Follow-up — Agents that ran after the parallel batch (CI/CD, quality review)

Parallel Execution Stages

OrchestKit tracks whether agents ran sequentially or in parallel:

StageValueMeaning
Lead0First agent spawned — sets the direction
Parallel1Ran in background simultaneously with others
Follow-up2Ran after the parallel batch completed

This maps to how OrchestKit skills actually work. For example, /ork:brainstorm spawns 4 agents in parallel after a lead agent designs the approach, then follow-up agents synthesize results.

Data Storage

FilePurposeLifetime
.claude/agents/activity/{branch}.jsonlBranch activity ledgerUntil branch is deleted or 30 days
.claude/agents/session-state.jsonStart times + commit baseCurrent session

Both files are .gitignored — they're ephemeral session data, never committed to the repository.

Cleanup

The Stop hook automatically cleans up stale ledger files:

  • Ledgers for branches that no longer exist are deleted
  • Ledgers older than 30 days are pruned
  • Session state resets on each new session

Configuration

Agent attribution is enabled by default with no configuration needed. The system activates automatically when:

  1. You use any skill that spawns sub-agents (/ork:implement, /ork:brainstorm, /ork:fix-issue, etc.)
  2. You commit with /ork:commit
  3. You create PRs with /ork:create-pr
Edit on GitHub

Last updated on