Loading...
Loading...
Generates wiring verification YAML for loom plans. Helps agents prove that features are properly integrated — commands registered, endpoints mounted, modules exported, components rendered. Use when writing truths/artifacts/wiring fields for loom plan stages.
npx skill4agent add cosmix/loom wiring-testtruthsartifactswiringintegration-verifytruths:
- "command-that-proves-behavior"
- "another-observable-check"
artifacts:
- "path/to/implementation.rs"
- "path/to/another/file.ts"
wiring:
- source: "path/to/integration/point.rs"
pattern: "mod feature_name"
description: "Feature module is imported in main"
- source: "path/to/router.rs"
pattern: "mount_feature_routes"
description: "Feature routes are mounted in router"artifactswiring.sourceworking_dirworking_dir: "loom"loom/descriptionloom verify <stage-id>truths:
- "loom verify --help" # Command responds
- "loom verify stage-1 --suggest" # Primary use case works
artifacts:
- "src/commands/verify.rs" # Implementation exists
- "src/verify/mod.rs" # Supporting module exists
wiring:
- source: "src/main.rs"
pattern: "mod commands"
description: "Commands module imported"
- source: "src/commands/mod.rs"
pattern: "pub mod verify"
description: "Verify command exported"
- source: "src/main.rs"
pattern: "Commands::Verify"
description: "Verify variant in CLI enum"working_dir: "loom"loom/src/commands/verify.rsPOST /api/featurestruths:
- "curl -f -X POST http://localhost:8080/api/features -d '{\"name\":\"test\"}'"
- "curl -f http://localhost:8080/api/features | grep -q '\"features\"'"
artifacts:
- "src/handlers/features.rs"
- "src/routes/api.rs"
wiring:
- source: "src/routes/api.rs"
pattern: "post(\"/features\", create_feature)"
description: "POST /features route registered"
- source: "src/main.rs"
pattern: "mount(\"/api\", api_routes())"
description: "API routes mounted in application"
- source: "src/handlers/mod.rs"
pattern: "pub mod features"
description: "Features handler exported"truths:
- "cargo test auth::" # Module tests pass
- "cargo check" # Module compiles in context
artifacts:
- "src/auth/mod.rs"
- "src/auth/jwt.rs"
- "src/auth/session.rs"
wiring:
- source: "src/lib.rs"
pattern: "pub mod auth"
description: "Auth module exported from library root"
- source: "src/main.rs"
pattern: "use crate::auth"
description: "Auth module imported in main"FeatureCardtruths:
- "npm test -- FeatureCard" # Component tests pass
- "npm run build" # Component compiles
artifacts:
- "src/components/FeatureCard.tsx"
- "src/components/FeatureCard.test.tsx"
wiring:
- source: "src/components/index.ts"
pattern: "export { FeatureCard }"
description: "FeatureCard exported from components barrel"
- source: "src/pages/Dashboard.tsx"
pattern: "<FeatureCard"
description: "FeatureCard rendered in Dashboard"
- source: "src/pages/Dashboard.tsx"
pattern: "import.*FeatureCard"
description: "FeatureCard imported in parent component"truths:
- "cargo test" # Only proves tests pass, not that feature works
- "cargo build" # Only proves it compiles
artifacts:
- "src/" # Too broad, proves nothing
wiring: [] # Missing — no integration prooftruths:
- "loom verify stage-1 --suggest" # Proves verify command works end-to-end
- "loom verify --help | grep -q 'suggest'" # Proves --suggest flag exists
artifacts:
- "src/commands/verify.rs" # Implementation file
- "src/verify/checker.rs" # Core logic file
wiring:
- source: "src/main.rs"
pattern: "Commands::Verify"
description: "Verify command variant in CLI enum"
- source: "src/commands/mod.rs"
pattern: "pub mod verify"
description: "Verify module exported from commands"
- source: "src/commands/verify.rs"
pattern: "run_verification"
description: "Core verification function exists"--helpworking_dirworking_dirmod verifyverifyworking_dir# Stage configuration
- id: my-stage
working_dir: "loom" # Commands execute from .worktrees/my-stage/loom/
# Verification paths resolve relative to working_dir
artifacts:
- "src/feature.rs" # Resolves to .worktrees/my-stage/loom/src/feature.rs
wiring:
- source: "src/main.rs" # Resolves to .worktrees/my-stage/loom/src/main.rs
pattern: "mod feature"
description: "Feature module imported"RESOLVED_PATH = WORKTREE_ROOT + working_dir + path.worktrees/my-stage/working_dir: "loom""src/feature.rs".worktrees/my-stage/loom/src/feature.rs../working_dirtruths:
- "myapp command --help"
- "myapp command arg1 arg2" # Primary use case
artifacts:
- "src/commands/command.rs"
wiring:
- source: "src/main.rs"
pattern: "Commands::CommandName"
description: "Command variant in CLI enum"
- source: "src/commands/mod.rs"
pattern: "pub mod command"
description: "Command module exported"truths:
- "curl -f -X GET http://localhost:PORT/api/endpoint"
- "curl -f http://localhost:PORT/api/endpoint | grep -q 'expected_field'"
artifacts:
- "src/handlers/endpoint.rs"
- "src/routes/api.rs"
wiring:
- source: "src/routes/api.rs"
pattern: "get(\"/endpoint\", handler)"
description: "Endpoint route registered"
- source: "src/main.rs"
pattern: "mount(\"/api\", routes)"
description: "API routes mounted"truths:
- "cargo test module::"
- "cargo check"
artifacts:
- "src/module/mod.rs"
- "src/module/core.rs"
wiring:
- source: "src/lib.rs"
pattern: "pub mod module"
description: "Module exported from library"
- source: "src/main.rs"
pattern: "use crate::module"
description: "Module imported in main"truths:
- "npm test -- ComponentName"
- "npm run build"
artifacts:
- "src/components/ComponentName.tsx"
- "src/components/ComponentName.test.tsx"
wiring:
- source: "src/components/index.ts"
pattern: "export.*ComponentName"
description: "Component exported from barrel"
- source: "src/pages/Parent.tsx"
pattern: "<ComponentName"
description: "Component rendered in parent"loom verify <stage-id>loom verify <stage-id> --suggesttruthartifactswiringworking_dir../description-qtruths: ["cargo test"]truths: ["loom verify stage-1"]pattern: "verify"pattern: "Commands::Verify"working_dir: ".""loom/src/file.rs"working_dir: "loom""src/file.rs"