@tiangong-lca/cli 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -77,7 +77,7 @@ TIANGONG_LCA_DISABLE_SESSION_CACHE=false
77
77
  TIANGONG_LCA_FORCE_REAUTH=false
78
78
  ```
79
79
 
80
- Optional LLM review env, only for `review process --enable-llm` or `review flow --enable-llm`:
80
+ Optional LLM review env, only for `qa process --enable-llm` or `qa flow --enable-llm`:
81
81
 
82
82
  ```bash
83
83
  TIANGONG_LCA_REVIEW_LLM_BASE_URL=
@@ -177,11 +177,11 @@ Key outputs under `--out-dir`:
177
177
  - `outputs/materialized-process.json`
178
178
  - `outputs/materialized-flow.json`
179
179
 
180
- ## Real DB Flow Review
180
+ ## Real DB Flow QA
181
181
 
182
182
  1. Search or otherwise collect exact flow refs.
183
- 2. Materialize DB rows into local review input.
184
- 3. Review the materialized rows.
183
+ 2. Materialize DB rows into local QA input.
184
+ 3. Run QA on the materialized rows.
185
185
  4. Materialize approved decisions into downstream artifacts.
186
186
 
187
187
  `flow fetch-rows` input:
@@ -225,19 +225,19 @@ tiangong-lca flow fetch-rows \
225
225
  --refs-file ./flow-refs.json \
226
226
  --out-dir ./flow-fetch
227
227
 
228
- tiangong-lca review flow \
229
- --rows-file ./flow-fetch/review-input-rows.jsonl \
230
- --out-dir ./flow-review
228
+ tiangong-lca qa flow \
229
+ --rows-file ./flow-fetch/qa-input-rows.jsonl \
230
+ --out-dir ./flow-qa
231
231
 
232
232
  tiangong-lca flow materialize-decisions \
233
233
  --decision-file ./approved-decisions.json \
234
- --flow-rows-file ./flow-fetch/review-input-rows.jsonl \
234
+ --flow-rows-file ./flow-fetch/qa-input-rows.jsonl \
235
235
  --out-dir ./flow-decisions
236
236
  ```
237
237
 
238
238
  Key `flow fetch-rows` outputs:
239
239
 
240
- - `review-input-rows.jsonl`
240
+ - `qa-input-rows.jsonl`
241
241
  - `fetch-summary.json`
242
242
  - `missing-flow-refs.jsonl`
243
243
  - `ambiguous-flow-refs.jsonl`
@@ -272,8 +272,8 @@ tiangong-lca lifecyclemodel publish-build --run-dir /abs/path/to/lifecyclemodel-
272
272
  tiangong-lca lifecyclemodel save-draft --input ./lifecyclemodels.jsonl --out-dir /abs/path/to/lifecyclemodel-save-draft --dry-run --json
273
273
  tiangong-lca lifecyclemodel graph --input ./lifecyclemodels.jsonl --out-dir /abs/path/to/lifecyclemodel-graph --format all --json
274
274
  tiangong-lca lifecyclemodel orchestrate plan --input ./lifecyclemodel-orchestrate.request.json --out-dir /abs/path/to/lifecyclemodel-recursive-run --json
275
- tiangong-lca review process --rows-file ./process-list-report.json --out-dir ./review
276
- tiangong-lca review process --run-root /abs/path/to/process-run --run-id <run_id> --out-dir ./review
275
+ tiangong-lca qa process --rows-file ./process-list-report.json --out-dir ./process-qa
276
+ tiangong-lca qa process --run-root /abs/path/to/process-run --run-id <run_id> --out-dir ./process-qa
277
277
  tiangong-lca process save-draft --input ./patched-processes.jsonl --out-dir /abs/path/to/process-save-draft --dry-run --json
278
278
  tiangong-lca process save-draft --input ./patched-processes.jsonl --out-dir /abs/path/to/process-save-draft --commit --json
279
279
  tiangong-lca flow publish-version --input-file ./ready-flows.jsonl --out-dir /abs/path/to/flow-publish --dry-run --json
@@ -284,7 +284,7 @@ tiangong-lca doctor --json
284
284
 
285
285
  For `publish run`, relative `out_dir` values from either the request body or `--out-dir` are resolved against the request file directory, not the shell `cwd`. Use an absolute path when you want a fixed destination independent of the request file location.
286
286
 
287
- For `review process`, `--rows-file` accepts either raw process rows as JSON/JSONL or the full JSON report emitted by `tiangong-lca process list --json`, as long as it contains a `rows` array.
287
+ For `qa process`, `--rows-file` accepts either raw process rows as JSON/JSONL or the full JSON report emitted by `tiangong-lca process list --json`, as long as it contains a `rows` array.
288
288
 
289
289
  For `process identity-preflight` and `flow identity-preflight`, canonical TIDAS wrappers are schema-checked when present. Loose target objects are accepted for early planning and produce `schema_validation.status: "not_applicable"` until materialization. Candidate rows can be embedded in the request, loaded from repeatable `--candidate-input` local files/directories, or fetched through explicit `--remote-candidates` hybrid search; `identity-candidate-sources.json` records scanned files, remote endpoints, queries, filters, and row counts.
290
290
 
@@ -307,15 +307,15 @@ For `dataset references rewrite`, `--commit` executes the state-aware save-draft
307
307
  ## More Docs
308
308
 
309
309
  - `docs/IMPLEMENTATION_GUIDE_CN.md`: maintainer-facing command contract and implementation notes
310
- - `--help`: the canonical command surface for `tiangong-lca`, `tiangong-lca flow`, `tiangong-lca review`, `tiangong-lca process`, `tiangong-lca lifecyclemodel`, and `tiangong-lca publish`
310
+ - `--help`: the canonical command surface for `tiangong-lca`, `tiangong-lca qa`, `tiangong-lca flow`, `tiangong-lca process`, `tiangong-lca lifecyclemodel`, and `tiangong-lca publish`
311
311
  - `tiangong-lca-skills`: use the skill-specific `SKILL.md` and wrapper docs for agent workflows; the CLI README only covers the public invocation contract
312
312
 
313
313
  ## Help
314
314
 
315
315
  ```bash
316
316
  tiangong-lca --help
317
+ tiangong-lca qa --help
317
318
  tiangong-lca flow --help
318
- tiangong-lca review --help
319
319
  tiangong-lca process --help
320
320
  tiangong-lca lifecyclemodel --help
321
321
  tiangong-lca publish --help
package/dist/src/cli.js CHANGED
@@ -26,9 +26,9 @@ import { runProcessVerifyRows, } from './lib/process-verify-rows.js';
26
26
  import { runFlowBuildPlanMaterialize, runFlowBuildPlanValidate, runProcessBuildPlanMaterialize, runProcessBuildPlanValidate, } from './lib/process-flow-build-plan.js';
27
27
  import { runFlowIdentityPreflight, runProcessIdentityPreflight, } from './lib/identity-preflight.js';
28
28
  import { runPublish } from './lib/publish.js';
29
- import { runProcessReview, } from './lib/review-process.js';
30
- import { runFlowReview, } from './lib/review-flow.js';
31
- import { runLifecyclemodelReview, } from './lib/review-lifecyclemodel.js';
29
+ import { runProcessQa } from './lib/process-qa.js';
30
+ import { runFlowQa } from './lib/flow-qa.js';
31
+ import { runLifecyclemodelQa, } from './lib/lifecyclemodel-qa.js';
32
32
  import { runFlowRemediate, } from './lib/flow-remediate.js';
33
33
  import { runFlowFetchRows, } from './lib/flow-fetch-rows.js';
34
34
  import { runFlowMaterializeDecisions, } from './lib/flow-materialize-decisions.js';
@@ -71,7 +71,7 @@ Implemented Commands:
71
71
  dataset contract get | context-pack | import-lca convert | author | validate | verify-remote | bilingual extract/apply/validate | evidence-search plan/run | references rewrite/refresh-remote
72
72
  flow get | list | identity-preflight | build-plan | fetch-rows | materialize-decisions | remediate | publish-version | publish-reviewed-data | build-alias-map | scan-process-flow-refs | plan-process-flow-repairs | apply-process-flow-repairs | regen-product | validate-processes
73
73
  lifecyclemodel auto-build | validate-build | publish-build | save-draft | graph | build-resulting-process | publish-resulting-process | orchestrate
74
- review process | flow | lifecyclemodel
74
+ qa process | flow | lifecyclemodel
75
75
  publish run
76
76
  validation run
77
77
  admin embedding-run
@@ -123,7 +123,7 @@ Examples:
123
123
  tiangong-lca flow identity-preflight --input ./flow-preflight.json --out-dir ./flow-preflight
124
124
  tiangong-lca flow build-plan validate --input ./flow-build-plan.json --out-dir ./flow-build-plan
125
125
  tiangong-lca flow fetch-rows --refs-file ./flow-refs.json --out-dir ./flow-fetch
126
- tiangong-lca flow materialize-decisions --decision-file ./approved-decisions.json --flow-rows-file ./review-input-rows.jsonl --out-dir ./flow-decisions
126
+ tiangong-lca flow materialize-decisions --decision-file ./approved-decisions.json --flow-rows-file ./qa-input-rows.jsonl --out-dir ./flow-decisions
127
127
  tiangong-lca flow remediate --input-file ./invalid-flows.jsonl --out-dir ./flow-remediation
128
128
  tiangong-lca flow publish-version --input-file ./ready-flows.jsonl --out-dir ./flow-publish --commit
129
129
  tiangong-lca flow publish-reviewed-data --flow-rows-file ./reviewed-flows.jsonl --original-flow-rows-file ./original-flows.jsonl --out-dir ./flow-publish-review
@@ -133,10 +133,10 @@ Examples:
133
133
  tiangong-lca flow apply-process-flow-repairs --processes-file ./processes.jsonl --scope-flow-file ./flows.jsonl --out-dir ./flow-repair-apply
134
134
  tiangong-lca flow regen-product --processes-file ./processes.jsonl --scope-flow-file ./flows.jsonl --out-dir ./flow-regeneration --apply
135
135
  tiangong-lca flow validate-processes --original-processes-file ./before.jsonl --patched-processes-file ./after.jsonl --scope-flow-file ./flows.jsonl --out-dir ./flow-validation
136
- tiangong-lca review process --rows-file ./processes.jsonl --out-dir ./review
137
- tiangong-lca review process --run-root /abs/path/to/process-run --run-id <run_id> --out-dir ./review
138
- tiangong-lca review flow --rows-file ./flows.json --out-dir ./review
139
- tiangong-lca review lifecyclemodel --run-dir /abs/path/to/lifecyclemodel-run --out-dir ./lifecyclemodel-review
136
+ tiangong-lca qa process --rows-file ./processes.jsonl --out-dir ./qa
137
+ tiangong-lca qa process --run-root /abs/path/to/process-run --run-id <run_id> --out-dir ./qa
138
+ tiangong-lca qa flow --rows-file ./flows.json --out-dir ./qa
139
+ tiangong-lca qa lifecyclemodel --run-dir /abs/path/to/lifecyclemodel-run --out-dir ./lifecyclemodel-qa
140
140
  tiangong-lca publish run --input ./publish-request.json --dry-run
141
141
  tiangong-lca validation run --input-dir ./package --engine auto
142
142
  tiangong-lca admin embedding-run --input ./jobs.json
@@ -250,7 +250,7 @@ Implemented Subcommands:
250
250
  verify-remote Verify dataset roots and TIDAS references against remote published versions
251
251
  bilingual extract Extract bilingual translation units from local rows
252
252
  bilingual apply Apply reviewed bilingual translations back to local rows
253
- bilingual validate Validate bilingual rows with deterministic scans and schema/review gates
253
+ bilingual validate Validate bilingual rows with deterministic scans and schema/QA gates
254
254
  evidence-search Plan or record field-level public evidence retrieval
255
255
  references rewrite Rewrite flow references in local process and lifecyclemodel rows
256
256
  references refresh-remote Refresh local TIDAS reference versions to latest reachable remote rows
@@ -466,7 +466,7 @@ function renderDatasetBilingualValidateHelp() {
466
466
  Options:
467
467
  --input <file> Local rows as JSON or JSONL
468
468
  --type <type> auto | flow | process | lifecyclemodel (default: auto)
469
- --out-dir <dir> Artifact directory for scan, schema, and review outputs
469
+ --out-dir <dir> Artifact directory for scan, schema, and QA outputs
470
470
  --json Print compact JSON
471
471
  -h, --help
472
472
 
@@ -474,7 +474,7 @@ Outputs written under --out-dir:
474
474
  - outputs/bilingual-validate-report.json
475
475
  - outputs/bilingual-findings.jsonl
476
476
  - schema/outputs/validation-report.json
477
- - review/process/... and/or review/flow/... when applicable
477
+ - qa/process/... and/or qa/flow/... when applicable
478
478
  `.trim();
479
479
  }
480
480
  function renderDatasetEvidenceSearchHelp() {
@@ -558,7 +558,7 @@ Implemented Subcommands:
558
558
  list Enumerate flow datasets through direct Supabase access with deterministic filters
559
559
  identity-preflight Compare one target flow against local candidates before generation
560
560
  build-plan Validate or materialize a flow build plan into gate artifacts
561
- fetch-rows Materialize real DB flow refs into local review-input rows and fetch artifacts
561
+ fetch-rows Materialize real DB flow refs into local qa-input rows and fetch artifacts
562
562
  materialize-decisions Materialize approved merge decisions into canonical-map, rewrite-plan, and seed artifacts
563
563
  remediate Deterministically repair invalid local flow rows and emit artifact-first outputs
564
564
  publish-version Publish remediated flow versions through the unified CLI surface
@@ -723,7 +723,7 @@ Required env:
723
723
 
724
724
  Outputs written under --out-dir:
725
725
  - resolved-flow-rows.jsonl
726
- - review-input-rows.jsonl
726
+ - qa-input-rows.jsonl
727
727
  - fetch-summary.json
728
728
  - missing-flow-refs.jsonl
729
729
  - ambiguous-flow-refs.jsonl
@@ -941,56 +941,55 @@ Outputs written under --out-dir:
941
941
  - validation-failures.jsonl
942
942
  `.trim();
943
943
  }
944
- function renderReviewHelp() {
944
+ function renderQaHelp() {
945
945
  return `Usage:
946
- tiangong-lca review <subcommand> [options]
946
+ tiangong-lca qa <subcommand> [options]
947
947
 
948
948
  Implemented Subcommands:
949
- process Review process build runs or rows-file snapshots and emit artifact-first findings
950
- flow Review local flow governance snapshots and emit artifact-first findings
951
- lifecyclemodel Review one local lifecyclemodel build run and emit artifact-first findings
949
+ process Run deterministic process QA for build runs or rows-file snapshots
950
+ flow Run deterministic flow QA for local governance snapshots
951
+ lifecyclemodel Run deterministic lifecyclemodel QA for one local build run
952
952
 
953
953
  Examples:
954
- tiangong-lca review --help
955
- tiangong-lca review process --help
956
- tiangong-lca review flow --help
957
- tiangong-lca review lifecyclemodel --help
954
+ tiangong-lca qa process --help
955
+ tiangong-lca qa flow --help
956
+ tiangong-lca qa lifecyclemodel --help
958
957
  `.trim();
959
958
  }
960
- function renderReviewProcessHelp() {
959
+ function renderQaProcessHelp() {
961
960
  return `Usage:
962
- tiangong-lca review process (--rows-file <file> | --run-root <dir>) --out-dir <dir> [options]
961
+ tiangong-lca qa process (--rows-file <file> | --run-root <dir>) --out-dir <dir> [options]
963
962
 
964
963
  Options:
965
964
  --rows-file <file> Process rows JSON/JSONL file; full process list reports with rows[] are also accepted
966
965
  --run-root <dir> Process build run root containing exports/processes
967
- --run-id <id> Optional review run identifier; defaults to the rows-file name or run-root basename
968
- --out-dir <dir> Review artifact output directory
966
+ --run-id <id> Optional QA run identifier; defaults to the rows-file name or run-root basename
967
+ --out-dir <dir> QA artifact output directory
969
968
  --start-ts <iso> Optional run start timestamp
970
969
  --end-ts <iso> Optional run end timestamp
971
- --logic-version <name> Review logic version label (default: v2.1)
972
- --enable-llm Enable optional review-only semantic review via the CLI LLM client
973
- --llm-model <name> Override TIANGONG_LCA_REVIEW_LLM_MODEL for this review command
974
- --llm-max-processes <n> Cap how many process summaries are sent to the LLM (default: 8)
970
+ --logic-version <name> QA logic version label (default: v2.1)
971
+ --enable-llm Deprecated no-op; process semantic authoring now belongs in Foundry curation
972
+ --llm-model <name> Deprecated no-op kept for older scripts
973
+ --llm-max-processes <n> Deprecated no-op kept for older scripts
975
974
  --json Print compact JSON
976
975
  -h, --help
977
976
  `.trim();
978
977
  }
979
- function renderReviewFlowHelp() {
978
+ function renderQaFlowHelp() {
980
979
  return `Usage:
981
- tiangong-lca review flow (--rows-file <file> | --flows-dir <dir> | --run-root <dir>) --out-dir <dir> [options]
980
+ tiangong-lca qa flow (--rows-file <file> | --flows-dir <dir> | --run-root <dir>) --out-dir <dir> [options]
982
981
 
983
982
  Options:
984
- --rows-file <file> Flow rows JSON / JSONL file; the CLI materializes review-input/flows automatically
983
+ --rows-file <file> Flow rows JSON / JSONL file; the CLI materializes qa-input/flows automatically
985
984
  --flows-dir <dir> Directory containing per-flow JSON files
986
985
  --run-root <dir> Existing run root containing cache/flows or exports/flows
987
986
  --run-id <id> Optional run identifier override
988
- --out-dir <dir> Review artifact output directory
987
+ --out-dir <dir> QA artifact output directory
989
988
  --start-ts <iso> Optional run start timestamp
990
989
  --end-ts <iso> Optional run end timestamp
991
- --logic-version <name> Review logic version label (default: flow-v1.0-cli)
992
- --enable-llm Enable optional review-only semantic review via the CLI LLM client
993
- --llm-model <name> Override TIANGONG_LCA_REVIEW_LLM_MODEL for this review command
990
+ --logic-version <name> QA logic version label (default: flow-v1.0-cli)
991
+ --enable-llm Enable optional QA-only semantic checks via the CLI LLM client
992
+ --llm-model <name> Override TIANGONG_LCA_REVIEW_LLM_MODEL for this QA command
994
993
  --llm-max-flows <n> Cap how many flow summaries are sent to the LLM (default: 120)
995
994
  --llm-batch-size <n> Cap how many flow summaries each LLM batch sends (default: 20)
996
995
  --similarity-threshold <n> Similarity threshold for duplicate-candidate warnings (default: 0.92)
@@ -999,23 +998,23 @@ Options:
999
998
  -h, --help
1000
999
  `.trim();
1001
1000
  }
1002
- function renderReviewLifecyclemodelHelp() {
1001
+ function renderQaLifecyclemodelHelp() {
1003
1002
  return `Usage:
1004
- tiangong-lca review lifecyclemodel --run-dir <dir> --out-dir <dir> [options]
1003
+ tiangong-lca qa lifecyclemodel --run-dir <dir> --out-dir <dir> [options]
1005
1004
 
1006
1005
  Options:
1007
1006
  --run-dir <dir> Existing lifecyclemodel auto-build run directory
1008
- --out-dir <dir> Review artifact output directory
1007
+ --out-dir <dir> QA artifact output directory
1009
1008
  --start-ts <iso> Optional run start timestamp
1010
1009
  --end-ts <iso> Optional run end timestamp
1011
- --logic-version <name> Review logic version label (default: lifecyclemodel-review-v1.0)
1010
+ --logic-version <name> QA logic version label (default: lifecyclemodel-qa-v1.0)
1012
1011
  --json Print compact JSON
1013
1012
  -h, --help
1014
1013
 
1015
1014
  This command:
1016
1015
  - reads one existing lifecyclemodel build run under models/*/tidas_bundle/lifecyclemodels
1017
1016
  - aggregates validate-build findings when reports/lifecyclemodel-validate-build-report.json is present
1018
- - emits artifact-first model summaries, findings, markdown review notes, and a structured report
1017
+ - emits artifact-first model summaries, findings, markdown QA notes, and a structured report
1019
1018
  `.trim();
1020
1019
  }
1021
1020
  function renderLifecyclemodelBuildResultingProcessHelp() {
@@ -2959,7 +2958,7 @@ function parseFlowListFlags(args) {
2959
2958
  order: typeof values.order === 'string' ? values.order : null,
2960
2959
  };
2961
2960
  }
2962
- function parseReviewProcessFlags(args) {
2961
+ function parseQaProcessFlags(args) {
2963
2962
  let values;
2964
2963
  try {
2965
2964
  ({ values } = parseArgs({
@@ -3013,7 +3012,7 @@ function parseReviewProcessFlags(args) {
3013
3012
  llmMaxProcesses: llmMaxProcessesValue,
3014
3013
  };
3015
3014
  }
3016
- function parseReviewFlowFlags(args) {
3015
+ function parseQaFlowFlags(args) {
3017
3016
  let values;
3018
3017
  try {
3019
3018
  ({ values } = parseArgs({
@@ -3088,7 +3087,7 @@ function parseReviewFlowFlags(args) {
3088
3087
  methodologyId: typeof values['methodology-id'] === 'string' ? values['methodology-id'] : undefined,
3089
3088
  };
3090
3089
  }
3091
- function parseReviewLifecyclemodelFlags(args) {
3090
+ function parseQaLifecyclemodelFlags(args) {
3092
3091
  let values;
3093
3092
  try {
3094
3093
  ({ values } = parseArgs({
@@ -3843,6 +3842,15 @@ function plannedCommand(command, subcommand) {
3843
3842
  stderr: `Command '${command}${suffix}' is part of the planned unified surface but is not implemented yet.\n`,
3844
3843
  };
3845
3844
  }
3845
+ function removedReviewCommand(subcommand) {
3846
+ const suffix = subcommand ? ` ${subcommand}` : '';
3847
+ const replacement = subcommand ? `qa ${subcommand}` : 'qa';
3848
+ return {
3849
+ exitCode: 2,
3850
+ stdout: '',
3851
+ stderr: `Command 'review${suffix}' was removed. Use 'tiangong-lca ${replacement}' instead.\n`,
3852
+ };
3853
+ }
3846
3854
  function applyRemoteOverrides(env, overrides) {
3847
3855
  const runtimeEnv = readRuntimeEnv(env);
3848
3856
  return {
@@ -3880,9 +3888,9 @@ export async function executeCli(argv, deps) {
3880
3888
  const processIdentityPreflightImpl = deps.runProcessIdentityPreflightImpl ?? runProcessIdentityPreflight;
3881
3889
  const processBuildPlanValidateImpl = deps.runProcessBuildPlanValidateImpl ?? runProcessBuildPlanValidate;
3882
3890
  const processBuildPlanMaterializeImpl = deps.runProcessBuildPlanMaterializeImpl ?? runProcessBuildPlanMaterialize;
3883
- const processReviewImpl = deps.runProcessReviewImpl ?? runProcessReview;
3884
- const flowReviewImpl = deps.runFlowReviewImpl ?? runFlowReview;
3885
- const lifecyclemodelReviewImpl = deps.runLifecyclemodelReviewImpl ?? runLifecyclemodelReview;
3891
+ const processQaImpl = deps.runProcessQaImpl ?? runProcessQa;
3892
+ const flowQaImpl = deps.runFlowQaImpl ?? runFlowQa;
3893
+ const lifecyclemodelQaImpl = deps.runLifecyclemodelQaImpl ?? runLifecyclemodelQa;
3886
3894
  const flowRemediateImpl = deps.runFlowRemediateImpl ?? runFlowRemediate;
3887
3895
  const flowFetchRowsImpl = deps.runFlowFetchRowsImpl ?? runFlowFetchRows;
3888
3896
  const flowMaterializeDecisionsImpl = deps.runFlowMaterializeDecisionsImpl ?? runFlowMaterializeDecisions;
@@ -5142,81 +5150,84 @@ export async function executeCli(argv, deps) {
5142
5150
  stderr: '',
5143
5151
  };
5144
5152
  }
5145
- if (command === 'review' && !subcommand) {
5146
- return { exitCode: 0, stdout: `${renderReviewHelp()}\n`, stderr: '' };
5153
+ if (command === 'qa' && !subcommand) {
5154
+ return { exitCode: 0, stdout: `${renderQaHelp()}\n`, stderr: '' };
5147
5155
  }
5148
- if (command === 'review' && subcommand === 'process') {
5149
- const reviewFlags = parseReviewProcessFlags(commandArgs);
5150
- if (reviewFlags.help) {
5151
- return { exitCode: 0, stdout: `${renderReviewProcessHelp()}\n`, stderr: '' };
5156
+ if (command === 'qa' && subcommand === 'process') {
5157
+ const qaFlags = parseQaProcessFlags(commandArgs);
5158
+ if (qaFlags.help) {
5159
+ return { exitCode: 0, stdout: `${renderQaProcessHelp()}\n`, stderr: '' };
5152
5160
  }
5153
- const report = await processReviewImpl({
5154
- rowsFile: reviewFlags.rowsFile,
5155
- runRoot: reviewFlags.runRoot,
5156
- runId: reviewFlags.runId,
5157
- outDir: reviewFlags.outDir,
5158
- startTs: reviewFlags.startTs,
5159
- endTs: reviewFlags.endTs,
5160
- logicVersion: reviewFlags.logicVersion,
5161
- enableLlm: reviewFlags.enableLlm,
5162
- llmModel: reviewFlags.llmModel,
5163
- llmMaxProcesses: reviewFlags.llmMaxProcesses,
5161
+ const report = await processQaImpl({
5162
+ rowsFile: qaFlags.rowsFile,
5163
+ runRoot: qaFlags.runRoot,
5164
+ runId: qaFlags.runId,
5165
+ outDir: qaFlags.outDir,
5166
+ startTs: qaFlags.startTs,
5167
+ endTs: qaFlags.endTs,
5168
+ logicVersion: qaFlags.logicVersion,
5169
+ enableLlm: qaFlags.enableLlm,
5170
+ llmModel: qaFlags.llmModel,
5171
+ llmMaxProcesses: qaFlags.llmMaxProcesses,
5164
5172
  env: deps.env,
5165
5173
  fetchImpl: deps.fetchImpl,
5166
5174
  });
5167
5175
  return {
5168
5176
  exitCode: 0,
5169
- stdout: stringifyJson(report, reviewFlags.json),
5177
+ stdout: stringifyJson(report, qaFlags.json),
5170
5178
  stderr: '',
5171
5179
  };
5172
5180
  }
5173
- if (command === 'review' && subcommand === 'flow') {
5174
- const reviewFlags = parseReviewFlowFlags(commandArgs);
5175
- if (reviewFlags.help) {
5176
- return { exitCode: 0, stdout: `${renderReviewFlowHelp()}\n`, stderr: '' };
5181
+ if (command === 'qa' && subcommand === 'flow') {
5182
+ const qaFlags = parseQaFlowFlags(commandArgs);
5183
+ if (qaFlags.help) {
5184
+ return { exitCode: 0, stdout: `${renderQaFlowHelp()}\n`, stderr: '' };
5177
5185
  }
5178
- const report = await flowReviewImpl({
5179
- rowsFile: reviewFlags.rowsFile,
5180
- flowsDir: reviewFlags.flowsDir,
5181
- runRoot: reviewFlags.runRoot,
5182
- runId: reviewFlags.runId,
5183
- outDir: reviewFlags.outDir,
5184
- startTs: reviewFlags.startTs,
5185
- endTs: reviewFlags.endTs,
5186
- logicVersion: reviewFlags.logicVersion,
5187
- enableLlm: reviewFlags.enableLlm,
5188
- llmModel: reviewFlags.llmModel,
5189
- llmMaxFlows: reviewFlags.llmMaxFlows,
5190
- llmBatchSize: reviewFlags.llmBatchSize,
5191
- similarityThreshold: reviewFlags.similarityThreshold,
5192
- methodologyId: reviewFlags.methodologyId,
5186
+ const report = await flowQaImpl({
5187
+ rowsFile: qaFlags.rowsFile,
5188
+ flowsDir: qaFlags.flowsDir,
5189
+ runRoot: qaFlags.runRoot,
5190
+ runId: qaFlags.runId,
5191
+ outDir: qaFlags.outDir,
5192
+ startTs: qaFlags.startTs,
5193
+ endTs: qaFlags.endTs,
5194
+ logicVersion: qaFlags.logicVersion,
5195
+ enableLlm: qaFlags.enableLlm,
5196
+ llmModel: qaFlags.llmModel,
5197
+ llmMaxFlows: qaFlags.llmMaxFlows,
5198
+ llmBatchSize: qaFlags.llmBatchSize,
5199
+ similarityThreshold: qaFlags.similarityThreshold,
5200
+ methodologyId: qaFlags.methodologyId,
5193
5201
  env: deps.env,
5194
5202
  fetchImpl: deps.fetchImpl,
5195
5203
  });
5196
5204
  return {
5197
5205
  exitCode: 0,
5198
- stdout: stringifyJson(report, reviewFlags.json),
5206
+ stdout: stringifyJson(report, qaFlags.json),
5199
5207
  stderr: '',
5200
5208
  };
5201
5209
  }
5202
- if (command === 'review' && subcommand === 'lifecyclemodel') {
5203
- const reviewFlags = parseReviewLifecyclemodelFlags(commandArgs);
5204
- if (reviewFlags.help) {
5205
- return { exitCode: 0, stdout: `${renderReviewLifecyclemodelHelp()}\n`, stderr: '' };
5210
+ if (command === 'qa' && subcommand === 'lifecyclemodel') {
5211
+ const qaFlags = parseQaLifecyclemodelFlags(commandArgs);
5212
+ if (qaFlags.help) {
5213
+ return { exitCode: 0, stdout: `${renderQaLifecyclemodelHelp()}\n`, stderr: '' };
5206
5214
  }
5207
- const report = await lifecyclemodelReviewImpl({
5208
- runDir: reviewFlags.runDir,
5209
- outDir: reviewFlags.outDir,
5210
- startTs: reviewFlags.startTs,
5211
- endTs: reviewFlags.endTs,
5212
- logicVersion: reviewFlags.logicVersion,
5215
+ const report = await lifecyclemodelQaImpl({
5216
+ runDir: qaFlags.runDir,
5217
+ outDir: qaFlags.outDir,
5218
+ startTs: qaFlags.startTs,
5219
+ endTs: qaFlags.endTs,
5220
+ logicVersion: qaFlags.logicVersion,
5213
5221
  });
5214
5222
  return {
5215
5223
  exitCode: 0,
5216
- stdout: stringifyJson(report, reviewFlags.json),
5224
+ stdout: stringifyJson(report, qaFlags.json),
5217
5225
  stderr: '',
5218
5226
  };
5219
5227
  }
5228
+ if (command === 'review') {
5229
+ return removedReviewCommand(subcommand ?? undefined);
5230
+ }
5220
5231
  return plannedCommand(command, subcommand ?? undefined);
5221
5232
  }
5222
5233
  catch (error) {