Skip to content

[P0] Add commit counter to orchestrator prompt #936

@rjmurillo-bot

Description

@rjmurillo-bot

Context

PR #908 exceeded 20-commit limit by 3× (59 commits) without agent awareness. Limit was invisible until violated.

Problem Statement

No visibility into commit count during session:

  • Agents don't know how many commits accumulated
  • ADR-008 limit (20 commits) is invisible
  • Violations discovered only when it's too late

Proposed Solution

Modify orchestrator to:

  1. Run git rev-list --count HEAD ^origin/main after each commit
  2. Display as "Commit X/20 (ADR-008)" in session output
  3. Warn when approaching limit (≥15 commits)
  4. Block at limit (≥20 commits, suggest squash)

Acceptance Criteria

  • Commit counter runs automatically after each commit
  • Format: "Commit X/20 (ADR-008)"
  • Warning at 15+ commits
  • Blocking error at 20+ commits with remediation guidance
  • Works for all agents (orchestrator, implementer, etc.)

Effort Estimate

2 hours

Priority

P0 - Critical (This Week)

Related

References

.agents/retrospective/2026-01-15-pr-908-comprehensive-retrospective.md (lines 1263-1267)

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-implementerCode implementation agentagent-orchestratorTask coordination agentagent-retrospectiveLearning extraction agentarea-promptsAgent prompts and templatesbugSomething isn't workingenhancementNew feature or requestpriority:P0Critical: Blocks core functionality, security vulnerability, or data loss

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions