upstream-contribute
When to use
- A new skill was created in a project that should be shared across all projects
- A rule or skill improvement was discovered that benefits all consumers
- A bug was found in a shared skill, rule, or command
- The
learning-to-rule-or-skillskill identified something worth upstreaming - An override was created locally and should become the new default
- A project-specific skill/rule could be generalized to benefit all consumers
- The
upstream-proposalrule suggested a contribution and user agreed
Do NOT use when:
- The user has NOT given explicit consent — this is the #1 rule
- The content already exists in the shared package
- The learning is truly one-off and cannot be generalized
Goal
Decide whether a learning, skill, rule, or fix from a consumer project is worth
contributing back to the shared agent-config package — and hand the ones that
are to the single outward step, which owns everything that leaves the machine.
One way out
THIS SKILL NEVER PUSHES, NEVER OPENS A PULL REQUEST, AND NEVER WRITES
A SECOND, HAND-CONDENSED COPY OF AN ARTIFACT.
EVERY BYTE THAT LEAVES — BRANCH NAME, COMMIT IDENTITY, COMMIT MESSAGE,
DIFF, TITLE, BODY — LEAVES THROUGH `self-repair:release`.
THE COMMIT IDENTITY IS NOREPLY BY CONSTRUCTION; THE REST IS SCANNED FOR
CREDENTIALS AND THE CONSUMER'S OWN NAMES ONLY. A NAME IN THE DIFF OUTSIDE
THOSE PASSES, AND SAYING SO IS THE POINT: AN UNSCANNED BYTE A READER
BELIEVES WAS SCANNED IS THE WORSE STATE.
A SECOND ROUTE WOULD BE A SECOND SET OF GUARANTEES.
self-repair:release carries the privacy floor over the record text, a
payload floor over every object it pushes, the may-not-modify deny list, the
route ladder (pull request, then issue, then a local record) and an approval
bound to the digest of the exact bytes. The per-turn Hard-Floor word is the
person's: they run --approve <digest> themselves. A checkbox in a skill
carries none of them, which is why this skill asks a worth it question and
nothing else.
It pushes one commit built on origin/main from the branch's net change, as
the account's noreply identity. The floor reads credentials and the consumer's
identifiers; a finding skips the push.
Core principles
- Consent first — NEVER create a PR, branch, or any upstream action without explicit user approval
- Universality first — the contribution must work for ALL consumers, not just one project
- Generalize when possible — project-specific content CAN become universal with adaptation
- Evidence-based — meets
docs/contracts/retro-v1.md§ Evidence threshold - One source — an artifact is authored in
src/only; projections are regenerated, never hand-written - The floor is a check, not a tick — a privacy judgement a human ticks is not a privacy check, and today it sees credentials and consumer names only
- Local benefit immediately — use override for instant project benefit while the contribution is pending
A repeated override is a signal, and a signal is not evidence
THE SAME ARTIFACT OVERRIDDEN IN INDEPENDENT INSTALLS IS THE CHEAPEST AVAILABLE
HINT THAT A SHIPPED DEFAULT IS WRONG. IT IS A HINT.
NEVER CHANGE A SHIPPED DEFAULT ON OVERRIDES FROM ONE ORGANISATION.
INDEPENDENT MEANS DIFFERENT TEAMS, NOT DIFFERENT DIRECTORIES.
agent-config doctor --check override-set reports which shipped artifacts a
tree overrides and in how many layers. Two same-culture installs overriding the
same artifact is n=2 from one toolchain culture, which is a discovery
channel and not a mandate — and the temptation to "just fix the default, we
already know" is exactly how a general package becomes one organisation's house
style.
What makes an aggregate admissible (package row of retro-v1.md):
- overrides from independently operated consumers, not several repositories
of one team;
- the overriding change converging on the same substance, not merely
touching the same filename — two teams deleting different halves of a rule
are not agreeing about anything;
- a named public mechanism that explains why the shipped default is wrong,
rather than "several people changed it".
Below that bar, the signal is one input to a future aggregate and nothing more.
Record it and leave the default alone.
The signal carries no consumer content, by construction. Artifact kind, name
and a layer count — the type has no field that can hold a path, a diff or
anything from the tree, so privacy is the schema's shape rather than a scrubbing
pass that could fail. Never widen it to make a proposal more persuasive; a
proposal that needs the consumer's diff is a proposal that has not cleared the
bar.
Package repository
The shared agent-config package lives at:
git@github.com:event4u-app/agent-config.git
GitHub: https://github.com/event4u-app/agent-config
Procedure
0. Mandatory consent gate
This step is NON-NEGOTIABLE. No exceptions.
Before ANY upstream work, ask the user:
> This [skill/rule/guideline] could improve the shared agent-config package.
> [Brief explanation of what would be contributed and why it's valuable]
>
> 1. Yes — hand it to the upstream step
> 2. No — keep it project-local only
- If user picks 2 — STOP. Do not mention upstream again for this item.
- If user picks 1 — continue with the procedure below.
- NEVER skip this step, even if the user previously agreed to other contributions.
Consent here authorizes the preparation. The send is a separate, per-turn
word in step 6 and this gate never substitutes for it.
1. Determine contribution type
src/ is the only place an artifact is authored. ADR-201 copies every .md
verbatim into the projections, so there is no second version to write and no
condensation ratio to hit.
| Type | Source path |
|---|---|
| New skill | src/skills/{name}/SKILL.md |
| New rule | src/rules/{name}.md |
| New command | src/domains/{domain}/{name}/command.md |
| New guideline | docs/guidelines/{category}/{name}.md |
| Update to existing | Same path as original |
2. Apply locally as override (immediate benefit)
Create an override so the project benefits immediately:
agents/overrides/{type}/{name}.md
With frontmatter:
---
overrides: {type}/{name}
mode: replace # or extend
---
Optional for a low-urgency change.
2b. Generalize project-specific content (if needed)
If the content is project-specific but could be made universal:
- Identify project-specific parts — domain names, local paths, project conventions
- Abstract them — replace with generic patterns, configurable values, or examples
- Show the user the diff — original vs. generalized version
- Get approval — user must confirm the generalized version is correct
Example: A project-specific "import-csv" skill becomes a generic "file-import"
skill with a configurable format.
Generalizing is an editorial act and it is not the privacy floor. What the
floor refuses in step 4 stays local; it is never rewritten into shape.
3. Proposal gate — MANDATORY when a proposal doc exists
If the contribution originates from a proposal under agents/proposals/
(produced by learning-to-rule-or-skill via the pipeline in