process-scope-statistics
process-scope-statistics
Use this skill when the task is to answer questions like:
- “这些 process 覆盖多少领域/工艺/产品?”
- “当前可见的
state_code=0,100process 有多少单元过程、多少产品?” - “给我一个以后可重复跑的 process scope 统计方案”
Workflow
- Create an output directory first.
- Ensure
TIANGONG_LCA_*is already exported or.envis available in the current working directory. - Run
node scripts/run-process-scope-statistics.mjs. - Review the JSON summaries and Markdown reports in that output directory.
- If you need a Chinese report, keep the
.zh-CN.mdoutput.
Default Statistical Scope
Unless the user says otherwise, use:
--scope visible--state-codes 0,100
visible means “all process rows visible to the current authenticated session”.
In practice this typically includes:
- draft rows owned by the current account, such as
state_code=0 - publicly visible rows such as
state_code=100
Canonical Script
node scripts/run-process-scope-statistics.mjs \
--out-dir /abs/path/process-scope-stats \
--scope visible \
--state-code 0 \
--state-code 100
Useful options:
--scope current-user--state-code 0--state-code 100--page-size 200--reuse-snapshot
The wrapper delegates to the canonical CLI command:
tiangong process scope-statistics --out-dir /abs/path/process-scope-stats --scope visible --state-code 0 --state-code 100
Compatibility note:
--state-codes 0,100is still accepted as a wrapper/CLI alias, but repeatable--state-codeflags are the canonical shape.
Outputs
inputs/processes.snapshot.manifest.jsoninputs/processes.snapshot.rows.jsonloutputs/process-scope-summary.jsonoutputs/domain-summary.jsonoutputs/craft-summary.jsonoutputs/product-summary.jsonoutputs/type-of-dataset-summary.jsonreports/process-scope-statistics.mdreports/process-scope-statistics.zh-CN.md
Metric Definitions
Read references/metric-definitions.md when you need the exact counting rules for:
- domain
- craft / route
- unit process
- product
Notes
- This is a read-only statistics skill; it does not save remote edits.
- The skill is a thin wrapper over
tiangong process scope-statistics; it does not carry a separate remote runtime or private.envparser. - The metric layer is deterministic and string-based. It does not try to semantically merge cross-language variants unless they already share the same stable identifier.
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.
13process-automated-builder
Execute the supported `process_from_flow` CLI workflow. Use `node scripts/run-process-automated-builder.mjs auto-build|resume-build|publish-build|batch-build` when you need the unified `tiangong process ...` surface from a skill wrapper.
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.
10