GitHub 火線榜

GitHub 火線榜 · 倉庫檔案

ant-intl/Code2Skill

Grounded synthesis of reusable procedural skills from source code (簡介來自倉庫自身文件。)

資料截至 October 22ant-intl

最好成績

#27

被忽視榜 · 活躍卻無人問津

100

累計 Star

16

Fork 總數

1

近 30 天在榜天數

專案狀態授權條款: 未知最近 push: 未知Open Issues(含 PR): 未知

自 2026-10-25 起採集;未知 = 尚未採集到

把上榜徽章放進你的 README · ant-intl/Code2Skill[![把上榜徽章放進你的 README](https://git.vaiox.xyz/api/badge/ant-intl/Code2Skill.svg)](https://git.vaiox.xyz/zh-TW/repo/ant-intl/Code2Skill)
<a href="https://git.vaiox.xyz/zh-TW/repo/ant-intl/Code2Skill"><img src="https://git.vaiox.xyz/api/badge/ant-intl/Code2Skill.svg" alt="把上榜徽章放進你的 README" height="20"></a>

專案文件

Code2Skill

Code2Skill turns source-code units into grounded, reusable procedural skill records. It extracts a structured skill, challenges that abstraction through source-body-blind code regeneration, checks the regenerated behavior against the source, and retains accepted records with provenance and retrieval-facing metadata.

This repository is a publication-oriented implementation aligned with the paper Grounded Skill Synthesis from Code at Scale for Agentic Intelligence (arXiv).

Pipeline

  1. Source-unit tagging scores parsed functions, methods, command entry points, and file-level components for reusable procedural evidence.
  2. Skill extraction emits one typed record: atomic, composite, or pattern.
  3. Source-body-blind regeneration receives the skill and interface, but not the source body, repository name, or file path.
  4. Source-aware equivalence judgment compares source and regenerated code.
  5. Adjudication separates an unsupported skill from a failed regeneration.
  6. Feature tagging creates one retrieval record per accepted skill using closed vocabularies.
  7. Purpose indexing deterministically removes low-value records, groups records by (task_family, intent_action, intent_target), and selects an existing representative for each group.

The judge is an LLM consistency check, not a proof of program equivalence.

Install

python3 -m venv .venv
. .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e .

The runtime has no third-party Python dependency. It calls an OpenAI-compatible /chat/completions endpoint through the standard library. It has no telemetry and does not upload repository content anywhere except the model endpoint explicitly configured for a run.

Run against a model endpoint

cp .env.example .env
# Fill the two values in .env, then load them into the current shell.
set -a
. ./.env
set +a

code2skill run /path/to/repository \
  --base-url "$CODE2SKILL_MODEL_BASE_URL" \
  --model your-model-name \
  --output-dir runs

Public model hosts are rejected by default. Add --allow-public-model-url only when the endpoint is intentionally trusted.

To inspect the model-visible messages without making a model call:

code2skill show-prompts --stage regeneration

To build a new purpose index from accepted-record JSONL:

code2skill purpose-index accepted_records.jsonl purpose_index.jsonl

Offline end-to-end example

The deterministic example client exercises every stage without network access:

PYTHONPATH=src python examples/offline_demo.py

It writes a complete run under examples/output/, including decisions, accepted records, retrieval records, prompt/response traces, and a purpose index.

Output contract

Each run directory contains:

manifest.json
summary.json
source_units.jsonl
decisions.jsonl
accepted_records.jsonl
rejected_records.jsonl
retrieval_records.jsonl
purpose_index.jsonl
purpose_edges.jsonl
traces/<data_id>/<stage>.json

accepted_stage is equivalence for direct accepts and adjudication for adjudicated accepts. In the latter case, the skill is retained but the failed regenerated code is not an accepted artifact.

See docs/methodology.md for the paper-to-code mapping, docs/data-contract.md for schemas, and docs/open-source-checklist.md for publication gates.

Resources

Development

PYTHONPATH=src python -m unittest discover -s tests -v
python -m compileall -q src tests examples

Release status

This is a pre-release codebase. An organization-approved open-source license, public repository URL, archival DOI, and final paper identifier must be added before publication. No license is implied by the current local repository.

當前上榜

  • 27

    被忽視榜 · 活躍卻無人問津

    100 星 · 16 fork · 累計星星(升冪)

    被忽視 →

近 30 天勢頭

累計 Star 走勢

名次走勢

← 回到榜單