← Alkalmazásépítő alapok csapata adatlapja

Skill · 1.0.0 verzió

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ó csapattagok

Nézd meg, miben segít

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.

Részletek…Ö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:

  1. License is permissive: The source project is explicitly licensed under MIT, ISC, BSD-2-Clause, BSD-3-Clause, 0BSD, or Apache-2.0. (Never copy code from unlicensed, GPL/AGPL, or proprietary repos.)
  2. 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).
  3. 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

  1. Verify license and NOTICE requirements:
    • Read the upstream LICENSE and NOTICE files at the exact commit being adapted.
    • For Apache-2.0, check whether a NOTICE file exists and preserve its required attributions alongside the license terms.
  2. 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).
  3. 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