@lumenflow/cli 3.1.2 → 3.2.0
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 +36 -35
- package/dist/agent-issues-query.js +13 -8
- package/dist/agent-log-issue.js +15 -4
- package/dist/agent-session-end.js +15 -4
- package/dist/agent-session.js +18 -6
- package/dist/backlog-prune.js +1 -1
- package/dist/commands/integrate.js +32 -18
- package/dist/config-get.js +27 -15
- package/dist/config-set.js +104 -37
- package/dist/delegation-list.js +1 -1
- package/dist/doctor.js +19 -13
- package/dist/file-delete.js +1 -1
- package/dist/file-edit.js +1 -1
- package/dist/file-read.js +1 -1
- package/dist/file-write.js +1 -1
- package/dist/flow-bottlenecks.js +1 -1
- package/dist/flow-report.js +10 -9
- package/dist/gates.js +3 -2
- package/dist/git-branch.js +1 -1
- package/dist/git-diff.js +1 -1
- package/dist/git-log.js +1 -1
- package/dist/init.js +238 -42
- package/dist/initiative-add-wu.js +1 -1
- package/dist/initiative-bulk-assign-wus.js +1 -1
- package/dist/initiative-create.js +2 -2
- package/dist/initiative-edit.js +1 -1
- package/dist/initiative-list.js +1 -1
- package/dist/initiative-plan.js +1 -3
- package/dist/initiative-status.js +47 -6
- package/dist/lane-edit.js +19 -10
- package/dist/lane-health.js +13 -24
- package/dist/lane-lock.js +4 -5
- package/dist/lane-setup.js +5 -5
- package/dist/lane-status.js +4 -5
- package/dist/lane-suggest.js +9 -7
- package/dist/lane-validate.js +4 -5
- package/dist/lumenflow-upgrade.js +17 -11
- package/dist/mem-checkpoint.js +1 -1
- package/dist/mem-cleanup.js +6 -23
- package/dist/mem-context.js +1 -1
- package/dist/mem-create.js +1 -1
- package/dist/mem-delete.js +1 -1
- package/dist/mem-export.js +1 -1
- package/dist/mem-inbox.js +1 -1
- package/dist/mem-init.js +1 -1
- package/dist/mem-ready.js +1 -1
- package/dist/mem-recover.js +1 -1
- package/dist/mem-signal.js +1 -1
- package/dist/mem-start.js +1 -1
- package/dist/mem-summarize.js +8 -7
- package/dist/mem-triage.js +7 -5
- package/dist/metrics-cli.js +1 -1
- package/dist/metrics-snapshot.js +1 -1
- package/dist/onboard.js +295 -120
- package/dist/orchestrate-init-status.js +12 -7
- package/dist/orchestrate-initiative.js +23 -12
- package/dist/orchestrate-monitor.js +20 -8
- package/dist/pack-scaffold.js +1 -1
- package/dist/plan-create.js +1 -3
- package/dist/plan-edit.js +1 -3
- package/dist/plan-link.js +1 -3
- package/dist/plan-promote.js +1 -3
- package/dist/release.js +27 -10
- package/dist/signal-cleanup.js +4 -18
- package/dist/state-bootstrap.js +11 -8
- package/dist/state-cleanup.js +5 -19
- package/dist/state-doctor.js +213 -9
- package/dist/task-claim.js +1 -1
- package/dist/validate.js +1 -1
- package/dist/workspace-init.js +61 -61
- package/dist/wu-block.js +1 -1
- package/dist/wu-brief.js +1 -1
- package/dist/wu-claim.js +1 -1
- package/dist/wu-cleanup.js +1 -1
- package/dist/wu-create.js +3 -3
- package/dist/wu-delegate.js +1 -1
- package/dist/wu-deps.js +1 -1
- package/dist/wu-done.js +66 -34
- package/dist/wu-edit.js +1 -1
- package/dist/wu-infer-lane.js +1 -1
- package/dist/wu-preflight.js +1 -1
- package/dist/wu-prep.js +1 -1
- package/dist/wu-proto.js +1 -1
- package/dist/wu-prune.js +1 -1
- package/dist/wu-recover.js +1 -1
- package/dist/wu-release.js +1 -1
- package/dist/wu-repair.js +1 -1
- package/dist/wu-sandbox.js +40 -27
- package/dist/wu-status.js +1 -1
- package/dist/wu-unblock.js +1 -1
- package/dist/wu-unlock-lane.js +1 -1
- package/dist/wu-validate.js +1 -1
- package/package.json +13 -8
- package/packs/software-delivery/constants.ts +10 -0
- package/packs/software-delivery/extensions.ts +140 -0
- package/packs/software-delivery/gate-policies.ts +134 -0
- package/packs/software-delivery/index.ts +8 -0
- package/packs/software-delivery/manifest-schema.ts +236 -0
- package/packs/software-delivery/manifest.ts +417 -0
- package/packs/software-delivery/manifest.yaml +711 -0
- package/packs/software-delivery/pack-registration.ts +113 -0
- package/packs/software-delivery/tool-impl/agent-tools.ts +263 -0
- package/packs/software-delivery/tool-impl/delegation-tools.ts +66 -0
- package/packs/software-delivery/tool-impl/flow-metrics-tools.ts +219 -0
- package/packs/software-delivery/tool-impl/git-runner.ts +113 -0
- package/packs/software-delivery/tool-impl/git-tools.ts +316 -0
- package/packs/software-delivery/tool-impl/index.ts +15 -0
- package/packs/software-delivery/tool-impl/initiative-orchestration-tools.ts +720 -0
- package/packs/software-delivery/tool-impl/lane-lock.ts +246 -0
- package/packs/software-delivery/tool-impl/memory-tools.ts +415 -0
- package/packs/software-delivery/tool-impl/pending-runtime-tools.ts +21 -0
- package/packs/software-delivery/tool-impl/runtime-cli-adapter.ts +328 -0
- package/packs/software-delivery/tool-impl/runtime-native-tools.ts +687 -0
- package/packs/software-delivery/tool-impl/worker-loader.ts +52 -0
- package/packs/software-delivery/tool-impl/worktree-tools.ts +46 -0
- package/packs/software-delivery/tool-impl/wu-lifecycle-tools.ts +759 -0
- package/packs/software-delivery/tools/delegation-tools.ts +23 -0
- package/packs/software-delivery/tools/git-tools.ts +55 -0
- package/packs/software-delivery/tools/index.ts +8 -0
- package/packs/software-delivery/tools/lane-lock-tool.ts +37 -0
- package/packs/software-delivery/tools/types.ts +71 -0
- package/packs/software-delivery/tools/worktree-tools.ts +49 -0
- package/templates/core/LUMENFLOW.md.template +3 -3
- package/templates/core/ai/onboarding/agent-invocation-guide.md.template +1 -1
- package/templates/core/ai/onboarding/lumenflow-force-usage.md.template +1 -1
- package/templates/core/ai/onboarding/quick-ref-commands.md.template +5 -5
- package/templates/core/ai/onboarding/starting-prompt.md.template +3 -3
- package/templates/core/ai/onboarding/vendor-support.md.template +1 -1
- package/templates/core/ai/onboarding/wu-create-checklist.md.template +1 -1
- package/dist/agent-issues-query.js.map +0 -1
- package/dist/agent-log-issue.js.map +0 -1
- package/dist/agent-session-end.js.map +0 -1
- package/dist/agent-session.js.map +0 -1
- package/dist/backlog-prune.js.map +0 -1
- package/dist/cli-entry-point.js +0 -149
- package/dist/cli-entry-point.js.map +0 -1
- package/dist/commands/integrate.js.map +0 -1
- package/dist/commands.js.map +0 -1
- package/dist/config-get.js.map +0 -1
- package/dist/config-set.js.map +0 -1
- package/dist/delegation-list.js.map +0 -1
- package/dist/deps-add.js +0 -259
- package/dist/deps-add.js.map +0 -1
- package/dist/deps-remove.js +0 -105
- package/dist/deps-remove.js.map +0 -1
- package/dist/docs-sync.js.map +0 -1
- package/dist/doctor.js.map +0 -1
- package/dist/file-delete.js.map +0 -1
- package/dist/file-edit.js.map +0 -1
- package/dist/file-read.js.map +0 -1
- package/dist/file-write.js.map +0 -1
- package/dist/flow-bottlenecks.js.map +0 -1
- package/dist/flow-report.js.map +0 -1
- package/dist/formatters.js +0 -151
- package/dist/formatters.js.map +0 -1
- package/dist/gate-defaults.js +0 -131
- package/dist/gate-defaults.js.map +0 -1
- package/dist/gate-registry.js +0 -73
- package/dist/gate-registry.js.map +0 -1
- package/dist/gates-graceful-degradation.js +0 -153
- package/dist/gates-graceful-degradation.js.map +0 -1
- package/dist/gates-plan-resolvers.js +0 -152
- package/dist/gates-plan-resolvers.js.map +0 -1
- package/dist/gates-runners.js +0 -509
- package/dist/gates-runners.js.map +0 -1
- package/dist/gates-types.js +0 -4
- package/dist/gates-types.js.map +0 -1
- package/dist/gates-utils.js +0 -323
- package/dist/gates-utils.js.map +0 -1
- package/dist/gates.js.map +0 -1
- package/dist/git-branch.js.map +0 -1
- package/dist/git-diff.js.map +0 -1
- package/dist/git-log.js.map +0 -1
- package/dist/git-status.js.map +0 -1
- package/dist/guard-locked.js +0 -172
- package/dist/guard-locked.js.map +0 -1
- package/dist/guard-main-branch.js +0 -217
- package/dist/guard-main-branch.js.map +0 -1
- package/dist/guard-worktree-commit.js +0 -163
- package/dist/guard-worktree-commit.js.map +0 -1
- package/dist/hooks/auto-checkpoint-utils.js +0 -54
- package/dist/hooks/auto-checkpoint-utils.js.map +0 -1
- package/dist/hooks/enforcement-checks.js +0 -399
- package/dist/hooks/enforcement-checks.js.map +0 -1
- package/dist/hooks/enforcement-generator.js +0 -139
- package/dist/hooks/enforcement-generator.js.map +0 -1
- package/dist/hooks/enforcement-sync.js +0 -385
- package/dist/hooks/enforcement-sync.js.map +0 -1
- package/dist/hooks/generators/auto-checkpoint.js +0 -125
- package/dist/hooks/generators/auto-checkpoint.js.map +0 -1
- package/dist/hooks/generators/enforce-worktree.js +0 -190
- package/dist/hooks/generators/enforce-worktree.js.map +0 -1
- package/dist/hooks/generators/index.js +0 -18
- package/dist/hooks/generators/index.js.map +0 -1
- package/dist/hooks/generators/pre-compact-checkpoint.js +0 -136
- package/dist/hooks/generators/pre-compact-checkpoint.js.map +0 -1
- package/dist/hooks/generators/require-wu.js +0 -117
- package/dist/hooks/generators/require-wu.js.map +0 -1
- package/dist/hooks/generators/session-start-recovery.js +0 -103
- package/dist/hooks/generators/session-start-recovery.js.map +0 -1
- package/dist/hooks/generators/signal-utils.js +0 -54
- package/dist/hooks/generators/signal-utils.js.map +0 -1
- package/dist/hooks/generators/warn-incomplete.js +0 -67
- package/dist/hooks/generators/warn-incomplete.js.map +0 -1
- package/dist/hooks/index.js +0 -10
- package/dist/hooks/index.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/init-detection.js +0 -232
- package/dist/init-detection.js.map +0 -1
- package/dist/init-lane-validation.js +0 -143
- package/dist/init-lane-validation.js.map +0 -1
- package/dist/init-scaffolding.js +0 -158
- package/dist/init-scaffolding.js.map +0 -1
- package/dist/init-templates.js +0 -1982
- package/dist/init-templates.js.map +0 -1
- package/dist/init.js.map +0 -1
- package/dist/initiative-add-wu.js.map +0 -1
- package/dist/initiative-bulk-assign-wus.js.map +0 -1
- package/dist/initiative-create.js.map +0 -1
- package/dist/initiative-edit.js.map +0 -1
- package/dist/initiative-list.js.map +0 -1
- package/dist/initiative-plan.js.map +0 -1
- package/dist/initiative-remove-wu.js.map +0 -1
- package/dist/initiative-status.js.map +0 -1
- package/dist/lane-edit.js.map +0 -1
- package/dist/lane-health.js.map +0 -1
- package/dist/lane-lifecycle-process.js +0 -366
- package/dist/lane-lifecycle-process.js.map +0 -1
- package/dist/lane-lock.js.map +0 -1
- package/dist/lane-setup.js.map +0 -1
- package/dist/lane-status.js.map +0 -1
- package/dist/lane-suggest.js.map +0 -1
- package/dist/lane-validate.js.map +0 -1
- package/dist/lifecycle-regression-harness.js +0 -181
- package/dist/lifecycle-regression-harness.js.map +0 -1
- package/dist/lumenflow-upgrade.js.map +0 -1
- package/dist/mem-checkpoint.js.map +0 -1
- package/dist/mem-cleanup.js.map +0 -1
- package/dist/mem-context.js.map +0 -1
- package/dist/mem-create.js.map +0 -1
- package/dist/mem-delete.js.map +0 -1
- package/dist/mem-export.js.map +0 -1
- package/dist/mem-inbox.js.map +0 -1
- package/dist/mem-index.js +0 -214
- package/dist/mem-index.js.map +0 -1
- package/dist/mem-init.js.map +0 -1
- package/dist/mem-profile.js +0 -210
- package/dist/mem-profile.js.map +0 -1
- package/dist/mem-promote.js +0 -257
- package/dist/mem-promote.js.map +0 -1
- package/dist/mem-ready.js.map +0 -1
- package/dist/mem-recover.js.map +0 -1
- package/dist/mem-signal.js.map +0 -1
- package/dist/mem-start.js.map +0 -1
- package/dist/mem-summarize.js.map +0 -1
- package/dist/mem-triage.js.map +0 -1
- package/dist/merge-block.js +0 -225
- package/dist/merge-block.js.map +0 -1
- package/dist/metrics-cli.js.map +0 -1
- package/dist/metrics-snapshot.js.map +0 -1
- package/dist/onboard.js.map +0 -1
- package/dist/onboarding-smoke-test.js +0 -418
- package/dist/onboarding-smoke-test.js.map +0 -1
- package/dist/orchestrate-init-status.js.map +0 -1
- package/dist/orchestrate-initiative.js.map +0 -1
- package/dist/orchestrate-monitor.js.map +0 -1
- package/dist/pack-author.js.map +0 -1
- package/dist/pack-hash.js.map +0 -1
- package/dist/pack-install.js.map +0 -1
- package/dist/pack-publish.js.map +0 -1
- package/dist/pack-scaffold.js.map +0 -1
- package/dist/pack-search.js.map +0 -1
- package/dist/pack-validate.js.map +0 -1
- package/dist/plan-create.js.map +0 -1
- package/dist/plan-edit.js.map +0 -1
- package/dist/plan-link.js.map +0 -1
- package/dist/plan-promote.js.map +0 -1
- package/dist/public-manifest.js +0 -920
- package/dist/public-manifest.js.map +0 -1
- package/dist/release.js.map +0 -1
- package/dist/rotate-progress.js +0 -253
- package/dist/rotate-progress.js.map +0 -1
- package/dist/session-coordinator.js +0 -303
- package/dist/session-coordinator.js.map +0 -1
- package/dist/shared-validators.js +0 -81
- package/dist/shared-validators.js.map +0 -1
- package/dist/signal-cleanup.js.map +0 -1
- package/dist/state-bootstrap.js.map +0 -1
- package/dist/state-cleanup.js.map +0 -1
- package/dist/state-doctor-fix.js +0 -226
- package/dist/state-doctor-fix.js.map +0 -1
- package/dist/state-doctor-stamps.js +0 -23
- package/dist/state-doctor-stamps.js.map +0 -1
- package/dist/state-doctor.js.map +0 -1
- package/dist/strict-progress.js +0 -255
- package/dist/strict-progress.js.map +0 -1
- package/dist/sync-templates.js.map +0 -1
- package/dist/task-claim.js.map +0 -1
- package/dist/trace-gen.js +0 -401
- package/dist/trace-gen.js.map +0 -1
- package/dist/validate-agent-skills.js +0 -223
- package/dist/validate-agent-skills.js.map +0 -1
- package/dist/validate-agent-sync.js +0 -151
- package/dist/validate-agent-sync.js.map +0 -1
- package/dist/validate-backlog-sync.js +0 -77
- package/dist/validate-backlog-sync.js.map +0 -1
- package/dist/validate-skills-spec.js +0 -211
- package/dist/validate-skills-spec.js.map +0 -1
- package/dist/validate.js.map +0 -1
- package/dist/validator-defaults.js +0 -107
- package/dist/validator-defaults.js.map +0 -1
- package/dist/validator-registry.js +0 -71
- package/dist/validator-registry.js.map +0 -1
- package/dist/workspace-init.js.map +0 -1
- package/dist/wu-block.js.map +0 -1
- package/dist/wu-brief.js.map +0 -1
- package/dist/wu-claim-branch.js +0 -123
- package/dist/wu-claim-branch.js.map +0 -1
- package/dist/wu-claim-cloud.js +0 -79
- package/dist/wu-claim-cloud.js.map +0 -1
- package/dist/wu-claim-mode.js +0 -82
- package/dist/wu-claim-mode.js.map +0 -1
- package/dist/wu-claim-output.js +0 -85
- package/dist/wu-claim-output.js.map +0 -1
- package/dist/wu-claim-repair-guidance.js +0 -12
- package/dist/wu-claim-repair-guidance.js.map +0 -1
- package/dist/wu-claim-resume-handler.js +0 -87
- package/dist/wu-claim-resume-handler.js.map +0 -1
- package/dist/wu-claim-state.js +0 -581
- package/dist/wu-claim-state.js.map +0 -1
- package/dist/wu-claim-validation.js +0 -457
- package/dist/wu-claim-validation.js.map +0 -1
- package/dist/wu-claim-worktree.js +0 -223
- package/dist/wu-claim-worktree.js.map +0 -1
- package/dist/wu-claim.js.map +0 -1
- package/dist/wu-cleanup-cloud.js +0 -78
- package/dist/wu-cleanup-cloud.js.map +0 -1
- package/dist/wu-cleanup.js.map +0 -1
- package/dist/wu-code-path-coverage.js +0 -83
- package/dist/wu-code-path-coverage.js.map +0 -1
- package/dist/wu-create-cloud.js +0 -30
- package/dist/wu-create-cloud.js.map +0 -1
- package/dist/wu-create-content.js +0 -264
- package/dist/wu-create-content.js.map +0 -1
- package/dist/wu-create-readiness.js +0 -59
- package/dist/wu-create-readiness.js.map +0 -1
- package/dist/wu-create-validation.js +0 -128
- package/dist/wu-create-validation.js.map +0 -1
- package/dist/wu-create.js.map +0 -1
- package/dist/wu-delegate.js.map +0 -1
- package/dist/wu-delete.js.map +0 -1
- package/dist/wu-deps.js.map +0 -1
- package/dist/wu-done-auto-cleanup.js +0 -203
- package/dist/wu-done-auto-cleanup.js.map +0 -1
- package/dist/wu-done-check.js +0 -38
- package/dist/wu-done-check.js.map +0 -1
- package/dist/wu-done-cloud.js +0 -48
- package/dist/wu-done-cloud.js.map +0 -1
- package/dist/wu-done-decay.js +0 -86
- package/dist/wu-done-decay.js.map +0 -1
- package/dist/wu-done.js.map +0 -1
- package/dist/wu-edit-operations.js +0 -399
- package/dist/wu-edit-operations.js.map +0 -1
- package/dist/wu-edit-validators.js +0 -282
- package/dist/wu-edit-validators.js.map +0 -1
- package/dist/wu-edit.js.map +0 -1
- package/dist/wu-infer-lane.js.map +0 -1
- package/dist/wu-preflight.js.map +0 -1
- package/dist/wu-prep.js.map +0 -1
- package/dist/wu-proto.js.map +0 -1
- package/dist/wu-prune.js.map +0 -1
- package/dist/wu-recover.js.map +0 -1
- package/dist/wu-release.js.map +0 -1
- package/dist/wu-repair.js.map +0 -1
- package/dist/wu-sandbox.js.map +0 -1
- package/dist/wu-spawn-completion.js +0 -33
- package/dist/wu-spawn-completion.js.map +0 -1
- package/dist/wu-spawn-prompt-builders.js +0 -1197
- package/dist/wu-spawn-prompt-builders.js.map +0 -1
- package/dist/wu-spawn-strategy-resolver.js +0 -322
- package/dist/wu-spawn-strategy-resolver.js.map +0 -1
- package/dist/wu-spawn.js +0 -59
- package/dist/wu-spawn.js.map +0 -1
- package/dist/wu-state-cloud.js +0 -41
- package/dist/wu-state-cloud.js.map +0 -1
- package/dist/wu-status.js.map +0 -1
- package/dist/wu-unblock.js.map +0 -1
- package/dist/wu-unlock-lane.js.map +0 -1
- package/dist/wu-validate.js.map +0 -1
package/dist/config-set.js
CHANGED
|
@@ -3,26 +3,26 @@
|
|
|
3
3
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
4
4
|
/**
|
|
5
5
|
* @file config-set.ts
|
|
6
|
-
* WU-1902: Safe config:set CLI command for .
|
|
6
|
+
* WU-1902 / WU-1973: Safe config:set CLI command for workspace.yaml modification
|
|
7
7
|
*
|
|
8
|
-
* Accepts dotpath keys
|
|
9
|
-
*
|
|
8
|
+
* Accepts dotpath keys and writes them to workspace.yaml under software_delivery.
|
|
9
|
+
* Values are validated against the LumenFlow config schema before writing.
|
|
10
10
|
*
|
|
11
11
|
* Follows the lane:edit pattern (WU-1854).
|
|
12
12
|
*
|
|
13
13
|
* Usage:
|
|
14
|
-
* pnpm config:set --key methodology.testing --value test-after
|
|
15
|
-
* pnpm config:set --key gates.minCoverage --value 85
|
|
16
|
-
* pnpm config:set --key agents.methodology.principles --value Library-First,KISS
|
|
14
|
+
* pnpm config:set --key software_delivery.methodology.testing --value test-after
|
|
15
|
+
* pnpm config:set --key software_delivery.gates.minCoverage --value 85
|
|
16
|
+
* pnpm config:set --key software_delivery.agents.methodology.principles --value Library-First,KISS
|
|
17
17
|
*/
|
|
18
18
|
import path from 'node:path';
|
|
19
19
|
import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
20
20
|
import YAML from 'yaml';
|
|
21
21
|
import { findProjectRoot } from '@lumenflow/core/config';
|
|
22
22
|
import { die } from '@lumenflow/core/error-handler';
|
|
23
|
-
import {
|
|
23
|
+
import { FILE_SYSTEM } from '@lumenflow/core/wu-constants';
|
|
24
24
|
import { withMicroWorktree } from '@lumenflow/core/micro-worktree';
|
|
25
|
-
import { LumenFlowConfigSchema } from '@lumenflow/core/config-schema';
|
|
25
|
+
import { LumenFlowConfigSchema, WORKSPACE_V2_KEYS } from '@lumenflow/core/config-schema';
|
|
26
26
|
import { normalizeConfigKeys } from '@lumenflow/core/normalize-config-keys';
|
|
27
27
|
import { runCLI } from './cli-entry-point.js';
|
|
28
28
|
// ---------------------------------------------------------------------------
|
|
@@ -34,33 +34,37 @@ const ARG_KEY = '--key';
|
|
|
34
34
|
const ARG_VALUE = '--value';
|
|
35
35
|
const ARG_HELP = '--help';
|
|
36
36
|
const COMMIT_PREFIX = 'chore: config:set';
|
|
37
|
+
const WORKSPACE_INIT_COMMAND = 'pnpm workspace-init --yes';
|
|
38
|
+
export const WORKSPACE_FILE_NAME = 'workspace.yaml';
|
|
39
|
+
export const WORKSPACE_CONFIG_ROOT_KEY = WORKSPACE_V2_KEYS.SOFTWARE_DELIVERY;
|
|
40
|
+
export const WORKSPACE_CONFIG_PREFIX = `${WORKSPACE_CONFIG_ROOT_KEY}.`;
|
|
37
41
|
// ---------------------------------------------------------------------------
|
|
38
42
|
// Help text
|
|
39
43
|
// ---------------------------------------------------------------------------
|
|
40
44
|
const SET_HELP_TEXT = `Usage: pnpm config:set --key <dotpath> --value <value>
|
|
41
45
|
|
|
42
|
-
Safely update .
|
|
46
|
+
Safely update workspace.yaml via micro-worktree commit.
|
|
43
47
|
Validates against Zod schema before writing.
|
|
44
48
|
|
|
45
49
|
Required:
|
|
46
|
-
${ARG_KEY} <dotpath> Config key in dot notation (e.g., methodology.testing)
|
|
50
|
+
${ARG_KEY} <dotpath> Config key in dot notation (e.g., software_delivery.methodology.testing)
|
|
47
51
|
${ARG_VALUE} <value> Value to set (comma-separated for arrays)
|
|
48
52
|
|
|
49
53
|
Examples:
|
|
50
|
-
pnpm config:set --key methodology.testing --value test-after
|
|
51
|
-
pnpm config:set --key gates.minCoverage --value 85
|
|
52
|
-
pnpm config:set --key agents.methodology.principles --value Library-First,KISS
|
|
54
|
+
pnpm config:set --key software_delivery.methodology.testing --value test-after
|
|
55
|
+
pnpm config:set --key software_delivery.gates.minCoverage --value 85
|
|
56
|
+
pnpm config:set --key software_delivery.agents.methodology.principles --value Library-First,KISS
|
|
53
57
|
`;
|
|
54
58
|
const GET_HELP_TEXT = `Usage: pnpm config:get --key <dotpath>
|
|
55
59
|
|
|
56
|
-
Read and display a value from .
|
|
60
|
+
Read and display a value from workspace.yaml.
|
|
57
61
|
|
|
58
62
|
Required:
|
|
59
|
-
${ARG_KEY} <dotpath> Config key in dot notation (e.g., methodology.testing)
|
|
63
|
+
${ARG_KEY} <dotpath> Config key in dot notation (e.g., software_delivery.methodology.testing)
|
|
60
64
|
|
|
61
65
|
Examples:
|
|
62
|
-
pnpm config:get --key methodology.testing
|
|
63
|
-
pnpm config:get --key gates.minCoverage
|
|
66
|
+
pnpm config:get --key software_delivery.methodology.testing
|
|
67
|
+
pnpm config:get --key software_delivery.gates.minCoverage
|
|
64
68
|
`;
|
|
65
69
|
// ---------------------------------------------------------------------------
|
|
66
70
|
// Argument parsing
|
|
@@ -115,6 +119,25 @@ export function parseConfigGetArgs(argv) {
|
|
|
115
119
|
}
|
|
116
120
|
return { key };
|
|
117
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* Normalize a user-provided key to software_delivery-relative dotpath.
|
|
124
|
+
*
|
|
125
|
+
* Supported key forms:
|
|
126
|
+
* - `software_delivery.methodology.testing` (canonical)
|
|
127
|
+
* - `methodology.testing` (shorthand; automatically scoped)
|
|
128
|
+
*
|
|
129
|
+
* @param key - User-provided config key
|
|
130
|
+
* @returns Dotpath relative to software_delivery
|
|
131
|
+
*/
|
|
132
|
+
export function normalizeWorkspaceConfigKey(key) {
|
|
133
|
+
if (key === WORKSPACE_CONFIG_ROOT_KEY) {
|
|
134
|
+
return '';
|
|
135
|
+
}
|
|
136
|
+
if (key.startsWith(WORKSPACE_CONFIG_PREFIX)) {
|
|
137
|
+
return key.slice(WORKSPACE_CONFIG_PREFIX.length);
|
|
138
|
+
}
|
|
139
|
+
return key;
|
|
140
|
+
}
|
|
118
141
|
// ---------------------------------------------------------------------------
|
|
119
142
|
// Dotpath helpers (pure, no side effects)
|
|
120
143
|
// ---------------------------------------------------------------------------
|
|
@@ -232,27 +255,69 @@ export function applyConfigSet(config, dotpath, rawValue) {
|
|
|
232
255
|
// ---------------------------------------------------------------------------
|
|
233
256
|
// Config I/O helpers
|
|
234
257
|
// ---------------------------------------------------------------------------
|
|
235
|
-
|
|
236
|
-
|
|
258
|
+
/**
|
|
259
|
+
* Read workspace YAML as object.
|
|
260
|
+
*
|
|
261
|
+
* @param workspacePath - Absolute path to workspace.yaml
|
|
262
|
+
* @returns Parsed workspace object
|
|
263
|
+
*/
|
|
264
|
+
function readRawWorkspace(workspacePath) {
|
|
265
|
+
const content = readFileSync(workspacePath, FILE_SYSTEM.UTF8);
|
|
237
266
|
const parsed = YAML.parse(content);
|
|
238
267
|
return parsed && typeof parsed === 'object' ? parsed : {};
|
|
239
268
|
}
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
269
|
+
/**
|
|
270
|
+
* Write workspace object back to YAML.
|
|
271
|
+
*
|
|
272
|
+
* @param workspacePath - Absolute path to workspace.yaml
|
|
273
|
+
* @param workspace - Workspace object to persist
|
|
274
|
+
*/
|
|
275
|
+
function writeRawWorkspace(workspacePath, workspace) {
|
|
276
|
+
const nextContent = YAML.stringify(workspace);
|
|
277
|
+
writeFileSync(workspacePath, nextContent, FILE_SYSTEM.UTF8);
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Extract software_delivery config section from workspace object.
|
|
281
|
+
*
|
|
282
|
+
* @param workspace - Parsed workspace object
|
|
283
|
+
* @returns software_delivery config object (empty when unset/invalid)
|
|
284
|
+
*/
|
|
285
|
+
export function getSoftwareDeliveryConfigFromWorkspace(workspace) {
|
|
286
|
+
const section = workspace[WORKSPACE_CONFIG_ROOT_KEY];
|
|
287
|
+
if (!section || typeof section !== 'object' || Array.isArray(section)) {
|
|
288
|
+
return {};
|
|
289
|
+
}
|
|
290
|
+
return section;
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Return a new workspace object with updated software_delivery section.
|
|
294
|
+
*
|
|
295
|
+
* @param workspace - Existing workspace object
|
|
296
|
+
* @param config - Updated software_delivery config object
|
|
297
|
+
* @returns New workspace object with replaced software_delivery section
|
|
298
|
+
*/
|
|
299
|
+
export function setSoftwareDeliveryConfigInWorkspace(workspace, config) {
|
|
300
|
+
return {
|
|
301
|
+
...workspace,
|
|
302
|
+
[WORKSPACE_CONFIG_ROOT_KEY]: config,
|
|
303
|
+
};
|
|
243
304
|
}
|
|
244
305
|
// ---------------------------------------------------------------------------
|
|
245
306
|
// Main: config:set
|
|
246
307
|
// ---------------------------------------------------------------------------
|
|
247
|
-
async function main() {
|
|
308
|
+
export async function main() {
|
|
248
309
|
const userArgs = process.argv.slice(2);
|
|
249
310
|
const options = parseConfigSetArgs(userArgs);
|
|
311
|
+
const configKey = normalizeWorkspaceConfigKey(options.key);
|
|
312
|
+
if (!configKey) {
|
|
313
|
+
die(`${LOG_PREFIX} Key must target a nested field under ${WORKSPACE_CONFIG_ROOT_KEY} (e.g., ${WORKSPACE_CONFIG_PREFIX}methodology.testing).`);
|
|
314
|
+
}
|
|
250
315
|
const projectRoot = findProjectRoot();
|
|
251
|
-
const
|
|
252
|
-
if (!existsSync(
|
|
253
|
-
die(`${LOG_PREFIX} Missing ${
|
|
316
|
+
const workspacePath = path.join(projectRoot, WORKSPACE_FILE_NAME);
|
|
317
|
+
if (!existsSync(workspacePath)) {
|
|
318
|
+
die(`${LOG_PREFIX} Missing ${WORKSPACE_FILE_NAME}. Run \`${WORKSPACE_INIT_COMMAND}\` first.`);
|
|
254
319
|
}
|
|
255
|
-
console.log(`${LOG_PREFIX} Setting ${options.key}=${options.value} via micro-worktree isolation
|
|
320
|
+
console.log(`${LOG_PREFIX} Setting ${options.key}=${options.value} in ${WORKSPACE_FILE_NAME} via micro-worktree isolation`);
|
|
256
321
|
// Use micro-worktree to make atomic changes
|
|
257
322
|
await withMicroWorktree({
|
|
258
323
|
operation: OPERATION_NAME,
|
|
@@ -260,24 +325,26 @@ async function main() {
|
|
|
260
325
|
logPrefix: LOG_PREFIX,
|
|
261
326
|
pushOnly: true,
|
|
262
327
|
async execute({ worktreePath }) {
|
|
263
|
-
const
|
|
264
|
-
const
|
|
265
|
-
if (!existsSync(
|
|
266
|
-
die(`${LOG_PREFIX} Config file not found in micro-worktree: ${
|
|
328
|
+
const workspaceRelPath = WORKSPACE_FILE_NAME;
|
|
329
|
+
const mwWorkspacePath = path.join(worktreePath, workspaceRelPath);
|
|
330
|
+
if (!existsSync(mwWorkspacePath)) {
|
|
331
|
+
die(`${LOG_PREFIX} Config file not found in micro-worktree: ${workspaceRelPath}`);
|
|
267
332
|
}
|
|
268
|
-
// Read
|
|
269
|
-
const
|
|
333
|
+
// Read workspace and extract software_delivery config section
|
|
334
|
+
const workspace = readRawWorkspace(mwWorkspacePath);
|
|
335
|
+
const softwareDeliveryConfig = getSoftwareDeliveryConfigFromWorkspace(workspace);
|
|
270
336
|
// Apply set
|
|
271
|
-
const result = applyConfigSet(
|
|
337
|
+
const result = applyConfigSet(softwareDeliveryConfig, configKey, options.value);
|
|
272
338
|
if (!result.ok) {
|
|
273
339
|
die(`${LOG_PREFIX} ${result.error}`);
|
|
274
340
|
}
|
|
275
|
-
// Write updated
|
|
276
|
-
|
|
341
|
+
// Write updated workspace with replaced software_delivery section
|
|
342
|
+
const updatedWorkspace = setSoftwareDeliveryConfigInWorkspace(workspace, result.config);
|
|
343
|
+
writeRawWorkspace(mwWorkspacePath, updatedWorkspace);
|
|
277
344
|
console.log(`${LOG_PREFIX} Config validated and written successfully.`);
|
|
278
345
|
return {
|
|
279
346
|
commitMessage: `${COMMIT_PREFIX} ${options.key}=${options.value}`,
|
|
280
|
-
files: [
|
|
347
|
+
files: [workspaceRelPath],
|
|
281
348
|
};
|
|
282
349
|
},
|
|
283
350
|
});
|
package/dist/delegation-list.js
CHANGED
package/dist/doctor.js
CHANGED
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
import * as fs from 'node:fs';
|
|
12
12
|
import * as path from 'node:path';
|
|
13
13
|
import { execFileSync } from 'node:child_process';
|
|
14
|
-
import { createWUParser, getResolvedPaths, detectOrphanWorktrees, detectMissingTrackedWorktrees, } from '@lumenflow/core';
|
|
14
|
+
import { createWUParser, getResolvedPaths, detectOrphanWorktrees, detectMissingTrackedWorktrees, getConfigFilePresence, WORKSPACE_CONFIG_FILE_NAME, } from '@lumenflow/core';
|
|
15
15
|
import { loadLaneDefinitions, detectLaneOverlaps } from './lane-health.js';
|
|
16
16
|
import { runCLI } from './cli-entry-point.js';
|
|
17
17
|
/**
|
|
18
18
|
* WU-1386: Managed files that should not have uncommitted changes
|
|
19
19
|
*/
|
|
20
20
|
const MANAGED_FILE_PATTERNS = [
|
|
21
|
-
|
|
21
|
+
WORKSPACE_CONFIG_FILE_NAME,
|
|
22
22
|
'.lumenflow.lane-inference.yaml',
|
|
23
23
|
'AGENTS.md',
|
|
24
24
|
'CLAUDE.md',
|
|
@@ -94,11 +94,11 @@ function checkSafeGit(projectDir) {
|
|
|
94
94
|
// WU-1654: Read safe-git path from config instead of hardcoding
|
|
95
95
|
let safeGitPath;
|
|
96
96
|
try {
|
|
97
|
-
const resolved = getResolvedPaths({ projectRoot: projectDir });
|
|
97
|
+
const resolved = getResolvedPaths({ projectRoot: projectDir, strictWorkspace: true });
|
|
98
98
|
safeGitPath = resolved.safeGitPath;
|
|
99
99
|
}
|
|
100
100
|
catch {
|
|
101
|
-
//
|
|
101
|
+
// Default location when config cannot be loaded
|
|
102
102
|
safeGitPath = path.join(projectDir, 'scripts', 'safe-git');
|
|
103
103
|
}
|
|
104
104
|
const relativePath = path.relative(projectDir, safeGitPath);
|
|
@@ -132,20 +132,20 @@ function checkAgentsMd(projectDir) {
|
|
|
132
132
|
};
|
|
133
133
|
}
|
|
134
134
|
/**
|
|
135
|
-
* Check
|
|
135
|
+
* Check whether canonical workspace config exists.
|
|
136
136
|
*/
|
|
137
137
|
function checkLumenflowConfig(projectDir) {
|
|
138
|
-
const
|
|
139
|
-
if (!
|
|
138
|
+
const { workspaceConfigExists } = getConfigFilePresence(projectDir);
|
|
139
|
+
if (!workspaceConfigExists) {
|
|
140
140
|
return {
|
|
141
141
|
passed: false,
|
|
142
|
-
message:
|
|
143
|
-
details:
|
|
142
|
+
message: `${WORKSPACE_CONFIG_FILE_NAME} missing`,
|
|
143
|
+
details: `Run: pnpm workspace-init --yes`,
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
146
|
return {
|
|
147
147
|
passed: true,
|
|
148
|
-
message:
|
|
148
|
+
message: `Workspace config present (${WORKSPACE_CONFIG_FILE_NAME})`,
|
|
149
149
|
};
|
|
150
150
|
}
|
|
151
151
|
/**
|
|
@@ -549,7 +549,7 @@ export async function runDoctor(projectDir, options = {}) {
|
|
|
549
549
|
}
|
|
550
550
|
// Determine overall status
|
|
551
551
|
// Note: laneHealth is advisory (not included in critical checks)
|
|
552
|
-
const criticalChecks = [checks.husky, checks.safeGit, checks.agentsMd];
|
|
552
|
+
const criticalChecks = [checks.husky, checks.safeGit, checks.agentsMd, checks.lumenflowConfig];
|
|
553
553
|
const allCriticalPassed = criticalChecks.every((check) => check.passed);
|
|
554
554
|
// WU-1386: Calculate exit code
|
|
555
555
|
// 0 = healthy (all checks pass, no warnings)
|
|
@@ -584,7 +584,7 @@ export async function runDoctorForInit(projectDir) {
|
|
|
584
584
|
let warnings = 0;
|
|
585
585
|
let errors = 0;
|
|
586
586
|
// Critical checks that count as errors (if they fail, safety is compromised)
|
|
587
|
-
const criticalCheckKeys = ['husky', 'safeGit', 'agentsMd'];
|
|
587
|
+
const criticalCheckKeys = ['husky', 'safeGit', 'agentsMd', 'lumenflowConfig'];
|
|
588
588
|
for (const [key, check] of Object.entries(result.checks)) {
|
|
589
589
|
if (!check.passed) {
|
|
590
590
|
if (criticalCheckKeys.includes(key)) {
|
|
@@ -625,6 +625,12 @@ export async function runDoctorForInit(projectDir) {
|
|
|
625
625
|
if (!result.checks.agentsMd.passed) {
|
|
626
626
|
lines.push(' Error: AGENTS.md not found');
|
|
627
627
|
}
|
|
628
|
+
if (!result.checks.lumenflowConfig.passed) {
|
|
629
|
+
lines.push(` Error: ${result.checks.lumenflowConfig.message}`);
|
|
630
|
+
if (result.checks.lumenflowConfig.details) {
|
|
631
|
+
lines.push(` ${result.checks.lumenflowConfig.details}`);
|
|
632
|
+
}
|
|
633
|
+
}
|
|
628
634
|
// WU-1387: Show lane health issues
|
|
629
635
|
if (!result.checks.laneHealth.passed) {
|
|
630
636
|
lines.push(` Warning: Lane overlap detected - ${result.checks.laneHealth.message}`);
|
|
@@ -746,7 +752,7 @@ export function formatDoctorOutput(result) {
|
|
|
746
752
|
lines.push('');
|
|
747
753
|
lines.push('To fix missing components:');
|
|
748
754
|
lines.push(' pnpm install && pnpm prepare # Install Husky hooks');
|
|
749
|
-
lines.push('
|
|
755
|
+
lines.push(' pnpm workspace-init --yes # Create canonical workspace.yaml');
|
|
750
756
|
}
|
|
751
757
|
lines.push('');
|
|
752
758
|
return lines.join('\n');
|
package/dist/file-delete.js
CHANGED
|
@@ -202,7 +202,7 @@ Examples:
|
|
|
202
202
|
* Main entry point
|
|
203
203
|
*/
|
|
204
204
|
/* istanbul ignore next -- CLI entry point tested via subprocess */
|
|
205
|
-
async function main() {
|
|
205
|
+
export async function main() {
|
|
206
206
|
const args = parseFileDeleteArgs(process.argv);
|
|
207
207
|
if (args.help) {
|
|
208
208
|
printHelp();
|
package/dist/file-edit.js
CHANGED
|
@@ -208,7 +208,7 @@ Examples:
|
|
|
208
208
|
* Main entry point
|
|
209
209
|
*/
|
|
210
210
|
/* istanbul ignore next -- CLI entry point tested via subprocess */
|
|
211
|
-
async function main() {
|
|
211
|
+
export async function main() {
|
|
212
212
|
const args = parseFileEditArgs(process.argv);
|
|
213
213
|
if (args.help) {
|
|
214
214
|
printHelp();
|
package/dist/file-read.js
CHANGED
|
@@ -171,7 +171,7 @@ Examples:
|
|
|
171
171
|
* Main entry point
|
|
172
172
|
*/
|
|
173
173
|
/* istanbul ignore next -- CLI entry point tested via subprocess */
|
|
174
|
-
async function main() {
|
|
174
|
+
export async function main() {
|
|
175
175
|
const args = parseFileReadArgs(process.argv);
|
|
176
176
|
if (args.help) {
|
|
177
177
|
printHelp();
|
package/dist/file-write.js
CHANGED
|
@@ -166,7 +166,7 @@ Examples:
|
|
|
166
166
|
* Main entry point
|
|
167
167
|
*/
|
|
168
168
|
/* istanbul ignore next -- CLI entry point tested via subprocess */
|
|
169
|
-
async function main() {
|
|
169
|
+
export async function main() {
|
|
170
170
|
const args = parseFileWriteArgs(process.argv);
|
|
171
171
|
if (args.help) {
|
|
172
172
|
printHelp();
|
package/dist/flow-bottlenecks.js
CHANGED
|
@@ -142,7 +142,7 @@ function formatAsMermaid(analysis, coreGraph) {
|
|
|
142
142
|
/**
|
|
143
143
|
* Main function
|
|
144
144
|
*/
|
|
145
|
-
async function main() {
|
|
145
|
+
export async function main() {
|
|
146
146
|
const opts = parseArgs();
|
|
147
147
|
const limit = parseInt(opts.limit, 10);
|
|
148
148
|
console.log(`${LOG_PREFIX} Building dependency graph...`);
|
package/dist/flow-report.js
CHANGED
|
@@ -24,6 +24,7 @@ import { Command } from 'commander';
|
|
|
24
24
|
import { generateFlowReport, TELEMETRY_PATHS, } from '@lumenflow/metrics';
|
|
25
25
|
import { WU_PATHS } from '@lumenflow/core/wu-paths';
|
|
26
26
|
import { runCLI } from './cli-entry-point.js';
|
|
27
|
+
import { FLOW_REPORT_WU_DISPLAY_LIMIT, FLOW_REPORT_TITLE_COLUMN_WIDTH, WU_ID_COLUMN_WIDTH, LANE_COLUMN_WIDTH, GATE_NAME_COLUMN_WIDTH, MS_PER_HOUR, ONE_DECIMAL_ROUNDING_FACTOR, JSON_INDENT, } from './constants.js';
|
|
27
28
|
/** Log prefix for console output */
|
|
28
29
|
const LOG_PREFIX = '[flow:report]';
|
|
29
30
|
/** Default report window in days */
|
|
@@ -206,8 +207,8 @@ function calculateCycleTime(wu) {
|
|
|
206
207
|
const claimed = new Date(wu.claimed_at);
|
|
207
208
|
const completed = new Date(wu.completed_at);
|
|
208
209
|
const diffMs = completed.getTime() - claimed.getTime();
|
|
209
|
-
const diffHours = diffMs /
|
|
210
|
-
return Math.round(diffHours *
|
|
210
|
+
const diffHours = diffMs / MS_PER_HOUR;
|
|
211
|
+
return Math.round(diffHours * ONE_DECIMAL_ROUNDING_FACTOR) / ONE_DECIMAL_ROUNDING_FACTOR;
|
|
211
212
|
}
|
|
212
213
|
/**
|
|
213
214
|
* Filter events by date range
|
|
@@ -236,7 +237,7 @@ function formatAsTable(report) {
|
|
|
236
237
|
lines.push('├─────────────────────────────────────────────────────────────┤');
|
|
237
238
|
lines.push('│ By Name: │');
|
|
238
239
|
for (const [name, stats] of Object.entries(report.gates.byName)) {
|
|
239
|
-
lines.push(`│ ${name.padEnd(
|
|
240
|
+
lines.push(`│ ${name.padEnd(GATE_NAME_COLUMN_WIDTH)} ${stats.passRate}% (${stats.passed}/${stats.total})`);
|
|
240
241
|
}
|
|
241
242
|
lines.push('└─────────────────────────────────────────────────────────────┘');
|
|
242
243
|
lines.push('');
|
|
@@ -246,11 +247,11 @@ function formatAsTable(report) {
|
|
|
246
247
|
lines.push('├─────────────────────────────────────────────────────────────┤');
|
|
247
248
|
lines.push(`│ Completed: ${report.wus.completed}`);
|
|
248
249
|
lines.push('├─────────────────────────────────────────────────────────────┤');
|
|
249
|
-
for (const wu of report.wus.list.slice(0,
|
|
250
|
-
lines.push(`│ ${wu.wuId.padEnd(
|
|
250
|
+
for (const wu of report.wus.list.slice(0, FLOW_REPORT_WU_DISPLAY_LIMIT)) {
|
|
251
|
+
lines.push(`│ ${wu.wuId.padEnd(WU_ID_COLUMN_WIDTH)} ${wu.completedDate} ${wu.lane.padEnd(LANE_COLUMN_WIDTH)} ${wu.title.slice(0, FLOW_REPORT_TITLE_COLUMN_WIDTH)}`);
|
|
251
252
|
}
|
|
252
|
-
if (report.wus.list.length >
|
|
253
|
-
lines.push(`│ ... and ${report.wus.list.length -
|
|
253
|
+
if (report.wus.list.length > FLOW_REPORT_WU_DISPLAY_LIMIT) {
|
|
254
|
+
lines.push(`│ ... and ${report.wus.list.length - FLOW_REPORT_WU_DISPLAY_LIMIT} more`);
|
|
254
255
|
}
|
|
255
256
|
lines.push('└─────────────────────────────────────────────────────────────┘');
|
|
256
257
|
lines.push('');
|
|
@@ -267,7 +268,7 @@ function formatAsTable(report) {
|
|
|
267
268
|
/**
|
|
268
269
|
* Main function
|
|
269
270
|
*/
|
|
270
|
-
async function main() {
|
|
271
|
+
export async function main() {
|
|
271
272
|
const opts = parseArgs();
|
|
272
273
|
const baseDir = process.cwd();
|
|
273
274
|
console.log(`${LOG_PREFIX} Generating flow report...`);
|
|
@@ -302,7 +303,7 @@ async function main() {
|
|
|
302
303
|
console.log(formatAsTable(report));
|
|
303
304
|
}
|
|
304
305
|
else {
|
|
305
|
-
console.log(JSON.stringify(report, null,
|
|
306
|
+
console.log(JSON.stringify(report, null, JSON_INDENT));
|
|
306
307
|
}
|
|
307
308
|
}
|
|
308
309
|
// WU-1181: Use import.meta.main instead of process.argv[1] comparison
|
package/dist/gates.js
CHANGED
|
@@ -70,7 +70,7 @@ import { runOnboardingSmokeTestGate } from './onboarding-smoke-test.js';
|
|
|
70
70
|
// ── WU-1647: Import from extracted modules ─────────────────────────────
|
|
71
71
|
import { run, makeGateLogger, readLogTail, createAgentLogContext, emitFormatCheckGuidance, loadCurrentWUCodePaths, } from './gates-utils.js';
|
|
72
72
|
import { resolveDocsOnlyTestPlan, formatDocsOnlySkipMessage, } from './gates-plan-resolvers.js';
|
|
73
|
-
import { runFormatCheckGate, runIncrementalLint, runChangedTests, runSafetyCriticalTests, runIntegrationTests, runSpecLinterGate, runBacklogSyncGate, runSupabaseDocsGate, runLaneHealthGate, runDocsOnlyFilteredTests, } from './gates-runners.js';
|
|
73
|
+
import { runFormatCheckGate, runIncrementalLint, runChangedTests, runSafetyCriticalTests, runIntegrationTests, runSpecLinterGate, runClaimValidationGate, runBacklogSyncGate, runSupabaseDocsGate, runLaneHealthGate, runDocsOnlyFilteredTests, } from './gates-runners.js';
|
|
74
74
|
// ── Re-exports for backward compatibility ──────────────────────────────
|
|
75
75
|
// Tests and other modules import these from gates.ts; preserve the public API.
|
|
76
76
|
export { parsePrettierListOutput, buildPrettierWriteCommand, formatFormatCheckGuidance, parseWUFromBranchName, extractPackagesFromCodePaths, loadCurrentWUCodePaths, } from './gates-utils.js';
|
|
@@ -260,6 +260,7 @@ async function executeGates(opts) {
|
|
|
260
260
|
const gateRunFunctions = {
|
|
261
261
|
[GATE_NAMES.FORMAT_CHECK]: runFormatCheckGate,
|
|
262
262
|
[GATE_NAMES.SPEC_LINTER]: runSpecLinterGate,
|
|
263
|
+
[GATE_NAMES.CLAIM_VALIDATION]: runClaimValidationGate,
|
|
263
264
|
[GATE_NAMES.BACKLOG_SYNC]: runBacklogSyncGate,
|
|
264
265
|
[GATE_NAMES.SUPABASE_DOCS_LINTER]: runSupabaseDocsGate,
|
|
265
266
|
[GATE_NAMES.LANE_HEALTH]: (ctx) => runLaneHealthGate({ ...ctx, mode: laneHealthMode }),
|
|
@@ -498,7 +499,7 @@ async function executeGates(opts) {
|
|
|
498
499
|
return true;
|
|
499
500
|
}
|
|
500
501
|
// WU-1537: Wrap executeGates in a standard main() for runCLI consistency
|
|
501
|
-
async function main() {
|
|
502
|
+
export async function main() {
|
|
502
503
|
const opts = parseGatesOptions();
|
|
503
504
|
const ok = await executeGates({ ...opts, argv: process.argv.slice(2) });
|
|
504
505
|
if (!ok) {
|
package/dist/git-branch.js
CHANGED
|
@@ -157,7 +157,7 @@ Examples:
|
|
|
157
157
|
* Main entry point
|
|
158
158
|
*/
|
|
159
159
|
/* istanbul ignore next -- CLI entry point tested via subprocess */
|
|
160
|
-
async function main() {
|
|
160
|
+
export async function main() {
|
|
161
161
|
const args = parseGitBranchArgs(process.argv);
|
|
162
162
|
if (args.help) {
|
|
163
163
|
printHelp();
|
package/dist/git-diff.js
CHANGED
|
@@ -145,7 +145,7 @@ Examples:
|
|
|
145
145
|
* Main entry point
|
|
146
146
|
*/
|
|
147
147
|
/* istanbul ignore next -- CLI entry point tested via subprocess */
|
|
148
|
-
async function main() {
|
|
148
|
+
export async function main() {
|
|
149
149
|
const args = parseGitDiffArgs(process.argv);
|
|
150
150
|
if (args.help) {
|
|
151
151
|
printHelp();
|
package/dist/git-log.js
CHANGED
|
@@ -194,7 +194,7 @@ Examples:
|
|
|
194
194
|
* Main entry point
|
|
195
195
|
*/
|
|
196
196
|
/* istanbul ignore next -- CLI entry point tested via subprocess */
|
|
197
|
-
async function main() {
|
|
197
|
+
export async function main() {
|
|
198
198
|
const args = parseGitLogArgs(process.argv);
|
|
199
199
|
if (args.help) {
|
|
200
200
|
printHelp();
|