GitHub Hot Board

GitHub Hot Board · Arquivo do repositório

ant-intl/Code2Skill

Grounded synthesis of reusable procedural skills from source code (Esta descrição vem do próprio repositório.)

Dados de October 22ant-intl

Melhor colocação

#27

Gemas ignoradas

100

Total de estrelas

16

Total de forks

1

Dias nos rankings (30 d)

Estado do projetoLicença: desconhecidoÚltimo push: desconhecidoIssues abertos (PR incl.): desconhecido

Coletado desde 2026-10-25; desconhecido = ainda não coletado

Coloque o emblema no seu README · ant-intl/Code2Skill[![Coloque o emblema no seu README](https://git.vaiox.xyz/api/badge/ant-intl/Code2Skill.svg)](https://git.vaiox.xyz/pt/repo/ant-intl/Code2Skill)
<a href="https://git.vaiox.xyz/pt/repo/ant-intl/Code2Skill"><img src="https://git.vaiox.xyz/api/badge/ant-intl/Code2Skill.svg" alt="Coloque o emblema no seu README" height="20"></a>

Documentação do projeto

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.

Colocações atuais

  • 27

    Gemas ignoradas

    100 estrelas · 16 fork · Star acumuladas (crescente)

    Ignoradas →

Evolução em 30 dias

Estrelas acumuladas

Evolução da posição

← Voltar aos rankings