Drift risk.
Flow and algorithm
Platform spec article
Flow and algorithm
Spec standingStandard
-
Hub authority
Context
Decision
Hub owns MUST/SHOULD.
Consequences
Articles defer.
Verification anchors
trudoc.
-
Shared pipeline
Context
CLI/LSP divergence.
Decision
Use beskid_analysis aligned with LSP.
Consequences
Parity.
Verification anchors
pipeline tests.
- Contracts and edge cases Strict guarantees and failure modes for build, analyze, and run CLI behavior.
- Design model Conceptual model for `Build, analyze, and run contract` and its subsystem boundaries.
- Examples Concrete CLI invocations for build, analyze, and run workflows.
- FAQ and troubleshooting Common questions and fixes for build, analyze, and run CLI behavior.
- Flow and algorithm Lifecycle and execution flow for `Build, analyze, and run contract`.
- Verification and traceability Tests and traceability for the build, analyze, and run CLI contract.
0 revisions (git unavailable at build; counts may be empty)
No commits recorded for this path.
| Section id | Required | Found |
|---|---|---|
what-this-feature-specifies | yes | yes |
implementation-anchors | yes | yes |
Full tree: run pnpm verify:platform-spec-layout (writes src/generated/platform-spec-layout-report.json).
Startup
Section titled “Startup”- Expand response files (
argfile) and parse global flags. - Initialize logging (
BESKID_LOG_CRANELIFT/--log-cranelift). ensure_corelib_ready— materialize or locate bundled corelib before any project command runs.- Dispatch the selected subcommand.
Project-scoped command flow
Section titled “Project-scoped command flow”sequenceDiagram
participant User
participant CLI as beskid_cli
participant Analysis as beskid_analysis
participant Backend as JIT or AOT
User->>CLI: subcommand + ProjectResolveArgs
CLI->>Analysis: resolve manifest + lock policy
Analysis-->>CLI: CompilationContext + CompilePlan
CLI->>Analysis: semantic pipeline (+ mods)
alt analyze / doc
Analysis-->>CLI: diagnostics / api.json
else build
CLI->>Backend: lower + AOT link
else run / test
CLI->>Backend: JIT entrypoint
end
CLI-->>User: exit code + artifacts
analyze
Section titled “analyze”- Resolve input to a host target and
CompilationContext. - Run the semantic pipeline with builtin (+ mod) rules.
- Print diagnostics to stderr (miette rendering); non-zero exit when errors exist.
- Resolve
CompilePlanand target kind (App,Lib,Test). - Lower through
beskid_codegenwith pipeline observation. - Invoke
beskid_aot::buildwith profile, link mode, and runtime strategy flags. - Write object/shared/static/executable per
--kindand target defaults.
run / test
Section titled “run / test”- Resolve entry module and optional
--entrypoint. - JIT-compile via
beskid_engineand execute;testdiscoverstestitems and aggregates results.
Workspace maintenance (fetch, lock, update)
Section titled “Workspace maintenance (fetch, lock, update)”These commands mutate or verify the materialized dependency tree and Project.lock before host compilation. They share graph resolution with build/run but do not themselves lower user code.
Lockfile interaction
Section titled “Lockfile interaction”When LockfilePolicyArgs require a lock, the CLI must fail fast if Project.lock is missing or stale relative to manifests, rather than silently fetching in release-critical paths unless the command documents otherwise (update vs build defaults).
Verification hooks
Section titled “Verification hooks”Integration coverage lives in compiler/crates/beskid_tests/src/analysis/pipeline/core.rs and command-specific tests beside each commands/*.rs module.