Agent Sync
Learning lives in Git-tracked owning artifacts, not chat history.
Project Fit
- Read the applicable instruction hierarchy and context routing.
- Map local equivalents before introducing preferred filenames.
- Use existing sources of truth and preserve repository conventions.
- Run scaffold-harness when the repository lacks a reliable baseline.
- Establish shared understanding for significant work. Use
grill-harness-with-docs for unresolved material decisions in any topic.
Session Start
First, take the current harness contract and pinned Skills. Do not skip
this because the task looks small.
- Refresh the live harness:
git fetch origin and read HARNESS.md from
the origin default tip (git show origin/<default>:HARNESS.md) or the
remote canonical file. Do not treat ./HARNESS.md in a task worktree as
current. Ff-only a clean primary when behind origin; if blocked, leave it.
When this repository is a member of a multi-repo harness, read coordinator
SYNC.md / ORCHESTRATION.md the same way.
- Confirm managed Skill copies match the consumer's origin pins before
following a Skill. Read
SKILL.md from that current copy.
- Then load only the additional sources the task needs:
- agent instructions after the current harness contract
- the current human's preferred collaboration language from explicit or
conversation evidence; ask once only if unclear, and keep personal preference
in user-scoped or untracked state unless it is shared policy
- the active host and effective instruction, Skill, plugin, Rule, Hook, MCP,
permission, model, and isolation precedence needed by the task
- relevant context map, domain context, status, ADRs, and recent learnings
- Skills triggered by the task
- the managed
write-a-skill owner before Skill creation or revision, plus
only the active host's native authoring adapter when needed
- actual Fast Check and Full Gates
- volatile model, pricing, platform, or Golden Path evidence only when the task
depends on it
Do not treat "read only what the task needs" as permission to skip harness
currency, maximum autonomy, or git-loop close-out. Do not re-derive
conventions already owned by an artifact.
Stewardship During Work
Harness stewardship is part of every significant task. Notice repeated
friction, missing or stale context, weak feedback, unclear ownership,
unnecessary ceremony, and recurring workflows.
Keep canonical artifacts agent-first and host-neutral. Human README and
reference material are legible projections, while thin host adapters reference
the owning instructions, context, state, and contracts. Communicate in the
human's preferred language; keep persistent repository artifacts in US English
unless a named artifact is explicitly requested otherwise.
Follow the repository's owned voice or style guide. Without one, keep prose
direct and concrete: lead with the problem or working model, name trade-offs
and system effects, and remove generic hype, defensive setup, and text that
changes no decision or action.
Reserve first person for artifacts that explicitly speak for the repository
owner. Keep agent instructions and operating procedures neutral and imperative.
Diagnose before changing. Update the smallest owning artifact when evidence
justifies a reversible in-scope improvement. Leave the harness unchanged when
no durable signal exists.
When a recurring bounded workflow has a justified human-on-the-loop target,
make the smallest missing promotion gate part of each qualifying run. Keep the
promotion index in the target's existing workflow-state owner and link each
authoritative check, review, audit, incident, and outcome record. A run that
changes a gate cannot certify itself: require fresh-context critique and a
negative proof for the failure that gate owns. Once the evidence covers
repeated runs in one declared class, its variability and meaningful failure
modes, recovery, observability, outcomes, and veto, present the accountable
human one immediate promote-or-hold decision.
Route a repeated missing-stack failure through update-harness: reuse an
existing project, private, public, bundled, or plugin profile, or pilot an
approved current public candidate first. Use write-a-skill for the smallest
project-local profile only when repeated work supplies real examples and
checks. One-off stack work stays direct work.
Do not return an authorized routine decision to the human as a confirmation
question. Close it through the repository policy and available evidence, or
escalate a named conflict, authority gap, or material risk.
Before claiming done, ask and answer in the same loop:
- Manifest here? Does this evidence belong in the current repository
harness owner (
HARNESS.md, AGENTS.md, checks, Hook, Skill, STATUS,
LEARNINGS)? Prefer a hard adaptation when the same mistake would recur.
- Port within your authority? After every harness change, decide in the
same loop whether a generalized portable variant belongs in a catalog you
own or are authorized to change. If yes, update that owner without waiting
for a separate prompt - typically that catalog's
scaffold-harness
templates or this Skill. Do not push, open a pull request, or otherwise
write back to an external public upstream you only consume - including
https://github.com/ldaume/agentic-engineering-harness - unless you are
that upstream's maintainer with explicit write authority for this change.
Explicit no-port is valid when the change is target-private or when you
have no owned shared catalog - harden locally instead; still never write
back to a foreign public upstream. Ask only when placement is ambiguous or
a port would leak private authority.
- Fan-out live members? If a coordinator
SYNC.md fan-out checklist
applies: pointer-only policy needs no sibling edits; discovery/snippet
changes refresh every listed member Private system section, including
experiments, and must pass Full Gates. Parent sessions own fan-out after
subagents.
- Siblings in view? On coordinator work, keep
CONTEXT-MAP.md aligned
with repo-like siblings; admit or graduate via the coordinator admit
checklist. Unlisted siblings are a verify failure.
- After a change that alters purpose, membership, sync, autonomy, working-root
rules, git hygiene, or the harness cycle: does the human
README.md still
teach a new reader the current human and agent roles by product phase and
operating level, technical controls, engineering method, rationale, and
evidence needed for wider delegation?
Event-Triggered Review Loops
Run only loops that can change the next action:
- Work review: self-review significant changes and run deterministic checks.
- Independent review: use a fresh-context agent for every resolved
material decision or change, including public methods and Skill semantics.
Give it the shared-understanding frame, authoritative sources, diff or
proposal, checks, and non-goals. Use an installed upstream
code-review
Skill when it owns the review procedure. Run the selected review directly;
do not ask the human whether to spawn a reviewer.
- Harness review: assess ownership, duplication, effectiveness, blast
radius, and removal after harness friction or change.
- Currentness review: use
../scaffold-harness/CURRENTNESS.md
when volatile model, cost, feature, tool, or community evidence affects a
decision or an active adapter no longer matches observed host behavior.
Keep stable task tiers separate from replaceable provider models. A new,
deprecated, unavailable, repriced, or behaviorally changed model triggers a
representative candidate evaluation and an update to every affected active
host adapter - Codex, Claude Code, Cursor, Gemini CLI, Pi, SDK, CI, or a later
host - rather than a Codex-only rename. Expired evidence is stale but
triggers research only when consumed. The result may keep, change, remove,
supersede, or rebuild the affected harness owner.
- Capability gate: use
../scaffold-harness/CAPABILITY-GATES.md
when sessions lose continuity, re-explore code wastefully, flood context,
miss cross-repo relationships, or tempt a new memory/graph/compression
product. Prefer Git owners first; add tools only for an observed failure
mode with authority, scope, pilot, and exit path.
- Autonomy review: require controls, independent critique, and the
applicable human decision before increasing delegation or oversight mode.
Promote only the evidenced change or risk class. After a scope breach,
unobservable failure, failed recovery, or unresolved material decision,
immediately return it to human-in-the-loop, record the hold reason, and
reset its evidence before any new promotion run.
- Dependency bot PR: when Renovate (or similar) opens an update PR, inspect
the version jump for this repo's usage, run Fast Check / Full Gates (plus
feature smoke if runtime behavior is touched), and merge only with safety
evidence. If not merging, comment with rationale and unblock criteria - never
silent-merge or silent-ignore. See harness Dependency bot PRs.
Every loop ends with keep, change, remove, supersede, rebuild, or explicitly no
action.
Do not create review artifacts when the result is transient and changes no
future behavior.
Route Durable Evidence
| Signal |
Owning mechanism |
| New or changed commands, scope, permissions |
Agent instructions |
| Domain term or invariant |
Domain context |
| Source, context, or repository relationship |
Context map |
| Harness oversight or evolution rule |
Harness contract |
| Portable harness default for future scaffolds |
Catalog you own or are authorized to change (scaffold-harness templates and/or this Skill there); never a foreign public upstream you only consume |
| Live member discovery / snippet fan-out |
Coordinator SYNC.md + MEMBER-AGENTS-SNIPPET.md |
| Git working-tree start/finish hygiene (branch gate, worktree default, ordinary names, leases, cross-agent non-interference) |
Harness contract (Git Working Tree Hygiene); ADR when accepted |
| Dependency-bot PR merge or defer |
Harness contract (Dependency bot PRs) + PR comment |
| Repeated model, worker, budget, or review routing |
Orchestration policy |
| Current workflow or engagement state |
Status document |
| Accepted consequential trade-off |
ADR |
| Repeated probabilistic workflow |
Skill |
| Portable Skill authoring behavior |
Managed public write-a-skill; native host creator stays an adapter |
| Scoped behavioral guidance |
Rule or agent instruction |
| Deterministic event or enforcement |
Hook, CI, test, platform control |
| Portable public method or default |
Public Skill or scaffold upstream only when you maintain that upstream; otherwise keep the method local or in your owned catalog |
| Shared non-public organization or team procedure |
Private Skill catalog |
| Durable evidence-backed observation |
Learning log in the owning repository |
| Cross-repository membership, contracts, coordinator policy |
Coordinating repository owners (map, harness, learnings) |
| Member-local product or ops observation |
That member's owners; create LEARNINGS.md lazily |
| Human understanding of purpose, cycle, or where to work |
Human README.md in the owning or coordinating repo |
Route a lesson once by audience and authority. Portable practice belongs in a
catalog you own or are authorized to change; do not write it back to a foreign
public upstream you only consume. Shared confidential procedure belongs in the
private catalog; cross-repository relationship or policy belongs in the
coordinator; product, domain, service, or sensitive truth belongs in its local
owner. Reference that owner from consumers instead of copying the lesson.
Prefer a hard adaptation of the owning artifact when the lesson is a rule.
Use a learning entry when evidence should survive sessions but is not yet
stable enough to hard-code. Do not copy the same learning into every consumer.
Reference the owner instead of copying its content into consumers.
Verification
- Run the smallest relevant checks for changed artifacts.
- Verify referenced local paths and commands.
- Review the diff for duplicated, stale, speculative, or unowned layers.
- Consolidate or supersede prior learnings instead of appending duplicates.
- State what changed, why, and the next re-check condition.
- Close the git integration loop for this session's ready work: commit and
push when authorized; when repository policy makes merge the default (or
otherwise authorizes it) and this session opened a PR/MR with green
required checks and no conflicts, merge it through the normal path before
claiming done. Leave the host workspace on local default matching remote
and remove only this session's worktrees. If policy disallows merge, record a named blocker instead.
Do not leave mergeable session-owned PRs for a human reminder when merge
is authorized. Do not force-merge past red required checks or over foreign
WIP.
For volatile decisions, confirm the source, check date, live environment, and
expiry or event trigger. Re-run representative evals before routing a task
class to a cheaper worker.
Do Not Persist
- one-off debugging and ticket chatter
- raw chat or temporary task state
- rules already enforced by a native config or deterministic control
- unverified product, architecture, ownership, or security assumptions
- a new artifact without an observed problem and owner
The sync is complete when durable evidence is routed, relevant checks pass,
uncertainty is explicit, authorized session-owned ready PRs/MRs are merged or
a named blocker is recorded (including policy-disallowed merge), and no
further harness change is justified by the current work.
1---2name: agent-sync3description: Proactively evolves repository harness artifacts, review loops, currentness, and agent routing across sessions and tools from durable evidence. Use when starting or completing a session, after toolchain, model, pricing, or domain changes, when repeated friction reveals missing context or checks, or when instructions, orchestration, Skills, Rules, Hooks, MCP, or learnings may be stale.4---56# Agent Sync78Learning lives in Git-tracked owning artifacts, not chat history.910## Project Fit11121. Read the applicable instruction hierarchy and context routing.132. Map local equivalents before introducing preferred filenames.143. Use existing sources of truth and preserve repository conventions.154. Run **scaffold-harness** when the repository lacks a reliable baseline.165. Establish shared understanding for significant work. Use17 **grill-harness-with-docs** for unresolved material decisions in any topic.1819## Session Start2021First, take the **current** harness contract and pinned Skills. Do not skip22this because the task looks small.23241. Refresh the live harness: `git fetch` origin and read `HARNESS.md` from25 the origin default tip (`git show origin/<default>:HARNESS.md`) or the26 remote canonical file. Do not treat `./HARNESS.md` in a task worktree as27 current. Ff-only a clean primary when behind origin; if blocked, leave it.28 When this repository is a member of a multi-repo harness, read coordinator29 `SYNC.md` / `ORCHESTRATION.md` the same way.302. Confirm managed Skill copies match the consumer's **origin** pins before31 following a Skill. Read `SKILL.md` from that current copy.323. Then load only the additional sources the task needs:3334- agent instructions after the current harness contract35- the current human's preferred collaboration language from explicit or36 conversation evidence; ask once only if unclear, and keep personal preference37 in user-scoped or untracked state unless it is shared policy38- the active host and effective instruction, Skill, plugin, Rule, Hook, MCP,39 permission, model, and isolation precedence needed by the task40- relevant context map, domain context, status, ADRs, and recent learnings41- Skills triggered by the task42- the managed `write-a-skill` owner before Skill creation or revision, plus43 only the active host's native authoring adapter when needed44- actual Fast Check and Full Gates45- volatile model, pricing, platform, or Golden Path evidence only when the task46 depends on it4748Do not treat "read only what the task needs" as permission to skip harness49currency, maximum autonomy, or git-loop close-out. Do not re-derive50conventions already owned by an artifact.5152## Stewardship During Work5354Harness stewardship is part of every significant task. Notice repeated55friction, missing or stale context, weak feedback, unclear ownership,56unnecessary ceremony, and recurring workflows.5758Keep canonical artifacts agent-first and host-neutral. Human README and59reference material are legible projections, while thin host adapters reference60the owning instructions, context, state, and contracts. Communicate in the61human's preferred language; keep persistent repository artifacts in US English62unless a named artifact is explicitly requested otherwise.6364Follow the repository's owned voice or style guide. Without one, keep prose65direct and concrete: lead with the problem or working model, name trade-offs66and system effects, and remove generic hype, defensive setup, and text that67changes no decision or action.68Reserve first person for artifacts that explicitly speak for the repository69owner. Keep agent instructions and operating procedures neutral and imperative.7071Diagnose before changing. Update the smallest owning artifact when evidence72justifies a reversible in-scope improvement. Leave the harness unchanged when73no durable signal exists.7475When a recurring bounded workflow has a justified human-on-the-loop target,76make the smallest missing promotion gate part of each qualifying run. Keep the77promotion index in the target's existing workflow-state owner and link each78authoritative check, review, audit, incident, and outcome record. A run that79changes a gate cannot certify itself: require fresh-context critique and a80negative proof for the failure that gate owns. Once the evidence covers81repeated runs in one declared class, its variability and meaningful failure82modes, recovery, observability, outcomes, and veto, present the accountable83human one immediate promote-or-hold decision.8485Route a repeated missing-stack failure through `update-harness`: reuse an86existing project, private, public, bundled, or plugin profile, or pilot an87approved current public candidate first. Use `write-a-skill` for the smallest88project-local profile only when repeated work supplies real examples and89checks. One-off stack work stays direct work.9091Do not return an authorized routine decision to the human as a confirmation92question. Close it through the repository policy and available evidence, or93escalate a named conflict, authority gap, or material risk.9495Before claiming done, ask and answer in the same loop:96971. **Manifest here?** Does this evidence belong in the current repository98 harness owner (`HARNESS.md`, `AGENTS.md`, checks, Hook, Skill, STATUS,99 LEARNINGS)? Prefer a hard adaptation when the same mistake would recur.1002. **Port within your authority?** After every harness change, decide in the101 same loop whether a generalized portable variant belongs in a catalog you102 own or are authorized to change. If yes, update that owner without waiting103 for a separate prompt - typically that catalog's `scaffold-harness`104 templates or this Skill. Do not push, open a pull request, or otherwise105 write back to an external public upstream you only consume - including106 `https://github.com/ldaume/agentic-engineering-harness` - unless you are107 that upstream's maintainer with explicit write authority for this change.108 Explicit no-port is valid when the change is target-private or when you109 have no owned shared catalog - harden locally instead; still never write110 back to a foreign public upstream. Ask only when placement is ambiguous or111 a port would leak private authority.1123. **Fan-out live members?** If a coordinator `SYNC.md` fan-out checklist113 applies: pointer-only policy needs no sibling edits; discovery/snippet114 changes refresh every listed member Private system section, including115 experiments, and must pass Full Gates. Parent sessions own fan-out after116 subagents.1174. **Siblings in view?** On coordinator work, keep `CONTEXT-MAP.md` aligned118 with repo-like siblings; admit or graduate via the coordinator admit119 checklist. Unlisted siblings are a verify failure.1205. After a change that alters purpose, membership, sync, autonomy, working-root121 rules, git hygiene, or the harness cycle: does the human `README.md` still122 teach a new reader the current human and agent roles by product phase and123 operating level, technical controls, engineering method, rationale, and124 evidence needed for wider delegation?125126## Event-Triggered Review Loops127128Run only loops that can change the next action:1291301. **Work review:** self-review significant changes and run deterministic checks.1312. **Independent review:** use a fresh-context agent for every resolved132 material decision or change, including public methods and Skill semantics.133 Give it the shared-understanding frame, authoritative sources, diff or134 proposal, checks, and non-goals. Use an installed upstream `code-review`135 Skill when it owns the review procedure. Run the selected review directly;136 do not ask the human whether to spawn a reviewer.1373. **Harness review:** assess ownership, duplication, effectiveness, blast138 radius, and removal after harness friction or change.1394. **Currentness review:** use140 [`../scaffold-harness/CURRENTNESS.md`](../scaffold-harness/CURRENTNESS.md)141 when volatile model, cost, feature, tool, or community evidence affects a142 decision or an active adapter no longer matches observed host behavior.143 Keep stable task tiers separate from replaceable provider models. A new,144 deprecated, unavailable, repriced, or behaviorally changed model triggers a145 representative candidate evaluation and an update to every affected active146 host adapter - Codex, Claude Code, Cursor, Gemini CLI, Pi, SDK, CI, or a later147 host - rather than a Codex-only rename. Expired evidence is stale but148 triggers research only when consumed. The result may keep, change, remove,149 supersede, or rebuild the affected harness owner.1505. **Capability gate:** use151 [`../scaffold-harness/CAPABILITY-GATES.md`](../scaffold-harness/CAPABILITY-GATES.md)152 when sessions lose continuity, re-explore code wastefully, flood context,153 miss cross-repo relationships, or tempt a new memory/graph/compression154 product. Prefer Git owners first; add tools only for an observed failure155 mode with authority, scope, pilot, and exit path.1566. **Autonomy review:** require controls, independent critique, and the157 applicable human decision before increasing delegation or oversight mode.158 Promote only the evidenced change or risk class. After a scope breach,159 unobservable failure, failed recovery, or unresolved material decision,160 immediately return it to human-in-the-loop, record the hold reason, and161 reset its evidence before any new promotion run.1627. **Dependency bot PR:** when Renovate (or similar) opens an update PR, inspect163 the version jump for this repo's usage, run Fast Check / Full Gates (plus164 feature smoke if runtime behavior is touched), and merge only with safety165 evidence. If not merging, comment with rationale and unblock criteria - never166 silent-merge or silent-ignore. See harness **Dependency bot PRs**.167168Every loop ends with keep, change, remove, supersede, rebuild, or explicitly no169action.170Do not create review artifacts when the result is transient and changes no171future behavior.172173## Route Durable Evidence174175| Signal | Owning mechanism |176|---|---|177| New or changed commands, scope, permissions | Agent instructions |178| Domain term or invariant | Domain context |179| Source, context, or repository relationship | Context map |180| Harness oversight or evolution rule | Harness contract |181| Portable harness default for future scaffolds | Catalog you own or are authorized to change (`scaffold-harness` templates and/or this Skill there); never a foreign public upstream you only consume |182| Live member discovery / snippet fan-out | Coordinator `SYNC.md` + `MEMBER-AGENTS-SNIPPET.md` |183| Git working-tree start/finish hygiene (branch gate, worktree default, ordinary names, leases, cross-agent non-interference) | Harness contract (Git Working Tree Hygiene); ADR when accepted |184| Dependency-bot PR merge or defer | Harness contract (Dependency bot PRs) + PR comment |185| Repeated model, worker, budget, or review routing | Orchestration policy |186| Current workflow or engagement state | Status document |187| Accepted consequential trade-off | ADR |188| Repeated probabilistic workflow | Skill |189| Portable Skill authoring behavior | Managed public `write-a-skill`; native host creator stays an adapter |190| Scoped behavioral guidance | Rule or agent instruction |191| Deterministic event or enforcement | Hook, CI, test, platform control |192| Portable public method or default | Public Skill or scaffold upstream only when you maintain that upstream; otherwise keep the method local or in your owned catalog |193| Shared non-public organization or team procedure | Private Skill catalog |194| Durable evidence-backed observation | Learning log in the owning repository |195| Cross-repository membership, contracts, coordinator policy | Coordinating repository owners (map, harness, learnings) |196| Member-local product or ops observation | That member's owners; create `LEARNINGS.md` lazily |197| Human understanding of purpose, cycle, or where to work | Human `README.md` in the owning or coordinating repo |198199Route a lesson once by audience and authority. Portable practice belongs in a200catalog you own or are authorized to change; do not write it back to a foreign201public upstream you only consume. Shared confidential procedure belongs in the202private catalog; cross-repository relationship or policy belongs in the203coordinator; product, domain, service, or sensitive truth belongs in its local204owner. Reference that owner from consumers instead of copying the lesson.205206Prefer a hard adaptation of the owning artifact when the lesson is a rule.207Use a learning entry when evidence should survive sessions but is not yet208stable enough to hard-code. Do not copy the same learning into every consumer.209210Reference the owner instead of copying its content into consumers.211212## Verification2132141. Run the smallest relevant checks for changed artifacts.2152. Verify referenced local paths and commands.2163. Review the diff for duplicated, stale, speculative, or unowned layers.2174. Consolidate or supersede prior learnings instead of appending duplicates.2185. State what changed, why, and the next re-check condition.2196. Close the git integration loop for this session's ready work: commit and220 push when authorized; when repository policy makes merge the default (or221 otherwise authorizes it) and this session opened a PR/MR with green222 required checks and no conflicts, merge it through the normal path before223 claiming done. Leave the host workspace on local default matching remote224 and remove only this session's worktrees. If policy disallows merge, record a named blocker instead.225 Do not leave mergeable session-owned PRs for a human reminder when merge226 is authorized. Do not force-merge past red required checks or over foreign227 WIP.228229For volatile decisions, confirm the source, check date, live environment, and230expiry or event trigger. Re-run representative evals before routing a task231class to a cheaper worker.232233## Do Not Persist234235- one-off debugging and ticket chatter236- raw chat or temporary task state237- rules already enforced by a native config or deterministic control238- unverified product, architecture, ownership, or security assumptions239- a new artifact without an observed problem and owner240241The sync is complete when durable evidence is routed, relevant checks pass,242uncertainty is explicit, authorized session-owned ready PRs/MRs are merged or243a named blocker is recorded (including policy-disallowed merge), and no244further harness change is justified by the current work.