AGENT SKILL

coderos-source-adaptation-importer

Operate the Source Adaptation + Skill Import Core v1 module to turn locally mined Markdown skill/workflow material into reviewed candidate records, never vendoring upstream projects or activating anything automatically.

License 许可
MIT
最近更新
2026-10-07
Stars
★ 1
Forks
0

01 前言 Front Matter

name
coderos-source-adaptation-importer
description
Operate the Source Adaptation + Skill Import Core v1 module to turn locally mined Markdown skill/workflow material into reviewed candidate records, never vendoring upstream projects or activating anything automatically.

03 SKILL.md 正文

CoderOS Source Adaptation Importer

This skill defines your role when running or reviewing output from repo_dev_runtime.source_adaptation_skill_import. Your job is to turn a local directory of operator-mined Markdown skill/workflow documents into a reviewed candidate report, and to correctly interpret that report -- not to vendor, activate, or install anything.

1. Role Boundaries

  • This module reads local files only. Never pass a URL to --input; the module rejects it, but you should not attempt it either.
  • Never follow a symlink into a scan. If the operator's mined material includes a symlink, ask them to resolve it to a real file first.
  • This module never activates a skill. Every candidate it produces has planning_only: true and activation_allowed: false. Do not treat a import_candidate decision as permission to add anything to SkillRegistry, PersonaRegistry, .agents/skills/, or any other live location.

2. Running a Scan

python -m repo_dev_runtime.source_adaptation_skill_import_cli scan \
    --input <local_dir_of_mined_markdown> \
    --output <report_dir> \
    --project-id <matches a source_id in docs/SOURCE_ADAPTATION_CATALOG.md when applicable> \
    --license-status {confirmed,unknown,incompatible} \
    --generated-at <iso-8601 timestamp>

Only set --license-status confirmed if a human has actually read the upstream project's LICENSE file and confirmed it is compatible. Default to unknown when in doubt -- this defers candidates for review instead of silently treating them as safe to copy.

3. Reading a Report

For every candidate, check in this order:

  1. decision == "reject" -- a blocking safety pattern was found (risk_findings lists which). Do not investigate further; this candidate is not adoptable in its current form.
  2. decision == "defer" -- license status is not confirmed. The pattern itself may be fine, but do not proceed until a human confirms the upstream license.
  3. decision in ("import_candidate", "emulate_candidate") -- no blocking pattern, license confirmed. This is a candidate worth a human reading in full, not an approval. import_candidate (mode copy_pattern) means the document is simple enough that bounded verbatim reuse might be appropriate after review; emulate_candidate (mode emulate) means only the structural pattern should be reimplemented, not the text.

Render a saved report as Markdown with:

python -m repo_dev_runtime.source_adaptation_skill_import_cli render --report <path.json>

4. Recording a Human Decision

Use record_decision() (importable from repo_dev_runtime.source_adaptation_skill_import) to write an explicit, append-only reviewer decision over one candidate. It can only confirm or narrow the classifier's own decision -- attempting to widen a reject or defer into an import_candidate raises an error by design. If you believe a classifier reject is wrong, fix the underlying document and re-scan; do not try to override the decision record.

5. What Happens After a Decision

Nothing, automatically. A recorded SourceAdaptationDecision is not consumed by any activation pipeline in this PR. If a candidate is judged genuinely worth adopting, the next step is a separate, already-existing, separately gated pipeline: repo_dev_runtime.skills.pack_metadata.build_skill_pack_manifest_from_markdown_files followed by repo_dev_runtime.skill_pack_candidates. Do not skip that pipeline's own review gates just because this module already produced a favorable classification.

6. "Exceptional Human Input Only" Triggers

Halt and escalate if:

  • A scanned document's risk_findings include credential_access and the evidence snippet looks like it contains an actual live secret value (not just a keyword) -- do not paste that snippet anywhere.
  • The operator asks you to set --license-status confirmed without having read the actual upstream LICENSE file.
  • The operator asks you to import a candidate directly into .agents/skills/ or any registry, bypassing the separate skill-pack review pipeline described in §5.

04 同仓库更多 Skills