| name | tangle-blueprint-expert |
| description | Build or review Tangle Blueprints using current protocol, operator, and repository evidence. |
Tangle Blueprint Expert
Use this skill for any request that involves:
- building or refactoring a Tangle Blueprint
- defining blueprint architecture or job/query boundaries
- writing BSM (Blueprint Service Manager) Solidity contracts
- operator registration and service-instance lifecycle design
- production-like deploy/request/approve/job testing with
cargo tangle
- blueprint UI flows for provisioning/service/jobs
- production runtime patterns (operator API, auth, secrets, circuit breakers)
- GPU-accelerated blueprints (detection, BSM validation, remote provisioning)
- shielded/private payment integration (Credit Mode, RLN Mode, VAnchor)
- pricing config and RFQ quote flows
- subprocess lifecycle management (vLLM, Ollama, inference engines)
Required Reading Order
Conceptual foundation (read first):
references/TANGLE-BLUEPRINT-OVERVIEW.md -- Protocol vision, hierarchy, tenancy, auth
references/TANGLE-BLUEPRINT-BPM-VS-INSTANCE.md -- Blueprint Manager (SDK-provided) vs Blueprint Instance (author-written) layer boundary, billing/lifecycle who-does-what, adapter anti-pattern
references/TANGLE-BLUEPRINT-BUILD-PROCESS.md -- 5-phase build process and validation gates
Implementation references (read as needed):
3. references/TANGLE-BLUEPRINT-SDK-PATTERNS.md -- Rust SDK programming model: Router, extractors, runner wiring, main.rs boilerplate, testing
4. references/TANGLE-BLUEPRINT-REPO-STRUCTURE.md -- Canonical bin/lib repo layout, workspace patterns, contracts/scripts/config organization
5. references/TANGLE-BLUEPRINT-BSM-HOOKS.md -- All 30+ Solidity BSM hooks with signatures, job types, payment models, slashing, membership
6. references/TANGLE-BLUEPRINT-PRODUCTION-PATTERNS.md -- Operator API, BPM bridge, session auth, secrets, circuit breakers, reaper/GC, billing, TEE
7. references/TANGLE-BLUEPRINT-ADVANCED-PATTERNS.md -- GPU provisioning, shielded payments (Credit/RLN), pricing TOML/RFQ, remote providers, subprocess lifecycle
8. references/TANGLE-BLUEPRINT-CLI-RUNBOOK.md -- Complete CLI command reference: scaffold, deploy, register, service lifecycle, jobs, operator, delegator
9. references/TANGLE-BLUEPRINT-LEARNINGS.md -- Do/don't patterns, failure classes, validation ladder
Discipline references (read before PR / before mainnet):
10. references/TANGLE-BLUEPRINT-HONESTY-DISCIPLINE.md -- LIMITS.md pattern, claim-with-counterweight rule, pre-complete gate, paranoid-default rule for security-adjacent code, stub discipline
11. references/TANGLE-BLUEPRINT-META-REVIEW.md -- Continuous adversarial pass (Phase 3.5), persona-dispatch synthesis (Phase 6), 10-point scorecard + tier mapping, operator-vs-agent division of labor
Do not skip the overview. It defines the protocol and business model semantics.
Source of Truth
This skill is distributed through the public tangle-network/skills marketplace under plugins/tangle-blueprint-expert/.
Reference codebases:
Use project-provided repositories or public examples for specialized GPU inference, private-payment, or customer-specific patterns. Do not assume local paths exist.
Core Contract (Never Violate)
- Blueprint is an abstract template, not a live instance.
- Operators register for blueprints.
- Customers select a subset of registered operators when requesting a service.
- Service instance is the concrete running unit for that request.
- Jobs mutate instance state; queries are read-only surfaces.
If these are mixed, stop and correct architecture first.
Execution Workflow
- Write a short Build Contract before code:
- scope boundaries
- job/query set
- tenancy model (
single-tenant or multi-tenant)
- auth model (chain/operator/service/tenant)
- BSM hooks needed (which to override from
BlueprintServiceManagerBase)
- validation gates and CLI proof steps
- For net-new blueprint repos, scaffold first:
cargo tangle blueprint create ...
- immediate
cargo check
- Implement with explicit boundaries:
- BSM contract (extend
BlueprintServiceManagerBase, override needed hooks)
- Rust job handlers (Router + TangleArg/TangleResult + TangleLayer)
- BlueprintRunner wiring (producer, consumer, background services)
- Operator API (Axum HTTP alongside on-chain jobs)
- Auth checks at all mutation entrypoints
- UI defaults-first, advanced settings for low-level knobs
- Run production-like validation:
- deploy/register
- operator register
- service request + approve
- resolve active service
- job submit/watch
- capture IDs (
blueprint_id, request_id, service_id, call_id)
- Report only with evidence (commands + outcomes + remaining gaps).
Production Deploy = the Blueprint Manager, NEVER the instance binary
Running a blueprint's operator/instance binary directly (e.g. <binary> run with a hardcoded
SERVICE_ID / TEST_MODE=true) is for LOCAL TESTING ONLY. In production each operator box runs
the Blueprint Manager daemon:
cargo-tangle blueprint run -t --pretty \
--http-rpc-url <HTTP_RPC> --ws-rpc-url <WS_RPC> \
--keystore-uri <KEYSTORE> --data-dir <DATA>/bpm-data \
--chain <testnet|mainnet> --protocol tangle
The manager watches the chain and spawns the per-service instance itself when a service request
is approved -- you never ExecStart / hand-run the instance binary in production. Honor the full
on-chain lifecycle: deploy the manager -> operator registers for the blueprint -> a user
requests a service selecting registered operators -> operators approve -> the manager spawns
the instance with the assigned service id. Reference that does it right:
ai-trading-blueprint/deploy/go-live.sh + trading-blueprint.service (ExecStart is
cargo-tangle blueprint run, not the validator binary).
Tenancy + Auth Rules
Single-tenant service instance
- one customer trust boundary per instance
- auth should be instance-scoped
- tests must prove no cross-instance bleed
Multi-tenant service instance
- one instance serves multiple tenants
- add tenant identity + authorization layer
- tests must prove tenant isolation and tenant-scoped authz
UI Boundary Rules
- Use
@tangle-network/blueprint-ui for provisioning/chain/service/job UX.
- Use
@tangle-network/agent-ui only for terminal/chat/session agent runtime UX.
- Keep product-specific glue in app-local code.
- Do not duplicate shared primitives locally unless there is a hard contract mismatch.
Validation Minimum
cargo check
- relevant tests/smoke
- if UI changed: build/typecheck and one non-mocked local happy path
- if protocol/runtime changed: CLI lifecycle proof from runbook
- tenancy/auth proof matching selected model
Anti-Patterns to Reject
- Treating blueprint as a generic backend service.
- Collapsing blueprint/operator/service-instance semantics.
- Mixing read paths into mutation jobs.
- Shipping docs-only architecture intent as implemented reality.
- Claiming done without deploy/request/approve/job evidence.
- Writing a BSM without understanding which hooks fire for which lifecycle events.
- Building an operator binary without an operator API for read-only operations.
- Skipping session auth on off-chain endpoints.
- Shipping a claim in README without a paired
docs/LIMITS.md entry (see honesty discipline ref).
- Declaring a feature "done" without running the pre-complete gate (see honesty discipline ref).
- Defaulting security-adjacent code (JWT, encryption, transport) to the ergonomic primitive instead of the paranoid one (see honesty discipline ref).
- Running persona / adversarial review only at the end, not continuously per commit (see meta-review ref).
Output Style
When answering with this skill:
- Start with architecture stance (hierarchy + tenancy + auth).
- Give exact command path for validation.
- Provide concise evidence and explicit unresolved gaps.
- Keep language direct and implementation-first.