Skip to content

Split the agent instruction set into AGENTS.md and GOVERNANCE.md - #28

Merged
ptr727 merged 0 commit into
developfrom
conformance/governance-split
Aug 1, 2026
Merged

Split the agent instruction set into AGENTS.md and GOVERNANCE.md#28
ptr727 merged 0 commit into
developfrom
conformance/governance-split

Conversation

@ptr727

@ptr727 ptr727 commented Aug 1, 2026

Copy link
Copy Markdown
Owner

The hub restructured the agent instruction set into a slim router (AGENTS.md) plus a topical rule book (GOVERNANCE.md), and this repo still carried the pre-split single file. This is the largest class in the conformance sweep and the only LETTER-class file finding.

LETTER file: GOVERNANCE.md absent on develop (verify intent per AUDIT.md section 7)
DRIFT  verbatim: AGENTS.md section 'Context and Delegation Discipline' region absent downstream, cannot compare
DRIFT  verbatim: AGENTS.md section 'Where the Rules Live' region absent downstream, cannot compare
DRIFT  section: 'branching model' in AGENTS.md is not a declared section ... (x10)
DRIFT  section: 'Reviewing Carried Fleet Content' not found as a heading in .github/copilot-instructions.md

The split

AGENTS.md (73 lines, down from 57 KB) carries the repo intro plus the two sections spec/files.json declares for it. GOVERNANCE.md carries the eighteen topical sections. Repository Onboarding and Conformance is hub-only per spec/section-model.md and is not carried. Devcontainer and Repository Layout are the two intent sections, so both are written for this repo: this repo ships no devcontainer, and the layout describes its own tree.

All eighteen verbatim regions hash byte-identical to the canonical after EOL normalization, and neither file carries an undeclared section.

Nothing was dropped

spec/section-model.md "Migrating a repo onto the split" warns that re-vendoring over the whole file silently deletes local additions written after a fault the fleet has never seen, and that a similarity heuristic is confidently wrong in exactly the direction that loses content. So every rule in the old file was probed against the canonical by its distinctive phrase. All but two resolved to a hub section that had reworded or absorbed them.

The two that did not are moved to CODESTYLE.md rather than dropped:

  • The full post-change set. The clean-compile task is necessary and not sufficient here: dotnet test and dotnet husky run also run before commit. CODESTYLE.md "Clean-Compile Verification" covers the first step only, so the other two had no home.
  • The shared README.md / HISTORY.md header. This is fleet law, but it lives in spec/readme-structure.md, which is hub-only and not carried, so a downstream pointer would dangle. Kept as a repo rule under "Markdown and Spelling". Raised with the hub as a spec gap (AUDIT.md section 9).

Cross-references

Ten sections moved file, so every reference to them was retargeted: AUDIT.md, CODESTYLE.md (4 sites plus the cspell one-liner reference), WORKFLOW.md, repo-config/README.md, and three sites in the runbook. Reference-link labels renamed agents-* to governance-* and the definition blocks re-alphabetized. No AGENTS.md# anchor and no [agents] label remains anywhere in the repo.

.github/copilot-instructions.md also gains Reviewing Carried Fleet Content, which exists to stop a reviewer reporting a byte-locked reference to a path this repo does not carry as a broken link. Adapted from the canonical to name GOVERNANCE.md, since the hub's own copy still describes the pre-split AGENTS.md; raised with the hub.

Verification

  • All 18 verbatim sections SHA-256 match the hub canonical at 6501479; both files carry no undeclared section.
  • ASCII-clean, CRLF preserved on every touched file, editorconfig-checker exits 0.
  • No dangling AGENTS.md# anchors or [agents] reference labels remain.

Part of the conformance sweep against the hub baseline (audit run 2026-08-01T14:29:05Z | hub 6501479).

Copilot AI review requested due to automatic review settings August 1, 2026 15:17
@codecov

codecov Bot commented Aug 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 44.96%. Comparing base (30434d0) to head (bfe348d).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop      #28   +/-   ##
========================================
  Coverage    44.96%   44.96%           
========================================
  Files           25       25           
  Lines         3398     3398           
  Branches       259      259           
========================================
  Hits          1528     1528           
  Misses        1824     1824           
  Partials        46       46           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aligns PhotoCleaner’s carried governance docs with the hub’s split model by introducing GOVERNANCE.md as the topical rulebook and slimming AGENTS.md into a router/entry-point, while retargeting cross-references across the repository to the new locations.

Changes:

  • Add GOVERNANCE.md containing the full set of cross-cutting governance sections (with repo-specific Devcontainer and Repository Layout).
  • Reduce AGENTS.md to context/delegation guidance plus a task-to-section map into GOVERNANCE.md.
  • Update documentation cross-references across governance/workflow/audit docs from AGENTS.md anchors to GOVERNANCE.md anchors and labels.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
WORKFLOW.md Retarget governance cross-references (notably branching model and governance authority) to GOVERNANCE.md.
repo-config/README.md Update branching-model references to point at GOVERNANCE.md instead of AGENTS.md.
GOVERNANCE.md Introduce the new split governance rulebook with topical sections and repo-specific intent sections.
CODESTYLE.md Retarget process-rule references to GOVERNANCE.md and relocate two repo rules into CODESTYLE where appropriate.
AUDIT.md Update prose authorities and branching-model links to GOVERNANCE.md.
AGENTS.md Slim down to entry-point router plus context/delegation guidance.
.github/copilot-instructions.md Retarget PR review contract references to GOVERNANCE.md and add carried-fleet-review guidance.

Comment thread WORKFLOW.md Outdated
Copilot AI review requested due to automatic review settings August 1, 2026 15:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

Suppressed comments (1)

WORKFLOW.md:13

  • The last sentence contradicts the prior clause in the same paragraph: it says GOVERNANCE.md is authoritative where it overlaps this document, but then says AGENTS.md wins on conflicts. If GOVERNANCE.md is the authority in overlaps, the conflict-resolution sentence should name GOVERNANCE.md.
> **Canonical scope.** This document is authoritative for the workflow contract and test methodology (sections 3 to 6). The conventions in section 2 and the release policy also live in `GOVERNANCE.md` ("Workflow YAML Conventions" and "Release Model"), which is authoritative where the two overlap. Section 2 restates them so this file reads on its own. On any conflict in that overlap, `AGENTS.md` wins.

Copilot AI review requested due to automatic review settings August 1, 2026 15:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

@ptr727
ptr727 merged this pull request into develop Aug 1, 2026
13 checks passed
@ptr727
ptr727 deleted the conformance/governance-split branch August 1, 2026 16:48
ptr727 added a commit that referenced this pull request Aug 3, 2026
* Split the agent instruction set into AGENTS.md and GOVERNANCE.md

The hub restructured the agent instruction set into a slim router plus a
topical rule book, and this repo still carried the pre-split single file.
The audit reported GOVERNANCE.md absent, both AGENTS.md verbatim regions
missing, and all ten of its sections as undeclared.

AGENTS.md now carries only the repo intro and the two verbatim sections
the baseline declares for it, Context and Delegation Discipline and Where
the Rules Live. GOVERNANCE.md carries the eighteen topical sections, the
sixteen verbatim ones byte-identical to the canonical, with Devcontainer
and Repository Layout written for this repo as the section model requires.
Repository Onboarding and Conformance is hub-only and is not carried.

Every rule the old AGENTS.md held was probed against the canonical by its
distinctive phrase before the file was replaced. Two were not covered and
moved to CODESTYLE.md rather than being dropped: the full post-change set
(the clean-compile task plus dotnet test plus dotnet husky run), and the
shared README.md and HISTORY.md header.

.github/copilot-instructions.md gains the Reviewing Carried Fleet Content
section, which tells a reviewer that a reference inside byte-locked text
to a path this repo does not carry is intentional. Cross-references in
AUDIT.md, CODESTYLE.md, WORKFLOW.md, repo-config/README.md, and the
runbook are retargeted to the sections' new home.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Trim the trailing blank line at the end of GOVERNANCE.md

markdownlint MD012 flagged two consecutive blank lines at the end of the
file. The generator appended the Repository Layout block with its own
trailing newline on top of the file's, and the local lint run that would
have caught it was made on a branch that does not carry the file.

All eighteen verbatim sections still hash equal to the canonical.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Point the WORKFLOW.md precedence claim at GOVERNANCE.md

The Canonical scope callout says GOVERNANCE.md is authoritative where the
two overlap and then ended by naming AGENTS.md as the tiebreak, which
contradicts itself now that AGENTS.md is the router and the rule text
lives in GOVERNANCE.md. The hub canonical already reads GOVERNANCE.md
here; the retarget pass caught the first half of the sentence and missed
the second.

Swept the tree for other stale precedence claims: none.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants