moonbit-submit-guard

Audit MoonBit project readiness for hackathon submission review.

moonbit
hackathon
submission
ci
checklist
quality
moon add JJ-ai-nb/moonbit-submit-guard@0.1.0
Download zip
Author
Version
0.1.0
License
Apache-2.0
Last updated
10 hours ago
Downloads
3
README

#JJ-ai-nb/moonbit-submit-guard

MoonBit hackathon submission readiness auditor.

///|
test {
let files : Array[@moonbit-submit-guard.FileSnapshot] = [
{ path: "moon.mod", content: "name = \"JJ-ai-nb/moonbit-submit-guard\"\nversion = \"0.1.0\"" },
{ path: "README.md", content: "# moonbit-submit-guard\n\nUsage and boundary notes." },
]
let report = @moonbit-submit-guard.audit_project(files)
inspect(report.score >= 0, content="true")
}

See README.md for usage, validation commands, and GitHub Desktop submission notes.

#
CheckId

pub(all) enum CheckId {
Manifest
Readme
UsageExample
Tests
ContinuousIntegration
BuildCommands
ProjectMetadata
License
Traceability
MaintenanceDocs
Originality
} derive(Eq,
Debug
)

Built-in checks map directly to MoonBit hackathon submission needs.

#
FileSnapshot

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

A project file captured by the caller.

#
Finding

pub(all) struct Finding {
id : CheckId
status : Status
message : String
evidence : String
} derive(Eq,
Debug
)

One audit finding with short evidence.

#
ProjectProfile

pub(all) struct ProjectProfile {
package_name : String?
version : String?
license : String?
repository : String?
moonbit_files : Int
test_files : Int
ci_files : Int
readme_chars : Int
originality_signals : Int
} derive(Eq,
Debug
)

Parsed project facts used by the audit report.

#
Report

pub(all) struct Report {
score : Int
profile : ProjectProfile
findings : Array[Finding]
} derive(Eq,
Debug
)

Full audit report. score is 0..100, where warns count as partial credit.

#
Status

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

Audit outcome for one requirement.

#
audit_project

fn audit_project(files : Array[FileSnapshot]) -> Report

Audit a MoonBit project represented as file snapshots.

#
check_name

fn check_name(id : CheckId) -> String

#
count_status

fn count_status(report : Report, status : Status) -> Int

Count findings with the selected status.

#
moon_mod_string

fn moon_mod_string(content : String, key : String) -> String?

Extract a quoted string value from moon.mod, for example name = "owner/pkg".

#
render_report

fn render_report(report : Report) -> String

Render a compact human-readable report.

#
status_name

fn status_name(status : Status) -> String

#
submission_commands

fn submission_commands() -> Array[String]

Return commands that should pass before submitting the project.

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io