///|
fn main {
  let moon_mod =
    #|name = "JJ-ai-nb/moonbit-submit-guard-demo"
    #|version = "0.1.0"
    #|readme = "README.md"
    #|repository = "https://github.com/JJ-ai-nb/moonbit-submit-guard-demo.git"
    #|license = "Apache-2.0"
    #|keywords = [ "moonbit", "docs", "quality" ]
    #|description = "Measure documentation release quality."
  let readme =
    #|# moonbit-submit-guard-demo
    #|
    #|A MoonBit project with a concrete usage example, clear install steps,
    #|explicit boundary notes, maintenance plan, and GitHub submission commands.
    #|It measures documentation release quality from project file snapshots and
    #|turns review rules into repeatable findings. The goal is to help maintainers
    #|catch missing README sections, weak examples, absent tests, incomplete CI,
    #|missing license evidence, and weak originality proof before a public release.
    #|
    #|## Usage
    #|
    #|Run `moon run cmd/main`.
    #|
    #|Create snapshots for moon.mod, README.md, tests, CI, docs, and release notes.
    #|Pass them to the audit function and render the report in a CLI, web service,
    #|or review bot. The package does not need network access and can be used in
    #|a local pre-release workflow.
    #|
    #|## Boundary
    #|
    #|The package audits project text snapshots. It does not inspect private repos.
    #|It does not decide legal compliance by itself and does not replace human
    #|review. It only turns observable project evidence into structured findings.
    #|
    #|## Submission
    #|
    #|Run `moon check`, `moon build`, `moon test`, and `moon run cmd/main`.
    #|
    #|## Originality
    #|
    #|This project records originality, traceability, and review evidence.
    #|Originality is evaluated through non-template signals such as design notes,
    #|maintenance boundaries, issue templates, release history, and explicit review
    #|evidence. A low score means reviewers should ask for stronger proof.
  let ci =
    #|name: CI
    #|steps:
    #|  - run: moon check
    #|  - run: moon build
    #|  - run: moon test
  let sample_files : Array[@guard.FileSnapshot] = [
    { path: "moon.mod", content: moon_mod },
    { path: "README.md", content: readme },
    { path: "LICENSE", content: "Apache License 2.0" },
    { path: "CHANGELOG.md", content: "## 0.1.0\n\n- First release." },
    { path: "docs/API.md", content: "API reference." },
    {
      path: "docs/DESIGN.md",
      content: "Design boundary and maintenance notes.",
    },
    {
      path: "PROJECT_APPLICATION.md",
      content: "GitHub hackathon project application.",
    },
    { path: "cmd/main/main.mbt", content: "fn main { println(\"moonbit-submit-guard\") }" },
    {
      path: "moonbit-submit-guard_test.mbt",
      content: "test \"audit\" { inspect(1, content=\"1\") }",
    },
    {
      path: "moonbit-submit-guard_wbtest.mbt",
      content: "test \"internal\" { inspect(2, content=\"2\") }",
    },
    { path: ".github/workflows/ci.yml", content: ci },
    { path: ".github/ISSUE_TEMPLATE/bug_report.md", content: "Bug report" },
    {
      path: ".github/PULL_REQUEST_TEMPLATE.md",
      content: "Validation checklist",
    },
  ]
  let report = @guard.audit_project(sample_files)
  println(@guard.render_report(report))
}