Merge PR #328: feat(skills): add research assistant skill suite
# Conflicts: # skills/gitlink-research-reproducibility/SKILL.md
This commit is contained in:
commit
8e449b2d7d
|
|
@ -29,5 +29,8 @@ jobs:
|
|||
- name: Test
|
||||
run: make test
|
||||
|
||||
- name: Validate research Skills
|
||||
run: make validate-research-skills
|
||||
|
||||
- name: Check formatting
|
||||
run: make fmt
|
||||
|
|
|
|||
|
|
@ -26,5 +26,8 @@ jobs:
|
|||
- name: Scan i18n key references
|
||||
run: go run ./internal/i18n/cmd/check --scan-code
|
||||
|
||||
- name: Validate research Skills
|
||||
run: python3 scripts/validate-research-skills.py
|
||||
|
||||
- name: Run Go tests
|
||||
run: go test ./...
|
||||
|
|
|
|||
7
Makefile
7
Makefile
|
|
@ -3,7 +3,7 @@ BINARY := gitlink-cli
|
|||
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
|
||||
LDFLAGS := -s -w -X '$(MODULE)/cmd.Version=$(VERSION)'
|
||||
|
||||
.PHONY: build install clean test check vet fmt cover lint
|
||||
.PHONY: build install clean test check vet fmt cover lint validate-research-skills
|
||||
|
||||
build:
|
||||
go build -ldflags "$(LDFLAGS)" -o $(BINARY) .
|
||||
|
|
@ -35,7 +35,10 @@ cover:
|
|||
lint:
|
||||
golangci-lint run ./...
|
||||
|
||||
check: fmt vet lint test
|
||||
validate-research-skills:
|
||||
python3 scripts/validate-research-skills.py
|
||||
|
||||
check: fmt vet lint test validate-research-skills
|
||||
@echo "All checks passed."
|
||||
|
||||
hooks:
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
# 科研 Skills 套件
|
||||
|
||||
本次新增 7 个面向 GitLink 科研仓库的只读 Agent Skills:
|
||||
|
||||
- `gitlink-research-reproducibility`:科研代码复现性清单和整改计划。
|
||||
- `gitlink-research-compliance`:许可证、安全策略、依赖和敏感文件风险审计。
|
||||
- `gitlink-research-progress-tracker`:科研项目周报和风险预警。
|
||||
- `gitlink-research-collaboration-map`:面向课题组的贡献者、Issue 和 PR 协作画像。
|
||||
- `gitlink-research-knowledge-graph`:基于关键词的科研生态调研和轻量知识图谱工作流。
|
||||
- `gitlink-research-data-provenance`:数据集来源、引用、许可证和隐私风险审计。
|
||||
- `gitlink-research-artifact-handbook`:面向答辩、交接和开源发布的科研成果手册生成。
|
||||
|
||||
这些 Skills 按独立 `gitlink-cli` Skill PR 交付物设计,不依赖外部项目代码,也可被端到端科研工作流组合调用。
|
||||
|
||||
验证方式:
|
||||
|
||||
```bash
|
||||
make validate-research-skills
|
||||
git diff --check
|
||||
```
|
||||
|
||||
真实 Agent 验证说明见 `docs/research-skills-agent-test-report.md`。
|
||||
|
|
@ -0,0 +1,147 @@
|
|||
# 科研 Skills Agent 测试报告
|
||||
|
||||
## 覆盖范围
|
||||
|
||||
本报告覆盖本次为 GitLink 竞赛新增的 7 个只读科研 Skills:
|
||||
|
||||
- `gitlink-research-reproducibility`
|
||||
- `gitlink-research-compliance`
|
||||
- `gitlink-research-progress-tracker`
|
||||
- `gitlink-research-collaboration-map`
|
||||
- `gitlink-research-knowledge-graph`
|
||||
- `gitlink-research-data-provenance`
|
||||
- `gitlink-research-artifact-handbook`
|
||||
|
||||
这些 Skills 均为独立的 `gitlink-cli` Agent Skills,不依赖外部项目代码,可作为独立 Skill PR 提交。
|
||||
|
||||
## 自动验证
|
||||
|
||||
执行:
|
||||
|
||||
```bash
|
||||
make validate-research-skills
|
||||
git diff --check
|
||||
```
|
||||
|
||||
验证脚本检查以下内容:
|
||||
|
||||
- 每个 Skill 的 `SKILL.md` 均具备合法 frontmatter、预期名称和可触发描述;
|
||||
- 每个 Skill 均要求 Agent 先读取 `gitlink-shared`;
|
||||
- 每个 Skill 默认只读,并要求使用 `gitlink-cli --format json`;
|
||||
- 每个 Skill 覆盖对应场景所需命令;
|
||||
- 每个 Skill 至少包含一个参考文件和一个示例文件;
|
||||
- 示例包含用户请求、Agent 步骤、预期回答和具体 `gitlink-cli` 命令;
|
||||
- `skills/README.md` 和 `doc/changes/research-skills-suite.md` 已索引全部 7 个 Skills。
|
||||
|
||||
## 离线 Agent 测试提示词
|
||||
|
||||
安装 Skills 后,可在 Claude Code、Cursor、Codex 或 OpenClaw 中使用以下提示词测试。
|
||||
|
||||
### 复现性审计
|
||||
|
||||
```text
|
||||
请使用 gitlink-research-reproducibility 审计 songhui18/ICCV2021,输出复现性评分、缺失项和前三个整改动作。不要向 GitLink 写回任何内容。
|
||||
```
|
||||
|
||||
预期行为:
|
||||
|
||||
- 读取 `gitlink-shared`;
|
||||
- 执行 `repo +info` 和 `repo +tree`,必要时回退到 `api GET /sub_entries`;
|
||||
- 标注命令数据来源;
|
||||
- 输出清单式报告。
|
||||
|
||||
### 合规预审
|
||||
|
||||
```text
|
||||
请使用 gitlink-research-compliance 检查 Gitconomy/Git4Research 的开源发布准备情况,报告许可证、SECURITY、CONTRIBUTING、依赖和敏感文件风险。
|
||||
```
|
||||
|
||||
预期行为:
|
||||
|
||||
- 执行只读文件树检查;
|
||||
- 避免打印敏感内容;
|
||||
- 说明输出是工程预检查,不构成法律意见。
|
||||
|
||||
### 进度跟踪
|
||||
|
||||
```text
|
||||
请使用 gitlink-research-progress-tracker 为 songhui18/ICCV2021 生成科研项目周报,包含 Issue/PR 队列和风险预警。
|
||||
```
|
||||
|
||||
预期行为:
|
||||
|
||||
- 采集仓库、Issue、PR、Release 和贡献者数据;
|
||||
- 区分事实和建议;
|
||||
- 除非用户明确要求,不发布评论。
|
||||
|
||||
### 协作画像
|
||||
|
||||
```text
|
||||
请使用 gitlink-research-collaboration-map 分析 Gitconomy/Git4Research 的协作结构,识别维护者、贡献者、协作缺口和下一步建议。
|
||||
```
|
||||
|
||||
预期行为:
|
||||
|
||||
- 使用公开贡献者、Issue、PR、语言和可选用户数据;
|
||||
- 避免输出私人联系方式;
|
||||
- 建议必须有证据支撑。
|
||||
|
||||
### 知识图谱
|
||||
|
||||
```text
|
||||
请使用 gitlink-research-knowledge-graph 在 GitLink 搜索“论文复现”和“open research”,输出 Markdown 趋势摘要和图谱 JSON。
|
||||
```
|
||||
|
||||
预期行为:
|
||||
|
||||
- 执行有边界的关键词搜索;
|
||||
- 深度分析不超过 8 个仓库;
|
||||
- 按图谱 schema 输出 `nodes` 和 `edges`;
|
||||
- 标注平台数据局限。
|
||||
|
||||
### 数据来源审计
|
||||
|
||||
```text
|
||||
请使用 gitlink-research-data-provenance 审计 songhui18/ICCV2021 的数据集来源、引用、许可证和隐私风险。不要打印原始数据内容。
|
||||
```
|
||||
|
||||
预期行为:
|
||||
|
||||
- 采集仓库信息和选定文件树;
|
||||
- 只报告路径和风险类型;
|
||||
- 区分证据缺失和已确认风险。
|
||||
|
||||
### 成果手册
|
||||
|
||||
```text
|
||||
请使用 gitlink-research-artifact-handbook 为 Gitconomy/Git4Research 生成科研成果沉淀手册,用于项目交接和竞赛演示。
|
||||
```
|
||||
|
||||
预期行为:
|
||||
|
||||
- 在可用时采集仓库、README、文件树、Issue/PR、Release、语言和贡献者信号;
|
||||
- 输出结构化手册,缺失字段标注为 `待补充`;
|
||||
- 除非用户明确要求,不写入 Wiki、Issue、Release 或仓库文件。
|
||||
|
||||
## 真实 Agent 验证
|
||||
|
||||
竞赛提交时,建议至少录制一次 Agent 运行过程截图或视频:
|
||||
|
||||
1. 安装或暴露这些 Skills 给 Agent。
|
||||
2. 选择一个公开 GitLink 仓库运行本报告中的提示词。
|
||||
3. 展示 Agent 读取 Skill、执行只读 `gitlink-cli` 命令并生成报告。
|
||||
4. 展示未执行任何写操作。
|
||||
|
||||
推荐演示目标:
|
||||
|
||||
```text
|
||||
songhui18/ICCV2021
|
||||
```
|
||||
|
||||
该仓库具备较丰富的 Issue 和 PR 数据,便于展示进度跟踪和协作画像。
|
||||
|
||||
## 已知限制
|
||||
|
||||
- 自动脚本验证 Skill 结构和工作流说明,不证明大模型生成报告的语义质量。
|
||||
- 真实 GitLink API 验证需要网络访问;私有仓库可能需要认证。
|
||||
- 竞赛提交材料仍需在选定 Agent 界面中补充截图或视频。
|
||||
|
|
@ -46,6 +46,7 @@
|
|||
"cmd.dataset.view.short": "View a repository's dataset",
|
||||
"cmd.doctor.long": "Run local diagnostics for gitlink-cli configuration, authentication, repository context and API connectivity.",
|
||||
"cmd.doctor.short": "Diagnose gitlink-cli environment problems",
|
||||
"cmd.ignore.short": "Ignore file template operations",
|
||||
"cmd.issue.batch_close.long": "Close filtered issues in bulk.\n\nThis command defaults to dry-run mode and only prints matching issues.\nPass --yes to execute remote close operations. Use restrictive filters and a small limit.\n\nExamples:\n gitlink-cli issue +batch-close --owner Gitlink --repo gitlink-cli --older-than-days 60 --limit 20\n gitlink-cli issue +batch-close --owner Gitlink --repo gitlink-cli --older-than-days 60 --limit 20 --yes",
|
||||
"cmd.issue.batch_close.short": "Close filtered issues in bulk. Defaults to dry-run; pass --yes to execute.",
|
||||
"cmd.issue.batch_label.long": "Add a label to filtered issues in bulk.\n\nThis command defaults to dry-run mode and only prints matching issues.\nPass --yes to execute remote label operations. The current implementation does not fake label writes when the API endpoint is unavailable.\n\nExamples:\n gitlink-cli issue +batch-label --owner Gitlink --repo gitlink-cli --add-label stale --older-than-days 30 --limit 50\n gitlink-cli issue +batch-label --owner Gitlink --repo gitlink-cli --add-label stale --older-than-days 30 --limit 50 --yes",
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@
|
|||
"cmd.dataset.view.short": "查看仓库数据集",
|
||||
"cmd.doctor.long": "诊断 gitlink-cli 的配置、认证、仓库上下文和 API 连通性问题。",
|
||||
"cmd.doctor.short": "诊断 gitlink-cli 环境问题",
|
||||
"cmd.ignore.short": "忽略文件模板操作",
|
||||
"cmd.issue.batch_close.long": "批量关闭筛选后的议题。\n\n该命令默认处于 dry-run 模式,只打印匹配的议题。\n传入 --yes 后执行远端关闭操作。请使用严格筛选条件和较小 limit。\n\n示例:\n gitlink-cli issue +batch-close --owner Gitlink --repo gitlink-cli --older-than-days 60 --limit 20\n gitlink-cli issue +batch-close --owner Gitlink --repo gitlink-cli --older-than-days 60 --limit 20 --yes",
|
||||
"cmd.issue.batch_close.short": "批量关闭筛选后的议题。默认 dry-run;传入 --yes 后执行。",
|
||||
"cmd.issue.batch_label.long": "给筛选后的议题批量添加标签。\n\n该命令默认处于 dry-run 模式,只打印匹配的议题。\n传入 --yes 后执行远端标签操作。当前实现不会在 API 端点不可用时伪造写入结果。\n\n示例:\n gitlink-cli issue +batch-label --owner Gitlink --repo gitlink-cli --add-label stale --older-than-days 30 --limit 50\n gitlink-cli issue +batch-label --owner Gitlink --repo gitlink-cli --add-label stale --older-than-days 30 --limit 50 --yes",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,166 @@
|
|||
#!/usr/bin/env python3
|
||||
from __future__ import annotations
|
||||
|
||||
import re
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
RESEARCH_SKILLS = {
|
||||
"gitlink-research-reproducibility": {
|
||||
"commands": ["repo +info", "repo +tree", "api GET"],
|
||||
"references": ["checklist.md"],
|
||||
"examples": ["reproducibility-audit.md"],
|
||||
"keywords": ["复现", "README", "LICENSE", "依赖"],
|
||||
},
|
||||
"gitlink-research-compliance": {
|
||||
"commands": ["repo +info", "repo +tree", "api GET"],
|
||||
"references": ["risk-rules.md"],
|
||||
"examples": ["compliance-audit.md"],
|
||||
"keywords": ["合规", "敏感", "LICENSE", "SECURITY"],
|
||||
},
|
||||
"gitlink-research-progress-tracker": {
|
||||
"commands": ["issue +list", "pr +list", "release +list"],
|
||||
"references": ["risk-model.md"],
|
||||
"examples": ["weekly-report.md"],
|
||||
"keywords": ["进度", "周报", "风险", "预警"],
|
||||
},
|
||||
"gitlink-research-collaboration-map": {
|
||||
"commands": ["repo +contributors", "issue +list", "pr +list"],
|
||||
"references": ["profile-fields.md"],
|
||||
"examples": ["collaboration-map.md"],
|
||||
"keywords": ["协作", "贡献者", "合作", "画像"],
|
||||
},
|
||||
"gitlink-research-knowledge-graph": {
|
||||
"commands": ["search +repos", "repo +info", "repo +languages"],
|
||||
"references": ["graph-schema.md"],
|
||||
"examples": ["keyword-map.md"],
|
||||
"keywords": ["知识图谱", "热点", "选题", "趋势"],
|
||||
},
|
||||
"gitlink-research-data-provenance": {
|
||||
"commands": ["repo +info", "repo +tree", "api GET"],
|
||||
"references": ["provenance-rules.md"],
|
||||
"examples": ["data-provenance-audit.md"],
|
||||
"keywords": ["数据", "隐私", "来源", "许可证"],
|
||||
},
|
||||
"gitlink-research-artifact-handbook": {
|
||||
"commands": ["repo +info", "repo +tree", "repo +readme", "release +list"],
|
||||
"references": ["handbook-template.md"],
|
||||
"examples": ["artifact-handbook.md"],
|
||||
"keywords": ["成果", "手册", "交接", "复现"],
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def fail(message: str) -> None:
|
||||
print(f"ERROR: {message}", file=sys.stderr)
|
||||
raise SystemExit(1)
|
||||
|
||||
|
||||
def read(path: Path) -> str:
|
||||
try:
|
||||
return path.read_text(encoding="utf-8")
|
||||
except FileNotFoundError:
|
||||
fail(f"缺少文件:{path}")
|
||||
|
||||
|
||||
def parse_frontmatter(text: str, path: Path) -> dict[str, str]:
|
||||
if not text.startswith("---\n"):
|
||||
fail(f"{path} 未以 YAML frontmatter 开头")
|
||||
try:
|
||||
_, frontmatter, _ = text.split("---", 2)
|
||||
except ValueError:
|
||||
fail(f"{path} 的 YAML frontmatter 不完整")
|
||||
parsed: dict[str, str] = {}
|
||||
for line in frontmatter.strip().splitlines():
|
||||
if ":" not in line:
|
||||
fail(f"{path} 的 frontmatter 行缺少冒号:{line}")
|
||||
key, value = line.split(":", 1)
|
||||
parsed[key.strip()] = value.strip().strip('"')
|
||||
return parsed
|
||||
|
||||
|
||||
def assert_contains(text: str, needle: str, path: Path) -> None:
|
||||
if needle not in text:
|
||||
fail(f"{path} 缺少必需文本:{needle}")
|
||||
|
||||
|
||||
def assert_regex(text: str, pattern: str, path: Path) -> None:
|
||||
if not re.search(pattern, text, flags=re.MULTILINE):
|
||||
fail(f"{path} 未匹配必需模式:{pattern}")
|
||||
|
||||
|
||||
def validate_skill(root: Path, name: str, spec: dict[str, list[str]]) -> None:
|
||||
skill_dir = root / "skills" / name
|
||||
skill_md = skill_dir / "SKILL.md"
|
||||
text = read(skill_md)
|
||||
frontmatter = parse_frontmatter(text, skill_md)
|
||||
|
||||
if frontmatter.get("name") != name:
|
||||
fail(f"{skill_md} 的 name 字段错误:{frontmatter.get('name')}")
|
||||
if not re.fullmatch(r"\d+\.\d+\.\d+", frontmatter.get("version", "")):
|
||||
fail(f"{skill_md} 的 version 必须使用 x.y.z 格式")
|
||||
if "gitlink-cli" not in frontmatter.get("bins", ""):
|
||||
fail(f"{skill_md} 的 metadata.requires.bins 缺少 gitlink-cli")
|
||||
if not frontmatter.get("cliHelp", "").startswith("gitlink-cli "):
|
||||
fail(f"{skill_md} 的 cliHelp 必须以 gitlink-cli 开头")
|
||||
description = frontmatter.get("description", "")
|
||||
if len(description) < 30:
|
||||
fail(f"{skill_md} 的 description 过短")
|
||||
for keyword in spec["keywords"]:
|
||||
if keyword not in text and keyword not in description:
|
||||
fail(f"{skill_md} 缺少场景关键词:{keyword}")
|
||||
|
||||
assert_contains(text, "gitlink-shared", skill_md)
|
||||
assert_contains(text, "gitlink-cli", skill_md)
|
||||
assert_contains(text, "--format json", skill_md)
|
||||
assert_regex(text, r"只读|默认只读", skill_md)
|
||||
assert_regex(text, r"不输出 Token|Token", skill_md)
|
||||
|
||||
for command in spec["commands"]:
|
||||
assert_contains(text, command, skill_md)
|
||||
|
||||
for filename in spec["references"]:
|
||||
path = skill_dir / "references" / filename
|
||||
ref_text = read(path)
|
||||
if len(ref_text.strip().splitlines()) < 5:
|
||||
fail(f"{path} 内容过少,无法作为有效参考")
|
||||
|
||||
for filename in spec["examples"]:
|
||||
path = skill_dir / "examples" / filename
|
||||
example_text = read(path)
|
||||
assert_contains(example_text, "用户请求", path)
|
||||
assert_contains(example_text, "Agent 步骤", path)
|
||||
assert_contains(example_text, "预期回答", path)
|
||||
assert_contains(example_text, "gitlink-cli", path)
|
||||
|
||||
|
||||
def validate_readme(root: Path) -> None:
|
||||
readme = root / "skills" / "README.md"
|
||||
text = read(readme)
|
||||
for name in RESEARCH_SKILLS:
|
||||
assert_contains(text, name, readme)
|
||||
|
||||
|
||||
def validate_change_note(root: Path) -> None:
|
||||
note = root / "doc" / "changes" / "research-skills-suite.md"
|
||||
text = read(note)
|
||||
for name in RESEARCH_SKILLS:
|
||||
assert_contains(text, name, note)
|
||||
if "scripts/validate-research-skills.py" not in text and "make validate-research-skills" not in text:
|
||||
fail(f"{note} 缺少科研 Skills 验证命令")
|
||||
|
||||
|
||||
def main() -> int:
|
||||
root = Path(__file__).resolve().parents[1]
|
||||
for name, spec in RESEARCH_SKILLS.items():
|
||||
validate_skill(root, name, spec)
|
||||
print(f"ok {name}")
|
||||
validate_readme(root)
|
||||
validate_change_note(root)
|
||||
print("research skill validation passed")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
|
|
@ -105,6 +105,48 @@ skills/
|
|||
│ └── SKILL.md # Wiki 操作指南
|
||||
├── gitlink-pm/ # 项目管理
|
||||
│ └── SKILL.md # PM 操作指南
|
||||
├── gitlink-research-reproducibility/ # 科研仓库复现性审计
|
||||
│ ├── SKILL.md
|
||||
│ ├── references/
|
||||
│ │ └── checklist.md
|
||||
│ └── examples/
|
||||
│ └── reproducibility-audit.md
|
||||
├── gitlink-research-compliance/ # 科研开源合规与敏感风险检查
|
||||
│ ├── SKILL.md
|
||||
│ ├── references/
|
||||
│ │ └── risk-rules.md
|
||||
│ └── examples/
|
||||
│ └── compliance-audit.md
|
||||
├── gitlink-research-progress-tracker/ # 科研项目进度跟踪与预警
|
||||
│ ├── SKILL.md
|
||||
│ ├── references/
|
||||
│ │ └── risk-model.md
|
||||
│ └── examples/
|
||||
│ └── weekly-report.md
|
||||
├── gitlink-research-collaboration-map/ # 科研协作画像与合作建议
|
||||
│ ├── SKILL.md
|
||||
│ ├── references/
|
||||
│ │ └── profile-fields.md
|
||||
│ └── examples/
|
||||
│ └── collaboration-map.md
|
||||
├── gitlink-research-knowledge-graph/ # 科研热点追踪与轻量知识图谱
|
||||
│ ├── SKILL.md
|
||||
│ ├── references/
|
||||
│ │ └── graph-schema.md
|
||||
│ └── examples/
|
||||
│ └── keyword-map.md
|
||||
├── gitlink-research-data-provenance/ # 科研数据来源与隐私审计
|
||||
│ ├── SKILL.md
|
||||
│ ├── references/
|
||||
│ │ └── provenance-rules.md
|
||||
│ └── examples/
|
||||
│ └── data-provenance-audit.md
|
||||
├── gitlink-research-artifact-handbook/ # 科研成果沉淀手册生成
|
||||
│ ├── SKILL.md
|
||||
│ ├── references/
|
||||
│ │ └── handbook-template.md
|
||||
│ └── examples/
|
||||
│ └── artifact-handbook.md
|
||||
├── gitlink-health/ # 项目健康度分析
|
||||
│ ├── SKILL.md # 健康度分析指南
|
||||
│ ├── data/
|
||||
|
|
@ -149,6 +191,18 @@ skills/
|
|||
| **gitlink-health** | 开源项目健康度 | 详情见SKILL.md |
|
||||
| **gitlink-semantic-audit** | CLI/平台语义审计(伪成功、参数错配、端点失效体检) | `api GET/POST ...` 与 shortcut 对照 |
|
||||
|
||||
### 科研场景 Skills
|
||||
|
||||
| Skill | 说明 | 常用命令 |
|
||||
|-------|------|----------|
|
||||
| **gitlink-research-reproducibility** | 科研仓库复现性审计,检查 README、LICENSE、依赖、测试、CI、示例和数据说明 | `repo +info`, `repo +tree`, `api GET /sub_entries` |
|
||||
| **gitlink-research-compliance** | 科研开源合规与敏感风险检查 | `repo +info`, `repo +tree`, `api GET /sub_entries` |
|
||||
| **gitlink-research-progress-tracker** | 科研项目周报、Issue/PR 队列和停滞风险预警 | `issue +list`, `pr +list`, `release +list`, `repo +contributors` |
|
||||
| **gitlink-research-collaboration-map** | 科研协作画像、核心维护者识别和合作建议 | `repo +contributors`, `issue +list`, `pr +list`, `user +info` |
|
||||
| **gitlink-research-knowledge-graph** | 关键词科研热点追踪和轻量知识图谱 | `search +repos`, `repo +info`, `repo +languages`, `repo +contributors` |
|
||||
| **gitlink-research-data-provenance** | 科研数据来源、数据许可证、引用链和隐私风险审计 | `repo +info`, `repo +tree`, `api GET /sub_entries` |
|
||||
| **gitlink-research-artifact-handbook** | 科研成果沉淀手册和课题组交接材料生成 | `repo +info`, `repo +readme`, `repo +tree`, `release +list` |
|
||||
|
||||
---
|
||||
|
||||
## 🎯 使用场景
|
||||
|
|
@ -254,6 +308,15 @@ gitlink-cli org +teams -i Gitlink
|
|||
- [gitlink-org/SKILL.md](gitlink-org/SKILL.md) - 组织命令
|
||||
- [gitlink-user/SKILL.md](gitlink-user/SKILL.md) - 用户命令
|
||||
|
||||
**科研场景**:
|
||||
- [gitlink-research-reproducibility/SKILL.md](gitlink-research-reproducibility/SKILL.md) - 复现性审计
|
||||
- [gitlink-research-compliance/SKILL.md](gitlink-research-compliance/SKILL.md) - 开源合规与敏感风险
|
||||
- [gitlink-research-progress-tracker/SKILL.md](gitlink-research-progress-tracker/SKILL.md) - 项目进度跟踪与预警
|
||||
- [gitlink-research-collaboration-map/SKILL.md](gitlink-research-collaboration-map/SKILL.md) - 协作画像与合作建议
|
||||
- [gitlink-research-knowledge-graph/SKILL.md](gitlink-research-knowledge-graph/SKILL.md) - 热点追踪与知识图谱
|
||||
- [gitlink-research-data-provenance/SKILL.md](gitlink-research-data-provenance/SKILL.md) - 数据来源与隐私审计
|
||||
- [gitlink-research-artifact-handbook/SKILL.md](gitlink-research-artifact-handbook/SKILL.md) - 成果沉淀手册
|
||||
|
||||
---
|
||||
|
||||
## ❓ 常见问题
|
||||
|
|
|
|||
|
|
@ -0,0 +1,77 @@
|
|||
---
|
||||
name: gitlink-research-artifact-handbook
|
||||
version: 0.1.0
|
||||
description: "科研成果沉淀手册生成:基于 GitLink 仓库 README、目录结构、Release、Issue、PR、贡献者和语言信息,生成面向答辩、开源发布或课题组交接的科研成果手册。用于梳理代码、实验、论文、数据、贡献和复现入口。"
|
||||
metadata:
|
||||
requires:
|
||||
bins: ["gitlink-cli"]
|
||||
cliHelp: "gitlink-cli repo --help"
|
||||
---
|
||||
|
||||
# gitlink-research-artifact-handbook
|
||||
|
||||
开始前必须先阅读 `../gitlink-shared/SKILL.md`,确认认证、权限、安全规则和 GitLink API 注意事项。
|
||||
|
||||
## 安全规则
|
||||
|
||||
- 默认只读执行,不创建 Wiki、不发布 Release、不提交文件。
|
||||
- 所有 GitLink 操作必须使用 `gitlink-cli`。
|
||||
- 所有命令使用 `--format json`。
|
||||
- 不输出 Token、Cookie 或认证 Header。
|
||||
- 如果用户要求把手册写回 Wiki、Issue 或仓库文件,必须先输出 dry-run 草稿并等待确认。
|
||||
|
||||
## 工作流
|
||||
|
||||
1. 采集仓库概览、语言和贡献者:
|
||||
|
||||
```bash
|
||||
gitlink-cli repo +info --owner <owner> --repo <repo> --format json
|
||||
gitlink-cli repo +languages --owner <owner> --repo <repo> --format json
|
||||
gitlink-cli repo +contributors --owner <owner> --repo <repo> --format json
|
||||
```
|
||||
|
||||
2. 采集根目录和关键目录:
|
||||
|
||||
```bash
|
||||
gitlink-cli repo +tree --owner <owner> --repo <repo> --ref <branch> --format json
|
||||
gitlink-cli repo +readme --owner <owner> --repo <repo> --ref <branch> --format json
|
||||
```
|
||||
|
||||
如果 `repo +tree` 不可用,回退:
|
||||
|
||||
```bash
|
||||
gitlink-cli api GET /<owner>/<repo>/sub_entries --query 'filepath=&ref=<branch>' --format json
|
||||
```
|
||||
|
||||
3. 采集协作和发布信息:
|
||||
|
||||
```bash
|
||||
gitlink-cli issue +list --owner <owner> --repo <repo> --state open --format json
|
||||
gitlink-cli pr +list --owner <owner> --repo <repo> --state merged --format json
|
||||
gitlink-cli release +list --owner <owner> --repo <repo> --format json
|
||||
```
|
||||
|
||||
4. 按 `references/handbook-template.md` 生成科研成果沉淀手册。
|
||||
|
||||
## 输出格式
|
||||
|
||||
```markdown
|
||||
# 科研成果沉淀手册:<owner>/<repo>
|
||||
|
||||
## 1. 项目概览
|
||||
## 2. 研究问题与成果定位
|
||||
## 3. 代码与目录导览
|
||||
## 4. 实验和数据入口
|
||||
## 5. 复现步骤
|
||||
## 6. 协作与贡献记录
|
||||
## 7. 发布与引用信息
|
||||
## 8. 交接清单
|
||||
```
|
||||
|
||||
## 分析原则
|
||||
|
||||
- 手册是“可交接材料”,不是营销稿;优先列入口、证据和缺失项。
|
||||
- 不要编造论文标题、数据来源或实验结果;缺失时写“待补充”。
|
||||
- 对 Issue/PR 只做摘要,不贴完整讨论。
|
||||
- 如果仓库没有 Release,建议使用 Release 固化阶段成果。
|
||||
- 如果根目录 README 已完整,保留其结构并补交接清单;如果 README 很弱,按模板重建手册。
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
# 成果手册示例
|
||||
|
||||
用户请求:
|
||||
|
||||
```text
|
||||
请为 Gitconomy/Git4Research 生成一份科研成果沉淀手册,用于课题组交接和答辩展示。
|
||||
```
|
||||
|
||||
Agent 步骤:
|
||||
|
||||
```bash
|
||||
gitlink-cli repo +info --owner Gitconomy --repo Git4Research --format json
|
||||
gitlink-cli repo +readme --owner Gitconomy --repo Git4Research --ref main --format json
|
||||
gitlink-cli repo +tree --owner Gitconomy --repo Git4Research --ref main --format json
|
||||
gitlink-cli issue +list --owner Gitconomy --repo Git4Research --state open --format json
|
||||
gitlink-cli pr +list --owner Gitconomy --repo Git4Research --state merged --format json
|
||||
gitlink-cli release +list --owner Gitconomy --repo Git4Research --format json
|
||||
```
|
||||
|
||||
预期回答:
|
||||
|
||||
- 按模板生成科研成果沉淀手册。
|
||||
- 将缺失证据标注为 `待补充`。
|
||||
- 确认未执行 Wiki、Issue、PR、Release 或文件写操作。
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
# 科研成果沉淀手册模板
|
||||
|
||||
```markdown
|
||||
# 科研成果沉淀手册:<owner>/<repo>
|
||||
|
||||
## 1. 项目概览
|
||||
|
||||
- 仓库:
|
||||
- 默认分支:
|
||||
- 主要语言:
|
||||
- 维护状态:
|
||||
- 数据来源:
|
||||
|
||||
## 2. 研究问题与成果定位
|
||||
|
||||
- 研究问题:
|
||||
- 方法或系统:
|
||||
- 对应论文/报告:
|
||||
- 创新点:
|
||||
|
||||
## 3. 代码与目录导览
|
||||
|
||||
| 路径 | 作用 | 证据来源 |
|
||||
|---|---|---|
|
||||
|
||||
## 4. 实验和数据入口
|
||||
|
||||
| 内容 | 路径/链接 | 状态 | 待补充 |
|
||||
|---|---|---|---|
|
||||
|
||||
## 5. 复现步骤
|
||||
|
||||
1. 环境准备:
|
||||
2. 数据准备:
|
||||
3. 训练/运行:
|
||||
4. 评估:
|
||||
|
||||
## 6. 协作与贡献记录
|
||||
|
||||
- 贡献者:
|
||||
- 关键 Issue:
|
||||
- 已合并 PR:
|
||||
|
||||
## 7. 发布与引用信息
|
||||
|
||||
- Release:
|
||||
- License:
|
||||
- Citation:
|
||||
|
||||
## 8. 交接清单
|
||||
|
||||
- [ ] README 完整
|
||||
- [ ] LICENSE 明确
|
||||
- [ ] 依赖文件存在
|
||||
- [ ] 数据来源明确
|
||||
- [ ] 实验命令可运行
|
||||
- [ ] Release 或归档版本可引用
|
||||
```
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
---
|
||||
name: gitlink-research-collaboration-map
|
||||
version: 0.1.0
|
||||
description: "科研协作画像与合作建议:分析 GitLink 科研仓库的贡献者、Issue、PR、语言和用户信息,识别核心维护者、潜在协作者、未响应研究问题和协作分工建议。用于课题组协作复盘、跨团队合作匹配和学生贡献画像。"
|
||||
metadata:
|
||||
requires:
|
||||
bins: ["gitlink-cli"]
|
||||
cliHelp: "gitlink-cli repo --help"
|
||||
---
|
||||
|
||||
# gitlink-research-collaboration-map
|
||||
|
||||
开始前必须先阅读 `../gitlink-shared/SKILL.md`,确认认证、权限、安全规则和 GitLink API 注意事项。
|
||||
|
||||
## 安全规则
|
||||
|
||||
- 只读执行,不自动指派 Issue、不邀请成员。
|
||||
- 所有 GitLink 操作必须使用 `gitlink-cli`。
|
||||
- 所有命令使用 `--format json`。
|
||||
- 不输出 Token、Cookie 或认证 Header。
|
||||
- 不输出私人联系方式或敏感个人信息。
|
||||
- 协作建议必须基于公开仓库数据,避免做人身评价。
|
||||
|
||||
## 工作流
|
||||
|
||||
1. 获取仓库、语言、贡献者:
|
||||
|
||||
```bash
|
||||
gitlink-cli repo +info --owner <owner> --repo <repo> --format json
|
||||
gitlink-cli repo +languages --owner <owner> --repo <repo> --format json
|
||||
gitlink-cli repo +contributors --owner <owner> --repo <repo> --format json
|
||||
```
|
||||
|
||||
如 shortcut 不可用,回退:
|
||||
|
||||
```bash
|
||||
gitlink-cli api GET /<owner>/<repo>/languages --format json
|
||||
gitlink-cli api GET /<owner>/<repo>/contributors --format json
|
||||
```
|
||||
|
||||
2. 获取 Issue 和 PR:
|
||||
|
||||
```bash
|
||||
gitlink-cli issue +list --owner <owner> --repo <repo> --state open --format json
|
||||
gitlink-cli issue +list --owner <owner> --repo <repo> --state closed --format json
|
||||
gitlink-cli pr +list --owner <owner> --repo <repo> --state open --format json
|
||||
gitlink-cli pr +list --owner <owner> --repo <repo> --state merged --format json
|
||||
```
|
||||
|
||||
3. 对高频作者或贡献者,按需获取公开用户信息:
|
||||
|
||||
```bash
|
||||
gitlink-cli user +info --login <login> --format json
|
||||
```
|
||||
|
||||
4. 按 `references/profile-fields.md` 生成协作画像。
|
||||
|
||||
## 输出格式
|
||||
|
||||
```markdown
|
||||
# 科研协作画像:<owner>/<repo>
|
||||
|
||||
## 协作结构
|
||||
|
||||
| 角色 | 候选人/账号 | 证据 | 建议 |
|
||||
|---|---|---|---|
|
||||
| 核心维护者 | ... | commits/issues/pr | ... |
|
||||
|
||||
## 未响应问题
|
||||
|
||||
| Issue/PR | 主题 | 等待动作 | 建议协作者 |
|
||||
|---|---|---|---|
|
||||
|
||||
## 合作建议
|
||||
|
||||
1. ...
|
||||
```
|
||||
|
||||
## 分析原则
|
||||
|
||||
- 贡献者画像使用“贡献事实”和“适合跟进的任务”,不要给人格标签。
|
||||
- Issue/PR 作者、assignee、reviewer 字段可能缺失,缺失时不要强推断。
|
||||
- 镜像仓库的 GitLink 协作数据可能很少,需要标注局限。
|
||||
- 合作建议应给出证据:语言栈、历史贡献、Issue/PR 主题。
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
# 协作画像示例
|
||||
|
||||
用户请求:
|
||||
|
||||
```text
|
||||
请分析 Gitconomy/Git4Research 的科研协作结构,找出核心维护者和可跟进的问题方向。
|
||||
```
|
||||
|
||||
Agent 步骤:
|
||||
|
||||
```bash
|
||||
gitlink-cli repo +info --owner Gitconomy --repo Git4Research --format json
|
||||
gitlink-cli repo +contributors --owner Gitconomy --repo Git4Research --format json
|
||||
gitlink-cli issue +list --owner Gitconomy --repo Git4Research --state open --format json
|
||||
gitlink-cli pr +list --owner Gitconomy --repo Git4Research --state open --format json
|
||||
```
|
||||
|
||||
预期回答:
|
||||
|
||||
- 区分事实和建议。
|
||||
- 如果仓库 Issue/PR 活动较少,需要说明数据局限。
|
||||
- 不暴露私人联系方式。
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
# 协作画像字段
|
||||
|
||||
| 字段 | 来源 | 用途 |
|
||||
|---|---|---|
|
||||
| 贡献者账号/名称 | `repo +contributors` | 识别代码贡献者 |
|
||||
| 提交/贡献计数 | `repo +contributors` | 粗略衡量贡献量 |
|
||||
| Issue 作者 | `issue +list` | 识别问题提出者 |
|
||||
| Issue 负责人 | `issue +list` | 识别责任分配 |
|
||||
| Issue 标签 | `issue +list` | 判断研究主题或任务类型 |
|
||||
| PR 作者 | `pr +list` | 识别代码贡献者和集成者 |
|
||||
| PR 状态 | `pr +list` | 判断协作流转状态 |
|
||||
| 语言 | `repo +languages` | 推断技术栈 |
|
||||
|
||||
建议角色标签:
|
||||
|
||||
- 核心维护者:代码贡献和 Issue/PR 参与均较多。
|
||||
- 问题提出者:Issue 活跃但代码贡献少,适合需求澄清和复现实验。
|
||||
- 实验贡献者:PR 或实验相关 Issue 活跃。
|
||||
- 潜在协作者:与主要语言或研究主题匹配,但当前参与较少。
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
---
|
||||
name: gitlink-research-compliance
|
||||
version: 0.1.0
|
||||
description: "科研开源合规与敏感风险检查:审计 GitLink 科研仓库的许可证、SECURITY、CONTRIBUTING、依赖声明和敏感文件风险。用于开源发布前预检查、论文代码发布合规清单和整改建议。"
|
||||
metadata:
|
||||
requires:
|
||||
bins: ["gitlink-cli"]
|
||||
cliHelp: "gitlink-cli repo --help"
|
||||
---
|
||||
|
||||
# gitlink-research-compliance
|
||||
|
||||
开始前必须先阅读 `../gitlink-shared/SKILL.md`,确认认证、权限、安全规则和 GitLink API 注意事项。
|
||||
|
||||
## 安全规则
|
||||
|
||||
- 只读执行,不删除文件、不改 `.gitignore`、不关闭 Issue。
|
||||
- 所有 GitLink 操作必须使用 `gitlink-cli`。
|
||||
- 所有命令使用 `--format json`。
|
||||
- 不输出 Token、Cookie 或认证 Header。
|
||||
- 报告必须注明“工程合规预审,不构成法律意见”。
|
||||
|
||||
## 工作流
|
||||
|
||||
1. 采集仓库信息和文件树:
|
||||
|
||||
```bash
|
||||
gitlink-cli repo +info --owner <owner> --repo <repo> --format json
|
||||
gitlink-cli repo +tree --owner <owner> --repo <repo> --ref <branch> --format json
|
||||
```
|
||||
|
||||
2. 如果 `repo +tree` 不可用,回退:
|
||||
|
||||
```bash
|
||||
gitlink-cli api GET /<owner>/<repo>/sub_entries --query 'filepath=&ref=<branch>' --format json
|
||||
```
|
||||
|
||||
3. 对根目录和高风险目录做规则检查:
|
||||
|
||||
- 根目录:许可证、安全策略、贡献指南、依赖清单、`.gitignore`。
|
||||
- 配置目录:`.github`、`.gitlink`、`.vscode`、`config`。
|
||||
- 脚本目录:`scripts`、`deploy`、`docker`。
|
||||
|
||||
4. 按 `references/risk-rules.md` 输出风险分级。
|
||||
|
||||
## 输出格式
|
||||
|
||||
```markdown
|
||||
# 科研开源合规预审:<owner>/<repo>
|
||||
|
||||
## 总览
|
||||
|
||||
| 项目 | 结果 | 风险等级 | 证据 |
|
||||
|---|---|---|---|
|
||||
|
||||
## 高优先级风险
|
||||
|
||||
1. ...
|
||||
|
||||
## 整改建议
|
||||
|
||||
1. ...
|
||||
|
||||
## 说明
|
||||
|
||||
本报告是工程合规预审,不构成法律意见。
|
||||
```
|
||||
|
||||
## 检查项
|
||||
|
||||
- 许可证:存在 `LICENSE`,README 中最好也声明许可证。
|
||||
- 安全策略:存在 `SECURITY.md`。
|
||||
- 贡献指南:存在 `CONTRIBUTING.md`。
|
||||
- 依赖声明:存在语言对应依赖文件,便于后续许可证和漏洞扫描。
|
||||
- 敏感文件风险:文件名包含 `.env`、`id_rsa`、`.pem`、`.key`、`credential`、`secret`、`token` 时列为风险。
|
||||
|
||||
## 注意事项
|
||||
|
||||
- 不要下载或展示疑似密钥内容,只报告路径和风险类型。
|
||||
- 如果只能获取根目录文件树,报告必须说明深层敏感文件未覆盖。
|
||||
- 私有仓库需要用户自行完成认证,不能要求用户粘贴 Token。
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
# 合规预审示例
|
||||
|
||||
用户请求:
|
||||
|
||||
```text
|
||||
请检查 Gitconomy/Git4Research 是否具备开源发布合规基础。
|
||||
```
|
||||
|
||||
Agent 步骤:
|
||||
|
||||
```bash
|
||||
gitlink-cli repo +info --owner Gitconomy --repo Git4Research --format json
|
||||
gitlink-cli repo +tree --owner Gitconomy --repo Git4Research --ref main --format json
|
||||
```
|
||||
|
||||
预期回答:
|
||||
|
||||
- 报告许可证、安全策略、贡献指南、依赖清单和敏感文件风险。
|
||||
- 说明审计范围是仅根目录,还是包含选定子目录。
|
||||
- 避免引用或暴露敏感文件内容。
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
# 合规风险规则
|
||||
|
||||
| 风险 | 等级 | 判定 | 建议 |
|
||||
|---|---|---|---|
|
||||
| 缺少 LICENSE | 高 | 根目录无 LICENSE 文件 | 补充许可证并在 README 声明 |
|
||||
| 疑似私钥 | 高 | 文件名包含 `id_rsa`、`.pem`、`.key` | 移除文件、轮换密钥、加入 `.gitignore` |
|
||||
| 疑似环境密钥 | 高 | 文件名包含 `.env`、`credential`、`secret`、`token` | 移除真实配置,保留 `.env.example` |
|
||||
| 缺少依赖声明 | 中 | 无常见依赖清单 | 补充依赖文件,便于许可证和漏洞审计 |
|
||||
| 缺少 SECURITY | 中 | 无 `SECURITY.md` | 补充漏洞披露流程 |
|
||||
| 缺少 CONTRIBUTING | 低 | 无 `CONTRIBUTING.md` | 补充贡献流程和代码规范 |
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
---
|
||||
name: gitlink-research-data-provenance
|
||||
version: 0.1.0
|
||||
description: "科研数据来源与隐私审计:检查 GitLink 科研仓库中的数据集说明、下载来源、引用链、隐私风险、数据许可证和大文件痕迹。用于论文代码发布前的数据治理、复现实验数据说明和科研合规预审。"
|
||||
metadata:
|
||||
requires:
|
||||
bins: ["gitlink-cli"]
|
||||
cliHelp: "gitlink-cli repo --help"
|
||||
---
|
||||
|
||||
# gitlink-research-data-provenance
|
||||
|
||||
开始前必须先阅读 `../gitlink-shared/SKILL.md`,确认认证、权限、安全规则和 GitLink API 注意事项。
|
||||
|
||||
## 安全规则
|
||||
|
||||
- 只读执行,不下载大文件、不打开疑似敏感数据内容。
|
||||
- 所有 GitLink 操作必须使用 `gitlink-cli`。
|
||||
- 所有命令使用 `--format json`。
|
||||
- 不输出 Token、Cookie 或认证 Header。
|
||||
- 不输出个人隐私、样本原文、密钥或数据内容;只报告路径、类型和风险。
|
||||
- 报告必须注明“科研数据治理预审,不构成法律意见或伦理审查结论”。
|
||||
|
||||
## 工作流
|
||||
|
||||
1. 采集仓库概览和默认分支:
|
||||
|
||||
```bash
|
||||
gitlink-cli repo +info --owner <owner> --repo <repo> --format json
|
||||
```
|
||||
|
||||
2. 采集根目录文件树:
|
||||
|
||||
```bash
|
||||
gitlink-cli repo +tree --owner <owner> --repo <repo> --ref <branch> --format json
|
||||
```
|
||||
|
||||
如果 `repo +tree` 不可用,回退:
|
||||
|
||||
```bash
|
||||
gitlink-cli api GET /<owner>/<repo>/sub_entries --query 'filepath=&ref=<branch>' --format json
|
||||
```
|
||||
|
||||
3. 如果根目录存在 `data`、`datasets`、`benchmark`、`experiments`、`notebooks`、`docs`、`README`、`paper`、`assets`,只采集一层目录结构:
|
||||
|
||||
```bash
|
||||
gitlink-cli repo +tree --owner <owner> --repo <repo> --path data --ref <branch> --format json
|
||||
gitlink-cli repo +tree --owner <owner> --repo <repo> --path docs --ref <branch> --format json
|
||||
```
|
||||
|
||||
4. 按 `references/provenance-rules.md` 生成数据来源和隐私风险报告。
|
||||
|
||||
## 输出格式
|
||||
|
||||
```markdown
|
||||
# 科研数据来源与隐私审计:<owner>/<repo>
|
||||
|
||||
## 数据治理总览
|
||||
|
||||
| 检查项 | 结果 | 风险 | 证据 |
|
||||
|---|---|---|---|
|
||||
|
||||
## 数据来源链
|
||||
|
||||
| 数据/目录 | 来源说明 | 许可证/引用 | 复现状态 |
|
||||
|---|---|---|---|
|
||||
|
||||
## 风险与整改
|
||||
|
||||
1. ...
|
||||
|
||||
## 说明
|
||||
|
||||
本报告是科研数据治理预审,不构成法律意见或伦理审查结论。
|
||||
```
|
||||
|
||||
## 分析原则
|
||||
|
||||
- 有数据目录但无来源说明时,风险高于“未发现数据目录”。
|
||||
- 发现 `.csv`、`.jsonl`、`.parquet`、`.h5`、`.npy`、`.zip`、`.tar` 等文件名时,只报告文件名和路径,不打印内容。
|
||||
- 发现 `patient`、`student`、`email`、`phone`、`idcard`、`address`、`face`、`medical` 等词时,标注隐私复核风险。
|
||||
- 如果仓库只包含数据下载脚本,检查脚本是否说明下载地址、数据许可证和引用方式。
|
||||
- 无法确认的事项标注“未确认”,不要编造数据来源。
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
# 数据来源审计示例
|
||||
|
||||
用户请求:
|
||||
|
||||
```text
|
||||
请检查 songhui18/ICCV2021 是否有科研数据来源、数据许可证或隐私风险问题。
|
||||
```
|
||||
|
||||
Agent 步骤:
|
||||
|
||||
```bash
|
||||
gitlink-cli repo +info --owner songhui18 --repo ICCV2021 --format json
|
||||
gitlink-cli repo +tree --owner songhui18 --repo ICCV2021 --ref master --format json
|
||||
gitlink-cli repo +tree --owner songhui18 --repo ICCV2021 --path data --ref master --format json
|
||||
```
|
||||
|
||||
预期回答:
|
||||
|
||||
- 只报告路径和风险类型,不输出原始数据内容。
|
||||
- 区分数据来源、许可证、引用、隐私和大文件风险。
|
||||
- 说明评估范围是仅根目录,还是包含选定子目录。
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
# 数据来源规则
|
||||
|
||||
| 检查项 | 风险等级 | 判定线索 | 建议 |
|
||||
|---|---|---|---|
|
||||
| 数据来源说明缺失 | 高 | 存在 data/datasets/benchmark 目录,但 README 或目录下无来源说明 | 补充数据集名称、下载地址、版本、引用论文和访问日期 |
|
||||
| 数据许可证缺失 | 高 | 存在数据文件或下载脚本,但无 license/citation/terms | 补充数据许可证、使用条款和引用格式 |
|
||||
| 隐私数据线索 | 高 | 文件名或目录包含 patient、student、email、phone、idcard、address、face、medical 等 | 进行脱敏和伦理审查,避免公开原始个人数据 |
|
||||
| 大文件或压缩包 | 中 | 文件名包含 .zip、.tar、.h5、.npy、.parquet 等 | 说明文件来源、校验和、下载方式,不建议直接托管大数据 |
|
||||
| 数据下载脚本无校验 | 中 | 有 download/get_data 脚本但无 checksum/version | 补充 checksum、版本号和失败处理 |
|
||||
| 引用链不完整 | 中 | README 未说明数据、论文、代码之间的关系 | 补充数据引用、论文引用和实验脚本映射 |
|
||||
| 未发现数据痕迹 | 低 | 未见数据目录、下载脚本或数据扩展名 | 在报告中标注未发现,建议说明数据是否需另行申请 |
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
---
|
||||
name: gitlink-research-knowledge-graph
|
||||
version: 0.1.0
|
||||
description: "科研热点追踪与轻量知识图谱:按关键词搜索 GitLink 科研仓库,聚合仓库、语言、贡献者、Issue/PR 主题和研究方向,输出趋势分析、图谱节点边和选题建议。用于科研选题、技术生态调研和领域知识图谱构建。"
|
||||
metadata:
|
||||
requires:
|
||||
bins: ["gitlink-cli"]
|
||||
cliHelp: "gitlink-cli search --help"
|
||||
---
|
||||
|
||||
# gitlink-research-knowledge-graph
|
||||
|
||||
开始前必须先阅读 `../gitlink-shared/SKILL.md`,确认认证、权限、安全规则和 GitLink API 注意事项。
|
||||
|
||||
## 安全规则
|
||||
|
||||
- 只读执行。
|
||||
- 所有 GitLink 操作必须使用 `gitlink-cli`。
|
||||
- 所有命令使用 `--format json`。
|
||||
- 不输出 Token、Cookie 或认证 Header。
|
||||
- 控制 API 调用量:每个关键词保留前 8 个仓库,深度分析不超过 8 个仓库。
|
||||
- 对镜像仓库标注数据局限,不把 GitLink 平台内 watcher/fork 等同于原平台全量影响力。
|
||||
|
||||
## 工作流
|
||||
|
||||
1. 将研究主题拆成 3 到 5 个关键词,覆盖中文、英文、缩写和技术术语。
|
||||
|
||||
2. 搜索仓库:
|
||||
|
||||
```bash
|
||||
gitlink-cli search +repos -k <keyword> --format json
|
||||
```
|
||||
|
||||
3. 去重并选取候选仓库:
|
||||
|
||||
- 唯一键优先使用 `author.login/identifier`。
|
||||
- 同一仓库匹配多个关键词时保留并记录全部关键词。
|
||||
- 总候选控制在 20 个以内。
|
||||
- 深度分析优先选择匹配关键词多、更新时间近、关注度高的 5 到 8 个。
|
||||
|
||||
4. 对重点仓库采集详情:
|
||||
|
||||
```bash
|
||||
gitlink-cli repo +info --owner <owner> --repo <repo> --format json
|
||||
gitlink-cli repo +languages --owner <owner> --repo <repo> --format json
|
||||
gitlink-cli repo +contributors --owner <owner> --repo <repo> --format json
|
||||
gitlink-cli issue +list --owner <owner> --repo <repo> --state open --format json
|
||||
gitlink-cli pr +list --owner <owner> --repo <repo> --state open --format json
|
||||
```
|
||||
|
||||
5. 按 `references/graph-schema.md` 输出图谱 JSON 和趋势报告。
|
||||
|
||||
## 输出格式
|
||||
|
||||
```markdown
|
||||
# 科研热点与知识图谱:<topic>
|
||||
|
||||
## 搜索范围
|
||||
|
||||
关键词:...
|
||||
命中仓库:...
|
||||
深度分析:...
|
||||
|
||||
## 趋势洞察
|
||||
|
||||
1. ...
|
||||
|
||||
## 图谱摘要
|
||||
|
||||
| 节点类型 | 数量 |
|
||||
|---|---:|
|
||||
| repo | ... |
|
||||
| language | ... |
|
||||
| contributor | ... |
|
||||
| topic | ... |
|
||||
|
||||
## 选题建议
|
||||
|
||||
1. ...
|
||||
```
|
||||
|
||||
同时输出或附带如下 JSON 结构:
|
||||
|
||||
```json
|
||||
{
|
||||
"nodes": [],
|
||||
"edges": []
|
||||
}
|
||||
```
|
||||
|
||||
## 分析原则
|
||||
|
||||
- 不要把搜索结果数量直接解释为学术热度,只能作为 GitLink 平台内信号。
|
||||
- 图谱边必须有来源命令或字段依据。
|
||||
- 选题建议要区分“成熟方向”“新兴方向”“生态空白”。
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
# 关键词知识图谱示例
|
||||
|
||||
用户请求:
|
||||
|
||||
```text
|
||||
请围绕“论文复现”和“open research”在 GitLink 上做科研热点搜索,并输出轻量知识图谱。
|
||||
```
|
||||
|
||||
Agent 步骤:
|
||||
|
||||
```bash
|
||||
gitlink-cli search +repos -k "论文复现" --format json
|
||||
gitlink-cli search +repos -k "open research" --format json
|
||||
gitlink-cli repo +info --owner <owner> --repo <repo> --format json
|
||||
gitlink-cli repo +languages --owner <owner> --repo <repo> --format json
|
||||
gitlink-cli repo +contributors --owner <owner> --repo <repo> --format json
|
||||
```
|
||||
|
||||
预期回答:
|
||||
|
||||
- 列出关键词和候选仓库。
|
||||
- 提供 Markdown 趋势报告。
|
||||
- 按 `references/graph-schema.md` 输出包含 `nodes` 和 `edges` 的 JSON。
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
# 科研知识图谱结构
|
||||
|
||||
节点类型:
|
||||
|
||||
| 类型 | 必填字段 | 说明 |
|
||||
|---|---|---|
|
||||
| `repo` | `id`, `owner`, `repo`, `label` | GitLink 仓库 |
|
||||
| `language` | `id`, `name` | 编程语言 |
|
||||
| `contributor` | `id`, `login` | 公开贡献者身份 |
|
||||
| `topic` | `id`, `name` | 关键词或推断出的研究主题 |
|
||||
| `issue` | `id`, `title`, `state` | 代表性 Issue |
|
||||
| `pr` | `id`, `title`, `state` | 代表性 PR |
|
||||
|
||||
边类型:
|
||||
|
||||
| 类型 | 起点 | 终点 | 证据 |
|
||||
|---|---|---|---|
|
||||
| `uses_language` | repo | language | `repo +languages` |
|
||||
| `contributed_by` | contributor | repo | `repo +contributors` |
|
||||
| `matches_topic` | repo | topic | 搜索关键词或描述 |
|
||||
| `has_issue` | repo | issue | `issue +list` |
|
||||
| `has_pr` | repo | pr | `pr +list` |
|
||||
|
||||
示例:
|
||||
|
||||
```json
|
||||
{
|
||||
"nodes": [
|
||||
{"id": "repo:Gitconomy/Git4Research", "type": "repo", "label": "Gitconomy/Git4Research"},
|
||||
{"id": "topic:open-research", "type": "topic", "label": "open research"}
|
||||
],
|
||||
"edges": [
|
||||
{"source": "repo:Gitconomy/Git4Research", "target": "topic:open-research", "type": "matches_topic", "evidence": "search +repos keyword"}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
---
|
||||
name: gitlink-research-progress-tracker
|
||||
version: 0.1.0
|
||||
description: "科研项目进度跟踪与预警:基于 GitLink Issue、PR、Release、贡献者和仓库更新时间生成课题组周报、停滞风险、开放问题队列和下一步建议。用于科研项目管理、中期检查和例会汇报。"
|
||||
metadata:
|
||||
requires:
|
||||
bins: ["gitlink-cli"]
|
||||
cliHelp: "gitlink-cli issue --help"
|
||||
---
|
||||
|
||||
# gitlink-research-progress-tracker
|
||||
|
||||
开始前必须先阅读 `../gitlink-shared/SKILL.md`,确认认证、权限、安全规则和 GitLink API 注意事项。
|
||||
|
||||
## 安全规则
|
||||
|
||||
- 默认只读执行。
|
||||
- 所有 GitLink 操作必须使用 `gitlink-cli`。
|
||||
- 所有命令使用 `--format json`。
|
||||
- 不输出 Token、Cookie 或认证 Header。
|
||||
- 不自动关闭 Issue、不合并 PR、不发布周报评论。
|
||||
- 如果用户要求发布周报到 Issue,先生成 dry-run 草稿并等待确认。
|
||||
|
||||
## 工作流
|
||||
|
||||
1. 获取仓库概览:
|
||||
|
||||
```bash
|
||||
gitlink-cli repo +info --owner <owner> --repo <repo> --format json
|
||||
```
|
||||
|
||||
2. 获取协作队列:
|
||||
|
||||
```bash
|
||||
gitlink-cli issue +list --owner <owner> --repo <repo> --state open --format json
|
||||
gitlink-cli issue +list --owner <owner> --repo <repo> --state closed --format json
|
||||
gitlink-cli pr +list --owner <owner> --repo <repo> --state open --format json
|
||||
gitlink-cli pr +list --owner <owner> --repo <repo> --state merged --format json
|
||||
```
|
||||
|
||||
3. 获取版本和贡献者信息:
|
||||
|
||||
```bash
|
||||
gitlink-cli release +list --owner <owner> --repo <repo> --format json
|
||||
gitlink-cli repo +contributors --owner <owner> --repo <repo> --format json
|
||||
```
|
||||
|
||||
如果当前 CLI 版本没有 `repo +contributors`,回退:
|
||||
|
||||
```bash
|
||||
gitlink-cli api GET /<owner>/<repo>/contributors --format json
|
||||
```
|
||||
|
||||
4. 按 `references/risk-model.md` 判断风险,并生成周报。
|
||||
|
||||
## 输出格式
|
||||
|
||||
```markdown
|
||||
# 科研项目周报:<owner>/<repo>
|
||||
|
||||
## 本期概览
|
||||
|
||||
| 指标 | 数值 |
|
||||
|---|---:|
|
||||
| 开放 Issue | ... |
|
||||
| 已关闭 Issue | ... |
|
||||
| 开放 PR | ... |
|
||||
| 已合并 PR | ... |
|
||||
| Release 数 | ... |
|
||||
| 贡献者 | ... |
|
||||
|
||||
## 风险预警
|
||||
|
||||
| 风险 | 等级 | 证据 | 建议 |
|
||||
|---|---|---|---|
|
||||
|
||||
## 下一步建议
|
||||
|
||||
1. ...
|
||||
```
|
||||
|
||||
## 分析原则
|
||||
|
||||
- 先报告事实,再给建议。
|
||||
- 把“没有数据”和“数据为 0”区分开。
|
||||
- 如果 PR/Issue 的 state 过滤不精确,根据返回字段二次归类,并在报告中说明。
|
||||
- 重点识别阻塞项:长期开放 Issue、开放 PR 堆积、无 Release、近期无维护活动、单人维护风险。
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
# 科研周报示例
|
||||
|
||||
用户请求:
|
||||
|
||||
```text
|
||||
请给 songhui18/ICCV2021 生成一份科研项目进度周报和风险预警。
|
||||
```
|
||||
|
||||
Agent 步骤:
|
||||
|
||||
```bash
|
||||
gitlink-cli repo +info --owner songhui18 --repo ICCV2021 --format json
|
||||
gitlink-cli issue +list --owner songhui18 --repo ICCV2021 --state open --format json
|
||||
gitlink-cli issue +list --owner songhui18 --repo ICCV2021 --state closed --format json
|
||||
gitlink-cli pr +list --owner songhui18 --repo ICCV2021 --state open --format json
|
||||
gitlink-cli pr +list --owner songhui18 --repo ICCV2021 --state merged --format json
|
||||
gitlink-cli release +list --owner songhui18 --repo ICCV2021 --format json
|
||||
```
|
||||
|
||||
预期回答:
|
||||
|
||||
- 提供简洁的科研项目周报。
|
||||
- 识别前三个风险并给出证据。
|
||||
- 除非用户明确要求,不写回评论。
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
# 科研进度风险模型
|
||||
|
||||
| 风险 | 等级 | 判定线索 | 建议 |
|
||||
|---|---|---|---|
|
||||
| Issue 堆积 | 中/高 | 开放 Issue 明显多于关闭 Issue,或关键问题长期未响应 | 分类 Issue,标注优先级,安排负责人 |
|
||||
| PR 堆积 | 中/高 | 开放 PR 多且缺少 review/merge 记录 | 建立 review 节奏,先处理小 PR |
|
||||
| 版本停滞 | 中 | 无 Release 或长期无 Release | 为阶段性实验结果建立 Release |
|
||||
| 维护停滞 | 高 | 仓库更新时间较久且仍有开放问题 | 明确是否归档、继续维护或招募维护者 |
|
||||
| 单点维护 | 中 | 贡献者数量很少 | 补贡献指南和 onboarding 任务 |
|
||||
| 数据不足 | 低 | API 缺失或仓库未启用对应功能 | 标注数据不可用,不推断过度结论 |
|
||||
|
|
@ -1,356 +1,94 @@
|
|||
---
|
||||
name: gitlink-research-reproducibility
|
||||
version: 1.0.0
|
||||
description: "科研复现性评估:扫描科研代码仓库的环境依赖、数据可得性、运行说明、结果产物、文档与代码质量,生成可量化的《复现性评分报告》(0-100 分 + A/B/C/D 等级 + 风险等级 + 修复清单)。当用户需要评估科研项目能否被他人复现、排查复现障碍、准备论文配套代码开源时触发。"
|
||||
version: 0.1.0
|
||||
description: "科研仓库复现性审计:检查 GitLink 科研、论文复现、实验代码仓库是否具备 README、LICENSE、依赖清单、测试入口、CI、示例和数据/实验说明。用于生成复现性评分、缺失项和整改建议。"
|
||||
metadata:
|
||||
requires:
|
||||
bins: ["gitlink-cli"]
|
||||
cliHelp: "gitlink-cli repo --help"
|
||||
---
|
||||
|
||||
# gitlink-research-reproducibility(科研复现性评估)
|
||||
# gitlink-research-reproducibility
|
||||
|
||||
**CRITICAL — 开始前必须先阅读 [`../gitlink-shared/SKILL.md`](../gitlink-shared/SKILL.md),其中包含认证、权限处理和 API 注意事项。**
|
||||
**CRITICAL — GitLink 操作只能用 `gitlink-cli`。禁止用 `gh`(GitHub CLI)操作 GitLink 资源。`gh` 仅适用于 GitHub 平台。**
|
||||
**CRITICAL — 本技能为只读分析型,不修改任何仓库内容;如需创建修复 Issue,须先确认用户意图。**
|
||||
开始前必须先阅读 `../gitlink-shared/SKILL.md`,确认认证、权限、安全规则和 GitLink API 注意事项。
|
||||
|
||||
> **前置条件:** 先阅读 [`../gitlink-shared/SKILL.md`](../gitlink-shared/SKILL.md) 了解认证和全局参数。
|
||||
## 安全规则
|
||||
|
||||
## 功能概述
|
||||
- 只读执行,不创建 Issue、不评论、不修改仓库。
|
||||
- 所有 GitLink 操作必须使用 `gitlink-cli`。
|
||||
- 所有命令使用 `--format json`。
|
||||
- 不输出 Token、Cookie 或认证 Header。
|
||||
- 如果用户要求回写整改清单,先输出 dry-run 文本并等待确认。
|
||||
|
||||
本技能回答科研场景的一个核心问题:**「这个科研仓库,别人能照着把它跑出来吗?」**
|
||||
## 工作流
|
||||
|
||||
学术界长期存在「可复现性危机」——论文发表了,配套代码仓库却因为缺依赖说明、缺数据、缺运行脚本、缺随机种子而无法复现。本技能通过组合 gitlink-cli 的只读命令,对一个科研仓库进行**六维复现性体检**,输出**可量化的复现性评分(0–100)**、等级(A/B/C/D)、复现风险等级,以及**按优先级排序的修复清单**。
|
||||
|
||||
### 六维复现性评估模型
|
||||
|
||||
| 维度 | 权重 | 核心问题 |
|
||||
|------|------|----------|
|
||||
| 1. 环境可复现性(Environment) | 25 | 依赖与运行环境是否被明确锁定? |
|
||||
| 2. 数据可得性(Data) | 20 | 实验所需数据能否获取? |
|
||||
| 3. 运行可复现性(Execution) | 20 | 是否有清晰的运行入口与步骤? |
|
||||
| 4. 结果可复现性(Result) | 15 | 能否验证跑出的结果与论文一致? |
|
||||
| 5. 文档完整性(Documentation) | 10 | README/引用/许可是否齐备? |
|
||||
| 6. 代码可维护性(Maintainability) | 10 | 是否有测试/CI/合理结构? |
|
||||
|
||||
> **总分 = 各维度得分加权求和(满分 100)。** 评分规则见第三节。
|
||||
|
||||
---
|
||||
|
||||
## 一、确定评估目标并采集元数据
|
||||
|
||||
### 1.1 解析 owner/repo
|
||||
1. 确认目标仓库:
|
||||
|
||||
```bash
|
||||
# 在科研仓库目录下,自动解析 owner/repo
|
||||
gitlink-cli repo +info --format json
|
||||
|
||||
# 或显式指定
|
||||
gitlink-cli repo +info --owner <owner> --repo <repo> --format json
|
||||
```
|
||||
|
||||
从返回中提取并记录:`name`、`description`、`language`、`license`、`default_branch`、
|
||||
`updated_at`、`created_at`、`forked_from_project_id`(用于排除纯 fork)。
|
||||
2. 识别默认分支。优先使用 `repo +info` 返回的 `default_branch` 或 `default_branch_name`。没有字段时再询问用户,或使用 `master` 作为 GitLink 常见默认值。
|
||||
|
||||
### 1.2 采集主语言与发行物
|
||||
3. 采集根目录文件树:
|
||||
|
||||
```bash
|
||||
# 语言分布(判断技术栈,决定后续要找哪些依赖清单)
|
||||
gitlink-cli repo +languages --owner <owner> --repo <repo> --format json
|
||||
|
||||
# 发行版(是否有打 tag / checkpoint / 结果产物)
|
||||
gitlink-cli release +list --owner <owner> --repo <repo> --format json
|
||||
|
||||
# 标签(是否有版本快照,复现需要可定位的版本)
|
||||
gitlink-cli repo +tags --owner <owner> --repo <repo> --format json
|
||||
gitlink-cli repo +tree --owner <owner> --repo <repo> --ref <branch> --format json
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 二、六维证据采集
|
||||
|
||||
### 2.1 维度一 · 环境可复现性(Environment,25 分)
|
||||
|
||||
**目标:判断依赖与运行环境是否被明确锁定。**
|
||||
如果当前 CLI 版本没有 `repo +tree`,回退 Raw API:
|
||||
|
||||
```bash
|
||||
# 列出仓库根目录文件树,识别依赖清单与容器文件
|
||||
gitlink-cli repo +tree --owner <owner> --repo <repo> --format json
|
||||
gitlink-cli api GET /<owner>/<repo>/sub_entries --query 'filepath=&ref=<branch>' --format json
|
||||
```
|
||||
|
||||
在文件树中检测以下**依赖/环境证据**(按语言):
|
||||
|
||||
```
|
||||
Python: requirements.txt / environment.yml / Pipfile / pyproject.toml / setup.py / poetry.lock
|
||||
Conda: environment.yml / conda.yaml
|
||||
容器: Dockerfile / docker-compose.yml / .devcontainer/
|
||||
Go: go.mod / go.sum
|
||||
Node: package.json / package-lock.json / yarn.lock
|
||||
Java: pom.xml / build.gradle
|
||||
R: renv.lock / DESCRIPTION
|
||||
Julia: Project.toml / Manifest.toml
|
||||
通用环境: Makefile / .python-version / runtime.txt
|
||||
```
|
||||
|
||||
对找到的关键清单,进一步检查**是否锁定版本**:
|
||||
4. 如根目录存在 `docs`、`examples`、`data`、`experiments`、`notebooks`、`tests`、`.github`、`.gitlink`,按需采集一层子目录用于证据补强:
|
||||
|
||||
```bash
|
||||
# 读取依赖清单内容,判断是否 pin 版本(如 numpy==1.24.3 vs numpy)
|
||||
gitlink-cli api GET /:owner/:repo/raw/requirements.txt --format json
|
||||
# 或通过 contents 接口
|
||||
gitlink-cli api GET "/:owner/:repo/contents/requirements.txt" --format json
|
||||
gitlink-cli repo +tree --owner <owner> --repo <repo> --path docs --ref <branch> --format json
|
||||
```
|
||||
|
||||
> ⚠️ `:owner` / `:repo` 为占位符,调用时替换为真实值。若 raw 路径取不到,回退用 `repo +files` 或 contents 接口。
|
||||
5. 按 `references/checklist.md` 的评分表生成报告。没有读取子目录证据时,报告必须标注“仅基于根目录文件树”。
|
||||
|
||||
**评分细则(满分 25):**
|
||||
|
||||
```
|
||||
+8 存在至少一个依赖清单(requirements/environment/go.mod/package.json…)
|
||||
+6 依赖清单锁定了具体版本(== / 锁文件存在)
|
||||
+6 存在容器化定义(Dockerfile / docker-compose / devcontainer)
|
||||
+3 存在一键环境搭建脚本或 Makefile install 目标
|
||||
+2 README 明确写出语言/框架/硬件(GPU/CUDA)版本要求
|
||||
(无任何依赖清单 → 本维度 0 分)
|
||||
```
|
||||
|
||||
### 2.2 维度二 · 数据可得性(Data,20 分)
|
||||
|
||||
**目标:判断复现实验所需数据能否获取。GitLink 的数据集能力是本维度的关键加分项。**
|
||||
|
||||
```bash
|
||||
# 查询本仓库绑定的 GitLink 科研数据集(复用 dataset 能力)
|
||||
gitlink-cli dataset +view --owner <owner> --repo <repo> --format json
|
||||
```
|
||||
|
||||
> ⚠️ **实测提示:** 若仓库未绑定数据集,该命令会返回 `404`(如 `[404] 您访问的页面不存在或已被删除`)。
|
||||
> 这是**正常信号**,应判定为「无绑定数据集」(本维度该项不加分),**不要当作执行失败而中断**。
|
||||
|
||||
并在文件树中检测:`data/`、`datasets/`、`*.csv/*.json/*.npz`(小样例数据)、
|
||||
数据下载脚本(`download_data.sh`、`get_data.py`、`data/README.md`)、
|
||||
README 中的数据链接(含 `huggingface.co`、`zenodo.org`、`figshare`、网盘、`dataset` 字样)。
|
||||
|
||||
**评分细则(满分 20):**
|
||||
|
||||
```
|
||||
+8 绑定了 GitLink 数据集 或 README/脚本给出可访问的数据获取方式
|
||||
+5 提供数据下载/预处理脚本(download/preprocess)
|
||||
+4 仓库内含小规模样例数据,便于快速冒烟测试
|
||||
+3 数据附带说明(来源、规模、格式、许可/隐私声明)
|
||||
(无任何数据获取线索 → 本维度 0 分;纯算法/无数据类项目按"不适用"记满分并在报告中标注)
|
||||
```
|
||||
|
||||
### 2.3 维度三 · 运行可复现性(Execution,20 分)
|
||||
|
||||
**目标:判断是否有清晰的运行入口与步骤。**
|
||||
|
||||
```bash
|
||||
# 读取 README,提取"运行/使用/快速开始"章节
|
||||
gitlink-cli repo +readme --owner <owner> --repo <repo> --format json
|
||||
```
|
||||
|
||||
在 README 与文件树中检测:
|
||||
- 运行入口脚本:`run.sh` / `train.py` / `main.py` / `Makefile`(run/train 目标)/ `scripts/`
|
||||
- README 是否含 **可复制的命令块**(```bash ... ```)覆盖 安装 → 运行 → 评估
|
||||
- 配置管理:`config/`、`*.yaml/*.json` 配置、命令行参数说明
|
||||
|
||||
**评分细则(满分 20):**
|
||||
|
||||
```
|
||||
+8 README 含可直接复制运行的命令(从安装到出结果)
|
||||
+6 存在明确的运行入口(脚本/Makefile/CLI),无需读源码猜
|
||||
+4 关键超参/路径通过配置文件或命令行参数暴露,而非硬编码
|
||||
+2 区分了训练 / 推理 / 评估的不同入口
|
||||
```
|
||||
|
||||
### 2.4 维度四 · 结果可复现性(Result,15 分)
|
||||
|
||||
**目标:判断能否验证复现结果与论文/声明一致。**
|
||||
|
||||
在 README、文件树与发行物中检测:
|
||||
- 随机种子设置(README 提及 `seed`,或代码中 `set_seed`/`random_state`)
|
||||
- 预期结果:README 含指标表格 / 期望精度 / 基线对比
|
||||
- 结果产物:`results/`、`outputs/`、`logs/`、预训练权重(`*.pt/*.ckpt/*.h5` 或 release 附件)
|
||||
- 评估脚本:`eval.py` / `evaluate.sh` / `test/` 基准
|
||||
|
||||
```bash
|
||||
# 发行版常用于发布权重/结果产物
|
||||
gitlink-cli release +list --owner <owner> --repo <repo> --format json
|
||||
```
|
||||
|
||||
**评分细则(满分 15):**
|
||||
|
||||
```
|
||||
+5 README 给出可对照的预期结果(指标/表格/曲线)
|
||||
+4 提供独立的评估/复现脚本
|
||||
+3 明确设置并说明随机种子,保证可重复
|
||||
+3 提供预训练权重/checkpoint 或结果产物(含 release 附件)
|
||||
```
|
||||
|
||||
### 2.5 维度五 · 文档完整性(Documentation,10 分)
|
||||
|
||||
```bash
|
||||
gitlink-cli repo +readme --owner <owner> --repo <repo> --format json
|
||||
gitlink-cli repo +info --owner <owner> --repo <repo> --format json # 含 license 字段
|
||||
```
|
||||
|
||||
**评分细则(满分 10):**
|
||||
|
||||
```
|
||||
+4 README 结构完整(简介/安装/使用/结果/引用 至少覆盖 4 项)
|
||||
+3 含 LICENSE(开源许可,复现/复用的法律前提)
|
||||
+2 含论文/项目引用信息(arXiv / DOI / BibTeX / 顶会顶刊名)
|
||||
+1 提供中英文双语 README 之一以上的清晰说明
|
||||
```
|
||||
|
||||
### 2.6 维度六 · 代码可维护性(Maintainability,10 分)
|
||||
|
||||
```bash
|
||||
gitlink-cli repo +tree --owner <owner> --repo <repo> --format json
|
||||
gitlink-cli repo +contributor-stats --owner <owner> --repo <repo> --format json
|
||||
```
|
||||
|
||||
**评分细则(满分 10):**
|
||||
|
||||
```
|
||||
+4 存在测试(tests/ / *_test.* / test_*.py)
|
||||
+3 存在 CI 配置(.gitea/workflows、.github/workflows、.gitlink)
|
||||
+2 目录结构清晰(源码/脚本/配置/文档分离,而非全堆根目录)
|
||||
+1 近 6 个月有维护更新(updated_at),降低"年久失修跑不通"风险
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 三、评分汇总与分级
|
||||
|
||||
### 3.1 计算总分
|
||||
|
||||
```
|
||||
总分 = E(环境/25) + D(数据/20) + X(运行/20) + R(结果/15) + Doc(文档/10) + M(可维护/10)
|
||||
```
|
||||
|
||||
> 若项目天然「不适用」某维度(如纯理论/无数据项目的"数据可得性"),将该维度按比例剔除后归一化到 100,并在报告中显式标注「数据维度不适用」。
|
||||
|
||||
### 3.2 等级与风险映射
|
||||
|
||||
| 总分 | 等级 | 复现风险 | 含义 |
|
||||
|------|------|----------|------|
|
||||
| 85–100 | **A** | 🟢 低 | 他人可顺利复现,开源就绪 |
|
||||
| 70–84 | **B** | 🟡 中低 | 基本可复现,少量补充即可 |
|
||||
| 50–69 | **C** | 🟠 中高 | 需补关键材料才能复现 |
|
||||
| 0–49 | **D** | 🔴 高 | 当前几乎无法被他人复现 |
|
||||
|
||||
### 3.3 复现性雷达(ASCII)
|
||||
|
||||
```
|
||||
环境
|
||||
★★★★★★★★☆☆ 20/25
|
||||
╲ ╱
|
||||
可维护 ╲ ╱ 数据
|
||||
★★★★★★★☆☆☆ ╲ ╱ ★★★★★★☆☆☆☆ 12/20
|
||||
7/10 ╲ ╱
|
||||
★
|
||||
╱ ╲
|
||||
╱ ╲
|
||||
文档 ╱ ╲ 运行
|
||||
★★★★★★★★☆☆ 8/10 ★★★★★★★☆☆☆ 14/20
|
||||
结果 ★★★★★★★★☆☆ 12/15
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 四、完整复现性评估报告模板
|
||||
## 输出格式
|
||||
|
||||
```markdown
|
||||
## 🔬 科研复现性评估报告
|
||||
# 科研复现性审计:<owner>/<repo>
|
||||
|
||||
**评估对象:** <owner>/<repo>
|
||||
**评估时间:** 2026-06-15
|
||||
**主语言:** Python **许可证:** MIT **最近更新:** 2026-05-30
|
||||
**数据来源:** GitLink 平台(gitlink-cli 只读采集)
|
||||
## 总分
|
||||
|
||||
---
|
||||
<score>/100
|
||||
|
||||
### 一、复现性总评
|
||||
## 检查明细
|
||||
|
||||
| 项目 | 结果 |
|
||||
|------|------|
|
||||
| **复现性总分** | **74 / 100** |
|
||||
| **等级** | **B** |
|
||||
| **复现风险** | 🟡 中低 |
|
||||
| 一句话结论 | 环境与运行说明完善,主要短板在"数据可得性"与"结果可对照性" |
|
||||
| 项目 | 分值 | 结果 | 证据 | 建议 |
|
||||
|---|---:|---|---|---|
|
||||
| README | 20 | 通过/缺失 | root_entries | ... |
|
||||
|
||||
### 二、六维明细
|
||||
## 优先整改
|
||||
|
||||
| 维度 | 得分 | 关键发现 |
|
||||
|------|------|----------|
|
||||
| 环境可复现性 | 20 / 25 | ✅ requirements.txt 已 pin 版本;✅ Dockerfile;❌ 未说明 CUDA 版本 |
|
||||
| 数据可得性 | 12 / 20 | ✅ README 给出 Zenodo 链接;❌ 无下载脚本;❌ 无样例数据 |
|
||||
| 运行可复现性 | 14 / 20 | ✅ README 有完整命令;✅ train.py 入口;❌ 超参硬编码在脚本里 |
|
||||
| 结果可复现性 | 12 / 15 | ✅ 指标表格;✅ eval.py;✅ 设种子;❌ 未提供 checkpoint |
|
||||
| 文档完整性 | 8 / 10 | ✅ 结构完整;✅ LICENSE;✅ arXiv 引用;❌ 仅中文 README |
|
||||
| 代码可维护性 | 8 / 10 | ✅ tests/;✅ CI;✅ 结构清晰;✅ 近期维护 |
|
||||
1. ...
|
||||
2. ...
|
||||
3. ...
|
||||
|
||||
### 三、复现性雷达
|
||||
## 数据来源
|
||||
|
||||
(插入第 3.3 节 ASCII 雷达图,数值替换为实际得分)
|
||||
|
||||
### 四、修复清单(按优先级 / 投入产出比排序)
|
||||
|
||||
| 优先级 | 行动项 | 预计提分 | 维度 |
|
||||
|--------|--------|----------|------|
|
||||
| 🔴 P0 | 提供数据下载脚本 `download_data.sh` 并在 README 标注数据规模 | +5 | 数据 |
|
||||
| 🔴 P0 | 将训练超参从脚本抽到 `config.yaml`,命令行可覆盖 | +4 | 运行 |
|
||||
| 🟠 P1 | 通过 GitLink Release 发布预训练 checkpoint | +3 | 结果 |
|
||||
| 🟠 P1 | 在依赖说明中补充 CUDA / 驱动版本 | +2 | 环境 |
|
||||
| 🟢 P2 | 补充英文 README,扩大国际可复现受众 | +1 | 文档 |
|
||||
|
||||
**预计修复后总分:74 → 89(B → A,复现风险 🟡 → 🟢)**
|
||||
|
||||
### 五、复现就绪度结论
|
||||
|
||||
> 该仓库工程化基础良好,核心障碍集中在「数据获取」与「结果对照」。
|
||||
> 完成 P0 两项(约半天工作量)即可跨越「可被他人独立复现」的门槛,建议在论文正式开源前完成。
|
||||
- `repo +info`
|
||||
- `repo +tree` 或 `api GET /sub_entries`
|
||||
```
|
||||
|
||||
---
|
||||
## 判定规则
|
||||
|
||||
## 五、执行步骤总览
|
||||
|
||||
```bash
|
||||
# Step 1:采集仓库元数据与技术栈
|
||||
gitlink-cli repo +info --owner <owner> --repo <repo> --format json
|
||||
gitlink-cli repo +languages --owner <owner> --repo <repo> --format json
|
||||
|
||||
# Step 2:取文件树(六维证据的主要来源)
|
||||
gitlink-cli repo +tree --owner <owner> --repo <repo> --format json
|
||||
|
||||
# Step 3:读 README(运行/数据/结果章节)
|
||||
gitlink-cli repo +readme --owner <owner> --repo <repo> --format json
|
||||
|
||||
# Step 4:数据可得性(复用数据集能力)
|
||||
gitlink-cli dataset +view --owner <owner> --repo <repo> --format json
|
||||
|
||||
# Step 5:结果产物 / 版本快照
|
||||
gitlink-cli release +list --owner <owner> --repo <repo> --format json
|
||||
gitlink-cli repo +tags --owner <owner> --repo <repo> --format json
|
||||
|
||||
# Step 6:按需读取关键依赖清单内容判断版本锁定
|
||||
gitlink-cli api GET "/:owner/:repo/contents/requirements.txt" --format json
|
||||
|
||||
# Step 7:可维护性信号
|
||||
gitlink-cli repo +contributor-stats --owner <owner> --repo <repo> --format json
|
||||
|
||||
# Step 8:AI 按第三节规则评分、第四节模板出报告
|
||||
```
|
||||
|
||||
---
|
||||
- README:`README.md`、`README.zh-CN.md`、`readme`。
|
||||
- LICENSE:`LICENSE`、`LICENSE.md`、`LICENSE.txt`。
|
||||
- 依赖清单:`requirements.txt`、`pyproject.toml`、`environment.yml`、`package.json`、`go.mod`、`Cargo.toml`、`pom.xml` 等。
|
||||
- 测试入口:`tests`、`test`、`__tests__`。
|
||||
- CI 配置:`.github`、`.gitlink`、`.gitlab-ci.yml`、`Jenkinsfile`、`.circleci`。
|
||||
- 示例或文档:`docs`、`examples`、`demo`。
|
||||
- 数据或实验说明:`data`、`datasets`、`experiments`、`notebooks`。
|
||||
|
||||
## 注意事项
|
||||
|
||||
- ✅ **纯只读**:本技能不创建/修改/删除任何仓库内容,对被评估仓库零副作用。
|
||||
- ✅ **"不适用"维度需归一化**:纯理论/无数据项目应剔除数据维度后重新归一到 100,并在报告标注。
|
||||
- ⚠️ **文件树可能分页或较大**:大仓库可只取根目录与关键子目录(如 `data/`、`scripts/`、`tests/`),避免全量拉取。
|
||||
- ⚠️ **raw/contents 取文件**:若 `repo +readme` 已返回 README,则无需再单独取;依赖清单内容用 contents/raw 接口按需读取,失败则降级为"仅凭文件存在性评分"。
|
||||
- ✅ **评分透明可追溯**:报告中每一维度都要列出"加了哪几分、因为看到什么证据",便于科研人员据此整改。
|
||||
- ✅ **最终产出为 Markdown 报告**,可直接粘贴进项目 Wiki 或论文附录。
|
||||
- 复现性评分是工程辅助判断,不等同于论文质量评价。
|
||||
- GitLink 平台 API 可能返回字段差异,缺失字段时用“未知”而不是编造。
|
||||
- 如果仓库是镜像仓库,需标注 GitLink 内协作数据可能不代表原平台活跃度。
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
# 复现性审计示例
|
||||
|
||||
用户请求:
|
||||
|
||||
```text
|
||||
请用 GitLink 分析 songhui18/ICCV2021 的论文复现性,输出缺失项和整改优先级。
|
||||
```
|
||||
|
||||
Agent 步骤:
|
||||
|
||||
```bash
|
||||
gitlink-cli repo +info --owner songhui18 --repo ICCV2021 --format json
|
||||
gitlink-cli repo +tree --owner songhui18 --repo ICCV2021 --ref master --format json
|
||||
gitlink-cli api GET /songhui18/ICCV2021/sub_entries --query 'filepath=&ref=master' --format json
|
||||
```
|
||||
|
||||
预期回答:
|
||||
|
||||
- 列出已采集的命令名称。
|
||||
- 对 README、LICENSE、依赖、测试、CI、示例/文档和数据说明评分。
|
||||
- 优先列出前三个整改项,再给可选优化建议。
|
||||
- 声明未执行写操作。
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
# 复现性检查清单
|
||||
|
||||
| 项目 | 分值 | 通过条件 | 缺失时建议 |
|
||||
|---|---:|---|---|
|
||||
| README | 20 | 根目录存在 README,且能说明项目目标、安装或运行方式 | 补充项目背景、环境准备、最小运行命令 |
|
||||
| LICENSE | 15 | 根目录存在 LICENSE 文件 | 选择合适开源许可证并在 README 中声明 |
|
||||
| 依赖清单 | 15 | 存在语言对应依赖文件 | 补充 requirements.txt、pyproject.toml、environment.yml、go.mod 等 |
|
||||
| 测试入口 | 20 | 存在 tests/test/__tests__ 或可运行验证脚本 | 提供最小单元测试或 smoke test |
|
||||
| CI 配置 | 10 | 存在 CI 配置目录或文件 | 增加基础 lint/test CI |
|
||||
| 示例或文档 | 10 | 存在 docs/examples/demo | 补充复现实验步骤或示例输入输出 |
|
||||
| 数据或实验说明 | 10 | 存在 data/datasets/experiments/notebooks 或 README 中明确说明 | 写明数据来源、下载方式、实验配置 |
|
||||
Loading…
Reference in New Issue