Skip to content

Phase 0: Foundation — workspace, CI, release pipeline, schemas, governance #2

@RAprogramm

Description

@RAprogramm

Goal

Establish the foundation for the rustmanifest MCP server: a cargo workspace, hardened CI, reproducible signed releases, locked JSON Schemas, and governance documents. No analysis logic in this phase — the skeleton must compile, lint clean, and ship.

Locked decisions

  • Crate prefix: rustmanifest
  • URI scheme: rustmanifest://
  • MSRV: 1.95 (current stable on 2026-05-13); policy: stable-3 in every minor
  • Org: github.com/RAprogramm
  • Action name: RAprogramm/rustmanifest-action@v1
  • Server response language: English only (independent of request language)

Workspace layout

  • crates/rustmanifest-schema — JSON Schemas + Rust types (single source of truth for Rule, Finding, Config, MethodologyResource)
  • crates/rustmanifest-rules-core — rules.json producer + embedded EN docs + fixtures (stub)
  • crates/rustmanifest-engine — tiered analysis: tier 1 patterns, tier 2 syn AST, tier 3 cargo/rust-analyzer (stub)
  • crates/rustmanifest-config — rustmanifest.toml parser, profiles, pragma handling (stub)
  • crates/rustmanifest-report — JSON, SARIF 2.1.0, TTY renderers (stub)
  • crates/rustmanifest-mcp — rmcp-based server (stub)
  • crates/rustmanifest-lsp — LSP server reusing the engine (stub)
  • crates/rustmanifest-clirustmanifest binary entry-point (stub)

Deliverables

Workspace

  • Root Cargo.toml with workspace, shared [workspace.lints], shared [workspace.package], MSRV 1.95
  • rust-toolchain.toml pinning channel and components
  • 8 stub crates with minimal lib.rs or main.rs
  • .gitignore for cargo, IDE, CI artifacts
  • Existing .rustfmt.toml kept as-is

Schemas

  • Rule, Finding, Config, MethodologyResource Rust types in rustmanifest-schema
  • schemars derives, schema export binary
  • Golden JSON Schema files committed under crates/rustmanifest-schema/schemas/
  • CI gate: regenerate and diff against golden — fail on drift

CI

  • .github/workflows/ci.yml: fmt (nightly), clippy -D warnings, test, build, MSRV check
  • cargo-audit, cargo-deny, cargo-vet bootstrap
  • Coverage gate via cargo-llvm-cov, threshold 80%
  • mcp-validator job (skipped until Phase 2, scaffold present)
  • Concurrency cancel-in-progress, matrix on ubuntu+macos+windows × x86_64+aarch64 where supported

Release pipeline

  • cargo-dist config for multi-arch binaries
  • Sigstore keyless signing via OIDC
  • SLSA L3 provenance generator
  • CycloneDX SBOM per crate
  • release-plz config for independent per-crate SemVer publishing to crates.io
  • Release workflow gated on green CI + tag

Governance and security

  • docs/THREAT_MODEL.md — initial threats: prompt injection in resources, tool-call abuse, supply chain, sandbox escape
  • docs/GOVERNANCE.md — RFC process, deprecation policy, SemVer rules
  • docs/RFCS/0000-template.md — RFC template
  • SECURITY.md — private disclosure via GH security advisories, embargo procedure
  • CODEOWNERS — RAprogramm as default owner
  • .github/ISSUE_TEMPLATE/ — bug, feature, rule-proposal templates
  • .github/pull_request_template.md

Out of scope (later phases)

  • Any analysis logic (tier 1/2/3) — Phase 1
  • MCP server implementation — Phase 2
  • OAuth/HTTP transport — Phase 3
  • Sampling — Phase 4
  • GitHub Action, LSP, editor docs — Phase 5
  • Rule definitions parsed from markdown — Phase 1

Acceptance criteria

  • cargo build --release succeeds on all crates on linux/macos/windows
  • cargo +nightly fmt --check clean
  • cargo clippy --all-targets --all-features -- -D warnings clean
  • cargo test --workspace passes (smoke tests only)
  • CI green on PR
  • Release workflow dry-run produces signed artifacts with SBOM and provenance
  • gh pr merge --squash --delete-branch after green CI

Risks

  • cargo-vet bootstrap requires existing trusted imports — start with empty supply-chain set, document
  • coverage threshold 80% may be unreachable on pure-stub crates — initial gate set to 0% with TODO to ramp in Phase 1
  • macos/windows aarch64 runners cost — keep matrix tight, scale later

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions