Upstream First
Determine ownership before implementation. Prefer the highest viable option in
the decision hierarchy, but do not force work upstream when policy, scope,
security, confidentiality, timing, or maintenance makes that irresponsible.
Workflow
1. Capture intent and constraints
Record:
- requested outcome and affected people;
- platform, ecosystem, versions, and deployment;
- deadline and reason for urgency;
- contract, confidentiality, security, legal, and policy constraints;
- functional and non-functional requirements;
- available maintainer and contributor capacity.
Ask only for missing information that can change the decision. Mark assumptions.
2. Discover controlling policy
Inspect installed dependencies and the receiving project's current policies
before recommending implementation or external interaction.
Check contribution, governance, security, support, licensing, accessibility,
release, and AI rules. If project policy is complex or ambiguous, read
project-policy.md.
Apply receiving-project policy before this skill's defaults. Stop and ask when
authority or permission is unclear.
3. Classify the issue
Classify three dimensions separately:
- Nature: bug, feature, design question, security issue, accessibility
defect, maintenance, support, or instance issue.
- Ownership: instance, integration, dependency, or ecosystem.
- Disposition: configure, report, contribute, extend, create, work around,
implement locally, or stop.
Use a minimal clean reproduction where practical. Do not publish confidential
data. Read classification.md for edge cases.
Treat the classification as provisional until the responsible project confirms
it.
If the nature is a suspected security vulnerability, stop the public
contribution path and hand off to responsible-security-disclosure. Do not
create a public reproduction, issue, branch, fork, or pull request.
4. Evaluate options in order
Evaluate:
- Use a suitable installed capability.
- Use an existing public API or extension point.
- Adopt a suitable maintained open-source package.
- Contribute a focused improvement to an existing project.
- Create a reusable open-source package with credible ownership.
- Implement locally with a written justification.
For each option, record evidence, fit, gaps, maintenance, compatibility,
community health, migration cost, and quality-gate results.
Do not use popularity or an arbitrary percentage as proof of suitability.
Reject a higher-ranked option when its material gaps or risks make it
unacceptable.
5. Select the engagement path
When upstream work is viable, choose the lowest-friction path permitted by the
receiving project:
- direct pull request for narrow, reproducible, low-risk work;
- issue first when ownership, expected behaviour, impact, or approach is
uncertain;
- design proposal first for public APIs, architecture, data models,
dependencies, interoperability, governance, or standards;
- confidential reporting for suspected vulnerabilities;
- downstream ownership for confirmed instance-specific needs;
- break-glass workaround for urgent mitigation.
Read contribution-pathways.md. A change
label such as accessibility or documentation does not determine risk by itself.
6. Apply gates
Assess:
- accessibility and affected users;
- security boundaries, input handling, and vulnerability disclosure;
- privacy, personal data, confidentiality, and retention;
- license compatibility, copyright, and provenance;
- sustainability, dependency cost, compute, polling, bundle size, queries, and
maintainer burden;
- open-standard compatibility and exact versions where claims depend on them.
Read quality-gates.md when any gate is material.
7. Choose and justify
Choose the highest viable option. If choosing local code, state why every
higher option is unsuitable.
For an urgent temporary workaround, follow
break-glass.md. Require a structured debt record,
an upstream reference or documented exception, a downstream owner, risk-based
review date, supported versions, removal condition, migration, and rollback.
Use restricted records for embargoed security mitigations.
For CI design, read automation.md. Apply the
portable debt checks directly and implement repository-specific duplication,
hardcoding, token, query, or bundle checks with the receiving project's native
linters.
8. Produce the decision record
Use decision-record.md. Include:
- discovery summary;
- issue, ownership, and disposition classifications;
- selected engagement path;
- options 1 through 6 with evidence;
- gate findings;
- recommendation and confidence;
- upstream or local follow-up;
- unresolved questions;
- human approval required before external action.
If an upstream contribution is viable, hand off to
maintainer-ready-contribution. If the issue may be a vulnerability, hand off
to responsible-security-disclosure instead. If AI materially assisted the
work, run ai-contribution-review before submission when the receiving
project permits that use.
Guardrails
- Do not open, comment on, assign, label, or submit external work without human
approval.
- Do not treat a new open-source package as free maintenance.
- Do not claim that filing an issue eliminates downstream responsibility.
- Do not bypass accessibility, security, privacy, or license requirements for
schedule reasons.
- Do not expose suspected vulnerabilities publicly.
- Do not automatically create an upstream issue, pull request, or security
report.
- Do not use AI where the receiving project prohibits the relevant use.
Completion check
Complete only when:
- controlling policies were checked or their absence recorded;
- issue nature, ownership, and disposition are separate;
- every option in the hierarchy has a reasoned result;
- the engagement path follows receiving-project policy and change risk;
- all quality gates are explicit;
- temporary divergence has an expiry path;
- external action remains subject to human approval.
1---2name: upstream-first-23description: Decide the responsible home and implementation path for requested software, documentation, standards, accessibility, integration, or dependency changes. Use before building a custom module, script, package, integration, workaround, Drupal change, npm/PyPI/Packagist dependency change, or local fix, and when deciding whether work belongs in an installed capability, upstream project, extension, new reusable project, or local implementation.4---56# Upstream First78Determine ownership before implementation. Prefer the highest viable option in9the decision hierarchy, but do not force work upstream when policy, scope,10security, confidentiality, timing, or maintenance makes that irresponsible.1112## Workflow1314### 1. Capture intent and constraints1516Record:1718- requested outcome and affected people;19- platform, ecosystem, versions, and deployment;20- deadline and reason for urgency;21- contract, confidentiality, security, legal, and policy constraints;22- functional and non-functional requirements;23- available maintainer and contributor capacity.2425Ask only for missing information that can change the decision. Mark assumptions.2627### 2. Discover controlling policy2829Inspect installed dependencies and the receiving project's current policies30before recommending implementation or external interaction.3132Check contribution, governance, security, support, licensing, accessibility,33release, and AI rules. If project policy is complex or ambiguous, read34[project-policy.md](references/project-policy.md).3536Apply receiving-project policy before this skill's defaults. Stop and ask when37authority or permission is unclear.3839### 3. Classify the issue4041Classify three dimensions separately:42431. **Nature:** bug, feature, design question, security issue, accessibility44 defect, maintenance, support, or instance issue.452. **Ownership:** instance, integration, dependency, or ecosystem.463. **Disposition:** configure, report, contribute, extend, create, work around,47 implement locally, or stop.4849Use a minimal clean reproduction where practical. Do not publish confidential50data. Read [classification.md](references/classification.md) for edge cases.5152Treat the classification as provisional until the responsible project confirms53it.5455If the nature is a suspected security vulnerability, stop the public56contribution path and hand off to `responsible-security-disclosure`. Do not57create a public reproduction, issue, branch, fork, or pull request.5859### 4. Evaluate options in order6061Evaluate:62631. Use a suitable installed capability.642. Use an existing public API or extension point.653. Adopt a suitable maintained open-source package.664. Contribute a focused improvement to an existing project.675. Create a reusable open-source package with credible ownership.686. Implement locally with a written justification.6970For each option, record evidence, fit, gaps, maintenance, compatibility,71community health, migration cost, and quality-gate results.7273Do not use popularity or an arbitrary percentage as proof of suitability.74Reject a higher-ranked option when its material gaps or risks make it75unacceptable.7677### 5. Select the engagement path7879When upstream work is viable, choose the lowest-friction path permitted by the80receiving project:8182- direct pull request for narrow, reproducible, low-risk work;83- issue first when ownership, expected behaviour, impact, or approach is84 uncertain;85- design proposal first for public APIs, architecture, data models,86 dependencies, interoperability, governance, or standards;87- confidential reporting for suspected vulnerabilities;88- downstream ownership for confirmed instance-specific needs;89- break-glass workaround for urgent mitigation.9091Read [contribution-pathways.md](references/contribution-pathways.md). A change92label such as accessibility or documentation does not determine risk by itself.9394### 6. Apply gates9596Assess:9798- accessibility and affected users;99- security boundaries, input handling, and vulnerability disclosure;100- privacy, personal data, confidentiality, and retention;101- license compatibility, copyright, and provenance;102- sustainability, dependency cost, compute, polling, bundle size, queries, and103 maintainer burden;104- open-standard compatibility and exact versions where claims depend on them.105106Read [quality-gates.md](references/quality-gates.md) when any gate is material.107108### 7. Choose and justify109110Choose the highest viable option. If choosing local code, state why every111higher option is unsuitable.112113For an urgent temporary workaround, follow114[break-glass.md](references/break-glass.md). Require a structured debt record,115an upstream reference or documented exception, a downstream owner, risk-based116review date, supported versions, removal condition, migration, and rollback.117Use restricted records for embargoed security mitigations.118119For CI design, read [automation.md](references/automation.md). Apply the120portable debt checks directly and implement repository-specific duplication,121hardcoding, token, query, or bundle checks with the receiving project's native122linters.123124### 8. Produce the decision record125126Use [decision-record.md](assets/decision-record.md). Include:127128- discovery summary;129- issue, ownership, and disposition classifications;130- selected engagement path;131- options 1 through 6 with evidence;132- gate findings;133- recommendation and confidence;134- upstream or local follow-up;135- unresolved questions;136- human approval required before external action.137138If an upstream contribution is viable, hand off to139`maintainer-ready-contribution`. If the issue may be a vulnerability, hand off140to `responsible-security-disclosure` instead. If AI materially assisted the141work, run `ai-contribution-review` before submission when the receiving142project permits that use.143144## Guardrails145146- Do not open, comment on, assign, label, or submit external work without human147 approval.148- Do not treat a new open-source package as free maintenance.149- Do not claim that filing an issue eliminates downstream responsibility.150- Do not bypass accessibility, security, privacy, or license requirements for151 schedule reasons.152- Do not expose suspected vulnerabilities publicly.153- Do not automatically create an upstream issue, pull request, or security154 report.155- Do not use AI where the receiving project prohibits the relevant use.156157## Completion check158159Complete only when:160161- controlling policies were checked or their absence recorded;162- issue nature, ownership, and disposition are separate;163- every option in the hierarchy has a reasoned result;164- the engagement path follows receiving-project policy and change risk;165- all quality gates are explicit;166- temporary divergence has an expiry path;167- external action remains subject to human approval.