reviewproof-kit

MoonBit-native review feedback, overlap disclosure and resubmission proof toolkit

review
resubmission
provenance
license
mooncakes
moon add WB-ai-nb/reviewproof-kit@0.3.1
Download zip
Author
Version
0.3.1
License
MIT
Last updated
5 hours ago
Downloads
7
README

#ReviewProof

ReviewProof 是一个 MoonBit 原生的初审反馈复核与补正证明工具包。它把“驳回通知、相似 Mooncakes 包、关系说明、新增差异功能、补正证据和复审材料”建模成可测试的数据结构,帮助参赛者把复审材料写清楚、测得动、查得到。

#初审反馈处理说明

本项目 0.1.x 曾以 HarborCheck 名义提交,官方初审反馈指出其与已有 Mooncakes 项目 EJJ-ai-nb/harborcheck@0.1.2 高度重叠,且申报书未说明扩展关系。

0.2.0 起,本项目按反馈完成补正;0.3.0 加入可提交的复审证据档案 dossier;0.3.1 进一步加入非重复边界矩阵:

  • 公开承认并记录相关先行项目:EJJ-ai-nb/harborcheck,许可证 MIT;
  • 不再把通用 README 示例检查、来源证明和发布清单检查作为唯一创新点;
  • 新增 ReviewFeedbackPriorWorkExtensionEvidenceReviewResponse
  • 新增复审补正报告生成:review_feedback_response / review_feedback_markdown
  • 新增复审证据档案生成:resubmission_dossier / resubmission_dossier_markdown
  • 新增非重复边界矩阵:BoundaryMatrix / boundary_matrix_markdown,明确区分先行项目重叠、辅助兼容能力和 ReviewProof 新贡献;
  • 新增测试覆盖“缺少关系说明会失败”和“补齐差异证据后可复审”两条核心路径;
  • 有效 MoonBit 代码规模已达到 5,000+ 行,当前本地统计为 5,024 行;
  • 申报书、研究说明和复审说明已明确写出与相似项目的关系和差异。

仓库路径仍保留为 WB-ai-nb/harborcheck,只是为了保留比赛期间的提交记录、CI 记录和历史链接;本次申报项目名称、Mooncakes 包名、README、API 和申报书均以 ReviewProof 为准。

#解决什么问题

黑客松项目被驳回时,常见问题不是代码完全不能跑,而是材料没有解释清楚:项目是否与已有包重复、参考了谁、许可证是否合规、新增工作到底在哪里、复审时应该提交哪些证据。ReviewProof 的边界就是把这些复审证据变成 MoonBit 可检查、可导出的报告。

#安装方式

moon add WB-ai-nb/reviewproof-kit

Mooncakes 包名:WB-ai-nb/reviewproof-kit

#最小使用示例

test {
let feedback = @reviewproof.example_review_feedback()
let response = @reviewproof.review_feedback_response(feedback)
inspect(response.verdict, content="resubmit-ready")
}

完整示例位于 examples/basic

moon run examples/basic

CLI smoke 入口位于 cmd/main

moon run cmd/main

正常输出包含:

review-proof=resubmit-ready dossier=dossier-ready boundary=distinct

#核心 API

  • PriorWork(...):记录相似或先行 Mooncakes 项目、版本、仓库、许可证、重叠范围和关系说明;
  • ExtensionEvidence(...):记录本项目新增功能、实现文件、证明材料、用户价值和完成状态;
  • ReviewFeedback(...):汇总驳回通知、申报包、仓库、先行项目、关系说明和补正截止时间;
  • review_feedback_response(feedback):生成复审状态、得分、重叠风险和检查项;
  • review_feedback_markdown(feedback):导出复审补正说明,可粘贴到申报材料;
  • example_review_feedback():内置本项目针对 EJJ-ai-nb/harborcheck 初审反馈的补正样例;
  • DossierProfile(...):记录申报人、联系方式、包名、仓库、反馈摘要、证据、时间线和风险;
  • resubmission_dossier(profile):检查复审证据是否足以支撑再次提交;
  • resubmission_dossier_markdown(profile):导出可提交的复审证据档案;
  • dossier_summary_line(report):输出 CLI/CI 友好的简短状态行;
  • BoundaryMatrix(...):把“先行项目重叠、辅助兼容、新增贡献、明确不做”拆成可检查记录;
  • boundary_matrix_report(matrix):检查项目是否具备足够清晰的非重复边界;
  • boundary_matrix_markdown(matrix):导出非重复边界证明,减少再次被误判为同范围项目的风险;
  • doc_proof(...)acceptance_identity_report(...)audit(...):保留为辅助证据能力,用于证明 README 示例、来源、身份和基础验收材料。

#支持范围

  • 初审或复审反馈文本建模;
  • 相似 Mooncakes 包和许可证关系记录;
  • 项目差异化功能证据矩阵;
  • 复审补正 Markdown 报告生成;
  • 复审证据档案、时间线和风险关闭情况生成;
  • 非重复边界矩阵和仓库名保留说明;
  • 申报身份、仓库、Mooncakes 包名一致性检查;
  • README 示例和来源证明作为辅助证据;
  • CI、测试、示例、发布状态作为辅助验收清单。

#暂不支持范围

  • 不自动联网搜索所有 Mooncakes 包;
  • 不替代人工判断项目是否重复;
  • 不自动修改报名问卷;
  • 不执行任意 README 命令;
  • 不把已有项目的通用功能包装成新项目创新点。

#本地验证

moon check --deny-warn moon build moon test --deny-warn moon fmt --check moon run examples/basic moon run cmd/main moon package --list

#开源许可证和第三方说明

ReviewProof 使用 MIT License。仓库未引入第三方源码文件、图片、音频、字体或私有素材。EJJ-ai-nb/harborcheck 被记录为评审反馈指出的相关先行项目和对比对象;本项目不把与其重叠的通用检查能力作为新增创新点,0.3.1 的新增边界是复审反馈复核、关系披露、差异证据矩阵、补正报告生成、复审证据档案生成和非重复边界证明。

#Mooncakes 发布

https://mooncakes.io/docs/WB-ai-nb/reviewproof-kit https://mooncakes.io/api/v0/manifest/WB-ai-nb/reviewproof-kit

#维护资料

  • SUBMISSION.md:补正后的项目申报书;
  • docs/review-response.md:可用于回复初审驳回的复审补正说明;
  • docs/API.md:API 说明;
  • docs/design.md:设计说明;
  • docs/research.md:查重和差异化说明;
  • docs/issues.md:Issue 记录;
  • docs/test-record.md:测试记录;
  • docs/release-checklist.md:发布检查清单;
  • CHANGELOG.md:版本发布记录;
  • FINAL_ACCEPTANCE.md:最终验收链接和证据。

#
AuditMetrics

pub(all) struct AuditMetrics {
pass_count : Int
warn_count : Int
fail_count : Int
command_count : Int
test_fixture_count : Int
example_count : Int
} derive(Eq,
Debug
)

#
AuditReport

pub(all) struct AuditReport {
project_name : String
score : Int
max_score : Int
verdict : String
package_name : String
repository : String
findings : Array[Finding]
metrics : AuditMetrics
} derive(Eq,
Debug
)

#
AuditReport::has_blockers

fn AuditReport::has_blockers(self : AuditReport) -> Bool

#
AuditReport::repair_steps

fn AuditReport::repair_steps(self : AuditReport) -> Array[RepairStep]

#
AuditReport::to_json

fn AuditReport::to_json(self : AuditReport) -> String

#
AuditReport::to_markdown

fn AuditReport::to_markdown(self : AuditReport) -> String

#
AuditReport::to_release_checklist

fn AuditReport::to_release_checklist(self : AuditReport) -> String

#
BoundaryFinding

pub(all) struct BoundaryFinding {
id : String
severity : Severity
title : String
detail : String
action : String
evidence : String
penalty : Int
} derive(Eq,
Debug
)

#
BoundaryItem

pub(all) struct BoundaryItem {
id : String
claim : String
role : BoundaryRole
related_package : String
implementation : String
proof : String
reviewer_note : String
} derive(Eq,
Debug
)

#
BoundaryItem::BoundaryItem

fn BoundaryItem::BoundaryItem(id? : String, claim? : String, role? : BoundaryRole, related_package? : String, implementation? : String, proof? : String, reviewer_note? : String) -> BoundaryItem

#
BoundaryMatrix

pub(all) struct BoundaryMatrix {
project_title : String
package_name : String
repository : String
related_prior_work : String
repository_name_note : String
items : Array[BoundaryItem]
} derive(Eq,
Debug
)

#
BoundaryMatrix::BoundaryMatrix

fn BoundaryMatrix::BoundaryMatrix(project_title? : String, package_name? : String, repository? : String, related_prior_work? : String, repository_name_note? : String, items? : Array[BoundaryItem]) -> BoundaryMatrix

#
BoundaryReport

pub(all) struct BoundaryReport {
verdict : String
score : Int
duplicate_risk : String
new_contribution_count : Int
auxiliary_count : Int
related_count : Int
out_of_scope_count : Int
incomplete_new_count : Int
findings : Array[BoundaryFinding]
} derive(Eq,
Debug
)

#
BoundaryReport::to_markdown

fn BoundaryReport::to_markdown(self : BoundaryReport, matrix : BoundaryMatrix) -> String

#
BoundaryRole

pub(all) enum BoundaryRole {
RelatedPriorWork
AuxiliaryCompatibility
NewContribution
OutOfScope
} derive(Eq,
Debug
)

#
CheckKind

pub(all) enum CheckKind {
PackageConfig
Readme
ContinuousIntegration
Tests
Examples
Build
Mooncakes
GitTrace
License
Boundary
DocProof
} derive(Eq,
Debug
)

#
DocProofReport

pub(all) struct DocProofReport {
snippet_count : Int
runnable_snippet_count : Int
source_count : Int
unclear_source_count : Int
license_issue_count : Int
verdict : String
snippets : Array[DocSnippet]
sources : Array[SourceEvidence]
} derive(Eq,
Debug
)

#
DocProofReport::to_markdown

fn DocProofReport::to_markdown(self : DocProofReport) -> String

#
DocSnippet

pub(all) struct DocSnippet {
index : Int
language : String
body : String
runnable : Bool
label : String
} derive(Eq,
Debug
)

#
DossierEvidence

pub(all) struct DossierEvidence {
id : String
title : String
source : String
proof_path : String
summary : String
required : Bool
complete : Bool
} derive(Eq,
Debug
)

#
DossierEvidence::DossierEvidence

fn DossierEvidence::DossierEvidence(id? : String, title? : String, source? : String, proof_path? : String, summary? : String, required? : Bool, complete? : Bool) -> DossierEvidence

#
DossierFinding

pub(all) struct DossierFinding {
id : String
severity : Severity
title : String
detail : String
action : String
evidence : String
penalty : Int
} derive(Eq,
Debug
)

#
DossierProfile

pub(all) struct DossierProfile {
applicant : String
contact : String
project_title : String
package_name : String
repository : String
deadline : String
review_notice : String
relation_statement : String
evidence : Array[DossierEvidence]
timeline : Array[DossierTimelineEvent]
risks : Array[DossierRisk]
} derive(Eq,
Debug
)

#
DossierProfile::DossierProfile

fn DossierProfile::DossierProfile(applicant? : String, contact? : String, project_title? : String, package_name? : String, repository? : String, deadline? : String, review_notice? : String, relation_statement? : String, evidence? : Array[DossierEvidence], timeline? : Array[DossierTimelineEvent], risks? : Array[DossierRisk]) -> DossierProfile

#
DossierReport

pub(all) struct DossierReport {
verdict : String
score : Int
ready : Bool
evidence_count : Int
complete_evidence_count : Int
missing_required_count : Int
unresolved_risk_count : Int
timeline_count : Int
action_count : Int
sections : Array[DossierSection]
actions : Array[String]
findings : Array[DossierFinding]
} derive(Eq,
Debug
)

#
DossierReport::to_markdown

fn DossierReport::to_markdown(self : DossierReport, profile : DossierProfile) -> String

#
DossierRisk

pub(all) struct DossierRisk {
id : String
title : String
level : String
mitigation : String
resolved : Bool
} derive(Eq,
Debug
)

#
DossierRisk::DossierRisk

fn DossierRisk::DossierRisk(id? : String, title? : String, level? : String, mitigation? : String, resolved? : Bool) -> DossierRisk

#
DossierSection

pub(all) struct DossierSection {
title : String
body : String
evidence_ids : Array[String]
} derive(Eq,
Debug
)

#
DossierSection::DossierSection

fn DossierSection::DossierSection(title? : String, body? : String, evidence_ids? : Array[String]) -> DossierSection

#
DossierTimelineEvent

pub(all) struct DossierTimelineEvent {
date : String
actor : String
action : String
evidence_id : String
} derive(Eq,
Debug
)

#
DossierTimelineEvent::DossierTimelineEvent

fn DossierTimelineEvent::DossierTimelineEvent(date? : String, actor? : String, action? : String, evidence_id? : String) -> DossierTimelineEvent

#
ExtensionEvidence

pub(all) struct ExtensionEvidence {
feature : String
implementation : String
proof : String
value : String
implemented : Bool
} derive(Eq,
Debug
)

#
ExtensionEvidence::ExtensionEvidence

fn ExtensionEvidence::ExtensionEvidence(feature? : String, implementation? : String, proof? : String, value? : String, implemented? : Bool) -> ExtensionEvidence

#
Finding

pub(all) struct Finding {
id : String
kind : CheckKind
severity : Severity
title : String
detail : String
repair : String
evidence : String
penalty : Int
} derive(Eq,
Debug
)

#
IdentityEvidence

pub(all) struct IdentityEvidence {
key : String
value : String
source : String
note : String
} derive(Eq,
Debug
)

#
IdentityEvidence::IdentityEvidence

fn IdentityEvidence::IdentityEvidence(key? : String, value? : String, source? : String, note? : String) -> IdentityEvidence

#
IdentityFinding

pub(all) struct IdentityFinding {
id : String
severity : Severity
title : String
expected : String
actual : String
source : String
detail : String
} derive(Eq,
Debug
)

#
IdentityReport

pub(all) struct IdentityReport {
canonical : SubmissionIdentity
evidence : Array[IdentityEvidence]
findings : Array[IdentityFinding]
score : Int
verdict : String
} derive(Eq,
Debug
)

#
IdentityReport::has_mismatch

fn IdentityReport::has_mismatch(self : IdentityReport) -> Bool

#
IdentityReport::to_json

fn IdentityReport::to_json(self : IdentityReport) -> String

#
IdentityReport::to_markdown

fn IdentityReport::to_markdown(self : IdentityReport) -> String

#
NamedFile

pub(all) struct NamedFile {
path : String
content : String
} derive(Eq,
Debug
)

#
PackageManifest

pub(all) struct PackageManifest {
module_name : String
version : String
readme : String
repository : String
license : String
description : String
owner : String
package_name : String
has_valid_name : Bool
has_semver : Bool
} derive(Eq,
Debug
)

#
PriorWork

pub(all) struct PriorWork {
package_name : String
version : String
repository : String
license : String
overlap : String
relation : String
} derive(Eq,
Debug
)

#
PriorWork::PriorWork

fn PriorWork::PriorWork(package_name? : String, version? : String, repository? : String, license? : String, overlap? : String, relation? : String) -> PriorWork

#
ProjectSnapshot

pub(all) struct ProjectSnapshot {
name : String
moon_mod : String
readme : String
ci_workflow : String
license_text : String
examples : Array[String]
tests : Array[String]
commands : Array[String]
changelog : String
design_notes : String
issue_notes : String
commit_count : Int
repository_public : Bool
mooncakes_published : Bool
mooncakes_owner : String
mooncakes_package : String
} derive(Eq,
Debug
)

#
ProjectSnapshot::ProjectSnapshot

fn ProjectSnapshot::ProjectSnapshot(name? : String, moon_mod? : String, readme? : String, ci_workflow? : String, license_text? : String, examples? : Array[String], tests? : Array[String], commands? : Array[String], changelog? : String, design_notes? : String, issue_notes? : String, commit_count? : Int, repository_public? : Bool, mooncakes_published? : Bool, mooncakes_owner? : String, mooncakes_package? : String) -> ProjectSnapshot

#
RepairStep

pub(all) struct RepairStep {
id : String
kind : CheckKind
severity : Severity
title : String
action : String
blocking : Bool
} derive(Eq,
Debug
)

#
ReviewFeedback

pub(all) struct ReviewFeedback {
project_title : String
applicant_package : String
repository : String
notice : String
prior_work : Array[PriorWork]
relation_statement : String
extension_evidence : Array[ExtensionEvidence]
resubmit_deadline : String
} derive(Eq,
Debug
)

#
ReviewFeedback::ReviewFeedback

fn ReviewFeedback::ReviewFeedback(project_title? : String, applicant_package? : String, repository? : String, notice? : String, prior_work? : Array[PriorWork], relation_statement? : String, extension_evidence? : Array[ExtensionEvidence], resubmit_deadline? : String) -> ReviewFeedback

#
ReviewFinding

pub(all) struct ReviewFinding {
id : String
severity : Severity
title : String
detail : String
action : String
evidence : String
penalty : Int
} derive(Eq,
Debug
)

#
ReviewResponse

pub(all) struct ReviewResponse {
verdict : String
score : Int
ready_to_resubmit : Bool
overlap_risk : String
prior_count : Int
implemented_extension_count : Int
findings : Array[ReviewFinding]
} derive(Eq,
Debug
)

#
ReviewResponse::to_markdown

fn ReviewResponse::to_markdown(self : ReviewResponse, feedback : ReviewFeedback) -> String

#
RuleSpec

pub(all) struct RuleSpec {
id : String
kind : CheckKind
default_severity : Severity
title : String
evidence_hint : String
repair_hint : String
penalty : Int
} derive(Eq,
Debug
)

#
Severity

pub(all) enum Severity {
Pass
Warn
Fail
} derive(Eq,
Debug
)

#
SourceEvidence

pub(all) struct SourceEvidence {
name : String
kind : SourceKind
source_url : String
license : String
note : String
} derive(Eq,
Debug
)

#
SourceEvidence::SourceEvidence

fn SourceEvidence::SourceEvidence(name? : String, kind? : SourceKind, source_url? : String, license? : String, note? : String) -> SourceEvidence

#
SourceKind

pub(all) enum SourceKind {
OwnedCode
ThirdPartyCode
Dataset
Asset
GeneratedText
} derive(Eq,
Debug
)

#
SubmissionIdentity

pub(all) struct SubmissionIdentity {
applicant_name : String
phone : String
email : String
github_owner : String
repository_name : String
mooncakes_owner : String
package_name : String
} derive(Eq,
Debug
)

#
SubmissionIdentity::SubmissionIdentity

fn SubmissionIdentity::SubmissionIdentity(applicant_name? : String, phone? : String, email? : String, github_owner? : String, repository_name? : String, mooncakes_owner? : String, package_name? : String) -> SubmissionIdentity

#
acceptance_identity_markdown

fn acceptance_identity_markdown(canonical : SubmissionIdentity, snapshot : ProjectSnapshot, submission_text : String, git_user_name? : String, git_user_email? : String, git_remote? : String) -> String

Check whether applicant, repository, git and Mooncakes identities agree.

#
acceptance_identity_report

fn acceptance_identity_report(canonical : SubmissionIdentity, snapshot : ProjectSnapshot, submission_text : String, git_user_name? : String, git_user_email? : String, git_remote? : String) -> IdentityReport

#
audit

fn audit(snapshot : ProjectSnapshot) -> AuditReport

Run the default ReviewProof audit over a project snapshot.

#
audit_json

fn audit_json(snapshot : ProjectSnapshot) -> String

Build a compact JSON summary for integrations that need machine-readable output.

#
audit_markdown

fn audit_markdown(snapshot : ProjectSnapshot) -> String

Build a compact Markdown report for a project snapshot.

#
boundary_matrix_markdown

fn boundary_matrix_markdown(matrix : BoundaryMatrix) -> String

#
boundary_matrix_report

fn boundary_matrix_report(matrix : BoundaryMatrix) -> BoundaryReport

#
boundary_summary_line

fn boundary_summary_line(report : BoundaryReport) -> String

#
catalog_size

fn catalog_size() -> Int

#
doc_proof

fn doc_proof(markdown : String, sources : Array[SourceEvidence]) -> DocProofReport

#
doc_proof_markdown

fn doc_proof_markdown(markdown : String, sources : Array[SourceEvidence]) -> String

#
dossier_profile_from_review

fn dossier_profile_from_review(feedback : ReviewFeedback) -> DossierProfile

#
dossier_summary_line

fn dossier_summary_line(report : DossierReport) -> String

#
evidence_table_markdown

fn evidence_table_markdown(evidence : Array[DossierEvidence]) -> String

#
example_boundary_matrix

fn example_boundary_matrix() -> BoundaryMatrix

#
example_dossier_profile

fn example_dossier_profile() -> DossierProfile

#
example_review_feedback

fn example_review_feedback() -> ReviewFeedback

#
example_snapshot

fn example_snapshot() -> ProjectSnapshot

Return a runnable fixture that demonstrates a release-ready MoonBit package.

#
extract_doc_snippets

fn extract_doc_snippets(markdown : String) -> Array[DocSnippet]

#
find_rule

fn find_rule(id : String) -> RuleSpec?

#
harborcheck_example_snapshot

fn harborcheck_example_snapshot() -> ProjectSnapshot

#
identity_consistency

fn identity_consistency(canonical : SubmissionIdentity, evidence : Array[IdentityEvidence]) -> IdentityReport

#
identity_json

fn identity_json(report : IdentityReport) -> String

#
identity_markdown

fn identity_markdown(report : IdentityReport) -> String

#
parse_manifest

fn parse_manifest(moon_mod : String) -> PackageManifest

#
parse_snapshot_bundle

fn parse_snapshot_bundle(bundle : String) -> Array[NamedFile]

#
release_checklist

fn release_checklist(snapshot : ProjectSnapshot) -> String

Build an actionable checklist from the audit result.

#
resubmission_dossier

fn resubmission_dossier(profile : DossierProfile) -> DossierReport

#
resubmission_dossier_markdown

fn resubmission_dossier_markdown(profile : DossierProfile) -> String

#
review_feedback_markdown

fn review_feedback_markdown(feedback : ReviewFeedback) -> String

#
review_feedback_response

fn review_feedback_response(feedback : ReviewFeedback) -> ReviewResponse

#
risk_register_markdown

fn risk_register_markdown(risks : Array[DossierRisk]) -> String

#
rule_catalog

fn rule_catalog() -> Array[RuleSpec]

#
rule_catalog_markdown

fn rule_catalog_markdown() -> String

#
rules_for_kind

fn rules_for_kind(kind : CheckKind) -> Array[RuleSpec]

#
rules_markdown

fn rules_markdown() -> String

Return the built-in rule catalog in Markdown form.

#
snapshot_from_bundle

fn snapshot_from_bundle(bundle : String, project_name? : String, commit_count? : Int, repository_public? : Bool, mooncakes_published? : Bool, mooncakes_owner? : String, mooncakes_package? : String) -> ProjectSnapshot

#
snapshot_from_files

fn snapshot_from_files(files : Array[NamedFile], project_name? : String, commit_count? : Int, repository_public? : Bool, mooncakes_published? : Bool, mooncakes_owner? : String, mooncakes_package? : String) -> ProjectSnapshot

#
timeline_markdown

fn timeline_markdown(events : Array[DossierTimelineEvent]) -> String