Skip to content

[monitor] Preserve builder dist check during dogfood sync #178

Description

@s-hiraoku

Summary

Daily dogfood sync manages builder-agent's .kaizen/config.yml and AGENTS.md, but the canonical .github source omits builder-agent's npm run check:dist verification step. A fresh manifest sync against current default-branch snapshots removes that check from both files, while the open generated builder-agent sync PR has no changed files and therefore does not clear the drift.

This is a closed-loop sync-health finding in kaizen-agents-org/.github, not a builder-agent implementation bug: .github owns the managed dogfood source and deterministic sync contract.

Ownership key

kaizen-agents-org/.github
builder-agent:.kaizen/config.yml
builder-agent:AGENTS.md
Preserve builder-agent check:dist verification in managed dogfood config and AGENTS or explicit tested overlay

Evidence observed

  • Source ref: kaizen-agents-org/.github default branch main at 5bbaa7baca45af8dabdbcd472d3ba82f78c113d3.
  • Target ref: kaizen-agents-org/builder-agent default branch main at 22067e1839a12c2e4730f64110650ac534401228.
  • Managed source paths:
    • .github/dogfood-sync/targets/builder-agent/.kaizen/config.yml
    • .github/dogfood-sync/targets/builder-agent/AGENTS.md
  • Target paths checked:
    • builder-agent/.kaizen/config.yml
    • builder-agent/AGENTS.md
  • A fresh disposable-clone run of scripts/sync-daily-dogfood.sh removes npm run check:dist from both target files.
  • Open generated sync PR: Sync Kaizen dogfood contracts builder-agent#171 on codex/daily-dogfood-sync, ready-for-review and green, but gh pr view --json files reports no changed files and closingIssuesReferences is empty.
  • The latest scheduled Daily Dogfood Sync run, 30518274686, succeeded on 2026-07-30 even though this managed drift remains.

Recommended action

Make one explicit sync-contract decision for builder-agent's distribution check:

  1. Add npm run check:dist to the canonical managed builder-agent config and AGENTS guidance in .github; or
  2. Define a documented, deterministic, tested builder-agent-specific overlay that preserves the check during dogfood sync.

Then strengthen sync validation so a generated sync PR cannot be considered complete when builder-agent main will remain different from the canonical managed config and guidance plus declared overlays after merge.

Acceptance criteria

  • Builder-agent dogfood sync no longer removes or leaves ambiguous the npm run check:dist verification step.
  • .github contract tests cover the builder-agent distribution check in .kaizen/config.yml and AGENTS.md, or cover the explicit overlay preserving it.
  • A fresh codex/daily-dogfood-sync builder-agent branch exactly matches the canonical managed source plus declared overlays for the affected paths.
  • The daily dogfood sync report fails or stays actionable when builder-agent managed config/guidance drift remains after a generated sync branch is updated.
  • Re-running the daily sync does not recreate this same builder-agent verification drift.

Documentation basis

  • .github/docs/daily-dogfood-sync.md, sections Goal, Workflow, Deterministic Files, and Monitor Contract: .github owns deterministic managed source paths, .kaizen/config.yml and AGENTS.md are manifest-managed, sync PRs target main, and remaining origin/main drift must be covered by an open sync PR that exactly matches every manifest-managed source path.
  • .github/docs/org-monitor.md, sections What It Checks and Issue Creation: org-monitor owns concrete sync-health and closed-loop drift findings.
  • .github/docs/automation-roles.md, sections Boundaries and Duplicate Ownership: org-monitor may create focused [monitor] issues for sync drift, and recurring sync-drift ownership is keyed by target repository, affected managed path/component, and actionable follow-up.
  • .github/docs/documentation-sources.md, sections Source Order and Issue Evidence: automated issue creation must cite default-branch documentation basis and avoid local-only evidence.

PR linkage requirement

The implementation PR must target the .github default branch, include Closes #178 in the PR body, and verify:

gh pr view <pr> --json baseRefName,closingIssuesReferences,isDraft

Before reporting the PR ready, confirm the PR targets main, is not a draft, and that closingIssuesReferences contains this issue. Do not rely on a PR title, branch name, or issue comment as proof that GitHub will close the issue on merge.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions