ln-781-build-verifier

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ln-781-build-verifier

ln-781-build-verifier

Type: L3 Worker Category: 7XX Project Bootstrap Parent: ln-780-bootstrap-verifier

Type: L3 Worker Category: 7XX Project Bootstrap Parent: ln-780-bootstrap-verifier

Purpose

用途

Detects project types, restores dependencies, executes builds, and verifies successful compilation.
Scope:
  • Auto-detect project types from file markers
  • Restore dependencies using appropriate package manager
  • Execute build commands for each project
  • Verify build artifacts exist
Out of Scope:
  • Running tests (handled by ln-782)
  • Container operations (handled by ln-783)
  • Workflow orchestration (handled by ln-780)

检测项目类型、恢复依赖、执行构建并验证编译是否成功。
适用范围:
  • 从文件标记自动检测项目类型
  • 使用合适的包管理器恢复依赖
  • 为每个项目执行构建命令
  • 验证构建产物是否存在
不适用范围:
  • 运行测试(由ln-782处理)
  • 容器操作(由ln-783处理)
  • 工作流编排(由ln-780处理)

When to Use

使用场景

ScenarioUse This Skill
Called by ln-780 orchestratorYes
Standalone build verificationYes
CI/CD pipeline build stepYes
Test execution neededNo, use ln-782

场景是否使用本Skill
由ln-780编排器调用
独立构建验证
CI/CD流水线构建步骤
需要执行测试否,使用ln-782

Workflow

工作流程

Step 1: Detect Project Types

步骤1:检测项目类型

Scan project root for type markers.
Marker FileProject TypeBuild System
package.jsonNode.js/Frontendnpm/yarn/pnpm
*.csproj.NETdotnet
setup.py / pyproject.tomlPythonpip/poetry
go.modGogo build
Cargo.tomlRustcargo
pom.xmlJava/Mavenmvn
build.gradleJava/Gradlegradle
扫描项目根目录中的类型标记。
标记文件项目类型构建系统
package.jsonNode.js/前端npm/yarn/pnpm
*.csproj.NETdotnet
setup.py / pyproject.tomlPythonpip/poetry
go.modGogo build
Cargo.tomlRustcargo
pom.xmlJava/Mavenmvn
build.gradleJava/Gradlegradle

Step 2: Restore Dependencies

步骤2:恢复依赖

For each detected project, restore dependencies before building.
Project TypeDependency Restoration
Node.jsInstall packages from lock file
.NETRestore NuGet packages
PythonInstall from requirements or pyproject
GoDownload modules
RustFetch crates
为每个检测到的项目在构建前恢复依赖。
项目类型依赖恢复方式
Node.js从锁文件安装包
.NET恢复NuGet包
Python从requirements或pyproject安装
Go下载模块
Rust获取crates

Step 3: Build Projects

步骤3:执行项目构建

Execute build for each project type in Release/Production mode.
Project TypeBuild ModeExpected Outcome
Node.jsProductionBundled assets in dist/ or build/
.NETReleaseCompiled DLLs in bin/Release/
PythonEditable installPackage installed in environment
GoProductionCompiled binary
RustReleaseOptimized binary in target/release/
为每个项目类型以Release/生产模式执行构建。
项目类型构建模式预期结果
Node.js生产模式打包后的资源在dist/或build/目录
.NETRelease模式编译后的DLL在bin/Release/目录
Python可编辑安装包已安装到环境中
Go生产模式编译后的二进制文件
RustRelease模式优化后的二进制文件在target/release/目录

Step 4: Verify Build Artifacts

步骤4:验证构建产物

Confirm build outputs exist.
Project TypeArtifact Check
Node.jsdist/ or build/ directory exists, contains files
.NETDLL files in bin/Release/{framework}/
PythonPackage importable
GoBinary executable exists
RustBinary in target/release/
确认构建输出存在。
项目类型产物检查
Node.jsdist/或build/目录存在且包含文件
.NETbin/Release/{framework}/目录下存在DLL文件
Python包可被导入
Go二进制可执行文件存在
Rusttarget/release/目录下存在二进制文件

Step 5: Report Results

步骤5:报告结果

Return structured results to orchestrator.
Result Structure:
FieldDescription
projectNameName of the project
projectTypeDetected type (nodejs, dotnet, python, etc.)
statussuccess / failed
durationBuild time in seconds
outputPathPath to build artifacts
errorMessageError details if failed

向编排器返回结构化结果。
结果结构:
字段描述
projectName项目名称
projectType检测到的类型(nodejs、dotnet、python等)
statussuccess / failed
duration构建时长(秒)
outputPath构建产物路径
errorMessage失败时的错误详情

Error Handling

错误处理

Error TypeRecovery Action
Dependency restore failedCheck network, verify lock file integrity
Compilation errorsLog full error output, report as failed
Missing build toolReport required tool installation
TimeoutReport timeout, suggest increasing limit

错误类型恢复操作
依赖恢复失败检查网络,验证锁文件完整性
编译错误记录完整错误输出,报告为失败
缺少构建工具报告需要安装所需工具
超时报告超时,建议增加时间限制

Critical Rules

关键规则

  1. Always restore dependencies first - builds may fail without fresh dependencies
  2. Use production/release mode - development builds may hide issues
  3. Verify artifacts exist - successful exit code is not sufficient
  4. Report all projects - include both successful and failed builds

  1. 始终先恢复依赖 - 没有最新依赖可能导致构建失败
  2. 使用生产/Release模式 - 开发构建可能隐藏问题
  3. 验证产物存在 - 仅成功退出码并不足够
  4. 报告所有项目 - 包含成功和失败的构建

Definition of Done

完成标准

  • All project types detected
  • Dependencies restored for each project
  • Build executed for each project
  • Artifacts verified to exist
  • Results returned to orchestrator

Version: 2.0.0 Last Updated: 2026-01-10
  • 已检测所有项目类型
  • 已为每个项目恢复依赖
  • 已为每个项目执行构建
  • 已验证产物存在
  • 已向编排器返回结果

Version: 2.0.0 Last Updated: 2026-01-10