← Dokumentumkezelés · projekttervezési csomag adatlapja
Nézd meg, miben segít
Nyílt forrású kód átvétele forrásjelöléssel
Kis, stabil algoritmust illeszt be ellenőrzött megengedő licenc és indokolt függőségcsökkentés mellett.
oss-code-adaptation-attribution
Ezt a skillt használó ügynökök
Mikor hasznos?
Akkor használd, ha nagy csomagból egyetlen önálló függvényre van szükséged.
Miben segít neked?
- Ellenőrzi a pontos licencet, értesítéseket és módosítási kötelezettségeket.
- Rögzíti a forrásverziót, eredeti szerzőséget és helyi változtatást.
- Megtartja a teszteket, kerüli a folyamatos biztonsági javítást igénylő másolást.
Például ezt kérheted
Értékeld e gráfbeli köröket felismerő algoritmus átvételét forrásjelöléssel, kötelező értesítésekkel és működési tesztekkel. Az átvett modul mellett őrizd az eredeti verziót és közleményeket. Ciklikus és körmentes gráfot tesztelj, és írd le a szándékos eltéréseket.
Részletes dokumentáció
Itt a skill eredeti útmutatóját, példáit és ellenőrzési szempontjait olvashatod az eredeti nyelven.
Összecsukás
Open-Source Code Adaptation & Attribution
Sometimes a 15,000-line open-source package contains one 120-line algorithm (e.g., a graph cycle detector, fuzzy matcher, token estimator, or retry backoff scheduler) that is exactly what we need, while the rest of the package brings 40 transitive dependencies and incompatible framework assumptions.
When to Adapt / Vendor Instead of Installing
Recommend adapting a focused subset when all of the following hold:
- License is permissive: The source project is explicitly licensed under
MIT,ISC,BSD-2-Clause,BSD-3-Clause,0BSD, orApache-2.0. (Never copy code from unlicensed, GPL/AGPL, or proprietary repos.) - The target logic is self-contained and stable: The algorithm has clear inputs/outputs and does not require ongoing security patches (unlike TLS, auth, or HTML sanitizers, which should remain managed dependencies).
- Adapting eliminates disproportionate baggage: Extracting 100–300 lines avoids pulling in heavy transitive trees, native build steps, or CommonJS/ESM conflicts.
Workflow for Clean, Compliant Adaptation
- Verify license and
NOTICErequirements:- Read the upstream
LICENSEandNOTICEfiles at the exact commit being adapted. - For
Apache-2.0, check whether aNOTICEfile exists and preserve its required attributions alongside the license terms.
- Read the upstream
- Record explicit provenance in the file header:
- Place a clear header comment at the top of the adapted file containing:
- Upstream repository name and URL.
- Exact version tag and commit SHA (
Adapted from owner/repo@<commit-sha> (path/to/file)). - Original copyright notice and license identifier (
SPDX-License-Identifier: MIT). - A brief note summarizing what was modified for our codebase (e.g., converted to strict TypeScript, removed Node-specific fs calls).
- Place a clear header comment at the top of the adapted file containing:
- Port and strengthen tests:
- Port the relevant unit test cases and edge-case fixtures from the upstream repository into our test suite so the adapted logic is verified to the same or higher standard.
Csomagban lévő fájlok 1
SKILL.md
