process-automated-builder
Process Automated Builder
Scope
- Prepare one local
process_from_flowrun from a request or reference-flow input. - Reopen an existing run to write deterministic resume metadata.
- Prepare one local publish bundle from an existing run.
- Prepare a deterministic batch of local process-build runs.
This skill uses the CLI only. Legacy alternate runtimes are not part of the supported path.
Canonical Runtime
- Read
references/workflow-map.mdandreferences/operations-playbook.md. - Choose an explicit output directory, for example
/abs/path/artifacts/<case_slug>/.... - Use
node scripts/run-process-automated-builder.mjs auto-build ... --out-dir <dir>to create one local run root. - Continue with
resume-build,publish-build, orbatch-buildas needed, passing--run-diror--out-direxplicitly. - If a missing capability is discovered, add a native
tiangong process ...command intiangong-lca-clifirst. Do not add new business runtime inside this skill.
Parallel Execution Contract
Run-level parallel: multiple flow inputs can run concurrently, but each run must use a distinctrun_id.In-run parallel: do not run multiple writers against the samerun_id.- Single-writer rule:
- never let multiple agents write the same
<run_dir>/cache/process_from_flow_state.json - within one
run_id, only one active writer process is allowed at a time - enforcement is code-level through the CLI state lock
- never let multiple agents write the same
Canonical Node Wrapper Commands
node scripts/run-process-automated-builder.mjs auto-build --help
node scripts/run-process-automated-builder.mjs resume-build --help
node scripts/run-process-automated-builder.mjs publish-build --help
node scripts/run-process-automated-builder.mjs batch-build --help
node scripts/run-process-automated-builder.mjs auto-build \
--flow-file /abs/path/reference-flow.json \
--operation produce \
--out-dir /abs/path/artifacts/<case_slug>/process_from_flow/<run_id> \
--json
node scripts/run-process-automated-builder.mjs resume-build --run-dir /abs/path/artifacts/<case_slug>/process_from_flow/<run_id> --run-id <run_id> --json
node scripts/run-process-automated-builder.mjs publish-build --run-dir /abs/path/artifacts/<case_slug>/process_from_flow/<run_id> --run-id <run_id> --json
node scripts/run-process-automated-builder.mjs batch-build --input /abs/path/batch-request.json --out-dir /abs/path/artifacts/<case_slug>/process_batch/<batch_id> --json
Runtime Requirements
- The wrapper runs the published CLI by default through
npm exec --yes --package=@tiangong-lca/cli@latest -- tiangong. - Set
TIANGONG_LCA_CLI_DIRor pass--cli-dironly when you need a local CLI working tree for dev/CI. - The wrapper requires explicit output paths instead of relying on
cwd/artifacts/...defaults. - For repeatable runs, use an explicit output root such as
/abs/path/artifacts/<case_slug>/.... - The current canonical commands prepare local run outputs and do not depend on legacy private runtimes.
- If a future native CLI command needs additional env, document it in
tiangong-lca-clifirst and keep this skill as a thin caller only.
Process Name Contract
- Any generated process payload must preserve the four-part process name object:
name.baseName,name.treatmentStandardsRoutes,name.mixAndLocationTypes,name.functionalUnitFlowProperties. baseName,treatmentStandardsRoutes, andmixAndLocationTypesare schema-required in current TianGong process payloads. Keep the keys even when one field is semantically empty; do not collapse the whole reference-flow short description back intobaseName.- When name splitting is ambiguous, align with
../lifecycleinventory-review/profiles/process/references/process-review-rules.mdinstead of inventing a one-off local convention.
Fast Troubleshooting
- Local CLI override issues: set
TIANGONG_LCA_CLI_DIRor pass--cli-dironly when you intentionally need an unpublished working tree. - Missing
--out-diror--run-dir: the wrapper requires an explicit output path such as/abs/path/artifacts/<case_slug>/.... - Missing
--input/--flow-file: new runs need one explicit request or reference-flow input. - Run-level conflicts: do not reuse the same
run_idacross concurrent writers. - Publish preparation issues: inspect
stage_outputs/10_publish/andcache/agent_handoff_summary.jsonbefore touching downstream publish flow. - If a required step is missing, add it as a native
tiangong process ...command instead of reintroducing a legacy runtime here.
Load References On Demand
references/workflow-map.md: current CLI-only execution map and output layout.references/operations-playbook.md: concise command examples and troubleshooting.
More from tiangong-lca/skills
process-hybrid-search
Execute and troubleshoot Supabase edge function `process_hybrid_search`, which rewrites process descriptions and calls `hybrid_search_processes` with optional filters. Use when validating process query/filter behavior, tuning retrieval prompts, or debugging auth, embedding, and RPC failures.
15flow-hybrid-search
Execute and troubleshoot Supabase edge function `flow_hybrid_search`, which rewrites flow descriptions and calls `hybrid_search_flows` with optional filters. Use when validating flow query/filter behavior, tuning retrieval prompts, or debugging auth, embedding, and RPC failures.
14embedding-ft
Execute and troubleshoot Supabase edge function `embedding_ft` that consumes PGMQ embedding jobs, calls AWS SageMaker embeddings, and writes vectors back to Postgres. Use when validating job payload handling, investigating failed embeddings, tuning ack semantics, or adjusting worker auth/environment.
13lifecyclemodel-hybrid-search
Execute and troubleshoot Supabase edge function `lifecyclemodel_hybrid_search`, which rewrites lifecycle model descriptions and calls `hybrid_search_lifecyclemodels` with optional filters. Use when validating lifecycle-model query/filter behavior, tuning retrieval prompts, or debugging auth, embedding, and RPC failures.
13lifecycleinventory-review
Review process-level or lifecyclemodel-level lifecycle inventory outputs from local TianGong build runs, plus frozen remote TianGong process snapshots. Use when auditing process_from_flow batches, remote process rows fetched through the canonical snapshot wrapper, or lifecyclemodel build artifacts through the unified CLI with reproducible review inputs and outputs.
10flow-governance-review
Run the CLI-backed flow governance commands for review, remediation, deterministic process-flow repair, and publish preparation. Use `node scripts/run-flow-governance-review.mjs COMMAND ...` when you need the supported `tiangong review flow` and `tiangong flow ...` workflows from a skill wrapper.
9